Commit Graph
3195 Commits
Author SHA1 Message Date
Julien Nabet 573f87f6ea Use for-range loops in comphelper and configmgr
Change-Id: I91033395cb30a4ba9e65adb89712b3c70a39a508
Reviewed-on: https://gerrit.libreoffice.org/50396
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-27 09:12:59 +01:00
Stephan Bergmann a26adf6679 Better return nil than an arbitrary xml:lang="..." value
...for a localized property that doesn't have a suitable value, but is nillable.

E.g., /org.openoffice.Office.Writer/Insert/Caption/CaptionOrderNumberingFirst
(once fixed to indeed be a localized property as apparently intended, with a
follow-up commit to this) only has an explicit value (true) for xml:lang="hu",
but shouldn't return that for any other locale (where the implicit default for a
nil value should instead be false, cf. the else branch at the end of
SwInsertConfig::Load, sw/source/uibase/config/modcfg.cxx).

Change-Id: I7b991c1bc4df22bf2359175b0734e85e0844ce99
Reviewed-on: https://gerrit.libreoffice.org/49409
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-08 15:45:33 +01:00
Mike Kaganski 8f43170f12 configmgr: MSVC: pragma warning: make more specific, remove obsolete
Change-Id: I7f98fa855ff521db42bf9b379bfac3d430791ae0
Reviewed-on: https://gerrit.libreoffice.org/48968
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-01 06:46:02 +01:00
Noel Grandin 2a1fb4401d loplugin:passstuffbyref improved returns
improve the detection of stuff we can return by const &, instead of by
copying

Change-Id: I479ae89d0413125a8295cc3cddbc0017ed61ed69
Reviewed-on: https://gerrit.libreoffice.org/46915
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-23 08:04:54 +01:00
Noel Grandin a5be07d6b6 inline use-once typedefs
Change-Id: I5c3ffc03c26b3428f1f336e6ecba7838a1cf1157
Reviewed-on: https://gerrit.libreoffice.org/46764
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-19 11:57:57 +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 3ae605f8b9 Replace lists by vectors in configmgr/unotools
+ use for range loops

Change-Id: I4cebcf0536dc6c3ddfdce9532e94c0c380ea3ab9
Reviewed-on: https://gerrit.libreoffice.org/44308
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-05 15:25:45 +01:00
Mike Kaganski 05d15643c4 Winreg configuration layer: don't assert on user input
Change-Id: I1314e37315450ead3bf131ed3fabd9351a88a4e5
Reviewed-on: https://gerrit.libreoffice.org/44191
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-11-02 14:32:24 +01:00
Mike Kaganski 5a5953b90c Winreg configuration layer: use writeAttributeValue for oox:external
Change-Id: Ib15250c738f98b26adf9745d453a8d22189b271e
Reviewed-on: https://gerrit.libreoffice.org/44153
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-11-01 10:57:10 +01:00
Mike Kaganski ce8536ad3c Winreg configuration layer: support oox:external values
Change-Id: Ie03cd4e351de62bf298009e220ed25338dc42f62
Reviewed-on: https://gerrit.libreoffice.org/44148
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-11-01 08:17:47 +01:00
Andras Timar e90329ff38 typo: xs::boolean -> xs:boolean
Change-Id: I4a7df6bf56a5b8367d3717fc4e48b535e829e96f
2017-10-31 23:40:06 +01:00
Noel Grandin 9ee60319c6 loplugin:constmethod in idl,helpcompiler
Change-Id: I9b328fc0a3ebdd15a646ee6dab800ffbadb1aaef
Reviewed-on: https://gerrit.libreoffice.org/44050
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-30 13:06:54 +01:00
Stephan Bergmann 012d4dc0e9 loplugin:includeform: configmgr
Change-Id: Ie3b0b80409a7897db6700c80d6ff41dbb4845652
2017-10-23 22:46:11 +02:00
Julien Nabet a5a905e7ff Replace list by vector in components (configmgr)
Change-Id: I772b9b1b1d8fdbbc1dc7e38904490a6533686a90
Reviewed-on: https://gerrit.libreoffice.org/43353
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-13 07:05:11 +02:00
Mike Kaganski 1944e3ddc0 Rename and move SAL_U/W to o3tl::toU/W
Previosly (since commit 9ac98e6e34)
it was expected to gradually remove SAL_U/W usage in Windows code
by replacing with reinterpret_cast or changing to some bettertypes.
But as it's useful to make use of fact that LibreOffice and Windows
use compatible representation of strings, this commit puts these
functions to a better-suited o3tl, and recommends that the functions
be consistently used throughout Windows-specific code to reflect the
compatibility and keep the casts safe.

Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6
Reviewed-on: https://gerrit.libreoffice.org/43150
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-05 16:02:52 +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
Mike Kaganski c3609f107b Use SAL_W/SAL_U instead of reinterpret_cast btwn wchar_t* and sal_Unicode*
This is type-safe, and allows to catch cases where a source type
is changed for some reason, but reinterpret_cast masks that

Change-Id: Ib64b6fa2e22d94a6bba890f0ccc3e20325c6f0a1
Reviewed-on: https://gerrit.libreoffice.org/42961
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-30 19:08:28 +02:00
Mike Kaganski cf48347e7a Fresh run of bin/update_pch.sh
Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06
Reviewed-on: https://gerrit.libreoffice.org/42565
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22 21:01:49 +02:00
Noel Grandin ac80f048f2 loplugin:flatten in basctl..configmgr
Change-Id: I674cad57ce30a885e126d3bcc921f8fcb53dc36d
Reviewed-on: https://gerrit.libreoffice.org/42577
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-21 15:18:57 +02:00
Jochen Nitschke 7315f325ff use more default copy ctors
if ctor should be private or protected explicitly default them.
boost::optional has copy ctors, so use them.

Change-Id: If1855626b297e739afef0dc5ad57958f7ad199bc
Reviewed-on: https://gerrit.libreoffice.org/42363
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-17 07:43:01 +02:00
Stephan Bergmann 3f0fba004b New rtl::isUnicodeScalarValue, rtl::isSurrogate
There are apparently various places that want to check for a Unicode scalar
value rather than for a Unicode code point.  Changed those uses of
rtl::isUnicodeCodePoint where that was obvious.  (For changing
svtools/source/svrtf/svparser.cxx see 8e0fb74dc0
"Revert 'svtools: HTML import: don't put lone surrogates in OUString'".)  Other
uses of rtl::isUnicodeCodePoint might also want to use rtl::isUnicodeScalarValue
instead.

As a side effect, this change also introduces rtl::isSurrogate, which is useful
in a few places as well.

Change-Id: I9245f4f98b83877145a4d392f0ddb7c5d824a535
2017-09-13 13:35:49 +02:00
Noel Grandin 4c09f8e087 clang-tidy modernize-use-emplace in c*
Change-Id: I419d1f67ba301050d05981db2a3d6178878684a9
Reviewed-on: https://gerrit.libreoffice.org/42110
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-11 08:40:57 +02:00
Stephan Bergmann 975d65eca3 loplugin:constparams
Change-Id: I8bc9fd2a3ad727f1a0f4b98254efdae085a2b8cd
2017-08-30 14:15:53 +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
Caolán McNamara e7c0bd4df0 error: ‘class configmgr::NodeMap’ has no member named ‘emplace’
Change-Id: I434739024afa97d05b5cf6e959973d845fdb2dfe
2017-08-11 12:37:19 +01: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 f71a355000 loplugin:constparams in configmgr,unotools
Change-Id: Ief3df5487eb20b1f6d0e8aed89cfef4464d23a88
Reviewed-on: https://gerrit.libreoffice.org/40048
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-17 13:33:48 +02:00
Noel Grandin ab9b38a406 use more begin()/end() for Sequence
Change-Id: I399be6b6ef7a6ce01e883569a177c0969bc29c69
2017-07-06 08:35:23 +02:00
Jochen Nitschke a5dba7dbec remove unused osl/mutex.hxx includes
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb
Reviewed-on: https://gerrit.libreoffice.org/38905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-18 13:38:25 +02:00
Noel Grandin ec8c98f598 use more SAL_N_ELEMENTS part 3
Change-Id: I82e366fefd2e31928b99840fe76649cc3521e623
Reviewed-on: https://gerrit.libreoffice.org/38789
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-15 08:24:33 +02:00
Stephan Bergmann 74cf1240f0 loplugin:salunicodeliteral: configmgr
Change-Id: I3c37025be286f9fd1892c259e2ac1e2fce7123a1
2017-04-28 18:27:00 +02:00
Stephan Bergmann e598c5f7d0 loplugin:cppunitassertequals: configmgr
Change-Id: I02d54c1eee815e7c6575a8131d59974089299bdf
2017-04-28 14:21:47 +02:00
Noel Grandin 3a36cf434f loplugin:checkunusedparams in configmgr and vcl
Change-Id: I7226d01f38e6edaf3868d7267d9b02dbdbc9e5ba
Reviewed-on: https://gerrit.libreoffice.org/36975
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28 08:32:56 +02:00
David Ostrovsky de030cd7a2 gbuild: Remove MSVC 2013 legacy code
Uwinapi is discontinued.

Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01
Reviewed-on: https://gerrit.libreoffice.org/23198
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
Tested-by: David Ostrovsky <david@ostrovsky.org>
2017-04-21 18:18:44 +02:00
Stephan Bergmann 248966215d Clean up uses of SAL_U/SAL_W: configmgr
Change-Id: I2c3f16b4798246175ff8f3cc22b61f2d5a9967b6
2017-04-10 10:14:32 +02:00
Stephan Bergmann 50057a37a8 Introduce o3tl::string_view.hxx approximation of C++17 <string_view>
...and use it in configmgr/source/writemodfile.hxx

Change-Id: Ie683dc21010ed45cc454ff89bea0376994b351f2
Reviewed-on: https://gerrit.libreoffice.org/36270
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-07 20:12:31 +00:00
Stephan Bergmann 9ac98e6e34 Finally switch MSVC to sal_Unicode = char16_t, too
There is lots of (Windows-only) code that relied on sal_Unicode being the same
as wchar_t, and the best change may be different in each case (and doing the
changes may be somewhat error prone).  So for now add SAL_U/SAL_W scaffolding
functions to sal/types.h, remove their uses one by one again, and finally drop
those functions again.

Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea
Reviewed-on: https://gerrit.libreoffice.org/36077
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04 16:12:11 +00:00
Noel Grandin c88d5f0268 data.xcd dead after tdf#46723 - enable configmgr unit tests
Change-Id: I04fc155f344e15d5bff17cdc42815e7afb14bd38
Reviewed-on: https://gerrit.libreoffice.org/35891
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-30 08:38:14 +00:00
Andrea Gelmini c4e7c260c4 Fix configmgr argument
Commit 3e64874e7c introduce a not-existent argument.
Dunno if it's an issue.
Just made this commit to show it to real developers!

Change-Id: I01f4b859631e76e0d76269db19bcbcf3481d827c
Reviewed-on: https://gerrit.libreoffice.org/35531
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-24 23:39:14 +00:00
Jochen Nitschke c68ac77770 cleanup double includes and declarations
Change-Id: I770e09f48b1a3e8299f59a8e475ba3c18d436d7b
Reviewed-on: https://gerrit.libreoffice.org/35312
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-03-17 11:01:26 +00:00
Tamás Zolnai 145accd9a5 tdf#106283: Registry settings are not read properly on Windows
Read also a type value from registry so user can specify
a type for a property of an extensible group.

Change-Id: I4105ba559a64ce96bfe5a390660ad7f349ba894c
Reviewed-on: https://gerrit.libreoffice.org/34961
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-08 07:56:41 +00:00
Stephan Bergmann 979e4b822c Revert "tdf#106283: Registry settings are not read properly on Windows"
This reverts commit 8cfda72061.  The problem in
that issue is that the configmgr/source/winreg.cxx code generates .xcu data
where such an extension prop doesn't have an oor:type attribute, which is not
allowed.  On the other hand, it is important that the PropertyNode representing
such an extension prop has a staticType_ of TYPE_ANY, so that later layers or
programmatic calls can store values of different type.
2017-03-06 17:49:30 +01:00
Stephan Bergmann 6cb9e6dad7 Remove redundant 'inline' keyword
...from function definitions occurring within class definitions.  Done with
a rewriting Clang plugin (to be pushed later).

Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8
Reviewed-on: https://gerrit.libreoffice.org/34874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03 20:55:50 +00:00
Tamás Zolnai 8cfda72061 tdf#106283: Registry settings are not read properly on Windows
In general, properties' type is read from scheme files (xcs)
but scheme files can contain property groups without a type
(extensible groups). In this case the xcd files defines the actual
properties and their type.
handleUnknownGroupProp() method is called when a property is
not defined in the scheme file. Here we have the type information
read from xcd file, so use it instead of setting it to any

Change-Id: I4180d154ecf4130ecbb9c808cee6529124842790
Reviewed-on: https://gerrit.libreoffice.org/34859
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-03-03 14:39:19 +00:00
Fakabbir Amin 12fc1d5399 tdf#84323: Make osl::Condition::wait more readable
Improved readability of calls to osl::Condition::wait.

Change-Id: I69fb9815561013f1eb9fd4a649e32902e09473c6
Reviewed-on: https://gerrit.libreoffice.org/34399
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-20 08:57:03 +00:00
Noel Grandin 8fc4aecde3 convert ValueParser::State to scoped enum
Change-Id: I20c8217576fb6993107f1e45429adc5660d38da8
2017-02-17 09:56:19 +02:00
Yousuf Philips 8dc38dd9b1 tdf#105447 Move accelerator to first letters in Help menu
Change-Id: I14088435228a989cb388cb9e205dc7fcd3fbbfa9
Reviewed-on: https://gerrit.libreoffice.org/33646
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Heiko Tietze <tietze.heiko@googlemail.com>
2017-02-09 22:40:37 +00:00
Michael Meeks e5b0627589 configmgr: add SAL_CONFIG_WINREG_RETAIN_TMP variable.
Windows registry dumping behaves very strangely, and in hard to debug
ways - this should help in-the-field debugging of this in future.

Change-Id: Ia35d58a8be36d1b683db39ae7d2128a3ccfd10a5
Reviewed-on: https://gerrit.libreoffice.org/33992
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-02-07 13:38:47 +00:00
Noel Grandin 8a16f665b1 makeAny->Any in canvas..configmgr
Change-Id: Id06812595f373cd0da8b421dbac34a60a266ae6e
Reviewed-on: https://gerrit.libreoffice.org/33869
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03 10:44:01 +00:00
Stephan Bergmann 5595ee701e loplugin:useuniqueptr
Change-Id: I3a246a22baaac8195dc1b94c42994de7d80e8336
2017-02-02 15:17:52 +01:00