280 Commits

Author SHA1 Message Date
Noel Grandin
f4a9ba4b48 convert ConfigNameFormat to scoped enum
and drop unused constants
    CONFIG_NAME_PLAINTEXT_NAME
    CONFIG_NAME_FULL_PATH

Change-Id: Ibf7e88da0ae54516cb863b8efa995201f2a95268
2017-02-10 08:08:45 +02:00
Noel Grandin
cc96c1fdc1 convert EItem to scoped enum
and drop read-only enumerators:
    enum EItem E_APEARCFG
    enum EItem E_FLTRCFG
    enum EItem E_FONTSUBSTCONFIG
    enum EItem E_LANGUAGEOPTIONS
    enum EItem E_SEARCHOPT

Change-Id: Ie3baaecec3d1c30404b4fb0d948e25d4bb2f3f93
2017-02-10 08:08:45 +02:00
Noel Grandin
aef704d807 convert SvtSaveOptions::EOption to scoped enum
and remove unused
E_SAVEUNPACKED, E_USESHA1INODF12, E_USEBLOWFISHINODF12
enumerators

Change-Id: I7c384e0c30af5091a22beeda1c77e4b71fdde55e
2017-02-10 08:08:45 +02:00
Noel Grandin
a4d0ec84da convert SvtSecurityOptions::EOption to scoped enum
and drop unused E_MACRO_DISABLE enumerator

Change-Id: I0bd706d4d4e1d8b9004e68c9e77c11410c62a64a
Reviewed-on: https://gerrit.libreoffice.org/34067
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-10 06:05:54 +00:00
Noel Grandin
29eb1ceeae convert SvtSysLocaleOptions::EOption to scoped enum
and drop unused E_UILOCALE enumerator

Change-Id: Ic9bdac91fab15af45e7dbd613e6e44b73b5cf9de
Reviewed-on: https://gerrit.libreoffice.org/34066
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-10 06:05:32 +00:00
Noel Grandin
7cf66202f2 convert SearchParam::SearchType to scoped enum
and drop unused SRCH_LEVDIST enumerator

Change-Id: Ic5118757060656562e04dd7da24a3f143abec3fb
Reviewed-on: https://gerrit.libreoffice.org/34065
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-10 06:05:09 +00:00
Vitaliy Anderson
91ccb4dbf7 Compatibility options refactoring. Part 1
It relate to reduce the nubmer of copy-paste the same code
and simplify adding compability options.
Also using enum class instead enum can eliminate to occurrence
an error relate to access to out of range an array.

Change-Id: I07b862aac5f88da4a98e2273cb14daa09e70eacb
Reviewed-on: https://gerrit.libreoffice.org/33543
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-27 07:35:47 +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
a49cbc5893 loplugin: unnecessary destructor test..unotools
Change-Id: I1fd8a3f39b875d1920759f42e37f4c9d6785d62e
Reviewed-on: https://gerrit.libreoffice.org/33573
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26 10:07:23 +00:00
Stephan Bergmann
53d6df4f54 New loplugin:dynexcspec: Add @throws documentation, unotools
Change-Id: Ie1adfe09bf5b63adecc0a5a67a042e6e678b58dd
2017-01-19 18:03:10 +01:00
Noel Grandin
968f6a7f02 new loplugin: useuniqueptr: unotools..xmlscript
Change-Id: I6966d44cff644112dd837adfe7d9c4f459457271
Reviewed-on: https://gerrit.libreoffice.org/33298
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-19 11:28:41 +00:00
Vitaliy Anderson
fb49433383 tdf#104349, tdf#104668 MS Word compatibility trailing blanks option part 2
Create the option in Tools->Options->LibreOffice Writer->Compatibility

Change-Id: I7c766138db9210d3e7a97eea48b9265ee9762199
Reviewed-on: https://gerrit.libreoffice.org/33148
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-01-18 08:47:22 +00:00
Jochen Nitschke
a238c829b2 tdf#88206 replace cppu::WeakImplHelper* in unotools
[needs 288386f6986622461f28276ff7ff3e7172143159 "Another 'Do not export whole
class to avoid MS C++ implicitly exporting...'" to build with MSVC]

Change-Id: I8de7c4a1947ce91f9a629536e481c012e7c5c7ec
Reviewed-on: https://gerrit.libreoffice.org/31679
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-12-08 10:30:36 +00:00
Stephan Bergmann
4788d20ec4 Non-inline virtual dtors of exported classes
Change-Id: I7b3597d48bf7b0196b98c869329d2fb1a46fa8f2
2016-12-08 08:55:33 +01:00
Mike Kaganski
1d74d19a76 Monkey business: Fix typo in comments: et -> ed :)
Change-Id: I91440e8582108b9121ac6525c8ac88ad6f218a60
Reviewed-on: https://gerrit.libreoffice.org/31721
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-12-07 11:28:59 +00:00
Eike Rathke
b913ce4c32 remove now unused SvtSysLocaleOptions::GetLocaleConfigString()
Which just lead to confusion as could be seen in two earlier commits..

Change-Id: I172127cf08bcd45c3c53e0cf00cf11a41e0dd3a6
2016-12-02 20:36:24 +01:00
Khaled Hosny
5d7a1ddf36 Simplify FontManager a bit
There does not seem to be any need for that atom thing as we are
perfectly happy using plain OUStrings in the same struct, not to mention
that font names are supposed to be unique so I don’t see what we are
saving here.

As this was the only use for unotools/atom, it goes with it.

Change-Id: If9d58d84fff0403f9b2c41fe594b99028b30c2f4
Reviewed-on: https://gerrit.libreoffice.org/31520
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2016-12-02 17:11:43 +00:00
Noel Grandin
04a84913ea use o3tl::typed_flags in ConfigurationListener::ConfigurationChanged
Change-Id: I0ad7c02953aa53168dc242f1f374ab871728c84e
2016-11-24 11:27:51 +02:00
Noel Grandin
bb674aa550 loplugin:unusedfields
Change-Id: Id2dbbf384637223db3d334d95332251832918003
Reviewed-on: https://gerrit.libreoffice.org/30927
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-17 13:10:42 +00:00
Noel Grandin
3c73942c8c loplugin:countusersofdefaultparams in include/svx..unotools
Change-Id: I02e933da66241e99e3b81d90d679f1502bab3fef
Reviewed-on: https://gerrit.libreoffice.org/30866
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-16 06:32:00 +00:00
Julien Nabet
73679ee0a3 Copycat SvtSysLocale_Impl for SvtSysLocaleOptions_Impl
and so avoid warn:unotools.config:6728:1:unotools/source/config/configmgr.cxx:167:
ConfigManager not empty when exiting LO

See http://nabble.documentfoundation.org/OSL-ASSERT-items-empty-because-of-Setup-L10N-td4199284.html

Thank you Eike for the hint!

Change-Id: I4b374a075ad8f1ef10a71f3a9424986154613aef
Reviewed-on: https://gerrit.libreoffice.org/30787
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-12 06:38:34 +00:00
Samuel Mehrbrodt
b3a229ad0d Add helper for creating zip files
Change-Id: I8b49b74622bf4d671d640e4cd06dc2da348ee222
Reviewed-on: https://gerrit.libreoffice.org/30478
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-11-03 11:25:16 +00:00
Caolán McNamara
11a1b70da2 coverity#1371313 Missing move assignment operator
Change-Id: I07a9d7fe837c18e66b4a2a57186f1f9b0d44daee
2016-11-03 11:23:35 +00:00
Noel Grandin
c5498c310f loplugin:expandablemethods in UnoControls..vbahelper
Change-Id: I7e607df2a1f6d4eb207ee0d3eb30f41fac44a0c6
Reviewed-on: https://gerrit.libreoffice.org/30262
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-25 11:16:02 +00:00
Noel Grandin
ece0ff48fa loplugin:expandablemethodds in include/tools..unotools
Change-Id: I5607d4a2a81de1a3ae329acd1e90280a21522f06
Reviewed-on: https://gerrit.libreoffice.org/30097
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-21 06:17:24 +00:00
Giuseppe Castagno
26c99e42db tdf#103274: Add helper for a default XCommandEnvironment reference.
This helper should be used where the empty XCommandEnvironment
e.g. something like:

css::uno::Reference< css::ucb::XCommandEnvironment >()

is currently used.

See comment in the committed code (include/unotools/ucbhelper.hxx)
for details.

A case use is presented in this commit, please see:
sfx2/source/doc/docfile.cxx for details.

Change-Id: Ieb97c0ed61f31ef8df532c8be0e7ff1035327915
Reviewed-on: https://gerrit.libreoffice.org/29927
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-17 10:45:04 +00:00
Stephan Bergmann
f8bf15e8ed clang-cl loplugin: unotools
Change-Id: I1bbdae6b27a04321b232851f5f45ac2248b55835
Reviewed-on: https://gerrit.libreoffice.org/29843
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-15 07:59:41 +00:00
Noel Grandin
5c84f40ea2 loplugin:constantfunction
update the plugin similarly to
    commit 3ee3b36ae0c064fb5c81268d8d63444309d1b970
    Author: Stephan Bergmann <sbergman@redhat.com>
    Date:   Fri Oct 7 12:05:49 2016 +0200
    loplugin:staticmethods: Don't be fooled by decls starting with macros

Change-Id: I98ac3216d5acf89a49a26feb089ae2fd34e6e510
Reviewed-on: https://gerrit.libreoffice.org/29665
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-11 06:15:21 +00:00
Stephan Bergmann
b9589f237b loplugin:staticmethods: unotools
Change-Id: I99debf2434c72cf4f5d0859dfd7a40ae331c65ab
2016-10-07 12:07:43 +02:00
Andrea Gelmini
6445d8d7d6 Fix typos
Change-Id: Icfc61fcc5ace717bca4bea988243674afe31e6f8
Reviewed-on: https://gerrit.libreoffice.org/29435
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-01 19:08:07 +00:00
Jan-Marek Glogowski
3c4dfb872d tdf#94987 Create directories for temp filenames
Per default a temporary file is construted from a path and a leading
pattern for the filename. For mail merge the filename can be read
from a database column. If the path is not existing, a temporary
directory is created.

Normally the temp file function would fail, if the filename contains
a slash and the sub-directory of the filename doesn't exists as a
subdirectory of path.

To implement tdf#94987, this adds an option to the temp file class
to create the parent directories of the filename pattern.

Change-Id: I02bf34294dac85598ee153d8cfcf00bc5d7775af
2016-09-23 23:25:49 +02:00
Maarten Bosmans
9df9949cc4 Remove NumberFormatCodeWrapper
This class only adds a level of indirection, without any useful functionality.

Change-Id: I806e1b9241caf025c62c12c93aad3101daac874a
Reviewed-on: https://gerrit.libreoffice.org/29134
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22 07:12:49 +00:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02:00
Eike Rathke
c22f9f0e00 introduce LocaleDataWrapper::doesSecondaryCalendarUseEC()
Preparing to replace the number format import hack of
95c91f098e8974c41c8d403a351fe53db6822165 and generalizing for known locales.

Change-Id: I0413987e302eaa84ef6a7dde2ecb365144313e81
2016-09-13 12:54:41 +02:00
Eike Rathke
1e0b7b7e4b cosmetics
Change-Id: I32c1df5a8e7164c59ebfe0d1e1d11dd6f3b8edf8
2016-09-13 12:54:40 +02:00
Noel Grandin
c158c00489 loplugin:constantparam in framework..vbahelper
Change-Id: I592f73012ae8a4df8488ef04dc0956d9400625bc
2016-09-07 10:04:44 +02:00
Noel Grandin
1b86c57b08 loplugin:countusersofdefaultparams
Change-Id: Icfc2fdde493619fefaf6119d366f8f7166b3ff36
Reviewed-on: https://gerrit.libreoffice.org/28547
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-09-01 06:34:22 +00:00
Mike Kaganski
20f6a6b159 tdf#99402: fix Metafile Font handling
1. For DEFAULT_CHARSET/OEM_CHARSET, use correct encoding
based on LibreOffice Default Language for Documents setting
(Tools->Options...->Language Settings->Languages).
For that, two functions added to tencinfo.h, that map language
names to corresponding Windows ANSI/OEM encodings.
2. If charset is DEFAULT_CHARSET/OEM_CHARSET for Symbol font,
then always use RTL_TEXTENCODING_SYMBOL.

Unit test is included.

Change-Id: Ibff63e7a03dec42a9d2a74399936d6bc04f2ff1a
Reviewed-on: https://gerrit.libreoffice.org/28322
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-08-30 05:40:43 +00:00
Stephan Bergmann
38ff65644f Remove unnecessary UcbStreamHelper::CreateStream overload
...with an explicit XInteractionHandler, but which was only ever called with a
null XInteractionHandler, so could just as well call the overload that doesn't
specify one (but internally uses a special SimpleFilaAccessInteraction handler
since f60eaab748add19683e66c7e4bc073c9ce7887f7 "Related: tdf#99312, add
specialized interaction handler", which is probably also what is wanted for
these two calls to UcbStreamHelper::CreateStream in cui and sd).

Change-Id: I2bf7bebd32f1c06b7414a4646631a19b689ee52f
2016-08-16 14:59:30 +02:00
Noel Grandin
d64395704e loplugin:unusedenumconstants in unotools..xmlhelp
Change-Id: Id7ddc0fc1f57c5e8e7fb002e31d54fb8e9f8ffab
Reviewed-on: https://gerrit.libreoffice.org/28050
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-15 05:51:53 +00:00
Noel Grandin
508c95f1b6 improve passstuffbyref return analysis
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c
Reviewed-on: https://gerrit.libreoffice.org/27317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27 06:48:25 +00:00
Noel Grandin
938821fb08 new loplugin overrideparam
verify that parameters on override methods have the same set of default
values for their params as their parent/super-methods do.

Change-Id: Ibdbc1c6e417fbaa680ea025a6bbf5ba9c2e5bcd2
Reviewed-on: https://gerrit.libreoffice.org/27437
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-25 06:09:17 +00:00
Noel Grandin
6e72f0251b new loplugin unnecessary override
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb
Reviewed-on: https://gerrit.libreoffice.org/27135
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-15 14:05:41 +00:00
Caolán McNamara
a97d67cd0b ditch the application per-language IsAutoMnemonicEnabled setting
Change-Id: I9734ada09edb6544a332893a7c5d31730b0d081d
2016-07-10 19:12:39 +01:00
Caolán McNamara
4bc99ab1ac ditch the multiply dialog width * X where X is based on language thing
Which should be unnecessary since the vcl layout work and optimal size widgets,
and its a small and arbitary set of languages for which its set.

Change-Id: Ifa397218510ade251f795cdd9360d6bdccb115b7
2016-07-10 19:12:39 +01:00
Stephan Bergmann
5f1e7fe6f0 loplugin:passstuffbyref also for {css::uno,rtl}::Reference
Change-Id: I08992bb66d5459333e018bb52dceee3e808fac8b
2016-07-07 18:59:55 +02:00
Xisco Fauli
c13f60e7cd tdf#89329: use shared_ptr for pImpl in moduleoptions
Change-Id: I2dfcdde6ef1782edc22ca6d70d353549706eb14f
Reviewed-on: https://gerrit.libreoffice.org/26322
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-18 09:24:56 +00:00
Xisco Fauli
a1f836e40d tdf#89329: use shared_ptr for pImpl in dynamicmenuoptions
Change-Id: I66bdeeee7f70e6ca16a39e8804aaf8a5f0d08205
Reviewed-on: https://gerrit.libreoffice.org/26327
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-17 06:47:14 +00:00
Xisco Fauli
94d2b31d98 tdf#89329: use shared_ptr for pImpl in pathoptions
Change-Id: Id932a0886f0a8a3cb05a3d0474e29a2e0b84ad4e
Reviewed-on: https://gerrit.libreoffice.org/25630
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-16 06:49:59 +00:00
Xisco Fauli
a25d1a1111 tdf#89329: use shared_ptr for pImpl in historyoptions
Change-Id: I0020b7e66fe8e09db9a96127a77c3792afab63a8
Reviewed-on: https://gerrit.libreoffice.org/26324
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-16 06:47:09 +00:00