361 Commits
Author SHA1 Message Date
Andrea Gelmini db8521dc12 Fix typos
Change-Id: Ib17370e2ab33d88b25b24ea34247365820d4fa8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210162
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-29 16:04:55 +02:00
Andrea Gelmini 468793481a Fix typos
Change-Id: I1194d30a45c5f0f09da125d803051e99fa52c3ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209461
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-22 13:31:55 +02:00
Noel Grandin 4b10710e09 loplugin:passstuffbyref
Change-Id: I559d246b25c99e5cb7a28ba94e04a2acedd3e720
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200943
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-04 19:22:19 +01:00
Mike Kaganski 7f198b27f4 Drop class utl::MediaDescriptor, and use comphelper::SequenceAsHashMap
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>
2025-12-06 18:18:32 +01:00
Neil Roberts 4be9be2219 tdf#144560 Remove old key from command when setting new one
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>
2025-09-14 21:14:06 +02:00
Caolán McNamara a91ceefcad cid#1660530 silence Data race condition
rejig this so coverity is satisfied

Change-Id: Iad58f680b6f6fe879866c0162a88a3439af2c3f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190445
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-09-01 09:17:48 +02:00
Caolán McNamara d0829662d5 add a constructor to TStorageInfo
Change-Id: I74cd5c9a82976e5cfb31fe622db543e8133bfee1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189863
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-18 18:02:15 +02:00
David Hashe 79e63a2d07 tdf#60700 stop creating empty Configurations2/accelerator in ODFs
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>
2025-05-27 13:51:44 +02:00
Noel Grandin 091c671832 replace createFromAscii with OUString literals in framework
Change-Id: I5209ab1b869492234946f8471a30c70121824198
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167010
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-02 17:51:30 +02:00
Noel Grandin 8ef4dc07cd improve loplugin:staticmethods
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>
2024-03-22 11:47:36 +01:00
Stephan Bergmann bd6fb0cd3e Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]String
...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>
2023-10-23 11:04:42 +02:00
Mike Kaganski 42d197ef30 tdf#150773: Avoid bringing loading files to front several times
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>
2022-09-04 19:44:49 +02:00
Noel Grandin c60ad041e8 clang-tidy modernize-pass-by-value in framework
Change-Id: I024653154c51389bb27f3e94b422ff7fc1c9b46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135296
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-02 12:12:15 +02:00
Noel Grandin fdfd517a6f loplugin:stringviewparam whitelist some more functions
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-13 08:38:53 +02:00
Noel Grandin 1927b51993 loplugin:stringviewparam convert methods using indexOf
.. and lastIndexOf, which convert to find and rfind

Change-Id: I6c4156cf904774c0d867f85a4c2785dba7593f62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132445
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-02 13:31:19 +02:00
Noel Grandin a997f62242 cleanup AcceleratorCache
(1) reduce visibility of stuff nothing is using outside the class
(2) remove noise comments

Change-Id: Icea829ef92d6121b957ad47a992ef7ac04656af9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127324
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-22 17:17:48 +01:00
Noel Grandin 7fe0a4cddf osl::Mutex->std::mutex in StorageHolder
Change-Id: Ie0ababcea79b445ac73ffd4e69d260a7641af663
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127106
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-20 08:33:50 +01:00
Noel Grandin c36a21e4a3 osl::Mutex->std::mutex in WindowCommandDispatch
Change-Id: Ia89f4a7b1f444a031e8f58f644ba9129f8c48942
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125622
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-22 07:55:42 +01:00
Noel Grandin 449977192b osl::Mutex->std::mutex in ActionLockGuard
Change-Id: I8081d017f8a03be94b60011fcd4eb34eba786aa9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125623
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-21 19:43:10 +01:00
Noel Grandin 66fec11a62 loplugin:finalclasses in framework
Change-Id: I64e7b65337d283567bb6030a626303de477346cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117891
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-26 13:14:18 +02:00
Vincent LE GARREC 90c978f839 tdf#124176 Use pragma once in f*
filter, forms, fpicker, framework

Change-Id: I55a25ad2dc3749e63465e638e8eeea3c322eabbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112047
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-03-23 13:07:09 +01:00
Noel 1250aecd71 loplugin:stringviewparam extend to new..
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-29 09:25:12 +01:00
Caolán McNamara ac396f2f6b fix coverity parse errors
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-09 13:01:49 +01:00
Stephan Bergmann 042033f1e6 loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-29 16:42:33 +01:00
Stephan Bergmann 9013dc1650 Simplify loplugin:stringviewparam comparison operator handling
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>
2020-12-27 11:26:32 +01:00
Stephan Bergmann a3d0091d18 New loplugin:stringliteralvar
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-26 14:51:15 +01:00
Noel 8332d6d820 loplugin:stringviewparam include comparisons with string literals
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-30 12:32:14 +01:00
Andrea Gelmini c9a0cbc856 Fix typos
Change-Id: I58c510121a9f535b2a31854f10b5f6535554d379
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100988
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-19 15:41:21 +02:00
Noel Grandin da7489eb6a compact namespace decl
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>
2020-07-20 10:12:57 +02:00
Andrea Gelmini 8611787aa3 Removed duplicated include
Change-Id: I8caa3f1be66ca8cf236e9ada8487ea81f45b1377
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98470
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-07-12 18:21:32 +02:00
Noel Grandin 6653107b83 clean up macro usage
Change-Id: I06669718f692cc5e9e209b4e490365f4f016afdb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98389
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-09 08:27:53 +02:00
Noel Grandin 71227e2306 framework: create instances with uno constructors
See tdf#74608 for motivation

Change-Id: I8679b50395d11cb2d807d52526d803df9b0606b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98294
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-07 22:13:02 +02:00
Noel Grandin eecf74d417 compact namespace in filter..framework
Change-Id: Id3c2d9b1fdf9d617adea0fa1ab2fa9a2de12ef50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93727
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-08 21:13:05 +02:00
Andrea Gelmini 9c13afe2ee Fix typo
Change-Id: I935579ee9df56cda1a87816603b23a0562bb1b97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88256
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-02-08 09:30:41 +01:00
Andrea Gelmini a3de0dc158 Fix typo
Change-Id: I372f5b8fe3d2b1db8e9b672e67709f68b22735b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88253
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2020-02-07 23:27:00 +01:00
Gabor Kelemen e4bf92ae34 tdf#42949 Fix IWYU warnings in framework/*/*hxx
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>
2019-11-11 09:48:23 +01:00
Stephan Bergmann 3b16dfd80f Combine LoadEnv's initializeLoading and startLoading
...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>
2019-11-08 17:26:46 +01:00
Caolán McNamara 2cd6ff8a54 remove unnecessary includes
Change-Id: Ia4a622b34ff3f71963cff7a1aa8658a4df12f04f
Reviewed-on: https://gerrit.libreoffice.org/81676
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-29 17:27:23 +01:00
Noel Grandin 4e67474a6e loplugin:constmethod in framework..lotuswordpro
Change-Id: I14a3855a75cf081d86c2a404966db38c617c0256
Reviewed-on: https://gerrit.libreoffice.org/79541
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-26 03:04:45 +02:00
Andrea Gelmini 157420e496 Typos
Mainly fixing '..' and '....'

Change-Id: Ied226ed148c571d278ae65b3f468bd329f557fa9
Reviewed-on: https://gerrit.libreoffice.org/78669
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-11 23:43:34 +02:00
Andrea Gelmini ee8f0a1066 Fix '..'
To complete this:
https://gerrit.libreoffice.org/#/c/78312/

This is a massive replace for
".." instead of "..." between words.

It passed "make check" on Linux.

Change-Id: I144d8061fca9f545c762941551e59dffdd3650e8
Reviewed-on: https://gerrit.libreoffice.org/78357
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2019-09-01 12:29:39 +02:00
Andrea Gelmini cdd5869152 Fix typos
Change-Id: Ibd802e81649373fd9ad6d0309276b8e6ae43dd24
Reviewed-on: https://gerrit.libreoffice.org/77261
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-12 10:35:29 +02:00
Andrea Gelmini 9aa90b50c8 Fix typos
Change-Id: I94d0e85c731801b8b0ec844ae2a8f268b2f1022e
Reviewed-on: https://gerrit.libreoffice.org/77256
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-12 10:03:23 +02:00
Andrea Gelmini ccecd6644c Fix typo
Change-Id: Id0d89edfad0ccaae22610c5c999afc6b8686441d
Reviewed-on: https://gerrit.libreoffice.org/74392
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-20 09:09:56 +02:00
Andrea Gelmini 8ae297fde9 Fix typo
Change-Id: I8169fab36b9664f7a820c9f6781e0c61723aeecc
Reviewed-on: https://gerrit.libreoffice.org/74391
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-20 07:26:20 +02:00
Andrea Gelmini 5d14d4ae2c Fix typo
Change-Id: I24c9df4caed8fa87a31efb93ab1cb0e88225605e
Reviewed-on: https://gerrit.libreoffice.org/74324
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-06-19 08:05:23 +02:00
Andrea Gelmini 84fb7b3e4b Fix typo
Change-Id: Id041587ea926d0fcc289cc9b4c8e57c251aeeecb
Reviewed-on: https://gerrit.libreoffice.org/74323
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-06-19 08:04:36 +02:00
Stephan Bergmann 3c815c9785 No need for AcceleratorCache::takeOver...
...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>
2019-05-23 16:49:15 +02:00
Caolán McNamara fbc038cc4f an uno -> a uno
Change-Id: I538db88f8477dd2d2ad25c372928fec6c11d979d
Reviewed-on: https://gerrit.libreoffice.org/72105
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-10 14:50:59 +02:00
Noel Grandin 3fce6ae224 fix usage of successful/successfully in comments
Change-Id: If280e1e944c877462cb84b579e19d4fd2ad1900b
Reviewed-on: https://gerrit.libreoffice.org/70813
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-16 12:46:55 +02:00