summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)AuthorFilesLines
2021-06-17use string_view in the Translate APINoel Grandin1-1/+1
Change-Id: I0bb0ea9d39ed623928060ffd3f2e2bc36ba33209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117272 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-13Assert on valid order of which ids in ranges on SfxItemSet creationMike Kaganski3-345/+172
This allows to make sure we actually use sorted which ranges, and then it's safe to call SfxItemSet::MergeRange when needed. Also this change relaxes the previous requirement that ranges must be separated by at least one; this allows to have adjacent ranges, like in RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_GRFATR_BEGIN, RES_GRFATR_END-1, where RES_FRMATR_END is equal to RES_GRFATR_BEGIN. Allowing this makes possible to (1) self-document the ranges, so it's clear which ranges are included; and (2) be safe in case when these constants would change, so that the one merged range would not unexpectedly contain everything inserted between RES_FRMATR_END and RES_GRFATR_BEGIN. Change-Id: Iaad0f099b85059b3aa318a347aa7fbd3f6d455c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116909 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-13Avoid [-Werror=redundant-move] in GCC 9.3.0Mike Kaganski1-1/+1
Change-Id: I5ef8e094de76673c53b989fd659597b38c3f8d50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117112 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-12Current baseline Clang 5.0.2 is able to upcast std::unique_ptrMike Kaganski1-1/+1
Change-Id: I5ede872a6a629be1bcbd4d3e6fbd604cc76f1d77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116911 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-11Simplify even more initializations in svl/passwordcontainer.cxxJulien Nabet1-16/+4
Change-Id: I42cb919a8853df050d71b97f86abd20fdfccb5a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116978 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-10small optimisation in SvtListener::EndListeningNoel Grandin1-1/+1
erase immediately after find so we're working with cache-hot data. Instead of calling something else, which will load other stuff, then reload the data to do the erase. Change-Id: Ibbcca584b488ec3edc5b271efbd15d9a9ea2213f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116986 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-10loplugin:unnecessaryreturn SvtListener::EndListeningNoel Grandin1-3/+2
Change-Id: Ifa7092b31b6027eeb5d7df67ac8b7de9337faf66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116985 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-10Simplify Sequences initializations (sot/stock/svl/svtools/svx)Julien Nabet1-21/+5
Change-Id: Iec21851d69f4a8d5f557e9ed2d30e5f680cd62c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116943 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-09-Werror,-Wunused-but-set-variable (Clang 13 trunk)Stephan Bergmann1-153/+0
> svl/source/misc/adrparse.cxx:639:30: error: variable 'aTheRealName' set but not used [-Werror,-Wunused-but-set-variable] > OUString aTheRealName; > ^ since 334644bad9e325d5b23b4416cdc3d22dce5141bf "loplugin:unusedfields in svl", plus removal of further newly dead code Change-Id: I24b4b63a8b625422c898d14ef9a0d304b828d6b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116926 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-09Add an SvAddressParser unit testStephan Bergmann3-0/+99
Change-Id: I7d08528f455bb7849e0b62da16c5387b1812ccb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116919 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-01loplugin:stringview (clang-cl)Stephan Bergmann1-4/+8
Change-Id: Id1f8f24fec638efcdf5a04ca7253e6f401afd2fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116548 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-31Clean redundant SvxBackgroundColorItem and use SvxColorItem instead.Gülşah Köse1-1/+0
SvxBackgroundColorItem is just copied from SvxColorItem. There is nothing special to SvxBackgroundColorItem class. SvxColorItem is a generic item and it's used on many places related with colors. We can use SvxColorItem for background colors too. Change-Id: Iacea31a7557b806e95f5859ff60add9a2626ec05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116282 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins
2021-05-29no need to allocate these on the heapNoel Grandin1-42/+42
Change-Id: I58847f8eb2c8dc17ca393a758d122cd3929deeb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116375 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-28Select svl crypto backend in configure.acJan-Marek Glogowski2-74/+34
And define USE_CRYPTO_* macros to select it in code. This way we can get rid of all the HAVE_FEATURE_NSS and _WIN32 variations. This also reverts 1f6b98f21495f0ecc5ded493cb3273da03852191. Change-Id: I101e4ae2f49cdb127d59bd49a4f1c86304ca2238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116338 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-05-27tdf#34724, tdf#91420: svl_qa_cppunit: Add unittestXisco Fauli1-2/+4
Change-Id: I81f784fb66b80ab0933047aa81d90aff1eec7971 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116246 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-05-26tdf#100122: svl_qa_cppunit: Add unittestXisco Fauli1-0/+5
Change-Id: Ie0a7ea6ae08ea96b04019148f80ee94ef22ef1bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116187 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-05-26tdf#52510: svl_qa_cppunit: Add unittestXisco Fauli1-0/+5
Change-Id: I18a7000104add044ba59381c201cb5aff9fb459d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116184 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-05-24tdf#100834: svl_qa_cppunit: Add unittestXisco Fauli1-0/+5
Change-Id: I14896935a4735d3719b385e8e7b70094e3d68904 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116067 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-05-24tdf#100755: svl_qa_cppunit: Add unittestXisco Fauli1-0/+5
Change-Id: I350148d788ff1bf9dd1c5ccf97aeaad04f975634 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116062 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-05-24Fix documentation of SfxItemPool ctrJulien Nabet1-2/+2
Change-Id: Ieead093b16c073e8b4b10d785c880287fa1994d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116056 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-05-23Resolves: tdf#137063 For General format start exponential display at 1E-10Eike Rathke1-10/+25
... instead of 1E-05, if not too many significant digits. Change-Id: I66cca1bdd2742526e4ade08a691e6d43b2eb439e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116016 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-05-21tdf#129878: svl_qa_cppunit: Add unittestXisco Fauli1-0/+5
Change-Id: I61ad886f4fc79ae6c4a71bcd331adbd7a8e9d966 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115900 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-05-21tdf#122991: svl_qa_cppunit: Add unittestXisco Fauli1-0/+8
Change-Id: I94fdab71acbbaf768f5151c642527d61728dfc7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115899 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-05-21tdf#123748: svl_qa_cppunit: Add unittestXisco Fauli1-0/+5
Change-Id: I55b3ad930f39f955b5c1f326a12c20af5fc46a1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115896 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-05-17fix some leaks in SigningNoel Grandin1-1/+6
Change-Id: I1104e0611dbfbf18858cbae64bfbbbcd03d176f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115717 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-17Resolves: tdf#128314 Use GenitiveMonths name also if comma is followingEike Rathke1-4/+6
So 'D MMMM,' works the same as 'D MMMM '. Change-Id: Id910c67174260401b9c37672f189d550480793a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115708 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-05-17dont leak NSS Arena in svl::crypto::Signing::SignNoel Grandin1-0/+3
Change-Id: I0c94c4f6035c1346468bbe78e94faea0cc714da8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115699 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-15Related: tdf#128314 Add unit test for NatNum12 lower namesEike Rathke1-0/+9
Change-Id: I909a730111985905e2054b03dbc26e9bab7df92c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115641 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-05-15Related: tdf#128314 tdf#137349 Add unit test for NatNum12 upper namesEike Rathke1-0/+9
Change-Id: Ib71b6bc12471322f0a66eced2258045a563cbb07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115639 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-05-15Related: tdf#128314 tdf#137349 Support NatNum12 for all day and month namesEike Rathke1-14/+21
Specifically capitalize, upper, lower, title. (Of which lower is still to be added). Change-Id: Ic3c44606b0fa6a39c332ab6a448c8d2280df877e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115638 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-05-11tdf#127363: svl_qa_cppunit: Add unittestXisco Fauli1-0/+1
Change-Id: I23f792b33ac7147007980e9af38afeb61fd28165 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115388 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-05-10speed up SfxExtItemPropertySetInfoNoel Grandin1-14/+34
Change-Id: I7fdf0395c40f1932cfa1fc6ada91accc1912851a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115352 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-10Resolves: tdf#142186 Accept 123.45 fractional input on weird formats like 0"."Eike Rathke1-5/+23
... or 0"."0 where the literal "." is also the decimal separator but can only occur in the integer part. Change-Id: I95093fdddf7759346f2869ee322222de3d130e55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115338 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-05-08ref-count SfxItemPoolNoel Grandin7-61/+28
so we can remove SfxItemPoolUser, which is a right performance hog when we have large calc spreadsheets Change-Id: I344002f536f6eead5cf98c6647dd1667fd9c8874 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115247 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-07add utility method to get last pool in chainNoel Grandin1-0/+9
Change-Id: If21defdf1b59219e3b81d803423713972412da7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115244 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-06replace SVL_CRYPTO_MSCRYPTO with _WIN32Noel Grandin2-8/+5
just to reduce the number of different #defines at work in this file. Change-Id: I586b09a3c3c4c8eed4971a0e89d8def9d848b9fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115166 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-03loplugin:stringadd improvement for appending numbersNoel Grandin1-1/+1
I was wrong, the Concat framework already optimised appending numbers by stack-allocating small buffers, so include them in the plugin Change-Id: I922edbdde273c89abfe21d51c5d25dc01c97db25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115037 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann8-15/+15
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-02tdf#79049 speed up OOXML workbook load (4)Noel Grandin1-1/+3
Optimise LocaleDataWrapper for reads by initialising the data we in the constructor, so we don't need any kind of locking Reduces load time from 34s to 28s. Change-Id: I4bd3bddb30b70ba015fe5b1372534f9507762b74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114960 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-28use string_view in INetURLObject::encodeNoel Grandin2-2/+2
Change-Id: Ib686c6872388b02c8939d3b65f6bd25cda348bc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-28svl: fix crash in SfxItemSet::dumpAsXml()Michael Stahl1-1/+11
Change-Id: I64cb14a740d6874ce288f249953984116648a470 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114759 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-04-27loplugin:stringadd convert chained append to +Noel Grandin3-7/+7
which can use the more efficient *StringConcat Also fix a crash in stringview plugin which started happening while I working on this. Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-27use more string_view in tools/streamNoel Grandin2-2/+2
Change-Id: I2a957cd72d71fea717734488cdb3670e0bcdd6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-25loplugin:unusedmethodsNoel Grandin1-5/+0
Change-Id: I2d563f5f3e6e3a5f2a58080e13f4211253bdf30d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114590 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-22no need to create temporaries when appending number to O[U]StringBufferNoel Grandin2-2/+2
Change-Id: I36d82423b5f75010552696a66cec7e53ee265ce4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114395 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-22no need makeStringAndClear() when appending to bufferNoel Grandin1-1/+1
it just creates an unnecessary temporary Change-Id: Ide3cd99b2ac4f2a621e5d55ce4bdc95d05430709 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114467 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-22no need to create a temporary when appending to OUStringBufferNoel Grandin1-2/+2
Change-Id: If31ac18f08618f805d82c0e49179e3ae9afb124f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114466 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-21loplugin:stringadd replace OUStringLiteral temporaries with OUString::ConcatNoel Grandin1-3/+3
Change-Id: I656f06a74d9f0180ae460264563d6a935c7d2c60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114377 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-19svx properties: pass SfxItemSet around by valueNoel Grandin1-0/+32
so we avoid heap allocation costs when loading lots of shapes Change-Id: I0de5819acc7f845973a284e68ab709989f27d402 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114297 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-15store ptr to the original entries in SfxItemPropertyMapNoel Grandin1-39/+73
instead of copying them to a new data structure that is practically identical. Helps startup time since we build a ton of these when loading documents. And use o3tl::sorted_vector as a dense map data structure to reduce allocations and improve cache friendliness, since this is a build-once thing. Change-Id: I950be03b1a21c0c81c40f2677d4215f5e8e256cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114015 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>