4479 Commits
Author SHA1 Message Date
Miklos Vajna 1886cb2ee3 cool#16219 engine sd, RTF export: fix lost bullets of paragraphs
Add a few bulleted lines to a text frame in an Impress document, copy
them, paste in Writer: the paragraphs are imported with no bullet marks.

ImpEditEngine::WriteRTF() emits a bare \level<n> for the paragraph's
outline level, which editeng's own RTF importer reads back as a
bulleted item, but sw's RTF import ignores. The PowerPoint RTF clipboard
markup for the same thing is the RTF 1.0 old-style numbering pair: a
{\pntext <bullet>\tab} fallback and a {\*\pn\pnlvlblt{\pntxtb <bullet>}}
destination that contains the bullet character.

Fix the problem by emitting that pair alongside \level<n>, from the
paragraph loop in WriteRTF(), when the paragraph's EE_PARA_NUMBULLET
at that outline level is of type SVX_NUM_CHAR_SPECIAL.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I18a022ac28d50a8b7557ee2282cd3fd8e7c37299
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/14439
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit b7002f07f475ce4eb5cf7309dfe8e59ba21ecd7a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211942
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-07 21:11:19 +02:00
Noel Grandin 0e9f94c375 remove bounds checking EditDoc methods
which just tends to obscure problems, rather than help.

Fix a couple of places which have out-of-bounds data, for normal (i.e. not a bug) reasons.

Surprisingly, very little fallout.

Change-Id: I3ade28e73e584c4885e3e1a896007f535b494058
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13788
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 031eddcb0fb671d1e0cdb6b2fd08ad0bba85a926)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211693
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-05 08:58:22 +02:00
Noel Grandin 73c41f63cd Rename again in EditTextObject
I messed up in
  commit e174028ce0335d702ecdad5eac823845a16e2f6d
  Author: Noel Grandin <noelgrandin@collabora.com>
  Date:   Mon Sep 21 18:13:44 2026 +0200
  Rename paragraph related types in EditTextObject.

This is not the primary paragraph data structure for
EditEngine.
Add some commentary to reduce the chance of anyone
else making this mistake.

Rename typedef
  EditEngineParagraphs -> EditTextObjectParagraphs

Rename class
  EditEngineParagraph -> EditTextObjectParagraph

Change-Id: I810571cb61b944dd9d056145fe4cef14ba3e43bb
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13273
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit e8dde7d988a1768b68380ab95ba8fabb5feefc2e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211653
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-01 12:33:02 +02:00
Noel Grandin 447298ce46 rename EditEngine::GetDepth to GetNumberingDepth
to distinguish it from the various other depths we have.

Change-Id: I2917ecc55baa90c375150d2066b98c6e5f384626
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13272
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit dc56f1179397f2b6765cdf12a3d09a99fcf7e679)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211652
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-10-01 12:11:03 +02:00
Noel Grandin 90f327c670 merge OutlinerEditEng into EditEngine
as part of the process of simplifying the whole Outliner vs EditEngine
infrastructure.

Change-Id: Ia4f173ba41b374864cc4e47d895b037d6493a08f
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13238
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 196eccebee433d3cfe170786a81ea39f5c491ec1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211615
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-01 09:01:56 +02:00
Noel Grandin 212d17f7ea add a non-const GetEditEngine() method to Outliner
to avoid const-casting all over the place

Change-Id: I75f3442341894dbe4e12cc7995669dc7f3bf63f7
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13354
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 318e2cf839c6311d4a69572b4534f554bdda3f96)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211604
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-10-01 09:01:52 +02:00
Andreas Heinisch aa306ba447 tdf#154463 - Prevent crash from AutoCorrect copying fieldmark char
A wildcard AutoCorrect entry like ".*->.*" copied that character into
its replacement text, inserting a second FIELDSTART into the node which
crashes FindFieldSep.

Extend the delimiter check to the entire 0x01 ... 0x08 char range
put in the text (CH_TXTATR_BREAKWORD, CH_TXT_ATR_FIELDSEP,
CH_TXT_ATR_INPUTFIELDSTART/END, CH_TXT_ATR_FORMELEMENT,
CH_TXT_ATR_FIELDSTART/END).

Change-Id: Ib58bb7e3c614977082cd9d23722497f77fe9ca8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211447
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
2026-09-25 14:24:19 +02:00
Noel Grandin 41be19ccbd Rename paragraph related types in EditTextObject
Because we already have a ContentInfo type in ucb/
and ContentInfo is a largely content-free name, which
makes this code much harder to understand than it should be.

Rename class
  ContentInfo -> EditEngineParagraph
Rename typedef
  ContentInfosType -> EditEngineParagraphs

Rename some methods in EditTextObject
  CreateAndInsertContent -> CreateAndInsertParagraph
  GetContents -> GetParagraphs
Rename some fields in EditTextObject
  maContents -> maParagraphs

Change-Id: Iddfb8768c73f9c4eec3b4cc5dc389d44d8e4b90d
Signed-off-by: Noel Grandin <noelgrandin@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13210
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit e174028ce0335d702ecdad5eac823845a16e2f6d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211384
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-24 12:05:17 +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
Michael Weghorn c75ab63fdf editeng a11y: Use OWeakObject::getXWeak to disambiguate XInterface inheritance
Change-Id: I82be83663ca690de2ff4be37a95914803880ce67
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211196
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-20 22:13:33 +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
Michael Weghorn 07ddbb7066 editeng a11y: Simplify AccessibleContextBase::getLocale
With previous commit

    Change-Id: I570d21fc98dd76bfd198384bf84d1f8407757fab
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Sep 14 11:58:20 2026 +0200

        a11y: Use OAccessible in AccessibleContextBase et al.

in place, there is no more need to get the XAccessibleContext
for the parent in a separate step, as OAccessible
implements that interface itself and returns a reference
to self in its XAccessible::getAccessibleContext implementation.

Drop the now unnecessary call to that method.

Change-Id: I306a3bae3b3df0c2f515394dc7174cbfad790120
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210929
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:24:17 +02:00
Michael Weghorn 3aba95a607 a11y: Use OAccessible in AccessibleContextBase et al.
Switch from using the abstract XAccessible UNO interface
to using the more concrete OAccessible base class in
editeng's AccessibleContextBase and related classes:

1) extract the AccessibleContextBase:getAccessibleParent
   logic to a new AccessibleContextBase::implGetAccessibleParent
   helper that returns an OAccessible instead of an XAccessible
2) mark AccessibleContextBase:getAccessibleParent
   as final to prevent it from being overriden in any child class
   and ensure the new helper is equivalent, but gives
   the more concrete OAccessible type
3) switch callers of AccessibleContextBase:getAccessibleParent
   to call the new AccessibleContextBase::implGetAccessibleParent
   instead and switch related local variables and class members
   from XAccessible to OAccessible

Change-Id: I570d21fc98dd76bfd198384bf84d1f8407757fab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210928
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:24:08 +02:00
Noel Grandin fcf0bcc0f9 Hold EditTextObject by value in OutlinerParaObjData, not by pointer
OutlinerParaObjData is already ref-counted data, no need
for further indirection.

Unfortunately, this sets off a larger chain of changes
than I would have preferred, but we end up storing
EditTextObject on the stack much more than before, so
that worked out well.

Change-Id: Ie7d0ccfbfeec4e6935f2ed6b8ad48aadfe1bac20
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10973
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit fbf7d1bc7142d3f0e4e5f959983dea065afc5ea3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210927
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-14 16:27:02 +02:00
Andrea Gelmini be7ff6a857 Fix typos in code and comments + some reformatting
Change-Id: Ic6fe197734655a2591a6730d07f23d4222a278f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210564
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-10 22:06:44 +02:00
Michael Weghorn 82ebc0cb7a editeng a11y: Switch AccessibleEditableTextPara::mpParent to OAccessible
Use the more specific OAccessible class instead of the
abstract XAccessible UNO interface.

This also allows to get rid of the need to retrieve the
XAccessibleComponent and XAccessibleContext interfaces
in extra steps, as OAccessible implements those interfaces
as well.

Change-Id: I3845e266dd21db1ffd601851a7b766c9174d7633
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210611
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-10 18:31:27 +02:00
Michael Weghorn 0aa8eedf3a editeng a11y: Pass OAccessible to AccessibleEditableTextPara ctor
Use the more concrete OAccessible type for the parent param
of the AccessibleEditableTextPara ctor instead of the abstract
XAccessible UNO interface.

Change-Id: I5ce37c7d55b6f7111d515ed4ba6ddeb87993be27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210610
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-10 18:31:18 +02:00
Noel Grandin 1b276f9265 merge the outliner ParagraphData information into the regular EditTextObject
as part of the process of merging the Outliner code into the normal EditEngine paths.

So instead of keeping a bunch of information "on the side" and then having to merge information
from multiple sources, it all lives where it logically belongs.

Also take the chance to rename the depth/getdepth/setdepth
fields and methods to NumberingDepth, which makes the purpose
more obvious.

Change-Id: I314673ee1b9efa14f178ac34a122995a554cd788
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10551
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 284bbe0af12b96844976f30bb35ade3a327ea76d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210503
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-05 00:09:20 +02:00
Noel Grandin ac037dfe6b remove some manual bounds checking from editeng
which only serves to obfuscate logic errors, the debug
stl library will do this for us.

Change-Id: I184c7bc2ca65e663c464e6392108da5cbd83253d
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10547
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit c94cad08817882699a4ff8a04bb1d9abbcd4e795)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210502
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-05 00:09:14 +02:00
Noel Grandin c9e799015c mbIsEditDoc is dead
ever since
  commit 110a25fdc2
  Author: Noel Grandin <noel.grandin@collabora.co.uk>
  Date:   Wed Jul 18 14:49:58 2018 +0200
  loplugin:unusedfields

Change-Id: I8406712984a6d9938d2b1951e9ac783ee8c10f44
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10450
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 1e9e993313bc0b5093c65e707681827ddef6d9b6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210501
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-05 00:09:05 +02:00
Michael Weghorn 6b7f5e35c9 editeng a11y: Stop declaring AccessibleContext support in AccessibleContextBase
The com.sun.star.accessibility.AccessibleContext UNO service
is unnecessary and not really used for implementing a11y support,
apart from some a11y implementations declaring support for it.
What is relevant is the com.sun.star.accessibility.XAccessibleContext
interface instead.

Stop declaring support for the com.sun.star.accessibility.AccessibleContext
service in AccessibleContextBase and drop related
XServiceInfo::getImplementationName overrides in subclasses,
in preparation of dropping the service altogether in an upcoming
commit.

AccessibleDrawDocumentView currently still declares support
for the "com.sun.star.drawing.AccessibleDrawDocumentView"
service, so let it implement XServiceInfo directly, now that
it no longer inherits that from the AccessibleContextBase
base class.

Change-Id: Ie927cd98f9e1c8eb5a80bfaab5cb1dacb64dc238
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210403
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-03 09:21:27 +02:00
Michael Weghorn 7c389e80de editeng a11y: Stop declaring support for AccessibleContext service
The com.sun.star.accessibility.AccessibleContext UNO service
is unnecessary and not really used for implementing a11y support,
apart from some a11y implementations declaring support for it.
What is relevant is the com.sun.star.accessibility.XAccessibleContext
interface instead.

Stop declaring support for the com.sun.star.accessibility.AccessibleContext
service in AccessibleImageBullet, in preparation
of dropping the service altogether in an upcoming
commit.

Change-Id: Ib161aa24c37cf7d90acb56233d3e006bb982a1a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210397
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-03 09:20:13 +02:00
Noel Grandin 1318b7834e drop EditTextObject::CreateAttrib
which means we can move XEditAttribute back inside editeng,
no need to expose it in the module header.

Change-Id: Ica8bcf7d1414b582011b473aac807b8a7a7369eb
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10688
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 60d0dc551f7acb6bbdfc8ee2f4c8369eff3df4c0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210360
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-02 01:03:33 +02:00
Noel Grandin 3b52fbc96f merge EditTextObjectImpl into EditTextObject
this is a weird kind of pimpl pattern, lets just simplify it.

Which means we can remove the Clone() method in favour
of a normal copy constructor.

Change-Id: Ib5793c66df4729f48def8b3cead0f39f2ba94830
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10550
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit dd8a795b5aed4c44e11eef86eaf19b1f88edf0f8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210320
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-01 15:40:01 +02:00
Andrea Gelmini 63a5de03c6 Remove duplicated condition (dead code)
Change-Id: Idc2d6f8f552830a8beb7fd1c5ddf41d2222ebcc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210145
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-29 16:07:41 +02:00
Andrea Gelmini 299b0f4930 Fix typos
Change-Id: I421707387e9e5f01401cc63b9f7219fcf30857e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210155
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-29 15:34:12 +02:00
Andrea Gelmini 6e811dff28 Fix typo in code
Change-Id: Ie0046f75e1e501b7d4e3e4762a5a6f6a3ff08730
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210039
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-27 10:42:33 +02:00
Andrea Gelmini d76d4ded86 Fix typos
Change-Id: I39a83a3b7930f46e3b89216146a143ac80d4812a

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209797
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 15:56:01 +02:00
Andrea Gelmini 5ca71311f5 Fix typos
Change-Id: Idf12253122f64bf538a486f5fd31dafb59595b01

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209795
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 14:46:31 +02:00
Andrea Gelmini a6c171a1e6 Fix typos
Change-Id: I39a83a3b7930f46e3b89216146a143ac80d4812d

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209796
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-24 09:26:16 +02:00
Andrea Gelmini cf0a1268e3 Fix typos
Change-Id: Ib8964b0b98005da480826cfdd2c64bd68c88575c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209460
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-22 10:15: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
Justin Luth b384a2f8e4 NFC impedit5.cxx: flatten KEY_RETURN
No Functional Change intended

Change-Id: I855608e7c48c6eceb54d638b92f685d9e3ead2bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209140
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-08-17 15:19:09 +02:00
Justin Luth 45fabace24 tdf#165973 editeng undo: separate AutoCorrect after InsertParaBreak
When the user presses RETURN,
they almost certainly want a new paragraph/newline,
but there is much less certainty
that they want the autocorrect.

Since initial import these have been a single undo event.
This patch splits it into two undo items,
and places the AutoCorrect item last,
so that the first undo restores before the AutoCorrect
and the second undo removes the new paragraph/newline marker.

Two other improvements:
-after autocorrect undo, keep the cursor at the empty paragraph,
 not after the auto-correction.
-don't autocorrect newline if DoAutoCorrect is false
 (a 2007 regression from a newby contributor).

Somewhat amazing to me is the extreme lack of EDITUNDO_ choices.

Change-Id: I4c525171d07d641ce5ddd5243c1ccb1eb1f7ac5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209139
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-08-16 03:20:12 +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
Jonathan Clark e1be5499a1 tdf#172093 editeng: Fix freeze in character transliteration
Deletes some experimental YRS code that was causing an infinite loop in
drawing the selection after character transliteration. This code was
originally part of a patch meant to correct peer cursors after inserts
and deletes. Unfortunately, the implementation for transliteration was
incorrect and leaves the selection in an invalid state.

Regression from commit 0ff4c66190
  Author: Michael Stahl <michael.stahl@allotropia.de>
  Date:   Fri Feb 14 18:03:16 2025 +0100
  LOCRDT editeng,sw: yrs peer cursors for editengine

Change-Id: I2b8cd9d501b8262dfc07b808beda7a3767f9455c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208174
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-07-22 18:13:50 +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
Christopher Sherlock c928d5bc07 vcl: Rename Y-axis origin methods to Get/SetDeviceOriginY
Completes the deprecation of legacy coordinate subsystem naming by
renaming GetOutOffYPixel() and SetOutOffYPixel() to
GetDeviceOriginY() and SetDeviceOriginY() across OutputDevice,
Window, and CoordinateMapper.

This unifies axis naming conventions following previous X-axis
refactoring passes, clarifying that these fields represent the
physical origin offsets of the device rendering canvas.

This patch also moves view transformation logic inline from outdev/map
to CoordinateMapper, and wraps sprawling multi-line logic formulas
across mapping routines to clean up formatting boundaries.

Key changes:
* include/vcl/outdev.hxx / window.hxx: Updated public declarations
  to replace GetOutOffYPixel with GetDeviceOriginY.
* vcl/inc/CoordinateMapper.hxx: Migrated view transformation cache State
  members and mapping calculation methods into the mapper object.
* Global adjustments: Patched all related coordinate offset reads
  and tracking writes throughout desktop, editeng, sc, svx, and vcl.

Change-Id: I28fec54a7f3312cc41ada2de38b26351c0a65527
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203646
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-07-07 14:22:05 +02:00
Christopher Sherlock 90951d958c vcl: rename X-axis origin methods to Get/SetDeviceOriginX
Rename GetOutOffXPixel() and SetOutOffXPixel() to GetDeviceOriginX()
and SetDeviceOriginX() across OutputDevice, Window, and CoordinateMapper.

The legacy "OutOff" naming convention obscured the difference between
system-level window positioning offsets and internal content scrolling
(SetPixelOffset). The new nomenclature explicitly communicates that
these metrics strictly govern the device coordinate space origin.

This patch focuses strictly on the X-axis coordinate reads and cleans
up duplicated formatting signatures inside the CoordinateMapper header.

Impacted modules:
* include/vcl: Update public declarations in outdev.hxx and window.hxx.
* vcl/inc: Clean up CoordinateMapper.hxx whitespace and scaling hooks.
* Global: Patch dependent pixel coordinate reads across desktop, editeng,
  sc, sfx2, svx, and vcl.

Change-Id: I546e1d255887e3b280ff15caca2e27ef10de52d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206509
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
2026-07-07 14:14:50 +02:00
Pranam Lashkari 417ebad37a Autocorrect: undo of a typographic quote left a straight quote behind
When an apostrophe or quotation mark is typed, autocorrect replaces it
with the matching typographic quote. This was done in two edits: the
typed straight character was inserted first, then replaced with the
typographic one. Since each edit is its own undo step, undoing the
autocorrect first turned the quote back into a straight quote and only a
second undo removed it. In languages that never use straight quotes, for
example French, typing 'un and undoing left a stray straight quote in the
text.

Build the typographic quote with a single edit, so one undo removes the
whole quote.

The change is limited to the quote handling. Autocorrections that insert
a character and then act on something else, such as turning a web or mail
address into a link after a space, keep their existing per-step undo

Change-Id: Ibf47fb8f37d29d5ba180ed692f730d20e9f3e431
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5897
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit e2ba52e1996f81ff3b93fa70ecf625b7709d07fb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207621
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-06 10:51:31 +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
Khaled Hosny 0e88e104a8 tdf#152396: Carry the font style name into the layout font
EditEngine dropped the SvxFontItem style name when building the layout
font, so the typographic subfamily never reached font matching. Without
it, say, font width, chosen could not be resolved.

Change-Id: Ib7a7cc9b051be14467ddac42b4e5458b5c0327c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207295
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-06-26 09:32:45 +02:00
Xisco Fauli 667fe200a9 Revert "[API CHANGE] remove deprecated XSpell1 and XSupportedLanguages"
This reverts commit bce4b4af9d.

Reason for revert: Revert it for now until there is a policy
for removal of published APIs

Change-Id: Ia1cbcfcd6b953be48a60d8ef67333b1e3265e563
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207150
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-23 10:58:29 +02:00
Andras Timar 8a19617bfd Fix SIGSEGV in EditView/ImpEditView with disposed window in multi-view LOK
In multi-user LOK Impress sessions, when SetUpdateLayout(true) is called
inside ImpMakeOutlinerView (e.g. during ShowSdrPage for a new user or
SdrBeginTextEdit), the EditEngine iterates all registered EditViews and
calls ShowCursor, HideCursor, InvalidateWindow, and InvalidateAtWindow.
Secondary EditViews created by the ShowSdrPage lambda for other users
can reference windows that have been disposed (user disconnected or
switched pages).  These functions accessed the disposed window without
checking isDisposed(), leading to null dereferences of mpWindowImpl
(which is reset to null in Window::dispose()).

Crash path: SetUpdateLayout(true) -> EditEngine::SetUpdateLayout ->
mpActiveView->ShowCursor -> GetOutputDevice() ->
*mpOutputWindow->GetOutDev() -> dereferences null mpWindowImpl -> SIGSEGV.

Guard all EditView/ImpEditView functions that access the output window
against disposed state:
- ImpEditView::ShowCursor: early return when no callbacks and window
  is null/disposed, since GetOutputDevice() and all subsequent cursor
  positioning code requires a valid window
- ImpEditView::InvalidateAtWindow: check disposed before Invalidate()
- EditView::InvalidateWindow: check disposed before Invalidate()
- EditView::ShowCursor/HideCursor: check disposed before
  GetParentWithLOKNotifier()

Also guard two loops in SdrObjEditView that iterate OutlinerViews and
access their windows without disposed checks:
- ModelHasChanged: skip views with disposed windows
- ImpInvalidateOutlinerView: check disposed in addition to null

Change-Id: I8b3e4c7d2a1f5e9d0c6b8a3f7e2d4a9b1c5f8e0d
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/939
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1443
(cherry picked from commit 5b0d6592d3339e8e6514a4ef28929687636087c5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207066
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-06-21 21:06:11 +02:00
Noel Grandin bce4b4af9d [API CHANGE] remove deprecated XSpell1 and XSupportedLanguages
in favour of their replacements XSpell and XSupportedLocales

Change-Id: I3ad20d0c6c3bf0a00d7ef3947705059027a1ff6f
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4228
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 35842d441f2e82204ce77ba8c53735be3f18dc78)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206467
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 14:55:20 +02:00
Karthik 0bf1c1bd52 editeng: don't freeze the UNO text selection during insert
Text object's selection should be dynamic (whole text),
`SvxUnoTextBase::insertString()` sets the text object's selection to the
current full extent after inserting.

A freshly created SvxUnoText does the same, initializes its selection to
the whole text.

Change-Id: Ie6b81f105162785c5aa990e77af729e1340faee8
Signed-off-by: Karthik <karthik.godha@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3596
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 9d21bff5c309d9afbbc3395403ec904d84b37ec1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206299
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-10 22:26:47 +02:00
Michael Weghorn f26084217a weld: Move weld::Button to own header/Rename weld.hxx
In the past, weld.hxx used to contain the class
definitions for weld::Widget and all subclasses.

By now, weld::Widget and almost all subclasses have
been moved to separate headers, to make it easier
to keep the overview and to avoid having to
recompile ~all UI code when one class changes.

By now, only weld::Button is left in weld.hxx.
Rename the header to Button.hxx.
Drop weld.hxx includes and instead add Button.hxx
includes (or weld::Button forward declarations) where
weld::Button is used.
(Don't simply replace all weld.hxx includes with
Button.hxx ones, since many of them were for the
use of other widgets that have since been moved
to their own headers.)

Add further includes where needed now that the
(direct or transitive) includes of weld.hxx were removed.

Change-Id: I8ea6201446a418d5e38b46337059dcd517ee29d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205937
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-05 07:58:07 +02:00
Michael Weghorn 8f7cf9c32c weld: Move weld::CheckButton to own header
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.

Add missing includes/forward declarations in places
previously depending on transitive includes that
are now dropped.

Change-Id: I3215b358e0fa45ffce08756218c386e1a4d7ebc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205928
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-04 08:39:19 +02:00
Michael Weghorn 911a89ddeb weld: Move weld::WaitObject to own header/source
Move the class out of weld.hxx into its own header and
source file, in order to make it easier to keep an overview
and to avoid having to recompile ~all UI code when the class
is modified.

Change-Id: I91bae842e5b18a83db45de12150c21f75e537fb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205900
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-03 23:19:30 +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