Commit Graph
1852 Commits
Author SHA1 Message Date
Stephan Bergmann d7a8fa7adf Remove bogus assert
...that had been added with f0215dcc9e "unotools:
assert if TempFile::GetURL() fails due to missing file UCP".  But when SRCDIR is
a read-only tree, JunitTest_sc_unoapi_2 fails with that assert firing when
TempFile::GetURL is called from SfxMedium::CreateTempFile
(sfx2/source/doc/docfile.cxx), which in turn is prepared to handle an empty
return value from GetURL, and the test succeeds after removing the assert.  So
it looks like that assert was not precise enough to only fire in the scenarios
where it was intended to fire.

Change-Id: I333e9026ee14e9d1140b1b475793a5b15ededd70
Reviewed-on: https://gerrit.libreoffice.org/52085
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-29 18:27:05 +02:00
heiko tietze 84f8e28d09 tdf#116315 - Cycle Case including Sentence case
Sentence case added at position #2 in the sequence

Change-Id: I99b5afb44260b1a40c7ceb906f729e339aaefd13
Reviewed-on: https://gerrit.libreoffice.org/51696
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
2018-03-26 14:58:23 +02:00
Jochen Nitschke b2147abdf6 remove unused ucbstreamhelper includes
and a few vclunohelper includes

Change-Id: I4803605766d155fe5044c2a65c0444631146831c
Reviewed-on: https://gerrit.libreoffice.org/51496
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-19 07:38:49 +01:00
Takeshi Abe bba299d814 tdf#114751 Update the default UI fonts for Japanese locale
- give priority to IPA P Gothic and Noto Sans CJK JP
- for Windows, try Yu Gothic UI first, then Meiryo UI
- look for Hiragino Kaku Gothic ProN/Pro on macOS

Thanks to Jun Nogata and AWASHIRO Ikuya for their suggestions.
This addresses only part of the issue; another incoming change
will take care of the rest.

Change-Id: I1491ba63e1447d3b9086dfcfdf3981bee6282661
Reviewed-on: https://gerrit.libreoffice.org/50515
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2018-03-14 09:37:44 +01:00
Noel Grandin c774ad610e loplugin:constantparam in svtools..unotools
Change-Id: I6e72fbe44dcb65ee5162448e9a72e6437d56b044
Reviewed-on: https://gerrit.libreoffice.org/50948
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-08 18:23:53 +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
Stephan Bergmann 01f3d84963 Blind build fix for Android
Change-Id: Ic1ad524d533d3e27d59dacc3f1233de3e4e3e0dc
2018-03-02 16:38:07 +01:00
jan Iversen 6b8a3ab210 iOS, added same limitations as MACOSX
Change-Id: Ic8490fcea37221f580734e7764e90bb21c9cc28f
2018-03-02 12:57:29 +01:00
Caolán McNamara 1126fcfded fix fuzzer build
Change-Id: I24c7e32b3dc63f3b5043e186f6af0ffa4d310198
2018-03-02 09:10:50 +00:00
Caolán McNamara a32d22ee38 hook up gettext to native dialog
Change-Id: Ie5ca8882c8e4c41a8ee41379edc37c4c07e18033
Reviewed-on: https://gerrit.libreoffice.org/50581
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-01 21:19:11 +01:00
Noel Grandin 945a119675 loplugin:constparams
Change-Id: I7c695073d9a9d3b7a641d6eb9fe01a47d8c3a504
Reviewed-on: https://gerrit.libreoffice.org/48392
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-24 07:56:57 +01:00
Noel Grandin 3b666f6819 remove some sal_Bool remnants
Change-Id: I0a9637aca523a73fbdbbd22f9ad735d6d1ba6898
Reviewed-on: https://gerrit.libreoffice.org/48273
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-22 07:04:29 +01:00
Stephan Bergmann c80e341726 More loplugin:cstylecast: unotools
Change-Id: I04af756527ff42ad83a1b68730230864233c4fac
2018-01-15 09:01:51 +01:00
Stephan Bergmann b7f0446d78 More loplugin:cstylecast: unotools
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: I40a3ff5a436766f8d16f154eff2726b4873a0eb1
2018-01-12 20:12:36 +01:00
Stephan Bergmann 83f69a1213 loplugin:redundantcast: unotools
(after a to-be-committed improved loplugin:cstylecast would have rewritten the
C-style casts into static_casts)

Change-Id: If48db3f54130f3f9a57e4fdc90cd5023a6047cc7
2018-01-11 17:36:02 +01:00
Noel Grandin e57a036939 loplugin:useuniqueptr in tools,stoc,unotools
Change-Id: Ia72b65577143623cedc7a40bc34f7fb897add097
Reviewed-on: https://gerrit.libreoffice.org/47726
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-11 12:47:37 +01:00
Jan Holesovsky a9e294ff5c lokdialog: Few more places that need to take LOK's LanguageTag into account.
Change-Id: Ida41025c70d45f426304fabe702a3bccd6e2385d
Reviewed-on: https://gerrit.libreoffice.org/47474
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-01-08 11:40:42 +01:00
Caolán McNamara cadfee0a72 ofz#4952 avoid liblangtag config when fuzzing enabled
Change-Id: I9f2b0cbb5108f57ec2f80ebe24f748c33ea9cf59
Reviewed-on: https://gerrit.libreoffice.org/47477
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-05 20:21:41 +01:00
Noel Grandin 21e0d8162a loplugin:unusedfields
fix the ReturnStmt check

Change-Id: I95076076bd1313d23798c4615ea12910c86ed9a8
Reviewed-on: https://gerrit.libreoffice.org/47309
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-04 07:17:23 +01:00
Noel Grandin 1b666235f6 loplugin:singlevalfields improve copy constructor check
Change-Id: Id1e7fbecd9e9f816553d2e678c3f1b7890fc4db8
Reviewed-on: https://gerrit.libreoffice.org/47293
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-03 10:38:42 +01:00
Noel Grandin 6028b64e27 loplugin:passstuffbyref even more return improvements
Change-Id: I2a752025cd429e4d271626402dce5d8a8b0c76d2
Reviewed-on: https://gerrit.libreoffice.org/47021
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-24 07:01:47 +01:00
Caolán McNamara 87114b364c ofz#4722 Integer-overflow
Change-Id: I772ff6e6758610e7fa746f5e9b308accdea8159e
Reviewed-on: https://gerrit.libreoffice.org/46997
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-23 17:22:46 +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
Juergen Funk 26be5f21ce unotools: don't go belly-up if temp dir is wrong or empty
When a wrong temp directory was set (e.g. wrong path in xcu ist set),
you get a assert in the LO-Debug Version, this patch avoid this assertion.

Change-Id: I192f682860ad9cddf907e4b239eff36b4bd6072d
Reviewed-on: https://gerrit.libreoffice.org/46846
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-12-22 16:43:04 +01:00
Stephan Bergmann b74da08e55 Read some configuration items directly
...removing them from SvtSaveOptions

Change-Id: I922ec0f88872b1f2d99c6a55faad00143d944473
Reviewed-on: https://gerrit.libreoffice.org/46797
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-19 21:58:02 +01:00
Stephan Bergmann 66cd725b5f Don't leak SvtSaveOptions instance through ItemHolder1::holdConfigItem
...where ItemHolder1 apparently leaks the items ever since

> commit ef2c49c9a5
> Author: Rüdiger Timm <rt@openoffice.org>
> Date:   Fri Nov 11 07:50:10 2005 +0000
>
>     INTEGRATION: CWS perform06 (1.6.60); FILE MERGED
>     2005/11/07 13:32:40 as 1.6.60.2: #i56589# dont cache GlobalEventConfig() inside ItemHolder1^... combination of static pointer and WeakImplHelper cant not work
>     2005/10/25 08:04:02 as 1.6.60.1: #i56589# hold config items alive till office die

That started to cause problems when 78a6ce17f0
"DELETEZ->std::unique_ptr in toolkit,unotools" now stopped to leak the global

  static std::unique_ptr<SvtLoadSaveOptions_Impl> pOptions;

in unotools/source/config/saveopt.cxx when any SvtSaveOptions instances are
leaked, so that at least PythonTest_pyuno_pytests_testcollections started to
fail in ASan builds now when that global pOptions is destroyed at exit.

I don't see a good reason for that ItemHolder1::holdConfigItem stuff here, so
lets try and drop it from SvtSaveOptions at least.

Change-Id: I6d44708fc4e2e5dfafaa9bfe8f3fa2f854ae0952
Reviewed-on: https://gerrit.libreoffice.org/46726
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-19 15:19:27 +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
Katarina Behrens 5c66c07112 Read/write 'encrypt to self' bit
use some template functions to avoid duplicate code

Change-Id: Ia178ea3a0561e34e0431749262f5f8f1f49b4fe7
Reviewed-on: https://gerrit.libreoffice.org/46693
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-12-19 01:25:48 +01:00
Katarina Behrens df4fac1dbc Read/write preferred GPG signing/encryption keys
Change-Id: I3e21469c5f4c4f199407bbe9faba2e2ddca531b3
Reviewed-on: https://gerrit.libreoffice.org/46692
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-12-19 01:24:56 +01:00
Stephan Bergmann 15d134b4f5 Make temp copy of dbaccess/qa/unit/data/firebird_empty.odb for testing
...in CppunitTest_dbaccess_firebird_test.  Otherwise, the test would fail with

> Test name: FirebirdTest::testEmptyDBConnection
> An uncaught exception of type com.sun.star.sdbc.SQLException
> - The connection can not be established. No storage or URL was given.

if dbaccess/qa/unit/data/firebird_empty.odb is read-only, as
DocumentStorageAccess::impl_openSubStorage_nothrow
(dbaccess/source/core/dataaccess/ModelImpl.cxx) takes
m_pModelImplementation->m_bDocumentReadOnly into account and returns a null
xStorage.

Adds a move ctor to utl::TempFile (thus causing copy ctor and copy assignment op
to be implicitly deleted), but leaves any move assignment op undeclared for now,
as none happens to be needed (yet).

Change-Id: I6f9eff07eb54f1364a0560ffa4cf1f676a319d16
Reviewed-on: https://gerrit.libreoffice.org/46561
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-15 22:59:54 +01:00
Stephan Bergmann c5f6043b0f Enable C++17 for clang-cl, too
Similar to libc++ in C++17 mode, some types like std::auto_ptr are indeed
removed in C++17 mode by default, and need _HAS_AUTO_PTR_ETC=1 to be enabled
(see <https://blogs.msdn.microsoft.com/vcblog/2017/12/08/c17-feature-removals-
and-deprecations/>).

Unlike libc++, also std::binary_function and std::unary_function are removed
(and need the same _HAS_AUTO_PTR_ETC=1 to enable).  So either set that flag to
make external code build, or use patches (for external/mdds) to make externals'
files included in LO proper still work there.

Change-Id: I886cc0de8196255334ee03ec48cb4bc54d460afd
Reviewed-on: https://gerrit.libreoffice.org/46514
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-15 22:23:31 +01:00
Noel Grandin 78a6ce17f0 DELETEZ->std::unique_ptr in toolkit,unotools
Change-Id: I2263e233ae03575e53ab4e7894a7507423afd32e
Reviewed-on: https://gerrit.libreoffice.org/46397
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-13 20:08:35 +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
Noel Grandin dd0dceb511 loplugin:salcall handle static methods
Change-Id: Id6820abec4b8ca8bee26d62b333fd30b42a14aec
Reviewed-on: https://gerrit.libreoffice.org/46007
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07 11:25:55 +01:00
Stephan Bergmann 90d2155912 Work around latest Boost 1.65.1 still using deprecated std::auto_ptr
...in various places, which is gone by default at least from recent libc++ in
C++17 mode.  So bring it back there for now, until Boost is fixed.

Change-Id: I0b3128d114ab2b5693a84bdc7d2b9b9b9b5c3c76
Reviewed-on: https://gerrit.libreoffice.org/45910
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-06 07:26:31 +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
Caolán McNamara 2161d04688 drop duplicate method
Change-Id: Idadd0a64e41cd02f5167b275081c3576a6224b12
Reviewed-on: https://gerrit.libreoffice.org/45075
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-22 13:33:25 +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
Caolán McNamara a8b8841f9f speed up fuzzers a little
Change-Id: I04b66fc32bbcd70484bf3a7eef1c5125b3636fe7
Reviewed-on: https://gerrit.libreoffice.org/44467
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-08 18:20:04 +01:00
Mike Kaganski 5a963595c9 CharClass: simplify methods a little
Change-Id: I40516d82e79c0585f828e76f005af269fad75aa5
Reviewed-on: https://gerrit.libreoffice.org/44338
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-11-06 08:53:59 +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
Eike Rathke 7616e1c188 LocaleDataWrapper::stringToDouble() w/ decimalSeparatorAlternative, tdf#81671
To be used instead of rtl::math::stringToDouble() if locale
dependent separators are involved.

Change-Id: I54359c981901dc57b3d9312b0bfd2f2a14fccb33
2017-10-27 18:29:44 +02:00
Eike Rathke 922a94f376 Add LocaleDataWrapper::getNumDecimalSepAlt(), tdf#81671
Change-Id: Id3a16004603685ef859506c2c6d86f8ff097c1d0
2017-10-27 18:29:44 +02:00
Eike Rathke 51a7ae749d Let LocaleDataWrapper::getLocaleItem() return LocaleDataItem2&, tdf#81671
Change-Id: I16cfe81dd3ce0c8c2e905d55bea13df134c7a398
2017-10-27 18:29:43 +02:00
Eike Rathke ad1bf2ce26 Supersede with XLocaleData5, LocaleData2, tdf#81671
Change-Id: I17332be77f9c66c4fcfb7e3f3144ec624b804f94
2017-10-27 18:29:43 +02:00
Noel Grandin d9b6f4fd38 loplugin:constmethods in unotools
Change-Id: I13df4e184a826682f34a1d9e974b601397ba4a3d
Reviewed-on: https://gerrit.libreoffice.org/43865
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-26 10:59:42 +02:00
Stephan Bergmann 7bd70488cd loplugin:includeform: unotools
Change-Id: I019d7fefcd83b306a1847ae4a7ec581435412fc4
2017-10-23 22:45:48 +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
Caolán McNamara d4e5e20a29 tdf#110742 add support for icon themes via extension manager
Change-Id: Ic33c086ef67cdcb634d9f03f84799c234fe3beec
Reviewed-on: https://gerrit.libreoffice.org/43341
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-13 09:30:02 +02:00