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>
Instead of hard-coding the spacing for the vcl IconView
implementation to 5 pixels, use that as the default, but
override it with the GtkIconView::item-padding [1] property
if that one is set for an icon view in a .ui file.
Together with previous commit
Change-Id: I703504b7e2ce0c4b5351a95616112950a33332dd
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Sep 23 11:00:24 2026 +0200
tdf#173578 Reduce spacing between ColorIconView items
, this results in the spacing between ColorIconView items
now also being smaller than before when the vcl implementation
(SalInstanceIconView) is used.
[1] https://docs.gtk.org/gtk3/property.IconView.item-padding.html
Change-Id: If4997dd5ea40659532424c600bb74e185c69b102
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211359
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
With the switch from the custom SvxColorValueSet
to the weld::IconView based ColorIconView in
commit 701cea2393
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Apr 17 09:45:29 2026 +0200
tdf#130857 Introduce ColorIconView, port "Area" page's "Color" section to it
and
commit a4d5983b4e
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Jun 5 11:48:54 2026 +0200
tdf#130857 Port ColorWindow from SvxColorValueSet to ColorIconView
and
commit 9ed6b0a88f
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Mon Jun 8 14:00:33 2026 +0200
Use ColorIconView for SvxDefaultColorOptPage
and
commit dc3b6ec185
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Jun 10 10:25:27 2026 +0200
tdf#130857 sc: Port tab color dialog to ColorIconView
, spacing between the color items was implicitly
switched to the default values for the IconView
implementations, which is quite a bit more than
it was before at least for the GTK and vcl
implementations.
As requested in tdf#173578, reduce the spacing
again.
Now that weld::IconView is used, use the corresponding
GtkIconView spacing properties that can be set in
the .ui file.
For the GTK implementation (GtkInstanceIconView),
these are applied "automatically" because
GTK handles them internally.
For the vcl and Qt implementations (SalInstanceIconView
and QtInstanceIconView), they are not yet applied because
these properties are not evaluated yet.
For the vcl implementation, evaluating
GtkIconView::item-padding [1] will be added in
an upcoming commit.
For the Qt implementation, the spacing looks quite OK
to me (at least with the Fusion style on Linux).
Evaluating that property could still be added later as
needed. QListView::spacing [2] looks related.
[1] https://docs.gtk.org/gtk3/property.IconView.item-padding.html
[2] https://doc.qt.io/qt-6/qlistview.html#spacing-prop
Change-Id: I703504b7e2ce0c4b5351a95616112950a33332dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211358
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Indent a paragraph by half an inch, then File - Export As - Export as
PDF with Universal Accessibility (PDF/UA) on. Its element read
/A <</O/Layout/Placement/Block
/StartIndent 0.72
where half an inch is 36 points. Every length was a fiftieth of what
it names: a 64.8pt inline formula carried /Width 1.296 and a 481.9pt
table /Width 9.638. Writer passes twips, and the PDF writer prints
thousandths of a point. For an inline Formula the standard makes
Width the sole source of information about the element's extent
(ISO 32000-2 14.8.5.4.6), so the fiftieth is all a reader reflowing
the file has.
A bounding box was right all along, because SetStructureBoundingBox
converts one out of the current map mode. The nine lengths this
writer can set take the same conversion now. The counts and the
identifiers pass through untouched - RowSpan, ColSpan, Language and
the annotation ids.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I4da4d085de9da7e3773294756ff3205b9b1b38aa
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12997
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit ec0a83ea9cacd67b7842a4899e9996b2d0048ce0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211350
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Insert - OLE Object - Formula Object, write E=mc^2 inside a sentence,
then File - Export As - Export as PDF with Universal Accessibility
(PDF/UA) on. PAC 2026 puts 1 warning on the "Formula" structure
elements row: Possibly inappropriate use of a "Formula" structure
element. The element read
/A<</O/Layout/Placement/Block/BBox[212.05 713.7 276.85 735.3]...>>
Placement was Block for every frame but a table cell and a figure
anchored in the body. A formula is tagged inside its anchor paragraph
though - as character it sits in the text, and CheckReopenTag reopens
the paragraph's tag for the other content anchorings - and ISO
32000-2 14.8.5.4.2, Table 378 reads "When applied to an ILSE, any
value except Inline shall cause the element to be treated as a BLSE
instead". Neither the description, the bounding box nor the size has
a part in it, each ruled out one at a time in an exported file.
The element reads /Placement/Inline now for a formula anchored as
character, to the paragraph or to the character. One anchored to the
page or to a frame is tagged under the document, where a block is
what it is.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I57e5b52c5dd4e34a8588bc1091b13864e6d4497e
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12988
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit bae420ab335afaff185046486a3efbad59d6b150)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211349
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Insert - OLE Object - Formula Object, write E=mc^2, save and reopen,
then export with File - Export As - Export as PDF and Universal
Accessibility (PDF/UA) on. PAC 2026 fails it under Alternative
Descriptions, the element saying nothing about what it holds:
<</Type/StructElem/S/Formula /P 5 0 R /Pg 1 0 R ... /K[1 ]>>
Writer takes a frame's Alt from the title and description a user
typed; a formula has neither unless asked. A tagged export falls back
to the formula's own source now, so the element says E=mc^2 and PAC
passes that checkpoint:
/Alt <FEFF0045003D006D0063005E0032>
A title or description still wins. The report asks for an option; a
formula with neither said nothing at all, so the source goes in with
none to switch it off. Reading the source needs the object running,
so the export runs each undescribed formula and puts it back. PAC's
separate Structure tree warning still stands.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I09a68eff3d15981a7e112f79409b3448bceb4bc0
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12987
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 5b84c1873533bcdd98d917e8b6fb6d149a238047)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211348
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
ColorIconView only passed the Color to its activation handler, so its
users took everything else (color name, position for the theme palette
lookup) from the selected item. For mouse and keyboard the activated
item is always the selected one, but the AT-SPI "activate" action of an
item activates it without selecting it first, so the color of the
selected item was applied instead of the activated one.
Pass the index of the activated item to the handler and let the users
take color, name and theme index from it.
Change-Id: I900278bf68e5038e5588ce71b03cd4b5ae9f8918
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211237
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
* Update helpcontent2 from branch 'master'
to 12b3e70db8d0f1c3e50ff783c3e85c1ffbfa8bf2
- tdf#173404 Data Area in Calc navigator
Change-Id: I85c3ab7207efa4579bb504cd2ddffc2c1129a695
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/211346
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Insert - Table of Contents and Index, then export with File - Export
as PDF, Universal Accessibility (PDF/UA) on and PDF version 2.0. The
file fails ISO 14289-2 clause 8.2.5.8 once per entry, which veraPDF
reports as:
Each TOCI in the table of contents shall identify the target of the
reference using the Ref entry, either directly on the TOCI structure
element itself or on one of its child structure elements
An item named no target at all:
<</Type/StructElem/NS 2 0 R/S/TOCI /P 8 0 R /Pg 3 0 R /K[10 0 R ]>>
It names the heading now, in the /Ref entry PDF 2.0 added:
<</Type/StructElem/NS 2 0 R/S/TOCI /P 8 0 R /Pg 3 0 R /Ref[ 15 0 R ] /K[10 0 R ]>>
Object 15 is the /S/H1 the entry links to, found from the mark its
URL names. An item that links to a table, a frame or an object, or
that has no link at all, still names nothing.
The document of testTdf173162 linked its entries to
bookmark alone now, as Writer writes them, and the document passes
the profile, so the test asks for PDF/UA instead of plain tagging
and the harness validates it.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I76e73684d2ab09f187f56cab093d13980150d737
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12750
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ee49bf58e7d3eb3ff94677e9a51c73b76eb51a99)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211338
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Put a footnote in a document and export with File - Export as PDF,
Tagged PDF on and PDF version 2.0. The file fails ISO 14289-2 clause
8.2.5.14 once per footnote. veraPDF, on the PDF/UA-2 profile, reports:
The Note standard structure type shall not be present in conforming
documents unless role mapped to a structure element in the PDF 2.0
namespace
The element carried the type PDF 2.0 replaced, in the 1.7 namespace
ISO 14289-2 8.2.4 accepts alongside the 2.0 one:
<</Type/StructElem/NS 2 0 R/S/Note /ID (id29) /P 28 0 R /Pg 3 0 R ...>>
Writer asks for FENote now, so the element lands in the 2.0 namespace
and the check stops failing:
<</Type/StructElem/NS 1 0 R/S/FENote /ID (id29) /P 28 0 R /Pg 3 0 R ...>>
Below PDF 2.0 the file still says Note, the only footnote type
ISO 32000-1 has.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I4674f4f902621ee8765121782799f42cc59c5e6e
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12749
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 42433cf89b23328991e7a64daea4f771b60f728a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211337
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
document.hxx included drwlayer.hxx, and with it svx/fmmodel.hxx,
svx/svdmodel.hxx, svx/svdundo.hxx, svx/xtable.hxx and editeng/outliner.hxx,
in all 700 translation units that use ScDocument. The only place in the
header that needed the complete type was the inline destructor of
sc::DrawUndoGuard, which now lives in documen9.cxx next to
ScDocument::BeginDrawUndo. The ScObjectHandling enumeration, used as a
default argument of SetLayoutRTL, moves to types.hxx so that both headers
can see it.
The files that used the drawing layer or the svx model classes through this
include now include drwlayer.hxx themselves, and a few headers that relied
on the same chain for TranslateId, Idle or SvStream get the header or
forward declaration they need.
clang -ftime-trace suggests this is 6% of the sc build time.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Id723c46ef0c881428ab1d9a2e9a642713a92e79e
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12681
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 3e8fd8cd92ff57aaef5ba9d4b71933700ee3f83b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211316
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Write a paragraph in Writer's built-in Index paragraph style and
export with Tagged PDF switched on. The element comes out as
/S/Index, over a role map that reads
/Index/P
so the standard Index type means a paragraph, document-wide. veraPDF,
on the PDF/UA-1 profile:
Standard tags defined in ISO 32000-1:2008, 14.8.4, shall not be
remapped
A style called Artifact went further. Its paragraph reached the
content stream beside the marker for content that is not part of the
structure at all, the two being one name:
/Artifact BMC
/Artifact<</MCID 10>>BDC
Writer names a structure element after the style that produced it,
and the role map records what that name means, one entry per name.
Styles collide there with the standard types, with each other, being
separate families for paragraphs and characters, and with the names
Writer asks for itself, Source Text writing Code literally.
A name a standard type has, or another alias asked for, is now passed
over for the first indexed name beside it that is free, so the Index
style writes /S/Index-1 over /Index-1/P. PDF 2.0 has standard names
1.7 lacks: a style called H7 gives way there, while a heading at
outline level 7, which Writer asks for by that same name, keeps it
and needs no entry at all. The synthetic Div containers ask for no
name now, and carry the Div tag as before.
The test document remapped four standard tags at PDF 1.7 and six at
2.0; now none at either.
Found while reproducing tdf#165454.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I63e9116e5db17bdb554b508a864e313a77f40bc2
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12361
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 54e0207ff6bcf937187a395912f1ed57b60d90e3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211314
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* Update helpcontent2 from branch 'master'
to 62f69099ad2e27830783e7c478c7bd7624ac2893
- tdf#172042 Add help for the Esperanto AutoCorrect option
Add’s help for the auto correct option to replace x’s with circumflexes.
Change-Id: I6e8969a806b52905404a21fbe718981e7b2975a8
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/211070
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
SwXTextRangesImpl::GetCursor was extracting the pointer out of
sw::UnoCursorPointer by getting a reference to the cursor with
operator*() and then taking a pointer to that. However, the cursor
pointer can be null, so in that case the method was relying on being
able to return a reference to a dereferenced null pointer. Dereferencing
nullptr is undefined behaviour. The code was probably getting away with
that because the reference is only used to immediately take a pointer.
However it looks like whatever compiler is used to make release builds
for MacOS was taking advantage of the undefined behaviour to assume that
the cursor pointer is never null. This was making it optimise out the
check for !GetCursor() at the top of SwXTextRangesImpl::MakeRanges, so a
crash ensued.
This patch just makes it use UnoCursorPointer::get instead which
directly returns a pointer without going through a reference.
Change-Id: I67169165e8d2da0f6500ca40db7c38e7b2890826
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211318
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
seen on converting interop-test-files/doc/forum-mso-en4-218597.doc to
rtf and reloading the export, which aborts with:
soffice.bin: sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx:10493:
void writerfilter::dmapper::DomainMapper_Impl::substream(Id, const
writerfilter::Reference<writerfilter::Stream>::Pointer_t&):
Assertion `m_aContextStack.size() == contextSize' failed.
#12 writerfilter::dmapper::DomainMapper_Impl::substream at engine/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx:10494
#13 writerfilter::dmapper::DomainMapper::lcl_substream at engine/sw/source/writerfilter/dmapper/DomainMapper.cxx:5039
#14 writerfilter::LoggedStream::substream at engine/sw/source/writerfilter/dmapper/LoggedResources.cxx:275
#15 writerfilter::rtftok::RTFDocumentImpl::resolveSubstream at engine/sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx:407
#16 writerfilter::rtftok::RTFDocumentImpl::resolveSubstream at engine/sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx:379
#17 writerfilter::rtftok::RTFDocumentImpl::sectBreak at engine/sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx:778
#18 writerfilter::rtftok::RTFDocumentImpl::dispatchSymbol at engine/sw/source/writerfilter/rtftok/rtfdispatchsymbol.cxx:217
In the header \intbl makes the table buffer current, so \shptxt buffers
the shape start instead of sending it to the dmapper. A paragraph mark
inside the shape text finds no table properties in that buffer and
decides it is not in a table. Replaying the buffer then sends the start
to the dmapper, and the start pushes a paragraph context.
When the shape text group ends the current buffer is still set, so the
end is appended to the buffer that was just drained. Nothing replays
that buffer again, so the paragraph context stays on the stack and the
header substream ends deeper than it began.
The start and the end have tested the current buffer separately since:
commit 818d80eb0c
Date: Fri Jun 28 16:47:49 2013 +0200
RTF import: support shapes inside tables
so remember whether the shape is open in the dmapper, and send its end
there directly when it is
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ifb94f77e3db4d3fcc6041a7927e88c62d9d970a4
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12757
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 306c1f840c413b352940513c83d1498d599b8359)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211313
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
seen on converting interop-test-files/odt/ooo115853-3.odt to odt,
which faults with:
#0 SwLayoutFrame::Lower() const (this=0x0) at engine/sw/source/core/inc/layfrm.hxx:103
#1 SwLayoutFrame::ContainsContent() const (this=0x0) at engine/sw/source/core/layout/findfrm.cxx:107
#2 GetBodyTextNode at engine/sw/source/core/fields/expfld.cxx:234
#3 SwChapterField::ChangeExpansion at engine/sw/source/core/fields/chpfld.cxx:145
#4 SwTextFormatter::NewFieldPortion at engine/sw/source/core/text/txtfld.cxx:113
...
#20 SwViewShell::CalcLayout() at engine/sw/source/core/view/viewsh.cxx:1005
#21 SwEditShell::CalcLayout() at engine/sw/source/core/edit/edws.cxx:89
#22 SwXFrame::getPropertyValue at engine/sw/source/core/unocore/unoframe.cxx:2225
#23 XMLTextParagraphExport::addTextFrameAttributes at engine/xmloff/source/text/txtparae.cxx:2969
A chapter field in the header asks GetBodyTextNode which text node the
page starts with. When the first body content of the page sits in the
repeated headline of a follow table, that headline is a repeat of the
master table's heading, so the code takes the first row after it
instead.
GetFirstNonHeadlineRow returns nothing when the follow holds only
repeated headline rows. The export reaches it in the middle of a
layout calculation, which SwXFrame::getPropertyValue starts in order
to answer a property of a text frame in a table cell.
GetFrameInPage in trvlfrm.cxx does the same step for the same reason
and checks the row it gets. Both callers arrived together,
probably since:
commit a3db03b8d4
Date: Mon May 3 12:45:37 2004 +0000
INTEGRATION: CWS gt03 (1.17.22); FILE MERGED 2004/03/11 14:55:03 fme 1.17.22.1: #26165# Feature - Multiple headline rows in tables
so check the row here too, and leave the fallback underneath to take
the content below the header
Not reproduced locally. The odt export runs clean here, under the
crashtest font set and through the harness round trip as well, and the
branch is reached eight times on this document with a row present each
time. Setting that row to null under gdb gives the frames above.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I5adb3b9495cfafe11cfa98d701a8ab7476b986bc
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12786
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 653b962592ae7ee257c8b7d28070e95d35cd09e1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211312
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This patch implements and fixes cases for filtering. In particular
the cases for form-based and dialogue-based filtering in forms for
data and time. Additionally, the cases for time values in Table
Data View.
A specific limitation comes from firebird which accepts only 4 digits
for nanoseconds in time values. The data are rounded to that digit
for firebird while still support full precision (up to 9 digits)
for other engines. This is implemented using the driver's metadata
functions.
Unit tests are added.
Change-Id: I89435da239c898f3c782fcc9f78f98caf4223f62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211298
Reviewed-by: Vissarion Fisikopoulos <vfisikop@libreoffice.org>
Tested-by: Jenkins
seen on converting interop-test-files/odt/tdf118553-1.odt, tdf118558-1.odt
and tdf91677-1.odt to doc and reloading the exports
One dies with a stack overflow, SwFrame::InvalidateInfFlags recursing
between a column frame and a body frame that are each other's upper. The
other two abort on the pTmp->IsTabFrame() assertion at
sw/source/core/layout/sectfrm.cxx:2016 in SwFrame::GetNextSctLeaf, reached
through SwFrame::GetNextFootnoteLeaf and SwContentFrame::MoveFootnoteCntFwd.
Every doc import turns on ContinuousEndnotes, so AppendFootnote makes a
section frame for the endnotes at the end of the document and inserts it
into the page's body frame. When the page style has more than one column the
body's lowers are column frames and all the text lives in the column bodies,
so the endnote section became a sibling of the columns. Its next sibling is
then a column frame, which GetNextSctLeaf doesn't expect, and the move it
makes puts a column frame under its own child body frame.
since:
commit 6885dcd7ec
Date: Tue May 14 08:28:33 2024 +0200
tdf#160984 sw continuous endnotes: switch to a section-based layout
so work out where the section belongs once, in GetEndNoteSectionUpper, and
let both the insert and GetEndNoteSection ask it
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I474131fca4f74254a5168d79d83ba11116abc692
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12675
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit f29d74eea952d3a9ea90b32afe2c9a8047afc10a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211310
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
- the printout lost rows when the user set Orientation to Landscape in
the File - Print dialog. Only the first page used the landscape paper.
The pages after it kept the portrait page breaks, so they took more rows
than fitted on the paper. The preview was correct, so only the paper and
the PDF showed the problem.
- ScModelObj::render() built a second ScPrintFunc after every page, so
that the document would hold the page style's page size again. That
object shared its page break vectors with m_pPrintState and recalculated
them for the portrait paper, so the next page read the wrong breaks.
render() now counts the pages once, after the last page.
- "tdf#166107: remove unnecessary resetPrintArea()" added the second
ScPrintFunc, https://gerrit.libreoffice.org/c/core/+/183948
(eccf4cd57a)
- sc::PrintPageRanges kept its results in a shared_ptr and its input by
value. One copy could recalculate the shared result while another copy
still read its own input as a match. PrintPageRanges shares the input
along with the results now.
- added testTdf171366 to check that the print dialog and the page style
split the sheet at the same rows.
Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: Ifa5998278ff899e713b439e33ed04d76f109fbc5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210649
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins
Basically everything needs to live on the m_StreamStateStack.
I dislike pointers, and I (although I am a complete novice at this)
see no reason why SdtHelper should be a pointer
instead of just a normal object.
So I changed it.
I also have no idea whether I have handled this transition
intelligently or not - but a reviewer said it was OK.
[Earlier patchsets left this as a pointer.]
make CppunitTest_sw_ooxmlexport27 \
CPPUNIT_TEST_NAME=testTdf158349_SDTstreamStateStack
Change-Id: I910e232210f0a5ee61f441a782148dab4c557eee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211167
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Always disable line numbering for headers/footers
when importing MS formats.
Copying what was implemented for DOCX in tdf#79738 and tdf#167193
This ultimately just turns off a LO built-in style's default value.
rDoc.FindTextFormatCollByName currently just ends up doing a
UIName.toString as it looks for matching styles,
so the conversion of ProgName to UIName wasn't strictly necessary
at this time, but better to do it right immediately.
make CppunitTest_sw_ww8export4 \
CPPUNIT_TEST_NAME=testTdf79738_footerLineNumbering
Change-Id: Ied7a64bcd43f9a4f0abc5103a0c17e93f651019e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211300
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Always disable line numbering for headers/footers
when importing MS formats.
This fixes a 5.0 implementation error from
commit 5b743ccf8b
tdf#79738 FILEOPEN: Number lines in footer not compatible with MSO
This ultimately just turns off a LO built-in style's default value.
The UNO getStyleByName nicely searches on ProgName and not UIName,
so it is language insensitive which is what tdf#167193 is concerned about.
Whether the style enables bullet/numbering for content is irrelevant
in regards to line numbering (the number of lines on a page),
so everything related to GetListId() could disappear.
make CppunitTest_sw_ooxmlexport27 \
CPPUNIT_TEST_NAME=testTdf79738_footerLineNumbering
Change-Id: If72103a85d00e3e610175c8835c04dae115d5ff2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211295
Tested-by: Justin Luth <jluth@mail.com>
Reviewed-by: Justin Luth <jluth@mail.com>
On at least on macOS, HarfBuzz will not return a glyph for the
Unicode hyphen characters for some fonts such as Courier New
and Apple LiGothic but the native text layout functions will
return the minus character's glyph. So replace the hyphens
with minus to avoid marking the hyphens as needing fallback.
Change-Id: Id6974841e6996dd7d499011ecb20fa35a9cb8646
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210521
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
Replace memcpy() with std::copy_n() to improve type safety by
eliminating manual sizeof() calculations. This is the single change for
the EasyHack as requested in the review.
Change-Id: Ib2d0f84186a126d6cc1a8a1fa296e418853d13ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204347
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
Following tdf#173579 by removing broken dynamic loading of collators,
I focused on Kurdish Latn collation.
Root cause and fix provided by GPT-5.6 Luna
Cause:
when "kmr-Latn-TR", LO uses Language "qlt", Country "TR" (Turkey), Variant "kmr-Latn-TR"
but "kmr-Latn-TR" wasn't used in LOCAL_RULE_LANGS (a variable generated in i18npool/CustomTarget_collator.mk)
and used in i18npool/source/collator/collator_unicode.cxx, method Collator_Unicode::loadCollatorAlgorithm
so "func" and "funclen" weren't initialized with appropriate collator functions.
Fix:
rename file and functions containing "ku" by using "kmr_Latn"
(I suppose the right move since it mimics Eike Rathke's commit 45d4b9b5e3
"renamed ku* to kmr-Latn*, fdo#63460")
Add a specific use case bKmrLatn to load "kmr_Latn" collator functions
to deal with "qlt" language (yes it's a bit kludgy...)
We must remind that "kmr_Latn" can be used for "kmr_Latn_TR" but also with "kmr_Latn_SY"
that's why I avoided using "kmr_Latn_TR"
Also, to avoid the bKmrLatn specific case,
I thought about changing "LangID" tag of i18npool/source/localedata/data/kmr_Latn_TR.xml
from "qlt" into "kmr-Latn" but I'm not sure of the impact.
Change-Id: Ifc608da19b4bd2d05667121e3c6f2455f5d45ca9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210977
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Since the commit below, the minimum required Python version is 3.11 so
any #ifdefs for handling previous versions are no longer needed.
Removing them makes the code easier to maintain.
commit 39cb96f0b6
Author: Neil Roberts <nroberts@libreoffice.org>
Date: Thu Jun 11 18:25:02 2026 +0200
configure: Update the required Python version to 3.11
Change-Id: I40ce6b7453243ec76860a659e7bc087c7d257f87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211290
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
The commit below tried to change pythonloader to set the Python home
using PyConfig instead of setting PYTHONHOME. However, it only built up
the PyConfig locally on the stack and never actually passed it to
Python. This meant that when building with Python versions >= 3.8 the
Python home was never actually set. When using an internal Python, it
ended up printing an error message about not being able to find platform
independent libraries.
commit da0e9240bf
Author: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Date: Thu Dec 21 12:01:50 2023 +0200
tdf#158447 Use PyConfig for setting Python home directory with Python >= 3.8
Change-Id: Ic5b7c60613b22f5215cb1a2a13fecf3e0946ca49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161089
Change-Id: Icda3b0e538b958a04357027c486fd3af17a8fca1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211289
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Writer laid text into a 0.2 cm gap left of a text box, where Word
leaves the gap empty. Word gives up a gap under a quarter inch wide,
measured from the column edge to the object's wrap boundary, when the
other side has at least that much room. Follow the same rule for
documents the Word filters read.
Change-Id: Ifdacbf0469296ade1665fb0b56526301cd19f973
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211280
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
Tested-by: Jenkins
If the intent for opening the document does not have
the MIME type set, use ContentResolver to resolve
the MIME type from the document URI.
On top of previous commit
Change-Id: I6a81dd65e7ef9a233ee9b507c9e133d419cf985c
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Mon Sep 21 14:47:26 2026 +0200
tdf#173650 android: Support opening Markdown files
, this also makes the scenario of opening a Markdown
document work on an an Android AVD with API level 37
(Android 17) when trying to open the file from within
the app ("Select file to open") instead of passing the
file "from outside" (e.g. by opening it from the
"Files" app).
Change-Id: Ie071ce8770155b97dd3a70d26620560a39a7e356
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211292
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Declare support for the Markdown MIME type
"text/markdown" for LibreOffice Viewer for Android.
Similar to CSV, make sure that the temporary file
passed to LibreOffice has a file name ending on
".md", otherwise it is imported as a plain text
file instead of a Markdown document.
This allows opening Markdown files from the Android
file manager ("Files" app) as tested successfully
on an Android AVD with API level 37 (Android 17).
However, when trying to open the file from within
the LibreOffice app ("Select file to open"), the
file is still grayed out and cannot be selected.
This will be addressed separately in upcoming commit
Change-Id: Ie071ce8770155b97dd3a70d26620560a39a7e356
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Mon Sep 21 14:51:38 2026 +0200
tdf#173650 android: Resolve MIME type if not passed in intent
Change-Id: I6a81dd65e7ef9a233ee9b507c9e133d419cf985c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211291
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
On pc Debian testing x86-64 with master sources + clang 21.1,
autogen.sh generates config_host.mk with:
export CC=/usr/bin/ccache clang -std=gnu23
export CC_FOR_BUILD=/usr/bin/ccache clang -std=gnu23
it's because a recent change in autoconf.
The pb is it makes Firebird part building in LO fail.
Add ac_cv_prog_cc_c23=no as a workaround for the moment.
Change-Id: I13f49153e82b4f670fe170ef5df6f072b0c7d336
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211193
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
reproduce by converting novell485609-1.doc to odt and loading the
export, which fails with:
warn:sax:19444:19444:sax/source/fastparser/fastparser.cxx:649: Unexpected exception from XML parser com.sun.star.lang.IllegalArgumentException message: "at sw/source/core/unocore/unotext.cxx:923" ArgumentPosition: 0
Error: source file could not be loaded
#0 SwXText::ComparePositions (this=0x55555962dab8, xPos1=..., xPos2=...) at sw/source/core/unocore/unotext.cxx:923
#1 0x00007fffcb3ae036 in SwXText::compareRegionStarts (this=0x55555962dab8, xRange1=..., xRange2=...) at sw/source/core/unocore/unotext.cxx:965
#2 0x00007fffe7ec5ccc in InsertFieldmark (rImport=..., rHelper=..., isFieldmarkSeparatorMissing=false) at xmloff/source/text/XMLTextMarkImportContext.cxx:196
#3 0x00007fffe7ec7743 in XMLTextMarkImportContext::endFastElement (this=0x5555597140d0, nElement=3804281) at xmloff/source/text/XMLTextMarkImportContext.cxx:434
#4 0x00007fffe7aba6c2 in SvXMLImport::endFastElement (this=0x5555594e8030, Element=3804281) at xmloff/source/core/xmlimp.cxx:1086
CheckForOwnMember made a cursor and took the section node it landed in
as the node this text starts at. createXTextCursor moves forward to
the first content node, so in a cell that starts with a nested table
it lands in that table's first cell.
The fieldmark here is in a paragraph under such a table, so the check
reported it as belonging to some other text.
GetStartNode can be used to do this without a cursor and is apparently
the typical pattern used elsewhere.
see also:
commit 01ce0e62df
Date: Tue Jun 12 06:28:29 2001 +0000
#86004#: performance: check cursor position using start node
which moved insertString onto it, so use it here too, the last of
these checks that still makes a cursor
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I57ba4b23308daa1c0f3d6cb64686bce678f72aa6
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13108
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit b88b52f2694ff696e6141add82fc3c89b64243fc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211294
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Since cb884d1bdf matrix cells ignored the document's AutoCalculate
setting. This caused them to recalculate on cell access while normal
formulas waited for a recalc.
Exempting only follow-up cells does not work either. They can read a
stale matrix from the origin and clear their dirty flag.
Drop the exemption entirely. F9 enables AutoCalculate, so ScMatRef
recalculates the origin when needed.
Change-Id: Ie7e9c05d7a74f92672180c64f0b154f03babdfa5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211287
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins