summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)Author
2024-04-18tdf#160706 speed up loading conditional formatting rule in XLS (II)Noel Grandin
Reduce the work we do in IndexedStyleSheets::Reindex takes my test document from 117s to 48s Change-Id: I2e23b05684d0f2e3a9dc05c0a0fc4e9bbea7008d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166180 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-14Related: tdf#160056 1 entry is more common than no entriesCaolán McNamara
Change-Id: I78fe8969120f894cf5c0a71fb61611af2d203d18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166065 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-12fold OnDemandNativeNumberWrapper ctor and init togetherCaolán McNamara
Change-Id: I79e2cb4c81a2bbac4da16ece778e4ad3acc59eb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166025 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-12crashtesting: assert seen on importing forum-mso-en4-62805.xlsxCaolán McNamara
Change-Id: I1d1ab4539775c8c2fce591ca32fc15c3c0dd6060 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166024 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-04loplugin:unusedmethodsNoel Grandin
Change-Id: I19f466a272c821185bea4b45efd34392e525c0d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165785 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-04fix 'tdf#158773 reduce dynamic_cast'ing in CustomShapeProperties::Notify'Noel Grandin
I messed up in commit 9c5fda14fff397d5d503f749ad019791d7e4ef83 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Wed Mar 6 16:20:41 2024 +0200 tdf#158773 reduce dynamic_cast'ing in CustomShapeProperties::Notify and forgot to actually use the new SfxHintId::StyleSheetModifiedExtended I created in the constructor of the SfxStyleSheetHint class Change-Id: Ica661a156d72c8a4b8ad415b6f45fe5d3458ba26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165787 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-04Use osl::ResettableMutexGuardScopedReleaser instead of ad-hoc guardsMike Kaganski
Change-Id: I2aa09655c207d3647650b5e38011a600bd221699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165777 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-02crashtesting: SvNFEngine::DefaultCurrencyRO assertCaolán McNamara
seen with forum-mso-en4-207468.xls so we will have to ensure that nDefaultSystemCurrencyFormat is set before using the RO mode Change-Id: Ib1e755203917ddd751a1493c817cc8383bbbc043 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165658 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-31crashtesting: crash seen with multiple threads calling GetTheCurrencyTableCaolán McNamara
seen with soffice --convert-to xlsx forum-mso-en4-207468.xls Change-Id: I89d16938b3f8780776f38b0e94ce3885d93ac252 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165585 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-31tdf#146619 Drop unused 'using namespace' in: svl/Gabor Kelemen
Change-Id: I5629f6d5940ebc76be72970606111459d21ee1fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165523 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-03-30tdf#42982 Add error messages to thrown exceptionsRMZeroFour
As part of the efforts in #42982 to improve the UNO API error reporting, this commit adds error messages in several files to help improve debugging experience. Change-Id: I7a51d4fd1e3a57798d70bc3464b034649948a287 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165253 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-03-29speed up ScPatternAttrNoel Grandin
we know that ScPatternAttr uses a single, contiguous range of item ids, so we can compute the item offset at compile time. Shaves 1-2% off some workloads. Change-Id: I623b8cb3e0d5d070118117196d2b48575f505725 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165550 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-29pre-thread -> per-threadCaolán McNamara
Change-Id: I1b5fa94370fc9432d76b25fe9cf663c926c32a99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165508 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-29crashtesting: fix SvNFEngine::CacheFormatRO assertCaolán McNamara
since: commit c6c6126aa3e8de256091b829b98b5943db6a8be6 Author: Caolán McNamara <caolan.mcnamara@collabora.com> Date: Thu Mar 21 17:25:35 2024 +0000 Related: tdf#160056 refactor SvNumberFormatter to split it into two constituent parts Change-Id: I4add9f383789ab03ceab751b07973448a41911ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165490 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-27drop const_cast and be more honest that internal state changesCaolán McNamara
Change-Id: I20dd009b2bd14cdf958572dabc7a7e565a2f98ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165393 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-27don't need to const cast here anymoreCaolán McNamara
Change-Id: I9d3502e9e16625135d2f065e39aec7ac6c6232ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165392 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-25drop unused methodCaolán McNamara
Change-Id: I39cd0016226deb2f19079a11e63c41a58176e032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165258 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-24fix CppunitTest_sc_subsequent_filters_test4 intermittent failureCaolán McNamara
Change-Id: Ieb532183fd07915f8e0f2ec0cc3983a390024522 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165257 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-23Related: tdf#160056 do calc NumberFormatting via ScInterpreterContextCaolán McNamara
and for the duration of Threaded calculation where there will be no new formats required we can drive number formatting with the unlocked RO policy. Change-Id: Ic0e449acdcf834bc569d13b4a984f13c55316801 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165160 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-22Related: tdf#160056 refactor SvNumberFormatterCaolán McNamara
to split it into two constituent parts SvNFFormatData which is the data store for number formats it generally operates on. SvNFLanguageData for data around the current language in use. and then a SvNFEngine which implements the interaction between those parts SvNFEngine has two policies, the typical RW mode and a new RO mode where the SvNFFormatData doesn't change, all formats needed in this mode must already exist. Change-Id: I56b070ccd2e556a0cb1fe609a2fae28e18277c8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165146 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-22improve loplugin:staticmethodsNoel Grandin
Some of the exclusions were too aggressive. Restrict them to only the important classes, which exposes some more places this plugin applies. Change-Id: I1b2d1fb24391adc71ed0984f94168f61a149479f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165154 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-22Related: tdf#160056 these methods can be constCaolán McNamara
Change-Id: Icf52f1665561eef0aa10febc9ca2f946e89b689b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165141 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-22tdf#160306: make sure that SvNumberFormatter agrees with ROUND outputMike Kaganski
After commit 9eb9083ff2fdaeb96399a0830a4394de4e29ef64 (Use Dragonbox to implement doubleTo*String*, 2022-02-18), the rounding that is used in SvNumberFormatter became strictly more correct; however, it now differed from what ROUND spreadsheet function returned, because the latter uses rtl_math_round, which calls rtl::math::approxFloor. To make the visual number representation consistent, this change uses rtl_math_round in SvNumberformat::ImpGetNumberOutput. Change-Id: I05b0bed7d3a6c73584a77adbae2835c95be249fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165142 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-21ITEM: Remove InvalidateAllItems()Armin Le Grand (allotropia)
I checked if this is used, but it can be replaced using Clear() -> all. This prevents that the whole array of Items in an ItemSet gets set to INVALID_POOL_ITEM. I also checked if INVALID_POOL_ITEM/IsInvalidItem is needed at all representing SfxItemState::DONTCARE but it is and still will need to be set for individual Items. At last checked if SfxItemState::UNKNOWN and ::DISABLED really need to be separate states, but indeed there are some rare cases that need that. To make things more consistent I also renamed SfxItemState::DONTCARE to SfxItemState::INVALID to better match Set/IsInvalid calls at ItemSet. The build showed a missing UT and led to a problem due to the hand-made ItemSet-like SearchAttrItemList. The state 'invalid' seems to be used as 'unused' marker. It should be changed to use SfxPoolItemHolder and not need that. For now, set by using an own loop to set to that state. Change-Id: Ifc51aad60570569a1e37d3084a5e307eed47d06c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165035 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-03-21Related: tdf#160056 this can be be a local functionCaolán McNamara
Change-Id: I0ffebd5a1f871b86507d0c1b3946b32993d76365 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165106 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-21Related: tdf#160056 this can be staticCaolán McNamara
Change-Id: I1172854a1bf00e74adbe350c54e4e98ea38b0b35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165072 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-21Drop C/C++ DEBUG macroStephan Bergmann
...(that was defined iff OSL_DEBUG_LEVEL >= 2) and replace its uses with OSL_DEBUG_LEVEL directly Change-Id: I807c15a02cc8ced9852287df0afb4808761d19d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165067 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-03-19ITEM: Move TotalCount to WhichRangesContainerArmin Le Grand (allotropia)
Change-Id: I2ab1cd2d0be81b15b4701581093b696aaac2846c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164979 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-03-15Related: tdf#160056 IniLnge is immutableCaolán McNamara
no lock needed here Change-Id: I00461d44f78e9776568492fccb7dee0e9869944e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164848 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-14cool#8443 let Insert Chart dialog to undo out of order on CancelMike Kaganski
Change-Id: I66d749362c9fb5f2c228f0f5d2c927cc0cf3f89f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164179 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-14Related: tdf#160056 pass 'StarFormat' flag in instead of changing stateCaolán McNamara
towards making these immutable Change-Id: I9f9ac17828018525194c34eadda66bbf863fd2f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164795 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-13These methods can be const tooCaolán McNamara
Change-Id: Iaef46216dac6584f57b7933d658384f54d0a4544 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164772 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-13SvNumberFormatter::GetUserDefColor can be constCaolán McNamara
Change-Id: If499e28e5ac69018b35b475a73ecb2dc4b78dad6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164786 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-13SvNumberformat::ImpGetLogicalOutput can be constCaolán McNamara
Change-Id: I847e5de84f0636b5a169f383e319a6b8707cc31f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164773 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-13SvNumberformat::ImpGetFractionOfSecondString can be constCaolán McNamara
Change-Id: If7a31f8b3667d9a6b8719553567211071bd2d631 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164774 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-13ImpIsEntry can be constCaolán McNamara
Change-Id: Id229344a68925a1bde84f2b4aad46cfc5f01b797 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164769 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-11tdf#114441 use sal_uInt32 instead of sal_uLongKeldin Maldonado (KNM)
sal_uLong to sal_uInt32 for the clipboard format. Clipboard enum class uses sal_uInt32, so staying consistent with that. Clipboard format doesn't exceed unsigned 32-bit int. Change-Id: I1938f9ba877fc89c51415d9715a82e9b0c09d4e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164604 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-03-08tdf#158773 reduce size of IndexedStyleSheetsNoel Grandin
we don't need to store SfxStyleFamily::All in the mStyleSheetsByFamily array, the call sites just iterate over the main vector for that case. Change-Id: I17fca2aa59e786d6dee13c884dedb9fde847b979 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-08tdf#158773 reduce cost of stylesheet lookupNoel Grandin
we can store pointers styleSheetsByFamily and avoid having to access the vector Change-Id: I36b5df981b6e53d9aa4193de419fc6a44f0ed2da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164573 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-08tdf#158773 GetNumberOfStyleSheets can be an inline methodNoel Grandin
Change-Id: I24a013d74bf8f9336496232d585ac1f0b069696c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164572 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-08tdf#158773 flatten data of IndexedStyleSheetsNoel Grandin
we can store the mStyleSheetPositionsByFamily inline, since it is fixed size, and save some allocation overhead, and some pointer chasing. Change-Id: Id6ff02491e967b9fb145ba9752f4a52173692645 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164558 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-08use more string_viewNoel Grandin
found by tweaking the stringview loplugin Change-Id: I92203ba99642bef7951ffa146184c5562cb31d09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-07tdf#158773 reduce time spent in IndexedStyleSheets::ReindexNoel Grandin
no need to de-allocate and then re-allocate the vectors inside mStyleSheetPositionsByFamily Change-Id: I3ad10173d9f3ba252619667afe13250045c943c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164529 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-07tdf#158773 reduce dynamic_cast'ing in TextProperties::NotifyNoel Grandin
Change-Id: If4a68433c57fdf3da56891fa0b4be6f8a991d929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164528 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-07ResetDefaultSystemCurrency can be privateCaolán McNamara
only called by a friend from the same .so Change-Id: I5f63e83325b291b95b0132089dc331f3b7e79362 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164538 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-07IsSpecialStandardFormat can be private, only used internallyCaolán McNamara
and rename to ImpIsSpecialStandardFormat Change-Id: Ie20c83906559f94e545f384807396ec8acf970f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164537 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-01scope of MutexGuard can be reducedCaolán McNamara
These are just locals, except for IniLnge which is set once in the ctor and is then immutable Change-Id: I0d8ac0c3ca729003a3575dea39b2746dfc53b4bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164173 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-29use member init listCaolán McNamara
Change-Id: I09dea90e3e3f3fd0a4047b989329a027f788f695 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164148 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-29if we rearrange, we don't need to create maLanguageTag twiceCaolán McNamara
Change-Id: I2c8ad9999adc406dc850c59b48e49681099dc054 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-29SvNumberFormatter::ImpConstruct is only used once by the single ctorCaolán McNamara
so fold it into the ctor Change-Id: If063143ef47a8ab293edf3896fb51079d0e0284f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164144 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>