This changes Sparkline colors to use complex colors instead and
adds Sparkline theme color import and export support for ODF and
OOXML.
Change-Id: I58edd525d50f95199bd4fe7825afb51aaa7fc091
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155113
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
ODF Import and export support for border {left,right,top,bottom}
complex colors. In addition round-trip test was extended with the
border use case.
Change-Id: I1d14690272c06e8ffcfcd483eb7f688ca5bb1e5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155014
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Enabling this feature on a list level makes all numbered sublevels, that
constitute the number of this level, to use Arabic numerals. This doesn't
change the labels of other levels: e.g., if level 1 uses A,B,C; level 2
uses i,ii,iii; level 3 uses a,b,c, and is "Legal"; and level 4 uses 1,2,3;
then a list may look like
A. Something
A.i. Some subitem
A.ii. Another subitem
1.2.1. This is a "Legal" sub-subitem
A.ii.a.1. And its child
This improves interoperability with Word.
This change introduces document model, ODF and OOXML import and export.
In ODF, a new boolean attribute of 'text:outline-level-style' element,
'loext:is-legal', is introduced; its default value is "false".
Change-Id: I5ae9f970864854c7e84c4b2f7ce46634b3ef104e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154288
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
DocumentInfo currently assumes that a LO version encoded in "BuildId"
property has only 1 digit major version, which is now wrong and would
start to give incorrect results when major version "30" will be detected
as LO_3x.
Add the dots as separators into the BuildId because it's not going to
work without.
Change-Id: I8918afe3642cbefa8488c57658f1505c9a20eddd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153649
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Embedded text was limited to number:number. But scientific notation may
require embedded text like
0.000" "000E+00
This change extend ODF format to support embedded text in
number:scientific-number also
Change-Id: I4e3220b06efbd9228d722bf518e137d7707ccf4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150804
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
This is not an error - this method handles elements if it knows about
them, and otherwise leaves the elements for other code to handle
Change-Id: I531a2d9aff84ef4a2762923737a6b827e88cd920
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153191
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
The implementation introduced in commit 8f48f91009
(SwNumRule::HasContinueList) was a bit naive: it assumed that maTextNodeList is
sorted (it is not, and so, valid cases to avoid the id were missed); it assumed
that a given list can only consist of items of a single numbering style, and so
only tested the list of nodes referenced from maTextNodeList of given SwNumRule.
I.e., this implementation targeted a special case of a list style fully covering
a single continuous list.
This skipped ids for list items with list styles, in which maTextNodeList passed
the check in HasContinueList, but which were followed by items with a different
list style, continuing the same list. This constellation outputs continue-list
attribute in the following items (see XMLTextParagraphExport::exportListChange),
which references the skipped id. The resulting ODF is an invalid XML (an xml:id
is missing that is referenced), and also does not allow to continue such a list.
The change tries to fix this, using a list of nodes in XMLTextParagraphExport,
and analyzing if the list of the current paragraph has a continuation that needs
to reference this list id. Two new hidden properties introduced in SwXParagraph
and SwXTextDocument: "ODFExport_NodeIndex" and "ODFExport_ListNodes", resp. They
allow to pipe the data to the export. The previous special casing of property
state for "ListId", used in SwNumRule::HasContinueList, is removed together with
the mentioned function.
The intention is to have a logic allowing to detect 100% cases where the list id
is required, and where it's not required.
A related unit test for tdf#149668 was fixed to not rely on the mentioned ListId
property state workaround, and moved from sw/qa/core/unocore to xmloff/qa/unit.
Change-Id: If6a6ac7a3dfe0b2ea143229678a603875153eedb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153044
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
There is no need for it to be an UNO interface anymore (ever since
we started supporting dynamic_cast on UNO objects).
Which means that XImportFilter2 also needs become a C++ interface.
Change-Id: Ice2db0f098271bba32b199bd083b08cb8410ce93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152388
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
For ODF it's not needed to abbreviate names and we prefer to use
full names. The theme color names in OOXML are abbreviated and the
same names were used also for ODF - this was changed now.
"color-table" used in "theme" element has reused the already
existing "color-table" element name in ODF, but they don't relate
to each other. The name was changed to "theme-colors", which makes
more sense anyway.
Change-Id: I61ec91895d301ad4343f2b977d5cbcf38e360b99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152252
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
RTF doesn't break floating table across pages, and there is a matching
DOCX compat flag to handle such documents.
We can ignore floating table info on the model as a workaround, but that
would mean the info is lost on save, so that's not ideal.
Instead add a new compat flag that disables fly split at a layout level,
which allows both not splitting tables & retaining the model-level info.
This commit does the doc model, UNO API, layout & ODT filter, the Word
filters are not yet updated.
This compat flag is probably quite rare, so introduce a mechanism to
only write the compat flag when it's true: this way the majority of the
documents don't need to say anything about it and we can assume "false"
for them. Also fix two missing xmlTextWriterEndElement() calls in the
xml dumper.
Change-Id: I32321ec204d7bfe011fcf024b97c906da0db8aae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152190
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
In OOXML a color definition includes more represenations, one of
which is scheme color (which is what is implemented in ThemeColor
currently), but it supports other representations too (RGB, HSL,
System,..). ComplexColor includes all the representations, so to
have a better compatibility with OOXML, this changes all uses of
ThemeColor to ComplexColor.
In many cases the usage of ComplexColor isn't the same as the
usage of ThemeColors, but this cases will need to be changed in a
later commit.
Change-Id: I9cc8acee2ac0a1998fe9b98247bcf4a96273149a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151492
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This reimplements commits 6249858a89
(sw: ODT import/export of DOCX's paragraph marker formatting,
2022-12-19) and 209dce614c43f63f63f5b42a746665c0ec1cbfe3 (sw: fix
ODT import of paragraph marker formatting, 2022-12-20).
Instead of using an empty trailing span for the ListAutoFormat data,
introduce a new loext:marker-style-name attribute for text:p element,
referencing a text autostyle.
The problems with the previous implementation were that (1) it was
impossible (or very difficult) to disambiguate several empty trailing
spans, in case it was needed; and (2) this was incompatible change,
with other ODF implementations treating the trailing span normally.
I couldn't manage to incorporate the attribute to paragraph autostyle,
because of problems referencing different autostyles one from another,
so put it directly to the paragraph attributes.
Change-Id: I33473147f1f774c24cbbc57bf0c4f3a1d83ce5bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151645
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Without this change, havign no link is not possible, if the bibliography entry has URL.
This commit adds a select box for user to choose between target types (Entry URL, specific Target URL, None, bibliography table row)
The main features are that it also makes it more obvious to the user and makes it possible to easily extend target types in the future.
As for compatibility, files from before 7b99871635 are fully compatible without any hurdles, as missing property maps to the old behaviour.
Bibliography marks saved after 7b99871635 will also revert to the old behaviour, however no actual data (such as target URLs) will be lost.
Change-Id: Iad61dd8b4df337fa202f45d117313ee47ec20c05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150708
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Current state uses:
Element loext:gradient-stop with the attributes svg:offset,
loext:color-type with value 'rgb', and loext:color-value with
values of kind #rrggbb.
Element loext:opacity-stop with the attributes svg:offset and
svg:stop-opacity, both with datatype double.
With MCGR enabled testColorGradientWithTransparencyDOCX in
CppunitTest_chart_export3 has the value 90000 instead of
90196. That is same value as in original file. Thus I have
adapted the test.
Change-Id: I976934f9b8fb79be4f74adb180b3285486dce31f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150060
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
This implements compact layout for pivot tables. In ooxml each row field
can have a compact layout setting. Support for any such "mixed" layout
of tabular/outline/compact per field is also implemented. This also
implements expand/collpse toggle buttons to field labels to make pivot
tables with compact layout more usable. Such buttons are also available
if other layouts are used.
Conflicts:
sc/qa/unit/pivottable_filters_test.cxx
sc/source/ui/cctrl/checklistmenu.cxx
sc/source/ui/inc/checklistmenu.hxx
Change-Id: Ieaa1f3bd282ebdec804d0b45a0af7b3d95a2027f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151057
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
in
commit 01a3cc1e55
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Tue Nov 29 16:09:10 2022 +0200
tdf#133343 collect autostyle prop names
before scanning for autostyles. That way we can collect only the
property state we are interested in, instead of all properties.
where I apparently wrote the code at the beginning of the call-chain
to collect autostyle prop names, and I wrote the code at the end of the
call-chain to filter on those names, but I never hooked it up in
the middle.
(which just means that the initial commit had no effect at all)
Unfortunately, fixing the middle part results in
unit test failures, so for now, just revert it.
Change-Id: Ia1d655f70d2f5a1656e910d45817c3c4627b85fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150531
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
...at least with VS 2022 Preview 17.6.0 Preview 3.0 and --with-latest-c++,
> C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1436~1.323\Include\span(78): error C2036: 'const XMLPropertyState *': unknown size
> C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1436~1.323\Include\span(73): note: while compiling class template member function 'std::_Span_iterator<_Ty> &std::_Span_iterator<_Ty>::operator --(void) noexcept'
> with
> [
> _Ty=const XMLPropertyState
> ]
> C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1436~1.323\Include\xutility(1414): note: see the first reference to 'std::_Span_iterator<_Ty>::operator --' in 'std::iter_move'
> with
> [
> _Ty=const XMLPropertyState
> ]
> C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1436~1.323\Include\xutility(474): note: see the first reference to 'std::iter_move' in 'std::ranges::_Iter_move::_Cpo::operator ()'
> C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1436~1.323\Include\__msvc_iter_core.hpp(392): note: see reference to class template instantiation 'std::_Span_iterator<_Ty>' being compiled
> with
> [
> _Ty=const XMLPropertyState
> ]
> C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1436~1.323\Include\xutility(602): note: see reference to variable template 'bool input_or_output_iterator<std::_Span_iterator<XMLPropertyState const > >' being compiled
> C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1436~1.323\Include\xutility(1778): note: see reference to variable template 'bool input_iterator<std::_Span_iterator<XMLPropertyState const > >' being compiled
> include\xmloff/txtparae.hxx(390): note: see reference to class template instantiation 'std::span<const XMLPropertyState,18446744073709551615>' being compiled
Change-Id: Ib5f32df4a696dd1077c171662da48909dad09e33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150386
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Adds initial support for style:overflow-behavior
According to OpenDocument-v1.3-part3 style:overflow-behavior can take
values of:
- "clip"
- "auto-create-new-frame"
This patch doesn't properly implement support "auto-create-new-frame",
only "clip".
If "clip" is set, TextClipVerticalOverflow is set to true, causing the
vertical overflowing text to be clipped.
"auto-create-new-frame" is treated the same as omitting the
style:overflow-behavior attribute, setting TextClipVerticalOverflow to
false.
Change-Id: Iea298f41fbf0cf18dc07f41788ba0b665515db8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150122
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Adds option to separate function of "URL" into (listed) "URL" and "Target URL" to allow for more flexibility (in that case if target URL is empty, bibliography mark hyperlink leads to bibliography table row if possible)
When writing tests also found and fixed bug where exporting new file with anchor link bibliography mark crashes LO.
Change-Id: Ic1b5c8c9590c0338dcfc4fa3a981142bddae0113
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147868
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Map the IsSplitAllowed text frame property to <draw:frame
loext:may-break-between-pages="...">. This is meant to be always a
direct formatting, so doesn't go to the style / autostyle.
Change-Id: I439fe372271e4b7db511b5e2150e2a3c2e0acf25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147499
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Restore and update change 56352
Test of https://cgit.freedesktop.org/libreoffice/core/commit/?id=8ca6468f0f4900d4d3bb45e0e938fe35c308512c is now ok
Add disambiguation between '0' and '?' in integer part
XML_MAX_BLANK_INTEGER_DIGITS is added for the number of '?'
XML_MIN_INTEGER_DIGITS is the number of '?' and '0'
This preserve compatibility with previous versions:
in previous versions '?' will be transformed in '0'
It also applies to scientific and fraction numbers.
Integer part for number, scientific and fraction are
treated the same way
Include QA unit test
Change-Id: Iab3127bf07223caac60e409306a1bee2edc37428
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145932
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
... failed locally with
C:\lo\src\core\include\rtl/ref.hxx(129): error C2027: use of undefined type 'SvXMLImportPropertyMapper'
C:\lo\src\core\include\xmloff/shapeimport.hxx(46): note: see declaration of 'SvXMLImportPropertyMapper'
C:\lo\src\core\include\rtl/ref.hxx(127): note: while compiling class template member function 'rtl::Reference<SvXMLImportPropertyMapper>::~Reference(void)'
C:\lo\src\core\include\xmloff/xmlprcon.hxx(64): note: see reference to function template instantiation 'rtl::Reference<SvXMLImportPropertyMapper>::~Reference(void)' being compiled
C:\lo\src\core\include\xmloff/xmlprcon.hxx(37): note: see reference to class template instantiation 'rtl::Reference<SvXMLImportPropertyMapper>' being compiled
Change-Id: I08211c58ca61d2bc81062d0b104d8ce47ffccd91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146098
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
> include\rtl/ref.hxx(129): error C2027: use of undefined type 'SvXMLImportPropertyMapper'
> include\xmloff/shapeimport.hxx(46): note: see declaration of 'SvXMLImportPropertyMapper'
> include\rtl/ref.hxx(127): note: while compiling class template member function 'rtl::Reference<SvXMLImportPropertyMapper>::~Reference(void)'
> include\xmloff/xmlprcon.hxx(64): note: see reference to function template instantiation 'rtl::Reference<SvXMLImportPropertyMapper>::~Reference(void)' being compiled
> include\xmloff/xmlprcon.hxx(37): note: see reference to class template instantiation 'rtl::Reference<SvXMLImportPropertyMapper>' being compiled
Change-Id: I77083e021ae16bce8b2f749b96b6c6607c22ff87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146072
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
And simplify the latter, to always use "CDATA" type (as the former did).
"CDATA" was used in all cases but one, where an empty string was used.
Change-Id: I1b3bfae40e29628e4094d9a6e58a69a66865874c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145526
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>