1027 Commits
Author SHA1 Message Date
Xisco Fauli 7003eb6fc6 fix headers
Change-Id: Ia2732cc041367bc113654bc424ea6621f3961e9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211724
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-05 08:52:04 +02:00
László Németh e668dc84eb tdf#173389 cui offapi sw xmloff: add custom compound-based hyphenation
Add new paragraph justification option "Split compound words" for
custom compound-based "smart" hyphenation. Add compound-based "smart"
hyphenation support for Danish, Dutch, Esperanto, Estonian, German,
Norwegian, Swedish (and potentially, Icelandic, Finnish and
Latvian) languages by fixing Hunspell morphological analysis and the
associated lingucomponent code. (Previously compound-based "smart"
hyphenation was enabled only for Hungarian.)

With the new option it's possible to keep MSO/MS-DOCX interoperability,
also introducing a better hyphenation algorithm for several languages.

Details:

    * Add check box to Alignment in paragraph formatting dialog window;

    * Store properties in paragraph model:

      css::style::ParagraphProperties::ParaIsCompoundBased

    * Implement it by checking the new option in the previously
      added commit f9f694f5d9f39c5801bc5fec45867252c293bbcb;

    * Add ODF import/export (loext:compound-based);

    * Add ODF unit tests by the new tdf173389_smart_hyphenation_nl.odt
      and tdf173389_smart_hyphenation_hu.odt. Now use the previous
      tdf119908_smart_hyphenation_hu for disabled compound-based "smart"
      hyphenation, also the new tdf119908_smart_hyphenation_nl.odt.
      Note: the Dutch test document results better compound-based
      hyphenation in two positions.

    * Add Hunspell patch to fix Danish, Dutch, Esperanto, Estonian,
      German, Norwegian, Swedish (and future Icelandic, Latvian,
      Finnish) morphological analysis for compound word constituents;

    * hyphenimp.cxx hyphenate(): fix tokenization for consecutive
      pa: elements, like resulted in the fixed Hunspell dictionaries.

Follow-up to commit f9f694f5d9
"tdf#173389 sw: add compound-based “smart” hyphenation for readability".

Change-Id: I4414bd588646ecf6dc86b77642833ac9c7820a98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211341
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
2026-09-23 14:38:07 +02:00
Dennis Francis 0bbeeeaf54 chart2: odf import/export of correlation circle chart
ODF has no name for this chart type, so the file says two things at once, the
way a histogram already does: chart:class names the scatter chart, which is the
nearest a reader that knows nothing of correlation circles can make of it, and
coext:class beside it names the type itself. A reader that knows the coext name
gets the chart back as it was saved.

The series need no new shape in the file. The feature column is the range of
the series and the two dimension columns are a domain each, which is where a
bubble chart already keeps its x and y values, so both the reading and the
writing of them follows the bubble path rather than a new logic.

The schema the tests validate against lists the values coext:class may take, so
the new one is added there beside the histogram.

The test document is one block of five columns: three features and then the two
dimensions, the shape the wizard asks for. The test checks after a round trip
that the chart type came back, that the file carries both class names, and that
every series still holds its feature column beside the two dimension columns.

Change-Id: Iac73ff357c7490b4f38a4390c63948cf148d8585
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8106
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 4e59ea1c83e61b8dc2647f9a915884f9d461165d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210498
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-05 00:10:37 +02:00
Andrea Gelmini 1520f7f1cf Fix typos
Change-Id: I29e2decc541cecbc5b2bf5bc5d32c53457e25a11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210448
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-03 09:01:22 +02:00
Mike Kaganski 4c9116ee9d tdf#166401: keep text in a picture placeholder
A slide's picture placeholder can hold text the author typed instead of an
image, which PowerPoint displays. Impress dropped that text on import and
wrote nothing at all for such a shape on save. To reproduce, type into a
picture placeholder in PowerPoint, save, open the file and save it again:
the text is gone from the shape, and the shape from the file.

What a placeholder is now lives in the page's presentation object list, and
what represents it follows what it holds: a graphic object for a picture, an
SdrObjKind::OutlineText object while it holds text, the placeholder itself
while it holds nothing. It changes over when a file states such text, when
that text is deleted again and the prompt comes back, and when an image is
put in. Text arriving another way, through the API, is caught by the new
SdrPage::onEmptyPresObjFilled and switched at the next idle, so that route
needs a spinning scheduler; what a save writes is right either way. An object
in text edit is left to that edit, which is where it changes over: the idle
pass walks every page, so it asks each object rather than trusting the one
that asked for the pass - in a shared document another view holds it. That
switch is the model's own and covered by no undo step - it answers for a
document the API changed, not for anything the user did.

What the file says about the shape travels with it both ways, the graphic
items included, so an outline a picture placeholder is clipped to is still
there when a picture arrives. It is not written while the placeholder holds
text: the file says text box, and a text box states no geometry to clip a
picture to.

PPTX writes it as the placeholder it is, with the text it holds. ODF states
the class of what represents it, so the placeholder's own class travels
beside it as coext:placeholder-class, and a reader that ignores the
extension sees an outline placeholder with the text.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I0f3353115e56d63a4158ebaeb5689689499894bb
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9441
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 7921401ae48188568e1016db00bd90256d666a6a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210329
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-01 19:52:06 +02:00
Mike Kaganski 64fe896867 tdf#166401: keep a placeholder's prompt in ODF
Commit 67ba6ccd5a (tdf#140912, tdf#159219:
fix import of graphic placeholder with custom prompt, 2024-01-17) left
the prompt out of ODF for want of a representation, so a reload replaced
an authored one with our own localized default. It now travels as a
coext:placeholder-prompt attribute beside presentation:placeholder, on
draw:frame and draw:page-thumbnail, written when saving with extensions
and added to the extended schema so the round trip validates. It is
also listed in the Collabora ODF extensions notes.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I12b51ff2bc103e5c26e94558802064919c7289dd
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9070
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 6b1b6331ada0cc948e880eb83db5506f8bf1aa9c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210297
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-31 23:49:35 +02:00
Mike Kaganski be205bb214 cool#16078: ODF round-trip of the clip polygon
Carry the GraphicClipPolyPolygon UNO property on graphic-object
shapes through ODF save/reload as a new <coext:graphic-clip-poly>
child of <draw:frame> with the polygon serialised as svg:d (the
same SVG d-path encoding draw:path uses). A new XML_GRAPHIC_CLIP_POLY
token is added in lockstep across xmltoken.hxx, xmltoken.cxx, and
tokens.txt so the XMLTokenEnum and FastParser tables stay aligned.

The element is taken before the frame decides what its shape child is, and
applied when the frame ends: an empty presentation object has no draw:image for
the polygon to follow, so the polygon comes first and the shape it belongs on
does not exist until then. A placeholder saved to ODF came back unclipped
otherwise, which is the shape of file our own save writes.

It goes on the image the frame keeps, which is not always the last one it saw:
a frame with a replacement image holds several, and the ones that lose are
taken off the page and disposed.

Export goes through a new ImpExportGraphicClipPoly helper called
from ImpExportGraphicObjectShape alongside ImpExportSignatureLine
and ImpExportQRCode (under ODFSVER_EXTENDED). Import is handled
in SdXMLFrameShapeContext::createFastChildContext, which is where
<draw:frame> children land - the GraphicObjectShape sub-context is
nested inside that and never sees this sibling directly.

The element is added to the extended ODF schema next to
loext-signatureline and loext-qrcode, so a document carrying it
validates, and is listed in the Collabora ODF extensions notes.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Ib9ae65c1b6f2d8fdb28ae086fd7e2be2f8a8ee24
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9191
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit b7a56041afda6b658b6b16bb51a5939295c40d75)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210122
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-27 17:00:20 +02:00
Andrea Gelmini c47ad56960 Fix typos
Change-Id: Id30035895d55d9cefc7f2bcf11f9aa76a4a58cbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209901
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 14:24:48 +02:00
Andrea Gelmini ab6ec04dd8 Fix typos
Change-Id: I8b4a9933b3c3df1871a7eb94023f0d0fd451afd1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209902
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-25 11:32:16 +02:00
Andrea Gelmini 4f86cfa577 Fix typos
Change-Id: Ic09e8f2877a7106eb074586662d1733828d85197
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209422
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2026-08-21 14:19:46 +02:00
Andrea Gelmini 6347abedcf Fix typo
Change-Id: I007528d68712ce70acb7120228b770a21cb3a544
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209371
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-20 07:47:09 +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
Khaled Hosny 7eef6029ec tdf#171624: Make font variation settings per script
We had only one shared setting for the three script groups, which means
the same variation settings are applied to the three groups, which makes
no sense as they often use entirely different fonts.

Change-Id: I6f2a8b4d1c9e0357a6b2d8f4e1c7093b5a2d6e84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209222
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-08-18 00:28:11 +02:00
Caolán McNamara d3cf169ea1 bring external presentation sounds under link management
A presentation can reference sound files outside its own package, on a
slide transition, an animation, or a click action.

Linked graphics already come under link management, where the user
allows each external reference on its own.

Bring presentation sounds under the same link management. Each external
sound is registered as a link the user can allow through the link-update
infobar or "Edit, Links".

For the uno api move these sounds around as XSoundReference so their
allowed state can be moved with them. So that changes the property
from a string to an XInterface. Setter still accept a string, getter
returns the new XInterface, there's an acknowledged possibility of
incompatibility despite being technically api-change-passing

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ib7deea2f78cf5c5b9958e43adb8e6f46b1b31e80
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/6970
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 0aa870b7b5a6bda50bab50c7a0a41d28fdf4f6ab)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208430
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-22 14:01:37 +02:00
László Németh 5da16bdc79 tdf#172674 offapi cui sw xmloff: add hyphenation slider feature
To solve the trade-off between better spacing and less hyphenation,
support hyphenation level and its user interface, the hyphenation
slider, like DTP software do.

Add new paragraph property com::sun::star::text::ParaHyphenationLevel

The hyphenation slider is the basic interface of DTP software to adjust
single (or all) paragraphs using better word spacing (i.e. more
hyphenation) or less hyphenation (i.e. worse word spacing). It allows 1)
to choose the best from the near equally good layouts and 2) to solve an
extreme bad layout (caused by words without hyphenation or other corner
cases).

– 50% hyphenation level means disabled hyphenation, if minimum
  and maximum word spacing settings allow to break the line within
  words (default interoperability value).

– 100% hyphenation level means using extra hyphenation only if that
  results better word spacing in the line, than breaking within words.

– Between 50% and 100% hyphenation level, use extra hyphenation only if
  its weighted word spacing is better, than breaking the line between
  words (weighting grows with the hyphenation level).

– Between 0% and 50% hyphenation level it means disabled hyphenation
  with increased desired and maximum word spacing, depending on the
  hyphenation level. At %0, the desired word spacing is enlarged to the
  original maximum word spacing, while maximum word spacing is enlarged
  by a single space.

For example, the original 4-page unit test document with the default 50%
hyphenation level contains 14 hyphenations. 100% hyphenation level
results in 22 hyphenations, while 0% only results in 8 hyphenations.

– sw/qa/extras/layout/data/tdf167648_minimum.fodt,
  sw/qa/extras/layout/data/tdf169168_minimum.fodt: set maximum
  word-spacing to 100% from 101% to limit the original unit test only
  for minimum letter spacing.

More information: LO/COOL Book & Typography projects:

https://www.numbertext.org/typography/

https://www.numbertext.org/book/

Follow-up to commit cf104be5cb "tdf#119908
tdf#166113 cool#15973 sw smart justify: fix DOCX hyphenation",
commit d572576dd6
"tdf#119908 cool#15973 sw smart justify: fix "smart" hyphenation",
commit 529755f091
"tdf#166113 sw smart justify: adjust algorithm for interoperability" and
commit 7d08767b89 "tdf#130088 tdf#119908
smart justify: fix DOCX line count + compat opt."

Change-Id: I84b3893ea6c5cd4eff74a73514722285e7071392
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207545
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: Jenkins
2026-07-04 17:11:37 +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
Tomaž Vajngerl 5286d91e80 sc: round-trip dynamic-array masters and @ through ODF
Import classifies each formula cell:
- Plain non-array, no coext:spill: the import-time walk over
  the freshly compiled RPN decides if the formula intends an
  array. If yes, prepend @ at the front of the parse and at
  the back of the RPN.
- Plain non-array + coext:spill="true": a master saved while in
  spill state. Comes back at 1x1 with the dynamic flag, the
  position marked spilled. The next interpret re-checks the
  blockers.
- Array formula (matrix dims): static array master by default.
  coext:spill="true" promotes it to a dynamic-array master.
  Legacy Ctrl+Shift+Enter (CSE) arrays without the marker keep
  their static iteration-and-pad behaviour.

Export reverses:
- ODF always strips @ on save. The @ is an in-memory marker
  only. OOXML and the UI grammar keep it.
- Dynamic master: coext:spill="true" in extended ODF, matrix
  dims as before. In spill state, write as plain non-array with
  coext:spill="true".
- Static array master: matrix dims, no coext:spill.

GetFormula skips the {} wrapping for dynamic-array masters so
they read back as plain formulas. Static array masters keep {}.

XML_SPILL is added to the xmloff token machinery and the ODF
extension schema (OpenDocument-v1.4+libreoffice-schema.rng)
gains coext:spill on table-cell.

Tests cover each import shape, the FODS export of regular and
spilled masters, the @ insertion on CompileXML, and the @
stripping at the formula-compiler level. ArrayFormulasStatic.ods
is a legacy fixture whose B1 = AND(C4:C52) summarises 49 per-row
value checks. The test runs the grid on import and after an ODS
round trip and confirms plain bare-range cells gain @ while the
five matrix masters stay static, keep their {} wrapping, and
get no coext:spill in the saved XML.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Ib8ae345528185c824415ec5d039b6d5cf0d7eac8
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4663
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit a21f6a3a0eae72fef90576d249d96dc00beeb2c5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207171
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-24 00:04:16 +02:00
Samuel Mehrbrodt 297cf4e138 Prevent warnings on attributes handled by base class
SdXMLNumberFormatImportContext iterated the attribute list a second time
after its SvXMLNumFormatContext base had already consumed it, emitting
XMLOFF_WARN_UNKNOWN for everything except number:automatic-order.

This prevents warnings like:

    warn:xmloff:...:XMLNumberStyles.cxx:595: unknown attribute urn:oasis:names:tc:opendocument:xmlns:style:1.0 style:name value=D6

for attributes the base class already handles correctly.

Change-Id: I9d99d9fa72f4a174a2c16fdc5cb8901377bd8d3f
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/1183
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1451
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 7a06eb6187c252aae52c40ad9dc6a6b9f8c1a07c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207069
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-06-21 20:12:38 +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
Michael Stahl a50e3188a3 svx,sw,xmloff: split no-first-page-header-flag in 2
In Word only the first-page-shared flag is shared between header and
footer, while the existence of header and footer is independent.

Split into core flags `DisableFirstHeader` / `DisableFirstFooter`,
properties `HeaderNoFirst` / `FooterNoFirst` (which allows removing some
special checks as the name prefix checks now cover these).

`SectionPropertyMap::setHeaderFooterProperties()` had some special code
to turn off a header but not a footer, add that to do it consistently.

Also rename the ODF attributes, `is-first-page-header-enabled` better
describes the values than `is-first-page-header-shared`.

Signed-off-by: Michael Stahl <michael.stahl@collabora.com>
Change-Id: Ieee9cb7a8f7b4fb7e66352c95142d8ccb06f9cb5
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4383
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit a443891f1a6480421fa08c311526c1a9d4bdd642)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206703
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-18 12:17:26 +02:00
Michael Stahl de4a472a86 sw,xmloff: DOCX: improve Word page margin compatibility
The problem with not having some but not all headers enabled on a page
style is that Word does page margins differently than Writer, and this
causes `testTdf116486` and `testFdo44176` to fail.

In Writer, it's always additive: page `fo:margin-top` + header
`fo:margin-bottom` gives the spacing from the top of the page to the
body text.

In Word, there is a `w:header` (from top of page to header) and `w:top`
(from top of page to body text) and the problem is, they're not
additive, both are measured from top of page.

If all headers are enabled,
`SectionPropertyMap::PrepareHeaderFooterProperties()` can map this to
`HeaderHeight` and `HeaderBodyDistance` properties, but of course those
won't be used if there's no header on the page.

So import `w:top` as a new property "MinTopBodyDistance" (and also
"MinBottomBodyDistance") implemented as new item
`RES_FRMATR_PAGE_MIN_TOP` (and also `RES_FRMATR_PAGE_MIN_BOTTOM`).

Use it in `SwLayoutFrame::Format()` to set the page frame margins, but
only if there is no header; else rely on the existing header properties.

Export this to ODF as
`coext:min-page-margin-top` and `coext:min-page-margin-bottom`.

Signed-off-by: Michael Stahl <michael.stahl@collabora.com>
Change-Id: I9d98bbf7138c9ef04d4ab1ddcb4c3183a12d9b11
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4310
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit e065ba01c029cd01c9128afccdc953e2e3a49e65)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206702
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-18 12:17:15 +02:00
Oliver Specht 5dd328effe Support of page styles without header/footer on first page
Import/export to/from docx/rtf supported.
Unit test available.

Change-Id: I12065ba4fb050d7dfc013eda704ebe2acb53c88e
Signed-off-by: Oliver Specht <oliver.specht@cib.de>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3580
Tested-by: Michael Stahl <michael.stahl@collabora.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit b8af8f046a098c67d7caf44dc70d1db5cabf24e2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206698
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-18 12:17:01 +02:00
Xisco Fauli 3542592a5b Revert "tdf#162563 Drop AppletShape import-export support from xmloff"
This reverts commit 3fcdf7093c.

it breaks the published API

Change-Id: Ic7063a46db3e838a83addf612a2ef305ba0e985e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206706
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-17 08:53:21 +02:00
Gabor Kelemen 3fcdf7093c tdf#162563 Drop AppletShape import-export support from xmloff
Change-Id: I9fc94cf361bb8df706c4a8a289b36c541edac5d4
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3207
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 89887378e63cb33a4d675817e39fd30d59580ff2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206301
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-10 16:21:04 +02:00
Devansh Varshney a83694c6ca xmloff: support histogram ODF import and export
Export histogram charts as chart:bar with coext:class="histogram"
and write histogram properties.

Import the histogram class and configuration again recreate the
HistogramChartType, and trigger the histogram template once chart
import is complete so calculated bins, categories, and frequencies
are rebuilt from the preserved raw values-y data.

Change-Id: I202d5666315d4f26da2bf4b3650b4388a9e4fb50
(cherry picked from commit 5fb2f5f2c2676743b823640dbaa02762308d6a54)
Signed-off-by: Devansh Varshney <varshney.devansh614@gmail.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1880
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit a54fc185d3d73f765bd37cc98df92cac81e01572)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203814
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-05-23 00:09:47 +02:00
Mike Kaganski a9026d4d17 xmloff, sc: ODS import/export of threaded comment data
Store the full threaded comment data as loext: extension elements inside
office:annotation: root text, GUID, person-id, datetime, resolved flag,
and replies. The person list is written as a separate loext:persons
element at the spreadsheet body level, referenced by person-id from
each annotation.

The loext:resolved attribute on office:annotation is not used for Calc
annotations, since resolving only applies to threaded comments; the
flag is an attribute on loext:threaded-comment instead.

Extend the libreoffice ODF schema with loext:threaded-comment,
loext:reply, loext:persons, and related attributes. Add xmloff tokens
for the new element and attribute names.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Ibdb6cca545c853b196a8ec234b26542d392967bb
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/803
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 8cddb66d12942025e223d0d54f6bca03ac3b7f94)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205296
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-19 09:28:04 +02:00
Muhammad Naeem 3d029be871 tdf#143148: Replace include guards with #pragma once
Verified with: container=1 make -j4 oox.build sax.build xmloff.build \
comphelper.build sfx2.build reportdesign.build jvmfwk.build shell.build \
jvmaccess.build

Change-Id: Iafcce5855e7ab4e6b146e149eba43fcc1814a825
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204667
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-05-18 15:21:59 +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
László Németh 62aecba14c tdf#38159 cui sw offapi xmloff: add paragraph composer
Balance word spacing within the consecutive lines
to get uniform grayness and less rivers for better
readability, enabled by the new paragraph property

com::sun::star::text::ParaComposer

and the following developments:

* Add Paragraph Composer checkbox on Alignment pane of the
  paragraph formatting dialog window (not default yet);

* Implement paragraph composer: big word spacing of a
  line is decreased by shifting the last word from the
  previous line, only if the word spacing is better, than
  before, and the increased word spacing in the previous
  line doesn't exceed the Maximum word spacing (limited
  paragraph composer);

* When Maximum word spacing is not greater than the Desired
  word spacing, shifting of the last word is not limited
  by the Maximum word spacing (unlimited paragraph composer)

* Add loext:paragraph-composer attribute, as LibreOffice
  ODF extension;

* Add ODF unit tests for the limited and not limited
  paragraph composer.

Note: "Smart justify" line breaking algorithm chooses
space shrinking (limited by Minimum word spacing)
only if shifting the last word isn't better based
on the desired word spacing. This was still a greedy
line breaking algorithm, resulting big word spacing
in the lines before a longer word.

The paragraph composer shifts the last word (or the
first part of the hyphenated last word) from the previous
line to decrease big word spacing in the actual line.

Note: balancing very big word spacing in narrow consecutive
lines can result vertical rivers. To avoid this, use limited
paragraph composer by setting maximum word spacing.

Follow-up to "smart justify", word spacing, letter spacing
and glyph scaling developments. Selected commits:
commit 529755f091 "tdf#166113
sw smart justify: adjust algorithm for interoperability",
commit 7d08767b89 "tdf#130088
"tdf#119908 smart justify: fix DOCX line count + compat opt.",
commit 7d6696757d "tdf#159923
sw cui offapi xmloff: add custom word spacing",
commit 5a48070f59 "tdf#126154
sw offapi xmloff cui: add min/max word spacing",
commit f83a04c510 "tdf#167648
cui offapi xmloff sw: add DTP-feature maximum letter spacing",
commit 3c53797210 "tdf#167648
sw letter spacing: implement minimum letter spacing",
commit 45ec7bd761 "tdf#168251
cui offapi xmloff sw glyph scaling: extend UNO/UX/ODF".

Change-Id: I727caad70536c86be524bc9d9b52bc71208c202a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203288
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: Jenkins
2026-04-09 14:42:07 +02:00
Khaled Hosny 1345ac25f6 tdf#171624: Add loext:font-variation-settings ODF attribute
Add font-variation-settings under loext prefix. This is modelled after
the similarly named CSS attribute (with "initial" etc values ignored):
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/font-variation-settings

Change-Id: I3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203245
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-04-06 17:13:12 +02:00
Stephan Bergmann 843122769d XMLPropertyState must be a complete type here
...contrary to what 0a42ddbdf1 "tdf#146619 Use
more forward declarations in include/xmloff" apparently assumed,

> [CXX] linguistic/source/convdic.cxx
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\span(75): error C2036: 'const XMLPropertyState *': unknown size
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\span(75): note: the template instantiation context (the oldest one first) is
> include\xmloff/txtparae.hxx(404): note: see reference to class template instantiation 'std::span<const XMLPropertyState,18446744073709551615>' being compiled
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\xutility(2184): note: while evaluating concept 'input_iterator<std::_Span_iterator<XMLPropertyState const > >'
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\xutility(984): note: while evaluating concept 'input_or_output_iterator<std::_Span_iterator<XMLPropertyState const > >'
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\__msvc_iter_core.hpp(403): note: see reference to class template instantiation 'std::_Span_iterator<_Ty>' being compiled
> with
> [
> _Ty=const XMLPropertyState
> ]
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\span(70): note: while compiling class template member function 'std::_Span_iterator<_Ty> &std::_Span_iterator<_Ty>::operator --(void) noexcept'
> with
> [
> _Ty=const XMLPropertyState
> ]
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\xutility(1839): note: see the first reference to 'std::_Span_iterator<_Ty>::operator --' in 'std::iter_move'
> with
> [
> _Ty=const XMLPropertyState
> ]
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\xutility(857): note: see the first reference to 'std::iter_move' in 'std::ranges::_Iter_move::_Cpo::operator ()'
> C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1444~1.352\Include\xutility(881): note: see the first reference to 'std::ranges::_Iter_move::_Cpo::operator ()' in 'std::_Indirectly_readable_impl<std::reverse_iterator<std::_Span_iterator<_Ty>>>'
> with
> [
> _Ty=const XMLPropertyState
> ]

Change-Id: Ifd2f07f1dadf26516a8732dde1fed757af5e8e96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201475
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-03-11 22:21:17 +01:00
Noel Grandin 4b10710e09 loplugin:passstuffbyref
Change-Id: I559d246b25c99e5cb7a28ba94e04a2acedd3e720
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200943
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-04 19:22:19 +01:00
Khaled Hosny 331e2c3b89 tdf#153368: Support optical size for variable fonts, part 3
Add loext:font-optical-sizing attribute with two values, "auto" and
"none", modeled after CSS font-optical-sizing:
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/font-optical-sizing

Change-Id: I05396f084dc81d0a797be0e7c0cd57991a6876e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200502
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-03-02 21:45:18 +01:00
Stephan Bergmann 5fd256977b SvXMLImportPropertyMapper appears to be required to be a complete type here
...contrary to what 0a42ddbdf1 "tdf#146619 Use
more forward declarations in include/xmloff" apparently assumed, as seen at
least with recent Clang 23 trunk against recent libstdc++ 16 trunk,

> In file included from xmloff/source/chart/SchXMLParagraphContext.cxx:21:
> In file included from xmloff/source/chart/SchXMLParagraphContext.hxx:21:
> In file included from include/xmloff/xmlictxt.hxx:28:
> In file included from workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/xml/sax/XFastContextHandler.hpp:6:
> In file included from workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/xml/sax/XFastContextHandler.hdl:6:
> In file included from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/XInterface.hdl:6:
> In file included from include/com/sun/star/uno/Any.h:30:
> In file included from include/rtl/ustring.hxx:45:
> In file included from include/rtl/string.hxx:51:
> In file included from include/rtl/stringconcat.hxx:22:
> In file included from ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/memory:80:
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/bits/unique_ptr.h:90:16: error: invalid application of 'sizeof' to an incomplete type 'SvXMLImportPropertyMapper'
>    90 |         static_assert(sizeof(_Tp)>0,
>       |                       ^~~~~~~~~~~
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/bits/unique_ptr.h:398:4: note: in instantiation of member function 'std::default_delete<SvXMLImportPropertyMapper>::operator()' requested here
>   398 |           get_deleter()(std::move(__ptr));
>       |           ^
> include/xmloff/shapeimport.hxx:153:62: note: in instantiation of member function 'std::unique_ptr<SvXMLImportPropertyMapper>::~unique_ptr' requested here
>   153 |         std::unique_ptr<SvXMLImportPropertyMapper> pExtMapper={} );
>       |                                                              ^
> include/xmloff/txtimp.hxx:34:7: note: forward declaration of 'SvXMLImportPropertyMapper'
>    34 | class SvXMLImportPropertyMapper;
>       |       ^

Change-Id: I58fec903631d04dd7a89e599cf745115cdab22bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200036
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins
2026-02-23 13:39:20 +01:00
Gabor Kelemen 0a42ddbdf1 tdf#146619 Use more forward declarations in include/xmloff
Change-Id: I49e39d669ba77a99b77322275d2e54e211da5b11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199386
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-02-22 10:42:36 +01:00
Jonathan Clark 7fa77b9072 tdf#72640 sw: Make list label alignment account for para writing mode
This change updates Writer to better conform with the ODF standard
wording for the fo:text-align attribute when used in
style:list-level-properties.

Previously, Writer interpreted list label alignments while ignoring
paragraph direction, always behaving as if the list label is always
left-to-right. This change updates Writer to instead apply label
direction correctly, treating start and end label alignment in a manner
similar to how we treat start and end paragraph alignment.

The list style dialog has been updated to reflect the new behavior as
start/end alignment, rather than left/right alignment.

This change also adds the LIST_LABEL_ALIGNMENT_IGNORES_DIRECTION
compatibility flag. In order to preserve the layout of existing
documents, this flag is enabled automatically when loading an ODF
created with earlier versions of LibreOffice.

Change-Id: I56cd37fa83487b010369b99570f7bb4750c07595
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198857
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-02-06 20:01:06 +01:00
Melove 5a5af7828c tdf#124176 Replace include guards with pragma once in settingsstore.hxx
Change-Id: Iaed0ef855a60c7185cbdd4d3189747745225c545
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198205
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-01-27 23:06:03 +01:00
László Németh 391ea3bcb5 tdf#170177 cui offapi sw xmloff: hyphenate at constituent boundaries
Add new minimum character limit paragraph property to limit
hyphenation left to the compound constituent boundaries:

  com::sun::star::text::ParaHyphenationCompoundMinTrailingChars

– With the previous option for the hyphenation right to the
  constituent boundary, this new option allow to limit or disable
  hyphenation completely inside the compound constituents, or
  hyphenate only at constituent boundaries, with or without
  inside the suffix of the word or constituents;

– xmloff: add "no-limit" to loext:hyphenation-compound-push-char-count
  and loext:hyphenation-compound-push-char-count;

– "no-limit" values of this and the *LeadingChars option mean
  a maximum value. When both *LeadingChars and *TrailingChars
  got "no-limit", hyphenation before and inside the suffixes are
  forbidden, i.e. it is allowed only at constituent boundaries;

– textflowpage.ui: set max character count to 99, in both options;

– fix ParaHyphenationCompoundMinLeadingChars implementation for
  compound words with multiple constituents, when the middle word(s)
  are shorter, than the limit (e.g. Hungarian "tűz|kő|pattintás"
  wasn't hyphenated as "tűzkő-pattintás", only as "tűz-kőpattintás").

Follow-up to commit 3a332d9f1c
"tdf#158885 cui offapi sw xmloff: fix hyphenation at stem boundary"
and commit c899d3608d
"tdf#158885 sw: don't hyphenate right after a stem boundary".

Change-Id: I0b71562727332217364f9ace85e8ac6ea3abc8b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196345
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: Jenkins
2025-12-31 22:54:05 +01:00
Heiko Tietze 2ce3901e75 Resolves tdf#160096 [API CHANGE] - Improve data validity handling
* Introduces a new option ValidationAlertStyle_NONE/SC_VALERR_NONE to
  silently reject invalid values
  (This is the behavior before c869fb5ea2)
* Sets the disabled state depending on "[ ] Handle invalid values"
  (previously "Show Error on loading")

The patch is motivated by bug 159595 respectively the inconsistent
solution. Excel either allows invalid data or shows a message that
allows to change/reject/accept the input. But there is not way to
silently reject invalid data.

The new option does not survive round trips and will be reset to Stop.

Change-Id: I33c965aa7ba999e5850b80d35964b5383928349d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195563
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2025-12-19 10:22:52 +01:00
Gabor Kelemen 8439cf1292 tdf#146619 Run IWYU again on include/xmloff
Change-Id: I8d66d58c1c421724d8e6df7e9a045d518da85f38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193921
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2025-11-30 23:08:31 +01:00
Jonathan Clark 69e902d085 tdf#162120 Implement style:writing-mode-automatic
Implements the ODF 1.2 paragraph attribute style:writing-mode-automatic,
and supporting runtime features. When set, this attribute allows
programs to automatically recompute the paragraph writing mode when the
contents of the paragraph have been edited.

The ODF standard does not suggest any particular algorithm for
automatically determining paragraph direction. This implementation uses
the rules from Unicode UAX #9 3.3.1.

Currently, LO will only automatically change the writing direction when
new text is typed or deleted. Other known interesting cases are already
tracked as separate enhancement requests.

Change-Id: I49eecea36952588dc98f2a98ebce712cd2846c0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193547
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2025-11-13 04:45:50 +01:00
Caolán McNamara 6db1f0cfc3 [API CHANGE] remove loadGraphicAtPage and loadGraphicFromOutputStreamAtPage
Change-Id: If53896987ea29ad09c82bdedd3a3028bffdff031
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193211
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-10-31 10:04:51 +01:00
Caolán McNamara 2a98176566 move GraphicImportHelper/GraphicExportHelper into xmloff
Change-Id: If0e9d7b2d9fee0ff4307f35ae82074031b0b0015
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193210
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-10-31 10:04:42 +01:00
Caolán McNamara cf6edbd0b3 [API CHANGE] sd pdfium: apply page number when loading pdf pages from fodg
this is the same concept/ideas as

a12bd4fedfc3f269f1dbb5fea36b607facd1261d
    [API CHANGE] sd pdfium: add page number when saving/loading pdf pages as images

but extended to support fodg where the problem of showing the first page
of the pdf for all images remained.

Change-Id: I5a180037634f71104800e09bec400316b56ab1f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193156
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-10-31 10:04:34 +01:00
Jonathan Clark 5d1b2baaa9 tdf#118350 [API CHANGE] Implement start and end paragraph alignment
Implements support for ODF fo:text-align start and end in paragraph
styles. The new alignment options can be selected in the paragraph
dialog. Further user interface changes are tracked as separate bugs.

This change also adds START and END to css.style.ParagraphAdjust, which
is flagged as an incompatible UNO API change.

Change-Id: I2ee57f0029de7b794bc1ecd3eddbbd90af5dfdb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192932
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2025-10-24 13:07:10 +02:00
Mike Kaganski 0dc93fddcc tdf#168980: don't use shape Z-order to identify shapes
The problem was wrong identification of the shape type, because of
unreliable use of fragile Z-order.

XMLShapeExport::exportShape used xShape's Z-order to get the info
collected for current xShape. Value of Z-order is calculated in
SwXShape::getPropertyValue; it takes into account text boxes of
shapes, which affects the correction in SwTextBoxHelper::getOrdNum.
The correction results in several different objects returning the
same Z-order. And in the specific document, the information that
was collected for a rectangle object, was used for an object of
different type.

Instead of trying to find a smart way to continue using Z-order,
this change uses XShape itself as the key into the map of info,
similar to how XShapes objects are used as keys into ShapesInfos.

Change-Id: Iacbc101623504db4290ad2c283351c4141b2d1b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192796
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-10-21 20:57:09 +02:00
Caolán McNamara 8c93dc9f99 add extra pdf shape fonts to export
extract a separate XMLFontAutoStylePool::addModelFonts
and reuse it to add additional fonts

Change-Id: Id08b185baaca9fd38ca24e2284b27a74ef8eacfb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192438
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-10-17 23:00:01 +02:00
Caolán McNamara 5f3d9649ab optionally explode pdf into odf elements as fodg export time
e.g. instdir/program/soffice --headless --convert-to \
'fodg:OpenDocument Drawing Flat XML:{"DecomposePDF":{"type":"boolean","value":"true"}}' \
sample.pdf

Change-Id: I1e36b3d0c12e8716aada52e5d34526d06fe28cc5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190967
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191768
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-10-02 14:00:48 +02:00
Caolán McNamara c851462409 add FilterOptions to ODF export
support Json string here like pdf export does. Just one property
initially so extract the single thing supported as now to a bool
in the Impl.

Change-Id: I59d94a9147595a55236847c2f450b3c11c60e5ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190966
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191763
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-10-02 11:57:55 +02:00
László Németh 45ec7bd761 tdf#168251 cui offapi xmloff sw glyph scaling: extend UNO/UX/ODF
Add new paragraph justification options "Minimum glyph scaling"
and "Maximum glyph scaling" to improve typography, like DTP software
do, allowing to typeset visually better paragraphs, especially narrow
columns without unacceptably big word spacing.

* Add spin boxes to Alignment in paragraph formatting dialog window;

* Store properties in paragraph model:

  css::style::ParagraphProperties::ParaPropScaleWidthMinimum

  css::style::ParagraphProperties::ParaPropScaleWidthMaximum

  Note: desired glyph scaling is already supported by ODF/UNO,
  see css::style::CharacterProperties::CharScaleWidth.

* Implement visual layout of minimum and maximum glyph scaling,
  limited by the available extra word spacing and letter spacing,
  too.

  Note: last line can exceed the paragraph width, because minimum
  glyph scaling, also minimum letter scaling of the last line
  haven't been applied there, yet.

* Add ODF import/export (loext:text-scale-maximum and
  loext:text-scale-minimum, where style:text-scale is for the
  desired text scaling).

* Add ODF unit test.

Note: hyphenated lines, lines with multiple portions haven't
been using custom glyph scaling, yet.

Note: resolution of glyph scaling is 1 percent, which will
avoid of overgeneration of font types using variable fonts.

Change-Id: I9b4576dde4303437b64e37202c47f888f94c3f67
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190534
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
2025-09-03 15:22:37 +02:00