The XLSX export wrote the label as a bare <font> element, so a checkbox
came back with the control default font at 10pt and adjacent labels
overlapped. The label's font name, size and colour, its bold, italic,
underline and strikeout, and its horizontal and vertical alignment are
now written out.
The underline stopped reaching the export altogether when the control
property list started asking for "FontLineStyle", which no control model
has: commit 3187193a61 (tools: rename
FontUnderline to FontLineStyle, 2016-01-29) renamed the VCL enum and
took the UNO property name string along. The same rename hit
sw/source/filter/html/htmlforw.cxx, which is not handled here and needs
a separate fix. A double underline also needs the "fontN" class on the
underline element, which the import compared with a literal "font4",
introduced with no explanation given in commit
04c272eb83 (dr77: #i114128# import legacy
drawing controls, 2010-08-26). N is the index into the workbook font
table, and is treated as one now.
Excel keeps the label font in the VML shape, in the DrawingML run
properties and in a workbook font record, and builds its model from the
DrawingML, while we read the VML and the record it names. Both are
written here so that the two applications show the same document. TODO:
read the label font from the DrawingML run properties, as Excel does.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I87259d25a68829f6c1a78179f8e3aa7811a5688f
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9927
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ca86699205743f2709f3cd5d412a8a3f0d3fba38)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210334
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
A placeholder clipped to an outline carries it as custom geometry, which an
image shape has nowhere to keep, so the outline was dropped on load and the save
wrote a plain rectangle over it. Read it into GraphicClipPolyPolygon, and write
it back from there.
The two directions are not equally capable. Import reads paths of literal
coordinates: one driven by guides or formulas, and an arc, both need the
custom-shape machinery. A quadratic curve is read, converting exactly to the
cubic the model keeps. A path that states no w and h is not read either - such
coordinates are absolute EMU rather than a space to scale from, and no file
authored that way turned up to check the reading against. Export writes whatever
polygon the model holds, so that direction loses nothing - a geometry the import
gave up on was never stored. A curve that closes a contour states no end point
of its own, and the point the contour started from answers for it.
A path that states fill="none" states that it paints nothing, and PowerPoint
leaves it out of the clip: a picture clipped by two paths shows through the
plain one and not through the nofill one, while the same file with that one
attribute removed - or with stroke="0" in its place - shows through both. So
such a path is read past, while the shading variants and stroke="0" are not:
those say how an area is painted, not whether there is one.
Several paths become one polygon by area, not by concatenation: the contours of
one path are filled by the even-odd rule, so two of them overlapping leave a
hole, while paths are filled one after another and the shape covers what they
cover together. Concatenating them instead cut a hole wherever two paths
overlap, which the file does not describe and PowerPoint does not draw.
A shape's own custom geometry now replaces the one it inherits, the way a preset
geometry already did. Saving states the outline on the slide as well as on its
layout, so reading that back gave the slide placeholder its own geometry beside
the inherited one, and two geometries at once are not one this reads - the
placeholder came back unclipped while PowerPoint showed the same file correctly.
The outline reaches the drawing the commit before this one added, so a
placeholder read from a file shows what sits behind the parts it does not cover.
It survives a round-trip through ODF as well, where the property already travels
as coext:graphic-clip-poly, with nothing to carry until now.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I87bd21e68bcea648c8c9151b6af5439578f1c2cf
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9303
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 04bbb74a24bad4ae54f257b6b028f3fd48955272)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210123
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Nothing told a horizontal rule apart from an ordinary rectangle, so it could
not be laid out the way Word does; the marker is that distinction, and its
absence is what keeps documents written before it rendering unchanged.
The UNO property reports DEFAULT_VALUE while false, since ODF export only
writes direct values - else every shape and graphic style would carry it.
Also let the RTF import build a rectangle for a rule, as the VML import
already does, so both filters produce one model object.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Id2facd7bdc272197273462f0ad581537551234bc
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8657
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit dbe7dca2951640990d3febaf12a9c3118e15ec22)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209328
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
It appears that the ownerIdx attribute of <cx:series> is used to indicate
that series share data. At least that seems to be the case with pareto
charts, which have both a clustered column and a pareto line series. Going
on that assumption, implement parsing/export of ownerIdx, and don't write
a dataId tag when ownerIdx is present. That fixes round-tripping of
pareto charts, at least based on what I've seen.
Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Change-Id: Ie948d2e5992b778462e34e1ef90681631c867332
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5900
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 8c37a25ffb7711f69de978045b4e3dc8d52759da)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209240
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Read underflow and overflow attributes from the histogram chart
type properties.
Export the same properties back to <cx:binning> so chart roundtrip
preserves optional edge bins.
Signed-off-by: Devansh Varshney <varshney.devansh614@gmail.com>
Change-Id: I963febac4987da23dce2571928982973f7ea67d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207153
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
After
commit e052641d460d8111d3333705aea03ad24822ebbb
Author: Michael Stahl <michael.stahl@collabora.com>
Date: Thu Apr 16 14:55:25 2026 +0200
xmloff,package,xmlsecurity,oox: add Collabora extension namespace
For both ODF and OOXML export, add a new "coext" namespace.
New features saved in Collabora Office will not work in LibreOffice
Also add a test for it
Change-Id: I5626dbcf5e87e06ef94e33d1ce09a091c1557688
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206987
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Make the spill state of a dynamic array survive a saveAndReload
to XLSX and make the XLSX be properly accepted by MSO. There is a
special way, with dynamic array extension to the format, which
must be written to the file.
Export:
- Emit xl/metadata.xml with an XLDAPR dynamicArrayProperties block,
and register it in [Content_Types].xml and workbook rels.
- Mark the master cell with cm="1" and write aca="1" + ca="1" on f.
A 1x1 collapsed master is written as a single cell reference.
- Map the SPILL cell error to "#VALUE!", since OOXML has no #SPILL!
literal. Recalc on reload reclassifies it back to SPILL.
Import:
- Remember "cm" on the cell. A cached "#VALUE!" on an array master
with "cm" set is treated as a SPILL hint so the blocker survives.
Extend the XLSX round-trip tests in subsequent_export_test2.
Change-Id: I9209e43f3a398e23fc7ca46daf58a88546687dba
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2865
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit eb85edc75e5100beb7802381175de914f4102a81)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205803
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Write xl/threadedComments/threadedComment*.xml per sheet and
xl/persons/person.xml at the workbook level. Add Relationship enum
entries for THREADEDCOMMENT and PERSON. Link the legacy <comment> to its
threaded counterpart via the guid attribute. Use sax_fastparser::UseIf
for optional attributes.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I53ac1e4ce761956201d09cf96376a79b6d041e1b
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/802
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit cfdad0c5ad529ecbfef4237850dbfa31ac0e4937)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205295
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Register the threadedcomments namespace and tokens in oox. Add
PersonsFragment (workbook-level) to import xl/persons/person.xml and
ThreadedCommentsFragment (worksheet-level) to import
xl/threadedComments/threadedComment*.xml. The fragment runs after
CommentsBuffer::finalizeImport() so that ScPostIt objects already exist;
it attaches ScThreadedCommentData with root text, reply chain, and
resolved flag to matching notes. Both the legacy fallback text and the
actual threaded comment text are preserved in the document model.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I0a47c74dc31ae8bb008d2a8da76a97ae3957dcc0
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/801
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 205ea7e4fb13b18b1940f287f4cbad60c8aee9cc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205294
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
- setings.xml has property called stylePaneFormatFilter
- it can be used to setup default filter for visible styles
- for example we can show all of them or only the ones stored
in current document
- preserve more attributes of the mentioned property on export
- ordering is important stylePaneFormatFilter should appear
before other nodes to pass validation
- do not shortcut hex values 0000 -> 0
Change-Id: I0bd3f4b64172d9a022f69f4c73e17b017a0f5182
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/601
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit d3795dcdfbe9d4fa6a68eb7969e5c802d78dcd7e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204878
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
External links can have `xlStartup` relationship which is used to lookup
documents from Excel's Startup folder. These links are getting exported
as `externalLinkPath`.
This is similar to 9e075deee9138ab67c689b6b0d1fdd9d4d24a4be
bug-document: forum-mso-en4-31562.xls
Change-Id: I43efc144092ab7961fa486fcbd1e4d7676ddbbaa
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/908
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 805cfc8e75c968173494f5fc50ccc9dd66c27755)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204747
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Don't export a series shape properties (spPr) for chartex charts if none was
present on input. Also a basic test for this.
Change-Id: I1692e8dbd160fa7d0db6fd0d50ca1ba42a9e9fca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202633
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This patch was all based on trial and error and Google.
What we currently export is considered corrupt by
modern MS Word (2019, 2024 tested),
but not reported as corrupt by MS Word 2010!
Interacting with google suggests that most of chartexport.cxx
was probably written for PowerPoint (XML_p) and Excel (XML_xdr),
This patch is concerned about Word (XML_wps)
whose mnXmlNamespace came from ShapeExport::WriteGroupShape.
Apparently Word didn't complain about invalid
wps:nvGraphicFramePr for wps:wsp,
but it does complain for wpg:wgp (groupshapes).
Exporting group-shaped charts for Word 2019 has never worked.
Already broken when vmiklos started
import of group-shaped charts in 6.2.5
tdf#124398 DOCX drawingML import: handle charts in group shapes
make CppunitTest_sw_ooxmlexport27 \
CPPUNIT_TEST_NAME=testTdf124398_groupshapeChart
Change-Id: Iea0c1cc727501b540666b17146024dffa149d257
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202692
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Add framework for import/export of chartex layout properties (cx:layoutPr).
Also support the child cx:binning property, used for clusteredColumn charts
(and perhaps others). This allows the binning property to round-trip
successfully MSO -> LO -> MSO.
Change-Id: I54bd1692ce4fb59dd70c9d4ac68f108c33cbca8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199553
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This change adds writing the OOXDiagram SmartArt replacement
graphic. This makes stuff working better, but still stuff
missing. With this we have now two of the 4-7 (optional)
DomTrees used for the Diagram data representation.
Still deactivated, to use for experiments you will need to
set ACTIVATE_RECREATE_DIAGRAM_DATADOMS.
Change-Id: Ic6c1108d6cf0037302085b6f22433b199d40ee53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198435
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Previous work on this project added support for Funnel charts, one of the
chartex types. This commit expands that to all the other chartex types,
including RegionMap. Largely this is parallel to what was done for Funnel,
but there are some namespace differences, and ParetoLine requires some special
handling because Microsoft Office seems to encode it as a combination of
clusteredColumn type and paretoLine type. ParetoLine support is incomplete,
especially on the export side.
Change-Id: Ib751632ec05f3fbf248e0f194f7a6f36f2fa6a88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194933
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Support import, storage, and export of OOXML chart color styles
(color sequence). In OOXML, chart color styles are in files such
as colors1.xml, and conform to the chartStyle schema. This commit
supports I/O of color styles, and provides supports storing them
in the chart document model. It does not include any features for
using or modifying the color styles, so at this point it has no
appreciable effect on users.
Change-Id: I5c02137ebf9c25e11951eea55c4c77fda35b0e80
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194998
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This adds ComplexColor to many of the color properties that are
available in charts. It also handles some import code in oox, so
the complex colors are set correctly to the chart elements if an
OOXML document is loaded. This doesn't yet handle export and if
a theme is changed, as well if a color is changed manually in
the chart.
Change the tests so they now assert the scheme color like it is
defined in the source document and not the calculated derived
color.
In addition change the WriteRunProperties to have a struct as
an input instead a number of parameters, which in most cases don't
need to be filled out and are using the default value.
This was needed for the new parameter bUseTextSchemeColors, which
is used for charts, so the text colors use tx1 and tx2 elements
instead dk1 and dk2, which are usually used in Impress.
Change-Id: Iaebbaea983c5232c51233c1a02bd8fe1da24d551
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194939
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
When this property is enabled, LO will emit a
text:start-value=
as part of the text:list-item.
Change-Id: I9c158bb14fac5e6e77bfc93d0168081a89c8ceb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192160
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
- add support for x15 namespace.
- add a unittest.
- add support for <x15:connection> and <x15:rangePr> elements.
- support model and sourceName attributes.
<extLst>
<ext xmlns:x15="..." >
<x15:connection id="..." model="...">
<x15:rangePr sourceName="..."/>
</x15:connection>
</ext>
</extLst>
Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: I3b3e380ddd07f251b23333fe9d3959961dd5c19c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190924
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Parse the style*.xml file in the OOXML package, and store the imported
styles in XChartDocument via a new XChartStyle. Some areas are yet to be
fleshed out, but the intent here is to get a review of the general approach
and architecture. This includes no work on the export side (or the UI and
application of styles to a chart, which is a separate but related project).
Change-Id: I9d5b9f5aa44fb7944b2d971edc26e04dc2256c7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189531
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
shown as the "prompt" text in the final slides
What should works
- New sd specific uno api shape property: CustomPromptText
- With this property, the corresponding master slide SdrObj's
and their final slide SdrObj's placeholder text can be set.
- If we have CustomPromptText value it will be used for the
PresetObj and will be created (CreatePresObj) with those texts
as a default prompt text. If we do not have the usual default
ones will be used.
- OOXML import and export (partly since we have many other problems
around export) are works
- Enable to OOXML import of com.sun.star.presentation.SubtitleShape
(partly, since in the core we handle them as Text objects) to handle them
a bit better. OOXML export is still not good for different reasons:
see tdf#112557
- Unit tests for custom "prompt" text
TODO
- odf import/export
- we cannot set in runtime new custom placeholder texts, so the new
placeholders/presobj will be created with the usual default texts.
Change-Id: Ic2b06a10f7a19f0cfdb2b705645b08a24b3e433b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189185
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga@collabora.com>
This is a subtask of tdf#165742: Chartex charts are lost on input from
OOXML and re-export.
Fix an existing bug in chart import, which results in the incorrect
default value for stroke width on chart shapes. This was discovered
in testing chartex and can be reproduced in a hand-edited pre-2016
file (<c> namespace), but may not manifest there in practice since
it appears MS Office may always output an explicit stroke width for
pre-2016 charts.
Change-Id: I458ae6ad0eaf28bf933c8ae0baed36e48df114b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186582
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
This is a subtask of tdf#165742: Chartex charts are lost on input from
OOXML and re-export.
Fix chartex parsing so as to properly handle series. This code considers
the <cx:plotAreaRegion> tag to be equivalent to the chart 'type group'
tags (<c:barChart>, <c:areaChart>, etc.). Therefore it allows use of the
type group mechanisms in chartex, even though there is not strictly a
tag for type group. This also includes a basic CI test for the
ability to round-trip (OOXML -> LO -> OOXML) simple chartex content.
Change-Id: Ibe96a239aa5329897b8e0652ce7388a7c398dda2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186298
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This is a subtask of tdf#165742: Chartex charts are lost on input from OOXML
and re-export.
Fix various aspects of input and output for chartex (and specifically
for funnel charts). This now allows for loading and re-exporting a
very basic funnel chart, with the result that MS Office successfully
loads the exported chart, and it looks similar (though not quite
identical) to the original.
Change-Id: I6eeb277e31250031604f7cdd21b80848a9c642ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184758
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
This is a subtask of tdf#165742: Chartex charts are lost on input from OOXML
and re-export.
Fix some incorrect URLs and ordering of elements in a <xsd:sequence>.
Change-Id: I4092e91851e80114d3cb8e22f602c33faf146969
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183736
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>