Commit Graph
518225 Commits
Author SHA1 Message Date
Xisco Fauli 6e6ad8e4c1 fix WASM build
after
commit 382b6f118c
Author: Heiko Tietze <tietze.heiko@gmail.com>
Date:   Thu Jun 11 18:22:47 2026 +0200

    Resolves tdf#172375 - Revert "uno:Translate with DeepL API"

Change-Id: Ie0e37e44ff494c7b46ce64030a6f40e286180c63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207400
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-29 14:19:48 +02:00
Caolán McNamara bd11de9abf crashtesting: clear the tracked-change flag when dropping...
...the footnote mark buffer

A custom footnote mark is buffered into m_aSuperBuffer, and when the
mark sits inside a tracked insertion the start of the tracked change is
buffered there too.

The footnote path copies the mark text out and then clears
m_aSuperBuffer. So the buffered start is discarded but the states that
buffered into it still had their StartedTrackchange set.

On group close they emitted an end that has no start, and
RemoveTopRedline attempted to pop an empty redline stack.

So clear the flag on those states when the buffer is dropped.

seen loading ooo53739-2.doc converted to rtf and reloaded (also
ooo83985-4.doc), where the footnote sits inside the tracked insertion as

{\revised... {\super b{\*\footnote ...}}}

 #1 writerfilter::dmapper::DomainMapper_Impl::RemoveTopRedline at engine/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx:10035
 #2 writerfilter::dmapper::DomainMapper::sprmWithProps at engine/sw/source/writerfilter/dmapper/DomainMapper.cxx:3242
 #3 writerfilter::dmapper::DomainMapper::lcl_sprm at engine/sw/source/writerfilter/dmapper/DomainMapper.cxx:1614
 #4 writerfilter::LoggedProperties::sprm at engine/sw/source/writerfilter/dmapper/LoggedResources.cxx:365
 #5 writerfilter::rtftok::RTFReferenceProperties::resolve at engine/sw/source/writerfilter/rtftok/rtfreferenceproperties.cxx:34
 #6 writerfilter::dmapper::DomainMapper::lcl_props at engine/sw/source/writerfilter/dmapper/DomainMapper.cxx:4970
 #7 writerfilter::LoggedStream::props at engine/sw/source/writerfilter/dmapper/LoggedResources.cxx:244
 #8 writerfilter::rtftok::RTFDocumentImpl::replayBuffer at engine/sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx:1921
 #9 writerfilter::rtftok::RTFDocumentImpl::popState at engine/sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx:3899

see also:

commit 013ec10d4e
Date:   Wed Oct 22 22:35:01 2014 +0200

    i#84172 RTF import: handle nested groups inside redlines

Change-Id: I2a7c5f3d3aef328a6e5a663dddc72175066fcafc
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4724
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 69a5dcf79103b16d44bdab56a94242ede0347977)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207398
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-29 13:54:58 +02:00
Caolán McNamara d89e2655f9 crashtesting: reuse a cached glyph subset only where it is safe to concatenate
The glyph layout cache builds the layout for a substring by cutting it out
of the cached whole-string layout and reusing those glyphs without reshaping.
That is only correct at a cluster boundary that HarfBuzz reports as safe to
concatenate.

The previously checked unsafe-to-break flag is a smaller set and does not
cover boundaries where the surrounding text changes the glyphs, for example
which fallback font a run resolves to, so a subset could be cut where a fresh
layout of the substring would differ.

Ask HarfBuzz to produce the unsafe-to-concat flag and guard the subset with
it instead.

seen loading sd-cre-hea-ar-7e49187f4be1eb63.docx

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I8ff201a4af6c1c9e283a87267b47749a8ce717e6
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5516
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 573d06f6ce4b5123ac7b0d55ae3e846c0a07cbf1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207395
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-29 13:52:35 +02:00
Manish Bera b56f8a9d96 add double line bracket tests for pormulti.cxx
Change-Id: I865f8790368dfa71cfc5740821df2016cb2687f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207361
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2026-06-29 12:11:42 +02:00
Vissarion Fisikopoulos ef11378a8d tdf#42713 maintain comments format
If the query has comments then maintain the format when saving
and warn the user when switching or start editing in design view
that the comments could be lost. The user will have the choice
to keep the formating as well as the placement of comments in
the query.

Change-Id: I3de2313f8808a0b1093ce38de3bc9aa775656067
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207198
Reviewed-by: Vissarion Fisikopoulos <vfisikop@libreoffice.org>
Tested-by: Jenkins
2026-06-29 11:37:14 +02:00
Xisco Fauli 1b9b98c6de sqlite: upgrade to 3.53.3
Downloaded from https://www.sqlite.org/2026/sqlite-amalgamation-3530300.zip

Change-Id: I87d554f1666ec5da753453dc2559210d93de01bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207390
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-29 10:17:05 +02:00
Xisco Fauli 00aebb5e88 loplugin:unusedmethods
Change-Id: I5eec1b68efc285995db3b5825699c07fa006cb35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207375
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-29 10:16:53 +02:00
Rizal Muttaqin bd90af59c0 tdf#172598 Sync with elementary Icon Upstream
Change-Id: Ica94ea8bb12ac6389513728462be7ecccb866d7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207391
Tested-by: Rizal Muttaqin <rizmut@libreoffice.org>
Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2026-06-29 02:40:31 +02:00
Martin Srebotnjak 63c70ea8c7 Update git submodules
* Update translations from branch 'master'
  to 408d5ccae94d1499c5a7754b0758c7ec95156a3a
  - Updated Slovenian translation
    
    Change-Id: Iecb822443e73e40cd43def975b4ef7a0d2ba4d61
2026-06-28 22:56:19 +02:00
Mike Kaganski 50935f0fd9 vcl, sd: import PDF /IRT threaded comments and /State resolved flag
Extend PDFGraphicAnnotation with the raw PDF fields — /IRT, /RT,
/State, /StateModel, and /F plus each annotation's pdfium index —
that are needed to reconstruct a thread on the sd side.

The sd PDF filter uses them to:
  - mark every imported PDF annotation as threaded (any PDF comment
    can be replied to / resolved);
  - link replies to their parent via /IRT (page-scoped per spec);
  - collapse Acrobat-style state-change annotations into the target's
    IsResolved flag — /IRT + /State + /StateModel, with /F carrying
    the Hidden | NoZoom | NoRotate bits.

Only /StateModel = "Review" with /State = "Completed" maps to
resolved; other state models are discarded. /RT = "Group" is honoured
as a grouping relationship, not a reply. Acrobat's per-user state
model (each reviewer maintains their own state-change pointing at the
same target) is collapsed to a single boolean per comment — resolved
if any reviewer's latest state is Completed. The mapping is lossy;
the in-code comment on StateChange documents the trade-off.

Also make newly added comments threaded (allowing to resolve), when
the document is PDF.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I88e2bbe1202ada7b2e21a3ed90f2eb28760dcd6f
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1455
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 72a729882982ebf29cbbc5bdf5000621b53b2d8a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207212
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-06-28 13:38:25 +02:00
Julien Nabet a80cea95fd Call EndListening on the current m_pBasePool before StartListening the new one
Change-Id: I9880077600e93a3f40c28bb6e44ee8dc4d53ea3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207387
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-06-28 12:48:19 +02:00
Khaled Hosny d47d44191d tdf#152396: List extended subfamily names in the style box
FontStyleBox::Fill inserted an entry only when weight/italic/width
attributes differed from the previous one, but these are not the only
attributes that can change between style. For example Fontin Sans has
both Regular and Small Caps styles and they have the same
weight/italic/width, so we were showing Regular while using Small Caps.

Change-Id: I01f6530c1c54e083faf722eabfac7ab925b39c00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207382
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-06-27 22:55:21 +02:00
Neil Roberts 8b44be318a singleprov: Fix testing properties on directories in unit test
The test that checks the editable and creatable properties in nested
directories was always checking them on the provider node instead of the
nested directory node. This was probably due to a cut-and-paste
kerfuffle.

Change-Id: I083c84fff1229553ddaedd99b4f6c11f5127ed70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207342
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-06-27 21:17:16 +02:00
Irgaliev Amin 4cc4da148a tdf#41007 sd: Inserting multiple images via the insert dialog and DnD.
Added the behavior of inserting multiple images through the insert
dialog, which is similar to DnD.

The method for creating a dialog box for inserting images has been
extended to allow the selection of multiple images: aDlg.setMultiSelect(true).
File selection is now handled as a list instead of a string.

Previously, when inserting an image into an area with another image,
the new image was inserted next to it, although it was expected to replace
the existing image, similar to other modules. In the current patch, when
inserting a single image through the paste dialog or DnD into an existing
image area, the existing image will be replaced. However, if insert
multiple images into an existing image area, the new images will be inserted
next to each other. This behavior is consistent with other modules.

Change-Id: Ia64634f969e53342dfe2828a67a6ee4277134f7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205754
Tested-by: Jenkins
Reviewed-by: Roman Kuznetsov <antilibreoffice@gmail.com>
2026-06-27 17:30:09 +02:00
Irgaliev Amin 58cd4ec030 tdf#41007 sw: Inserting multiple images via the insert dialog.
Added the behavior of inserting multiple images through the insert
dialog, which is similar to DnD. The anchor can be changed in the settings under
Tools -> Options... -> LibreOffice Writer -> Formatting Aids -> Image -> Anchor:".

The MultiSelection flag has been added to FileDialogHelper to
allow selecting multiple images. File selection is now handled as
a list instead of a string.

In addition, the behavior of replacing already inserted images has been adjusted.
When inserting a single image on top of an existing one, it will be replaced (as is).
When inserting multiple images in the area of an existing one, they will be inserted
instead of replaced, as multiple images are not replaced by a single image, which is
the more expected behavior (to be). This is based on the proposed commit
in sc: https://gerrit.libreoffice.org/c/core/+/200891

Depends-On: Id299be0112ffe0bdf1aafb534edbfb216859dbf4
Change-Id: Ibadac0445964dec7fad740c0fb519803a30d3319
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196196
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
Reviewed-by: Roman Kuznetsov <antilibreoffice@gmail.com>
2026-06-27 16:32:19 +02:00
Irgaliev Amin 4df292a3ca tdf#165004 sc: Insert multiple images via the insert dialog and DnD.
Added support for selecting multiple images in the insert dialog. Fixed an issue with inserting multiple images via DnD.

When inserting a single image into a shape with a background or onto another existing image - they are replaced.
If insert multiple images into a shape or onto an existing image - they are inserted instead of being replaced.
To achieve this, SetMultiInsertState(...) and isMultiInsert() methods have been added for DnD, and the boolean
variable isMultiInsert is passed for insertion via lcl_InsertGraphic(...).

Change-Id: Id299be0112ffe0bdf1aafb534edbfb216859dbf4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200891
Tested-by: Jenkins
Reviewed-by: Roman Kuznetsov <antilibreoffice@gmail.com>
2026-06-27 16:31:56 +02:00
Ilmari Lauhakangas 9f8489fbcd tdf#172588 Explicitly add accelerator for Open Hyperlink
Change-Id: I6fd1c4d95c6aa6990200733b60a4a8a2e83834c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207379
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
2026-06-27 15:36:49 +02:00
Xisco Fauli c5dcfbbdd5 cid#1695431: Big parameter passed by value
Change-Id: I7b7704a2ea56a4fa01047deca0ea0585d46162aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207373
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-27 15:33:05 +02:00
Xisco Fauli 6f23441fec cid#1695393: Uncaught exception
Change-Id: I5dba5704407b4d01f10ae0921ea03f8152bc0551
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207368
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-27 15:32:55 +02:00
Xisco Fauli 8f4742b021 cid#1695435: Uninitialized scalar field
Change-Id: Ibe9d60bb7d292beab4d70f4bae62e1aee0cbdd0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207367
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-27 15:32:47 +02:00
Irgaliev Amin 884317b4bc tdf#79356 - sw: Adding the connector attributes dialog to the context menu
Previously, the ability to use connecting lines in sw and sc modules was added.
In sd, in addition to connectors, a dialog with connector attributes (SID_CONNECTION_DLG)
is available, which can be called through the context menu. In previous patches,
this dialog was not attached to the context menu in sw.

The current patch allows to call a similar connector attributes dialog in the sw module.

Change-Id: Ieb7b972bd50b2d282aaa552d99e7781217284c44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206710
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Roman Kuznetsov <antilibreoffice@gmail.com>
2026-06-27 13:35:02 +02:00
Heiko Tietze c3f6e2f497 Related tdf#115805 - Do not change units in Calc's border dialog
Probably introduced to avoid nonsense values like km all settings
was rejected and mm used. We should allow users to full configuration
and km was removed from the list anyway.

Change-Id: I4e71218334f2ba7cb52b5663c12c7314b6c7a063
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207354
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-06-27 09:37:20 +02:00
Michael Weghorn a7802cf7c7 sfx2: Deduplicate TemplateDlgLocalView::PopupMenuHdl more
Share logic that is the same for both if/else branches.

Change-Id: I2f571540ae6d82aa07603c1a95427c22b0769c6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207365
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-27 06:33:03 +02:00
Michael Weghorn 9a90433bb3 sfx2: Deduplicate TemplateDlgLocalView::PopupMenuHdl
Move code that is the same for the if/else branches
out of those to share it.

Change-Id: Ibf0c6a08e4b98bf5eb16defad33bd437a145033b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207364
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-27 06:32:56 +02:00
Michael Weghorn cdc69b28f9 sfx2: Use range-based for in TemplateDlgLocalView::syncCursor
Change-Id: Ia4bcab8d06f669026756b946cb13adc4ab883323
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207363
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-27 06:32:49 +02:00
Michael Weghorn c8aa68019c sfx2: Simplify SfxTemplateManagerDlg::readSettings a bit
Determine the view mode and use the same call to
SfxTemplateManagerDlg::setTemplateViewMode instead of
having 2 separate branches.

Change-Id: I671325bb7ab075e6492363850534bc82c015f76e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207362
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-27 06:32:41 +02:00
Michael Weghorn eac86f0dfa sfx2: Merge SfxTemplateManagerDlg::OnTemplateOpen into only caller
Change-Id: Ia1118ce424920ce63272106ee5d1e27f81b04c8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207360
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-27 06:32:31 +02:00
Michael Weghorn 1056710535 sfx2: Use regular indentation of 4 spaces
... instead of just 3 in SfxTemplateManagerDlg::OkClickHdl.

Change-Id: I75c289e5ac2caa8d5749737479128160ab519bc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207359
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-27 06:32:22 +02:00
Michael Weghorn 107d5b0eb4 sfx2: Introduce TemplateDlgLocalView::GrabFocus
Let the TemplateDlgLocalView take care of
focusing the widget that is currently enabled
due to the current mode instead of having
to take care of such implementation details
in SfxTemplateManagerDlg that uses
TemplateDlgLocalView.

Change-Id: I1cdf66fd93dcab84b82c6de97cf658c371f7d19a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207358
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-27 06:32:13 +02:00
Michael Weghorn a9b6e8fed9 sfx2: Let ListView connect its own column click handler
Do that in the class itself, instead of calling
weld::TreeView::connect_column_clicked in the
only subclass.
Also make the handler (and while at it, also the tooltip
one) private.

Change-Id: I18cb307b65c49cd1217d2b47ace8a53e94d87faa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207357
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-27 06:32:04 +02:00
Michael Weghorn a3d10bf34e sfx2: Move TemplateViewMode enum to templatedlglocalview.hxx
TemplateDlgLocalView has such a mode, so move the enum class
to where the TemplateDlgLocalView is.

ListView doesn't need to know about those enums, as the
mode only decides whether the ListView is used or not,
but that's the concern of the TemplateDlgLocalView.

Change-Id: I10953235148755a0db02b748cbd67e7fd674ba05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207356
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-27 06:31:45 +02:00
Michael Weghorn 93eb17efc3 sfx2: Make some ListView methods private
Those are only needed from within the class implementation itself.

Change-Id: I634c20b05c4552a032bb477e9955a0e2f6fe08c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207355
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-27 06:31:37 +02:00
Justin Luth 10a3c65899 tdf#172113 sw line spacing: additional unit test / cleanup
LineBreaks seems to be a possible edge case,
especially on an empty line.

isFieldMarkPortion:
There are FieldMarkPortions, but a true is not passed
from inside of one of those, but from a SwTextPortion.

make CppunitTest_sw_ooxmlexport25 \
    CPPUNIT_TEST_NAME=testTdf172113_linespacingLineBreaks

Change-Id: I42871de563bf596bc33960d75abfcda87f1437c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205852
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-06-27 01:31:57 +02:00
Justin Luth 4031fa9b9a tdf#172113 sw ms import: consistent linespacing gap height
I guess they probably used to be consistent before LO 7.1.
After 7.1, only the last line still had a gap
simply determined by the largest portion in the line.
The other lines were determined primarily
by the largest TextPortion in the line.

That is inconsistent and rather confusing.

The other lines get their gap height
from GetLineSpacingBaseHeight.

So change mnHeightOfLastLine
to also use 7.1's GetLineSpacingBaseHeight
which now results in high interoperability with MS formats.

SAFETY FACTOR: very safe
It fixes MS formats and only affects new documents.

make CppunitTest_sw_ooxmlexport25 \
    CPPUNIT_TEST_NAME=testTdf164835_nonDummyLineHeight

make CppunitTest_sw_ooxmlexport25 \
    CPPUNIT_TEST_NAME=testTdf137335_whitespaceLineHeight2

make CppunitTest_sw_layoutwriter2 \
    CPPUNIT_TEST_NAME=testHiddenParaLineHeight

make CppunitTest_sw_ooxmlexport25 \
    CPPUNIT_TEST_NAME=testTdf172113_linespacingNumbering

Change-Id: I55669b1c6018c0f8a030088622d796edd7c781c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205316
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-06-27 01:31:46 +02:00
Justin Luth 9082a3bd8a tdf#172233 sw: apply line spacing gap after the line, not before
This improves document layout: both visually
and for interoperability with Microsoft formats.

Prior to this patch, the line's calculated line spacing gap
was placed above the line (for intra-paragraph line spacing).

There are four problems with LO's way of placing the gap above:
1.) The height of the first line is ignored.
LO uses the mnHeightOfLastLine as the first line's 'before gap'.
This means that the last line's height determines two gaps,
while the first line's height doesn't determine any gap size.

2.) Font designers already build a gap
appropriate for single line spacing into the font itself.
By adding the (larger) gap above the (already large) font
it didn't create a visually appealing paragraph.

3.) And of course it is based on the tallest item,
which means that the rest of the characters already
have an enlarged gap above. Why make it even larger?

4.) And of course, since it doesn't match Microsoft's layout,
it didn't display native DOC/X files correctly.

While not everything done 'the Microsoft way' is better,
this aspect of their line-space handling certainly is superior.

SAFETY FACTOR: very safe
It fixes MS formats and only affects new documents.

make CppunitTest_sw_ooxmlexport25 \
    CPPUNIT_TEST_NAME=testTdf172233_linespacingGap

Change-Id: I34533db9fec7e92e9357a652d980421cdcd13739
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205815
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-06-27 01:31:36 +02:00
Justin Luth bb89ffd622 tdf#172169 sw ms import: 1st portion shouldn't define min linespace
This fixes an oversight from the 7.1 change
that only SwTextPortions should inform the line-spacing gap.
They missed that the font of first portions (of anything) also do.

Preventing this 'random' initial definition of line-spacing height
certainly is needed for interoperability with MS formats,
which of course have no such anomaly.

SAFETY FACTOR: very safe
It fixes MS formats and only affects new documents.

make CppunitTest_sw_ooxmlexport25 \
    CPPUNIT_TEST_NAME=testTdf172169_linespacingFirstPortion
[Note: page 2 is basically just a sanity check for later.
It is not changed by this unit test.]

Change-Id: I9375e526b58d59fe46fcf5d104557a207fc3b43c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205838
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-06-27 01:31:24 +02:00
Justin Luth d143be1655 tdf#172169 sw ms import: IsMultiPortion IsUsedToCalcLineSpacingHeight
Pure RTL text is just an SwTextPortion,
but I guess if there is anything 'different' in the paragraph
then it becomes a multi-portion SwBidiPortion.
So clearly SwBidiPortions ought to inform the line-specing gap.

Interestingly, rotated text should be treated the same as normal text
in terms of determining the line-spacing gap (according to MS Word).
It seems a bit odd to do so IMHO, but it is consistent at least.

Although our double-line Asian layout is not that closely aligned
to how Microsoft implements it, MS Word clearly does define
the line-spacing gap based on the height of double-lined text.

I assume that this applies to Rubies as well
(where again our implementation seems rather different from MS Word).

So then these should all be treated the same as normal text
in terms of determing the line-spacing gap.

SAFETY FACTOR: very safe
It fixes MS formats and only affects new documents.

make CppunitTest_sw_ooxmlexport25 \
    CPPUNIT_TEST_NAME=testTdf172169_linespacingBidi

make CppunitTest_sw_ooxmlexport25 \
    CPPUNIT_TEST_NAME=testTdf172169_linespacingDoubleLineText

make CppunitTest_sw_ooxmlexport25 \
    CPPUNIT_TEST_NAME=testTdf172169_linespacingVerticalText

Change-Id: I54ad841883b1704bf931effdb3943681dbb96ffb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205599
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-06-27 01:31:14 +02:00
Justin Luth 77e5696252 tdf#172169 sw line spacing: InsertPortion max for LineSpacingBaseHeight
Follow-up from the similar previous patch.

This fixes a 7.1 regression from
commit d336e6c260
affecting both LO and MSO formats.

The problem occurred when a non-LineSpacingBaseHeight
was already as tall or taller than a following
otherwise-tallest LineSpacingBaseHeight,
resulting in inconsistent line spacing.

I'm not sure what situations the previous patch's
CalcLine fix wouldn't catch
(and it is hard to identify since portions are
 just being built here - so the entire line is not yet known).
But for completeness and copy/pasta value,
the same fix is applied here.

Change-Id: If220f229fd75211794d34181ec8dcd25a782876d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205568
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-06-27 01:31:05 +02:00
Justin Luth f596236f6c tdf#172169 sw line spacing: CalcLine max for LineSpacingBaseHeight
This fixes a 7.1 regression from
commit d336e6c260
affecting both LO and MSO formats.

The problem occurred when a non-LineSpacingBaseHeight
was already as tall or taller than a following
otherwise-tallest LineSpacingBaseHeight,
resulting in inconsistent line spacing.

I also took the opportunity to rename things.

A similar situation exists in InsertPortion,
but I'll handle that in a separate patch.
I'm not certain it REALLY matters there,
although it is always good to set a good coding pattern.

SAFETY FACTOR: unsafe, but necessary
Consider it a regression fix, as it could affect ODT since 7.1.

make CppunitTest_sw_ooxmlexport25 \
    CPPUNIT_TEST_NAME=testTdf172169_linespacingSecondPortion

Change-Id: Ic06d1b2917ab5c9a5ff6db678db46bd7d0dc4008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205457
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-06-27 01:30:55 +02:00
Justin Luth 83303053d7 tdf#172169 sw ms import: line portion IsUsedToCalcLineSpacingHeight
Most of this patch is just No-Functional-Change cleanup/renaming.
The only change is the new function IsUsedToCalcLineSpacingHeight.

This fixes (only for non-ODF formats and new documents)
a LO 7.1 regression from
commit d336e6c260
which caused intra-paragraph line-spacing calculations
to ignore the size of most non-plain-text content.

Specifically broken for both ODT and Microsoft formats
were things like fields, content controls, and FieldMarkCheckboxes.

But that 'regression' also had some 'good' results.
Things that it accidentally fixed (in terms of Microsoft interop)
were Tabstops, Hidden text, and Footnote/Endnote markers.

P.S. No attempt was made to 'fix' regressed ODT files.

SAFETY FACTOR: Very safe
It fixes MS formats - and doesn't affect previous ODT files.

make CppunitTest_sw_ooxmlexport25 \
    CPPUNIT_TEST_NAME=testTdf172169_intraLinespacing

The VCL test is hit because the .fodt has no config:config-item,
so it picks up the new default.
This is a reference field with 1.15 line spacing and 96pt font.
make CppunitTest_vcl_pdfexport CPPUNIT_TEST_NAME=testTdf142806

Change-Id: I24cb1af505550b47fae8e7b61b3345f0346da52d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205456
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-06-27 01:30:42 +02:00
Justin Luth d472110878 tdf#172113 sw line spacing: introduce LINE_SPACING_AS_GAP_BELOW
Currently, line spacing is a totally inconsistent and
non-interoperable mess.

LO 7.1 introduced radical changes
without a compat flag, and without handling edge cases,
so inconsistencies and unpredictabilities abound.

The ODF (and DOCX) specifications say nothing
about how line-spacing ought to be implemented.

This LO 27.2 patch introduces a new compat flag
which will be utilized by succeeding patches.

Things which will be fixed:
1.) Consistently place the gap below the line.
Currently this is only done for the last line (by the first line).
The other lines place their gap above the line.

2.) Also use the first line to define a gap.
Currently the last line defines two gaps (above and below),
while the first line doesn't define any.

3a.) Consistently define the gap height for all lines.
Currently the last line's gap depends on the tallest 'anything'
while the other line's gaps are (supposedly - since LO 7.1)
determined only by TextPortions.

3b.) Predictably define the gap height.
-don't give special advantage to the first portion
-don't ignore text-like content (fields, MultiPortions, etc.)
-resolve various implementation errors

4.) Be highly interoperable with MS formats
Currently our line spacing doesn't look anything
like how MS Word shows it.

Change-Id: Ic4c70b1f3d1b912cc4b8526ede7c2241200d5008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205814
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-06-27 01:30:16 +02:00
Justin Luth 882b75b93d tdf#172169 sw line spacing: SwFootnotePortion != IsTextFrame
This odd bug is even seen prior to the 7.1 changes,
but it is clearly wrong given 7.1's TextPortions only...

Since the footnote marker in the text run
is not considered to be IsTextFrame or InTextGrp,
it doesn't affect either LO or MSO line spacing
and thus should not set LineSpacingBaseHeight.
[I'm using terminology from later patches here^^^]

I caught this when doing a
make CppunitTest_sw_ooxmlexport16 \
    CPPUNIT_TEST_NAME=testTdf141231_arabicHebrewNumbering
where a debug/sanity check walked through the portions
and found a highest value that didn't match GetLineSpacingBaseHeight.

IIUC, on a final run of the line
(after a prior run had already determined the final line height)
it was taking that finalized line height [rInf.GetTextHeight()]
and applying it to LineSpacingBaseHeight.

SAFETY FACTOR: unsafe, but necessary/exotic
This is a real edge case, and should generally
have minimal effect in a typical, reasonable document.
This fixes a bug, not a 'previous layout choice'.

In the worst case, it could easily be put behind a compat flag.
const IDocumentSettingAccess& rIDSA
    = m_pInf->GetTextFrame()->GetDoc().getIDocumentSettingAccess();

make CppunitTest_sw_ooxmlexport25 \
    CPPUNIT_TEST_NAME=testTdf172169_linespacingFootnote

Change-Id: I797cebd919c2cf48ed8d89c7fa7617ab348a0185
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205670
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-06-27 01:29:47 +02:00
Justin Luth d896865f48 tdf#172113 sw MaxAscentDescent: ignore PostItsPortion
This fixes an inherited-from-OOo bug for ODT and DOC/X.

If the only thing on a line is a comment,
then don't set the MaxAscentDescent to 1.

Instead, it should remain at zero
so that things like CalcHeightOfLastLine
use the font metrics to calculate a reasonable height.

SAFETY FACTOR: unsafe, but necessary
This could affect older ODT files,
because it is a bug that is being fixed.

make CppunitTest_sw_ooxmlexport25 \
    CPPUNIT_TEST_NAME=testTdf172113_linespacingComment

Change-Id: If4a29ce47c5e83697015feaade11243937e6d0c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205234
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-06-27 01:29:28 +02:00
Christian Lohmaier ea212d13e3 Update git submodules
* Update translations from branch 'master'
  to f9e3df1bee2312fa85f27175ec2227fadd08cad8
  - update translations for 26.8/master
    
    and force-fix errors using pocheck
    
    Change-Id: I2082c913a7b93daa88cb96a65d892def741f689e
2026-06-27 00:12:35 +02:00
Justin Luth a04ae3d1c5 related cid#1695398: keep comment with its code
The assignment of pRule is unrelated to the comment
so move the comment inside the loop.

Change-Id: Ib0aebef609fb0b52c0f8183568abdfc873173bdc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207377
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-06-26 22:11:40 +02:00
Xisco Fauli e9a483e8c1 DataSourceType: use default value instead of std::optional
and use it in ScChart2DataSequence as well

in preparation for a follow-up commit

Change-Id: Id03c2c36f940723d64c14b3d32016f65b1c7fdcb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207366
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-26 19:05:21 +02:00
Xisco Fauli 91df94057b cid#1695398: Dereference after null check
Change-Id: I7dba7ef5c771a1d349154027a84e0e8567c98e32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207351
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-26 18:00:30 +02:00
Xisco Fauli c8040293d5 cid#1695399: Dereference null return value
Change-Id: I8ffb25ca9655fe039a3c1db8241ea585492641e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207336
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-26 16:24:32 +02:00
Xisco Fauli ba339ebb2d cid#1695403: Using invalid iterator
Change-Id: I9960d4de3e61f3992f98146890dd7fb3d07a43f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207352
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-26 16:16:58 +02:00
Xisco Fauli 7ddad3e6b6 cid#1695392: Explicit null dereferenced
Change-Id: I5c12bc45bab1f25c01313ecdb2d66af0bebe5650
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207340
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-26 15:59:37 +02:00