399 Commits
Author SHA1 Message Date
Aron Budea 07047a02f9 sw DOCX: add support for importing/exporting webSettings.xml
Only if already exists in file, use GrabBag.

For strict OOXML, replace namespaces with transitional names.

Change-Id: Idc1f99b7c096e87558fdb78278a534ffd2bc5587
Signed-off-by: Aron Budea <aron.budea@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8590
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit d8f3abfb7044be0e7e1c56602aae506911ad33b8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210362
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-02 01:03:42 +02:00
Mike Kaganski ecf0efa073 tdf#165609: save the form control label font and alignment
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>
2026-09-01 19:51:44 +02:00
Mike Kaganski 1dc3b23162 cool#16078: OOXML round-trip of the clip polygon
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>
2026-08-27 21:14:55 +02:00
Kurt Nordback 94a1e0c05c tdf#165742 Step 5.17: Improve data label round-trip
Fix some aspects of chartex data label import and export, to improve round-trip fidelity

Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Change-Id: Ie74593709caee05dea4aa98bd42913f221fd5b71
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7908
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit b1a365ec22cddbd74b1533b714043eb9cee9c576)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209987
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-08-26 08:46:54 +02:00
Mike Kaganski e55cb4a7b8 tdf#167714 sw: mark Word horizontal rules in the model
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
2026-08-19 17:18:11 +02:00
Kurt Nordback b6a5834277 tdf#165742 Step 5.14: Assorted axis unit fixes
Support round-trip for axis min, max, majorUnit, minorUnit, and some
handling for numFmt, all for chartex.

Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Change-Id: Ibef74b0efc27d5ff7923800b169603758e276ada
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5901
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 05420f729d5399c127d9a15fcad043fa6673dd6a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209241
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-08-18 15:53:56 +02:00
Kurt Nordback 0c8160d7e8 tdf#165742 Step 5.13: Support ownerIdx attribute
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
2026-08-18 15:53:52 +02:00
Kurt Nordback c26599741c tdf#165742 Step 5.12: Improve axis handling
Implement better handling of <cx:axisId> and <cx:axis> tags. In particular,
ensure we output the correct number of axisId elements, based on the chart
type, and ensure that corresponding axes (and only those) are captured in the
appropriate <cx:axis> data.

Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Change-Id: Ifed17afc05c70dced89e75f18dcf375fdef97f6e
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5775
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 833f782bca98c891097d887a45365bc7a5322c4d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209239
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-18 13:08:26 +02:00
Kurt Nordback f201337f3b tdf#165742 Step 5.11: Don't output empty tick mark tags in chartex
Chartex has different tick mark defaults from old-style charts. Don't
output <cx:majorTickmarks> or <cx:minorTickmarks> when no tick marks are
intended, including if there were no such tags on input.

Change-Id: Ib6caecaca917204ddc99208cbece8f6adff8f5ca
Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3067
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 5353e467dea04ba6b12b616b90e269f0a096375a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208843
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-30 17:13:30 +02:00
Devansh Varshney 88550ce19c oox: xmloff: import/export histogram underflow and overflow bins
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>
2026-06-29 14:41:12 +02:00
Xisco Fauli 04ae2b1f12 Support coext namespace
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>
2026-06-20 00:30:54 +02:00
Kurt Nordback 1403eb3621 tdf#165742 Step 5.10a: Only export non-default dataLabels
Don't always output series dataLabels element for chartex. Only output it if
necessary, meaning a non-default value.

Change-Id: Ie47b956cde0337bb82b268725c77d511da981d41
Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2966
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 38af704dc0a8feab90007fbf3cd5388e0efd8294)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206025
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-05 12:02:22 +02:00
Tomaž Vajngerl 4efc11357b sc: round-trip dynamic array spill state through XLSX
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>
2026-05-28 20:09:47 +02:00
Karthik 57a66d43a9 sc: XLSX export renders double check-boxes in Excel
Form controls are described twice in XLSX export
(VML Shape and DrawingML shpae). Excel need to know these two entries
refer to the same checkbox. So, DrawingML shape's `hidden` attribute
should be set to true and we should export `a14:compatExt` element to
link the VML shape to the DrawingML shape.

Change-Id: Idb8473a10ae5c5961d34128f2142050c64341b97
Signed-off-by: Karthik <karthik.godha@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2795
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 13318fa9ea1d78b85eeab68334dcc533797d4c53)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205782
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-28 09:29:35 +02:00
Kurt Nordback a16459fc63 tdf#165742 Step 5.10: Don't export default shape props
Don't export a series shape properties (spPr) for chartex charts if none was
present on input. Also a basic test for this.

Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2961
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 32886b30c0539bfe1443434beeb1b3b27c93a4a7)
Change-Id: I5daf1d49762fe3b32c1c9254e0792b9eb34494e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205699
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-26 19:48:18 +02:00
Kurt Nordback 0fcb8f99b7 tdf#165742 Step 5.9f: Improve <cx:chartData> handling
Replace some temporary chartex parse and export code to handle chartData more
properly. This now round-trips at least some <cx:f> and <cx:nf> content,
and handles the various *DimensionType values.

Change-Id: Ie91ac845a911c5be1f7ad5d8ed872d091bd6a623
Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2644
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 1d58d04fb96b9bd73affeaecf9d6dee35d6357b5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205578
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-24 01:00:06 +02:00
Tomaž Vajngerl 2b8fedb4ec sc: add elements and parsing of namedSheetView*.xml files
This adds parsing of elements (namedSheetView) and sub-elements
contained in namedSheetView*.xml files. The data is contained in
NamedSheetViewData, but for now we don't do anything with this
data yet.

Change-Id: I9757bc4e7001a338e7e746ebc663eb3b9837519f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197706
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201947
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 7135df7768579bef1655923a125de2f440caf463)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205287
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-21 18:07:35 +02:00
Mike Kaganski f31a5ce377 oox, sc: export xlsx threaded comments and persons
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>
2026-05-19 09:27:53 +02:00
Mike Kaganski d6611c3ccc oox, sc: import xlsx threaded comments and persons
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>
2026-05-19 09:27:46 +02:00
Pranam Lashkari b3bdd9e1a0 Add XML tokens for slide sections interop
Added 'section-list' and 'section-slide' tokens for storing
slide sections in ODP files

Change-Id: I24fb220c434c1a972fb50712d3285834698c0f68
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/710
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 839dd1b514cd2f8bdad036ef2b920d6fff261afd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205047
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-05-11 20:54:28 +02:00
Szymon Kłos 485b49b49c oox: export styles filter settings
- 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
2026-05-08 09:43:04 +02:00
Karthik 6007f05be2 sc: External links with xlStartup relationship type are not preserved
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>
2026-05-04 20:34:47 +02:00
Karthik Godha f5a2d3ef39 XLSX: Handle external references with missing path
External references with relationship type
"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing"
are not handled. Because of this formulas referencing this external
reference are not imported properly.

bug-document: forum-mso-de-100068.xlsx
Change-Id: I8032ea42a319ab0b5fd0ede3880469a3fe77cdfa
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/201
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 9e075deee9138ab67c689b6b0d1fdd9d4d24a4be)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204476
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-28 09:47:08 +02:00
Kurt Nordback cf04cdbcfa tdf#165742 Step 5.9d: Support for <cx:geography> tag
Add support for import, storage, and export of <cx:geography> and its
children. This tag is used to express geography for regionMap charts. Also
includes one simple round-trip test.

Change-Id: Iccaef8b8cd2848ae3e48532c72507469c55ebefc
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/719
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit d5bfa4677609d5618a82d4aa3e182bba00054a01)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204150
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-23 15:47:47 +02:00
Kurt Nordback 03ecbbadd4 tdf#165742 Step 5.9b: Support more children of layoutPr
Provide round-tripping support for parentLabelLayout, regionLabelLayout,
statistics, and subtotals tags.

Change-Id: I6d5fb04ce54061dbb1e886157f9869030ff941d4
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/717
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit e91d8ff7a4cd84f444a9b01b64ad6df8d45f910e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204148
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-23 13:37:43 +02:00
Kurt Nordback 9db38b095c tdf#165742 Step 5.9a: Support visibility child tag of layoutPr
Provide round-tripping support for the <cx:visibility> child of
<cx:layoutPr> in chartex.

Change-Id: I23f4058e67cb00fa986f6a4e7d1c63e97d44a4d0
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/688
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ef7013f120422cc796e8994ff7ba1396c5e84609)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204147
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-23 13:37:34 +02:00
Xisco Fauli 5d9dfab134 Revert "tdf#165742 Step 5.10: Don't export default shape props"
This reverts commit d160c4a17d.

Pushed accidentally.

Change-Id: I3ffb711f953cd0e1b9e3a92ac6852618bd72cf83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204166
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-23 13:36:50 +02:00
Kurt Nordback d160c4a17d tdf#165742 Step 5.10: Don't export default shape props
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>
2026-04-23 13:33:41 +02:00
Justin Luth bd32e08b5f tdf#124398 oox chartexport: GroupShaped charts need different elements
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>
2026-03-27 11:37:36 +01:00
Kurt Nordback c26dd0e1f2 tdf#165742 Step 5.8: Add minimal support for layout props
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>
2026-03-24 06:57:32 +01:00
Armin Le Grand (collabora) f2d455d03f SmartArt: Added export of OOXDiagram
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>
2026-01-30 17:49:29 +01:00
Markus Mohrhard 2950f734c5 add initial version of Calc table styles
Add the new UNO props properly.

cherry-pick from: 46b6455af7854795ac379a4a1f37c60b4414af02

TableStyleDark9 name as part of the generator seems like a bug
in the OOXML spec. The name in the
presetTableStyles.xml file is "TableStyleDark9 2" but MSO and the rest
of the spec reference a "TableStyleDark9" style.

cherry-pick from: 5aaa63d2b9850f8ec3de361df4e61710626d7e33

Fix windows MSVC build errors and warnings

cherry-pick from: 2d8a942de310d65f61641eae4315888b167c30bb

Change-Id: Ib0d3fc7fcf9eb39e2551b426b9c6075ef758010f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193666
Tested-by: Andras Timar <andras.timar@collabora.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196734
Tested-by: Balazs Varga <balazs.varga@collabora.com>
Reviewed-by: Balazs Varga <balazs.varga@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197962
2026-01-29 09:25:47 +01:00
Karthik Godha 808b88b88b tdf#170153: PPTX->PPTX handle ".bin" media file
Media files are exported based on file extensions. ".bin" file extension
is not handled.

Change-Id: Ib7af829e6a5bd042c59edcef9d09b6c5d4fb80a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196267
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit b3e0324dcc240a08ba75ce7916e5e1b5dee82295)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198173
Tested-by: Jenkins
2026-01-27 14:25:15 +01:00
Kurt Nordback 2dba43e317 tdf#165742 Step 5.1: Support basic I/O for additional chartex types
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>
2026-01-09 07:21:24 +01:00
Kurt Nordback 0686b19728 tdf#167941 - Chart color sequence OOXML import/export
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>
2025-12-05 02:12:41 +01:00
Tomaž Vajngerl f15e0583c2 chart2: Add ComplexColor to many properties of chart elements
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>
2025-12-04 08:21:07 +01:00
Gabor Kelemen 0e23c51d58 tdf#146619 Run IWYU again on include/oox/
Change-Id: I9fa88811687e4109e5708bd1925b60844ff7f6d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193911
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2025-11-29 13:28:01 +01:00
Dr. David Alan Gilbert 656905c94c tdf#168406: oox: Add ParaIsNumberingRestart property
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>
2025-10-30 15:56:23 +01:00
Bayram Çiçek 2034abc1bb tdf#167689: sc: export x15 namespace for xl/connections.xml
- 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>
2025-09-15 09:40:36 +02:00
Kurt Nordback 33bbf0bd20 tdf#167941 - Chart style file is not supported in OOXML
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>
2025-09-03 16:54:45 +02:00
Balazs Varga 41c59a730f tdf#163239 - OOXML sd: fix customized placeholder text in master slide to be
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>
2025-08-13 16:48:36 +02:00
Bayram Çiçek f84f8f2ea4 tdf#167689: Calc: Support xmlMaps.xml
- add Relationship::XMLMAPS in relationship.inc

- save xl/xmlMaps.xml reference into [Content_Types].xml
  - <Override PartName="/xl/xmlMaps.xml" ContentType="application/xml"/>

- save xl/xmlMaps.xml relationship into xl/_rels/workbook.xml.rels
  - <Relationship Id="." Type=".../relationships/xmlMaps" Target="/xl/xmlMaps.xml"/>

- import & export xl/xmlMaps.xml

- import & export <xmlColumnPr> of <tableColumn> (in xl/tables/table[n].xml)

Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: I9666fc921afb7332305bc1d9ce3f2a092e376002
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188451
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-05 22:11:51 +02:00
Kurt Nordback 4313451fc7 tdf#167368 - Chart style index is not exported to OOXML
Add support for style index export, and a CI test for this.

Change-Id: Idb109ef705a6bf8338e18040d447c2806c0781ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187425
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-07-11 18:32:56 +02:00
Caolán McNamara 19861761f9 reuse existing tokennames instead of including duplicate
nm -S --size-sort --print-size instdir/program/libmergedlo.so| grep ' [Dd] ' | c++filt | tail -n 10

before:
... 0000000000002790 d STR_ARR_SVT_LANGUAGE_TABLE
... 00000000000027a8 d RID_STRLIST_FUNCTION_NAMES
... 00000000000027f0 d aFmFormShellSlots_Impl
... 0000000000002920 d pRGBTable
... 0000000000003b80 d vcl::pdf::BuildinFontFace::m_aBuildinFonts
... 0000000000004140 d C.16.0
... 0000000000004d80 d (anonymous namespace)::aMethods
... 00000000000066a8 d aRTFTokenTab
... 000000000000cf60 d xmloff::token::getNames(int)::{lambda()#1}::operator()() const::sppcTokenNames
... 00000000000172c0 d oox::TokenMap::getUtf8TokenName(int)::{lambda()#1}::operator()() const::sppcTokenNames

after:
... 0000000000002058 d abasctl_ShellSlots_Impl
... 0000000000002448 d oox::aPrstLightRigValuesArray
... 0000000000002790 d STR_ARR_SVT_LANGUAGE_TABLE
... 00000000000027a8 d RID_STRLIST_FUNCTION_NAMES
... 00000000000027f0 d aFmFormShellSlots_Impl
... 0000000000002920 d pRGBTable
... 0000000000003b80 d vcl::pdf::BuildinFontFace::m_aBuildinFonts
... 0000000000004140 d C.16.0
... 0000000000004d80 d (anonymous namespace)::aMethods
... 00000000000066a8 d aRTFTokenTab

Change-Id: Iaecc42395910794cb52a77f3d9feff04a6fc8bcd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187601
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-07-10 11:11:22 +02:00
Caolán McNamara e75369aff8 use gperf -fpic friendly version mode
nm -S --size-sort --print-size instdir/program/libmergedlo.so| grep ' [Dd] ' | c++filt | tail -n 10

before:
... 00000000000027f0 d aFmFormShellSlots_Impl
... 0000000000002920 d pRGBTable
... 0000000000003b80 d vcl::pdf::BuildinFontFace::m_aBuildinFonts
... 0000000000004140 d C.16.0
... 0000000000004d80 d (anonymous namespace)::aMethods
... 00000000000066a8 d aRTFTokenTab
... 000000000000cf60 d xmloff::(anonymous namespace)::wordlist
... 000000000000cf60 d xmloff::token::getNames(int)::{lambda()#1}::operator()() const::sppcTokenNames
... 00000000000172c0 d oox::(anonymous namespace)::wordlist
... 00000000000172c0 d oox::TokenMap::getUtf8TokenName(int)::{lambda()#1}::operator()() const::sppcTokenNames

after:
... 0000000000002790 d STR_ARR_SVT_LANGUAGE_TABLE
... 00000000000027a8 d RID_STRLIST_FUNCTION_NAMES
... 00000000000027f0 d aFmFormShellSlots_Impl
... 0000000000002920 d pRGBTable
... 0000000000003b80 d vcl::pdf::BuildinFontFace::m_aBuildinFonts
... 0000000000004140 d C.16.0
... 0000000000004d80 d (anonymous namespace)::aMethods
... 00000000000066a8 d aRTFTokenTab
... 000000000000cf60 d xmloff::token::getNames(int)::{lambda()#1}::operator()() const::sppcTokenNames
... 00000000000172c0 d oox::TokenMap::getUtf8TokenName(int)::{lambda()#1}::operator()() const::sppcTokenNames

See also: https://www.akkadia.org/drepper/dsohowto.pdf

Change-Id: Ic1141c466d06d79d71e573c5f283cd1f089d7067
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187578
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-07-09 16:49:00 +02:00
Kurt Nordback c8b26350d9 tdf#165742 Step 4.6: Establish a narrow export path for chartex
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
2025-07-04 11:48:41 +02:00
Xisco Fauli fde922c6ba use frozen::make_unordered_map so no need to specify the count
Change-Id: I4b486ab84d317ed5a7d8a0b2f3b2ca8537ac2975
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186986
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2025-06-26 11:46:30 +02:00
Kurt Nordback ae939db6ed tdf#165742 Step 4.4: Establish a narrow export path for chartex
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>
2025-06-19 09:51:14 +02:00
knordback 95b2c8b82e tdf#165742 Step 4.3: Establish a narrow export path for chartex
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
2025-05-09 14:41:45 +02:00
knordback a94f960d8c tdf#165742 Step 4.2: Establish a narrow export path for chartex
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>
2025-04-29 05:07:51 +02:00