Commit Graph
1161 Commits
Author SHA1 Message Date
Julien Nabet 823ef9ef32 Use for-range loops in framework
Change-Id: I72ea832848fd7c76863bcee70a3303de488c0b0f
Reviewed-on: https://gerrit.libreoffice.org/51471
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-17 23:08:48 +01:00
Noel Grandin 2f5868c430 loplugin:redundantfcast look for redundant copies in return statements
Change-Id: I5f416c865dfe1c36018784246a8007452eb42008
Reviewed-on: https://gerrit.libreoffice.org/50996
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-12 07:37:24 +01:00
Andrea Gelmini 240e67e37e Fix typos
Change-Id: I005023337dbe593e0ac1d76f7b10848d24f314a5
Reviewed-on: https://gerrit.libreoffice.org/50785
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-03-06 09:42:04 +01:00
Caolán McNamara 942f05996b convert remaining ErrorBox to weld::MessageDialog
and

convert remaining QueryBox to weld::MessageDialog

Change-Id: Ifb4c316dee8eabf57c4940c44e29c65a2781aa6c
2018-02-26 15:27:09 +00:00
Stephan Bergmann ba8a70365e New loplugin:nestedunnamed
Change-Id: Ifb434589ef08428ce609bc7a40b015d4df13224c
Reviewed-on: https://gerrit.libreoffice.org/50048
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-21 08:09:46 +01:00
Noel Grandin 72593849bb ColorData->Color in sd..svx
Change-Id: I70de56b6bfb1ea4655ec03510fad92bf6645f64e
Reviewed-on: https://gerrit.libreoffice.org/50046
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-21 06:05:41 +01:00
Miklos Vajna 42c58f1c0c tdf#115218 framework: decouple HiddenForConversion from Hidden
Commit 4a0f506f0d (framework: disable
layout manager in hidden frames, 2018-01-17) added support for bypassing
the framework layout manager for doc conversion purposes, but the Hidden
flag has the meaning that the doc is only initially hidden, it may be
visible later, so reusing Hidden broke mail merge.

Introduce a dedicated HiddenForConversion flag, clients interested in
improved performance can opt in for that, and this way behavior for
Hidden is not changing.

Change-Id: If7537197900f8819f714b164c9e056b4ae69286d
Reviewed-on: https://gerrit.libreoffice.org/49302
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-02-06 20:42:57 +01:00
Miklos Vajna 4a0f506f0d framework: disable layout manager in hidden frames
The point of hidden frames is that they are not visible on the UI, only their
doc model / layout is accessible via the API or file format conversion. That
means that laying out the UI elements like menus and toolbars is pointless.

So change Frame::initialize() and Frame::setLayoutManager() to not enable the
layout manager for hidden frames. To do this, we need a new window style flag,
as both hidden and visible frames have an underlying hidden window at the time
the framework layout manager would be enabled.

Times for 200 hello world inputs: 5780 -> 5054 ms is spent in XHTML-load + ODT
export + close (87% of original).

Change-Id: I841507bbb62f8fc2979d20e2d579d0bb47b98f37
Reviewed-on: https://gerrit.libreoffice.org/48068
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-01-18 09:14:42 +01:00
Andrea Gelmini a6b69a9384 Fix typo
Change-Id: I51c97356c9c2939f2d94d6388c829a179ca00daa
Reviewed-on: https://gerrit.libreoffice.org/47853
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-15 13:53:21 +01:00
Andrea Gelmini a452643b43 Fix typos
Change-Id: I2b4988e1d81fe60f7699362480cd739d2620c053
Reviewed-on: https://gerrit.libreoffice.org/47856
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-14 16:31:26 +01:00
Andrea Gelmini cfffb09b3d Fix typos
Change-Id: I2a578961837076ebce3c1fb2681b0785d1d490ac
Reviewed-on: https://gerrit.libreoffice.org/47857
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-14 16:24:04 +01:00
Stephan Bergmann cf8b8cad05 More loplugin:cstylecast: framework
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: I8981ef6de675bf10c103e1af0afccd620762268d
2018-01-12 20:23:23 +01:00
Andrea Gelmini dbe0201d3a Fix typos
Change-Id: I766862d255ac285329ae423629c7445837ddd55f
Reviewed-on: https://gerrit.libreoffice.org/47280
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2018-01-05 11:03:10 +01:00
Tor Lillqvist de84816c1a tdf#107039: Avoid deadlock by locking the SolarMutex early on in one place
See bug report for backtraces of the deadlocking threads.

Change-Id: I0334118e173c37b6f9596249e1e2f0d196bbab3f
Reviewed-on: https://gerrit.libreoffice.org/47249
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-01-03 17:37:27 +01:00
Andrea Gelmini 3a355887ca Fix typos
Change-Id: I3f4ad9eff0730d3deea96b37fa7f36dfd038b214
Reviewed-on: https://gerrit.libreoffice.org/47301
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-03 12:19:33 +01:00
Andrea Gelmini d0222ba1fd Fix typos
Change-Id: I3d16dc162e5fa2e08134d848a835eb392e64056e
Reviewed-on: https://gerrit.libreoffice.org/47126
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-29 09:54:33 +01:00
Ilmari Lauhakangas 7d202623b0 Fix typos and grammar
Change-Id: I4143da3c5a809118d57849664f6ab1d2e775837f
Reviewed-on: https://gerrit.libreoffice.org/46253
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-11 22:51:01 +01:00
Noel Grandin 3af500580b loplugin:salcall fix functions
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.

Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11 12:13:46 +01:00
Julien Nabet 2ec698b433 cppcheck: fix some reports
variableScope reports in comphelper/drawinglayer/editeng
+filter/framework/l10ntools

Change-Id: I4575428773e8b9b3efedabb44fdcd6d8175ac46a
Reviewed-on: https://gerrit.libreoffice.org/46116
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-08 23:14:49 +01:00
Noel Grandin 9a06b99d2f loplugin:salcall fix non-virtual methods
first, since those are safer to change than virtual methods

Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe
Reviewed-on: https://gerrit.libreoffice.org/45798
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05 07:32:46 +01:00
Michael Stahl fa9c083c60 tdf#114025 framework: avoid deadlock between Desktop init ...
... and SolarMutex: the problem is that rtl::StaticWithArg will
first lock the implicit mutex of the C++11 static variable, and
then the SolarMutex.

So if one thread creates the Desktop singleton with SolarMutex
locked and another thread without SolarMutex locked, this can
deadlock.

If we use rtl_Instance directly with SolarMutex, then there is
still a static variable, but the SolarMutex will always be locked
first, preventing this deadlock.

Change-Id: Ibd37fdfa96a4a2b57f661be3814dd597eb52d338
Reviewed-on: https://gerrit.libreoffice.org/45508
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-11-30 09:41:42 +01:00
Noel Grandin 4f4486c61d look for =() in loplugin:unnecessaryparen
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0
Reviewed-on: https://gerrit.libreoffice.org/44944
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-20 12:31:32 +01:00
Andrea Gelmini 2a2d4a5703 Fix typos
Change-Id: I677512213d97d01832bebe162fbf7de2998bf4d0
Reviewed-on: https://gerrit.libreoffice.org/44664
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-13 21:36:23 +01:00
Andrea Gelmini d71bcc4dc5 Fix typos
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91
Reviewed-on: https://gerrit.libreoffice.org/44654
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-13 08:43:17 +01:00
Caolán McNamara 9cb2962197 rename AvoidConfig to Fuzzing
cause that's what its really used for and a couple of cases
are not specifically about avoiding config but avoiding uninteresting
disk acccess and what not

Change-Id: I4c6454f98388579fcd0bf9798321d30408ab65ee
Reviewed-on: https://gerrit.libreoffice.org/44491
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-09 00:16:43 +01:00
Stephan Bergmann a457c7c6b0 loplugin:includeform: framework
Change-Id: Ib5eaab06ff0cc1b44db9e4057ab349a0990af14d
2017-10-23 22:46:07 +02:00
Noel Grandin 87a9979c89 overload std::hash for OUString and OString
no need to explicitly specify it anymore

Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec
Reviewed-on: https://gerrit.libreoffice.org/43567
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23 08:15:35 +02:00
Noel Grandin 2c05d758b2 add << operator for css::uno::Exception
Change-Id: Ia23dafd07133779144965682df3b7125a3214235
Reviewed-on: https://gerrit.libreoffice.org/43046
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-10-04 15:18:00 +02:00
Pranav Kant 9127d1a89c framework, lok: It's okay to have valid non-existent user inst. path
Change-Id: I3b9f00adb76fc702e1847d9fab866b7796cfd942
Reviewed-on: https://gerrit.libreoffice.org/43061
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-10-03 09:39:59 +02:00
Noel Grandin d3971ec256 new loplugin:blockblock
Change-Id: I7b68b70fa4c7234e8882f7627026959a596968fd
Reviewed-on: https://gerrit.libreoffice.org/43025
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-03 08:41:11 +02:00
Noel Grandin 20bae560c0 throw more useful uno::Exception's
if we're going to throw the base class of the exception hierarchy,
we can at least put a useful message in there to make the source a little
bit easier to locate.

Change-Id: I2f3106c99ba25125eacef8fa77e2f3a2c89f2566
Reviewed-on: https://gerrit.libreoffice.org/42968
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-01 18:17:11 +02:00
Noel Grandin 1ffba0e356 loplugin:flatten check for throw in then clause
also make the plugin ignore the case where we have var decl's in the
clause we want to flatten, which could lead to problematic extension of
variable lifetime

Change-Id: I3061f7104e8c6a460bf74f5eac325a516ec50c59
Reviewed-on: https://gerrit.libreoffice.org/42889
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-29 08:51:48 +02:00
Jan-Marek Glogowski d21212cade tdf#112646 Flush the clipboard holding SolarMutex
It seems Desktop::terminate can be called with or without the
SolarMutex. So make sure we actually hold the mutex to release it
correctly when flushing the clipboard on termination.

Change-Id: Ie42daf5dba0f4208318a8c1fe463cd3a80dd9141
Reviewed-on: https://gerrit.libreoffice.org/42802
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2017-09-27 06:53:32 +02:00
Andrea Gelmini e44c188a73 Fix typos
Change-Id: I879a52820d78d9151ef64dd21612379f617f66e2
Reviewed-on: https://gerrit.libreoffice.org/42726
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-25 12:20:56 +02:00
Noel Grandin 4af6c0948b loplugin:flatten in filter..i18npool
Change-Id: I9024b8b614a4de83a4d927e1918f6d4904a7fccb
Reviewed-on: https://gerrit.libreoffice.org/42592
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-22 08:29:29 +02:00
Noel Grandin f320d1edeb unused m_xLastFrame in Desktop
sinice

    commit abf3022d63
    Date:   Wed Jul 31 10:03:28 2002 +0000
    #101886# roll it back temp.

Change-Id: If1058c0130d1a2c68bc041a3f7433df87effc0e4
2017-09-19 09:31:43 +02:00
Noel Grandin 5685ee25aa improve redundantcast loplugin
to find c-style casts where the expression is a templated method

Change-Id: Ifbd1e2cdc72d906fc95a7ec0f9408c3f6d2a836b
Reviewed-on: https://gerrit.libreoffice.org/42275
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-14 14:43:43 +02:00
Noel Grandin 9c5c905680 clang-tidy modernize-use-emplace in editeng..framework
Change-Id: I7739c4f77c856d34f8484754244df13d8fef840e
Reviewed-on: https://gerrit.libreoffice.org/42151
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-11 09:42:55 +02:00
Ivan Safonov ba7492ebe6 tdf#46037: Replace ConfigurationHelper with new configuration API
Remove all occurences of ConfigurationHelper
in /framework/source/services/autorecovery.cxx.

com.sun.star.configuration.ConfigurationAccess used only
to receive configuration updates.

In the second version of the patch corrected the indentation
and fdo replaced with tdf in the patch title.

comphelper::ConfigurationChanges::create returns shared_ptr,
using unique_ptr can result in bugs.

Also rebase this patch.

Change-Id: I27d34dd4d4b59e2e9cc701d4726bcd7f5fb45b3c
Reviewed-on: https://gerrit.libreoffice.org/41477
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-11 09:30:33 +02:00
Noel Grandin fae405c522 use more ErrCode.IsWarning()
Change-Id: I92a84cbe3d9a9e794d3e875c60d8db7cb40ae5bd
Reviewed-on: https://gerrit.libreoffice.org/41827
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-02 13:04:49 +02:00
Julien Nabet fc19c71850 Replace list by vector in substitutepathvars (framework)
Change-Id: I40cfc4925f14ebdc6f7b01274d2d60149008b426
Reviewed-on: https://gerrit.libreoffice.org/41800
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-01 21:40:54 +02:00
Tor Lillqvist 27bde9a6ab Drop gratuitous initial :: from comphelper::ProfileZone
Change-Id: Iae7d86b857d0563d9ed9d9b4187e009554698412
2017-08-25 16:09:53 +03:00
Noel Grandin dcc667ac5e convert message box style bits to scoped enum
and fix harmless bug in ImpSVGDialog::ImpSVGDialog, which there since

    commit 6456f1d810
    Date:   Fri Feb 4 14:52:54 2011 +0100
    ka102: added/removed files for SVG import and module cleanup

Change-Id: I66b2ec2b029431ab453e54e962863e4ed7d78962
Reviewed-on: https://gerrit.libreoffice.org/41412
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-23 08:47:52 +02:00
Noel Grandin 4105174973 convert extended WinBits to scoped enum
Change-Id: If35f4fcda2415c858ba8f963e9f471c87169bc99
Reviewed-on: https://gerrit.libreoffice.org/41301
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-19 06:53:09 +02:00
Andrea Gelmini 713c80b460 Fix typos
Change-Id: If13c1408a3e597c6f9b21d209722ef6bc87c0c94
Reviewed-on: https://gerrit.libreoffice.org/41270
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-08-18 07:40:04 +02:00
Noel Grandin db17a874af convert std::map::insert to std::map::emplace II
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331
Reviewed-on: https://gerrit.libreoffice.org/41019
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11 13:51:29 +02:00
Noel Grandin d347c24036 convert std::map::insert to std::map::emplace
which is considerably less verbose

Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b
Reviewed-on: https://gerrit.libreoffice.org/40978
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11 12:38:32 +02:00
Noel Grandin c9253818ec loplugin:oncevar
extend oncevar to any POD type

Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0
Reviewed-on: https://gerrit.libreoffice.org/40564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31 08:25:07 +02:00
Caolán McNamara 00657aef09 migrate to boost::gettext
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl
* all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string")
* ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching
  MODULE .mo files
* UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui
  goes from l10n target to normal one, so the res/lang.zips of UI files go away
* translation via Translation::get(hrc-define-key, imbued-std::locale)
* python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there
  to keep finding the .hrc file uniform) so magic numbers can go away there
* java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation
  mechanism
* en-US res files go away, their strings are now the .hrc keys in the source code
* remaining .res files are replaced by .mo files
* in .res/.ui-lang-zip files, the old scheme missing translations of strings
  results in inserting the english original so something can be found, now the
  standard fallback of using the english original from the source key is used, so
  partial translations shrink dramatically in size
* extract .hrc strings with hrcex which backs onto
   xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap
* extract .ui strings with uiex which backs onto
   xgettext --add-comments --no-wrap
* qtz for gettext translations is generated at runtime as ascii-ified crc32 of
   content + "|" + msgid
* [API CHANGE] remove deprecated binary .res resouce loader related uno apis
      com::sun::star::resource::OfficeResourceLoader
      com::sun::star::resource::XResourceBundleLoader
      com::sun::star::resource::XResourceBundle
    when translating strings via uno apis
      com.sun.star.resource.StringResourceWithLocation
    can continue to be used

Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-21 08:20:50 +01:00
Noel Grandin 039d9b97b7 loplugin:constparams in framework
Change-Id: Iecd19a0cbb3cc78158c17bfa064cc23bafc44b18
Reviewed-on: https://gerrit.libreoffice.org/40206
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20 09:19:54 +02:00