utl::MediaDescriptor was just a SequenceAsHashMap with a few added
methods. It made it more difficult to assign a SequenceAsHashMap to
MediaDescriptor, without real upsides. In many places, the class was
used not as media descriptor, but just as helper to create sequences.
This change puts the string constants and the former methods into a
namespace utl::MediaDescriptor.
It would be also good to drop comphelper::NamedValueCollection, which
is basically a twin of comphelper::SequenceAsHashMap (TODO).
Change-Id: Ia9b69c5a2ad153ecc654944c419c1880252ed86e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195163
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
The accelerator cache maintains a 1:1 mapping for key→command and a
1:n mapping for command→keys. When a new command is set for a key it was
previously only updating the key→command map and then adding the key to
the command→keys map. It never removed the key from the command→keys map
for the old command. When the menus are eventually updated, it looks up
whether each item has a shortcut based on the item’s command. Because
the old command was never removed, this ended up making it display the
same key binding on multiple menu items.
Change-Id: I6d75834f4c49b1f5c105ec40cb27b8e73006152d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190928
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This change stops the creation of empty Configurations2/accelerator
dirs on new documents that do not have anything that needs to be stored
there. Previously, LibreOffice would always create this directory.
Whenever an XStorage is opened readwrite on a path, it will immediately
create that path. LibreOffice was opening all of these paths readwrite.
So, the solution is to always open these paths as readonly, and then
when we need to write data to them we close them and re-open them as
readwrite. If we never need to write data to a path, then it won't be
created.
This patch specifically stops the creation of subdirectories that were
being created by DocumentAcceleratorConfiguration.
Other patches in the relation chain handle paths created by
UIConfigurationManager and ImageManager.
Test coverage was added in b9054fed37
$ CPPUNIT_TEST_NAME="Test testTdf60700_accelerators" make CppunitTest_sw_odfexport
As far as I can tell, there is no way to actually attach custom
accelerators to a document at this time using the UI, so I did not do
any manual testing for this change.
(The closest thing to storing accelerators in the document is the work
from 65d2c9ca4d, but the macros don't
yet continue to work when you save the document in ODF)
With this change, a fresh document looks like this:
$ unzip -l Untitled\ 1.odt
Archive: Untitled 1.odt
Length Date Time Name
--------- ---------- ----- ----
39 2025-05-17 15:57 mimetype
0 2025-05-17 15:57 Configurations2/
12645 2025-05-17 15:57 styles.xml
899 2025-05-17 15:57 manifest.rdf
3563 2025-05-17 15:57 content.xml
866 2025-05-17 15:57 meta.xml
14745 2025-05-17 15:57 settings.xml
318 2025-05-17 15:57 Thumbnails/thumbnail.png
1061 2025-05-17 15:57 META-INF/manifest.xml
--------- -------
34136 9 files
Change-Id: I5e032d55e94114333ea7778afcc3df0fefe0a30f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185451
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Some of the exclusions were too aggressive. Restrict them to only the
important classes, which exposes some more places this plugin applies.
Change-Id: I1b2d1fb24391adc71ed0984f94168f61a149479f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165154
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
...in include files. This is a mix of automatic rewriting in include files and
manual fixups (mostly addressing loplugin:redundantfcast) in source files that
include those.
Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
The change attempts to establish this logic:
1. Honor the ForceFocusAndToFront setting uniformly: previously, it
was ignored when reusing existing windows (opening in Start Center,
in place of an empty document, or trying to open an already opened
document);
2. When ForceFocusAndToFront is set, try to activate the window as
early as possible (before loading begind), as a feedback to user,
and also to avoid situations when activation would be impossible
later (e.g., there is a timespan on Windows, during which entitled
applications can bring themselves to foreground; a lengthy loading
process can exceed that time);
3. If activated once, do not activate second time after loading ends,
to avoid nagging users who deliberately switched to other tasks.
Explicit calls to impl_makeFrameWindowVisible were removed from
impl_searchAlreadyLoaded and impl_isFrameAlreadyUsedForLoading,
because those functions are called from impl_loadContent, which makes
sure that they are followed by a call to impl_makeFrameWindowVisible
(either in impl_setResult -> impl_reactForLoadingState, or directly).
A fix to tdf#83773 was adjusted; I checked that the bug doesn't
reappear after that.
Change-Id: I4bdcf978d43016d1e8979adf2fdf108a37f6ba2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139362
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
In practice, it works fine to look at all of them, regardless of actual argument
types.
Change-Id: Ifc49cbcd6003c8837c1b3f81d432c59fb0657bf1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108366
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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>
used
git grep -lw namespace
| xargs perl -i -p0e 's/(\w+)\s*.\{.\s*namespace\s*(\w+)/\1::\2/smg;'
to do the initial replace, then compiled and fixed.
Change-Id: If69904d75940c851aeffab0e78c4ba02cc968d44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98526
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Also drop unused framework/inc/fwkdllapi.h
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I9e79266f273b778f4a8bd3330b1b0353a2e01a61
Reviewed-on: https://gerrit.libreoffice.org/81927
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
...as they are only ever called directly one after the other. Rename the
original initializeLoading to startLoading, and rename the original startLoading
to private start (called at the end of the original initializeLoading).
Change-Id: I5271387450324cc26743195329c4f401cf3aa0f9
Reviewed-on: https://gerrit.libreoffice.org/82308
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
...as it does the same as the copy assignment op. And both of those are
apparently already only called with SolarMutex locked, so no need to lock it
again. So the copy assignment op (as well as the other special memeber
functions) can be left implicitly-declared. (And some uses of the original
takeOver can be optimized to use move assignment.)
Change-Id: I279a5e3ee85ff2342d6ef5f672108a0712fe116d
Reviewed-on: https://gerrit.libreoffice.org/72831
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>