summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)AuthorFilesLines
2019-08-21Resolves: tdf#122110 convert condition decimal separator to target localeEike Rathke2-3/+31
Otherwise re-scanning the format code in the target locale failed. Change-Id: Ia4face1b5630c197f68b1f521e62b163550301e6 Reviewed-on: https://gerrit.libreoffice.org/77852 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 152c4fcbf1aa5b7454834581927056cfc9d1d7e5) Reviewed-on: https://gerrit.libreoffice.org/77859 Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2019-07-18Resolves: tdf#126342 obtain date particle order from pattern matchEike Rathke1-1/+20
... if there was any. In the NF_EVALDATEFORMAT_FORMAT_INTL case the input may match a current locale's pattern instead of a format's locale's pattern and patterns' (format locale + current locale) date orders may be different from the format's date order. Change-Id: I3aeaa6c361f98fe80f69c4f5d975fca892dac6ea Reviewed-on: https://gerrit.libreoffice.org/75481 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 7de96e9f7b69354fd5b15e1276678000bc386568) Reviewed-on: https://gerrit.libreoffice.org/75491 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-23crashtesting: tdf#122599 NSS_CMSMessage_CreateFromDER assertsCaolán McNamara2-3/+35
because NSS_Init wasn't called first Change-Id: Ib1b4c950dc2773af1fea7b64339b86566ee412e7 Reviewed-on: https://gerrit.libreoffice.org/70949 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
2019-04-03Introduce next Japanese gengou era 'Reiwa'Takeshi Abe1-1/+1
starting from 2019-05-01, which has been announced officially. This fills the provisional slot acknowledged at cacbb0faef77ae8462de9ff5c7307a6a2e28b2bb. Change-Id: Ifb12e6afaad4c66d455f664b46ec946e80324e87 Reviewed-on: https://gerrit.libreoffice.org/70157 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-03-04Resolves: tdf#123748 do not strip date part before calling Time::GetClock()Eike Rathke1-10/+2
GetClock() needs it to properly scale and round the floating point value. It also handles negative values, fiddling with that is only needed for the [] formats. Regression from commit e2e47898180e547cad7ccde1e5890385d573e551 CommitDate: Fri Aug 31 12:50:52 2018 +0200 Use tools::Time::GetClock() in number formatter for wall clock time Change-Id: I05fe9e22886d4e59f110c0a826dadb43234d348a Reviewed-on: https://gerrit.libreoffice.org/68508 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 609ea85b530185910bf326201f785fd32bcbad2b) Reviewed-on: https://gerrit.libreoffice.org/68513 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2019-01-29Resolves: tdf#122991 do not truncate time duration [] format valuesEike Rathke1-8/+1
Regression from commit e2e47898180e547cad7ccde1e5890385d573e551 CommitDate: Fri Aug 31 12:50:52 2018 +0200 Use tools::Time::GetClock() in number formatter for wall clock time This partly reverts the change for the affected time duration [] formats, which truncated the value within the magnitude that due to the imprecision of floating point values lead to "false" precision of h:m:s.999999... This might again yield imprecise display values (old behaviour) for a difference of two wall clock times that now are not rounded up into the next magnitude for display. If so, a tools::Time::GetDuration() might be appropriate. Change-Id: If8fbcc2e4c2e0da04ca742a2837f57cd313d0367 Reviewed-on: https://gerrit.libreoffice.org/67005 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 31d3369803ce4eceab5ef708f2cd33748b6d10ea) Reviewed-on: https://gerrit.libreoffice.org/67030 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-17Related: tdf#122509 prevent access of not existing base formatEike Rathke1-4/+5
Call to pFormat->HasPositiveBracketPlaceholder() with nullptr as obtained for the not existing nIndex was the immediate cause of the crash. Also obtain the type from the format if found instead of the separate GetType() call that again would need to find the format first. This clarifies that the other places accessing pFormat don't need additional checks because eType isn't UNDEFINED there. Reviewed-on: https://gerrit.libreoffice.org/66476 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins According to https://crashreport.libreoffice.org/stats/signature/SvNumberformat::HasPositiveBracketPlaceholder() this occasionally happened in ~all releases, independent of the circumstances in tdf#122509, so let's backport to available release. Change-Id: I5d78ad73eeb4c3820c45d6a91b0e729ed22951a4 Reviewed-on: https://gerrit.libreoffice.org/66520 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-12-14tdf#120750: Revert "tdf#96248 delete SfxPoolItems with Which Id >= 4000"Xisco Fauli1-2/+9
This reverts commit c9493b344a9bd104d0a882f5e9407880c0c63c20. According to https://bugs.documentfoundation.org/show_bug.cgi?id=96248#c15 the asert was gone even before the patch... Anyway, better to have an assert than a crash Change-Id: I84389bf2e8e604f6967923c0eedaae3aec3455e6 Reviewed-on: https://gerrit.libreoffice.org/65115 Tested-by: Jenkins Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> (cherry picked from commit c5d0d424bd7e78455cb6f9578cf2425ac0787004) Reviewed-on: https://gerrit.libreoffice.org/65157
2018-11-22tdf#42949 Fix IWYU warnings in include/vcl/[B-E]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iabe571aa8f00492902c499094bea8365a3e17fca Reviewed-on: https://gerrit.libreoffice.org/63623 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 40710c488de3e4eef585c5a5276c9a0943d36f2e) Reviewed-on: https://gerrit.libreoffice.org/63769 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-16loplugin:buriedassign in sd..writerfilterNoel Grandin2-5/+17
Change-Id: I954c12d9e1c493be6ac8c7b15076077b5bff5b74 Reviewed-on: https://gerrit.libreoffice.org/62811 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-14tdf#42949 Fix IWYU warnings in include/svl/*Gabor Kelemen13-0/+22
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ide75232858599c275e023c2300201090acd22307 Reviewed-on: https://gerrit.libreoffice.org/63237 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-09Fix many Java subsequentcheck test by using JUHJan-Marek Glogowski1-6/+2
Splits gb_JunitTest_set_unoapi_test_class_and_jars into two separate defines as: - gb_JunitTest_use_unoapi_jars - gb_JunitTest_use_unoapi_test_class Then replaces many of the gb_JunitTest_use_jars lists with the new gb_JunitTest_use_unoapi_jars to fix the JUH dependencies. This probably adds some unneeded JUH dependencies to some Java tests, but that shouldn't be a problem. Change-Id: I0c4fce6b50f7c6eb8d62bfb2c50f056b97584794 Reviewed-on: https://gerrit.libreoffice.org/63119 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-11-07loplugin:collapseif in sdext..svxNoel Grandin1-12/+6
Change-Id: I188d9e9b53e00acfbae3c7acd54de28f084c4b3f Reviewed-on: https://gerrit.libreoffice.org/62985 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-05replace double-checked locking patterns with thread safe local staticsMike Kaganski1-27/+12
Change-Id: I4ed97cc6d9f733292156d71551d5ce3af6071445 Reviewed-on: https://gerrit.libreoffice.org/62858 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-04replace double-checked locking patterns with thread safe local staticsMike Kaganski1-2/+0
Change-Id: I1bf67196e97411aeecc13ed4f91d1088a315e323 Reviewed-on: https://gerrit.libreoffice.org/62839 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-03tdf#120703 PVS: V547 Expression is always falseMike Kaganski2-79/+19
Let FSStorage::GetContent() return reference. Change-Id: I6595f48d56f7eb9256600eb6ee1a569077fef92f Reviewed-on: https://gerrit.libreoffice.org/62823 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-01clang-tidy: (WIP) bugprone-too-small-loop-variable findingsTamás Zolnai1-4/+4
Change-Id: Iaa255b39928ac45dec1ed37e368c149d6027f561 Reviewed-on: https://gerrit.libreoffice.org/62701 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-11-01use unique_ptr in markForDeletionNoel Grandin1-29/+19
Change-Id: I10e5ad02243c7045d51191c735163ee4a027126e Reviewed-on: https://gerrit.libreoffice.org/62695 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-01rename RemoveX->Remove in SfxUndoArrayNoel Grandin1-12/+12
accidentally left it this way when doing commit 19e715973e15f9e7cf6e8237643dbbc14f8eb87a Date: Mon Oct 29 16:15:27 2018 +0200 loplugin:useuniqueptr in MarkedUndoAction Change-Id: I250676df7af27f485c5d34281ef0da1e127eb24c Reviewed-on: https://gerrit.libreoffice.org/62694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-31loplugin:useuniqueptr in SfxItemPoolCache::ApplyToNoel Grandin1-3/+3
Change-Id: Ica6ffb5bbaad5c941c65cae02bba7ea2380646f3 Reviewed-on: https://gerrit.libreoffice.org/62652 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-30loplugin:useuniqueptr in MarkedUndoActionNoel Grandin1-45/+32
Change-Id: Ic06b990112df5bc135cfd7af6f1129580f294428 Reviewed-on: https://gerrit.libreoffice.org/62509 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-26tdf#42949 Fix IWYU warnings in include/unotools/*Gabor Kelemen3-0/+5
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444c43b9d549977039f25bec2b5bf666c3e15e0e Reviewed-on: https://gerrit.libreoffice.org/62041 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-26use unique_ptr when Clone()'ing PoolItemsNoel Grandin1-2/+2
and fix a handful of small leaks in the process Change-Id: I876e12ff5305f9dda84532d4182fb91657d6fa0c Reviewed-on: https://gerrit.libreoffice.org/62389 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-25return std::unique_ptr from CloneSetWhichNoel Grandin1-2/+2
Change-Id: I709122cb8cd7c257e7eb2bd564c529689e6d555a Reviewed-on: https://gerrit.libreoffice.org/62350 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin3-16/+14
which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-22sc: avoid checking for time formats in case of SvNumFormatType::NUMBERSerge Krot1-0/+3
Change-Id: I565506d58f2dd94a6c2c5e1c4a2000ce1f9752cf Reviewed-on: https://gerrit.libreoffice.org/61445 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-10-22pvs-studio: V794 The assignment operator should be protectedCaolán McNamara2-7/+12
Change-Id: Ia443a0e61a091d877c8da26bf7d45bf4261f8669 Reviewed-on: https://gerrit.libreoffice.org/62166 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-22loplugin:singlevalfields look for fields that can be boolNoel Grandin2-27/+27
Change-Id: Ief773b661a8378a10db56943b32127c7a2c86d11 Reviewed-on: https://gerrit.libreoffice.org/62037 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-22loplugin:staticvar in soltools..svxNoel Grandin2-3/+3
Change-Id: Ie9f36eb0e00aaee34a27f136ed903f8f87e52dcc Reviewed-on: https://gerrit.libreoffice.org/61916 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-21tdf#120703 (PVS): redundant nullptr check; loop index sizeMike Kaganski1-7/+4
V668 There is no sense in testing the 's' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. V1029 Numeric Truncation Error. Result of the 'size' function is written to the 16-bit variable. Change-Id: I8e0598e892ca160ac074bccfed87c14367a3b46a Reviewed-on: https://gerrit.libreoffice.org/62139 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-20result of DdeQueryStringW unusedCaolán McNamara1-19/+4
since commit 88e3b846b8a4bd4ce5507d1bc5441ee4167e5326 Date: Wed Apr 6 11:28:44 2016 +0200 remove some dead bits of DDE Change-Id: I66b2f8365e3fed15391ff0fe2eb3c874b5054e91 Reviewed-on: https://gerrit.libreoffice.org/62070 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-19clang-tidy readability-container-size-emptyNoel Grandin1-1/+1
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-18clang-tidy readability-simplify-boolean-exprNoel Grandin2-18/+3
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin2-6/+5
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-12SvNumberFormatsSupplierServiceObject: default to LANGUAGE_SYSTEMEike Rathke1-1/+1
... instead of LANGUAGE_ENGLISH_US that will be ultimate fall-back anyway if no match is found. Change-Id: Ice6495e54fa0a1e275769fcfdf1e0e932e22944e Reviewed-on: https://gerrit.libreoffice.org/61729 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2018-10-10ofz#10879 stay inside sSecStr boundsCaolán McNamara1-2/+2
Change-Id: I0ca70cdb9b80305c5339668d65d2c4c9977e7160 Reviewed-on: https://gerrit.libreoffice.org/61604 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann4-9/+9
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-09use unique_ptr in SfxUndoManager::AddUndoActionNoel Grandin1-3/+4
Change-Id: I11483e3cece12a7373f4276972b4c899edf1ce15 Reviewed-on: https://gerrit.libreoffice.org/61566 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-08loplugin:constfields in svlNoel Grandin7-15/+15
Change-Id: I18183c5c257cbe69bd067d4e74c50483ae683cf3 Reviewed-on: https://gerrit.libreoffice.org/61509 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-06try to fix SvtBroadcaster on macOSNoel Grandin1-42/+32
this reverts commit a20ec3b5cd691ae18f0d87d045673ce3a06579c6 fix iterator invalidation assert and commit 4a290888580474f9542f185091bb2a6fcf4e9a53 SvtBroadcaster unify the normal and PrepareForDestruction paths no idea what is going on, I suspect that std::vector is re-allocating its data buffer despite having called reserve() Change-Id: I681ae5fca4578240a2a0dc0af51ff06d919f9099 Reviewed-on: https://gerrit.libreoffice.org/61464 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-06Unit test for de-* Januar/Jänner, tdf#114927Eike Rathke1-0/+30
Change-Id: I8f0f3b88e172e93caca4de6d8000cb20c5af8333 Reviewed-on: https://gerrit.libreoffice.org/61428 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-05OUString::fromUtf8() instead of createFromAscii()Eike Rathke1-2/+2
So we can use UTF-8 input to test. Change-Id: Ie56d43226c8cc8a5bf10317961fa0a91d8acfcf0
2018-10-05Resolves: tdf#114927 recognize both Januar and Jänner in de-* German localesEike Rathke1-0/+40
Change-Id: Ifcf087a8a20a1cdc460bd2caf6d1ceb528792e0d Reviewed-on: https://gerrit.libreoffice.org/61415 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-05fix iterator invalidation assertNoel Grandin1-6/+8
which only recent versions of MSVC (from 15.8.6) seem to spot. It resulted in PythonTest_sw_python failures with "vector iterators incompatible" assertion on the dest != maDestructedListeners.end() check ever since commit 4a290888580474f9542f185091bb2a6fcf4e9a53 Date: Mon Oct 1 14:31:00 2018 +0200 SvtBroadcaster unify the normal and PrepareForDestruction paths Although this code appears to always have been wrong, it is just that it is being hit much more often now. Change-Id: I45d4f2ceef4ddf19c205702645a41363eea93f21 Reviewed-on: https://gerrit.libreoffice.org/61397 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-02fix bug in SvtListener copy constructorNoel Grandin1-2/+1
it was copying maBroadcasters, without actually starting to listen to those broadcasters, which means if we __did__ call StartListening, that method would have just returned early. Since nothing seems to need this functionality, and it's not obvious what the correct behaviour would be, just don't do the copy. Change-Id: If5865fa3449839758a43ac537475e0a474f39078 Reviewed-on: https://gerrit.libreoffice.org/61239 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-02SvtBroadcaster unify the normal and PrepareForDestruction pathsNoel Grandin1-32/+40
since this approach is better in that it avoids O(n^2) behaviour of lots of listeners deleting from a std::vector, lets just always use this approach. Change-Id: I9204996ee8c9379ac71dfc168a6c1fc653e63a8e Reviewed-on: https://gerrit.libreoffice.org/61204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-02minor optimisation to SvtBroadcaster::AddNoel Grandin1-6/+8
Change-Id: I5ab173cb2517602abc42e715375157fd05fdd55f Reviewed-on: https://gerrit.libreoffice.org/61203 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-02fix bug in SvtBroadcaster copy constructorNoel Grandin1-22/+10
otherwise we end up with duplicated listeners on our list, because we add them twice Change-Id: Ia5cdd3584d49ef11b89cf12fc9ebf07441a47724 Reviewed-on: https://gerrit.libreoffice.org/61202 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-01Resolves: tdf#119613 [*-ZA] default to ISO 8601 date formatEike Rathke1-4/+4
This also made it necessary to adapt the unit tests that checked for the old default format in output. Change-Id: Ie7bc78d1e5a17e5cb6f52d5ed1ab42db80f07d2e Reviewed-on: https://gerrit.libreoffice.org/61200 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-01fix bug in SvtListener::CopyAllBroadcastersNoel Grandin1-0/+1
need to flush existing broadcasters before overwriting Change-Id: If570b838d0313ab7598b36ff8a32fc6d31dea92c Reviewed-on: https://gerrit.libreoffice.org/61151 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>