Commit Graph
3209 Commits
Author SHA1 Message Date
Noel Grandin fbe05bc89a loplugin:bufferadd extend it to find some more places
where we can simplify *StringBuffer usage

Change-Id: Ic2005b886b486a6627a43f8dcfba3258cb168921
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184428
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-04-22 11:53:07 +02:00
Noel Grandin 1fc3b3198c loplugin:unusedfields
Change-Id: I2bbf1c093c5aed75939e9cc51935c8febd9aff04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184160
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-04-15 08:10:29 +02:00
Noel Grandin 4f8b700867 remove unused field
Change-Id: If81b8c1a21006b49b8025defd2ebd652bdeb8e5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184158
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-04-15 08:10:13 +02:00
Michael Weghorn e8d45fe35e editeng a11y: Drop custom WeakCppRef, use unotools::WeakReference
Use the existing unotools::WeakReference instead of the
custom WeakCppRef template class to hold weak references
to the AccessibleEditableTextPara objects in
AccessibleParaManager.

An AccessibleEditableTextPara forward-declaration is not
sufficient to use
unotools::WeakReference<AccessibleEditableTextPara>, so
re-arrange includes/forward-declarations a bit.

Drop the now unused WeakCppRef.

Change-Id: I54553059a7cb36515109573c5b22d73738b1c46f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183672
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-04-03 22:30:58 +02:00
Noel Grandin e07a0568b0 move loplugin:constparams out of store again
since I have improved and updated it a little. But leave it off by
default, since it is pretty expensive

Change-Id: I60226bc37eb38ddb5c648e5205aba311a75e7f27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183570
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-04-01 12:57:28 +02:00
Michael Weghorn 0cb6632ece a11y: Merge OAccessibleComponentHelper and OCommonAccessibleComponent
Merge the two classes, now that OAccessibleComponentHelper
is the only OCommonAccessibleComponent subclass after

    Change-Id: I05547b12806a6a90b166edbe196b4bc5a27344be
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Mar 31 13:49:20 2025 +0200

        a11y: Merge OAccessible{,Extended}ComponentHelper, add default impl

Change-Id: Ic7a36c40066f307f8df29dc4dd45ed3ee966bcb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183552
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-04-01 11:20:23 +02:00
Michael Weghorn 18b7dc796f editeng a11y: Merge Accessible{Context,Component}Base
AccessibleContextBase and AccessibleComponentBase
are both subclassed by the exact same classes.

Merge AccessibleComponentBase into AccessibleContextBase
to simplify the class hierarchy.

Drop now unnecessary overrides.

This also aligns AccessibleContext further
with the comphelper::OAccessibleExtendedComponentHelper
class that also implements both, XAccessibleContext
and XAccessibleExtendedComponent, and thus also prepares
for potential refactoring to deduplicate code in those
two classes in the future.

Change-Id: Ia3331f2bd4563bf9cdfee35c9ea6cca91bd093cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183543
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-04-01 11:19:38 +02:00
Stephan Bergmann b936f80d96 Adapt to LLVM 21 trunk MemberPointerType change
<github.com/llvm/llvm-project/commit/14f7bd63b95d0f61a6f47119ac66398ca230559a>
"Reland: [clang] preserve class type sugar when taking pointer to member
(#132401)"

Change-Id: Ie409324fcf3b98cd733cc46e06ee9e99dc140968
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183250
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-03-24 07:29:56 +01:00
Noel Grandin 31d4a7bd37 loplugin:constantparam
Change-Id: I8184c75ea6f35538eb68faa9eaf18b6d053f843c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182309
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-02-28 07:36:21 +01:00
Noel Grandin 09e2627a83 use more concrete UNO types in some local vars
found by a little plugin I created.

Plugin parked into store/ folder because it needs hand-holding
when run.

Change-Id: I2b4da7378f0becbc5f020ac9e78cd765aa0119b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181768
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-02-26 16:56:56 +01:00
Noel Grandin a4ab140ec0 loplugin:unusedenumconstants
Change-Id: Ic5dee6225be56385a1ed4a8674dadba9a453dcb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182204
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-02-26 16:51:17 +01:00
Noel Grandin 84cd2e5a71 loplugin:simplifyconstruct improve warning message
which was needlessly cryptic

Change-Id: Ifb91631705accff3f49ec3f55b67e83532d70a12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182199
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-02-26 09:03:48 +01:00
Noel Grandin d883aab37d loplugin:constantparam
Change-Id: Iba5ce1d44e52610e985e97d299571cf3387d938a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182180
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-02-25 19:37:56 +01:00
Noel Grandin 5357da349b Revert "remove canvas/cairo and canvas/gdi and canvas/directx backends"
So the vclcanvas backend is in worse shape than I thought. It will
take too long to get it into shape to be sure of making the next
release, so revert this for now, and I will have to find another
approach.

This reverts the following commits

commit fbefe07e4c
Author: Michael Weghorn <m.weghorn@posteo.de>
Date:   Thu Feb 20 09:42:14 2025 +0100

    qt: Remove now unused vcl/inc/qt6/QtSvpSurface.hxx

commit 595354ab7e
Author: Julien Nabet <serval2412@yahoo.fr>
Date:   Wed Feb 19 21:13:49 2025 +0100

    Remove also canvas/cairo in gtk4, qt6 and gtk3_kde5

commit d539f6e99e
Author: Noel Grandin <noelgrandin@gmail.com>
Date:   Wed Feb 19 18:15:30 2025 +0200

    fix "local variable is unused" warning

commit 704f61b1bd
Author: Noel Grandin <noelgrandin@collabora.co.uk>
Date:   Wed Jan 29 15:35:21 2025 +0200

    remove canvas/cairo and canvas/gdi and canvas/directx backends

Change-Id: I0492dabf7da8c42a15720c868f161919e8dc7ae4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181984
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-02-21 10:40:31 +01:00
Noel Grandin 704f61b1bd remove canvas/cairo and canvas/gdi and canvas/directx backends
These were originally created to better support alpha/transparency
in slideshows, but vcl can do that these days.

Mostly, removing these makes the path to better backends (e.g. GDI+)
in vcl considerably easier.

If regressions are detected, it would be better to improve vcl
to perform better, or render better, since that will both fix
the regression and improve other output from LibreOffice.

Also remove various bits of vcl backend that were only being
used by the canvas stuff.

Change-Id: Ic5276d57e696f3dcbeaed2cc149b8fc09c5816f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181843
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-02-19 17:04:28 +01:00
Noel Grandin af7e4a555f loplugin:unusedmethods
Change-Id: If02eaf59ebc74001e82b70430bc32ef2edcb6d83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181470
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-02-12 12:13:00 +01:00
Noel Grandin 8976d09cdf update mergeclasses
Change-Id: I1cf3a1487ffdf9e344248854109eec70dda6336b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181468
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-02-12 11:04:29 +01:00
Stephan Bergmann 9b81a98953 Introduce loplugin:mustoverride
...to find derived classes that do not directly override SfxPoolItem::ItemType.
Most of the cases that the plugin flagged were classes that are apparently not
meant to be instantiated themselves (so I added pure virtual overrides there),
but SdrMeasureFormatStringItem appears to genuinely have missed it
DECLARE_ITEM_TYPE_FUNCTION stanza.

Change-Id: Iec40080377f26cc4fa2c8cff735d5f0d3bd60509
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181211
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-02-07 12:53:35 +01:00
Michael Weghorn 783e6b70b4 browsebox a11y: Drop IAccessibleBrowseBox iface
Switch BrowseBox::m_pAccessible from a Reference
to the IAccessibleBrowseBox iface to a Reference
to the specific AccessibleBrowseBoxAccess subclass
and drop the IAccessibleBrowseBox interface.

Change-Id: Iecc518232eceecc922b69b8c3a4c89f27e6e4c3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181207
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-07 11:13:29 +01:00
Noel Grandin 4cd88c0534 loplugin:unusedmethods
Change-Id: I76e97a932fb6c6d26dc6ad1b9a45dde2dfd7b0a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181182
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-02-05 18:29:16 +01:00
Noel Grandin fe8ef5ec07 loplugin:unusedfields
Change-Id: I7c23234f25872fccc0cecc3bdcbae7d47d15951a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181180
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-02-05 17:15:35 +01:00
Noel Grandin 5ff1b4491a loplugin:unnecessaryvirtual
Change-Id: I9fc9554f659beea6041b8c64f915c853478aebd6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181179
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-02-05 17:15:25 +01:00
Noel Grandin d1b17b71ae loplugin:mergeclasses update
Change-Id: Ifb7918120ce827c438784faa5fa7b15dcc126e93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181178
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-02-05 17:15:15 +01:00
Michael Weghorn a3befdae52 vcl: Merge LclHeaderTabListBox into SvHeaderTabListBox
By now LclHeaderTabListBox is the only SvHeaderTabListBox
subclass and SvHeaderTabListBox is not used by itself.
Merge the former into the latter to make the class hierarchy
a little less complex.

The "plain" SvHeaderTabListBox or other subclasses used
to be used in the past, but that is no longer the case,
see e.g.

    commit 4e07b178f5
    Date:   Tue Feb 18 10:16:40 2020 +0000

        weld WatchWindow panel

which eliminated one use.

Copy the comment about the default NotifyStartDrag
implementation in the base class being weird from
vcl/inc/treeglue.hxx but also leave it there, as
it applies for the LclTabListBox class that is
still there just the same.

Change-Id: I658332a9675a9c67c7250f2577a6eb1a0cc491f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181022
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-04 00:39:37 +01:00
Noel Grandin 42cc3b5845 N32BitTcMask is unnecessary
The remaining usage site can use N32BitTcXrgb

Change-Id: I97c0a7e97d45dfcb4726b197159ca2f197b43713
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180698
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-01-24 14:14:14 +01:00
Noel Grandin 18df81e156 Revert "ScanlineDirection is unnecessary"
This reverts
  commit a525438eb6
  Author: Noel Grandin <noelgrandin@collabora.co.uk>
  Date:   Wed Jan 22 09:50:43 2025 +0200
  fix GDI and Quartz backends
and
  commit 828a0dcdf6
  Author: Noel Grandin <noel.grandin@collabora.co.uk>
  Date:   Thu Jan 16 08:23:19 2025 +0200
  ScanlineDirection is unnecessary

because macOS uses bottom-up coordinate system, and I could not
find a way to make the bitmaps stored top-down.

Change-Id: Idc05b7473eca5fae0e33d634117de810146da3b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180603
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-01-23 08:28:14 +01:00
Noel Grandin 828a0dcdf6 ScanlineDirection is unnecessary
we always use top-down data now.

(which indicates that the Windows OpenGL code has bitrotted a little
 and has probably been broken for some time).

Change-Id: Ic16893d5cf7d2a3f9045b5aa77d4ad2ebc4fe432
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180331
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-01-16 11:51:44 +01:00
Stephan Bergmann d59aa7ddfd Adapt compilerplugins to recent LLVM 20 trunk change
<github.com/llvm/llvm-project/commit/cfe26358e3051755961fb1f3b46328dc2c326895>
"Reapply '[clang] Avoid re-evaluating field bitwidth'"

Change-Id: Ic31d5cd8251d0f83e7589e2f00e3c34789c75bad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180150
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2025-01-13 08:13:44 +01:00
Szymon Kłos 389e7d4bc5 jsdialog: use single static register
followup for commit 13af671fda1317175a93fd747e5455ce897ed167
jsdialog: share code for widget registry

this way we avoid modyfying compilerplugins every time we add new
thing we need to remember

Change-Id: I6b750175e7dcb31d62666f53c9275a2c5d879150
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178344
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179622
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Jenkins
2025-01-02 16:55:56 +01:00
Xisco Fauli 4852740395 bump copyright year to 2025
Change-Id: Id2d0597ed86a5f798eec22dde5b954c06442a2a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179610
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2025-01-02 12:31:22 +01:00
Noel Grandin 3642472bea merge SwSidebarItem and SwAnnotationItem classes
Because the separation is not doing useful.

Which reveals that SwAnnotationWin::ChangeSidebarItem was
doing some very dodgy object slicing when assigning
to mrSidebarItem.
Fix that by using a pointer in SwAnnotationWin instead.

Change-Id: I516dfaac7066d8f1effe351ef388c03dd1127fd7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179445
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-12-27 17:07:59 +01:00
Michael Weghorn 7503bb286f [API CHANGE] a11y: Drop UNO service to create a11y contexts
Drop the com.sun.star.accessibility.GetStandardAccessibleFactoryService
UNO service that was used to create instances of
the a11y classes for (mainly vcl) widgets.

The service was needed to break a dependency cycle.
However, with

    Change-Id: Ib46c87446dc9121d3b8e735e0e5a40594da73cc5
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Dec 17 12:04:04 2024 +0100

        a11y: Merge accessibility module into vcl

and all the preparatory commits in place, there
is no more dependency cycle, as the a11y classes
for vcl widgets no longer depend on any modules
"above" vcl.

Therefore, drop the UNO service and the abstract
vcl::IAccessibleFactory class and other related
classes.

Make all methods in the AccessibleFactory class
(that was previously subclassing the abstract
IAccessibleFactory) static helper methods,
and call them directly.

The UNO service dropped in this commit was
introduced in

    commit 1af510e951
    Date:   Wed Feb 21 11:30:47 2024 +0200

        Create an UNO service to do the symbol lookup in toolkit::AccessibilityClient

and its documentation was already clearly stating
that it's only meant for LibreOffice internal use:

> /**
>   The toolkit module uses this to get a pointer to the AccessibleFactory from the acc module.
>   Because we have a dependency in our modules that goes the "wrong" way.
>
>   @since LibreOffice 24.8
>
>   @internal
>
>   ATTENTION: This is marked <em>internal</em> and does not
>   have the <em>published</em> flag, which means it is subject to
>   change without notice and should not be used outside the LibreOffice core.
> */

Change-Id: Ib97396a4bad486d9530361dd851ad3ee0f9681b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178689
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-12-17 22:57:26 +01:00
Szymon Kłos 969f242f2e jsdialog: share code for widget registry
- move all helpers for widgets registration into
  separate file
- share code for Widgets, Menu and Popup register

Change-Id: I3449721d7e436ff4459edb7990c1af860b78054f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177738
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178205
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2024-12-10 12:15:42 +01:00
Noel Grandin 5155e21bf1 loplugin:unusedfields
Change-Id: Iac4a64af74c92cbd76335faa62e51fa80ef21789
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177718
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-12-04 10:22:09 +01:00
Noel Grandin 27509505be loplugin:unusedmethods tweak for less noise
Change-Id: Idedd1680b03f6b62ff80ad7d0fd74c11d1675053
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177533
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-29 18:42:08 +01:00
Xisco Fauli 980164fe22 svx: unused return
Change-Id: If747870121e3fc8c2d97b5fc769b2d928a4c3f9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176777
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-11-19 18:03:18 +01:00
Stephan Bergmann d44621c7a7 Adapt to LLVM 20 trunk QualType::isAtLeastAsQualifiedAs change
...in
<https://github.com/llvm/llvm-project/commit/b9d678d22f74ebd6e34f0a3501fb01d3d80984e7>
"[Clang] Use TargetInfo when deciding if an address space is compatible
(#115777)"

Change-Id: Ibe9e4882057edbdcdbd286416c3d317c292b2298
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176760
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-11-19 12:22:57 +01:00
Noel Grandin 193207c5ab improve loplugin passparamsbyref
I think I managed to disable this when I converted it to
use the shared plugin infrastructure.

So fix that, and then make it much smarter to avoid various
false positives.

Change-Id: I0a4657cff3b40a00434924bf764d024dbfd7d5b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176646
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-19 07:46:25 +01:00
Michael Weghorn 62c7d89c6a loplugin:dllprivate: Extend for new qtbase macro
Qt's qtbase commit [1]

    commit cecca90ff23ff27b9396defc21abd472b3fe0003
    Author:     Thiago Macieira <thiago.macieira@intel.com>
    AuthorDate: Tue Oct 1 11:26:30 2024 -0700
    Commit:     Thiago Macieira <thiago.macieira@intel.com>
    CommitDate: Tue Nov 12 17:14:46 2024 -0800

        moc: fix support for generating meta objects for nested private classes

introduced a new QT_OBJECT_GADGET_COMMON macro, causing my
`--enable-qt6` clang plugin build with current qtbase git dev
(as of commit 957e2be00a5c45223a5ef842a5f9f2f7b7be882b)
to fail as follows for classes using the Q_OBJECT macro:

    In file included from /home/michi/development/git/libreoffice/vcl/qt6/QtAccessibleRegistry.cxx:10:
    In file included from /home/michi/development/git/libreoffice/vcl/qt6/../qt5/QtAccessibleRegistry.cxx:11:
    In file included from /home/michi/development/git/libreoffice/vcl/inc/qt6/QtXAccessible.hxx:10:
    /home/michi/development/git/libreoffice/vcl/inc/qt6/../qt5/QtXAccessible.hxx:27:5: error: declaration nested in DLLPRIVATE declaration redundantly marked as DLLPRIVATE [loplugin:dllprivate]
       27 |     Q_OBJECT
          |     ^~~~~~~~
    /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qtmetamacros.h:145:5: note: expanded from macro 'Q_OBJECT'
      145 |     QT_OBJECT_GADGET_COMMON \
          |     ^~~~~~~~~~~~~~~~~~~~~~~
    /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qtmetamacros.h:132:5: note: expanded from macro 'QT_OBJECT_GADGET_COMMON'
      132 |     Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qtmetamacros.h:98:39: note: expanded from macro 'Q_DECL_HIDDEN_STATIC_METACALL'
       98 | #define Q_DECL_HIDDEN_STATIC_METACALL Q_DECL_HIDDEN
          |                                       ^
    /home/michi/development/git/qt5/qtbase/src/corelib/global/qcompilerdetection.h:190:46: note: expanded from macro 'Q_DECL_HIDDEN'
      190 | #    define Q_DECL_HIDDEN     __attribute__((visibility("hidden")))
          |                                              ^
    /home/michi/development/git/libreoffice/vcl/inc/qt6/../qt5/QtXAccessible.hxx:25:7: note: parent declaration is here [loplugin:dllprivate]
       25 | class QtXAccessible : public QObject
          | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       26 | {
          | ~
       27 |     Q_OBJECT
          |     ~~~~~~~~
       28 |
       29 | public:
          | ~~~~~~~
       30 |     QtXAccessible(css::uno::Reference<css::accessibility::XAccessible> xAccessible);
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       31 |
       32 |     /** Reference to the XAccessible.
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       33 |       * This is cleared once it has been passed to the QtAccessibleWidget,
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       34 |       * which then keeps an own reference and takes care of all required
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       35 |       * access to the XAccessible for the Qt a11y bridge. */
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       36 |     css::uno::Reference<css::accessibility::XAccessible> m_xAccessible;
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       37 | };
          | ~
    1 error generated.
    make[1]: *** [/home/michi/development/git/libreoffice/solenv/gbuild/LinkTarget.mk:339: /home/michi/development/git/libreoffice/workdir/CxxObject/vcl/qt6/QtAccessibleRegistry.o] Error 1

Extend the plugin to also take the new macro into account in
addition to Q_OBJECT.

[1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=cecca90ff23ff27b9396defc21abd472b3fe0003

Change-Id: I990f0b25010b3a0f0cc3902f732b93d13bb85d78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176702
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-18 10:17:08 +01:00
Stephan Bergmann 89714f9e3e Fix indentation
...accidentally broken by 16e3b84d2e "Improve
loplugin:dyncastvisibility to check for non-inline key functions"

Change-Id: Ie840803b4223fae76bcd72973b6a072eaa5e1d40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176598
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-11-14 17:13:32 +01:00
Stephan Bergmann 16e3b84d2e Improve loplugin:dyncastvisibility to check for non-inline key functions
This would have caught the issue discussed in
709b1f3ddb "Make sure VCLXPopupMenu has unique
RTTI".  (The commit message talks about RTTI there, while what Clang actually
compared for an optimized implementation of a dynamic_cast to a final class is
vtable pointers, but the overall picture remains the same.  Both RTTI and
vtables are emitted along the key function, and if that is missing or inline,
they are emitted for each dynamic library individually, and as internal symbols
on macOS.)

This commit also addresses all the issues found by the improved
loplugin:dyncastvisibility on Linux.  See the newly added TODO in
compilerplugins/clang/dyncastvisibility.cxx and
86b86ac87e "Give DocumentEventHolder (aka
EventHolder<DocumentEvent>) a key function" for an issue with key functions for
class template instantiations.

Change-Id: Ia19155efb1d23692c92b9c97ff17f18ae7a1f3ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176576
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-11-14 12:49:22 +01:00
Noel Grandin fb745b54d2 new loplugin:reftotemp
look for places where we are taking a reference (i.e. "&") to a
temporary object, which is misleading.

Change-Id: Id0eb4dce3f1ca559f86e02edcbea3ca17bea8e76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175978
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-13 13:08:16 +01:00
Mike Kaganski 55d2fdf4ba ignore OUStringChar in loplugin:rangedforcopy
where using a "&" in a for loop is overkill, and may even not be
the type of range elements

Change-Id: Idba3d84fc52d50a15d917576e07bbac754127126
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176480
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-13 08:54:04 +01:00
Noel Grandin 5fdfc074c9 loplugin:passstuffbyref make some small improvements
Change-Id: Ib14a2e6b41165887fcf99c3d155850faa8564822
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176218
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-07 17:20:09 +01:00
Noel Grandin 0269fb72e8 ignore TypedWhichId in loplugin:rangedforcopy
where using a "&" in a for loop is overkill

Change-Id: Ic0d14f6d19c50b49cf7ce3bf2166d546a4d2685b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176130
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-06 15:18:15 +01:00
Stephan Bergmann 25673aaeda Fix implementation of loplugin::isDerivedFrom
...where clang::CXXRecordDecl::forallBases is documented as:  "This routine
returns false if the class has non-computable base classes."  So, presumably
since
<https://github.com/llvm/llvm-project/commit/bf099f4682bf088aaa49b2c72fb1ef3250213fbb>
"[llvm][ADT] Structured bindings for move-only types in `StringMap` (#114676)"
changed

> -template <std::size_t I, typename ValueTy>
> -struct tuple_element<I, llvm::StringMapEntry<ValueTy>>
> -    : std::conditional<I == 0, llvm::StringRef, ValueTy> {};
> +template <std::size_t Index, typename ValueTy>
> +struct std::tuple_element<Index, llvm::StringMapEntry<ValueTy>>
> +    : std::tuple_element<Index, std::pair<llvm::StringRef, ValueTy>> {};

in LLVM's llvm/include/llvm/ADT/StringMapEntry.h, our !forallBases check here
started to trivially always be true for that struct tuple_element
specialization, so the isDerivedFrom check in
CheckFileVisitor::VisitCXXRecordDecl in
compilerplugins/clang/sharedvisitor/analyzer.cxx started to erroneously be true
for that struct, so it started to generate
compilerplugins/clang/sharedvisitor/*.plugininfo files with bogus extra

> InfoVersion:1
> ClassName:tuple_element
> InfoEnd

content, which in turn caused the generated
compilerplugins/clang/sharedvisitor/sharedvisitor.cxx to contain lots of

> #include "tuple_element.cxx"

and other nonsense, which caused the build to break with

> [CXX] compilerplugins/clang/sharedvisitor/sharedvisitor.cxx
> lo/core/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx:20:10: fatal error: 'tuple_element.cxx' file not found
>    20 | #include "tuple_element.cxx"
>       |          ^~~~~~~~~~~~~~~~~~~

etc.

(And now spelling out the implementation of forAnyBase here also reveals that
BaseCheckSubclass will never be called with a null BaseDefinition, so the code
handling that has been removed.)

Change-Id: I8a6e42260eae86852ec37a80d058777653fac394
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176042
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-11-05 12:47:54 +01:00
Noel Grandin 5de73f04f3 new loplugin:staticconstexpr
Change-Id: Ida1996dfffa106bf95fd064e8191b8033b4002f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175336
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-04 08:51:00 +01:00
Noel Grandin 19bc8856c4 move vcl::DeleteOnDeinit to tools
so we can fix a shutdown use-after-free in sot.

Change-Id: I32f83bd94627d72d7bee7ea2ebd6ab77a7f78435
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175335
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-22 08:01:19 +02:00
Caolán McNamara 1da035600a drop unused eventtesting cmd line option
Change-Id: I90edb80f3b414cbe0a81ecccbf1080106708a131
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172933
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-06 12:25:32 +02:00
Balazs Varga 3eac847927 tdf#161826 - Add uniform Glow effect for texts in shapes
- Add new text Glow effect properties for shapes

- Using TextGlowPrimitive for rendering uniform text glow in shapes

- Add/allow new UI Glow Effect for texts in shapes on sidebar
  (Only for Impress/Draw and Calc)

- Import/Export ooxml files with Glow effect on texts in shapes
  (Only PPTX/XLSX)

- Import/Export odf files with Glow effect on texts in shapes

- Add unit test for glow text attributes in ODF

- Add uni tests for OOXML import/export

Note: Also this patch effects on
tdf#144061 - Effects: Allow GLOW to apply to Text (as we have for shapes)

Change-Id: I16586c01654f197f532129e4e06aa2ef9f214395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172216
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2024-08-29 19:59:24 +02:00