Commit Graph
217 Commits
Author SHA1 Message Date
Noel Grandin d15b4e2045 teach sallogareas plugin to catch inconsistencies
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a
Reviewed-on: https://gerrit.libreoffice.org/32004
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-15 06:45:14 +00:00
Noel Grandin 872cf486c5 Revert "verify SolarMutex when ref-counting VclPtr" series
This reverts the following commits:

    commit 722f4e1d86
    tdf#104573 - Assertion failed: SolarMutex not locked

    commit f04ec99f5e
    tdf#104573 - Assertion failed: SolarMutex not locked

    commit 71b1e3ff63
    tdf#104573 - Assertion failed: SolarMutex not locked when trying

    commit e794ce1eef
    verify that we hold the SolarMutex when ref-counting VclPtr

IRC discussion:
<noelgrandin> sberg, maybe I should revert this whole "VclPtr assert" series, I don't have mental bandwidth to sort this out properly now
<sberg> noelgrandin, what I fear is that you'll end up adding lots of SolarMutex locks to small places, where the proper fix would be to add it further out; and once such a dreaded recursive SolarMutex lock is in place (but needlessly so, once the proper fix is done), it's hard to clean that up again
<noelgrandin> sberg, yeah, in that case I'll just remove all of this, leave it for another day

Change-Id: Ie4f84b72b79a1b7e80164b5c7693af398c2c569a
Reviewed-on: https://gerrit.libreoffice.org/31946
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-13 13:04:34 +00:00
Noel Grandin e794ce1eef verify that we hold the SolarMutex when ref-counting VclPtr
Change-Id: If0c5a8c99f0f853c9ecad0f1a4a7299d69805b34
Reviewed-on: https://gerrit.libreoffice.org/31755
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-08 17:26:41 +00:00
Markus Mohrhard 039261b3f6 orcus is mandatory now
We use it as a json parser, for calc cell styles and tests. Making it
optional is just making the code more complex and introduces more
sources for errors.

Change-Id: I8769628a4ab9519cafc3d43db7c0007e0aa265dc
Reviewed-on: https://gerrit.libreoffice.org/31307
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-11-28 15:52:20 +00:00
Noel Grandin 78b4a1fb01 update vclwidget loplugin to find ref-dropping assigment
Look for places where we are accidentally assigning a returned-by-value
VclPtr<T> to a T*, which generally ends up in a use-after-free.

Change-Id: I4f361eaca88820cdb7aa3b8340212db61580fdd9
Reviewed-on: https://gerrit.libreoffice.org/30749
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-11 06:55:41 +00:00
Noel Grandin 7f509501e9 loplugin:oncevar in framework
Change-Id: I7528a4afd59a19b069bcad2106ca80f429ef12e0
Reviewed-on: https://gerrit.libreoffice.org/30525
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-07 06:38:52 +00:00
Andrea Gelmini c7114b66bd Fix typos
Change-Id: I7000efdb7276053c16de992fa8f9a4e614ecb3e2
Reviewed-on: https://gerrit.libreoffice.org/29434
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-03 08:59:34 +00:00
Tor Lillqvist 38a3743e0c Revert "tdf#98837 - Fail loading a new document with read only property set to true"
There was not really a good enough reason for the change, and it
causes unfortunate regressions in 3rd-party code that previously
worked fine. (It also caused two regressions in LO's own code, but
those were already fixed.)

This reverts commit 5334ff287c.
2016-08-10 17:42:52 +03:00
Maxim Monastirsky cc67943959 LoadEnv::getTargetComponent() is supposed to return nothing
... if loading the document failed. Make sure that's the case
also when the frame containing BackingComp was about to be
recycled. Can be tested by trying to open password-protected
odt, but canceling the password prompt.

Change-Id: I733357b3a961fd88db010dd8eb89e01f0cad10fa
2016-05-04 01:11:59 +03:00
Maxim Monastirsky 579c2de3a8 tdf#80999 Canceling password prompt should abort detection
... instead of continuing the detection loop and being
"detected" as plain text. The detection API will from now
return a type based on the file extension only, which is
far more useful than "plain text" anyway. Plus the media
descriptor has a flag to indicate that the detection wasn't
completed, which can be also used by the loading code to
abort the loading process.

Change-Id: Ida37e2687bd5cd86b5780620724e9bce82e11946
Reviewed-on: https://gerrit.libreoffice.org/24428
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2016-04-27 18:36:57 +00:00
Stephan Bergmann ed467869d8 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: Idf27ee5370f1fa24adf22908d9e801c7d40db935
2016-04-20 17:25:42 +02:00
Mark Hung e9230b2b09 tdf#48300 bring window to top and restore window when minimized.
While XWindow->ToTop() in Linux do the both for default ( None ),
ToTopFlags::RestoreWhenMin has to be specified in Windows in order
to restore the window, and ToTopFlags::ForegroundTask is necessary
when ToTopFlags::RestoreWhenMin is specified in order to bring
non-minimized window to the front.

Change-Id: Ief4a825a18d874a0c35211c9022a4261da6bcf8f
Reviewed-on: https://gerrit.libreoffice.org/23938
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-04-11 10:30:47 +00:00
Noel Grandin 9866efe3e5 loplugin:constantparam
Change-Id: I821ed77a6c6014c9a82d31a4b117ed6f1b4abf18
Reviewed-on: https://gerrit.libreoffice.org/23832
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-05 11:29:54 +00:00
Akash Jain 5334ff287c tdf#98837 - Fail loading a new document with read only property set to true
When opening a new document, via any API,  (URL: "private:factory/swriter")
with read-only property set to true, Writer opens with a new document in
edit mode. But the title still has (read-only) in it. Since a document can
only open in read-only mode if it has been saved first, the loading of new
documents with read-only property set to true will now fail.

Change-Id: I370e6fb1c94b6476c2ded872d6d7c820b25db53a
Reviewed-on: https://gerrit.libreoffice.org/23812
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-05 07:00:56 +00:00
Noel Grandin 3f7f497192 sequence->vector in framework
Change-Id: I457c3da4f4a31f58d688dcd96a2ccfc36518490d
Reviewed-on: https://gerrit.libreoffice.org/23692
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-01 07:33:45 +00:00
Maxim Monastirsky 21b92f386c MenuDispatcher::m_pMenuManager is always nullptr
... as shown by 7da15debe3.
Which means that MenuManager is unused, and MenuDispatcher
does nothing useful.

Change-Id: Ic85619531054a573d971d38b52609e1cbcaf780c
Reviewed-on: https://gerrit.libreoffice.org/23117
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-03-10 15:23:31 +00:00
Noel Grandin 0839f90394 convert EConfigurationModes to scoped enum
Change-Id: I1e81c8d637e738f536f7efad8b67d0c9183e6483
2016-02-24 11:48:38 +02:00
Tor Lillqvist 574482123b tdf#97435: Avoid persistent window state crack when used from LibreOfficeKit
Change-Id: Icab7dea3cf63f3932b7759acec339b498a8ac9c5
Reviewed-on: https://gerrit.libreoffice.org/22233
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-02-10 11:24:19 +02:00
Tor Lillqvist cede4a1af3 Revert "tdf#97435: Avoid persistent window state crack when headless"
The change caused failures in some Java unit tests.

This reverts commit 882d27fce2.
2016-02-09 19:42:29 +02:00
Tor Lillqvist 882d27fce2 tdf#97435: Avoid persistent window state crack when headless
Change-Id: Icab7dea3cf63f3932b7759acec339b498a8ac9c5
Reviewed-on: https://gerrit.libreoffice.org/22233
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-02-09 16:49:00 +00:00
Caolán McNamara bea8a7ad63 cppcheck: noExplicitConstructor
Change-Id: Ib43e53d5b6c9c130adb765ac9b769f58060ac640
2015-12-29 19:46:23 +00:00
Noel Grandin 8e234c5b7d use initialiser syntax for Sequence<OUString>
replaced using the script:

git grep -lP 'Sequence.*OUString.*\(1\)'
  | xargs perl -0777 -pi
    -e "s/Sequence< OUString > (\w+)\(1\);
.*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g"

Change-Id: I23688a91562051a8eed11fc2a85599545c285c34
Reviewed-on: https://gerrit.libreoffice.org/19967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 10:13:08 +00:00
Stephan Bergmann 06c5c63020 loplugin:nullptr (automatic rewrite)
Change-Id: Ie178c474921c1695927a9b01a9972baf09fbb73d
2015-11-10 10:31:27 +01:00
Stephan Bergmann c5376ef685 loplugin:stringconstant: elide explicit ctor usage (manually due to macros)
Change-Id: I4633229b94be1b15dfa14eafe8d7176a1fd253c9
2015-11-06 12:32:17 +01:00
Stephan Bergmann 69ef5d40c2 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: Iff1f68969f0f044c59a92ab4c019c471511743f7
2015-11-06 09:36:08 +01:00
Noel Grandin 5797d29e9e use uno::Reference::set method instead of assignment
Change-Id: Ic979f8a7734d0ef7a915d47a875cdcd460c0cc58
2015-11-02 12:23:16 +02:00
Noel Grandin 7cdbde4867 Initialize Sequence<beans::NamedValue> from initializer_lists
Change-Id: I216dcbd983dcf3df79df9fda371b93114540a9d8
2015-10-29 08:57:08 +02:00
Jan Holesovsky b34f03271e impl_mergeMediaDescriptorWithMightExistingModelArgs is a sick function name.
Rename to addModelArgs, and kill some whitespace.

Change-Id: Ic644cb2d1074450491d271db36db92049e7d77e3
2015-10-21 09:26:09 +02:00
Stephan Bergmann d85f4558d1 loplugin:defaultparams
Change-Id: I3432d70efd156e59ba9a2ac72de4ec46887d7852
2015-10-20 11:45:42 +02:00
Stephan Bergmann b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Andrea Gelmini eab0904f0e Fix typos
Change-Id: I81f6f356c1a6873fcc9a3bde487127b673fa9a61
Reviewed-on: https://gerrit.libreoffice.org/18952
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Tested-by: Oliver Specht <oliver.specht@cib.de>
2015-09-30 12:39:01 +00:00
Markus Mohrhard c6726bdbd2 make gnumeric xml a real LibreOffice filter format
Change-Id: I502f4610718b5c1914a54346c46d4f998c4d370f
2015-09-27 07:38:47 +02:00
Markus Mohrhard 6ae1b105e3 don't protect the gnumeric filter with the USE_ORCUS flag
Change-Id: Id91c7844879bea589bf97f999fd0c69669dfa7f6
2015-08-28 02:03:39 +02:00
Markus Mohrhard b0a2cc695e remove crazy whitespaces
Conflicts:
	framework/source/loadenv/loadenv.cxx

Change-Id: Ia104e5dedbaf19dff5b0eaf4eb6f4c355570cc00
2015-08-28 02:03:34 +02:00
Markus Mohrhard c427f2ee17 make experimental orcus import work again
Change-Id: I2e599331669c3018557835ab227395c54c247ac9
2015-08-28 02:03:33 +02:00
Takeshi Abe 431f2ce818 framework: tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants.

Change-Id: I6acff50f23bcbac58c689caf2a7f07dbd5404e57
Reviewed-on: https://gerrit.libreoffice.org/17734
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-14 10:46:14 +00:00
Giuseppe Castagno bc9a8ddbb7 tdf#82744: fix WebDAV lock/unlock behaviour - part 2
Changes done to the code in framework, comphelper and unotools,
in no particular order

- add an interaction handler dedicated to WebDAV
The stock interaction handler can be missing depending on the need of
the framework performing its tasks, so a dedicated handler is
provided, this one is always present.

- force opening of a WebDAV file.
A WebDAV file sould be open r/o even if explicitly requested to open
as r/w.
This is a limitation of current WebDAV implementation, not of the
standard.
This change is needed in order to reopen correctly a file as
requested by a 'Edit Mode' GUI command.

Change-Id: I5368fa2c0511f1630e6d6139c6a986d33aa19082
Reviewed-on: https://gerrit.libreoffice.org/17182
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-07-22 16:17:04 +00:00
Andrea Gelmini 465489d97a Fix typos
Change-Id: Id884946cae0687d0b71c967e236e58df17567884
Reviewed-on: https://gerrit.libreoffice.org/16707
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-07-03 09:43:46 +00:00
Noel Grandin b419da0f53 convert SHOW constants to scoped enum
Change-Id: I2712a0901049885502cade31f9757f712048bb33
2015-05-25 10:31:35 +02:00
Stephan Bergmann 591c319227 More loplugin:simplifybool
Change-Id: If173ec26ed53cf99fd23f0930eaeefc595a05722
2015-04-27 15:30:56 +02:00
Stephan Bergmann ac1130130b Use comphelper::SequenceAsHashMap::getUnpackedValueOrDefault<bool>
...instead of ...<sal_Bool>; plus ensuing loplugin:implicitboolconversion

Change-Id: I5400e9d3175b9fe9b6088d37fe6bf3275314d7d0
2015-04-23 17:03:58 +02:00
Stephan Bergmann b98352996c framework: Use appropriate OUString functions on string constants
Change-Id: I5da5cd3254102c742021b3e7b4e1f907ca897ca5
2014-12-18 14:12:22 +01:00
Stephan Bergmann 30bf5787e1 Revert "cid#706553 Uncaught exception"
This reverts commit 0a87f4ad1a, now that
fced31697b "comphelper::SequenceAsHashMap: throw
IllegalArgumentException" made the underlying problem go away.

Conflicts:
	framework/source/inc/loadenv/loadenv.hxx
	framework/source/loadenv/loadenv.cxx

Change-Id: Id2f468bf0f24f5a8a7a0e6eb113ccfedd35b03cc
2014-11-19 18:30:46 +01:00
Stephan Bergmann 6f58f34fc0 Revert "cid#706552 Uncaught exception"
This reverts commit ecd00991fd, now that
fced31697b "comphelper::SequenceAsHashMap: throw
IllegalArgumentException" made the underlying problem go away.

Conflicts:
	framework/source/inc/loadenv/loadenv.hxx
	framework/source/loadenv/loadenv.cxx

Change-Id: I7821ae67b5cc99b8591fbf06396ac20098e55c8d
2014-11-19 18:28:46 +01:00
Stephan Bergmann e753f8b9dc Revert "cid#706551 Uncaught exception"
This reverts commit ec651eaead, now that
fced31697b "comphelper::SequenceAsHashMap: throw
IllegalArgumentException" made the underlying problem go away.

Conflicts:
	framework/source/inc/loadenv/loadenv.hxx
	framework/source/loadenv/loadenv.cxx

Change-Id: I473815256b95f6e20a2e1a4a5617f491636305ab
2014-11-19 18:25:42 +01:00
Noel Grandin 705c48d32e fdo#38835 strip out OUString globals
they are largely unnecessary these days, since our OUString infrastructure
gained optimised handling for static char constants.

Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
2014-11-05 08:44:19 +02:00
Noel Grandin 277e98edce cid#1244948 Uncaught exception
Change-Id: I421f245fd3be90f0e1d08ad92b0723a64121ae12
2014-10-10 10:14:18 +02:00
Noel Grandin d7ea649b56 cid#1244950 Uncaught exception
Change-Id: I1aa4d437838dac42ac1fc803a2ba2a437fa3addb
2014-10-10 10:14:17 +02:00
Noel Grandin d79ca9b29a cid#1244951 Uncaught exception
Change-Id: I3bb5dc5932f4239507920cb9cafa66caab9ff7e0
2014-10-10 10:14:17 +02:00
Noel Grandin 36ec3ddc0b cid#1244952 Uncaught exception
Change-Id: Ied23e7df1d8ebda9976e63d03c122c058addf274
2014-10-10 10:14:17 +02:00