summaryrefslogtreecommitdiff
path: root/svl/source
AgeCommit message (Collapse)Author
2022-07-14Accept 'Y D MMM' date input for locales with LongDateOrder::YDMEike Rathke
There currently is only lv-LV. Change-Id: I39aa38fbf34c44d914aeb6af0f55d820b5567a7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137083 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-07-14Let 'MMM D Y H:M' input follow the same date rule as 'MMM D Y'Eike Rathke
... and not only accept for DateOrder::MDY. Change-Id: Ic17efbdfee5aac1e00d3cee7b14c16875b3dd292 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137076 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-07-13Resolves: tdf#149950 Handle LongDateOrder vs DateOrder for middle month nameEike Rathke
Change-Id: I30598f7081cea73fa368374084c03b0df108be84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137026 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-07-11tools: rename getHeight/Width() to GetOpenHeight/Width()Chris Sherlock
By default Rectangle uses closed interval, if we really want to use half open intervals then we should specifically say as such in the name. Change-Id: Id7a91120ba1a1a4bc330014216b73a692dbf03a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136575 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-04dodgy use of dynamic_cast on an UNO objectNoel Grandin
rather just stick to using getFromUnoTunnel ever since commit 5420fbd0d722754e4e01e48d661f0ee082caef56 Date: Wed Mar 12 12:09:03 2008 +0000 INTEGRATION: CWS impresstables2 (1.16.30); FILE MERGED 2008/ Change-Id: I0ac7690ed779407c77c29fa319402e70427e184c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136801 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-01small optimisationNoel Grandin
in a very hot spot Change-Id: I2115fb23e217de7cdd84f7301acd3a27829f3298 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136660 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-01ChangeNullDate: assert valid date after normalization if it wasn't beforeEike Rathke
... and abort if not. Also take over only valid values. This might pop up more crashtest import failures that would need fixes similar to commit 7ca3eca66888a1fa1b7bd59d79bb8f4c96bd7460. Change-Id: I217204378374a1a598b5a3ff3c9c6728f112af70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136688 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-06-29elide unnecessary copy in SfxItemSet constructorNoel Grandin
Change-Id: I6881f5dcea753a6d2cfbf203b50043219191fae4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136601 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-29tdf#117539 Assert after cut and paste operation of a chart stickNoel Grandin
inline the call to the other constructor, and remove the assert(size() != 0) it appears to be valid to have a size of zero here Change-Id: Iff18581109a27622701a5dbe22874854ee7b1faa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136602 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-20elide some makeStringAndClear() callsNoel Grandin
Change-Id: Id7116fac8a6f65db18ff93384c5faf2f6481f6fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136186 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-20Resolves: tdf#147265 Return correct default if currency format is duplicateEike Rathke
For the default currency format SvNumberFormatter::GetCurrencyFormatStrings() returned always the last added position, regardless whether that format was added or not, which it isn't if the format code is a duplicate. Let addToCurrencyFormatsList() return the position of the existing format if the duplicate was rejected and use that for default. Change-Id: I148d7379de75cae402b063f7b2f92947e345176f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136187 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-06-20SfxStyleSheetBasePool::Find can be constCaolán McNamara
Change-Id: I5cf2737d05cfe4b0be936a77cfb96db053483438 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136141 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-16tdf#128150 Add OOXML import/export for "use background fill"Samuel Mehrbrodt
and allow editing this fill property in area dlg Change-Id: Ic63ba11e9d499d4a0fb22f6739587e3e25140b8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134406 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-06-16Related: tdf#149325 tdf#52602 SvNumberFormatsObj::addNew accept differingEike Rathke
... resulting format code of an existing format as not attempting to add a duplicate. It makes no sense to insist on strictness if the client can't know the rules.. Change-Id: I0c8ca215984bf84487036ccf2b570128b1694d54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135898 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2022-06-15Use rtl::isAsceeLowerCase/rtl::toAsciiUpperCaseMike Kaganski
Change-Id: I61593b4f147bb2b83bd979f8fd429b70b3286d77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135885 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-06-15Resolves: tdf#149325 tdf#52602 SvNumberFormatsObj::queryKey try also uppercaseEike Rathke
... keywords; that should catch most lower case queries. If there are still remaining mismatches then either implement the bScan thing, or enhance addNew() to not fail on case-different format codes. That could be hit for the `General` keyword, for example. Change-Id: Ic728b8c5e38db76eb791cb305595f84acf7dc867 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135854 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2022-06-08Related: tdf#149484 Display BOOLEAN literal string text additionsEike Rathke
Change-Id: Ifbaf0b18178091c3a340a7c4bc66f78397aadc18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135506 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-06-03clang-tidy modernize-pass-by-value in svlNoel Grandin
Change-Id: I184efd7aee2c3eb02399100a4a7500951255d423 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135357 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-28add ClearItem to the SfxItemSet iteratorsNoel Grandin
to speed up operations when iterating over SfxItemSets Change-Id: Ie40327ffaf7faa801ccc12d2b05c546a7fe49802 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135079 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-28split SfxItem::ClearItem into two methodsNoel Grandin
in preparation for passing a hint into it Change-Id: Id9e5516619a314406d8250bb2145996593dafbaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135078 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-28simplify SfxItemSet::Differentiate and SfxItemSet::IntersectNoel Grandin
using SfxWhichIter instead of SfxItemIter Change-Id: I046ae2cec9246b1dea9c484f94b88d64825f952c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135077 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-28add GetItemState to SfxItemIter, the same way I did to SfxWhichIterNoel Grandin
to speed up GetItemState while iterating Change-Id: Ibe092e7581a5be0160eed52472122afe7e0ef377 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135076 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-28use the new SfxWhichIter::GetItemState featureNoel Grandin
to speed up other places that are iterating over SfxItemSets Change-Id: I646bae12420d15e67effdd279e071cdf8a8afffd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-28ofz#24932-1 speed up GetItemState when iteratingNoel Grandin
by having SfxWhichIter track the current position in the m_ppItems table, which means GetItemState does not need to traverse the ranges table to find the item position. shaves 75% off the time of ./instdir/program/soffice.bin --calc --convert-to pdf ~/Downloads/ofz24932-1.rtf Change-Id: Ib5fe61c75ca05bc2f1932e84b57ccfa55f8b7f74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135023 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-26ofz#24932-1 walk ItemSets together in SfxItemSet::SetNoel Grandin
shaves 20% off the time of ./instdir/program/soffice.bin --calc --convert-to pdf ~/Downloads/ofz24932-1.rtf Change-Id: I85c8bdd51895d768c37d247f6bf07ce9183d1107 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135014 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-26avoid some allocation in SfxItemPropertySet::setPropertyValueNoel Grandin
by using std::move on the newly created poolitem, so that the pool does not need to clone it Change-Id: Ib90b14173d19768517eb2a31cc0a105e5eb4d7c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134991 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-23svl: spurious GCC12 -Werror=maybe-uninitializedMichael Stahl
In file included from svl/source/misc/sharedstringpool.cxx:11: In constructor ‘svl::SharedString::SharedString(rtl_uString*, rtl_uString*)’, inlined from ‘svl::SharedString svl::SharedStringPool::intern(const rtl::OUString&)’ at svl/source/misc/sharedstringpool.cxx:129:51: include/svl/sharedstring.hxx:56:20: error: ‘pResultUpper’ may be used uninitialized [-Werror=maybe-uninitialized] 56 | mpData(pData), mpDataIgnoreCase(pDataIgnoreCase) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ svl/source/misc/sharedstringpool.cxx: In member function ‘svl::SharedString svl::SharedStringPool::intern(const rtl::OUString&)’: svl/source/misc/sharedstringpool.cxx:93:33: note: ‘pResultUpper’ was declared here 93 | rtl_uString *pResultLower, *pResultUpper; | ^~~~~~~~~~~~ Change-Id: I2171855844c76ad3b2a72c1eca737691ca96fc46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134736 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-16std::stable_sort() where libc++ debug mode breaks a unittestLuboš Luňák
Libc++ debug has a feature that randomizes equal elements during sort, which normally wouldn't make a difference, but some tests rely on specific order of tested data. The ones failing without this include: CppunitTest_sw_ooxmlexport testMsoPosition CppunitTest_sw_xhtmlexport testTdf66305 CppunitTest_sw_ww8export testCommentExport Change-Id: Id49846939a264150cc82091718ffe6b904d7130e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134337 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-16make SharedString move operator= inline (tdf#126109)Luboš Luňák
Calc uses SharedString in mdds::multi_type_vector, which may move contents of its blocks on some operations, and making this inline makes such operations faster. Change-Id: I67d14639cf253c56b8cca5b2837bb06bc9afd7d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134339 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-07cid#1504313 Uninitialized pointer readCaolán McNamara
Change-Id: I0a5fa033a54d8f3b8b0248cf67e252c640b33e82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133974 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-06svl: fix crash if user cancels/closes master password dialogMichael Stahl
(regression from d7ba5614d90381d68f880ca7e7c5ef8bbb1b1c43) Change-Id: I8bb9a967aefa2e88f05c23456a0dd1a090e1a5fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133932 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-06tdf#148383: Obtain start/end strings always in system localeDaniel Kamil Kozar
ScFillSeriesDlg always expects the strings describing the start and end values to be in the system locale. This change ensures that and fixes the bug where using non-locale-default data in the Fill Series dialog leads to an error. Change-Id: I25eafa2174294dc35a63473a54c529c2d7bd87ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132532 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2022-05-05use more o3tl::getTokenNoel Grandin
found by inspecting call sites of OUString::getToken Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03Just use Any ctor instead of makeAny in svlStephan Bergmann
Change-Id: Iefa570476bf0c881e36679ae9511ff63162e05d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133771 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-29svl: fix testSignDocument_PEM_PDF with "dbm:" NSS DBMichael Stahl
CentOS 7 system NSS defaults to legacy "dbm:" DB. test_desktop_lib.cxx:2943:Assertion Test name: DesktopLOKTest::testSignDocument_PEM_PDF assertion failed - Expression: bResult NSS_CMSSignerInfo_Sign() (called from NSS_CMSEncoder_Finish()) internally calls PK11_FindKeyByAnyCert() and that fails likely for same reasons as documented in previous commit. The workaround here is a bit more involved, it turns out there's another path with NSSCMSSignerID_SubjectKeyID where the caller can pass in a SECKEYPrivateKey, let's try to do that as a fallback if a manual call to find the key fails. Change-Id: I298ee72f178220bcf644093917dba8143b092c92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133577 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-04-29use more string_view in INetURLObjectNoel Grandin
Change-Id: I4462f7cf4740fa4d1b129d76a0775f4250f41bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-27use string_view in ImpSvNumberInputScan::StringToDoubleNoel Grandin
Change-Id: I53df3f273fd5587b12c509ead1477c2108d7fe75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133456 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-27add string_view wrappers for rtl::math::stringToDoubleNoel Grandin
Change-Id: I114bec72cb933238675e539a8388a607226827cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133455 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-26add o3tl::toUInt32Noel Grandin
Change-Id: I07f11bf12fbe1d1c2d812fa0965d6e632e1e1aba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133437 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-25use string_view in CompareProtocolSchemeNoel Grandin
Change-Id: I3584042d0341d5c1b4f4e742e25e9eb0aa26f1da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133378 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-15Prepare SvNumberFormatter::GetEditFormat() to obtain for another localeEike Rathke
Change-Id: Iab8b9a802ebac60b52007754430352d3de925374 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133026 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-04-13use more string_view in svlNoel Grandin
Change-Id: I9b6a074eb6342808d02a69f3ed1fa713e81d2608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132958 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13loplugin:stringviewparam whitelist some more functionsNoel Grandin
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-12loplugin:stringview more o3tl conversionNoel Grandin
look for call sequences that can use string_view and the new o3tl functions in o3tl/string_view.hxx Also add a few more wrappers to said #include file Change-Id: I05d8752cc67a7b55b0b57e8eed803bd06bfcd9ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11use more string_viewNoel Grandin
found by tweaking the loplugin:stringview and making it whitelist getLength Change-Id: Ic41cd4e3026d93b70a76fe1279c6de3abbe6b4a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132820 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-10Removed duplicated includeAndrea Gelmini
Change-Id: Ica4231235b0a2d32ba8558cc409b549acd887077 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132758 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-04-09Resolves: tdf#148052 accept a ". Month " name for matching DMY formatEike Rathke
... even if the locale doesn't define such DM order or LongDateDaySeparator. Change-Id: I4bef720dff3582de9b60313824a84b570c153e98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132741 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-04-08move comphelper::string::toInt32 to o3tlNoel Grandin
so we can use it in places where we cannot include comphelper Change-Id: Iba0ba3e4c0dcf0f9d1f09092a77c3b2010ec4f6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132732 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-08use more subView when converting to Int32Noel Grandin
Change-Id: I54e3ddf79ba793fd4328bf8bda7f949b65349651 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132693 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-30add Initialization Vectors to password storageCaolán McNamara
old ones default to the current all zero case and continue to work as before Change-Id: I6fe3b02fafcce1b5e7133e77e76a5118177d77af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131974 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>