Use an internal property for that, alowing to pass the option from the
import site to SdrOle2Obj::AddOwnLightClient. Maybe there is some more
proper way to do this, but I couldn't find it.
Change-Id: I74c881c5c35689a7b58d44d8d65c1010d202c98d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177586
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
regression from
commit 6c2f827697
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Sun Oct 20 15:07:41 2024 +0200
improve style searching in SvXMLStylesContext
Two problems - the original code was searching by DisplayName,
not Name, so add another index for DisplayName,
and the prefix matching was not properly matching.
Change-Id: Ifd43bdb89d33067954298115c8700b87c7f93050
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177488
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
This change adds loext:margin-left and loext:margin-right, which
implement margins that support font-relative units.
See tdf#36709 for additional details.
Change-Id: I31b0dd2b6f98cb5b02fd4dca3608db6fdee4054c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177473
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
ODF 1.4 has removed the attribute table:cell-range-address from the
chart:plot-area element. So we may write it only in versions < 1.4.
The attribute was used to distinguish whether a chart has internal data.
The same information is given by the href attribute of the chart:chart
element.
The actual used cell-range-address values are already given in the
chart:axis and chart:series child elements and evaluated from there.
A global setting is not needed.
The attributes chart:data-source-has-labels, chart:column-mapping and
chart:row-mapping are related to the table:cell-range-address attribute.
These three attributes are deprecated already in ODF 1.2. Thus we will
not write them in ODF 1.4. Their information is given in the chart:axis
and chart:series child elements. The order of series is given by the
order of the chart:series child elements.
Change-Id: I08886723b1c8eb27489a7f44b5f8321572defdff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177323
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Add support for input and output of 'split position' parameter (number of entries
in second plot) for of-pie charts. In OOXML this uses the supported split-pos
tag. For ODF I added an extension in loext namespace for this parameter.
This commit also includes simple tests for the I/O functionality in OOXML and
ODF.
Change-Id: I00ff59db721867fa836eb99b6677350040d005dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170666
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
No need to check chart title paragraph style name and ID, since its
never exists.
follow-up of:
d7214aba956fdad72372
Change-Id: Ieffe3026adc848cfbf3a847b4f876b5aa2e2a026
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177011
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Tested-by: Jenkins
That is a valid, but unsupported, markup, that is explicitly mentioned
in ODF 1.4 part 3 "Schema" sect. 6.3.4 "<text:note-body>":
Note: The schema allows for the inclusion of <text:note> elements as
a descendant of a child of the <text:note-body> element. While this
may be reasonable for note types, it is not reasonable for footnotes
and endnotes. Conforming consumers need not support notes inside notes.
(The "reasonable for note types" is obviously an editorial error from the time when ODF 1.1 text "reasonable for some future note types"
was reviewed for ODF 1.2.)
As the ODF also specifies, that a conforming consumer "need not
interpret the semantics of all elements, attributes and attribute values"
(ibid., sect. 2.4 "Consumer"), it is OK to silently drop this data, just
as done for other similar cases.
Change-Id: I0a417981087ebf225565628f14409661058d100d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176906
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
tdf#160404: Fix FILEOPEN XLSX Pivot table is not imported if sheet
protection has Pivot table editing enabled
- Import correctly the pivot tables, even if the tab protection is not
allowing to use them.
tdf#160535: Support sheet protection option: Use AutoFilter
- Add new option for tab protection to enable/disable to use autofilter
on the sheet. Import/export correctly to odf/ooxml.
Add new ext-odf attribute: XML_USE_AUTOFILTER
tdf#160536: Support sheet protection option: Use PivotTable&PivotChart
- Add new option for tab protection to enable/disable to use Pivot table
on the sheet. Import/export correctly to odf/ooxml.
Add new ext-odf attribute: XML_USE_PIVOT
Change-Id: I5d34e3608aed1a3d004ec553f6125b6428e9c05e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176274
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
This change implements layout for font-relative paragraph first-line
indentation in Writer.
Change-Id: Ie8f386bcc13a43ab92d5c15654c24bfdfc62bd69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176216
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Co-author: Regina Henschel
This implements the new draw:handle attributes of ODF 1.4. For reasons
for new attributes see https://issues.oasis-open.org/browse/OFFICE-4110
The old attributes are deprecated but may still be written. So we keep
them to be backward compatible.
Change-Id: I0b3443d000b2b163363f9070e5e276af2b018cbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174966
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
The 'm_pControlNumberStyles' pointer was not released in destructor. A memory leak is possible.
Change-Id: Ie60806814ec65b73d0eaf07b53e7dc133b33bf24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176396
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
and extrusion-specularity.
In ODF strict always value 'draw:MetalODF' was written. Changed the
logic to write 'loext:MetalMSCompatible' too, depending on eMetalType.
Using a QName as value requires a namespace declaration for the prefix
'loext'. That is now written directly at the element, not as global
declaration, to restrict its scope to the element. A global declaration
would hide when attributes or elements are accidentially written in
'loext' namespace.
The pattern for nonNegativePercent had missed the percent sign.
The export is adapted to write the percent sign.
Validation is skipped for save to ODF 1.3, because currently the
implicit validation uses always latest ODF version, see tdf#163806.
Tests are extended to cover ODF 1.4 and value draw:MetalODF.
Change-Id: I836d11b9cd327b9772e800d9797e04e1613ab2f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176246
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
we can just take a "const &".
(found by running clang-tidy with the
performance-unnecessary-copy-initialization warning)
Change-Id: I20fd208c65303da78170b1ac06c638fdf3aa094b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176267
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
we already declare the same thing in various places,
and I intend to be using this some more, so it makes
sense to only declare it in one place
Change-Id: Ifea6b589e992dd9f6cd8f2301f837e71397481c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176046
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This change adds an ODF font-relative first-line indent paragraph style
attribute as a LibreOffice extension. The corresponding ODF standard
change is tracked by OFFICE-4165.
This change only implements what is minimally necessary to serialize,
deserialize, and check for ODF files containing this attribute. Further
changes are necessary.
* Added cssLength to schema, which is equivalent to length but also
allows ic and em as units.
* Added loext:text-indent to schema as a paragraph style attribute. This
attribute is equivalent to fo:text-indent, but accepts cssLength
instead of length.
* Added XML_TYPE_UNIT_MEASURE to the ODF parser, which currently accepts
only the font-relative measures and forces fallback in other cases.
* Added loext:text-indent to the ODF parser. This attribute accepts
font-relative metrics, and will behave as an import-only alias for
fo:text-indent in other cases.
* Updated SvxFirstLineIndentItem to handle unit-denominated measures.
* Added proof-of-concept indentation handler to Writer. This
implementation is incomplete and temporary, and will be revised in
future changes.
Change-Id: I7eb5c7382093cb18a9b0afbf93dacb34ba1d35ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175941
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
It was omitted from commit 842160190e
(INTEGRATION: CWS notes2 (1.77.24); FILE MERGED, 2008-02-19), and
the field type was skipped from autostyle export phase. With commit
69ed893087 (tdf#160253: fix list
identifier export decision code, 2024-04-24), this surfaced by not
exporting comments' formatting.
Change-Id: I84a8d5616c37af093404fefb4d1ed3a212000f8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175899
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
V1037 Two or more case-branches perform the same actions. Check lines: 836, 890
Change-Id: If6036da666ea46a4e5c2bc0f4547c78aa43a26a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175270
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
V1037 Two or more case-branches perform the same actions. Check lines: 103, 106
Change-Id: I761622d8c980c7f53ae4d9c77a83c918a2efb22c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175429
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
We can searching without needing a std::map by sorting
the style list. Which also allows to do prefix
searching. Which we can use to dramatically reduce
the number of styles we need to loop through in
SdXMLStylesContext::ImpSetGraphicStyles.
a similar mega-master-page scenario as reported in tdf#158773
13.5 - 9.1s
Needed to adjust some unit tests because
the order of iteration through styles is
now different, which affects some file output.
Change-Id: Ia7240fe520b70839d2519eba1fb70819a3c3bf81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175281
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
which avoids some expensive broadcasting when the name is changed
a similar mega-master-page scenario as reported in tdf#158773
48s -> 20s
Change-Id: Ifcfd96077a9e83868ac96671ce9f208ae3ca418f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175126
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This ctor is meant to set the value of nTime directly; and that value
is not nanoseconds, but an encoded value, using SEC_/MIN_/HOUR_MASK.
But in some places, this ctor was misused for setting of nanoseconds,
which would only accidentally work for values less than one second.
All places that initialized tools::Time with 0, now use EMPTY.
This makes the ctor private; and for the very few cases where really
the encoded value of nTime is stored / restored, fromEncodedTime is
introduced.
Change-Id: I1f1994bd9aab1b51a41b1de637619049fe820da4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175283
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
V1037 Two or more case-branches perform the same actions. Check lines: 92, 96
Change-Id: Ibf8ca692e5d7208d99280c14190bda35a0fd7022
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175231
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
The problem was that 3d textbox form controls
were imported as flat.
The default value for ControlBorder is 3d.
Since caolan's 7.5.4 63b8e8bda2,
all textboxes are initially created with a flat border instead of 3d.
Since 3d is the fo:border default (and never specified),
the newly created control had no override to force it to 3d.
So this patch forces passing a ControlBorder property.
On export, since the 3d property is the default value,
ControlBorder is no even provided as something to be exported,
and therefore only "solid" and "none"
are ever exported as fo:border qualifiers.
make CppunitTest_xmloff_style CPPUNIT_TEST_NAME=testTdf156707
Change-Id: Ib4541d5e3599dc42af6055062fd709e105bf5d14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174754
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
GetODFSaneDefaultVersion() is surprisingly hot, mostly because it is
called from every ScXMLExport::WriteCell call, so cache it
Change-Id: Ibc54c007f4979315487badc23889eb264b11d4ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174671
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>