1651 Commits
Author SHA1 Message Date
Aron Budea 80fa879dec oox: omit default attributes/elements in theme XMLs in OOXML
For fonts: charset, pitchFamily.
Various rectangles: fillRect, fillToRect, srcRect, tileRect

Change-Id: I6dbd914ca8d9f8a2760bfecc6e294d465d52c32f
Signed-off-by: Aron Budea <aron.budea@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13779
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 2b4ed81074195c85d4fc179e22ca7d2e2e6da8f1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211692
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-10-07 08:50:12 +02:00
Mike Kaganski 984efa1ff7 Simplify ChartExport::exportHatch
Make it fill the Hatch struct in all three cases, and only write it in
one place, for consistency.

Change-Id: Ibf4eb97e1c7046a5fe7397509fff9560140b5eef
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13683
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit f14a9a4d3d45b08da075aa5a34b8d7daa5cae6a4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211597
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-30 12:19:32 +02:00
Attila Szűcs df6120bc6e tdf#116148.odp fix default hatch export to pptx
Hatch without a hatch name was exported to nothing.
Powerpoint load that as solid color.
So in that case we export the default hatch data.

Did not expose `PROP_FILL_HATCH` as it was not needed for the fix
But added code to handle that case too if it will be exposed.

Signed-off-by: Attila Szűcs <attila.szucs@collabora.com>
Change-Id: Iec1a850b7b08db8d42de3770d5d81b7f77a905c4
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12642
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 6a2288a5994faed380c45221cdff25181570e23a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211578
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-29 21:29:35 +02:00
Mike Kaganski 0b3a0fae8c Related: tdf#166401 fix writing properties for empty placeholder
Regression after commit b41a780d139ec6ca5a5514db972ccf0e50058dfc (tdf#166401:
support custom placeholder prompt text, 2026-08-17), where a placeholder that
authored no prompt stopped writing text and got a bare <a:p/> instead.

On a slide an empty presentation object reports no text through UNO anyway, so
the paragraph the export wrote for such a placeholder never had a run. It
carried the properties, and those are the formatting. In PowerPoint 2016 the
original title showed white at 22pt, indented 56.5pt; the round-tripped one
showed bold black at 17pt, indented 18pt.

Write the paragraph the way a shape with no text already does: the paragraph
properties, the run properties in endParaRPr, and no run. The prompt still
stays out of the file. That branch of DrawingML::WriteText is now a method of
its own, called from both places.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I034a4e14f388c90872069d32b303c6c143c1814c
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10768
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit e2859f5b23f53281d80cbad4c56db1764aaf1406)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211538
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-29 08:45:18 +02:00
Mike Kaganski 7f398acee4 tdf#173217 editeng,xmloff,oox: keep a hyperlink's name
A hyperlink in Impress or Draw can carry a name, the Hyperlink
dialog's Name field: the description a screen reader announces, and
what PDF export writes as the link annotation's Contents. Saving the
document and loading it again lost it, and a tooltip carried by a
PPTX never arrived at all, so the link fell back to describing itself
by its own visible text.

Commit 8bf8873f30 (tdf#161583
drawinglayer,editeng,svx,sd: add "Name" to SvxURLField ...,
2025-03-06) gave SvxURLField the name and wired the export path to
it, but no filter. It is not reachable over UNO either, and both
filters go through UNO, so neither had anywhere to put it.

Give the URL field a Name property, and read and write it in both
filters: office:name in ODF, and the tooltip of a:hlinkClick in
OOXML. On import that tooltip becomes the name rather than
Representation, which TextRun overwrites with the link's text; a
shape's own hyperlink goes through the same import context and is
unchanged. A Draw or Impress hyperlink now survives both round trips,
as a Writer one already did.

Inserting a field into shape text does not reach
SvxUnoTextField::CreateFieldData: SvxUnoTextBase builds the stored
field with SvxFieldData::Create, which needs the name too, or it is
dropped again on the way in.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I43d44d55ab460547bbed8acd04d8938a4ee9a615
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12270
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit f6218048f057a229eea7f15c198d850ceedd95dc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211048
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-17 08:58:43 +02:00
Andrea Gelmini 850aab7852 Fix typos in code and comments + some reformatting.
Change-Id: I5b6d62104e46c6eb5d142e7e11666806383eed09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210566
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-10 15:15:58 +02:00
Xisco Fauli 0514849637 oox: drop obsolete check. Minimum GCC version is 13
Since
commit 16dd61ab4d
Author: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Date:   Sat Mar 21 08:40:09 2026 +0200

    Bump minimum GCC version to 13

Change-Id: I8ac797a49acde27bc5f39af80e479bc5d218fd69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210554
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-09 09:30:51 +02:00
Devansh Varshney 13650bcefe oox: preserve automatic histogram binning mode
Do not export transient Scott's-rule width as cx:binSize for automatic
histograms. An explicit binSize is imported as fixed-width
binning, so ODS-to-XLSX roundtrip changed FrequencyType from automatic
to fixed width.

Leave cx:binning without binSize or binCount for automatic mode and add
a regression test verifying that FrequencyType remains automatic after
XLSX export and reload.

Signed-off-by: Devansh Varshney <varshney.devansh614@gmail.com>
Change-Id: Icac1a0a032213dd5a6d5581a72d7453e8147d391
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7985
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 9b4ab82c920ae20bc82f6d68031b1f853dbc65c6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209217
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-01 14:00:36 +02:00
Mike Kaganski 4bfb5aaa80 cool#16079: keep the date field in a placeholder
A date/time placeholder saved to PPTX held our own display string
"<date/time>" as literal text with no <a:fld> at all, so PowerPoint showed
that string where the original showed a date. DrawingML::GetFieldValue has
no case for the field kind a header/footer date carries, "DateTime", and
with no type name nothing writes the field.

Name the type that leaves the format to the reading application, datetime:
the field carries no format of its own, the page holds it. PowerPoint writes
datetimeFigureOut in such a placeholder, an alias of datetime1 - MS-OI29500
part 1, 21.1.2.2.4 (fld) - which would pin a formatless field to MM/DD/YYYY;
that alias is read on import as the datetime1 it stands for, so a slide's own
date field keeps its format across a round-trip. Every other datetime* type
was understood; the one PowerPoint itself writes was being dropped.

The page's own DateTimeFormat is out of reach where the type is chosen, so
a footer set to show a time is written as a date. PowerPoint has no
per-page format to fall back on either way, and a date beats the literal
string this replaces.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Icbd9ac57ed7b2311d5f6570fffad1cd78e4d6bf7
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9192
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 145a37d84dd3b22023c46b6be8577008f36a48b9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210141
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-28 12:08:43 +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
Andrea Gelmini 9d83595bbc Fix typos
Change-Id: I5ea360c23a326f266e13c3f77ea1d6933fb6d363
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210051
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-27 20:36:15 +02:00
Andrea Gelmini b852cb2c39 Fix typos
Change-Id: Iaade8f3adc17b9ff20d1295050e3534b1d940356
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210052
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-27 15:01:16 +02:00
Mike Kaganski 47aa325014 tdf#166401: support custom placeholder prompt text
A slide layout is imported as a master page, and the shown text was only set
off a master, so an authored prompt was stored but never displayed or written
back; the export emitted Impress's own localized resource instead. Set it on
a master too, and accept the graphic kind in RestoreDefaultText, which keeps
the object an empty presentation object. Now that the two are
distinguishable, a placeholder that authored no prompt writes no text - its
text body keeps the properties a reader needs, and holds an empty paragraph.

A slide's own placeholder asks its master for that prompt before falling back
to the resource string, so the two no longer disagree about what is really
one placeholder.

This is what degraded in commit 73f1e76b1760d4e936aa22627623c922dcda964b
(cool#15754: Fix PPTX round-trip of empty picture placeholders, 2026-05-21):
mapping a layout <p:ph type="pic"/> to a real presentation service is what
made it reach that text reset, where the previous OutlinerShape mapping had
kept the authored prompt.

Implemented a TODO from commit 67ba6ccd5a
(tdf#140912, tdf#159219: fix import of graphic placeholder with custom
prompt, 2024-01-17). That commit deferred this because marking the object
empty after setting the text crashed the PPTX export; going through
RestoreDefaultText, which does exactly that, no longer does. Its other
objection stands: ODF stores no placeholder prompt, so a save to ODP still
drops it.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I1b6f3e38cb24ac737d3de6258559090596817bad
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9046
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit b41a780d139ec6ca5a5514db972ccf0e50058dfc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210008
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-26 12:20:37 +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
Andrea Gelmini 318520ca2a Fix typos
Change-Id: I85443b13c724e53d96fc80081c365bc4d9fc71bb

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209807
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 15:48:01 +02:00
Regina Henschel 54d6937ab4 cool#15716 find associated shape in SmartArt export
The export needs to write pt-elements for content text nodes with the
original modelId to data.xml. However, the shape has not this modelId
but the modelId of the associated pt-element of type=pres. Thus this
element is searched for in getMasterXShapeForPoint(). The error was, to
examine msPresentationLayoutName. That name is created by the author of
the SmartArt template and is arbitrary. And indeed, a name textNode
exists only twice in the over hundred predefined SmartArt templates. So
remove this test, it prevents to find the shape.

After removing the above mentioned test, an error in WriteText() in
the export becomes visible. The export of a SmartArt diagram calls
WriteText() with bBodyPr=false. With that no a:bodyPr element is
written at all. But for the CT_TextBody it is specified in OOXML, that
the bodyPr child element is mandatory. Thus we need to write an empty
element in this case. Without it, the file markup is invalid and
MS Office requests to repair the document.

Change-Id: I9cdf5e882b415ca1d13718d6c1e47ebb1d2c7018
Signed-off-by: Regina Henschel <rb.henschel@t-online.de>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4396
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 533dccff298edc397a9c0fc564ba4d31b8c27432)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206994
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-08-20 11:43:59 +02:00
Kurt Nordback 104e64812a tdf#165742 Step 5.16: Improve handling of chartData for pptx/docx
Fix import/export of inline chart data for chartex, as seen in MSO-created
PML and WML files (.pptx/.docx). More specifically, fix the round-tripping
of data under <cx:strDim> and <cx:numDim> tags.

Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Change-Id: Ib2f1e92884e938f132876d1a1e18360db40c0052
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7904
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 4fc780c5229e4cff04b60dea9722a6ee9cb8ed2b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209307
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-08-19 12:36:33 +02:00
Kurt Nordback d72a7d1be6 tdf#165742 Step 5.15: Don't export default shape props (continued)
In more cases, avoid exporting spPr when the intent is to use the default
value. Explicit spPr locks the settings, preventing override by styles, for
instance.

Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Change-Id: Ic73016a4d3ac3ebd0d3739a2c76dfaa3d9a70d4c
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7903
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit dcbcd6246f137dec36763a2824463a9246c6cf68)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209242
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-19 08:42:01 +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
Xisco Fauli 0de061bff6 oox: fix crash in ThemeExport::write
Seen in https://crashreport.libreoffice.org/stats/signature/oox::ThemeExport::write(rtl::OUString%20const%20&,model::Theme%20const%20&)

Change-Id: Ie86bc52cdc82d615f923c61b79c2f2ecfe30c002
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208544
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-24 17:37:22 +02:00
Aron Budea 73563ad36c oox: export satMod color transformation into themes
For more complete OOXML export.
satMod (saturation modulation) of colors was already
imported and stored, but didn't get exported.

Change-Id: I4dd2e58382749c3b3a47647399e48517a41393bf
Signed-off-by: Aron Budea <aron.budea@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5054
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 40aaaeff1d2ff4f6ba5cd2c8fc80356d38996e03)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208066
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-14 13:25:27 +02:00
Khaled Hosny 5e15bcf004 tdf#172647: Write the legacy font name on PPTX export
It doesn’t support typographic font names.

Change-Id: Ia8a8865fe84795d41b6401f57d9078be15cbee73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207550
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-14 00:15:25 +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 18fd26c40b Revert "oox: export custom-shape equations and handles to DrawingML custGeom"
This reverts commit fd02bc931f.

Reason for revert: See cf71aff66f467f1f4a4506c07fbe552dd1bd3845

Change-Id: I453c46646e36e15ebe8ebd15843258de35f39d27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207108
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-22 16:08:13 +02:00
Andras Timar fd02bc931f oox: export custom-shape equations and handles to DrawingML custGeom
A custom shape that has no matching OOXML preset is exported as
<a:custGeom>. Until now that path baked every coordinate to a fixed
number and wrote empty <a:avLst> and <a:ahLst>, so the shape lost its
adjustment values and adjust handles: it became frozen and could no
longer be edited by its control points after saving to docx/pptx/xlsx.

Convert the shape's ODF "Equations" to DrawingML guide formulas by
walking the parsed expression tree (FunctionParser::parseFunction). At
that level the original structure is intact, which lets the export:

 - emit <a:gdLst> guides for the equations, keeping width/height symbolic
   ("w"/"h") so the geometry scales correctly on resize;
 - express the trigonometric functions (sin/cos/tan): the angle-conversion
   idiom (X*pi/180 or pi*X/10800000) is recognised and reconciled to
   OOXML's 60000ths of a degree, for both trig arguments and standalone
   angle values such as arc parameters;
 - declare the referenced adjustment values in <a:avLst> ("adj1", ...) so
   the guides stay driven by the shape's handles;
 - emit an <a:ahXY> handle for each ODF handle that drives an adjustment
   value, referencing the matching adjustment guide;
 - reference an equation from a path coordinate (or handle) by the token
   that holds its value.

svx gains two small ExpressionNode accessors (getChild/getIndex) so the
expression tree can be walked from the export filter.

Equations or handles that cannot be expressed yet (raw-radians angles
without the pi/const idiom, atan2/cat2/sat2, ellipse, polar handles) fall
back to resolved coordinates, as before.

Also update the now-outdated comment in ShapeExport that claimed ODF
equations cannot be converted to DrawingML. Adds a test on a symbol shape
(tdf#142603) and a circular arrow (tdf#157289 trig guides), and updates
testFlipAndRotateCustomShape / testEquationGuidesExport for the new
parametric output.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I21cf73df018417fcfe9c2f9ecd185c0ac29a198d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4464
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 40967878aeaee989216b6e0cfd6cf81af4a8b1d8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206685
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 20:38:02 +02:00
Devansh Varshney 1c88202d58 chart2: fix histogram ODF/XLSX roundtrip
ODF import applied the histogram template before series data existed, so
bins were not rebuilt on reload. Apply it again after series import.

For XLSX import, preserve generated histogram bin labels during axis
conversion instead of replacing them with generic category labels.

For XLSX export, write the direct values-y source range for new
histograms instead of generating an _xlchart.v1.N alias without a
guaranteed matching workbook definedName.

(cherry picked from commit d346a0edcaa200720b8ce5716a84427b5fce10d8)
Signed-off-by: Devansh Varshney <varshney.devansh614@gmail.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3302
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>

Change-Id: I6c9d2aa5c70e0340331cde159499f3c4992828a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205843
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-11 01:59:34 +02:00
Arnaud Versini 9de2f95044 oox : use more frozen unordered_map to avoid allocations
Change-Id: I05bc2deedf4e3d4a60ac59049f98596211ae40ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205675
Tested-by: Jenkins
Reviewed-by: Arnaud Versini <arnaud.versini@pm.me>
2026-06-08 08:53:36 +02:00
Armin Le Grand (collabora) cb18d43b9f SmartArt: Improve Graphic export for unchanged Diagrams
Currently the Graphics from imported and unchanged Diagrams
is held in uno::Any structures (look for DomMapFlag like
OOXDataImageRels/OOXDrawingImageRels) in the form of their
binary data. It gets deleted when the Diagram is touched,
and written to a new rels DomTree when the Diagram was not
changed.
The problem is that if multiple Diagrams exist and/or the
identical Graphic is used somewhere else these Graphics
are written double (or more) since before this change they
were written always.
This change now directly remembers the used XGraphic in the
uno::Any, so no extra space for the binary data is needed.
These are then used for export if necessary.
In the to be created rels the RelIDs have to be identical
since the original DomTrees for model and/or replacement
graphic gets written. This *could* be adapted to new
RelIDs but would be complicated, not easy and is not
needed.
The export uses more common methods that I had to slightly
adapt to add a XGraphic to the media part of the target
file, these already are capable of detecting existing
graphics. These now return a new relative path to the
media part that then gets used in writing the DomTree of
the created rels file.

Signed-off-by: Armin Le Grand (collabora) <Armin.LeGrand@collabora.com>
Change-Id: Iebbfe08d495d67b17eeaaadc76233e096df85727
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1915
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Armin Le Grand <armin.legrand@collabora.com>
(cherry picked from commit 5429358ead879f3d9f350c0ff05193813e6f5119)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206020
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-05 12:42:34 +02:00
Armin Le Grand (collabora) 3b0aa2199e SmartArt: Calc Diagram Im/Export improvements
Calc imported Diagrams due to using mainly DrawingLayer
oox import code, but export, even of the unchanged
DomTrees, was missing (just never done). Thus in
versions before this being a Diagram was lost, it
just always was converted to a GroupHierarchy containing
the Shapes that were part of the Diagram.

Added to read the Diagram's name at Import at all for Calc
oox import, set and used now at the created Diagram.

Added to secure/save the DomTrees for the imported
ReplacementGraphic when importing oxx Calc, that was just
also never done, so it could not be exported as unchanged/
original data (and was not, so that was never noticed).

Added complete export of oox Diagram to Calc. This includes
unchanged versions, but also changed/added versions. This
may need more work, but own turn-around works already.
This mainly uses the same ExportContent, but that needed
some adaptions.

Doing this I also changed the ShapeImport of Calc to use
a single oox::drawingml::ShapeExport, before it created
a separate temporary one for every Shape that was imported.

Also added the checkMinimalDataDoms check to Calc oox
export that is already used in the other apps. As always,
there are huge differences in oox im/export for Calc
compared to the other apps, e.g. a completely different
Group ImportContext is used compared to Impress and I have
no idea why that is done.

Signed-off-by: Armin Le Grand (collabora) <Armin.LeGrand@collabora.com>
Change-Id: Ib7c1b73f7f72599f6054d0cf9203f46980eec5cf
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1887
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Armin Le Grand <armin.legrand@collabora.com>
(cherry picked from commit b1fbe49401e5e4dbe62ff25580ec7252c0376e88)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206019
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-05 12:42:07 +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
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
Tomaž Vajngerl 6c1cfe00a0 oox: Export document theme - major/minor supplimental font list
This was imported but export was missing. Previously we had the
grab bag for this, so this was exported "correctly".

Also add a round-trip test for this.

Change-Id: I8ea165425828124bf76cbe6697f6d00c60628655
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/567
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit f5537725982ccf7c2695ca80e51b8c93a56a6bba)
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/605
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit d6f52bd730994d9a7d220e2cbb0592bda202fbeb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205643
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-05-25 09:02:54 +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
Devansh Varshney 5e836dfec5 oox: support histogram OOXML import and export
Preserve histogram charts when importng and exporting XLSX file.
Import histogram charts from XLSX, keep their source data and
settings, and export them back that keeps them working as
histogram charts.

Change-Id: I9c3e39fd3b429b9f61c249dd952bf70d9113ed7f
(cherry picked from commit 330fa62f1ef7b7c848c2da98d18a8bb453e82201)
Signed-off-by: Devansh Varshney <varshney.devansh614@gmail.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1882
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 2ed0256704eb3ca34ff0a217b330849a3f7952da)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203895
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-05-23 00:10:01 +02:00
Kurt Nordback 8bf5b36ce1 tdf#165742 Step 5.9e: Store enumerated geography parameters as enums
The projection type and region type are described in the OOXML spec as
enumerated values. Store them internally as such, converting from string on
input and to string on output.

Change-Id: I5ee9b6996362bf8cc8db28fc921f3b95bfb7ff46
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2065
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 00cb914655c1250656f81eed96ffd9df198387fb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204761
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-14 12:54:34 +02:00
Karthik a28d3d2717 PPTX: Hidden property of group-shapes is not preserved
When exporting to PPTX, we are not writing "hidden" attribute for
group-shapes.

Change-Id: I888da834d05fb891bca9c1fe26d6fd958e62a994
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1903
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 9afa317ca6db7b112d6d457ac512664c5d71b041)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204852
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-06 17:27:55 +02:00
Regina Henschel 5e8fe2bf0a Make SmartArt export valid pptx
The wrong namespace in WriteDiagram prevents Open XML SDK 2.5
Productivity Tool for MicroSoft Office to open an exported
file at all. After fixing that, the tool reports some
validation errors. They a fixed with changes in datamodel_oox

Signed-off-by: Regina Henschel <rb.henschel@t-online.de>
Change-Id: Ia3c85cbc6bb44d848dc3463a12861b55efa8577b
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/1469
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Armin Le Grand <armin.legrand@collabora.com>
(cherry picked from commit fb78b5b9cb3a12eeab9f8a992917021cee82a66c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204740
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-04 20:35:31 +02:00
Armin Le Grand (collabora) 7f92acf04e SmartArt: Writer oox roundtrip, unified AdvancedDiagramFeature
Much-improved Writer oox roundtrip. It now checks if export
is possible as Diagram at all. It is capable of re-creating
ModelData and ReplacementGraphics. Cross-checked with ppt/oox
roundtrip, too.

Original Writer import held the DomTrees in the GrabBag of the
GroupObject, but by default converted content to a single graphic
shape containing a Metafile. This of course contradicts that
part of the new DiagramModel is in the Shapes - adjusted now.
I see no plausible reason to by default do that in the future
when we want to do more with Diagrams. Nonetheless that stuff
is still there if AdvancedDiagramFeatures is not enabled to
stay compatible until we can activate the feature.

Needed to adapt the ShapeImport for ReplacementGraphic for Writer,
it is (why?) different in oox from Impress import. Added needed
stuff like import of ModelIDs.

The export of ReplacementGraphic in Writer also is different,
needed to adapt to behave more like Impress export when Diagram
creates that.

Unified usage of useAdvancedDiagramFeatures to one place, adapted.
This allows fast changes (e.g. to use ExperimentalMode if needed)
or removal.

Change-Id: If8b73029615e8c9e5d6d93db26449bdfe6e3ef97
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/990
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Armin Le Grand <armin.legrand@collabora.com>
(cherry picked from commit f2f9961505ea7278e6aba84ab06fdced401a7851)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204739
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-05-04 20:35:23 +02:00
Karthik 9a2fd1711d XLSX: External references of drawing-shape macros are not exported
Drawing-shape can contain a macro attribute, this might reference an
external defined name. The external link referenced by this reference
is not being exported.

bug-document: forum-mso-de-112942.xlsx
Change-Id: I55b7fee06a93b6f08b9df0803bce78bbd37e2efe
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/1156
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 9d4d3f6fdc67ed43c472b8a4f75c12a66aeb46f0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204748
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-04 20:34:59 +02:00
Ujjawal Kumar b43eb71a3c oox: only write showLeaderLines in dLbls for pie and doughnut charts
The OOXML standard defines <c:showLeaderLines> and <c:leaderLines>
as valid children of <c:dLbls> only for pie and doughnut chart types.
The export code wrote these elements unconditionally for all chart
types, including bar charts. Excel crashes when it encounters these
elements inside a barChart series dLbls.

For non-pie/doughnut charts, the c15:showLeaderLines extension
(from the Office 2013 chart extensions namespace) is the correct
mechanism to express leader lines. The code already had logic to
write this extension for non-pie charts, but it was written in
addition to the invalid standard elements rather than instead of
them.

Fix by guarding <c:showLeaderLines> and <c:leaderLines> behind a
pie/doughnut check, and writing only the c15 extension for all
other chart types.

Change-Id: I652927b8d29de159a3bda10461bc220affe93dd9
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/778
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 9a52b0c1633108022e58605f6732ad81160a9bb1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204677
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-04 09:38:17 +02:00
Ujjawal Kumar 31e1da863c chartex export: Use appropriate doc namespace in writeChartexAlternateContent
Bug document: forum-mso-de-138303.pptx

The chartex export code always writes xdr namespace regardless of
document type. Use appropriate namespace for document type.

Additionally do not write <c:date1904/> which belongs
to older non chartex chartSpace due to which the file was failing
to load in powerpoint.

Additionally write XML_nvPr for pptx as officetron
complains about the schema if this is absent for the
mentioned document.

Change-Id: I22e6e1641412c43c19c354dd9d763fb40fb367ba
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/194
Reviewed-by: Balázs Varga <balazs.varga@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit a14b9a514234bf5f676a83e29a80a1b9bb67020c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204673
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-02 21:29:52 +02:00
Xisco Fauli cfd3309a5d loplugin:unusedmethods
Check existing ones that can be removed

Change-Id: I6ee6fc1772c620ac5d12fea915681b094b7c3bfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204583
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-30 08:54:45 +02:00
Ujjawal Kumar 1fa18f4da0 ooxml: Use mnSeriesCount in export of stock charts for unique idx/order
Excel expects unique values for idx and order in charts under
the same plot area.

Bug document: forum-fr-59757.xls

The above documennt when exported to xlsx contains duplicate
idx and order values for stock and line chart which renders
excel unable to open the document.

Change-Id: Ieefdd2ecb5b436e1a98606a35328d73a29073718
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200907
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201524
(cherry picked from commit 1904e28b8680a5c120169b0779ee9e8fe556d6d2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204499
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-28 12:54:03 +02:00
Ujjawal Kumar 07fc68f805 ooxml: Fix export of traditional combined charts by reusing axes.
Excel expects a maximum of 2 axis one for primary
and the one for secondary. We have to share axes
whenever we can.

Bug document: forum-mso-de-48440.xls

The above document when exported to xlsx was generating
an extra primary axis pair for the first scatter chart.
It rather should have shared the primary axis generated
by the bar chart.

Change-Id: I70c0abd21b8ea93afc01d2fd080299da53bf2cf7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200933
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201523
(cherry picked from commit 59f0a61f4ad13170e6f9d1eab8e892e6e2db9b03)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204498
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-04-28 12:26:41 +02:00
Ujjawal Kumar 7d8063d88c ooxml: Fix reuse logic of axes for charts
Bug document: forum-mso-de-37362.xls

The above document when exported to xlsx produces
an extra cat and val axes resulting in a total of
3 axis pairs because of a logic error due to which
excel fails to open this file.

The above fix ensures that the existing axes are
reused properly.

Change-Id: I576e01f7ba71065b5db0350fb8311697d1d864e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200910
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201520
(cherry picked from commit c597f7d6d5f4baf97b306624d6e52e3e83a2bece)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204497
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-28 12:19:21 +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 8cbd028c0b tdf#165742 Step 5.9c: Support for gapWidth tag import/export in chartex
The gapWidth tag specifies spacing for bar/column-like charts. In old-style
charts, it's given in the type group. In chartex, it is an attribute of the
<cx:catScaling> child element of <cx:axis>. This code thus includes some
structural changes to allow for reading the value in the axis processing
and storing it in the PropertySet associated with a type group (XChartType).

Change-Id: I21bdf3b511269c34c225873ee66fbaf29a7cb0ea
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/718
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit bb1d3ba56f5b17d0979addac95a3973278d2f46b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204149
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-23 13:37:59 +02:00