3313 Commits
Author SHA1 Message Date
Neil Roberts 32e937ae2d Expand the smartpointerderefaddress compiler plugin to more ptr types
Instead of having a hard-coded list of smart pointer types, the plugin
now checks if the called type has a method called “get” which returns a
pointer with the same type as the overall expression. The intention is
that this should be general enough to catch all smart pointers.

Change-Id: I8c6f21f34a9debb81765155c544d0564c0f8ec58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211848
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-10-07 19:16:39 +02:00
Neil Roberts 48535514d4 Add a compiler plugin to detect &*smart_pointer
Adds a compiler plugin to detect cases of dereferencing a smart
pointer (such as unique_ptr or UnoCursorPointer) and then immediately
taking the address of the reference. In that case it is better to just
call get() on the pointer. This is particularly important if the pointer
can be null because in that case the initial dereference results in
undefined behaviour.

Change-Id: Ib1cca00c9180572f446721b90f83aa7fddb88c7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211756
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-10-07 08:42:08 +02:00
Stephan Bergmann ddb73f1538 Adapt compilerplugins to isCXX11ConstantExpr signature change
...in
<https://github.com/llvm/llvm-project/commit/2dc95bd763b87ffb563e2a90180bb7e8c49ec16a>
"[clang][AST] Make Result parameter of `isCXX11ConstantExpr` mandatory
(#226493)" towards LLVM 24

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I1f7d859559d095ab79e28a86a441c9c756b3fef7
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14253
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 361d0cf87c1ed06f5437ec03c33f317bf8d9b864)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211835
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-10-06 09:55:20 +02:00
Stephan Bergmann 63301fc8d2 Prevent assertion in loplugin:cppunitassertequals
> clang++: /home/sberg/github.com/llvm/llvm-project/clang/lib/AST/ExprConstant.cpp:22171: bool clang::Expr::isCXX11ConstantExpr(const ASTContext &, APValue *) const: Assertion `!isValueDependent() && "Expression evaluator can't be called on a dependent expression."' failed.

as seen at engine/sc/qa/unit/ucalc_pivottable.cxx:269

>     CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected data range.",
>                            static_cast<SCCOL>(FieldCount - 1), nCol2);

since 94299df72efeddb3d5af31396f5008300d66a90d "sc: Use #SPILL! error if the
pivot table output is blocked"

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I83f7949a7458ce030c13e94e2d9682ae080cc763
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1895
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit c3dec06e55716011a69d7b47163747007e05d905)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211834
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-06 09:55:14 +02:00
Michael Weghorn 9a61140c32 svx: Switch to weld::TreeView in LineWidthPopup
Instead of using a custom ValueSet subclass to
draw images and text next to them for selection
in the line width popup, use a weld::TreeView with
two columns: one for the image, and one for the text.

This is similar to what

      commit b185d34642
      Author: Michael Weghorn <m.weghorn@posteo.de>
      Date:   Fri Nov 28 14:12:04 2025 +0100

          tdf#168120 sc: Switch to weld::TreeView in CellLineStyleControl

did elswhere.

Adjust indices used to account for the fact that
weld::TreeView indices are 0-based while the ValueSet ones
are 1-based.

The special "Last custom value" entry so far was
using two separate images, depending on whether
or not it was enabled/sensitive or not: If it is
disabled, a greyed out variant of the image was used.
With the switch to weld::TreeView, leave that up
to the TreeView by simply enabling/disabling the
corresponding row using weld::TreeView::set_sensitive
for the corresponding row.

Drop the now unused LineWidthValueSet.

This switch to weld::TreeView reduces custom widget
logic and custom drawing and makes this more consistent
with other widgets used elsewhere (e.g. like for the
one mentioned in the commit above, the usual font
is used now as well, and it also aligns the behavior
more with that one.)

The popup for configuring the line thickness that uses
this code can be triggered like this:

* start Writer
* insert a chart using "Insert" -> "Chart..."
* select the chart wall in the chart
* open the "Properties" sidebar deck
* in the "Line" section of that sidebar deck, click on the
  "Thickness" button/combobox

Change-Id: I423e80bba9e81a98e80652f6486970d40286362e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211735
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-10-05 22:59:44 +02:00
Michael Weghorn dec8cca513 Revert "Ignore loplugin:pointerbool/implicitboolconversion ...
... for some soltools C programs"

The issues previously seen with current glibc versions are
now addressed differently by

    Change-Id: I53d66f280ea82d295a2c2c086f4d02a965a893d7
    Author: Stephan Bergmann <stephan.bergmann@collabora.com>
    Date:   Wed Sep 16 13:08:28 2026 +0200

        Adapt loplugins to glibc 2.44 assert macro internals

, so revert the previous workaround again.

This reverts commit 5d72f86b56.

Change-Id: Ide517b9592ee1dbf444f000f48b901d474352c07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211064
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-21 11:51:57 +02:00
Stephan Bergmann e53d782042 Adapt loplugins to glibc 2.44 assert macro internals
...which started to cause issues like

> [CXX] sal/osl/all/acceptableaccessdenial.cxx
> engine/sal/osl/all/acceptableaccessdenial.cxx:30:5: error: implicit conversion (IntegralCast) from 'bool' to 'int' [loplugin:implicitboolconversion]
>    30 |     assert(acceptableAccessDenials > 0);
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/assert.h:139:23: note: expanded from macro 'assert'
>   139 |       ? void (1 ? 1 : bool (__VA_ARGS__))                               \
>       |                       ^~~~~~~~~~~~~~~~~~
> engine/sal/osl/all/acceptableaccessdenial.cxx:30:5: error: redundant functional cast from 'bool' to 'bool' [loplugin:redundantcast]
>    30 |     assert(acceptableAccessDenials > 0);
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/assert.h:139:23: note: expanded from macro 'assert'
>   139 |       ? void (1 ? 1 : bool (__VA_ARGS__))                               \
>       |                       ^~~~~~~~~~~~~~~~~~

and

> [C  ] soltools/cpp/_tokens.c
> engine/soltools/cpp/_tokens.c:56:17: error: possibly unwanted implicit conversion when calling bool param [loplugin:pointerbool]
>    56 |     assert(trp->bp); // realloc failure is OOM -> no point to handle
>       |            ~~~~~^~
> /usr/include/assert.h:164:42: note: expanded from macro 'assert'
>   164 |     ((void) sizeof (__assert_single_arg (__VA_ARGS__)), __extension__ ({ \
>       |                                          ^~~~~~~~~~~
> /usr/include/assert.h:114:40: note: method here [loplugin:pointerbool]
>   114 | extern _Bool __assert_single_arg (_Bool);
>       |                                   ~~~~~^
> engine/soltools/cpp/_tokens.c:56:12: error: implicit conversion (PointerToBoolean) of call argument from 'Token *' (aka 'struct token *') to 'bool' [loplugin:implicitboolconversion]
>    56 |     assert(trp->bp); // realloc failure is OOM -> no point to handle
>       |            ^~~~~~~
> /usr/include/assert.h:164:42: note: expanded from macro 'assert'
>   164 |     ((void) sizeof (__assert_single_arg (__VA_ARGS__)), __extension__ ({ \
>       |                                          ^~~~~~~~~~~

and

> [CPT] compilerplugins/clang/test/consttobool.cxx
> error: 'expected-error' diagnostics seen but not expected:
>   Line 72: implicit conversion of constant &"msg"[0] of type 'const char *' to 'bool'; use 'true' instead [loplugin:consttobool]
> 1 error generated.

against glibc-devel-2.44-1.fc45.x86_64

[Cherry-pick note by Michael Weghorn:
clang-format was run on the files modified by this commit
to adhere to code style as mandated by the LibreOffice clang-format rules,
while the Collabora repository that this commit was cherry-picked
from doesn't check clang-format rules any more.
Based on the discussion in
https://gerrit.libreoffice.org/c/core/+/211063/comments/d368cf20_d66d1a50 ,
I'm adding myself as co-author to clarify the cherry-picked commit
contains those additional changes to the original commit by Stephan
from the Collabora main branch.]

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I53d66f280ea82d295a2c2c086f4d02a965a893d7
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12738
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ecce89b1fe7f0b1f09c13c46625b33443b1dadfb)
Co-authored-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211063
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-21 11:49:48 +02:00
Andrea Gelmini be7ff6a857 Fix typos in code and comments + some reformatting
Change-Id: Ic6fe197734655a2591a6730d07f23d4222a278f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210564
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-10 22:06:44 +02:00
Noel Grandin 3b52fbc96f merge EditTextObjectImpl into EditTextObject
this is a weird kind of pimpl pattern, lets just simplify it.

Which means we can remove the Clone() method in favour
of a normal copy constructor.

Change-Id: Ib5793c66df4729f48def8b3cead0f39f2ba94830
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10550
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit dd8a795b5aed4c44e11eef86eaf19b1f88edf0f8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210320
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-01 15:40:01 +02:00
Andrea Gelmini d5cfb2e0ac Fix typos
Change-Id: I9aaf267d867367d9888141130357667292114554
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210045
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-27 20:35:32 +02:00
Michael Weghorn 5d72f86b56 Ignore loplugin:pointerbool/implicitboolconversion for some soltools C programs
For now, disable these two clang plugins for C sources of
2 build tools in soltools. Otherwise, these were newly seen
triggering/failing the build after a glibc update on Debian testing
from 2.42-17 to 2.43-3:

    /home/michi/development/git/libreoffice/soltools/mkdepend/include.c:259:12: error: implicit conversion (IntegralToBoolean) of call argument from 'int' to 'bool' [loplugin:implicitboolconversion]
      259 |     assert(n < BUFSIZ);
          |     ~~~~~~~^~~~~~~~~~~
    /usr/include/assert.h:157:42: note: expanded from macro 'assert'
      157 |     ((void) sizeof (__assert_single_arg (__VA_ARGS__)), __extension__ ({ \
          |                                          ^~~~~~~~~~~
    1 error generated.
    make[1]: *** [/home/michi/development/git/libreoffice/solenv/gbuild/LinkTarget.mk:278: /home/michi/development/git/libreoffice/workdir/CObject/soltools/mkdepend/include.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    /home/michi/development/git/libreoffice/soltools/cpp/_tokens.c:56:17: error: possibly unwanted implicit conversion when calling bool param [loplugin:pointerbool]
       56 |     assert(trp->bp); // realloc failure is OOM -> no point to handle
          |            ~~~~~^~
    /usr/include/assert.h:157:42: note: expanded from macro 'assert'
      157 |     ((void) sizeof (__assert_single_arg (__VA_ARGS__)), __extension__ ({ \
          |                                          ^~~~~~~~~~~
    /usr/include/assert.h:117:40: note: method here [loplugin:pointerbool]
      117 | extern _Bool __assert_single_arg (_Bool);
          |                                   ~~~~~^
    /home/michi/development/git/libreoffice/soltools/cpp/_tokens.c:56:12: error: implicit conversion (PointerToBoolean) of call argument from 'Token *' (aka 'struct token *') to 'bool' [loplugin:implicitboolconversion]
       56 |     assert(trp->bp); // realloc failure is OOM -> no point to handle
          |            ^~~~~~~
    /usr/include/assert.h:157:42: note: expanded from macro 'assert'
      157 |     ((void) sizeof (__assert_single_arg (__VA_ARGS__)), __extension__ ({ \
          |                                          ^~~~~~~~~~~
    2 errors generated.
    make[1]: *** [/home/michi/development/git/libreoffice/solenv/gbuild/LinkTarget.mk:278: /home/michi/development/git/libreoffice/workdir/CObject/soltools/cpp/_tokens.o] Error 1
    /home/michi/development/git/libreoffice/soltools/mkdepend/main.c:525:12: error: possibly unwanted implicit conversion when calling bool param [loplugin:pointerbool]
      525 |     assert(p); // Don't handle OOM conditions
          |            ^
    /usr/include/assert.h:117:40: note: method here [loplugin:pointerbool]
      117 | extern _Bool __assert_single_arg (_Bool);
          |                                   ~~~~~^
    /home/michi/development/git/libreoffice/soltools/mkdepend/main.c:730:16: error: possibly unwanted implicit conversion when calling bool param [loplugin:pointerbool]
      730 |         assert(new_string); // Don't handle OOM conditions
          |                ^~~~~~~~~~
    /usr/include/assert.h:117:40: note: method here [loplugin:pointerbool]
      117 | extern _Bool __assert_single_arg (_Bool);
          |                                   ~~~~~^
    /home/michi/development/git/libreoffice/soltools/mkdepend/main.c:525:12: error: implicit conversion (PointerToBoolean) of call argument from 'char *' to 'bool' [loplugin:implicitboolconversion]
      525 |     assert(p); // Don't handle OOM conditions
          |            ^
    /home/michi/development/git/libreoffice/soltools/mkdepend/main.c:730:16: error: implicit conversion (PointerToBoolean) of call argument from 'char *' to 'bool' [loplugin:implicitboolconversion]
      730 |         assert(new_string); // Don't handle OOM conditions
          |                ^~~~~~~~~~
    4 errors generated.

Change-Id: Icc11df58e8ae4f092bb4c4147bfdfad1b53ffff5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209872
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-08-26 11:39:07 +02:00
Andrea Gelmini 756a83c929 Fix typos
Change-Id: Ice4b9f1b192d9649b7b8adbaa355e855d70610cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209885
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 14:31:47 +02:00
Andrea Gelmini 7ea3d23dab Fix typos
Change-Id: I66a132543f08b1ca84241e50fcfbc1d647e49dd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209886
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 11:24:49 +02:00
Andrea Gelmini 2f87617fb2 Fix typos
Change-Id: I7216801a3e1f44560e82ae27d7cdb66600f1d31b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209884
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 11:02:33 +02:00
Caolán McNamara 8749466df2 sc: convert remaining raw ScPatternAttr* class members to CellAttributeHolder
We have added various workarounds for ScPatternAttr use after free
issues since:

  commit 2e1f9da8a6
  Date:   Sat Dec 23 15:52:06 2023 +0100
      Decouple ScPatternAttr from SfxItemPool

separated ScPatternAttr from SfxItemPool.

Prior to that an ScPatternAttr was an SfxPoolItem held in the doc's
SfxItemPool which kept every item alive for the document's whole
lifetime, so any raw const ScPatternAttr* was basically safe.

The various workarounds for the new behaviour were:

  commit dca19993a4c732e95b9a47e1abdcaad6efbeebe9
  Date:   Sat Jan 6 14:40:28 2024 +0100
      tdf#159042: crash after changing cell style (if direct formatting done)

  commit 19437715eb415fe2c40b8b40dbe04ddca28f9a35
  Date:   Thu Sep 12 12:06:28 2024 +0100
      null pattern deref seen in ScViewData::SetEditEngine

  commit e384f2e8de9603ee65a3edc6dcb50b07116ee4fc
  Date:   Mon Mar 10 14:45:22 2025 +0000
      crashtesting: crash on reimport of xlsx output of forum-pl-2758.ods

  commit 7999585bd8378f1a8d04ea2a9a93a8e0bf4d8eb6
  Date:   Fri May 9 08:50:17 2025 +0100
      crash on null pattern de-ref

  commit 1bf9bbea96
  Date:   Tue Oct 28 16:53:49 2025 +0300
      tdf#169115: sc: fix use-after-free bug in ScDocument::FillInfo

  commit 9f366af81478ad218dc2ef2e37423a9ebcc84e73
  Date:   Sat Apr 25 14:47:02 2026 +0200
      ScPatternAttr use-after-free

  commit 20fe691a18fb35120d0765dd1519acd6d2986c38
  Date:   Tue Apr 28 08:33:34 2026 +0200
      ScPatternAttr use-after-free (2)

This commit picks the class member fields that are still raw
ScPatternAttr* and converts them to CellAttributeHolder:

  ScUsedAreaIterator::pPattern and pFoundPattern
  ScInputHandler::pLastPattern
  LotAttrCol::ENTRY::pPattAttr
  ScPatternCache::Entry::pPattern

The CalcAll() workaround from 9f366af81478 then doesn't seem to be needed(?)

A new compiler plugin catches class member fields of raw type
ScPatternAttr pointer.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ibb9f28b8fcaa5470c7a82eee52900c2d60434e41
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3163
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 9c7b6313a29067bf0eef12884fc3ce7efb0374e5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209822
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-08-25 08:52:44 +02:00
Andrea Gelmini cf0a1268e3 Fix typos
Change-Id: Ib8964b0b98005da480826cfdd2c64bd68c88575c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209460
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-22 10:15:11 +02:00
Michael Weghorn a8e8ff5dcc sd: Move some presenter console helper classes to Library_sdui
These classes are only used by the presenter console
implementation in sd/source/console/, so move the
classes there as well, which implies moving them
from Library_sd to Library_sdui and no longer having
to have PresenterHelper.hxx in an sd-wide internal
include directory and there is no more need for
PresenterHelper to be SD_DLLPUBLIC.

In other words: Make clear these are implementation
details of the presenter console, and not used
elsewhere.

Change-Id: Ica2a516215344360f647c121b5f0942a67f54ea3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208744
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-28 23:36:25 +02:00
Michael Weghorn 3aad0eac0e tdf#172275 tdf#172831 cui: Drop unused CustomNotebookbarGenerator
This class is unused now after

    Change-Id: If15d1519cea179596bd72aaf5354d01f89ccb9e7
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Jul 27 13:38:37 2026 +0200

        tdf#172275 tdf#172831 cui: Drop unused SvxConfigPage::m_s{App,File}Name

Drop it.

Change-Id: Ic670d1db42f2262ee67d87b84819bf0aab8d9c30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208673
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-07-28 23:20:51 +02:00
Michael Weghorn 968bc97a37 tdf#172275 tdf#172831 Drop unused SvxNotebookbarConfigPage
SvxNotebookbarConfigPage is unused since

    commit 7312d7d3c9
    Date:   Wed May 20 15:28:42 2026 +0200

        Relates tdf#166641 - Add category labels to Writer's Tabbed Notebookbar

        * gla11y-conform
        * consistent IDs (gd*/lb* and btn*/bx*)
        * consistent layout with grids
        * defined spacing of 3px
        * defined margins of 6px
        * category labels
        * redundant Insert sections from Home and Forms from Tools removed
        * customization of Notebookbars removed since the new position
        of commands is not properly found

and its ctor was dropped in

    commit 00aebb5e88
    Date:   Fri Jun 26 18:55:24 2026 +0200

        loplugin:unusedmethods

. Drop the class altogether, along with the code
commented out since the above commit that would
have used it.

Change-Id: I45bcbdcbf89d8f50b18512cde81d7af26e52a2a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208668
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-28 23:20:07 +02:00
Khaled Hosny 169e5daed0 vcl: Rename psp::PrintFontManager to FontConfigManager
“psp” stands for PostScript print, there is no PostScript and the class
has nothing to do with printing.

Change-Id: I45ceb4b5deb5ae9cbb731158a5f84f0d716c6036
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208527
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-24 11:28:39 +02:00
Khaled Hosny c88d615db8 vcl: Consolidate the Linux font code under vcl/unx/generic/font
The FreeType/fontconfig font backend was spread over three directories
mostly for historical reasons. Lets clean this up and consolidate it
under one directory.

helper.cxx holds the psp path helpers, so it goes to print/ next to the
rest of the printing code.

Change-Id: I67d20e3e4bdf71d978a79e672bb31d3dd1460595
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208522
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-24 02:58:02 +02:00
Michael Weghorn 60ca33c3f5 basctl: Drop MacroExitCode enum class in favor of regular dialog ret vals
The MacroChooser dialog is only run from the ChooseMacro
function.

As mentioned in previous commit

    Change-Id: I49b6702c0083014d10c16b6917284cc8cc23d283
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Tue Jul 14 08:53:17 2026 +0200

        bactl: Flatten ChooseMacro

, that one only cares about MacroExitCode::Macro_OkRun
and returns early for all other dialog return codes.

Drop the MacroExitCode enum class and use a regular
int return values of RET_OK instead of MacroExitCode::Macro_OkRun
and RET_CLOSE for the others directly instead of casting
back and forth between int and enum class values.

The dialog can be triggered like this:

* start Writer
* "Tools" -> "Macros" -> "Run Macro..."

Change-Id: I49b6702c0083014d10c16b6917284cc8cc23d283
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208061
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-07-18 14:31:09 +02:00
Michael Weghorn 9cc83fde77 basctl: Drop unused MacroExitCode::Macro_Edit
Change-Id: Icd04422b5ee453604221325f200dfb38c1dd8051
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208060
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-07-18 14:30:27 +02:00
Caolán McNamara 8d0cb8f2e9 remove the write-only second animation sound field
loplugin:unusedfields already lists it as only used in the constructor.
Drop it, and note in its place that the second effect's sound URL really
lives in the shape's bookmark string, not in a sound field of its own.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I6ba402fd6e8052d6533f396d746da735abbf27bd
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4809
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 9d96470a60ad0c783fd3836bfc7f22ea91c5c24a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207282
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-25 15:36:57 +02:00
Michael Stahl 592e67c4f2 desktop: convert oosplash to C++ and use comphelper::Hash
Also fix all `loplugin` warnings in start.cxx.

Not sure to what extent the "SingleOfficeIPC" pipe name is still
considered a stable API, likely not any more, using something other than
MD5 could be an option too ...

Also convert the other "SingleOfficeIPC" thing here.

Signed-off-by: Michael Stahl <michael.stahl@collabora.com>
Change-Id: I4561a880e8321d191144954687870aaa122fff75
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4671
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
(cherry picked from commit f50ea835b44dca17405df004fb5b04a8478833d6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207203
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-24 00:06:59 +02:00
Xisco Fauli f5ec7e537f Revert "tdf#162563 Drop Applet and Plug-in object support in Writer filters"
This reverts commit ccbbb20630.

it breaks the published API

this commit also reverts part of
commit 6f81bce807
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date:   Wed Jun 3 12:34:28 2026 +0200

    loplugin:unusedmethods

Change-Id: I827142fec0d2fa911d3c7ae60ef78d9701c2f06c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206708
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-17 08:53:34 +02:00
Michael Weghorn 540acea541 vcl: Drop vcl::Window::DumpAsPropertyTree
The logic was relevant for Collabora Online/jsdialog,
but Collabora Online no longer uses this repo and
jsdialog support was dropped in

    commit 8a91868e21
    Date:   Tue Jun 2 14:53:19 2026 +0200

        drop JSDialog machinery

This was (also) used in the dumpState function in
vcl/source/app/lok.cxx for debugging purposes
when using LibreOfficeKit to dump more information
about the vcl::Window hierarchy. Drop the call to
it there, but leave dumping other information
in place there.

Change-Id: I8033516ecdf21f2c1b3a498774ef8ba54a91fdc5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206012
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-05 08:00:44 +02:00
Xisco Fauli 8a91868e21 drop JSDialog machinery
It's no longer needed and not used internally

Change-Id: Iecb0d1055fd6c61d0c34ffb8afc670ab9d5fe899
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205908
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-02 20:15:18 +02:00
Xisco Fauli 8754a75d98 vcl: drop WeldedTabbedNotebookbar
"WeldedToolbar" no longer exists after
commit fd65cea59c
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date:   Mon Jun 1 17:14:35 2026 +0200

    drop notebookbar_online.ui

Change-Id: I2b90745e184321d4973b087003c25a7882e2111e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205907
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-02 17:25:28 +02:00
Gabor Kelemen ccbbb20630 tdf#162563 Drop Applet and Plug-in object support in Writer filters
Change-Id: I3ddd4ed7629756506321edf51e747241b2d3e81d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3202
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 3abdb40559d69265100acf1b1c5c96596933c994)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205873
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-01 16:30:00 +02:00
Gabor Kelemen 6614d453b3 Remove SwFilterOptions in favor of officecfg calls
also improve readability a bit

Change-Id: I2087db966eb7bcecc0bbe768ba64c469e6a84c33
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1639
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 49ab60f14acd6597b84bdae1e73f153bd564422a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205500
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-22 01:06:42 +02:00
Xisco Fauli a17fc2f658 i18nlangtag: remove applelangid.hxx
Since
commit f1e8fee31e
Author: Khaled Hosny <khaled@aliftype.com>
Date:   Sun Apr 12 23:26:41 2026 +0200

    vcl: Read more names in sft.cxx using HarfBuzz

Change-Id: Ic56c9c68562070b894a1f5119d419f908254261a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205439
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-20 14:30:18 +02:00
Xisco Fauli 85baadc11d related tdf#137308: remove unused InflateZstd
If needed, this patch can be revered later on

Change-Id: I83ce659bbd0070fd3f42e2961e9cf8a11db8dc40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204594
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-30 12:30:31 +02:00
Xisco Fauli cfd3309a5d loplugin:unusedmethods
Check existing ones that can be removed

Change-Id: I6ee6fc1772c620ac5d12fea915681b094b7c3bfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204583
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-30 08:54:45 +02:00
Xisco Fauli fb089992b3 starmath: drop unused class SmMLExportWrapper
Change-Id: Ie433241a0ad06b0600dfd9feaa3c84225ab0ba7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204564
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-04-29 15:35:20 +02:00
Sergey Anisimov 64c7eac192 tdf#170681 - Using separated QThread for Qt frame grabber
Triggering event processing in the soffice process in
QtFrameGrabber::grabFrame is problematic. To avoid
this, using separated QThread (and QEeventLoop)

Change-Id: Id51c14c09842e7a003b6da665d85f67605fdf697
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199083
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-03-26 12:02:23 +01:00
Noel Grandin 06cbb383c9 loplugin:redundantfcast improve to find redundant double casts
Change-Id: I0d0ff9035e5bb5bc3f3b4c903bf221ed8d34a141
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202154
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-22 20:19:39 +01:00
Balazs Varga 6a69c9e2ac tdf#78486 sc: add pivot table calculated field support (core + OOXML)
Introduce calculated field infrastructure across the pivot table stack:
cache (ScDPCache::CalculatedField), filtered cache, data sources
(ScSheetDPData, ScDatabaseDPData, ScDPGroupTableData), result
calculation (ScDPTabRes), dimension supplier (ScDPSource), and
save/restore (ScDPDimCalcSaveData). Add new ocDPFieldName opcode
and formula compiler support for pivot field references.
Handle OOXML import/export of pivot calculated fields.

Change-Id: I42d094122d547b8ee9a2b63f809bdb13127f8f01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197913
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga@collabora.com>
2026-03-13 08:05:40 +01: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
Noel Grandin 5505d3bc4d loplugin:constparams
Change-Id: I33c701be5a441c1121b797f1eb5a8bda6fc3f89b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200927
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-03-04 11:29:39 +01:00
Mike Kaganski 800e7fd2ff Simplify mutex handling here, use more RAII
That required improving UnusedVariableCheck to honor [[maybe_unused]].

Change-Id: I01f3fd92d78726582f873681c807315b029c4e89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200032
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2026-02-23 14:38:56 +01:00
Stephan Bergmann 96cc64e29c Fix a loplugin:bufferadd false positive
(which would hit some yet-to-be-committed code)

Change-Id: I101ae4f7d00ece9d48c96764114668484b0fdd5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198660
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-04 16:54:59 +01:00
Mike Kaganski d0e23db89a Drop MacrosTest::Resetter, and use comphelper::ScopeGuard
Change-Id: I2214724567a58174b175a17fbabec7a5249e4df8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198482
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-02-01 19:38:44 +01:00
Armin Le Grand (collabora) fde80f0497 SmartArt: Adapt DiagramModel
Up to now with lots of effort ModelData was held at the
svx::diagram::Point to keep a stripped version of Text and
TextAttributes and also a selective (not complete!)
key/value list of attributes for each shape itself
(fill/line/text/...).

These had to be moved to/rescued from oox::Shape that is
used as helper at import to that model after import, set again
at the oox::Shapes when XShapes had to be re-created, you name
it - very complicated and error-prone, and never complete
by definition.

Nonetheless data in OOXML MSO format, so pretty easy to re-
export if necessary /that's what I was looking at last
changes).

That also meant that all changes done to an XShape/SdrObject
*had* to be somehow transfered to that diagram model data,
too. We have no converters for that at all, target would
be data representation as in OOXML files.

What we *have* is import to our model using oox::Shapes and
ccreating XShapes/SdrObjects, and export XShapes snippets
'direct' to MSO ooxml formats.

Thus I thought about to use what we have, for the cost to
split the model: the DiagramModel *has* to be kept to be
able to re-create the Diagram on structural changes, that
is needed. But the attribute & text data can stay at the
associated XShapes that need to exist and get created
anyways.

That needs reliable identification of the XShapes
belonging to the model. It requires to load that Diagram
initially, using the oox::Shapes which have the complete
attribute model data to create the XShapes.
Remember that there is a 2nd import, from the
ReplacementGraphic which (may) be contained in the MSO
file.

From that moment on changes on those XShapes will be
diagram model changes if attributes get changed.
But they will not need to forward changes to the
DiagramModel in another format.

When re-layouting it means to copy that data from old
XShape to new XShape, before these get deleted. There
may be new XShapes that need to be initialized, too.

For export this means that part of that export will have
to use the XShapes as model data as needed.

This also means that the quality of im/export of
Diagrams will in the future rely on the quality of our
existing im/export snippets for XShape/oox::Shape/oox.

These are developed and in use for a while now and
should have reached a good quality. If we have to
improve these that will always improve im/export
and Diagram stuff then, too.

This change does that big change and looks promising,
doing what it is intended to do. I still have to
experiment, so in master it is still deactivated due
to being too dangerous yet, see last SmartArt change
and mention of ACTIVATE_RECREATE_DIAGRAM_DATADOMS and
it's description.

Change-Id: Ife1591b0d3c8974d90a1004d94f3e6799be85a56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198221
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2026-01-28 10:37:40 +01:00
Stephan Bergmann 28951381c6 No more need for ReservedId::isInLokIncludeFile special casing
...after 5bc9425900 "Avoid illegal names also for
the LibreOfficeKitGtk structs" removed the remaining offenders

Change-Id: I274486459dfc109c4d2e103d7ec41b0655657e77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198111
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-01-26 08:13:43 +01:00
Tor Lillqvist 5bc9425900 Avoid illegal names also for the LibreOfficeKitGtk structs
Change-Id: If8b5987e0779ece9518384f88a0363a3c596d7ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197937
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-01-25 22:33:22 +01:00
Tor Lillqvist 3404d99464 Don't use illegal identifiers in LibreOfficeKit
Identifiers with an initial underscore followed by an uppercase letter
are reserved for the C++ implementation.

Change-Id: I3eabc8aa3570b17e05259c0d56d3b16246335ffc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196572
Tested-by: Tor Lillqvist <tml@iki.fi>
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197868
2026-01-23 07:28:03 +01:00
Armin Le Grand (collabora) bd047bbb9e SmartArt: Preparations for roundtrip
The DiagramModel uses 4 mandatory and three optional XMLDoms
for it's data. These get imported, but to get to a roundtrip
we will need to be able to create & save these again.

Last changes prepared this by deleting XMLDoms which were no
longer valid dependent of changes done to that DiagramModel.
When exporting the availability of these gets checked and if
all are there, it gets exported as Diagram (in MSO format,
not yet in ODF). If nothing was changed the original Doms
get exported - untouched.

That test will now try - if e.g. the most important XMLDom
OOXData is missing - to re-create this in that action. The 1st
one which I now implemented that is the OOXData which homes
the Point/Connections/BGFill data (and some more).

Due to this needing testing I for now encapsulated this
to a EnvVar called ACTIVATE_RECREATE_DIAGRAM_DATADOMS, so
this will for now only happen when this is set. Anyways all
that stuff is still behind the 'experimental features' wall.
This is and stays experimental for now.

These are already deep changes which need to get tested and
get to master, opening the path to experiment with it and
refine it. Due to the EnvVar gate no real changes should
happen in master, but due to the changes around it this
will need to be checked this way.

Change-Id: Iabba69b19387e45f1028843a25f3bae1fc4f8fe8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197676
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2026-01-22 10:59:37 +01:00
Xisco Fauli 5765c5f197 svx: Overlay*BitmapEx -> Overlay*Bitmap
and OverlayBitmapExPrimitive -> OverlayBitmapPrimitive

Change-Id: I0f65f3a6e5270ca0039ba920da8e178cde6f3e74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197588
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-01-20 08:52:03 +01:00
Xisco Fauli 2ea359044c drawinglayer: GeoTexSvxBitmapEx*-> GeoTexSvxBitmap*
After
commit 805ef97f52
Author: Noel Grandin <noelgrandin@gmail.com>
Date:   Tue Aug 12 22:19:45 2025 +0200

    BitmapEx->Bitmap in GeoTexSvx

Change-Id: Ic393ff4de51be0eb8c5859605135695f8f92f472
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197587
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-01-20 08:51:25 +01:00