Once you install an extension that adds its own protocol handlers (e.g.
<https://github.com/niocs/ProtocolHandlerExtension>), DispatchProvider
re-creates this protocol handler every time the custom menu gets opened
or a command gets dispatched.
This allows the dispatch provider to avoid managing the lifecycle of
those protocol handler instances, but in case the constructor of those
handlers is expensive, this leads to performance problems.
Introduce a map of handler instances in DispatchProvider to avoid
unnecessary re-creation and re-initialization: these instances get the
same XFrame anyway (the DispatchProvider is owned by the frame), so this
is meant to be safe.
No testcase for this -- the problem is only visible if you have an UNO
service registered in the global UNO service registry, but by the time
our cppunit tests run, that is already a fixed list, so this would be
hard to test from code.
Change-Id: I6d69906a795a2d5a67706002d635b6cb3091b856
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133706
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
> vcl/source/helper/strhelper.cxx: In function ‘rtl::OString psp::WhitespaceToSpace(std::string_view)’:
> vcl/source/helper/strhelper.cxx:365:9: error: ‘pBuffer[-1]’ may be used uninitialized [-Werror=maybe-uninitialized]
> 365 | if( *pLeap == ' ' )
> | ^~~~~~
that hits at least with GCC 13 trunk now (and which actually is a false positive
as far as I can tell)
Change-Id: I69b96e4cf68f0ed20ac7d73014c164db792983a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133704
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
'Cop~y' translated into Chinese is '复制(~Y)'
But the mnemonics '(Y)' is useless on macOS.
In English, 'Cop~y' with the '~' removed is the correct result.
But in CJK should remove along with '(' and ')',
not just only for mbMenuBar. Use the method MnemonicGenerator::EraseAllMnemonicChars
already defined in vcl/mnemonic.hxx
Change-Id: Ic37ce566923e3dea47535d187b1b3dba2088e960
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133572
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Use spacing between top, bottom, icon and text (the case of sum
of items heights greater than element height is not yet handled).
Draw the background even when there's no text: that allows to
center the icon in the item, and still have proper highlight of
selected item.
Change-Id: I5d5dd14060efd15beb0e69df859ecf1efe8a0287
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133612
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Text layout code already filters out unsuitable characters,
the null character just wasn't included there because it's normally
not expected to be present in text, only something broken like
ofz34898-1.doc causes it.
This basically reverts commit 3d7ca1bd1c.
Change-Id: Ic29674d9507340c2a43098a88c0320d4253a0bf8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133689
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
This is not as important as SalLayoutGlyphsCache, as these should
be smaller and less needed, but still, make sure to limit the memory
the cache may use.
Change-Id: I4051331f8c5254cb5723772bac4dd1bceb9a2a41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133674
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
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>
- extend SwWrtShell::InsertContentControl() to be able to create
multiple content control types
- a new checkbox content control's content is always a non-checked
checkbox
- expose this as a new .uno:InsertCheckboxContentControl uno command
- add this new command to the bottom of the form menu -- now that we
have two types of content controls, have that in a sub-menu
Change-Id: I058659600b3face69b89262feb0979fff32521c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133685
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
...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>
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>
...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>
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
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>
thanks to that we can reach them using LOK as formulabar
is not fully welded yet
Change-Id: Icc1963ab11c1e6e3c407222d76b2a87fdaffa652
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133496
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133655
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
if (the default) of --with-fonts is enabled then additionally restrict
fontconfig to those "application" fonts so the linux ci can be used to
safeguard that font and glyph fallback isn't in operation during the
layout tests
Change-Id: Ic7fc705827c8177b8367cf41f55cdd8ae002c1f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133523
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
try an alternative fix
git show -w is your friend here
Change-Id: Ie9644f73431243ea0e9c6ef7f5c7ca4dadc7ed9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133638
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
zero size font is odd, but that's as it was already
Change-Id: Ib430f2ff2a53c21dc7d15d11377762ab336a61e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133660
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Esp. "Edit Macros" was missing here - it's available in the other apps.
Change-Id: I807e9c35da42729d3c3838266736fdfa5be23fcc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133434
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
It seems to run slightly faster in --enable-dbgutil mode and also
builds a bit faster (at least with Clang). But libc++ on Mac
isn't built with debug mode support.
Change-Id: Idf5dba9c4a56aba1f4163aa518a78d34b6837149
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133664
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
found by examining uses of OUString::copy() for likely places
Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This is basically ea68de2968 but
for LDFLAGS. A number of external libs cannot use this because
their libtool mishandles -fuse-ld.
Change-Id: Idee379eb0a3afb475b536519ee3de064b4e218f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133639
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
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>
A label for Vertical positioning, when an object is anchored
"to frame" was mislabeled as "Margin" (for Shape). Change
it to "Entire frame", which is also used for positioning
Images.
Change-Id: Ia001c22b5bdf2c74611948d23afa9566aab4078c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133290
Tested-by: Seth Chaiklin <sdc.blanco@youmail.dk>
Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
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>
to find places where string_view is pointing into a temporary String
Change-Id: Ib530b36f441e95d83d8f687d40a97516a0806721
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133656
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>