summaryrefslogtreecommitdiff
path: root/sw/source/core/edit/edfcol.cxx
AgeCommit message (Collapse)AuthorFilesLines
2024-01-27Drop std::as_const from css::uno::Sequence iterationsMike Kaganski1-2/+2
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-28Use emplace_back instead of push_back (sw)Julien Nabet1-18/+18
Change-Id: I0a7f70ca0e5cc022425bee3661495cf1104f6521 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161384 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-20c++20: use std::erase(_if) instead of std::remove(_if)+erase (sw)Julien Nabet1-4/+2
Change-Id: I67c231441b56f05da001beab5b893bc6a6a6a392 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159704 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-10-20Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: swStephan Bergmann1-17/+17
Change-Id: I85fff7ed6932c5fc196e18f24fa01074ba4837e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158241 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-09-17remove unnecessary dynamic_cast around SwXTextNoel Grandin1-4/+4
Unusually, we cannot use rtl::Reference to hold SwXText, because rtl::Reference assumes that its pointee is a subclass of OWeakObject, which SwXText is not (and we cannot make it so because the UNO bridge does not support virtual base classes). So we have to use css::uno::Reference<SwXText> and carve out an exception in loplugin:refcounting. Change-Id: If3a1307e30fdcd3b47aa665252be081fb5063400 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156982 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-26tdf#156368: Fix setting watermark font for CJK/CTL textKhaled Hosny1-0/+2
We were setting only Western font when getting the shape, so if there is no Western characters in the text the default font would be used. There is no separate setting for CJK/CTL fonts, so we sets the same font for all the three. Change-Id: If2ba2a206f95e0efe9139b9d092b1d6dbf05967c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154894 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-06-26new loplugin:constexprliteralNoel Grandin1-1/+1
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-05-18improved B2DHomMatrixNoel Grandin1-6/+7
since we know that this is a matrix only used for 2D transforms, we know that the last row of the matrix is always { 0, 0, 1 }. Therefore, we don't need to store that information, and we can simplify some of the computations. Also remove operations like operator+ which are not legal for such a matrix. Change-Id: I482de9a45ebbedf79e3b6033575aab590e61c2d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151909 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-12-22check GetEditShell()Caolán McNamara1-4/+6
Change-Id: I975c7dca9ea569e326fc5d8670a078959ab9f093 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144761 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-16check SfxObjectShell::Current()Caolán McNamara1-4/+12
SfxObjectShell::Current() can return null, it's based on the equally vile SfxViewFrame::Current() Change-Id: Ia5c7783680e9d8e5d3075078f16a2c15cb6f7a47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144339 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-11Deduplicate O(U)StringConcatenationMike Kaganski1-1/+1
And use an overloaded helper function with a better (?) unified name to show that the result is not an O(U)String. Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-09-28use more SwPosition::AssignNoel Grandin1-2/+2
part of the process of hiding the internals of SwPosition Change-Id: I1157df373fd1462dc44b3828ec4de667fcdc02bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140672 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-23sw: enable Replace with Protect BookmarksMichael Stahl1-1/+1
The dialog calls Replace on the whole bookmark, and with commit 7974cea6c788e02d7c36573e2d10dcc51884f70e the bookmark is preserved, so the HasReadonlySel() should not prevent this replace from happening. Change-Id: I823b042c8327c6716b2ac1a8a86beffd887e6e4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138693 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann1-1/+1
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-17convert more nNode to SwPosition::GetNodeNoel Grandin1-1/+1
in places where we are using the result with operator== Change-Id: I28f8f6fa2c3754ec6612ab2334c3a58b61ecd065 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138401 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-14rename SwPaM::GetContentNode to GetPointContentNode/GetMarkContentNodeNoel Grandin1-1/+1
Using a parameter to select point/mark makes the code much harder to read Change-Id: Ic24098a6045ff2262d4c808228ded7bf8206fe8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138085 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-06make GetParaPropsNode take a SwNode, not an SwNodeIndexNoel Grandin1-1/+1
as part of the process of hiding the internals of SwPosition Change-Id: Idefc1cd390c551bf7b54ee122c7fc7e4feb8f45d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-04clang-tidy modernize-pass-by-value in swNoel Grandin1-4/+4
Change-Id: Ie5c250c64f95e649d33d3f3da7b54e81a4b81d0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137781 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-02introduce SwPosition::GetContentIndexNoel Grandin1-2/+2
as part of the process of hiding the internals of SwPosition largely done by doing: git grep -lF 'nContent.GetIndex' | xargs perl -pi -e 's/\bnContent\.GetIndex/GetContentIndex/g' Change-Id: I12684071a6666c365dbadbab2a4b37cf51b274d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137695 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-02introduce SwPosition::GetNodeNoel Grandin1-9/+9
as part of the process of hiding the internals of SwPosition largely done by doing: git grep -lF 'nNode.GetNode' | xargs perl -pi -e 's/nNode\.GetNode/GetNode/g' Change-Id: Id1937df1bd5a54677c2c1bbfb2d693a4e22a7b98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137671 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-22elide some makeStringAndClear() callsNoel Grandin1-1/+1
Change-Id: I58541cc3e0ec45a2f8127e1e14f4912a1295c740 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137312 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-21tdf#119840 don't load redlines in lcl_FindParagraphClassificationFieldNoel Grandin1-10/+12
we don't need them here. Shaves 10% off load time Change-Id: I38050c131af24bf0cc7cadb71d0d4d9fa7a5a9f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137290 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-21use more concrete UNO classes in writerNoel Grandin1-13/+11
as opposed to opaque UNO interfaces. This is a prelude which enables performance work because now I can regular C++ method Change-Id: I9bcfdca1000b4439431c9ea3b17bed081d80f0b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-30tdf#tdf#93747 tdf#145151 sw IsTableMode: revert obsolete one-offsJustin Luth1-4/+0
I started playing whack-a-mole, patching functions for excessively selected cells. But now bug 145151 has fixed the selection process itself, so these avoidance clauses are now obsolete, so revert these 7.3 or 7.4 fixes. This keeps the unit tests in make CppunitTest_sw_uiwriter5 Change-Id: Ie7848b483d495d79c046b9f4293b605d2edea658 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136578 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-06-22tdf#134759 sw: do CopyToModify() for both start and end nodeMichael Stahl1-15/+0
... in SwNodes::MoveRange(). SwRangeRedline::Hide() does CopyToSection()/DelCopyOfSection() so the previous commit fixed it, and SwRangeRedline::Show() does MoveFromSection() so hopefully this should fix it to restore the situation before hiding. This caused several tests to fail, and the reason appears to be that they pretty much tested exactly the problem that's being fixed with this commit, but the pre-existing fixes and the new one cancel each other out. In all cases the pre-exising fix moves all redlines and moves them back again, which is the sort of thing that sw_redlinehide wanted to get rid of; not sure why i didn't notice this earlier. The check for the 3rd paragraph where the style was applied still succeeds with the new bugfix, but the one for the 1st paragraph fails; it is unclear why applying a style to the 3rd paragraph should have an effect on the 1st one. Hence: Revert code changes of commit 1d65ffc5a37be21e0316019b1c96eb9a1c871ac0 "tdf#105413 track changes: keep paragraph styles" Revert code changes of commit d97fc64a819f834302e384792668507df4cc412c "tdf#122893 track changes: keep paragraph alignment" Revert code changes of commit 6a54dd844d1821165642bbcc16bd12a01a23393d "tdf#122901 track changes: keep paragraph top and bottom borders" Change-Id: I0b70134902a7993c7bb11a3c619e45742764c8ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136056 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-05-06remove unnecessary sequenceToContainerNoel Grandin1-3/+2
If we are not going to manipulate the resulting vector, then it is actually slower, since we have to allocate more storage for the vector Change-Id: I65677007d105f4783603df74113ebed6db0b551b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133963 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03Just use Any ctor instead of makeAny in swStephan Bergmann1-35/+35
Change-Id: I2c9023ba8d07314d23ae7a65e670e8748c5e9322 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133766 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-28Recheck sw/ cxx files with IWYUGabor Kelemen1-2/+0
See tdf#42949 for motivation Change-Id: I8a8df68946297fad517b753d73e4373203a45ed6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132150 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-03use SfxItemSet::GetItemIfSet in sw/source/core/firldsNoel Grandin1-7/+5
Change-Id: I25d46d8435b8a95ac8809b9f67a6c3a9b14dd26e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130878 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-15tdf#93747 sw IsTableMode setStyle: don't affect unselected cellsJustin Luth1-0/+3
Change-Id: I88fcb97adbe790f1c2de469195818d7e27bcc41f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123651 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2021-10-03A more lightweight O[U]StringConcatenationStephan Bergmann1-1/+1
...compared to a full-blown O[U]String, for temporary objects holding an O[U]StringConcat result that can then be used as a std::[u16]string_view. It's instructive to see how some invocations of operator ==, operator !=, and O[U]StringBuffer::insert with an O[U]StringConcat argument required implicit materialization of an O[U]String temporary, and how that expensive operation has now been made explicit with the explicit O[U]StringConcatenation ctor. (The additional operator == and operator != overloads are necessary because the overloads taking two std::[u16]string_view parameters wouldn't even be found here with ADL. And the OUString-related ones would cause ambiguities in at least sal/qa/rtl/strings/test_oustring_stringliterals.cxx built with RTL_STRING_UNITTEST, so have simply been disabled for that special test-code case.) Change-Id: Id29799fa8da21a09ff9794cbc7cc9b366e6803b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122890 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-27tdf#144272 sw: track change of paragraph styleLászló Németh1-0/+38
Modifying style of a paragraph, e.g. from "Standard" or "Text body" to "Heading n" styles wasn't recorded by change tracking. Now it's possible to track and reject these changes also after DOCX export/import. Note: ODF track changes doesn't support format-only changes, so likely it will need to export the paragraph content two times, with the old and with the new paragraph styles, too). Note: selecting multiple paragraphs to modify their styles at once doesn't record the changes, yet, because multi-paragraph ParagraphFormat redline range hasn't supported by AppendRedline(). Change-Id: I2d81fa23c59b7b75b3101dc3f2bb8c9eed8ab165 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122707 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2021-08-20New loplugin:unusedcapturedefaultStephan Bergmann1-1/+1
In sc/qa/unit/ucalc_formula.cxx, dropping the capture-default from the lExpectedinF lambda revealed that MSVC in C++17 mode (i.e., when building without --with-latest-c++) requires ROW_RANGE (a local const int variable from the enclosing TestFormula::testTdf97369) to be captured, even though all uses of that variable within the lambda body are constant expressions. That is still true at least for the latest Visual Studio 2019 version 16.11.1. (This is not an issue for the lExpectedinH and lExpectedinI lambdas a few lines further down, as they, in addition to using that ROW_RANGE, also use the local const double variables SHIFT1 and SHIFT2, whose uses are not constant expressions, so they are implicitly captured and loplugin:unusedcapturedefault does not suggest dropping those lambdas' capture-defaults in the first place.) Change-Id: Iee7efb485187cbe8eba6a2d470afca4993eb1816 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120693 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-02convert #defines to OUStringLiteralNoel Grandin1-1/+1
mostly by doing $ git grep -l '#define.*\"' -- *.cxx | xargs perl -pi -e 's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 = u\2;/g' Change-Id: I140932a94914d3870f0d92e11a6ada2b42359e30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119842 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-12Fix broken TOX in Online.Gülşah Köse1-10/+0
1. Open a German file in the Online 2. Insert a new paragraph, and change its style to "Ueberschrift 1" 3. Go to the Table of Content, and choose "Update Index" 4. See the index got destroyed, and when you look at the list of styles, the "Ueberschrift 1" has disappeared, and "Heading 1" appeared instead. This reverts part of: commit ca435be45f316120b9df6c9d547b781ed975817d writer: handle styles in multiple languages for online Change-Id: I82e46b3cf7824df6efdbb4b2a16716153ddae0df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114683 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115273 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2021-03-25const OUString -> const OUStringLiteralMike Kaganski1-1/+1
Mostly automated rewrite Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-19cid#1473777 silence Using invalid iteratorCaolán McNamara1-2/+4
Change-Id: I6fd80c8b5cec6d1d9c398e45cbd30cc65caa23a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112749 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-03xmlsecurity: improve handling of multiple certificates per X509DataMichael Stahl1-2/+2
It turns out that an X509Data element can contain an arbitrary number of each of its child elements. How exactly certificates of an issuer chain may or should be distributed across multiple X509Data elements isn't terribly obvious. One thing that is clear is that any element that refers to or contains one particular certificate has to be a child of the same X509Data element, although in no particular order, so try to match the 2 such elements that the parser supports in XSecController::setX509Data(). Presumably the only way it makes sense to have multiple signing certificates is if they all contain the same key but are signed by different CAs. This case isn't handled currently; CheckX509Data() will complain there's not a single chain and validation of the certificates will fail. Change-Id: I9633a980b0c18d58dfce24fc59396a833498a77d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111500 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-03xmlsecurity: improve handling of multiple X509Data elementsMichael Stahl1-1/+2
Combine everything related to a certificate in a new struct X509Data. The CertDigest is not actually written in the X509Data element but in xades:Cert, so try to find the matching entry in XSecController::setX509CertDigest(). There was a confusing interaction with PGP signatures, where ouGpgKeyID was used for import, but export wrote the value from ouCertDigest instead - this needed fixing. The main point of this is enforcing a constraint from xmldsig-core 4.5.4: All certificates appearing in an X509Data element MUST relate to the validation key by either containing it or being part of a certification chain that terminates in a certificate containing the validation key. Change-Id: I5254aa393f8e7172da59709923e4bbcd625ec713 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111254 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann1-1/+1
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel1-8/+8
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-12New loplugin:stringviewparamStephan Bergmann1-2/+6
...to "Find functions that take rtl::O[U]String parameters that can be generalized to take std::[u16]string_view instead." (Which in turn can avoid costly O[U]String constructions, see e.g. loplugin:stringview and subView.) Some of those functions' call sites, passing plain char string literals, needed to be adapted when converting them. Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-05SwUndoParagraphSigning never passed null SwDoc*Caolán McNamara1-16/+16
ditto: SwUndoFrameFormatCreate ctor SwUndoCharFormatCreate ctor SwUndoCondTextFormatCollCreate ctor SwUndoTextFormatCollCreate ctor SwUndoFormatCreate ctor SwUndoFrameFormatDelete ctor SwUndoCharFormatDelete ctor SwUndoTextFormatCollDelete ctor SwUndoCondTextFormatCollDelete ctor SwUndoFormatDelete ctor SwUndoRenameCharFormat ctor SwUndoRenameFormatColl ctor SwUndoRenameFrameFormat ctor SwUndoNumruleRename ctor SwUndoNumruleDelete ctor SwUndoNumruleCreate ctor SwUndoInsNum ctor Change-Id: I71805bf3f13235c91e9d4746e2ca0a4e4804824c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103964 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-05SwEditShell::SignParagraph always dereferences GetDoc()Caolán McNamara1-4/+5
Change-Id: I4f45db8fdab7679de0f7eacf8f14a24539ae0d5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103963 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-05lcl_ValidateParagraphSignatures always dereferences its SwDoc* argCaolán McNamara1-21/+21
ditto: lcl_DoUpdateParagraphSignatureField lcl_UpdateParagraphSignatureField Change-Id: Ic579ff9116da1031922ee7aa77d3a8f6a659f61e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103962 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-30SwNode::GetDoc can return a reference insteadCaolán McNamara1-4/+4
and remove discovered redundant null checks Change-Id: I6b8bc9593434f38947e399a48888a8fa0d4f7e77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103640 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-22OUStringLiteral/OStringLiteral coverity PARSE_ERROR workaroundCaolán McNamara1-15/+15
do more like commit 121771e37f7e2de41cd5643475861062bf25627b Date: Mon Sep 21 09:17:54 2020 +0200 Make some OUStringLiteral vars constexpr cause coverity can live with that Change-Id: I9efd7f848289c4865997a44c6780373068422227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-18writer: handle styles in multiple languages for onlineSzymon Kłos1-0/+13
Use translated name when style is applied and broadcasted. Avoid using style names created by the first view. Change-Id: I18abf3388e69f76ec99eda94e0b67782a52ab23f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101831 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102962 Tested-by: Jenkins Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2020-08-28Change OUStringLiteral from char[] to char16_t[]Stephan Bergmann1-15/+15
This is a prerequisite for making conversion from OUStringLiteral to OUString more efficient at least for C++20 (by replacing its internals with a constexpr- generated sal_uString-compatible layout with a SAL_STRING_STATIC_FLAG refCount, conditionally for C++20 for now). For a configure-wise bare-bones build on Linux, size reported by `du -bs instdir` grew by 118792 bytes from 1155636636 to 1155755428. In most places just a u"..." string literal prefix had to be added. In some places char const a[] = "..."; variables have been changed to char16_t, and a few places required even further changes to code (which prompted the addition of include/o3tl/string_view.hxx helper function o3tl::equalsIgnoreAsciiCase and the additional OUString::createFromAscii overload). For all uses of macros expanding to string literals, the relevant uses have been rewritten as u"" MACRO instead of changing the macro definitions. It should be possible to change at least some of those macro definitions (and drop the u"" from their call sites) in follow-up commits. Change-Id: Iec4ef1a057d412d22443312d40c6a8a290dc6144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101483 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-13loplugin:stringstatic also look for local staticsNoel Grandin1-15/+15
Add some API to O*StringLiteral, to make it easier to use in some places that were using O*String Change-Id: I1fb93bd47ac2065c9220d509aad3f4320326d99e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>