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>
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>
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>
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>
...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>
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>
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>
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>
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>
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>
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>
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>
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
...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>
.. 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>
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>
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
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>
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
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>
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>
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>
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>
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>
(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>