Commit Graph
22287 Commits
Author SHA1 Message Date
Khaled Hosny 6cad38dece tdf#159251: Blind fix
Hopefully fixes regression introduced in:

commit 611694b707
Author: Khaled Hosny <khaled@libreoffice.org>
Date:   Thu Aug 17 17:39:29 2023 +0300

    vcl: Allow pushing/popping OutputDevice’s RTLEnabled state

Change-Id: I9236bd6951d83a512390934127031204d94d14bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163877
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
2024-02-24 13:40:42 +01:00
Noel Grandin e2cacf0456 move this header inside the module
it is not used anywhere else

Change-Id: I46cc42397cf56237818e6e58268a856e826a9985
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163818
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-24 10:13:19 +01:00
Noel Grandin 4603aa2888 use more string_view in tools::JsonWriter
Change-Id: Ia3ac54a1164b99a806298a47115ea3bc570f3b0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163810
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-23 16:50:33 +01:00
Stephan Bergmann 7d0f925453 Propagate by-ref Sequence::operator[] return type through lambda
Change-Id: I029ae2ff5ab6f73681afc5920dc9aba90cd32539
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163814
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-02-23 13:33:04 +01:00
Oliver Specht 8b191a6566 tdf#159793 Save printer paper tray in RTF and DOCX
Saves the paper tray id as w:paperSrc w:first and w:other in docx
and \binfsxn and \binsxn in RTF
Change-Id: I79004f54aba3b6609d7921afacf815726f7f2678

Change-Id: Ie3c11fffa6a133250b7db69b4e845bccaa8e2280
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163654
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-02-23 12:11:42 +01:00
Mike Kaganski b3e6bec350 Fix warning C4589 when building with MSVC without -Wv:18
Discovered by https://gerrit.libreoffice.org/c/core/+/163717

Like these:

 C:\libcmis\inc\libcmis/document.hxx(51): warning C4589: Constructor of abstract class 'libcmis::Document' ignores initializer for virtual base class 'libcmis::Object'
 C:\libcmis\inc\libcmis/document.hxx(51): note: virtual base classes are only initialized by the most-derived type
 C:\libcmis\inc\libcmis/folder.hxx(58): warning C4589: Constructor of abstract class 'libcmis::Folder' ignores initializer for virtual base class 'libcmis::Object'
 C:\libcmis\inc\libcmis/folder.hxx(58): note: virtual base classes are only initialized by the most-derived type

Change-Id: Icc7f94cc02796a86b47b025df69ec3db971ad11e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163777
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-23 01:34:11 +01:00
Armin Le Grand (allotropia) 3a6bc34f07 IASS: Re-define Text suppression for TextEdit
The current version suppressed text for Objects
in edit mode for the paint in the view since that
text is painted/visualized by the EditEngine/Overlay
while it is being edited, so that would be displayed
twice - and in different states.
That is correct, but e.g. also suppressed display
for e.g. an opened second Window for the Document or
in a running SlideShow.
The mechanism uses embedding the Text in case it gets
edited to a simple Primitive that then can be
suppressed by the view rendering it. It decomposed
to empty, thus to visualize it a renderer had to
actively identify and process it.
I now turnedd this around - it is a normal
GroupPrimitive2D and decomposes to the text content,
so will be visualized by all renderers that do not
actively suppress it. To actively suppress it I added
a get/setTextEditActive marker to ViewInformation2D
that will be used by the ObjectContactOfPageView
to signal exactly that and to suppress in the pixel
based VCLRenderer in that case.
This is important e.g. for 2nd view window, but also
for PDF export with active TextEdit (yes, happens)
and SlideShow.
There was also support missing for an up-to-now
empty/new object (no text yet) so that text from the
active TextEdit was not provided, corrected that.

Change-Id: I0d8befdb023028d78ce341091331e9a83a0173bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163773
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-22 23:23:05 +01:00
Caolán McNamara 006a8e3186 split TextAsPolygonExtractor2D for more general reuse
Change-Id: I102ccab2a423c38b0414c9565fec349aa6ffb5af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163725
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-22 13:01:16 +01:00
Noel Grandin b9c64630d2 UBSan RTTI fixes
after I missed a bunch of stuff when testing UBSan with
    commit 3ba92b5f1e
    hide more symbols

Change-Id: I0743a0c0c6abcb2904face8386e26153ae3229a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163718
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-22 10:40:33 +01:00
Noel Grandin a5ccdbbc45 UBSan RTTI fixes
after I missed a bunch of stuff when testing UBSan with
  commit 3ba92b5f1e
  hide more symbols
Change-Id: Id3cb0b70b9fa24c7e3fba7fd565eb658dafa00f8

Change-Id: I369587ed3e14e50ca272037b9d950b62841695d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163703
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-22 06:59:23 +01:00
Mike Kaganski 6329a56f60 Implement SAL_WNODEPRECATED_DECLARATIONS_[PUSH/POP] on MSVC
Required for --disable-nss build on Windows, which needs the same fix as in
commit 71d4abc51b (-Werror,-Wdeprecated-declarations
(Emscripten), 2024-01-18).

Change-Id: I4206cbc0cb80be7ddee1c3f21de50d853828300e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163704
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-21 21:43:15 +01:00
Stephan Bergmann 1c387bbf2f Fix UBSan build's RTTI needs
...after 3ba92b5f1e "hide more symbols" had caused
CppunitTest_ucb_webdav_core to fail with

> DynamicLibraryManagerException: "Failed to load dynamic library: workdir/LinkTarget/CppunitTest/libtest_ucb_webdav_core.so
> workdir/LinkTarget/CppunitTest/libtest_ucb_webdav_core.so: undefined symbol: _ZTIN9ucbhelper16PropertyValueSetE"

etc.

Change-Id: I54832b1c7a9850e536bfcab076f15465b170a065
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163690
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-02-21 15:18:19 +01:00
Attila Szűcs 57ac7b73e8 tdf#67347 fix regression stacked text in calc
Added a new element (STACKED) to EEControlBits.
It would be better to use only ONECHARPERLINE, but calc and impress
used it from different places, and couldn't recognise each other,
so they may overwrite each other.

With this fix they both set a separate flag, and editeng check if
any of the flags are set.

regression was made by: I535da45e3a2f2d1550bad2a40e9909e0d561d0ef

Change-Id: I60496059f3ce2773b232970bf2c3b7264ce64c5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163682
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-21 15:13:32 +01:00
OmkarAcharekar 01e0931ba4 tdf#130857 - Drop unused getUIFile method from VclBuilder class.
Noticed during refactoring builer patch [1], the getUIFile method is not been used anywhere. So it make sense to drop it.

[1] https://gerrit.libreoffice.org/c/core/+/163103/4..5/include/vcl/builder.hxx#b76

Change-Id: I8bf1eec7aaccac528959029cddff0cdc8209ba00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163662
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-02-21 10:02:57 +01:00
AkshayWarrier 8cd4cd31e9 tdf#157882 svx: Remove cap/corner styles and move arrowhead control to new row
Change-Id: Ifa38ec7ba9969627ff26abe22c58d06ec373ecb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162403
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-02-20 20:54:17 +01:00
Attila Szűcs 684d63e133 tdf#67347 fix stacked text kern problems
Disabled some kerning calculations in case of stacked text.

Without this:
-x position of characters was strange, and the last characters
was different.
-thin characters, like 'j', 'i', ' ', ... could result issues
at editing the text. (if width of character + kern was < 0)

Change-Id: I40a23ef445fc9683a1cfd619ea23f1536c525d1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163608
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-20 18:38:00 +01:00
Armin Le Grand (allotropia) 9bd2012df7 ITEM: Speedup SlotIDToWhichID translations
With ItemInfoPackages we now can have a buffered, static
global translation table from SlotIDs to WhichIDs since
the ItemInfoStatic used already contains all the needed
information.
Register that in registerItemInfoPackage at the Pool and
use it for lookup. That speeds up the lookup from O(n)
to O(1). Since that lookup is used in UI and UNO API
implementations this has positive effect on load/safe,
but also all interactive stuff in the whole office.

NOTE: I tried to use a merged version of that translation
table in the parent pool, but this shows double SlotIDs,
what is no wonder since that's what those are used for:
To get different WhichIDs for a SlotID in Item handling.
This *might* prevent getting rid of the chanined Pools
at all - sadly. The returned WhichID directly depends
on which Pool the function(s) GetWhichIDFromSlotID and
GetTrueWhichIDFromSlotID are called.

NOTE: Very strange is that the parameter 'bDeep' in that
functions is *not* passed down to the call to the
secondary Pool - probably an error, but risky to fix,
that may change already the behaviour :-(

Change-Id: Iea77ffad0f6a5401ab74fea0bbfc2589c66680ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163597
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-19 20:04:34 +01:00
Mike Kaganski 3c01b243a5 Unfriend SetTempNameBaseDirectory
TempFileNamed: :GetURL is enough in this case.
Change-Id: Id5eb66103328b063cb7dc64472fc5ba556a51109
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163578
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-19 10:03:14 +01:00
Miklos Vajna e3c0aeec83 svx: prefix members of XFillGradientItem
See tdf#94879 for motivation.

Change-Id: I3d951d553d524cedc876330a70e6fe94edba0173
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163579
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-02-19 09:11:25 +01:00
Noel Grandin 3ba92b5f1e hide more symbols
using the bin/find-can-be-private-symbols.py script
to find classes with large numbers of exported symbols
that can hidden.

before
exported       = 58104
imported       = 30810
unused_exports = 35433

after
exported       = 55094
imported       = 31073
unused_exports = 32423

Change-Id: Idd0a70ee3740afd5ca1a86771e0e2ff8090d102d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163456
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-19 09:09:06 +01:00
Kurt Nordback 1cda27cf69 tdf#50934: OfPie inport from OOXML, plus initial work for export
Change-Id: Ie17b583af28d274b3e7817c646dd4f5873e03fef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160733
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-19 01:29:36 +01:00
Balazs Varga b36ecef07a tdf#128425 Add Excel2021 function XMATCH to Calc
https://issues.oasis-open.org/browse/OFFICE-4155

Change-Id: I7791ab873cf62ce882feba75dc0d722bc5990f9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163260
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2024-02-18 23:13:01 +01:00
Armin Le Grand (allotropia) cebbd5795d ITEM: Rename for more control over SlotID usages
Change-Id: I51585f1c15984a066262023184f668662853d20f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163556
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-18 21:37:52 +01:00
Mike Kaganski 1f5efbf8b9 Generalize search algorithms in sorted_vector
This allows to simplify the code somewhat, and also to relax requirements
to the arguments, e.g. allowing to pass const objects to search in vector
containing non-const objects.

Change-Id: Id34911a8694bbdec275d22b51ca4a0845c9fa4c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163519
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-17 10:07:38 +01:00
Attila Szűcs f846efa507 tdf#67347 pptx import: stacked text, minimal impl.
Display Stacked text, and
Import/Export Stacked property from/to pptx.

It is a minimal implementation, it does not import/export to .odp,
there is no user interface to set this property.

Multiline Stacked text is rendered as 1 line text.
XML_wordArtVertRtl is mapped to XML_wordArtVert.

Editing of text containing space character seems to
not work correctly.

Change-Id: I535da45e3a2f2d1550bad2a40e9909e0d561d0ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163121
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-16 13:07:18 +01:00
Damjan Jovanovic 6c04b8356c i#112829: offer svg as clipboard format as well
When copying charts, shapes, etc. out of LibreOffice, export them to
the clipboard in the (lossless) SVG graphics format as well.

This can be pasted into GIMP, Inkscape, and other apps, unlike our
current WMF/EMF clipboard formats which use private MIME types that
nothing supports.

(cherry picked from commit 61aee323790d0a1ed0745ee5a84b8885bcd0a559)

Change-Id: Ia32be448a096154bb092d49f372148c6b2263f35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163412
Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-02-15 22:09:34 +01:00
Samuel Mehrbrodt 70b287d599 Improve wording for security warning infobar
Change-Id: I385ec268f4848f02d8fe49d24e32b0b9729acded
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163444
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-02-15 21:22:33 +01:00
Michael Meeks 52f2720af1 lok: implement a joinThreads function - to wind down thread pools.
Necessary to do this before forking on Unix systems; use a
dynamic_cast interface since this is all for internal use.

Change-Id: I8a911322acd4ec5654eb0d14804c09d513a0bd4b
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163335
Tested-by: Jenkins
2024-02-14 17:29:02 +01:00
Patrick Luby 6525b488c5 Fix build breakage with --enable-mergelibs on macOS
With Xcode 15.2, --enable-mergelibs started failing so export a couple
constructors.

Change-Id: If41b167bb349976f38c5da9385824d5f51dc5398
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163326
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-14 09:40:12 +01:00
Attila Szűcs 0f4002378d fix windows UNLESS_MERGELIBS
it was needed to fix a linker error in my system

Change-Id: I5eeebf0db569289aace32f61535ae2ba7148de48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163327
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-14 07:57:24 +01:00
Noel Grandin 34a09df2d1 fix windows --enable-mergelibs build
after
    commit b663d94cf6
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Mon Feb 5 08:50:24 2024 +0200
    create --enable-mergelibs=more

Change-Id: Ib9f0b3b28df70a9bab10d9bb0aa77a2b2decc616
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163308
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-13 18:53:21 +01:00
Xisco Fauli ac2949ddaf UnoApiXmlTest: factor out common code
Change-Id: I5c7f76b61a0dab8b4ebd1ac4680a7c25f982680c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163307
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-02-13 16:10:03 +01:00
Noel Grandin 033aaeec9e use more UNLESS_MERGELIBS
Change-Id: I351a9127fb26369d8f598b6d6519d7e490fa476b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163190
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-12 20:25:54 +01:00
Stephan Bergmann 8b53fa726e Introduce a fundamental.override.ini for bootstrap variables
...that is looked for next to the application and, when present, overrides all
the other ways of setting bootstrap variables.  LibreOffice itself does not
bring along such a fundamental.override.ini, but it can be convenient for an
administrator to place one in the installation (which can then not be modified
or overridden by end users).

(For convenience, the naming of this ini-file starts to deviate from the old and
rather pointless tradition of naming our ini-files *rc vs. *.ini on different
platforms.)

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162187
Tested-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
(cherry picked from commit f4d376e9a10a8c66f7f6ecfe6a1f4763c1927b52)
Conflicts:
	sal/rtl/bootstrap.cxx

Change-Id: I057cc67b1af1d806587c3a4dc0bc31c28e79d22b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163251
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-02-12 19:02:13 +01:00
Oliver Specht 828d2637fd tdf#159662 Add table alignment and left/right spacing to sidebar in Writer
Change-Id: I12d898f21ca8c7d581aaa1c587c5b6434a35f516
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162769
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-02-12 18:17:18 +01:00
Heiko Tietze fe4e750d32 Resolves tdf#158531 - Connector lines for Keep Ratio setting
Icons taken from https://thenounproject.com/icon/lock-89649/ and
https://thenounproject.com/icon/unlock-89647/ (licensed PD)

Change-Id: I7efd25e83726ced7dee4f876cf4bb4c8f54408df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160460
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-02-12 12:56:05 +01:00
Noel Grandin 3b83c6ac80 make BufferedDecompositionPrimitive2D store a Primitive2DReference..
.. instead of a Primitive2DContainer.

The container very frequently contains only a single item, since
the decomposition method often sticks only a single top-level node
in there, so it turns out to be a net loss overall, memory
consumption-wise.

Also, if we return a single Primitive2DReference from
a BufferedDecomposition, that maximises the sharing of
data between the BufferedDecomposition objects at the
bottom of the decomposed tree, and objects higher up.

Change-Id: Iaf272e60e2997299cc35a1bd209c51b6b79e9a8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162976
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-12 11:36:05 +01:00
Armin Le Grand (allotropia) ca3c6d468f ITEM: ItemPool Rework (I)
Driving forward the Item reworks I now take the
ItemPool in focus: It now does not hold any items
anymore and should be renamed to something like
ItemInfoProvider/ItemHelper, since it's main purpose
is to provide the Defaults for the Item functionality.

There is that SfxItemInfo, only a struct and bundling
SlotID and ItemFlags. There are also the DefaultItems,
just handled as ptrs in an array. It is/was always
error-prone to keep these in sync. Remember that it's
also necessary for the order to not only being sorted
but being increments of one with no gaps allowed in
the WhichIDs to which the Items are bound.

I now bundled that to a new class ItemInfo that joins
WhichID, SlotID, ItemFlags and the default Item. This
is a pure virtual base class, it comes in three
derivations:

(1) ItemInfoStatic:
This is supposed to be global static and hosts the
Item in a std::unique_ptr to ensure cleanup. It is
designed to be constructed once during runtime and
being shared globally. It allows the ItemPtr to be
nullptr to mark as non-static (if initial static is
not possible for some reason) but still offers the
needed data. Most cases (95%+) are of that case.
The contained Item is owned by that instance. The
flag isStaticDefault() is set at the Item.

(2) ItemInfoDynamic:
This is supposed to be used for cases where the Item
cannot be static: Mainly for SfxSetItem (that needs
a Pool itself in the contained SfxItemSet, so lifetime
is bound to that Pool), but other cases showed up in
the transition. These instances live while the Pool
lives and get destructed when the Pool goes down.
Also uses std::unique_ptr for the Item instance for
as much automated cleanup as possible, the contained
Item is owned by that instance, the instance by the
Pool. The flag isDynamicDefault() is set at the Item.

(3) ItemInfoUser:
This is used for UserDefaults that can be set for
every ItemInfo entry to 'overshadow' the default
from the 'outside'. It uses a regular Item and
the central access methods implCreateItemEntry/
implCleanupItemEntry to manage the Item instance,
thus works like a SfxPoolItemHolder. The Item
instance can be globally shared and re-used even
when the Pool goes down. Instances belong to the
Pool and are cleaned up when the Pool goes down.
This Item does not need any further flag to be
set.

The ItemInfos are organized using a class
called ItemInfoPackage:

This bundles groups of ItemInfoStatic to
functional instances. There are derivations/
implementations of this e.g. for Writer ItemPool
bundling all the needed defaults for Writer,
similar for draw/impress, Calc and other usages.

These ItemInfoPackage can be 'registered' at an
ItemPool using it's method registerItemInfoPackage.
This does all the needed stuff to setup that
group of ItemInfos at the Pool (It even sets
internal vars First/LastWhich, that info can just
be derived from the buildup ItemInfo Ptrs).

The ItemInfoPackage has methods 'size()' and
'getItemInfo(index) to allow looping over it
and deliver the infos the Pool needs. The
(forced, pure virtual) overloads of getItemInfo
in the specific implementations check for the
ItemPtr being nullptr and create a exclusive
incarnation of ItemInfoDynamic for the Pool if
needed, returning that. The Pool owns the
ItemInfoDynamic incarnations and uses the
ItemInfoStatic directly. On shutdown it cleans
up the ItemInfoDynamic as needed.

The ItemInfoUser is used by the Pool when a
UserDefault is set/used: for SetUserDefaultItem,
GetUserDefaultItem, ResetUserDefaultItem. It
is not held in a 2nd list, but directly in the
list of ItemInfo'ptrs: To keep track of this
an unordered_map is used that helds the original
ItemInfo associated with the WhichID. That way
no two lookups (as before) are needed to get the
current Pool's default for any WhichID.

The derivations of ItemInfoPackage are
encapsulated and just allow access to an
ItemInfoPackage& with a single method as
return value. All use a static local instance
of a std::array<ItemInfoStatic, FIXED_SIZE>
which constructs all ItemInfoStatic and the
static Item instances - if already possible.
Sometimes it is necessary to overload the
constructor to set some static instances
for Items later than the lib init. These are
also just marked with nullptr as Item instance.
Some need to overload getItemInfo to complete
instances of ItemInfoStatic, if needed, or
create and deliver instances of ItemInfoDynamic.

The registerItemInfoPackage also offers a
optional lambda callback: there were two cases
where local data from the Pool was needed to
incarnate the item - just add that to the
call to registerItemInfoPackage if needed,
see examples in the adapted code.

For the re-use of Items this means that now
in SfxItemSet/SfxPoolItemHolder *true* static
Items can and will be used without RefCount
directly and globally. This is also the case
for dynamic Items, with the exception of
differing Pools for SfxSetItems which cannot
be done.

Future:
That design is already prepared to allow
solving that Pool-chaining problem: currently
there are master/sub-pools and all accesses
have to traverse that structure before even
doing anything.
For the future the idea is more to 'compose'
a Pool by registering ItemInfoPackages, e.g.
for Writer pool you may start with SfxItemPool,
register the writer-specific ItemInfoPackage,
then the one for DrawingLayer (if needed) and
the one for EditEngine.
It should also be possible to get to smaller
granularities of that packages. Ideas for
new ones will emerge. We might also think
about composing Pools which can e.g. run Writer
and Chart, so allowing to use Chart *without*
OLE stuff in Writer - just ideas...

More changes:
- Adapted all stuff, cleaned up old stuff/
  definitions
- Removed FreezeIdRanges, that can be done
  once per Pool on-demand (and cannot be
  forgotten to be called)
- Merged XOutdevItemPool with SdrItemPool
  and offered a ItemInfoPackage which joins
  both needed sets of Items
- All the cleanup hassle with Pools and
  defaults cleaned up
- Adapted all access methods of the pool
  to use that new stuff. Pool chaining
  currently stays, but I use a central
  method 'getTargetPool' instead of
  recursive calling to get the correct
  Pool for the action

Change-Id: I2b8d3d4c3cc80b1d0d0b3c0f4bd90d7656b4bab7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163157
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-12 10:35:33 +01:00
Miklos Vajna 207501b838 svx: prefix members of SdrHelpLineList
See tdf#94879 for motivation.

Change-Id: I172aad9fe63589a6a6bbbce77173a6fe24291ae5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163235
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-02-12 10:34:34 +01:00
Miklos Vajna 7812adb2ed tdf#159483 sc HTML paste: handle data-sheets-formula attribute
When a formula cell gets copied from google docs, the value of the <td>
element only contains the formula result. This means once value cells
and formula cells gets copied together, the pasted formula cell won't
updated anymore when the input values change.

Turns out there is a data-sheets-formula attribute on <td> that contains
the formula, it seems it uses the R1C1 format.

Fix the problem by extending ScHTMLLayoutParser::TableDataOn() to parse
this attribute and set a formula on the target cell (rather than a
value) if the formula is available.

This required also extending ScEEImport a bit, since the HTML paste
builds on top of the RTF one in Calc.

Change-Id: I720df96ce74a5e865b7329d06f3b719551f31b96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163234
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-02-12 09:20:19 +01:00
Mike Kaganski f2dfb95258 tdf#54169: revert "gtk is the only case auto-accel is true, and the
... menubar is native gtk there" (commit 3fbae5dc7e
from 2021-08-05).
This will be needed for auto-accel on Windows.

Change-Id: Ie37de17e35658a0f7c748d3c9dd923dba954298c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163214
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-10 16:58:03 +01:00
AkshayWarrier ace21b4b25 tdf#159372 svx: Add goto dialog
Adds a goto page/slide dialog for Impress and Draw similar to Writer.
To avoid duplicating code and ui, the dialog is created in svx/ and used in other modules.
The old goto dialog in Writer has now been replaced with this dialog.

Change-Id: I28f819f0d0734fb2bb08a7b99a628217ef66dba9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162913
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2024-02-10 02:05:55 +01:00
Miklos Vajna 789964785a tdf#159483 sc HTML import: handle data-sheets-value attribute for the num case
E.g. have "1,000.00" and "2,000.00" in two cells, paste that into calc,
and try to do a SUM() on them, which will fail because the cell content
is text.

Just data-sheets-value itself would not be good solution, because then
we would lose the number format, so the paste result would be like 1000,
which is bad for readability if you don't want further operations on the
value.

Fix the problem by also parsing the data-sheets-numberformat attribute,
so far what's clear is that the "2" JSON key there provides a number
format string which matches the syntax of Excel/Calc.

This gives the best of the two worlds: the output looks like the
original, but SUM() works on the cells as well.

Change-Id: Ic7c09ba55a51852f285ad0c05ed42c6771b0f500
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163152
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-02-09 14:59:38 +01:00
Tibor Nagy a67cd7b3cf tdf#155218 sc: fix different page orientation in print dialog
The page orientation is correct if you set it in the page style first.
However, if you change it in the Print dialog the page layout and size
refresh but the content orientation remains the same.

Change-Id: I5e494a0714e398221bee00744d7e25c419a41df7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162845
Tested-by: Jenkins
Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
2024-02-09 12:06:01 +01:00
Rafał Dobrakowski 3d2134c011 tdf#157664 Drop operator !=, where respective operator == is defined
Found when working on 'tdf#141908'

Change-Id: I33aae153b448c4c6bf0a17810a16c34f8e400774
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163104
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-09 04:11:01 +01:00
Oliver Specht bbe1f37645 Clone Formatting in Impress: Include list attribute
Copies list type and list level from source to target paragraph(s).
Also switches off lists, if source is not in a list.

Change-Id: I260f1d7d9936476f16c355a3a09204b3fb4592d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163054
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-02-09 00:05:39 +01:00
Michael Weghorn ad4a06692b tdf#130857 VclBuilder: Move VCL MenuBar specifics to handleMenu()
Move this handling specific to the VCL-implementation
for the "GtkMenuBar" from `VclBuilder::handleObject`
to `VclBuilder::handleMenu` which is already very
specific for those VCL classes.

The idea is to prepare the current `VclBuilder::handleObject`
for reuse with other welded menu bar implementations
in the future.

Change-Id: Idfc9974494fb7855f35f098a7bfa4204e7d017c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162920
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-02-08 22:49:50 +01:00
Michael Weghorn 4353b73fb3 tdf#130857 VclBuilder: Extract helper method for tweaking new child
Extract the post-processing to apply specific tweaks
to a newly inserted/created `vcl::Window` child from
`VclBuilder::handleChild` into a new helper method
`VclBuilder::tweakInsertedChild`.

Change-Id: I6ef813fe899f3dd6e4357c37b8da990ddf7c5155
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162919
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-02-08 22:49:40 +01:00
Michael Weghorn 9d928231e7 tdf#130857 VclBuilder: Extract static methods to new base class
Extract static methods from VclBuilder to a new base class
BuilderBase that can be reused by other builder implementations
(like the upcoming one for the Qt-based VCL plugins) in the future.

Change-Id: I719ab5fe1b8a6b36050815204550aae3e3dd25e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162917
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-02-08 22:49:30 +01:00
Stephan Bergmann c1991a5fb2 A better approximation of std::strong_order
(Unfortunately, the environments that don't have std::strong_order typically
also don't have std::bit_cast, so we need to approximate that, too.)

Change-Id: I0b6344c83bc8227af090cfe68902acd385f682ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163111
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-02-08 22:43:49 +01:00