summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2022-04-15Introduce rtl::createUriCharClassStephan Bergmann
...to make those char class array initializations more readable. (Making the corresponding variables constexpr is mostly done so that failures in the provided `unencoded` arguments, like non-ASCII characters or duplicate character typos, would lead to compile-time errors also for !HAVE_CPP_CONSTEVAL. And assigning to a sal_Bool std::array needs another hack to avoid false loplugin:implicitboolconversion warnings.) Change-Id: Ieb8827f69f55f1212a9428817d5331fcb18ef1d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133058 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-15Add some clarifying comments for o3tl::getToken overloadsStephan Bergmann
Change-Id: Ia81b11b659f6045f9e474b3a32b72e2c5242a80b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133057 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-15sc: introduce SparklineShell and Sparkline contextTomaž Vajngerl
Having a separate sparkline context is very useful, so we can add a custom UI when the user has the cursor over a sparkline. This will allow a "Sparkline" tab for NotebookBar and its own deck in Sidebar, activated only when the sparkline is present. Also the pop-up menu can be customized specifically for the sparkline, but this may be less useful. For the sparkline context we need a custom shell - SparklineShell where now all the UNO commands can be implemented (not done in this commit). Change-Id: Idca2ad946af3afdd1b494744b80c9c093eec602c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133022 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-15Prepare SvNumberFormatter::GetEditFormat() to obtain for another localeEike Rathke
Change-Id: Iab8b9a802ebac60b52007754430352d3de925374 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133026 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-04-14Add some clarifying comments for o3lt::getTokenStephan Bergmann
Change-Id: I417f048cdcd74e0a06b4c08d7d1851ea3e8a7077 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133015 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-14address review commentsNoel Grandin
(*) fix parameter type of getToken() Change-Id: Ib6fcfc6b217e98f57e600dc44c888366b432c19e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133011 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-14Resolves: tdf#148476 allow dialog resize buttons to "shrink" againCaolán McNamara
a problem since: commit 5d388b94735e34ba445d65e1d5030a646aad7dbe Date: Thu Jan 27 12:17:48 2022 +0000 Related: tdf#146648 let SetWindowState size trump the initial layout pref size Change-Id: Ia765fc011e740386fce568704cb1efb066a5d5bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133001 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-14Fix comment againStephan Bergmann
...which had been butchered by c7fb93764b321e5bf4cd143dd0c29be60de6d8f8 "Cleanup comment": e4ff847fe0796420ba8023b70cad8589f5f19e9f "loplugin:stringview check for getToken and trim" had turned this into a template, but had not lifted the other restrictions. But while at it, also adapt the mention of "OString" and "std::string_view" in the comment to that e4ff847fe0796420ba8023b70cad8589f5f19e9f change. Change-Id: I3c27efe145c4bea6c4b16f81da671bf22160545c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133000 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-14use more string_view in ooxNoel Grandin
Change-Id: I25fe1cbfae43bb533e7dfc2561d0b70976aa6a40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132985 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-14use more string_view in filterNoel Grandin
Change-Id: Ieff65b96487051721f9016c005523f31b7415901 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132984 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-14use more string_view in editengNoel Grandin
Change-Id: I5104dc8ce24089b110f9cd73e0f5e62ad5b44a0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132983 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-14Advanced Diagram support: Secure properties at Diagram ModelDataArmin Le Grand (Allotropia)
Additionally to the Text/Attributes already saved/secured after Diagram import, secure more data that is part of the Diagram ModelData. This is about attributes (e.g. FillStyle/LineStyle, TextAttributes, ...) in UNO API formt that will be secured/ attached to the Diagram ModelData in it's svx::diagram::Point structure. This is done for all those entries for which a XShape will/ would be incarnated, thus associated to entries that will get a visualization, including the BackgroundObject. From that data, at re-creation time, the attributes can be re-applied to the re-created XShape(s), also after changes to the Diagram Model Data (e.g. Add/Remove). This is - besides the already added securing of the Style/ Theme - a 2nd method for lossless re-creation. For the BackgroundObject - if it has FillStyles - it is even the only method to secure that data and thus necessary for that case. The selection of atributes that gets secured is minimal for now and may/need to be extended for existing cases accordingly. Change-Id: Ie9b72b9b9135113cf858d57fe6cd8622d736c4a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132976 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-04-14Resolves: tdf#141625 give enough space to see full date+timeCaolán McNamara
Change-Id: I31193783231f27494ed1507faa143697e8facc30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132977 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-14Make accessibility check dialog asyncNickWingate
Signed-off-by: NickWingate <nick.wingate@collabora.com> Change-Id: I88913b3d7e580a1d8c69a39454f2598e11ba43ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130438 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 61fed0c4fe53738254d116543417f1c7028a0f39) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130451 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2022-04-14compute subset of glyphs in SalLayoutGlyphsCache (tdf#139604)Luboš Luňák
When OutputDevice::ImplLayout() computes glyphs, the result is always the same for the same string (and font etc.), and if the function is asked to work on just a subset of the string, the returned glyphs are often also a subset of glyphs for the full string. Since e.g. EditEngine breaks text into lines by first laying out a full string and then repeatedly calls the same function for a subset of the string with increasing starting index. So if the full result is cached, it's faster to just make a subset of that, adjust it as necessary and return that, instead of doing a layout again. This requires support from harfbuzz to tell us if it's safe to break at a given position, and HB_GLYPH_FLAG_UNSAFE_TO_BREAK is that (https://harfbuzz.github.io/harfbuzz-hb-buffer.html#hb-glyph-flags-t). I'm keeping the optimization for tdf#144515, as avoiding the extra layout altogether is still useful. Change-Id: I33f70f9af89be79056e464908eac0861f58d274a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132753 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-13Clean up O[U]StringBuffer ctors taking a length parameterStephan Bergmann
For !LIBO_INTERNAL_ONLY, go back to the state before d91d98a53612a972de368186415aa48698e074d9 "fix gcc-4.0.1 and/or 32bit build for string literals" of having just a sal_Int32 overload. (For !LIBO_INTERNAL_ONLY, the current state was confusing, as the existence of further overloads depended on __cplusplus >= 201103L.) And for LIBO_INTERNAL_ONLY: * Have overloads for all integral types, with an assert checking that they do not use out-of-bounds length arguments. (The std::make_unsigned_t dance in the assert is needed to avoid signed/unsigned mismatch warnings as seen at least with MSVC.) This removes the need for explicitly casting arguments that are larger than (unsigned) int. (And I cleaned up two such places that I had become aware of with the abandoned previous attempt <https://gerrit.libreoffice.org/c/core/+/132825> "Let O[U]StringBuffer ctors take sal_Int32 length parameters"; there may be more places to clean up, though.) * Have deleted overloads for all integral types that are not actually integer types. (This excludes signed char and unsigned char, as at least > OUStringBuffer aBuf( rToken.GetByte()); in ScTokenConversion::ConvertToTokenSequence in sc/source/ui/unoobj/tokenuno.cxx does a legitimate call with an argument of type sal_Int8 aka signed char.) Change-Id: I2df77429f25b74f19cc3de5064e6fd982e87b05e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132951 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-13use more string_view in xmloffNoel Grandin
Change-Id: I0d860fa6e3d3261f3393e912b27930066dd93f7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132972 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13use more string_view in sfx2Noel Grandin
Change-Id: I36db3d26a576adeb4d2427c28320096d5464f565 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132964 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13use more string_view in vclNoel Grandin
Change-Id: Iabe6c14d17c7805fcc3697cd919234abe3f0a0f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132963 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13use more string_view in svlNoel Grandin
Change-Id: I9b6a074eb6342808d02a69f3ed1fa713e81d2608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132958 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13Handle "addfont" from Collabora OnlineTor Lillqvist
We use the AddTempDevFont() API to add a new font. Sadly there is no corresponding way to remove such a temporarily added font. Change-Id: I6fe61919daa5af29e964cec1caf7293aefa8ea4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132948 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-04-13Fix copy/paste typo in commentStephan Bergmann
Change-Id: I90d350abefebf3545c47f9460627435b4a514e07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132940 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-13loplugin:stringviewparam whitelist some more functionsNoel Grandin
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-13sd theme: add UNO API for shape fill color effectsMiklos Vajna
XColorItem::maThemeColor already provided the document model for this. Change-Id: Iefbd0aeaa37a813bb4c86386801e0116e8fae40d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132933 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-04-12don't FormatDoc() a whole long text if not necessary (tdf#144515)Luboš Luňák
The testcase has a very long text in a cell that is really high enough to hold only one line of text, yet EditEngine formats and wraps the entire string. Which can be expensive because of calling into text layout to find out width of a text portion, and this is done repeatedly for the yet-unformatted text, so pretty much O(N^2). For top-aligned text it's enough to format only as much as will fit and ignore the rest, so implement that and add EditEngine::EnableSkipOutsideFormat() to enable the optimization. Change-Id: Ida87a1843737a368798ba2b3e60eedc99ee0f611 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132932 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-12Remove need for OPropertyAccessor default ctorStephan Bergmann
Change-Id: Ia5ae4e28aa880600ce80bd284cde5183c49e4b40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132929 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-12include OutputDevice MapMode in SalLayoutGlyphsCache key (tdf#148400)Luboš Luňák
The mapmode also affects the layout of the glyphs. Change-Id: I9492bc4d3d9e991ef8ab5dc30ce424e44cbc79f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132822 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-12loplugin:stringview more o3tl conversionNoel Grandin
look for call sequences that can use string_view and the new o3tl functions in o3tl/string_view.hxx Also add a few more wrappers to said #include file Change-Id: I05d8752cc67a7b55b0b57e8eed803bd06bfcd9ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11use more string_viewNoel Grandin
found by tweaking the loplugin:stringview and making it whitelist getLength Change-Id: Ic41cd4e3026d93b70a76fe1279c6de3abbe6b4a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132820 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11loplugin:stringview add check for getToken().toInt32Noel Grandin
where we can convert that to o3tl::toInt32(o3tl::getToken( and avoid the heap allocation of a temporary string Change-Id: Ib11c19c6e6cdc0de3e551affd3578d181e292de4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132810 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-11Cleanup commentMike Kaganski
... after commit e4ff847fe0796420ba8023b70cad8589f5f19e9f already made it a template. Change-Id: Ia433150cb1f9909906ceb986c50d4334cc2b1897 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132806 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-11Replace references to rtl_ImplIsWhitespace with implIsWhitespaceMike Kaganski
... after commit 57f22d9b1a4e1cd161a35c8e4c390661db981d2c. Change-Id: I4232adc805593575d0bb7549b40ad35308829261 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132805 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-04-11Advanced Diagram support: Make Style/Theme info availableArmin Le Grand (Allotropia)
The Style/Theme information is central for re-creating the Diagram shape representation. Make that data available in the ModelData classes in svx. With that information, a re- creation with all needed attributes is possible, e.g. when the model gets changed (remove/add data entries). Also some cleanups done. Change-Id: Icd925c9731891092f1ddd96c8feb165e1f846f4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132738 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-04-10use more string_viewNoel Grandin
found by tweaking the loplugin:stringview and making it whitelist getLength Change-Id: Ic15d3703d1fb07658e99e1db1c89e2fa5bc70c19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132771 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-10loplugin:stringview check for getToken and trimNoel Grandin
since we now have o3tl versions of those that work on string_view. Also improve those o3tl functions to support both string_view and u16string_view Change-Id: Iacab2996becec62aa78a5597c52d983bb784749a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132755 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-10-Werror,-Wignored-attributesStephan Bergmann
clang-cl: "'dllexport' attribute only applies to functions, variables, classes, and Objective-C interfaces" Change-Id: I1c10431f442b601fd8110c029f6fe33915c62d08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132764 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-09add vcl::Font::EqualIgnoreColor()Luboš Luňák
The color values in vcl::Font are obsolete, and the underlying font is the same regardless of the color. Change-Id: I66801a07092bc189f43bf2b28bc54ead6d20f70e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132747 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-09sal_GlyphId is internal to VCLLuboš Luňák
And can't be put into impglyphitem.hxx, as then it would have a circular dependency with fontinstance.hxx . Change-Id: I57289fa5433851f095f7b73ce842ba5a0e8497ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132745 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-09add a more complete o3tl::getTokenNoel Grandin
so we avoid OUString copying (mostly when doing stuff like parsing numbers of out of strings) Change-Id: I4ef6ac23671c0b40807a22158e655e92dfad4af6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-08add SalLayoutGlyphs* parameter to OutputDevice::GetTextBreak()Luboš Luňák
Change-Id: I278e485e03cf27bc57724233453a672569dfd53f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132682 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-08use just one shared global SalLayoutGlyphsCacheLuboš Luňák
Now the cache should be capable of detecting what needs to stay the same for having the same result, so it should be enough to have just one cache that can reuse results even between callers from different places. Change-Id: Ibdc0303f5b727d1a1d7be91d61db9465ed95e1c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132673 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-08ignore Point logicalPos argument in SalLayoutGlyphsCacheLuboš Luňák
It's only used for the DXArray argument in ImplLayout(), so if we ignore that one when caching, the position can be ignored too. Change-Id: Id2a7b452e2b75139177c1e73c48eaa466742a59c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132672 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-08check better for unchanged OutputDevice in SalLayoutGlyphsCacheLuboš Luňák
Some things like font could change, so it needs to be saved and compared. If would be even better to avoid comparing OutputDevice pointers and instead compare only what actually matters, in order to reuse the same glyphs used for different output devices, but I can't find all the relevant data in OutputDevice. Change-Id: Ib8634165b5b312d1db2c9fc28f8d7fdf7b552d25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132671 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-08use vcl::text::TextLayoutCache in SalLayoutGlyphsCacheLuboš Luňák
Change-Id: I0ec22fe53e05319dec15456a916b10e97ea91a75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132668 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-04-08move comphelper::string::toInt32 to o3tlNoel Grandin
so we can use it in places where we cannot include comphelper Change-Id: Iba0ba3e4c0dcf0f9d1f09092a77c3b2010ec4f6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132732 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-08sw content controls: add ODT exportMiklos Vajna
Wrap the text portions inside the content control in a <loext:content-control> XML element. Also map the (so far) single UNO property of it to <loext:content-control loext:showing-place-holder="...">. This is just initial export for inline text content controls, more properties are to be added in follow-up commits. Change-Id: I5d928255b925ed7e08fb635ba39f546e9a4879de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132717 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-04-08loplugin:stringviewparam convert methods using trimNoel Grandin
for which we add a new o3tl::trim method Change-Id: I9d37b6264eea106aa2f3502bd24b8cccf7850938 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132658 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-08prevent using O[U]String::subView on temporatiesNoel Grandin
by making the method "const &" Change-Id: I8b369ca1dd1f8d10832c85ccf3d890edb14e2c54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132688 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-07Related: tdf#148448 add a separate WarningColor settingsCaolán McNamara
instead of a hard-coded yellow. For gtk we can use the named color "warning_color" to populate it: https://docs.gtk.org/gtk4/css-properties.html Change-Id: I538bffdc0f6286c78a08cef649fa8a074a6510ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132684 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-04-06Drop write-only uses of pNonConvertableChars argumentMike Kaganski
Change-Id: Ibf60405868cfda08d125f63c45f8b74e52b32da4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132642 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>