summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2022-05-04use more string_view in oox::vml::ConversionHelperNoel Grandin
Change-Id: I8616f608ee4cc62114acb4fbd774796bc11d1911 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133812 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04use more string_view in unotoolsNoel Grandin
Change-Id: Id10d68f2eb016671be6842dfaa82909207b0708d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04Related: tdf#131725 if SvTreeListBox RTL set, set scrollbars to matchCaolán McNamara
so if we have a RTL SvTreeListBox in a LTR environ then we get RTL scrollbars Change-Id: Ia9aaab81f273e31c61cfe4fd4e138709414ad599 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133778 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-04Just use Any ctor instead of makeAny in ooxStephan Bergmann
Change-Id: Id6c8341b545c819521056926ef1b80d20d148c5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133795 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-04lay out entire strings in SalLayoutGlyphsCache more often (tdf#148911)Luboš Luňák
The document has parts of paragraphs e.g. underlined, which changes the vcl::Font part of the hash key. So if a paragraph starts that way but the rest is not underlined, the optimization of laying out the entire string would be missed. So do the optimization if there are subsequent calls for adjacent parts of the string (or starting at the same index and different length). Change-Id: I3d4a78b0eae42bd3085e96024340e6ed8daa9ad1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133790 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-03Don't add empty labels to fontwork's icon viewMike Kaganski
This allows to center the icon in the respective entry, not having whitespace in the bottom Change-Id: Ib148df6911f020f8d4efca4f6a80a65b7f95945f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133720 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-05-03add o3tl::matchIgnoreAsciiCaseNoel Grandin
Change-Id: Iad8e1ed256d84808404bf20ed7a16b05b3db5818 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133753 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03Just use Any ctor instead of makeAny in unotoolsStephan Bergmann
Change-Id: I58d2020035396da0b3580b058d87c8e2d3f2df40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133750 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-03Just use Any ctor instead of makeAny in vbahelperStephan Bergmann
Change-Id: Ie985584ad55f69817294e45b11b7c832d39c9bf7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133737 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-03Adapt Base64::decodeSomeChars to change from OUString to std::u16string_viewStephan Bergmann
...in 9c95415de877af1430ab5b7123e11dedd0ea622c "Let comphelper::Base64::decode* take std::u16string_view" Change-Id: I42b1552fba80568b422cb60ccc99a7ab8664f2d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133711 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-03ofz#47198 Use-of-uninitialized-valueCaolán McNamara
seen in ww8 filter with rName of length 0 in if (rName.startsWithIgnoreAsciiCase("Tms Rmn") Change-Id: Ia8a20971161a44d62ead9bfcef59f86b007fd58b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133713 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-03add o3tl::equalsAsciiNoel Grandin
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03optimize repeated calls for the same string in SalLayoutGlyphsCacheLuboš Luňák
It often happens that the entire text will be laid out in parts, so if the first call is a prefix and another one follows that, lay out the entire string and then use the glyph subset optimization. Doing this only for the second segment instead immediately for the prefix is more efficient, as sometimes there is only the prefix call and there's no call for the rest of the string. This also avoids failures in CppunitTest_sw_layoutwriter, as a number of tests such as testAbi11870 lay out only a prefix and doing a layout for the entire string leads to font fallback, on which CppunitTest_sw_layoutwriter aborts in PrintFontManager::Substitute(). Change-Id: I76554868ec7e8a79dd09709a247ad1d839291c06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133495 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-03remove the o3tl::lru_map "unlimited" hackLuboš Luňák
It didn't quite make sense before that maxsize == 0 meant no cleanup, and now with items optionally being count as having size more than 1 it makes even less sense to limit the size to max_size() of the containers. This comes from 16a338e173083954a9932a3a4005f17230, so instead make that special caller pass a large size, which in practice is the same. Change-Id: Id875862126200ba889211f6e4079ae5921f27650 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133690 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-02Fix typoAndrea Gelmini
Change-Id: I63a6ac96679cabe12263a97c3dfdbbd035983b79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133697 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-05-02better cache size limit for SalLayoutGlyphsCacheLuboš Luňák
With just limit on the number of cached SalLayoutGlyphs instances the actual memory used could vary wildly depending on how long the text is. Change-Id: Ibcf6918e562e81276d21876c532838996e275bd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133673 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-02Add css::uno::Any(Color) specializationStephan Bergmann
...like was already present for css::uno::makeAny, in preparation of getting rid of makeAny Change-Id: I293e240e38fb9ad7e9e386a46da7b69beda7103b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133680 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-02support custom item size (cost) for o3tl::lru_mapLuboš Luňák
When used with items that may vary significantly in size (such as SalLayoutGlyphsCache storing glyphs for texts of different sizes) limiting lru_map to just the number of items performs poorly, since it may use only small amount of memory if items are small or it may spent a huge amount of memory if items are large. As extra optional template argument to o3tl::lru_map that is a functor that provides cost of item each, and the total size is based on this instead of each item having cost 1. Change-Id: I2b326754fe63eb4bd20010d4cea615187407e26c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133672 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-05-02Add css::uno::Any(OUStringNumber) overloadStephan Bergmann
...like was already present for css::uno::makeAny, in preparation of getting rid of makeAny Change-Id: Ic838a8297ec65dae75da6a1deb5933d562070753 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133679 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-01lok: reset ui mode state when switch to notebookbar cancelledSzymon Kłos
We have to keep state in the register in sync with the view. When we cancelled notebookbar usage we need to revert Default state so next time we will be able to activate notebookbar. Change-Id: Ie5f7d0160c9c22c6621aca73b2cdd7197f86ff78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133325 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133654 Tested-by: Jenkins
2022-05-01jsdialog: export symbol for buttonsSzymon Kłos
Change-Id: I412961bd59855dcb4204dfb917b30539dac0eac2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132756 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133653 Tested-by: Jenkins
2022-05-01jsdialog: handle formulabar as textinputSzymon Kłos
mostly boilerplate code jsdialog changes: - added force parameter to sendAction - added support for key press/release and command events - moved ActionDataMap to jsdialog namespace for sharing formulabar changes: - added calls to send jsdialog messages with formula - added cursor moving support - on command event Change-Id: I714715133901941ba0758655e2d5907a3bae79f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133010 Reviewed-by: Mert Tumer <mert.tumer@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133652 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-05-01Fix commentsxuenhua
Latin a-z instead of Latin A-Z Change-Id: If638cdbe12a1c66cb27b982508867a5a34681b02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133589 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-05-01use string_view in WhitespaceToSpaceNoel Grandin
Change-Id: I64c63418ca51a09312083dab2432bcca0ea262a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133647 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-01SalLayoutGlyphsCache no longer needs to hash OutputDevice pointerLuboš Luňák
It seems now the cache key contains all the necessary info and results can be shared even between different OutputDevice instances, as long as they are "the same". Change-Id: I367322f469ab6713299f178a711a63065b245f9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132902 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-30split comphelper::string::strip functions into String and view versionNoel Grandin
which is more obvious, from the perspective of the caller, and lets us avoid creating a new String if nothing needs to be stripped Change-Id: I66a980eaf4aa818251bec49bdb16c2dddb0745e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-29use more string_view in ooxNoel Grandin
found by examining uses of OUString::copy() for likely places Change-Id: I23c397b0438e67e0fdbc1fb4ffa6882aa5e2bf91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133591 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-29Revert "use more string_view in codemaker"Noel Grandin
This reverts commit 9463550eabd0455c374c1369bc72388108baccad. Reason for revert: The codemaker::UnoType::decompose was previously mostly returning the same OString it receives, so this change is likely a pessimisation Change-Id: Ie1b41889d0a6af9247b8683075d4edd1163fecc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133492 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-28use more string_view in tools::INetMIMENoel Grandin
Change-Id: I3bfa5a1402835c21ec70b8d995f79a2edaa6577d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133549 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-28use more string_view in tools::SvGlobalNameNoel Grandin
Change-Id: I814744d250d6ce0ec7049daf215a506adb4f1ac5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133548 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-28use more string_view in tools::ColorNoel Grandin
Change-Id: I0203aff3af19d3994af5325538520469ab2900ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133541 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-28use more string_view in comphelperNoel Grandin
Change-Id: I1544da756d8da074787bc19a98d2740058e36479 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133520 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-28include LogicalFontInstance font scale in SalLayoutGlyphsCache keyLuboš Luňák
For some reason it may differ even if vcl::Font is the same. Without this ScExportTest2::testTdf66668 fails. Change-Id: I728a0848ac0420ce0d746134c7072f6ab59f2761 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133537 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-28use more string_view in i18nlangtagNoel Grandin
Change-Id: I92e3d60180c31d765994a2212e1c4547c09c93d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133517 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-28sd theme: add PPTX import for shape fill color effectsMiklos Vajna
This is always direct formatting, so FillProperties::pushToPropMap() always has the needed info at hand. Change-Id: I3317b618e0e8bb7688d0f0fbfe4546e2e8b4e947 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133525 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-04-27make SalLayoutFlags match after makeGlyphsSubset()Luboš Luňák
SalLayoutFlags::BiDiStrong would be set by ImplLayout() if the entire subset had no RTL, but the entire string may not be that, so when creating a subset make sure to also set this flag. Similarly SalLayoutFlags::KashidaJustification should be set only if any glyph in the range has GlyphItemFlags::ALLOW_KASHIDA. Change-Id: I0aa2526f2fdd0c6a6b905ad0cb4040ee556529a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133502 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-27provide explicit function for hashing vcl::FontLuboš Luňák
It's cleaner than streaming the font and then hashing the result, and it's also faster. Change-Id: I6262e45362d386c21482f1e71be51912f123ee45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133500 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-27use more string_view in codemakerNoel Grandin
Change-Id: If311f5600bd61387cc709065978306c21360dea8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133509 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-27tdf#148784 consider StretchX in OOXML exportRegina Henschel
The export to custGeom uses currently a static version of the shape. Its vertices are calculated with EnhancedCustomShape2d::GetParameter(). That has parameters to determine whether ReplaceGeoWidth and ReplaceGeoHeight has to be used. It needs to be used, in case the shape has property StretchX or StretchY. That was missing. It is added now in cases where GetParameter() returns a coordinate. Not all cases are covered by unit tests. Further files for manual testing are attached to the bug. Change-Id: Idcdd081f855ed6c4e3a84dba08f8a2148ddfe54c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133463 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2022-04-27use more string_view in toolsNoel Grandin
Change-Id: I15ca12f35a66994cb90a0ccf60a1ce0f8efcfecc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133459 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-27sw content controls, checkbox: add ODT filterMiklos Vajna
Map the 4 new UNO properties to XML attributes: - Checkbox <-> loext:checkbox="..." - Checked <-> loext:checked="..." - CheckedState <-> loext:checked-state="..." - UncheckedState <-> loext:unchecked-state="..." Change-Id: Ia4623004ee39c77f5f242c2d720bc188e4dd9433 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133467 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
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-26DOCX export: image deduplication and clean upTünde Tóth
Follow-up to commit aea8043bc5f5187498fa450505d6de9d6986e2a6 "tdf#74670 tdf#91286 PPTX XLSX export: save image once". This reverts commit 797fef38612fb2fd62d1f6591619b9361e526bca "tdf#118535 DOCX export: save header image once" and commit 32ada80a9f47b095d7b0c4d16e3422f6ef7f2ac2 "DOCX export: make sure a graphic is only written once" and commit b484e9814c66d8d51cea974390963a6944bc9d73 "tdf#83227 oox: reuse RelId in DML/VML export for the same graphic". Change-Id: I2d90249808174290b6b3e4eb957b3ac87ad41f95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132506 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-04-26Use o3tl::make_unsigned in some placesStephan Bergmann
...where a signed and an unsigned value are compared, and the signed value has just been proven to be non-negative here Change-Id: I9665e6c2c4c5557f2d4cf1bb646f9fffc7bd7d30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133442 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-26tdf#125931: Enable sidebar in MathMike Kaganski
No panels yet, only one default deck (PropertyDeck). It is needed to have the uniform default deck like in all other modules (see commit c09f59eb6173a4a53a2d40ed80aebed18e3882ac); the panels for formula properties might appear later. Change-Id: If1785dc780111fe496638418f43e7b90a250ffce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133334 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-26officecfg,unotools,framework,sfx2: store ReadOnly for recent docsMichael Stahl
Add Office::Histories::HistoryItem::ReadOnly flag to configuration so that a document that was opened read-only isn't opened as editable from recent documents. Change-Id: I6985da287d3337a53a7e41e8e500421038eedb91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133385 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-04-25tdf#75263 - Export VBA-Project using detected charset on importAndreas Heinisch
Change-Id: Ia1f1bb31e077dcb4293c1106ac324a25a975a656 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133064 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-04-25ofz#46794 TimeoutCaolán McNamara
Change-Id: I58bfdbe4bab0ee8b7ff49f937711dff649392bbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133373 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>