summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)Author
2023-07-22SfxItemSetHint is deadNoel Grandin
since commit 519876dffdc8c93710af543cc11332dab9a50c14 Author: Mike Kaganski <mike.kaganski@collabora.com> Date: Tue Jul 18 23:45:47 2023 +0300 Cleanup SfxApplication::Get/SetOptions, and drop unused SIDs Change-Id: I8d306bf6792630cfdaa0a0ac8b77730e1e1f0070 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-19Cleanup SfxApplication::Get/SetOptions, and drop unused SIDsMike Kaganski
The removed stuff was never used elsewhere; e.g. all uses of GetOptions use Which Ranges that don't include the removed identifiers. Elements removed from SetOptions weren't passed to that function from anywhere. Change-Id: Id81b57014b82f89538a46a609f3e4b328864bbcf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154604 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-17Simplify a bitMike Kaganski
Change-Id: I20e7c1082687d780eded364f2620dd0dcbe831ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154532 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-16SfxAllEnumItem::GetTextCount should return sal_uInt16Mike Kaganski
To be consistent with its other methods (Get/SetTextByPos), taking sal_uInt16 Change-Id: I1c6e7c9fcb8bb6bf57d4ed4481240e0c7b606049 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154460 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-05SvtCJKOptions::EOption is unusedNoel Grandin
ever since commit 5db72ef0b381671b7867bda759098a92909e06d8 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Mon Jul 26 13:51:57 2021 +0200 drop SvtLanguageOptions class Change-Id: I2d56b0c21510239ef1ee1d0b95748641d485580c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154053 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-30Drop SfxStyleSheetBasePool::SetParentMaxim Monastirsky
Use SfxStyleSheetBase::SetParent directly instead. The base class was just calling it anyway, while the SwDocStyleSheetPool override was mostly a copy & paste of its override in SwDocStyleSheet. Change-Id: I18d8208ed2d079e0f2ce4f13a5dbdda6fe4730e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153773 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2023-06-29loplugin:unusedmethodsNoel Grandin
Change-Id: I95ab7581dec35b113cb657ce8e5ee27c89c73593 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153746 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-28Simplify SvxSearchItem::PutValue a bitMike Kaganski
Change-Id: I2cbc5dce800b773e6c20cb3ea6f0e520a3f69db9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153688 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-28Drop i18nutil::SearchOptionsMike Kaganski
It was mostly unused by now, only remained in a couple of function arguments, where callers actually passed SearchOptions2, and where internally it was converted back to SearchOptions2. Change-Id: Ib188ec3bf0de6d1f70a04eb90fb3a577df8b3d98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153687 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-27loplugin:stringstatic look for more stringsNoel Grandin
that can be initialised at compile-time instead of runtime Change-Id: I08d516fdc13a3a79f93c079f89ac44cbc7a1ed71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-26new loplugin:constexprliteralNoel Grandin
OUStringLiteral should be declared constexpr, to enforce that it is initialised at compile-time and not runtime. This seems to make a different at least on Visual Studio Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-21Require icu-i18n >= 66Khaled Hosny
We were requiring ICU 4.6 which was released in 2011, and ifdef'ing our way through newer ICU versions. ICU is a core dependency and it makes no sense to build LibreOffice with such ancient versions of it. This change requires ICU 66 (released in 2020), and removes all the ifdefs for older versions. There are more cleanups to do, but these will be done separately. Change-Id: I2e4f7608a08f4d531b0a4c74bbfdf91a451f833f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153387 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-06-21svl: Use DateTime::Sub() instead of operator-()Eike Rathke
Change-Id: I036798013404df4bcfb988d4f231fcf30cec3162 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153382 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2023-06-18Use getXWeak in svlMike Kaganski
Change-Id: Ia000bf4afa60a4e5bf1469fef7a611ab07e73331 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150872 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-16tdf#103064 sw,editeng: make para styles work inside commentsMaxim Monastirsky
- Style objects for comments are stored in a dedicated stylesheet pool, and constantly updated from the "real" styles using modification broadcasts. In theory, it should be possible to use same objects for both Writer core and EditEngine, as they use separate item ranges. But unfortunately SwDocStyleSheetPool isn't really a styles container, but just a wrapper around Writer's core styles, with a single mxStyleSheet member that is filled each time with data from different styles (while EditEngine expects different styles to be represented by different objects). - EditEngine switched to allow duplicate listeners for styles - one per paragraph. The use case is 2 paragraphs of the same style, and then one of them is switched to another style. In that case we still need to keep listening to the former style for the other paragraph. There is probably some opportunity for optimization, but it should be good enough for now. - Copying formatted text from document's body doesn't preserve style assignment for now. The editeng RTF import should be tweaked to not insert styles into our "special" stylesheet pool (or somehow forward them to Writer's core style handling) before we can enable this part. Change-Id: Ib67c5388f9cd078c73ec0d453017f815843161ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153156 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2023-06-11use internal iterator for SfxBroadcasterNoel Grandin
So we can avoid exposing the internal listener vector. (which allows further optimisations) Change-Id: If288141a37314dcc01d203029dc51c71ec2b7f54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-10ofz#59696 AbrtCaolán McNamara
Change-Id: I4cf6043f55a7aae23b6a801dd41b0912b68e1d3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152836 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-07tdf#155376 partially convert SvCTLOptions to officecfgNoel Grandin
When accessibility is enabled, Calc will add tens of thousands of listeners. We then spend a significant chunk of time creating SvCTLOptions objects (attached to ImpEditEngine) and adding and removing those objects from the related listener lists. But the required information is already globally cached by the officecfg module, so we can avoid that overhead and just fetch it directly from officecfg. Change-Id: I7ff55fd7c4926866eb7086812275ba8bd6e84c75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152645 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-02tdf#145538,tdf#147021: qa: range based loopsDr. David Alan Gilbert
A bunch of range based loop changes in various qa sections that also take out about 1% of SAL_N_ELEMENTS Change-Id: I8ef000e9aa400cd8363b48f6175f6ab258cefbd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152422 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-06-01sw doc model xml dump: show address of SfxBoolItemsMiklos Vajna
I want to know when a relevant keep-with-next pool item is read, but there are many of them, so seeing the pointer address is helpful. Change-Id: I5ff7654430a41eaea6c7b0cf722e34256cdd4d3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152480 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-05-31do not throw DisposedException when inside a dispose() methodNoel Grandin
There is no need to do this, as the documentation of css.lang.XComponent::dispose at udkapi/com/sun/star/lang/XComponent.idl states: After this method has been called, the object should behave as passive as possible, thus it should ignore all calls Otherwise, the effect of throwing here is mostly to disturb the flow of logic in caller code, preventing other parts of teardown from proceeding smoothly. Change-Id: I30e6d1b35f85b727debf4405a995fdc0a4fccde6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152450 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-27Fix typoAndrea Gelmini
Change-Id: I99ef22d0062b3e9573abd3c60078e72472681c32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152339 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-05-26tdf#150028 Treat decimal separator after [SS]Laurent Balland
Only decimal separator after S or SS was treated This change adds [S] and [SS] to treat formats like [SS].00 Update: correct export to XML Add QA unit tests Change-Id: I97ce4084d3caab2fcd18f1c70cd4221596290563 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151823 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2023-05-04Resolves: tdf#134308 if max undo is 0, treat as if no undoCaolán McNamara
Change-Id: I7eaa71d80718a4350ba6a3d7ff19ce09e1ac3aa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151354 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-05-03Fix typoAndrea Gelmini
Change-Id: If92643e3e8aad5a3367b9ee20afa5a1fef7ee8ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151317 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-05-03tdf#145925: Support AutoCapitalize in DOI recognitionBaole Fang
Sometimes, the first character of the doi string is auto capitalized, which isn't recognized as DOI. Now, the doi detection is able to recognize doi string with the first character capitalized, like what is done in url recognition. Change-Id: I95334941dc4cda3095f1750fea927640dea55e23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151142 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-27tdf#145925: Add DOI recognitionBaole Fang
Detect DOI string in the form of "doi:10.*" and add hyperlink to it. It works the same way as url recognition. Change-Id: I3c4e78a110fd81ad7e727d5e9acee7e51127466a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150954 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-21loplugin:unnecessarygetstr extend to checking std::string::c_strNoel Grandin
Change-Id: I17398e2a6a31a2c98ba8e54b5c8045f22aee8759 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150749 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-06tdf#153887 Fraction number format: avoid 0/0Laurent Balland
If round value is an integer and there is no integer part in the number format, then nDiv was wrongly forced to 0. Add corresponding unit tests. Change-Id: Ib69393eca8f6c2bdda0eacfc83637ab0c971ff2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149118 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2023-03-30loplugin:stringadd in starmath..svlNoel Grandin
when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: Id8f229c3a5223dee8d2710caf15d4612594fc763 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149748 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-23rtl::Static to thread-safe-staticNoel Grandin
Change-Id: Ife02e6d2be3ebfbb08522ab0183ef4aa31a99e19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-18loplugin:stringadd use more O[U]StringCharNoel Grandin
Change-Id: I196e4539ad430a39415eff9d7170b33df7228230 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149062 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-15tdf#117037: svl_qa_cppunit: Add unittestXisco Fauli
Change-Id: I707f1a5402189a2453f5d11beb4e1c493699e28b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148909 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-03-14tdf#117037 - Support Unicode minus (0x2212) in the number scannerAndreas Heinisch
Change-Id: I5b2cd4f3d6ac23e10dc0745819c7955d0a8ff170 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148432 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2023-03-14elide some temporary OStringsNoel Grandin
where we can pass a string_view into OStringToOUString Change-Id: If7803ba49aa15f6e9c7bd386d32fb84003155390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148844 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-14svl: fix CppunitTest_desktop_lib's DesktopLOKTest::testSignDocument_PEM_PDFMiklos Vajna
The problem was that this test passed when the entire suite was running, but not as an individual test. Digging deeper, this didn't pass in isolation because the test loads a private key into memory (which is not in the NSS DB) and since commit 5592ee094ca9f09bfcc16537d931518d4e6b2231 (svl: fix testSignDocument_PEM_PDF with "dbm:" NSS DB, 2022-04-28) we delete that in-memory key as a workaround for the NSS dbm -> sqlite transition. Fix the problem by not deleting the in-memory private key in the LOK case: this makes the test (operating in a stateless mode, with in-memory keys) pass again and keeps the desktop signing (working with the NSS DB) working. I noticed this test failure as a local test update of libxmlsec to 1.3 RC started to fail here even when the whole suite was running, but looks like this was working by accident before anyway, and the fix doesn't hurt for libxmlsec 1.2, either. Change-Id: Id365ddc5c5d04d538609f444c0e3c4ab4b32a6fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148817 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-13make more use of OUStringBuffer::append(OUStringConcat)Noel Grandin
where we can avoid constructing temporary OUStrings Change-Id: I0eacd68a8d1b450894c2ea769055f16886b78ad0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148780 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-13Introduce OUStringBuffer::insert taking OUStringConcatMike Kaganski
Avoids some (re)allocations, and aligns with already existing append Change-Id: I536ba50f56fc560c0f6e8c0a8b65bd4248896a8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148777 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-10improve loplugin:unnecessarylockingNoel Grandin
to find more locking we can remove Change-Id: Ief7bc5ec2a1ff31f22a0ad366910b7fcc4725818 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148599 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-28no need to allocate Date separately in ImpSvNumberInputScanNoel Grandin
it is only one pointer big Change-Id: I8b0b7ea0cf69cecabc2ddfb7e5d134037221057c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147946 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-25refactor DocPosUpdate, part 2Bjoern Michaelsen
- separate the message send from the field manager to the fields containing no start index from those send from the field to the frames containing an index - use member functions where possible: SwFieldType, SwFormatField, SwTextNode Change-Id: I488e4003b75bf7b0ae700f39e2364d6e34a8bbfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147490 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-02-23Extend loplugin:cppunitassertequals to more argument typesStephan Bergmann
Change-Id: Ic2990ebc2e4a9a36dcd3f90c5f634ca7dd225d52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147491 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-18osl::Mutex->std::mutex in SysCredentialsConfigItemNoel Grandin
Change-Id: If1e938381917bf2d538ca663961782430e7cbf77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147230 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-18osl::Mutex->std::mutex in SysCredentialsConfigNoel Grandin
Change-Id: I5072236c14ce57ecb9fda552b7539a640d2d8836 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-17osl::Mutex->std::mutex in PasswordContainerNoel Grandin
Change-Id: I94113d714417447d5664a08d45fe1ad8dc0fb5e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147198 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-16Drop 'using namespace ::std' in dirs s*Gabor Kelemen
Change-Id: If3119a1f2274aac0bf70576458e3adb4505a2a45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147076 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-02-16osl::Mutex->std::mutex in FSStorageNoel Grandin
Change-Id: I62980bec76425980804368ba009ffaeb6bef800a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147104 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-15clean up SwRefMarkFieldUpdate a bitBjoern Michaelsen
- remove SwRefMarkFieldUpdate: * it has only one unused field * replace with a plain SwPtrMsgPoolItem - hint constness: * SwUndoFieldFromDoc: make ctor arg hint const * DocumentFieldsManager: make UpdateField arg hint const * however, seeing this hint is: a/ constructed on the stack, but b/ stored as pointer in undo likely it would be best to remove it altogether. For now, make it at least static, so that there is no use after free. Change-Id: Ica51a2a2ce19e1938c3a367e9b4a9e01bbb75374 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147030 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-02-15osl::Mutex->std::mutex in LockFileCommonNoel Grandin
Change-Id: I729b7ecf8280c67e4698b174a6151d1eda41be60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147040 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-03tdf#153023 Disable Thousand separator for NatNum12Laurent Balland
Add some helper to get NatNum12 state Modify both Number format dialog and Sidebar Transform CAT_ defines in enum Change-Id: Iaa3127bf07223caac60e409306a1bee2edc37428 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145513 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>