summaryrefslogtreecommitdiff
path: root/svl
AgeCommit message (Collapse)Author
2021-04-13we don't want this dynamic_cast in release buildsNoel Grandin
so wrap it in NDEBUG Change-Id: I3f6edddf8a3a16dcd337153cd75624e548459dd3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114064 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-13avoid a few string allocationsNoel Grandin
by moving the buffer creation to only when we actually need it Change-Id: If5efefdc90452f0e98227f12cb1314732f785606 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114047 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-12make SfxItemPropertySimpleEntry constructor explicitNoel Grandin
Change-Id: I09d6045320b44746fbdb103db884c214e0509a78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114012 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-12less copying in SfxItemPropertyMap::getPropertyEntriesNoel Grandin
we can just expose the map now, and avoid copying all the properties Change-Id: Icb22975508582268dfa96e41eb98ac01e7f51317 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113982 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-12tdf#130326 flatten SfxItemPropertyMapNoel Grandin
which shaves 2% off load time here since we construct a boatload of these Change-Id: I7a57447026f3a1bd6a31f10adf15bee2d1d17c8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-12SfxItemPropertySimpleEntry constructor should take a referenceNoel Grandin
not a pointer Change-Id: I09e356d9230e2cf386349aad028a41548cb050ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113965 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-12update PCHsCaolán McNamara
Change-Id: Id3728ac0011d3deed7e56081e3a854c7fa5336f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113959 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-08update PCHsLuboš Luňák
Change-Id: Ia9d04447f927e270a55500e7f35723a729bc01dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113801 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein
Previously, all of the README files have been renamed to README.md and now, the contents of these files were changed to use Markdown format. Other than format inconsistency, some README.md files lacked information about modules, or were out of date. By using LibreOffice / OpenOffice wiki and other documentation websites, these files were updated. Now every README.md file has a title, and some description. The top-level README.md file is changed to add links to the modules. The result of processing the Markdown format README.md files can be seen at: https://docs.libreoffice.org/ Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-07rtl::Static -> function local staticNoel Grandin
Change-Id: I2071c27bdf074403ec24e67f9278ac27f9491303 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113698 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-06update pchesCaolán McNamara
Change-Id: I835c8fcc237ece5cf9d7a3b261645139d022e9b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113652 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-25tdf#140968 tdf#140978 XLSX import: fix lost rounded filtersBalazs Varga
if the stored filter values are in the visible cell format (e.g. rounded values) instead of the original (editing) values. Now AutoFilter popup window shows the items according to the visible cell format (e.g. 1.0 instead of 1.01 or 0.99), but still grouping them based on the "editing format" (e.g. not rounded values which visible during editing), i.e. there could be repeated values in the filtering conditions (e.g. two options "1.0" and "1.0" for 1.01 and 0.99). Note: Next step will be to group and filter based on the actual cell format, like MSO does, to simplify filtering of values rounded by the cell format (e.g. selecting the single AutoFilter condition "1.0" to filter both 1.01 and 0.99). Change-Id: I430da5e09794fc4ed8acf79b6485926f46b70277 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112343 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2021-03-25const OUString -> const OUStringLiteralMike Kaganski
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-24Using .md extension/Markdown syntax for modules READMEHossein
Renaming all README files for all top level modules to README.md, applying no content change at this stage to be able to track history of the files. These files should be edited to use correct Markdown syntax later. Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-03-21cid#1473798 silence Unchecked return value from libraryCaolán McNamara
Change-Id: I00174b5444749f3345f5691e24eb5219d1b47059 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112837 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-21update pchesCaolán McNamara
Change-Id: I60e61133c305673bb305e41957f5414820c7c358 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112790 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-19silence coverity unchecked return value from library on xmlText* functionsCaolán McNamara
Change-Id: I651abb00d8ae1bdbf758a6a0176fd8912531a585 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112753 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-15xls load: suppress secondary [~gengou] calendar modifier in format codeEike Rathke
ja-JP Gengou calendar is an implicit secondary calendar switched to and from by format codes. Change-Id: Iea268310ac5e917f2168fec0166754424baa925d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112511 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-03-15xls save: fix writing inline calendar modifiers as format code, don'tEike Rathke
E.g. ja-JP GGGE [~gregorian]YYYY saved as OOXML ended up as [$-411]ggge\ gregorianyyyy which when reloaded became GGGE GREGoRianYYYY displaying 令和3 R033Ro03ian2021 (whatever Xcl might have done with that). Change-Id: If8a7d5b837b69c32afacc7a8d7646fedc84ab87a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112510 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-03-13update pchesJulien Nabet
Change-Id: Id6dfae9fb97fbe3fc89b9f2e083d7a3d5c1d36d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112411 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-03-10Drop 'static_cast<cppu::OWeakObject*>' syntactic noiseMike Kaganski
... where the object is created in-place, and its type is known Change-Id: Ifabfcf2f3ad0d60152f14e8d970c1faa42115288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112256 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-09Make sal/config.h the first in pchMike Kaganski
By convention, it should be the first include in C/CXX files; so use of pch should not break that. Change-Id: Ic329c5f39e8f48ad1778724368e262e48972342b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112123 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-06update pchesJulien Nabet
Change-Id: Id892e426343746df2f01f4cdc5f470351bdb6a12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112099 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-03-06update pchesJulien Nabet
I just used ./bin/update_pch.sh Change-Id: I06a7f36eb4c511b8d6c6477fd87e57f0d9702457 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112097 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-03-03update pchesCaolán McNamara
Change-Id: Ide49c48738ecd537d4eb69390d22807561d3b4e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111828 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-03xmlsecurity: improve handling of multiple certificates per X509DataMichael Stahl
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 Stahl
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>
2021-02-26loplugin:refcounting in svlNoel
Change-Id: I0009464121faf6dd36793b031d892f492b56187c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111544 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-23update pchesCaolán McNamara
Change-Id: I44424081b7f55710c4db7f10d1829de1ae08be76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111363 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-20loplugin:refcounting in svlNoel
Change-Id: Iae192caa9d05f71ce02aae966ef1d71232d1a7b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111222 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-19update pchesCaolán McNamara
Change-Id: Ic4586057346b6de700c1bb6ff4cd759a11bb3e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111231 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-16loplugin:referencecasting in stoc..svtoolsNoel
Change-Id: I806ffb3ab06731c61fe9c58788aabf00a05e980f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110987 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-08update pchesCaolán McNamara
Change-Id: Icf55ddda055d11b649e7607c2cdd8b6d6ddfefbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110483 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-08Improve loplugin:cppunitassertequal for CPPUNIT_ASSERT(a && b)Stephan Bergmann
...by re-enabling the code temporarily #if'ed-out in a528392e71bc70136021be4e3d83732fccbb885e "Fixed/improved loplugin:cppunitassertequals" (and which then triggers lots of other lopglugin:cppunitassertequal CPPUNIT_ASSERT -> CPPUNIT_ASSERT_EQUAL warnings). For two css::uno::Reference equality comparisons in cppu/qa/test_any.cxx, it was more straightforward to rewrite them with an explicit call to operator == (which silences loplugin:cppunitassertequal) than to adapt them to CPPUNIT_ASSERT_EQUAL's requirement for arguments of identical types. In sc/qa/unit/ucalc_pivottable.cxx, ScDPItemData needs toString, which has been implemented trivially for now, but might want to combine that with the DEBUG_PIVOT_TABLE-only ScDPItemData::Dump. Change-Id: Iae6d09cf69bd4e52fe4411bba9e50c48e696291c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110546 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-29loplugin:stringviewparam extend to new..Noel
O[U]StringBuffer methods Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-28simplify code, use more subView()Noel
Change-Id: I569c7f34acbdf8451cd5c9acf1abd334637072d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110051 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-28add string_view variants of methods to O[U]StringBufferNoel
and update the stringview loplugin to detect cases where we can use these new methods. Change-Id: I998efe02e35c8efcb3abfb4d7186165bbe6dfb2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110046 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-27Improve loplugin:stringliteralvarStephan Bergmann
...to also consider O[U]String ctors taking pointer and length Change-Id: Iea5041634bfbf5054a1317701e30b56f72e940fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110025 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-27tdf#92456 store hash with stringNoel Grandin
so it does not need re-computing when comparing keys. shave 5% off time for this bug. Change-Id: I48870567be00f0ea98cad69e9c48222cd64decf2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109992 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-25tdf#92456 improve VLOOKUP perfNoel Grandin
shave 5% of the time here - ref-counting triggered by copying svl::SharedString is significant, so return by const& instead of by value Change-Id: Ic702632da45d75dddab33d6ce1e6f1097ff70de9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109900 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-12tdf#42982: Improve UNO API error reportingBayram Çiçek
Change-Id: I78c6fed4e94f1ebfc772db4dec9955da7230bc3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109071 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-01-10fix coverity parse errorsCaolán McNamara
Change-Id: I4884bfb67a061b865e8cf38b2fea6de0cb1bc3d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109057 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-05tdf#96505 : Get rid of cargo cult long integer literalsumutbayramoglu
Change-Id: I7b269fb5bafceba071ebe649a696ef61301c4018 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107366 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-01-03tighten up asserting in SfxPoolItem::operator==Noel Grandin
...subclasses, so we always call the SfxPoolItem::operatar== which will ensure that we are always comparing two objects that belong to the same class. And fix the fallout in SvxUnoNameItemTable. Change-Id: I5ec7fedaa914a328897b54c016ad13e505a15937 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108599 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-02Remove warning while buildingdante
Operator >>= from any does not guarantee initialization, so compiler warns you. Value defaluted at 0. Change-Id: Icecc765be73bb653f0167958e319a1417df6ac86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108485 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-26New loplugin:stringliteralvarStephan Bergmann
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for details. (Turned some affected variables in included files into inline variables, to avoid GCC warnings about unused variables.) Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-19make *String(string_view) constructors explicitNoel Grandin
to make it more obvious when we are constructing heap OUStrings code and potentially inadvertently throwing away performance. And fix a handful of places so revealed. Change-Id: I0cf390f78026f8a670aaab53424cd31510633051 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107923 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-19use more string_view in SfxItemPropertyMapNoel
Change-Id: I053dedcbf0b110a61752722d247d6ee5e9ba481d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107977 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-15update pchesCaolán McNamara
Change-Id: I280dea8fe5f346a5555f4bf479896877579d63e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107748 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>