Commit Graph
364 Commits
Author SHA1 Message Date
Gabor Kelemen 6e9fa580f0 tdf#146619 Use more forward declarations in include/svtools
Change-Id: If91cce7bf7ece7d1c125509118cbbe1a9ee65397
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198971
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-02-17 09:13:52 +01:00
Gabor Kelemen f8dad0daf9 tdf#146619 Use more forward declarations in include/vcl/svapp.hxx
this was skipped in previous runs, since it contains some code behind #if

After inspecting these, it seems like the removals should not cause trouble.

Change-Id: If1e3e3c7c0fc14ed6e8b51174a0e7f1220fdbc8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197496
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-25 13:31:57 +01:00
Mike Kaganski b280efcb9b Drop some uses Sequence::getConstArray
Replace by operator[], begin() and end(), which don't have overhead
since commit 2484de6728 (Remove non-
const Sequence::begin()/end() in internal code, 2021-10-15)
and commit fb3c04bd19 (Drop non-const
Sequence::operator[] in internal code, 2021-11-05).

Change-Id: I221470b3439bb0dc6e7705b0d99deb3cd2063484
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195176
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-12-07 12:54:23 +01:00
Nicu 0f627ec0f0 tdf#163738 Use insert() to add multiple values in containers instead of
a loop

Signed-off-by: Nicu <nicu.coscodan2003@gmail.com>
Change-Id: I484cabfe59e5896e9163120666191e6404647fce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194805
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2025-11-29 10:21:50 +01:00
Neil Roberts 7da5034706 AcceleratorConfiguration: Don’t ignore changes that don’t have a command
The XCUBasedAcceleratorConfiguraton reloads the configuration for a key
when a change notification on that key is received. However if the
change event was triggered by deleting a key then the change path
doesn’t contain a command and the code was ignoring it. The
reloadChanged function seems to already almost be designed to handle the
case when there is no command in the configuration. In that case it
deletes the key which seems like the right thing to do. However, when a
new key is assigned an event first gets fired for the key with no
locale, so the code needs to additionally handle that case now.

I don’t think this has any practical implications unless it’s possible
to have two instances of an XCUBasedAcceleratorConfiguration for the
same module open at the same time. However, this patch alone can work as
an alternative way to fix the problem described in
96491f3f84 because it would cause the
deleted key from the module config to also be deleted in the global
config.

It looks like the check for sPath was added in
7492878a15.

Change-Id: Ia90a1932e3169ca28157482c3035aba7efae012a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190972
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-19 10:57:15 +02:00
Neil Roberts 96491f3f84 AcceleratorConfiguration: Don’t reload config for irrelevant module
The XCUBasedAcceleratorConfiguration-s get registered as config change
listeners in ModuleAcceleratorConfiguration::fillCache and
GlobalAcceleratorConfiguration::fillCache. The reloadChanged method then
finds the appropriate config based on the path of the change event.
However, the code didn’t do anything to check whether the config is
actually the one being managed by this accelerator configuration. That
meant for example that if a key was changed in the module configuration
then the global configuration would get notified and it would end up
replacing its configuration for that key with the module one. It would
also end up in the accelerator configuration for modules for any other
documents that happen to be open.

One way to manifest this bug is as follows:

• Create a new text document
• Tools → Customize
• Select the keyboard tab
• Select F7 in the list of keys
• Type “word count” in the search box
• Press “assign”
• Press OK
• Tools → Customize again
• Select F7 in the list of keys
• Press “delete”
• Press OK

Now look at the tools menu. Notice that F7 is still assigned to the word
count option. This is because the key has been copied into the global
configuration. The delete only deleted it from the module configuration.

Note that the messed up configuration is only stored in the read cache
so it doesn’t end up getting saved. If you restart LibreOffice then the
expected behaviour is restored.

This problem might have been added in e9e75d722d. It looks like before
that it might have been adding separate listeners for global and module
configs. Ie, connectToResourse has either PresetHandler::E_MODULES or
PresetHandle::E_GLOBAL.

Change-Id: Iac8f50f3668eaadc9a62f562d5923b93cc3d0721
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190971
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-09-19 09:40:29 +02: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
Caolán McNamara 72e538b9bd tainted_data_return is deprecated
in favour of taint_source, lets drop them all first

Change-Id: I9c4e5c143fcbd6de9491360c993a8ea1b89a726e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189820
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-17 15:33:16 +02:00
Caolán McNamara 2d7fa2ba4e rework StorageHolder::openPath a little
convince myself that cid#1660530 Data race condition is bogus

Change-Id: I02a7ad95d7649757aa073f3a7c45144e60d177d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189412
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-12 15:42:34 +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 61d7bd4cd2 clang-tidy: performance-unnecessary-copy-initialization in framework
Change-Id: I2ebf2c49ec9aa03f46abdbd2149f04ed5a22f94b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176416
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-11 21:02:47 +01:00
Noel Grandin ce8816ff95 loplugin:reftotemp in drawinglayer..framework
Change-Id: I31618b4ae7ea4e37834bffc89e352b4c33eda14d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176372
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-11 18:28:57 +01:00
Caolán McNamara 6f1508f4de cid#1555767 COPY_INSTEAD_OF_MOVE
and

cid#1555770 COPY_INSTEAD_OF_MOVE
cid#1555788 COPY_INSTEAD_OF_MOVE
cid#1555789 COPY_INSTEAD_OF_MOVE
cid#1555798 COPY_INSTEAD_OF_MOVE
cid#1555816 COPY_INSTEAD_OF_MOVE
cid#1555822 COPY_INSTEAD_OF_MOVE
cid#1555835 COPY_INSTEAD_OF_MOVE
cid#1555845 COPY_INSTEAD_OF_MOVE
cid#1555859 COPY_INSTEAD_OF_MOVE
cid#1555864 COPY_INSTEAD_OF_MOVE
cid#1555868 COPY_INSTEAD_OF_MOVE
cid#1555892 COPY_INSTEAD_OF_MOVE
cid#1555896 COPY_INSTEAD_OF_MOVE
cid#1555921 COPY_INSTEAD_OF_MOVE
cid#1555932 COPY_INSTEAD_OF_MOVE
cid#1555935 COPY_INSTEAD_OF_MOVE
cid#1555944 COPY_INSTEAD_OF_MOVE
cid#1555952 COPY_INSTEAD_OF_MOVE
cid#1555985 COPY_INSTEAD_OF_MOVE
cid#1556024 COPY_INSTEAD_OF_MOVE
cid#1556038 COPY_INSTEAD_OF_MOVE
cid#1556042 COPY_INSTEAD_OF_MOVE
cid#1556044 COPY_INSTEAD_OF_MOVE
cid#1556060 COPY_INSTEAD_OF_MOVE
cid#1556083 COPY_INSTEAD_OF_MOVE
cid#1556085 COPY_INSTEAD_OF_MOVE
cid#1556090 COPY_INSTEAD_OF_MOVE
cid#1556136 COPY_INSTEAD_OF_MOVE
cid#1556157 COPY_INSTEAD_OF_MOVE
cid#1556159 COPY_INSTEAD_OF_MOVE
cid#1556172 COPY_INSTEAD_OF_MOVE
cid#1556179 COPY_INSTEAD_OF_MOVE
cid#1556187 COPY_INSTEAD_OF_MOVE
cid#1556255 COPY_INSTEAD_OF_MOVE
cid#1556256 COPY_INSTEAD_OF_MOVE
cid#1556266 COPY_INSTEAD_OF_MOVE
cid#1556275 COPY_INSTEAD_OF_MOVE
cid#1556290 COPY_INSTEAD_OF_MOVE
cid#1556294 COPY_INSTEAD_OF_MOVE
cid#1556301 COPY_INSTEAD_OF_MOVE
cid#1556311 COPY_INSTEAD_OF_MOVE
cid#1556318 COPY_INSTEAD_OF_MOVE
cid#1556326 COPY_INSTEAD_OF_MOVE
cid#1556369 COPY_INSTEAD_OF_MOVE
cid#1556374 COPY_INSTEAD_OF_MOVE
cid#1556387 COPY_INSTEAD_OF_MOVE
cid#1556388 COPY_INSTEAD_OF_MOVE
cid#1556417 COPY_INSTEAD_OF_MOVE
cid#1556425 COPY_INSTEAD_OF_MOVE
cid#1556435 COPY_INSTEAD_OF_MOVE
cid#1556495 COPY_INSTEAD_OF_MOVE
cid#1556497 COPY_INSTEAD_OF_MOVE
cid#1556501 COPY_INSTEAD_OF_MOVE
cid#1556503 COPY_INSTEAD_OF_MOVE
cid#1556520 COPY_INSTEAD_OF_MOVE
cid#1556523 COPY_INSTEAD_OF_MOVE
cid#1556562 COPY_INSTEAD_OF_MOVE
cid#1556573 COPY_INSTEAD_OF_MOVE
cid#1556576 COPY_INSTEAD_OF_MOVE
cid#1556598 COPY_INSTEAD_OF_MOVE
cid#1556615 COPY_INSTEAD_OF_MOVE
cid#1556626 COPY_INSTEAD_OF_MOVE
cid#1556671 COPY_INSTEAD_OF_MOVE
cid#1556689 COPY_INSTEAD_OF_MOVE
cid#1556701 COPY_INSTEAD_OF_MOVE
cid#1556713 COPY_INSTEAD_OF_MOVE
cid#1556758 COPY_INSTEAD_OF_MOVE
cid#1556759 COPY_INSTEAD_OF_MOVE
cid#1556788 COPY_INSTEAD_OF_MOVE
cid#1556811 COPY_INSTEAD_OF_MOVE
cid#1556821 COPY_INSTEAD_OF_MOVE
cid#1556824 COPY_INSTEAD_OF_MOVE
cid#1556825 COPY_INSTEAD_OF_MOVE
cid#1556862 COPY_INSTEAD_OF_MOVE

Change-Id: I4925a79688a983bb07252600430039ec0bcb75b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175678
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-26 19:25:03 +02:00
Caolán McNamara 7cf8cffcb8 cid#1633347 COPY_INSTEAD_OF_MOVE
and

cid#1633346 COPY_INSTEAD_OF_MOVE
cid#1633344 COPY_INSTEAD_OF_MOVE
cid#1633343 COPY_INSTEAD_OF_MOVE
cid#1633340 COPY_INSTEAD_OF_MOVE
cid#1608137 COPY_INSTEAD_OF_MOVE
cid#1608131 COPY_INSTEAD_OF_MOVE
cid#1607860 COPY_INSTEAD_OF_MOVE
cid#1607432 COPY_INSTEAD_OF_MOVE
cid#1607394 COPY_INSTEAD_OF_MOVE
cid#1607310 COPY_INSTEAD_OF_MOVE
cid#1607156 COPY_INSTEAD_OF_MOVE
cid#1607093 COPY_INSTEAD_OF_MOVE
cid#1607090 COPY_INSTEAD_OF_MOVE
cid#1607039 COPY_INSTEAD_OF_MOVE
cid#1606709 COPY_INSTEAD_OF_MOVE
cid#1558053 COPY_INSTEAD_OF_MOVE
cid#1558052 COPY_INSTEAD_OF_MOVE
cid#1558042 COPY_INSTEAD_OF_MOVE
cid#1558038 COPY_INSTEAD_OF_MOVE
cid#1558037 COPY_INSTEAD_OF_MOVE
cid#1558034 COPY_INSTEAD_OF_MOVE
cid#1558031 COPY_INSTEAD_OF_MOVE
cid#1558027 COPY_INSTEAD_OF_MOVE
cid#1557994 COPY_INSTEAD_OF_MOVE
cid#1557977 COPY_INSTEAD_OF_MOVE
cid#1557970 COPY_INSTEAD_OF_MOVE
cid#1557966 COPY_INSTEAD_OF_MOVE
cid#1557957 COPY_INSTEAD_OF_MOVE
cid#1557954 COPY_INSTEAD_OF_MOVE
cid#1557941 COPY_INSTEAD_OF_MOVE
cid#1557933 COPY_INSTEAD_OF_MOVE
cid#1557918 COPY_INSTEAD_OF_MOVE
cid#1557907 COPY_INSTEAD_OF_MOVE
cid#1557890 COPY_INSTEAD_OF_MOVE
cid#1557883 COPY_INSTEAD_OF_MOVE
cid#1557881 COPY_INSTEAD_OF_MOVE
cid#1557861 COPY_INSTEAD_OF_MOVE
cid#1557842 COPY_INSTEAD_OF_MOVE
cid#1557840 COPY_INSTEAD_OF_MOVE
cid#1557830 COPY_INSTEAD_OF_MOVE
cid#1557830 COPY_INSTEAD_OF_MOVE

Change-Id: If5ee3396eafdb8b338d9e6cf0705be6e2b431fd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175577
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-25 10:48:12 +02:00
Noel Grandin ca8c59c7e6 use more concrete UNO type in framework
Change-Id: I3ee54f3967339ab52c04f48a047bc29fc5161680
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173159
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-11 16:14:54 +02:00
Noel Grandin 4f5f24a4a3 loplugin:ostr in framework
Change-Id: I2fdc32aa5de6a1315fe69997f9b531259aa78605
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167339
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-08 17:18:51 +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 64c47c92d0 Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: framework
Change-Id: I0f17c569eddcdc30bfca4cdcd25cb05cf783ec23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158200
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-20 07:06:17 +02:00
Gökay Şatır ca74511985 Add NUMBERSIGN key handler.
German keyboard layout has number sign key.
Users can print number sign without using modification keys.
So this key can be assigned a shortcut.
Subscript is assigned to CTRL + NUMBERSIGN.

Below PR is used as reference when adding the new key handler:
https://gerrit.libreoffice.org/c/core/+/86713

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I340dc47764e9200d2477f8db740a629f62f48004
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157554
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 1db8f6d484b884301a7d3673f4d05478e28cd853)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157959
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-14 21:51:43 +02:00
Noel Grandin 0193b284e8 new loplugin:constexprliteral
OUStringLiteral should be declared constexpr, to enforce
that it is initialised at compile-time and not runtime.

This seems to make a different at least on Visual Studio

Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-26 13:12:31 +02:00
Noel Grandin e7dbef922a rtl::Static to thread-safe-static
Change-Id: Ife02e6d2be3ebfbb08522ab0183ef4aa31a99e19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149415
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-23 19:49:25 +00:00
Caolán McNamara 936f2e6924 fix crash seen when experimenting with tdf#129547
Change-Id: I0b26a7f683f91d3307856f86c5a437fde1155451
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149331
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-22 19:36:13 +00:00
Juergen Funk 038f0b06a2 little optimization in accelerators
remove double calls

Change-Id: I4242067bdc0fdcc5184d555bb293f17d66965fb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147094
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-03-20 11:37:40 +00:00
Juergen Funk c6dffdf014 tdf#153587 If one of the multiple shortcuts is deleted,
the next one is not displayed

This patch solve the part 2 of the bug, the problem was
that it did not take into account whether a command was assigned
multiple keys, it simply deleted the whole command

Change-Id: I4e09096d3bc112ed49a4210dd294d1acf7a48159
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147093
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-03-20 11:37:04 +00:00
Julien Nabet e056c1ce10 Related tdf#129547 and tdf#154136: add COLON key
Change-Id: I17978dbb100fbfa6f6ddbbbdf96872076bc2a289
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86713
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-03-14 17:36:22 +00:00
Noel Grandin 46becac127 AcceleratorCache does not need to lock the SolarMutex
it is only used by the *AccelerationConfiguration classes, and they lock
the SolarMutex around all accesses to this data.

Change-Id: I07de415bae9e0aff679f693022b9181971f19bd2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146254
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-27 16:04:03 +00:00
Noel Grandin d156e891db tdf#150682 - bad shortcut in french langage
the = key is } on a french keyboard,
so remap the
  ctrl-alt-=
shortcuts to
  ctrl-alt-}
which means the user gets to keep pressing keys in roughly the same
physical location for this action, regardless of keyboard

Change-Id: I03e251dacc1c19e543182a44ae23fde2a57cfa45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139474
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-06 18:10:04 +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 9f1701d01d use more o3tl::getToken
found by inspecting call sites of OUString::getToken

Change-Id: I4269c7476c7aa46fac39528227e350568f0eb34a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132644
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-05 12:57:00 +02:00
Stephan Bergmann 6b6df07d2f Just use Any ctor instead of makeAny in framework
Change-Id: I9f4990cf58cc794408dd70cd7fbfb2a8effa138c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133806
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-04 11:58:23 +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 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
Mike Kaganski f662ba9536 Prepare for removal of non-const operator[] from Sequence in framework
Change-Id: Ied2683a0b8a1bab1a7594da1e9bdbd3cb753552c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124370
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-30 10:31:26 +02:00
Caolán McNamara 414016a0d3 can reduce scope a little
Change-Id: I19f5422ad7c72b5fcd11b507e7a2e22e34dde4c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123797
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-19 11:40:04 +02:00
Julien Nabet c1c6eea1c1 Following 3abbb1486f
Not need to use Sequences here

Change-Id: I2507566f5939dbdcb5d2ab420f16a55d4cc403b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123765
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-19 09:28:38 +02:00
Julien Nabet 3abbb1486f Fix nb of tokens in XCUBasedAcceleratorConfiguration::reloadChanged
and use 4 like XCUBasedAcceleratorConfiguration::impl_ts_load
Indeed, there can be:
- SHIFT
- MOD1
- MOD2
- MOD3

Change-Id: I1e206a6cb74761165b60887e768fa9b057c4b242
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123722
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-18 20:52:27 +02:00
Noel Grandin 1f9468fc29 use std::vector::insert instead of push_back
because it will pre-allocate space and often is optimised to memcpy

Change-Id: I03ed7915f2762d3d27e378638052a47a28bbf096
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123588
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-14 21:28:40 +02:00
Noel Grandin 1875b3d9f2 clang-tidy:readability-redundant-member-init
Change-Id: I67edbea77b12940ac807ccbadfd74b250902809d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121378
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-01 08:54:41 +02:00
Noel Grandin 9753428dfc rtl::Static -> thread-safe static local
Change-Id: If5b7181fb1bb3f3f21ec3742680e5a3e12b21b73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120431
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-13 15:35:36 +02:00
Noel Grandin ae29e471ca convert #defines to OUStringLiteral
mostly by doing

$ git grep -l '#define.*\"' -- *.cxx
    | xargs perl -pi -e
's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 =
u\2;/g'

Change-Id: I63a4b050f220f0a61749892cd47fb91813f7d088
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119844
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-02 12:57:28 +02:00
Noel Grandin 04aafba860 loplugin:stringadd simplify some *StringBuffer operations
pulled from a larger patch which I created with a more permissive
variant of this plugin

Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-29 18:25:31 +02:00
Noel Grandin c7c6f0af6c loplugin:stringadd convert chained append to +
which can use the more efficient *StringConcat

Also fix a crash in stringview plugin which
started happening while I working on this.

Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-27 14:07:56 +02:00
Mike Kaganski a0656ec6fc const OUString -> const OUStringLiteral
Mostly automated rewrite

Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-25 10:06:26 +01:00
Noel Grandin dfc3f0b640 use single-use attribute for GlobalAcceleratorConfiguration
instead of rtl::Instance, which means it will get
cleaned up when UNO shuts down

Change-Id: I13161282ebefb47923a34a71fd66d64106d00c78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112853
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-22 16:05:21 +01:00
Noel 897970cd0b loplugin:refcounting in framework
Change-Id: I2d7d14fe0335689e4a338c70587bf33137ed1ddd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111279
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-21 16:11:48 +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
Noel 1da6908173 add string_view variants of methods to O[U]StringBuffer
and update the stringview loplugin to detect cases where we can
use these new methods.

Change-Id: I998efe02e35c8efcb3abfb4d7186165bbe6dfb2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110046
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-28 11:11:28 +01:00