1107 Commits
Author SHA1 Message Date
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
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
László Németh f3d5dbfb18 tdf#172674 sw: fix terminology + UX of new hyphenation settings
Replace label "Less Hyphen" of the new hyphenation slider
with "Fewer Hyphens", also "Hyphenation leveled x%" with
"Hyphenation level x%".

On the General pane of the paragraph style settings, add missing
commas and spaces inside the summary of the enabled new hyphenation
settings. Show only the non-default values here. Remove redundant
"No hyphenation across" title, where its value is a full-text
explanation.

Change-Id: Icc9d8bb4023d03be497d76289967b5d6061316ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209067
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
2026-08-10 19:21:01 +02:00
Khaled Hosny b99991ff8d tdf#172647: Store font’s typographic name in the editeng model
Rewrite font family and subfamily to use typographic names if they are
using legacy names, so we can elsewhere always assume typographic names
are used.

Change-Id: I8db2d4cf801c50794ff38b7d9e6d8419e66f5680
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207547
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-14 00:14:45 +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
Xisco Fauli 0159850b67 [API CHANGE] drop ComplexColorJSON
No need to use it when we can use ComplexColor

Change-Id: I921e229d2dee719b7457f046c1ed1ff0492aa3e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205810
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-28 20:07:19 +02:00
Xisco Fauli fb28678005 loplugin:unusedmethods
Change-Id: If3dae53e3cf16df2d0c505a898138dfa6fe6c0f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205442
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-22 09:32:38 +02:00
Noel Grandin 6b193f19d5 cool#15641 slow opening of ODS
regression from
  commit 64503f9187
  Author: Armin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>
  Date:   Tue Jan 23 20:56:17 2024 +0100
  ITEM: Add some default global sharing

Change-Id: I7f9c2319ca97338611458f93780da01f13c48516
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1448
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit a48cc7b525768ea6e02b4d58ef4d524850a71a0e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205046
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-11 15:46:57 +02:00
Xisco Fauli 555f4f658a editeng: drop unused parameter in ResolveLeft
Change-Id: I5cd89a00f97bd9f51a66c04bd7d70dfba9122d6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203573
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-15 09:35:18 +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 a9dc959cc9 vcl: Rename vcl::FontVariation to vcl::font::Variation
For consistncy, similar to vcl::font::Feature.

Change-Id: Idf3673bf1a1690e0ec64b6459925abef6e41b40d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203272
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-04-07 05:20:00 +02:00
Khaled Hosny f02741f3e6 tdf#171624: Add SvxFontVariationsItem and EditEngine plumbing
Change-Id: I2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203244
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-04-06 17:13:04 +02:00
Aya Jamal cec8abfcb4 tdf#117587 Ordinal/cardinal numbering preview
I implemented cardinal and ordinal numbering for text
using the current text language
instead of the program's locale language.
The preview is now shown in the text language.

Change-Id: I68d4ce5868adb7b5f4b6786947d2e529daab48aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201931
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-03-26 06:42:16 +01:00
Noel Grandin ca82a93896 Fraction->double in SfxPoolItem
Change-Id: Ie5fe5f9367c6e657cee20c877a12d4c290aaec94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202588
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-03-24 14:07:52 +01:00
Noel Grandin 82be8bfaa2 ubsan: -1 is outside the range of representable values of type 'unsigned char'
in CppunitTest_sw_ooxmlexport8

include/tools/color.hxx:111:27: runtime error: -1 is outside the range of representable values of type 'unsigned char'
in Color::Color(basegfx::BColor const&) include/tools/color.hxx:111:27
in (anonymous namespace)::lcl_compute3DColor(Color, int, int, int) editeng/source/items/borderline.cxx:60:16
in editeng::SvxBorderLine::threeDDarkColor(Color) editeng/source/items/borderline.cxx:108:12
in editeng::SvxBorderLine::GetColorIn(bool) const editeng/source/items/borderline.cxx:614:23
in svx::frame::Style::Set(editeng::SvxBorderLine const*, double, unsigned short) svx/source/dialog/framelink.cxx:108:28
in svx::frame::Style::Style(editeng::SvxBorderLine const*, double) svx/source/dialog/framelink.cxx:57:9

Change-Id: I17052694f0499aec671ca49ba3872953c161655e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202258
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-21 12:43:55 +01:00
Samuel Mehrbrodt 341a1e34a6 tdf#168135 Fix text highlight for superscript/subscript
Text highlight for superscript/subscript now has the same size
as 'normal' text

Change-Id: If2bce2abd1cc1188f542a7de8c7b55d27c2cecc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201010
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201543
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
Tested-by: Jenkins
2026-03-13 08:45:54 +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 d128bdf1fe tdf#153368: Support optical size for variable fonts, part 2
Add SvxOpticalSizingItem and EditEngine plumbing. Mostly mindlessly
copying stuff here. Lets hope for the best.

Change-Id: Idf0b062ff955fa35bd04c8e69c103e15887932f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200501
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-03-02 21:45:06 +01:00
Noel Grandin 98174967db SvStream::WriteUniOrByteString should not need to specify encoding
Instead, rely on the stream being set into the correct encoding
during stream initialisation.

Change-Id: If141ba09afe1b04f5d836024975f00e8b20d1447
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200462
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-02-27 07:49:07 +01:00
Noel Grandin d235ca3589 SvStream::ReadUniOrByteString should not need to specify encoding
Instead, rely on the stream being set into the correct encoding
during stream initialisation.

Change-Id: I5b015f12f141a89b176c5a22aeecc4336f0b8f13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200460
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-02-27 07:48:47 +01:00
Mike Kaganski 55b9d8607b "CharSet" -> "Encoding" in SvStream
Use the correct term. E.g., Unicode charset has different encodings
like UTF-8 and UTF-16, and we mean encoding here.

Change-Id: I65e90b31cda6e39fdb1584b492e6e0b9821865a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200285
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2026-02-25 10:33:55 +01:00
Gabor Kelemen 6e9fa580f0 tdf#146619 Use more forward declarations in include/svtools
Change-Id: If91cce7bf7ece7d1c125509118cbbe1a9ee65397
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198971
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-02-17 09:13:52 +01:00
Noel Grandin 5648ba78d7 loplugin:unusedmethods
Change-Id: Ibac145ec75271e740871ecb03d838d5f85b8f643
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199374
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-02-15 12:35:31 +01:00
Gabor Kelemen 0bdcfc2900 tdf#146619 Use more forward declarations in include/unotools/
This shaves off some 40M of input

Change-Id: I12e10deb87ceea1f7a23f3de4ea624befe187c3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198238
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-02-05 17:35:46 +01:00
Noel Grandin 38ad366d69 loplugin:unusedmethods
Change-Id: Ic00fb2aceef3156c3cff442908374daac3861e7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198535
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-02-02 14:34:52 +01:00
Noel Grandin 7fb279341f enum SvxSpecialLineSpace is dead
since
  commit ff055c9e1e
  Author: Mike Kaganski <mike.kaganski@collabora.com>
  Date:   Mon Jun 9 07:33:36 2025 +0200
  SvxLineSpacingItem does not need to be an SfxEnumItemInterface

Change-Id: I11b50fc19f0bdae3cd41f4d84a10696c43a2fb20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198129
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-01-26 13:40:49 +01:00
Gabor Kelemen 49cb3077fb tdf#146619 Use more forward declarations in include/vcl/outdev.hxx
these were skipped in previous runs, since they contain some code behind #if

After inspecting these, it seems like the removals should not cause trouble.

This also shaves off some 140M input

Change-Id: Ie1f57174dd6fec3ba5b0b91eb0688acdc1a8143d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197494
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-01-23 21:27:08 +01:00
Jonathan Clark ed76b5121a tdf#162120 Make style:writing-mode-automatic the default behavior
Updates Writer and EE to enable style:writing-mode-automatic, unless
specifically set to false in the ODF.

In addition, this change updates the behavior of .uno:ParaLeftToRight
and .uno:ParaRightToLeft to explicitly set style:writing-mode-automatic
to false. This will prevent automatically overwriting the writing
direction when the user has explicitly acted to control it.

Change-Id: I85d092fdb28907a383605d16a9a608323e9127c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197714
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2026-01-21 23:06:09 +01:00
Jonathan Clark a72f594239 tdf#169035 sw: Make para align start/end the default
Previously, new Writer documents defaulted to left/right paragraph
alignment, depending on application language. This change updates Writer
to instead use the language-independent start alignment by default.

Change-Id: Ic385bb8e38234d29365d21f46a11ebb115523970
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197309
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-01-17 04:24:32 +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
Miklos Vajna f05a9f882c sw doc model xml dump: show SvxNumberFormat's 'label followed by' property
I'm looking at a weird numbering which has a tab portion but no actual
numbering, and this is part of the puzzle.

Change-Id: I840b535846bf20fa962423ddee7245ad81705c3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195696
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2025-12-16 12:55:24 +01:00
Samuel Mehrbrodt 7136d7be94 tdf#159169 Avoid typesetter language 'orphans' and 'widows'
Similiar to 47edf86a62, use descriptive
language to make it obvious what these options do.

Change-Id: Idacb56acfc43546a574257ca989710d4de1ac2f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195445
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
2025-12-11 22:27:29 +01:00
Tomaž Vajngerl 090db9a169 editeng: prefix and clean-up SvxBrushItem
Change-Id: Ide965a0dcafb8588693960bff84577c6421a99cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195171
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
2025-12-08 09:01:26 +01:00
Tomaž Vajngerl 4edaca7c38 switch some dumpAsXml functions to use tools::XmlWriter
Change-Id: I6bcda888f578ec52c05a575df56c4c267ad82ccc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195169
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-12-08 09:01:03 +01:00
Tomaž Vajngerl b9050dae2c SvxColorItem: rename mColor to maColor
Change-Id: If4b7a0688f57acfc38e24742e8c0dae4354110be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195170
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-12-08 06:57:37 +01:00
Mike Kaganski b280efcb9b Drop some uses Sequence::getConstArray
Replace by operator[], begin() and end(), which don't have overhead
since commit 2484de6728 (Remove non-
const Sequence::begin()/end() in internal code, 2021-10-15)
and commit fb3c04bd19 (Drop non-const
Sequence::operator[] in internal code, 2021-11-05).

Change-Id: I221470b3439bb0dc6e7705b0d99deb3cd2063484
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195176
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-12-07 12:54:23 +01:00
Gabor Kelemen 4d24007632 tdf#146619 Run IWYU again on include/svl/
Change-Id: I5dc8757a6d06ab6917a9af733550295008fde5b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193914
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2025-11-29 13:59:05 +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
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
Gabor Kelemen becdd99f2c tdf#146619 Run IWYU again on include/[d-e]*
Change-Id: Iec01747b87d93a0a7c6907ea1518dec026f38836
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191911
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-10-14 11:02:17 +02:00
Miklos Vajna b73dd7cc1a sd doc model xml dump: show styles
editeng paragraphs can refer to styles, but what are those styles,
stored in SdrModel was not visible previously.

Change-Id: Ic32795341595a4d8b61c8c686cd0b140034c1a7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192163
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2025-10-10 15:04:36 +02:00
Gabor Kelemen f9af3767bd tdf#146619 Run IWYU on editeng/
Change-Id: I2c124548ab312ec21558f22207952d2315f5a805
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190908
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-09-19 08:21:25 +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
Noel Grandin ea064cc802 createBeginComment is unused
since
    commit 83ffcdd964
    Author: Armin Le Grand (collabora) <Armin.LeGrand@collabora.com>
    Date:   Mon Aug 4 14:15:15 2025 +0200
    StripPortions: Further simplify EditEngine

Change-Id: Ib58613186a8bd169ea15b1958066006e3437bf34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189567
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-08-14 11:56:15 +02:00
László Németh f83a04c510 tdf#167648 cui offapi xmloff sw: add DTP-feature maximum letter spacing
Add new paragraph justification option "Maximum letter spacing"
to distribute letters on (part of) the available blank area of the
justified line instead of overstretching word spacing, like DTP
software do.

This improves typography a lot, allowing typesetting visually better
i.e. more readable paragraphs, minimizing or removing rivers and
too big word spacing (which was common in columns or text without
hyphenation).

* Add spin box to Alignment in paragraph formatting dialog window,
  (also add spin boxes for future Minimum and the alternative
  percent-based Desired letter spacing, see CharKerning);

  For example (only ASCII visualization!), 100% maximum letter
  spacing adds a space character-width blank space between the
  characters, including the original space:

  0%:

  Lorem          ipsum
  pellentesque dolores
  vitae.

  100%:

  L o r e m  i p s u m
  pellentesque dolores
  vitae.

  Normal value: 3%-5% (or more for very narrow columns), which means
  e.g. 1-2 twips (twip = 1/20 pt) letter spacing in a ~12 pt text.

  Note: resolution of the custom letter spacing is only 1 twip yet.

* Store properties in paragraph model:

  css::style::ParagraphProperties::ParaPropLetterSpacingMaximum

  css::style::ParagraphProperties::ParaPropLetterSpacingMinimum

  Note: desired letter spacing is already supported by ODF/UNO,
  see css::style::CharacterProperties::CharKerning.

* Implement visual layout of maximum letter spacing.

  Note: after the last character of the line, there is an
  unwanted letter-spacing, yet (which is visible only with
  big letter-spacing values).

* Add ODF import/export (loext:letter-spacing-maximum and
  loext:letter-spacing-minimum)

* Add ODF unit test.

Note: hyphenated lines and lines with multiple portions do not
yet use custom letter spacing, yet.

Change-Id: Ieac9f21631b90ae46bed4501f12da0d15ed84d63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188653
Tested-by: László Németh <nemeth@numbertext.org>
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
2025-08-01 11:51:04 +02:00
Noel Grandin d416ed02fe rather return optional data via an optional param
instead of a combination data of a bool param and an optional
data in a struct

Change-Id: I67338b55fc38bbe053e1e13dea92f6c76389663b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187773
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-07-12 20:34:10 +02:00
Caolán McNamara b80cd12449 const up some more pieces
Change-Id: Ib85b8b4b3a2d00e7ef0ecb354fba0b862d60abdd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187749
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-07-12 01:16:21 +02:00
Noel Grandin 09a1a5b8c8 loplugin:unusedmethods
Change-Id: I245db9dcee5e4193cbc4b811c8e7d6145ea46415
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186671
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-06-19 07:53:03 +02:00
Jonathan Clark 1df13d7ff1 tdf#166012 Implemented GUI support for style:script-type
Previously, when authoring documents containing multiple languages,
certain characters (e.g. smart quotes) could use the wrong/undesired
font. For example, if a Chinese word is quoted inside English text, the
right quotation mark would use the Chinese font rather than the
intuitively-expected English font. Users had no way to control this
behavior.

With this change, Writer will now set an appropriate style:script-type
hint when the user manually specifies a language for a selection in the
user interface. This can be used to quickly correct instances of the
above problem.

Change-Id: I6f8c924d230e3518272e2abb1cbea5e0e7451e9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186394
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2025-06-12 04:54:55 +02:00
Mike Kaganski 42b0377725 SfxEnumItemInterface::GetValueCount virtual method is unneeded
It is used only for one class, and the place using it knows the
specific type.

Change-Id: I2331169e4844b92e14bcb3daea9a630d608b6341
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186332
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-06-11 05:53:13 +02:00