47 Commits
Author SHA1 Message Date
Noel Grandin eb3cee606e template static field appearing in two different CUs
I saw some warnings and got suspicious, so I converted
the OSL_ENSURE to assert, and then found that we
have two copies of the s_nRefCount static field, which
obviously causes trouble.

I tried to fix this by removing usage of this dubious
template class, but the templates classes are intertwined,
and that lead to a very large patch with weird failures.

So this is a hacky minimal fix, using explicit template
instantiation to force the code to only be emitted
in a single library.

Change-Id: I634afb8b40570f2e7e0f8da541b8a2b6325fdc29
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/904
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit af69817a343ccf1411f6f8980c94ed1f696769b4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207023
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-06-20 14:20:53 +02:00
Xisco Fauli 6ac93e562a normalize some namespace declarations
Change-Id: I4cc17f852dd58d95e97cdc673d1f1ca0c6de6c03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206636
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-15 22:35:56 +02:00
Mike Kaganski bce4bc55f9 Move ToolboxController to use OPropertyContainerImplHelper
Quite a large inheritance chain, which all needed replace dispose
with disposing, and make sure the locking is correct.

Introduce comphelper::unique_unlock, RAII class for scoped release
of std::unique_lock, to help ensure the invariant established in
commit 4fc1ab0ca8d9bb0f0b8344d0537882aab1d6d2c0 (add assert to keep
WeakComponentImplHelperBase::disposing callees honest, 2026-04-04).

Change-Id: I72c98c25c01b8042428ef2376c6aba3c6b15ec87
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/248
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 8ed30e4a243a3efdfe380852d20910bc4a02e181)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205688
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-26 00:41:07 +02:00
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
Michael Weghorn 3bbc98757a weld: Move weld::Toolbar to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Change-Id: Ie54aef229609f131d3d53874c9390339566880f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196947
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-01-10 23:19:56 +01:00
Gabor Kelemen c0b14ab9aa tdf#146619 Use more forward declarations in include/vcl/[A-Z]*
Found after running bin/find-unneeded-includes --headersfwd include/vcl/[A-Z]*

This shaves off about 100M input, not bad for such a small amount
of files checked

This time --headersfwd skips files that contain #if defs,
in hope of not breaking builds that are not checked by CI

(...except for include/vcl/BitmapTools.hxx - this was cleaned accidentally,
due to a bug in the bin/find-unneeded-includes script that is fixed
by the previous commit 930ff2b830
- but let's keep this anyway, it seems fine)

Change-Id: Ia8e49d94f6adb3cdbedbc40ffa56dbf846c9b6e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196235
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-01-05 11:10:28 +01:00
Sahil Gautam f4f588775b use 'r' prefix for elements passed by reference instead of 'a'
Change-Id: I3ab8d0a4346f7706c532880e00dfeb079e92c651
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186804
Tested-by: Jenkins
Reviewed-by: Sahil Gautam <sahil.gautam@collabora.com>
2025-06-23 09:31:52 +02:00
Noel Grandin 34d8eb4d3f clang-tidy modernize-pass-by-value in svtools
Change-Id: I60e7373c924a479fed72eb4f0538006e3e422004
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137019
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-14 12:15:07 +02:00
Caolán McNamara 6443c79170 move ToolBoxItemId into its own header
Change-Id: I34838bee7ad27bfd60d92c26af7eb2de508686b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128974
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-26 12:07:18 +01:00
Noel Grandin ffd0453810 use more DECL_DLLPRIVATE_STATIC_LINK
to avoid unnecessarily exporting symbols

Change-Id: I224848cea217977088fe0643511660a7c99b7277
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124733
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-05 13:59:10 +01:00
Noel Grandin 86abf3a682 create comphelper::OMultiTypeInterfaceContainerHelper2 and use it
based on OInterfaceContainerHelper2 which is considerably
faster than the original OInterfaceContainerHelper

Change-Id: I9c8b6d0e5382018824bf7188a26343703abf2d51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120161
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-07 21:34:33 +02:00
Stephan Bergmann 10d29c390d throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewrite
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-02 17:02:28 +02:00
Noel 1692998399 use strong_int for item ids in vcl::ToolBox
(*) fix bug in SfxToolBoxControl::StateChanged where it was using the slot id
    instead of the toolbox item id
(*) I left the logic in SbaTableQueryBrowser alone, but it looks suspicious,
    casting slot ids to toolbox ids

Change-Id: Ied229164c27fb4456b0515c6fdcbd1682766a1a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112186
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-11 14:10:30 +01:00
Roman Kuznetsov 6d74413e5d tdf#124176 use pragma once instead of include guards
in /core/include/svtools/

Change-Id: Ic8614f77dfde02f4c1fc4cceccd1de4ff5a05f72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106006
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-19 07:26:22 +01:00
Noel Grandin bd537420b0 loplugin:unusedmethods
Change-Id: Id813d95a90fdbb360dfc8670c0b55b635f633965
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-13 17:56:14 +02:00
Caolán McNamara 96808b8422 weld SvxFontSizeBox_Impl
Change-Id: Ied8ef61226a720acac74db78ae5852cd4e624d14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92562
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-20 19:44:32 +02:00
Caolán McNamara 5a2c0ab297 weld writer navigator
GtkToggleToolButton are much wider than vcl equivalents.  Split the bottom
toolbar into two toolbars. Rearrange their contents so the layout of each level
visually match.

Notes:

Master documents have two modes, master content tree and the normal content
tree.

You can drag entries from the content tree into the document, drag mode drop
down controls whether its a link or a copy etc that's dropped in.

Documents can be dropped into the content and global trees.

If outline tracking isn't active, then when content changes the tree is cleared
and refilled, typically an effort is made to reselect the same entry that was
previously selected. Additionally, if the amount of content didn't change an
effort is made to scroll back to the location the scrollbar was at before the
clear.

Change-Id: I00c015145eac5b1acc3398d3c40861d830e4264a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89725
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-24 11:00:50 +01:00
Noel Grandin d077cd6189 Revert "loplugin:constfields in svtools"
This reverts commit 07c4aa4298.

Change-Id: Ic3f639581b9aca373f82c011f15be60d117b1943
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90476
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-13 19:20:38 +01:00
Caolán McNamara 40fe5b93bc weld AreaPropertyPanel
Change-Id: I5f4c4b43067b99cd57f8ea941002481ef5977e09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86144
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2020-01-06 16:44:21 +01:00
Gabor Kelemen 16ee4d4346 tdf#42949 Fix IWYU warnings in include/svtools/*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I937ed12f2a96943664087ddcdd035f1347e84a57
Reviewed-on: https://gerrit.libreoffice.org/67102
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-05 09:15:25 +01:00
Noel Grandin 07c4aa4298 loplugin:constfields in svtools
Change-Id: I91553f89d8f5ee42afa52d196bf86f8a92011850
Reviewed-on: https://gerrit.libreoffice.org/61186
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-03 08:26:03 +02:00
Jochen Nitschke 8ddca0648a tdf#42949 remove unused compheler includes ..
and fix the fallout

Change-Id: I15bc5d626f4d157cbc69a87392078b41e621d14e
Reviewed-on: https://gerrit.libreoffice.org/54882
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-05 10:56:36 +02:00
Noel Grandin 87a9979c89 overload std::hash for OUString and OString
no need to explicitly specify it anymore

Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec
Reviewed-on: https://gerrit.libreoffice.org/43567
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23 08:15:35 +02:00
Stephan Bergmann e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Jochen Nitschke 1bc6bd89ad tdf#88206 replace cppu::WeakImplHelper* in svtools and svx
and remove unused implbase*.hxx and compbase*.hxx includes

Change-Id: Iedf6b6dce09b5baf714a1b3394bb7fb3526cca82
Reviewed-on: https://gerrit.libreoffice.org/31594
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-04 15:57:43 +00:00
Noel Grandin 5034914c7a loplugin:expandablemethodds in include/svtools
Change-Id: I679b7985861203496813782138d1cf965fbc427b
Reviewed-on: https://gerrit.libreoffice.org/30107
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-21 06:18:40 +00:00
Stephan Bergmann 106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Stephan Bergmann 91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02:00
Noel Grandin 19b34c0039 loplugin:passstuffbyref in svtools
Change-Id: Ie166eaef65e56fafe4e57a5559b587d7558d7aa4
2016-04-13 13:27:53 +02:00
tymyjan c20cc7e79b tdf#97499 Fixed containers parameters clearing #4
Change-Id: I7c96181399f4d7e62d4aceca404b22d68f903513
Reviewed-on: https://gerrit.libreoffice.org/23754
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-04 05:49:06 +00:00
Noel Grandin c06e2fcc2c com::sun::star->css in include/sot to include/typelib
Change-Id: I9cd92b53370a6b6018d2f7c648890f9c014a27de
2015-10-23 10:48:50 +02:00
Stephan Bergmann b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Noel Grandin bd8b93fdff make PostUserEvent Link<> typed
Change-Id: I13f10bda985d55d419a5bff481130a456ae2db8a
2015-08-28 09:49:56 +02:00
Caolán McNamara fd1372ba8b boost::unordered_map->std::unordered_map
you can get debug stl this way

Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
2015-01-02 16:14:36 +00:00
Noel Grandin 3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
Stephan Bergmann 70cc2b191b First batch of adding SAL_OVERRRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-26 16:39:26 +01:00
Noel Grandin c849d750eb svtools: sal_Bool->bool
Change-Id: I05dd992f332ab2f3dbcc65aed6dac909872168d4
2014-03-25 14:32:55 +02:00
Noel Grandin 41776e53c5 svtools,svx: prefer passing OUString and OString by reference
Change-Id: Iceb2cbcda9d8ddb4ee00db9365c751e0e5d8b3a6
2014-03-13 13:13:38 +02:00
Stephan Bergmann 5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Stephan Bergmann 307684b2c7 Clean-up svt::ToolboxController inheritance
...and fix its XTypeProvider::getTypes

Change-Id: Ic36b17b14da21a29ca5530dd5e2ad03ee3da0782
2014-02-12 12:03:29 +01:00
Stephan Bergmann 435a5e7071 Remove pointless "shizhoubo" comments
Change-Id: I50521b0dab7325313ed5a3303f09a0692d76d19d
2014-02-12 12:03:29 +01:00
Norbert Thiebaud ab3506ec72 fdo#65108 inter-module includes <> include/svtools
Change-Id: I7e004e1e4fbc2141ff421af6be0e8bf5a026b189
2013-11-09 18:48:49 -06:00
Thomas Arnhold dbddac3261 fixincludeguards.sh: include/s*
Change-Id: I57fcfd442d2b5815e7c07a9cbd660f3698168dee
2013-10-23 23:22:29 +02:00
Jan Holesovsky 8c69fcd6eb Move hasBigImages() from ToolboxController to SfxToolBoxController.
We want to decide whether the images are big or not based on the real
(underlying) ToolBox, not on the global setting, because we can have both
toolbars with large as well as small icons visible at the same time (small in
sidebar, large in toolbars).

Change-Id: I046a12a495f2038df9a571f5779794a639bae6dc
2013-07-17 13:27:46 +02:00
Ariel Constenla-Haile 57207cab00 Add missing copy&paste of SfxAppToolBoxControl_Impl::Select
(cherry picked from commit 47204c74d9e52f54f6983af19b66af2a96b42e61)

Conflicts:
	framework/inc/uielement/popuptoolbarcontroller.hxx
	svtools/inc/svtools/toolboxcontroller.hxx

Change-Id: I304d17c662450f29eeffb17f576b418986f3fb0a
2013-06-24 11:25:34 +01:00
Ariel Constenla-Haile 1e85fc5b2d svt::ToolboxController clean-up
Some small clean-up to use the PopupMenu ToolbarController

(cherry picked from commit e1687ce159e787d98f79d29a3d2131cca4b6ec71)

Conflicts:
	svtools/inc/svtools/toolboxcontroller.hxx
	svtools/source/uno/toolboxcontroller.cxx

Change-Id: Ie5e0397c32352d52cf2664bdbab920923e74bd03
2013-05-26 20:39:02 +01:00
Bjoern Michaelsen b9337e22ce execute move of global headers
see https://gerrit.libreoffice.org/#/c/3367/
and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details

Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a
2013-04-23 22:20:31 +02:00