Commit Graph

230 Commits

Author SHA1 Message Date
Stephan Bergmann
a457c7c6b0 loplugin:includeform: framework
Change-Id: Ib5eaab06ff0cc1b44db9e4057ab349a0990af14d
2017-10-23 22:46:07 +02:00
Tor Lillqvist
27bde9a6ab Drop gratuitous initial :: from comphelper::ProfileZone
Change-Id: Iae7d86b857d0563d9ed9d9b4187e009554698412
2017-08-25 16:09:53 +03:00
Armin Le Grand
db6b703d39 Allow non-modal Dialogs during FileImport/Load
When opening a file that triggers Dialogs (e.g. cannot
read/repair/FileType) the Frame from which it was
initialized gets blocked. This irritates quite some
people. Changed this to a non-modal Dialog so that
the user can continue to work with all opened docs,
open new ones, close and print/PDF/export these.

Change-Id: I048d3de3369527cec20d26396b87439254764b8a
Reviewed-on: https://gerrit.libreoffice.org/41534
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2017-08-25 11:31:42 +02:00
Noel Grandin
4250b25c6a teach unnecessaryparen loplugin about identifiers
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b
Reviewed-on: https://gerrit.libreoffice.org/39737
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10 09:57:24 +02:00
Noel Grandin
528632660b convert ErrCode to strong typedef
would have preferred to re-use o3tl::strong_int, of which this
is a modified copy, but there are lots of convenience accessors
which are nice to define on the class.

Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a
Reviewed-on: https://gerrit.libreoffice.org/38497
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21 08:42:30 +02:00
László Németh
08f6f9dded Profiling API: add ProfileZones
Change-Id: Ie5669bd75d9b4be047d98402cb69ac313ab618df
Reviewed-on: https://gerrit.libreoffice.org/38787
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-16 14:01:56 +02:00
Noel Grandin
344957aae6 convert LoadEnv::EFeature to o3tl::typed_flags
Change-Id: I4c16b68c820783e9bd27fa273f2017b5088f4b85
2017-02-16 12:42:04 +02:00
Noel Grandin
3910f943e9 drop unused enumerators from TargetHelper::ESpecialTarget
Change-Id: Ieda0b6f09b0e4cb463de32309a2617018bb7cee5
2017-02-16 12:42:04 +02:00
Noel Grandin
d76d15552d convert FrameListAnalyzer::EDetect to scoped enum
Change-Id: I4e1bd449c4ad60ec810ef52c73d6c6ff3dd313ee
2017-02-16 08:17:34 +02:00
Noel Grandin
8c00536d87 Convert WindowType to scoped enum
Change-Id: I85cfe02f28729e13f2c0dd3d91cd89e6f3e3b6a9
Reviewed-on: https://gerrit.libreoffice.org/34219
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-14 10:44:08 +00:00
Stephan Bergmann
6dce9c6757 Add missing #includes
...and remove some unncessary using directives/declarations, in preparation of
removing now-unnecessary #includes from cppumaker-generated files, post
e57ca02849 "Remove dynamic exception
specifications".

Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-06 17:21:16 +01:00
Noel Grandin
bac9a5d634 loplugin:unusedenumconstants in framework
Convert EProtocol to scoped enum and drop E_UNKNOWN_PROTOCOL.
Convert ToggleButtonToolbarController::Style to scoped enum and drop
STYLE_TOGGLEBUTTON.
Convert TargetHelper::ESpecialTarget to scoped enum and drop
E_NOT_SPECIAL.

Change-Id: I412adacac15192cf6563ce4d5e5b74bfffff4737
Reviewed-on: https://gerrit.libreoffice.org/33949
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06 07:57:28 +00:00
Stephan Bergmann
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
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