100 Commits
Author SHA1 Message Date
Michael Stahl 8544ad1714 readlicense_oo: fix typo in href
Change-Id: I435ccefc08d00a12dca16d865ddf48c9b0690090
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186904
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-06-24 19:07:15 +02:00
Michael Stahl b28efcf06f LOCRDT y-crdt: bundle as external
Unfortunately it has 144 dependencies so hack Makefile.fetch to invoke
cargo fetch to get them all at once, based on the Cargo.lock file
extracted from the tarball; this all ends up in a "cargo" subdirectory
below $TARFILE_LOCATION.

Then $CARGO_HOME must be set consistently in the ExternalProject file
and cargo invoked with --offline to prevent downloading during the
build; altogether uses about 720 MB of storage here.

Change-Id: I6126fdd988f12bf9da48b6c2d9123d349eb7cb96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186903
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-06-24 19:06:51 +02:00
Michael Stahl 88055a2f43 LOCRDT editeng: adapt to yrs v0.23.4 API change
Change-Id: I957cdaa770f34c48ca1283f6d0f3b89d66064f8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186902
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-06-24 19:06:42 +02:00
Michael Stahl 2cd2ea6cc0 tdf#166602 editeng: fix painting cursor in vertical text
The size is relative to the top right.

(regression from commit 34cf82953c)

Change-Id: Id0e63e40c580a4b700cc09b476bd8bc9f60aa368
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186823
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-06-23 15:05:38 +02:00
Michael Stahl 094480aefa LOCRDT sfx2,sw: Undo
Finally, add the comment id to SwPostItField too, so that undo actions
can recreate the comment with the same id.

Ensure that all inserted comments have an id (including via UNO API) so
that the Undo can record it (SwHistorySetTextField/SwUndoAttr).

Also this requires a more careful management of committing the
YTransaction, to distinguish between creating new Undo stack items and
extending the existing one.

Change-Id: I986264dee956ec4b219ab8c7148d44fee4bbfa2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185866
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-06-20 18:44:16 +02:00
Michael Stahl 0322f4c69d sw: Navigator: fix SwPostItContent::m_pField UAF
ASAN reports UAF on SwPostItContent::m_pField and it's apparent that the
only thing that removes a SwPostItContent from the Navigator is a timer.

Clearly it becomes invalid when the SwFromatField that m_pField points
to is destroyed, so implement a listener for this and try to add some
null checks on uses to avoid crashing. (Doesn't look obvious how to
remove it from the tree immediately.)

Change-Id: Iad94ddb923f0126b5e6d76d0b77dc26043cefaba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186654
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-06-19 17:14:57 +02:00
Michael Stahl c3974de96f tdf#159549 offapi: clarify docs of css::style::StyleFamily
Change-Id: I5391968e93bb28f0c5fc2c41673d4c6df344bfa6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186653
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-06-18 16:05:44 +02:00
Michael Stahl f5d48df735 tdf#159549 tdf#166850 sw,xmloff: fix localised STYLEREF differently
SwXTextField must for the "SourceName" property convert from ProgName to
UIName on setting and reverse on getting, for consistency with the rest
of the sw UNO services.

This is annoyingly complicated because the "sPar1" of SwGetRefField is
used for numerous other purposes, including a bookmark name.

Revert writerfilter changes of commit 80877c7dc4
but keep the test.

With de_DE locale we now get "Überschrift 1 (user)" cloned style (same
as the reverted fix), and exported to ODF as "Überschrift 1"; the ODT
works when loaded both with the same and a different locale.

Unfortuantely an ODT created by versions on the 24.2 branch >= 24.2.4,
which used to work being loaded in the same locale but not in a
different one, stops working when loaded in the same locale with this,
so add an incredibly ugly flag to SwDoc because no SvXMLImport etc can
be accessed from SwGetRefField.

Move testTdf160402 to the new ooxmlexport26 because it also failed with
de_DE locale.
(regression from commit e45f187870362ed4448f4a9fb96883b8431887fb)

Change-Id: I6b7862f142d602544165d8b5a254bf8af28e527b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186228
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-06-17 18:42:46 +02:00
Michael Stahl f80b4a4557 LOCRDT sw: return EMPTY from EndUndo() if no action inserted
Apparently code in inputwin.cxx already checks for this.

Change-Id: Iaae1b8894b421d8d7bf7b22908abd6cfbf265690
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185865
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-05-28 13:17:34 +02:00
Michael Stahl d3235480c5 LOCRDT sfx2: only connect with env var YRSCONNECT
Change-Id: Icf5d5d0c647260febd2b3c8cee626ca50833aefe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185330
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-05-20 09:42:22 +02:00
Michael Stahl 1724c2fe47 LOCRDT sw: fix undo of deleting comment
CppunitTest_sw_uiwriter4 CPPUNIT_TEST_NAME="testRedlineViewAuthor"
fails because Undo of deleting a comment doesn't add it back to the yrs
model

Change-Id: Ib8d559799a350d7d12caadcde1630ab904211b4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185425
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-05-16 20:34:42 +02:00
Michael Stahl 5f0f477f7a LOCRDT sw: fix crash on deleting comment in hidden text
CppunitTest_sw_mailmerge CPPUNIT_TEST_NAME="testMissingDefaultLineColor"
calls RemoveInvisibleContent() which deletes a comment and there are 2
problems:

1) the comment doesn't have an SwAnnotationWin because it's in hidden
   text - so YrsRemoveComment needs to be able to find it with only the
   anchor position, as the comment id is only available from EE

2) the comment wasn't even inserted via YrsAddComment; not sure why,
   presumably because it was inserted via insert file?
   Ignore this for now, just avoid crashing...

Change-Id: Id1e925911ef35d230ad5e35df3ebfdcfbb734558
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185421
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-05-16 20:34:34 +02:00
Michael Stahl 4ec57814fa LOCRDT sw: more test failures
* CppunitTest_sw_a11y CPPUNIT_TEST_NAME="TestMenuInsertPageBreak"
  missing type check in SwFieldMgr::InsertField()
* CppunitTest_sw_odfexport4 CPPUNIT_TEST_NAME="testTdf160877"
  inserts stuff from SwEditShell ctor so there's a shell calling
  YrsNotifyCursorUpdate() which isn't a SwWrtShell yet...
* CppunitTest_sw_uiwriter5 CPPUNIT_TEST_NAME="testImageCommentAtChar"
  triggers assert in YrsAddComment() by intentionally adding annotation
  mark with start == end

Change-Id: Ic619b7188c63d30b63916976870c74da10e8c4cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185418
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-05-16 20:34:23 +02:00
Michael Stahl 6b6776070b LOCRDT sw: deactivate active comment when fly is selected
CppunitTest_sw_uiwriter5 CPPUNIT_TEST_NAME="testImageComment" fails
because it inserts a comment, putting the cursor into the comment, then
selecting an image, putting the sw cursor onto the SwGrfNode, but the
active comment remains active, hence later the selection type is PostIt,
not anything fly related as it should be.

This appears to be a general problem and the test worked by accident before.

Change-Id: Ic49b46d16cd2412e379015f10fe4fc7224efbd80
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185409
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-05-16 18:10:59 +02:00
Michael Stahl 93fe03c059 LOCRDT sw: fix multiple view shell problems
CppunitTest_desktop_lib testCommentsCallbacksWriter uses 2 view shells
to insert comments.

The first problem is that SwTextNode::Update() avoids moving the wrong
(i.e. current shell's) cursor, because it uses SwDocShell::m_pWrtShell
to check if it's the current shell, but only
DocumentLayoutManager::mpCurrentView has the correct value.

The other problem is that SwViewShell::GetPostItMgr() also uses
SwDocShell::m_pWrtShell and so doesn't return its own m_rView's one,
hence a loop over all shells always uses the same SwPostItMgr.

Change-Id: I043602f88f2f458532224554e5c13de7d37081c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185400
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-05-16 16:10:29 +02:00
Michael Stahl 55793ae8c8 LOCRDT fix conditional compilation
Add a config header for this, and split yrs.hxx in two because the
actual libyrs.h is only needed in 2 files.

Change-Id: I30453fda3082f977e328ed56a4a101743ecdd586
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185329
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-05-15 09:24:48 +02:00
Michael Stahl 4727305dd2 LOCRCT editeng,sfx2,sw: replace temporary SAL_DEBUG
Change-Id: Ib6f3b732a7eb6f2dbf423ffd2206b0474ff6c681
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185200
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-05-13 10:00:31 +02:00
Michael Stahl ee7ab3d463 LOCRDT editeng,sw: yrs weak link peer cursors for editengine
Replace unreliable integer cursors with WeakRef cursors which maintain
their position automatically.

This requires yrs v0.23.1 with the yweak_read() function.

Unfortunately this crashes currently, so hide it behind #if YRS_WEAK.

https://github.com/y-crdt/y-crdt/issues/536

Change-Id: I74ec1eaa25c7cb554efd38ee632df041ac92d5c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183311
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-05-13 10:00:20 +02:00
Michael Stahl 0ff4c66190 LOCRDT editeng,sw: yrs peer cursors for editengine
The cursors are represented as integers in yrs as a first step, which
isn't ideal.

Surprisingly EditView doesn't really have functions to correct the
cursor, only ImpEditEngine::UpdateSelections() for the case when nodes
are deleted, apparently there's only one active EditView at a time
typically so it wasn't needed?  Typically the active EditView's cursor
is assigned from a return value of ImpEditEngine.

Add some new functions to correct peer cursors and call them all over
ImpEditEngine; unfortunately UpdateSelectionsDelete() isn't easy to get
working on EditView's actual EditSelection cursor so leave that for the
future...

To fix EE paint of non-active comment, add SwAnnotationWin::Paint()

To get things to paint with "gen", it's enough to invalidate the
SwAnnotationWin, but for gtk3 a queue_draw() must be called, else it's
only painted when clicking on the window.

Cursors are painted in color in SidebarTextControl::Paint()

Change-Id: Id8696238290405554ece1b9961676972a559b58e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181679
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-05-12 11:33:51 +02:00
Michael Stahl 910ccfe6a3 LOCRDT sw: yrs peer cursors
Factor out a class sw::VisibleCursorState containing all data required
for a peer cursor.

Let SwCursorShell::UpdateCursor() etc correct also the peer cursors
locally in the sw shells, else the cursors will be painted in the wrong
place; every peer updates its own cursor in the yrs model.

Split SwVisibleCursor::SetPosAndShow() into 2 functions, to find the new
position, and actually paint things.

Peer cursors are not VCL cursors (they don't need to blink) but painted
in SwSelPaintRects::Show() in color via drawinglayer.

Change-Id: I21ae8cb3fd76759a10b5c226cf3294a5c9fc6451
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180900
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-05-08 14:45:23 +02:00
Michael Stahl af81946e31 LOCRDT sw: fix bug when removing comment before start anchor
Missing remove before insert.

Change-Id: I7072456b96b3137380e27be1e62239b59ac30b23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185017
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-05-08 14:44:36 +02:00
Michael Stahl 8f8034177b LOCRDT editeng,sfx2,sw: experimental yrs collab
This can be enabled in configure via --with-yrs=...; see also README.yrs

Currently this is hardcoded to run over a local named pipe.

Everything related to editengine is implemented in EditDoc and made
accessible via its wrapper classes; everything related to communication
and accessing sw's comment is implemented in sw::DocumentStateManager.

The acceptor starts in SwView::SwView(), once SwPostItMgr exists.

There is a hack in SfxFrameLoader_Impl::load() to fetch the document
that the accepting soffice has loaded, and load it in the connecting
soffice as well.

Change-Id: I89476b5864b70f479bcf15989374c1c65b5da9ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175652
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-05-07 13:36:01 +02:00
Michael Stahl 2753c21abe sfx2: warn user before saving doc with scripting signature encrypted
The pre-ODF 1.5 encryption necessarily destroys macro signatures, but
the user would learn this only when re-loading the encrypted document.

Change-Id: Ic8a0190205412f484f47a4b8d864b280eea0d23c
(cherry picked from commit 558c6a83c210a4d9d7a699616c6f254fb23d7cf4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184822
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-04-30 16:40:34 +02:00
Michael Stahl 91b297730b tdf#166040 package: ZipFile::recover() find DD without PK78 signature
The PK78 signature is optional, and if the sizes in the local file
header are 0 then without the DD the recovery won't do anything useful.

If the latest local file header has the DD bit set in flags, then try to
find the DD before the next thing that has a PK?? signature.

Change-Id: I149a87805f7bcb6216fc909c20ece600ce77956d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183722
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-04-04 20:35:45 +02:00
Michael Stahl 4995811d0d tdf#166040 unordf: fix assert when importing empty stream
rdf_parser.c:592: (librdf_parser_parse_counted_string_as_stream) assertion failed: string length is not greater than zero

Check for this in librdf_Repository::importGraph()

Change-Id: I27e180fd2fc09c5f43b7fdfcc7faa184bdc0808a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183721
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-04-04 19:53:59 +02:00
Michael Stahl 34cf82953c editeng: extract ImpEditView::ImplGetCursorRectAndMaybeScroll()
... to separate it from the VCL-Cursor/LOK logic.

Change-Id: I60f533630e6c55e832d1471c1512d6651107d5a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183310
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-04-04 16:16:13 +02:00
Michael Stahl 8b4a7ea0ac svx: flatten WeldEditView::DoPaint()
Change-Id: I411bcc24400a18fc64c901dba3a0cde0187786e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181678
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-04-04 16:16:05 +02:00
Michael Stahl 79ed1d0dda svx: factor out WeldEditView::PaintSelection()
Change-Id: I51b71b20f6bb2b0e86611a052221f1e3785c84d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181677
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-04-04 13:06:58 +02:00
Michael Stahl a3a59876a4 editeng: factor out ImpEditEngine::UpdateSelection()
Change-Id: Ia6f694a813ad30aadf159db0f75fb1a86e9663dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181676
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-04-04 13:06:48 +02:00
Michael Stahl 46000e9db4 svx,sw: when replying to comment, set parent ids immediately
... and not after insertion is already finished.

This requires 3 new slots because SwWrtShell::InsertPostIt() takes a
SfxRequest...

Then SwInsertField_Data needs another different temporary representation.

Open question is why does a comment need to have 3 different ids.

Change-Id: Ie655c4f089240b8407c52288b2f96653299665c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183686
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-04-04 13:06:38 +02:00
Michael Stahl e8cbd4f14a sw: use same line height as Word for paragraphs empty due to hidden text
If paragraphs are merged by hidden paragraph end markers, and all of the
text in the paragraphs is hidden by character formatting, then Word will
use the formatting of the end marker of the last paragraph to calculate
the line height; Writer would use the formatting at the position where
the last portion of hidden text ends, which may be in an earlier
paragraph.

Change-Id: I1e8c5676d7330c383521755c736828fdc42e4217
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183622
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-04-02 15:52:26 +02:00
Michael Stahl 40f093ae2c solenv: gdb: add Region prettyprinter
Works for RegionBand, which is the common case apparently.

Change-Id: I1b26f6ff8486094003685522ed23e44c2040db6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183621
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-04-02 15:51:57 +02:00
Michael Stahl 8c548d46f4 tdf#165851 sfx2: fix loading template with expand URL from configuration
Expand trusted URLs from configuration or extension.

(regression from commit 836d73a651)

Change-Id: I7c2f8a59b44ae62e25ac26eb568f3f80c77a01ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183206
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-03-21 17:24:54 +01:00
Michael Stahl 59a18d3c3c tdf#165694 package: log specific message for missing data descriptor bit
Guess based on size of holes.

Change-Id: I6209844dd74164fa56329df8f31eb40664b2b7e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183062
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-03-18 14:37:56 +01:00
Michael Stahl 04ef40cb60 (related: tdf#164945) writerfilter: RTF import: try to fix more cases
Presumably bufferProperties() calls for stuff that is inside paragraphs
(fields, bookmarks, annotations, tracked changes) should use
LN_Value_ST_StyleType_character to avoid overriding paragraph properties.

Change-Id: Ida4a6e930af7515161289de505f546e496e39799
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182836
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-03-13 11:38:39 +01:00
Michael Stahl 1a7346e7f1 tdf#164945 writerfilter: RTF import: fix erroneous default paragraph...
... properties in empty table cell.

The problem is that for an empty table cell, there is a sequence of
buffer entries SETSTYLE, PROPS, SETSTYLE, PROPS, and the 2nd PROPS
sets a default value of the LN_CT_PrBase_pBdr SPRM, and that overwrites
the \brdrs value that was contained in the 1st PROPS.

All these buffer entries originate in \cell handler, which must use
ST_StyleType_character when buffering the character properties, then no
paragraph properties will be generated in getProperties() for the 2nd
PROPS.

(regression from commit 6f42a2c863)

Change-Id: Iefb939d8d8dace6dc58cb665b4bd1575f09701c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182835
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-03-13 11:38:30 +01:00
Michael Stahl 7a9a1e8ef5 sw: layout: hide text frame before table like Word
There are several empty paragraphs before a table, all have the
paragraph end marker hidden, and the first one is preceded by a section
break, which is represented as a break item on the first text node in
Writer.

Word hides the paragraphs, so that the following table starts at the top
of the page.

Writer merges the paragraphs into one text frame, but it is not
considered hidden because it doesn't contain any hidden characters; if
you insert a character into a paragraph, the merged text frame will
disappear!

The first idea was to adapt SwTextFrame::IsHiddenNowImpl() to check if
there isn't any text in the text frame and the paragraph end marker is
hidden.

But it turns out that the problem is more general: it's a problem of the
sw_redlinehide merging, because an un-merged paragraph is hidden via a
check of RES_CHRATR_HIDDEN in SwScriptInfo::selectHiddenTextProperty().

It's a bit nonobvious why this didn't work, and how it would interact
with delete redlines, but 2 problems are that the case of the empty text
frame needs a special case handling to get to this check in
selectHiddenTextProperty(), and then GetBoundsOfHiddenRange() doesn't
assign its outparameters in the special case of the empty paragraph; it
looks like the values in m_HiddenChg should be 0, 0 then.

Change-Id: I2ba85e98c02fb69159ee7ba77a7e4694fdf6fd52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182642
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-03-11 12:48:35 +01:00
Michael Stahl 9cef7e5ba5 tdf#161583 vcl,sc,sw: PDF/UA export: fix Contents of Link annotations
In ISO 14289-2:2024 the requirement was changed from "shall" to "should":

  Link annotations should include a Contents entry to enrich information
  available to assistive technology.

There is also now a Well-Tagged PDF (WTPDF) Version 1.0.0, which says:

  8.9.2.4.2 Link

  Link annotations should include a Contents entry to enrich information
  available to assistive technology.

  NOTE 1 Link annotations are often accessed out of context; the Contents
  entry provides optional additional information. The Contents entry is also
  particularly valuable in the context of link targets that are not intended
  to be human-readable.

  EXAMPLE — A link over the text “click here” is improved by a Contents entry
  to advise the user regarding the link’s target.

So adapt PDFWriterImpl::emitLinkAnnotations() to produce "Contents" only
if there is some alt text.

The sw a11y check will already warn if the alt text/"name" is missing on
a hyperlink in a SwTextNode, and a previous commit added a warning if it
is missing on a hyperlink in a SwFlyFrameFormat.

Contents should in any case not contain the textual representation of
the hyperlinks, that was a misunderstanding, but describe the target of
the link.

This requires adapting numerous unit tests.

(regression from commit fa3f04bdd4)

Change-Id: I88a7ae83d17d781115c93152d267ddb57208c200
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182600
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-03-06 20:51:25 +01:00
Michael Stahl 7ada3b1012 sw: fix testTdf165354_column
XPath '/root/page[1]/body/txt/section/column[2]/body/txt/SwParaPortion/SwLineLayout[1]' not found

(regression from commit e79e12484f)

Change-Id: I52a520dfef2a06efacd65556bb1780f05871c7a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182599
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-03-06 20:51:16 +01:00
Michael Stahl 8bf8873f30 tdf#161583 drawinglayer,editeng,svx,sd: add "Name" to SvxURLField ...
... and use for PDF export, instead of the representation, which appears
to be wrong.

Strangely the Hyperlink dialog already allowed to insert a Name, but it
was not actually set in the document.

(regression from commit fa3f04bdd4)

Change-Id: Ic21bbe8ead9f85dfbe0827b0051ecb68aeff0beb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182597
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-03-06 19:16:28 +01:00
Michael Stahl 5445e9de41 tdf#161583 sw: a11y check: warn about flys with RES_URL with no "name"
Fly frames can have hyperlinks too.

Change-Id: I80da4b53e44e6f82a4f37f4b2aa859b8475b452a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182577
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-03-06 16:24:41 +01:00
Michael Stahl e5dbde2aab tdf#165586 sw: fix accessibility sidebar with gtk3
No issues are shown.

(regression from commit fe8ef5ec07)

Change-Id: Ic9d6a9f64613f2f5d50a8acdb4b460f3567380b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182542
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-03-05 17:48:51 +01:00
Michael Stahl 641cb041a5 tdf#165351 sw: fix crash after Undo of inserting table row...
... if an existing row of the table has a drawing object anchored to it
as character, and the table is in a fly frame.

The problem is that the SwTextFrame inside the table cell doesn't have
the mbInfFly flag set, because SetInfFlags() was called too early, when
the frame was attached to its SwCellFrame but the SwCellFrame didn't
have an upper yet:

 0  SwFrame::SetInfFlags () at sw/source/core/layout/findfrm.cxx:1600
 1  SwFrame::IsInSct () at sw/source/core/inc/frame.hxx:1009
 2  SwFrame::FindSctFrame () at sw/source/core/inc/frame.hxx:1178
 3  SwFrame::IsHiddenNow () at sw/source/core/layout/trvlfrm.cxx:1734
 4  SwTextFrame::IsHiddenNowImpl () at sw/source/core/text/txtfrm.cxx:1514
 5  SwTextFrame::Prepare (ePrep=PrepareHint::FlyFrameAttributesChanged) at sw/source/core/text/txtfrm.cxx:3031
 6  SwAnchoredDrawObject::InvalidateObjPos () at sw/source/core/layout/anchoreddrawobject.cxx:595
 7  SwFrame::AppendDrawObj () at sw/source/core/layout/fly.cxx:2803
 8  AppendObj () at sw/source/core/layout/frmtool.cxx:1079
 9  AppendObjsOfNode () at sw/source/core/layout/frmtool.cxx:1277
 10 AppendObjs () at sw/source/core/layout/frmtool.cxx:1330
 11 InsertCnt_() at sw/source/core/layout/frmtool.cxx:1666
 12 SwCellFrame::SwCellFrame () at sw/source/core/layout/tabfrm.cxx:5729
 13 SwRowFrame::SwRowFrame () at sw/source/core/layout/tabfrm.cxx:4627
 14 lcl_InsertRow () at sw/source/core/frmedt/tblsel.cxx:2053
 15 FndBox_::MakeFrames () at sw/source/core/frmedt/tblsel.cxx:2402
 16 SaveTable::CreateNew () at sw/source/core/undo/untbl.cxx:1100
 17 SwUndoTableNdsChg::UndoImpl () at sw/source/core/undo/untbl.cxx:1783

Reset flags in InsertCnt_().

(regression from commit 0a3f5169ac)

Change-Id: I048196278b314ea516bd5a4877b3e86f696dfce0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182367
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-03-03 12:57:18 +01:00
Michael Stahl 0be897258b tdf#165115 sfx2: fix storing wholesome encrypted ODF templates
Oops, hard-coded SetupStorage(bTemplate=false) which caused wrong
MediaType on the root folder and:

  ManifestExport.cxx:131: ManifestExport::ManifestExport(): Assertion `aDocMediaType.isEmpty() || aDocMediaType == aMediaType' failed.

(regression from commit 3b347664b2)

Change-Id: Ia65ba39e8a853f47d0d58acdca90fd6e12b7cd7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182372
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-03-03 12:33:02 +01:00
Michael Stahl 154b58cfd7 sw: layout: fix truncation of table in section
There is a table in a section, split across 2 pages; now insert a page
break that moves the section to page 2.

In SwTabFrame::MakeAll(), on page 2, first the follow is joined, which
grows the table frame but shrinks the section frame (removing the
follow's height), then the table's upper is grown to LONG_MAX but with
bTst=true so it doesn't actually change or invalidate the section frame,
then in lcl_RecalcRow() almost no growth happens because the table
frame already has accounted for the height of most of the table content.

The section frame remains too small for the table, and the content is
truncated... this problem can already be reproduced in OOo 3.3.

When GetUpper()->Grow() returns some space, invalidate the upper if it's
a section frame, then the next round will format the section.

(Simply calling Grow() with bTst=false results in an opposite problem,
where the section is too large.)

Change-Id: I3cb3a5a38fbd7996fa9fcea9a6036f4260451a95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182331
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-02-28 10:58:27 +01:00
Michael Stahl d09f3f24c3 tdf#165330 writerfilter: fix import of redline in paragraph after frame
The flag m_bIsActualParagraphFramed is reset only in
ExecuteFrameConversion() which is called at the end of the paragraph
that follows the one that is in the frame, so all redlines in that
paragraph were erroneously moved to the frame; reset it when a paragraph
ends, if the next paragraph is also in the frame it can set the flag
again.

(regression from commit e8bae67b3d)

Change-Id: I75a18d2e7b600737958e984c135ebf6201e6f979
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182181
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-02-25 18:08:53 +01:00
Michael Stahl b3567d7e1f tdf#165322 sw: apply formatting for multiple redlines in SwRedlineItr
SwRedlineItr::Seek() assumes that redlines don't overlap, but sometimes
they do, at least a ParagraphFormat and a Delete redline can overlap
(unsure if that is a good idea) when imported from DOCX.

Change-Id: Ic13080bfe8c9910ffef44f3e48d11c7f852427ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181961
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-02-25 12:54:22 +01:00
Michael Stahl f439448d21 tdf#165322 sw: prefer insert/delete redline in mouse-over tooltip
Unfortunately SwCursorShell::GetContentAtPos() can only report 1 redline
for a given position; in case there is a format and a insert/delete
redline at the same position, the latter is more important.

This is then used in SwEditWin::RequestHelp() to display a tooltip if
the user moves the mouse cursor over a redline.

Change-Id: I32af7a154873e3fa5775a711980bb3dab3e307ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181960
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-02-25 10:52:03 +01:00
Michael Stahl c5f7619d6e tdf#165322 sw: GetRedline() binary search doesn't work with overlaps
Change-Id: I6d7a271eb96f55abdd6d53a153b277083868109b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182117
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-02-25 10:51:36 +01:00
Michael Stahl bbef5782b6 sw: fix some comments
Change-Id: If941bcab2fd9c9cfd1822842171e1361b857688e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181959
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-02-21 10:28:38 +01:00
Michael Stahl 21bc6e075d sw: fix bug with redline following fieldmark or hidden break
It is now possible for HideIterator to move to another node without a
redline being involved, but if this happens and there was no redline on
the previous node, GetRedlinePos() had already returned
SwRedlineTable::npos and now no redlines can be found in the new node.

(regression from commit 657de5fba1)

Change-Id: I536b2660c97501be896203403cdd5e2f2015e816
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181946
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-02-20 18:24:37 +01:00
Michael Stahl 8712673a44 sw: use same paragraph properties as Word for hidden text
This is a follow-up to commit 2bcfb7231b
"tdf#152872 sw: conditionally hide paragraph breaks".

Word determines the paragraph properties differently depending on
whether paragraphs are merged by hidden text (where the first paragraph
containing non-hidden text wins) or delete redlines (where the last
paragraph wins).

This fixes the hidden text situation while leaving the delete redline
situation as it is.

The problem is that CheckParaRedlineMerge() only considers hidden text
on the paragraph end marker (RES_PARATR_LIST_AUTOFMT) but not elsewhere
in the paragraph, so there are extents for the hidden text.

The actual hiding of that is done via ScriptInfo::m_HiddenChg, which
cannot be removed and replaced by merging because it is required for
Writer's notion of hidden paragraphs in SwTextFrame::IsHiddenNowImpl().

* FindParaPropsNodeIgnoreHidden() skips over nodes that contain only
  hidden text in case hidden text isn't shown

* factor out ScriptInfo::InitScriptInfoHidden() because it is now needed
  to find the pParaPropsNode, but the rest of InitScriptInfo() requires
  the pParaPropsNode...

* testTdf152872 requires changes as it was relying on ControlCharacters
  alone toggling the merging

list of commits that tweaked setting pParaPropsNode:
58353884dc (related: tdf#130685) sw: adapt definition of sw_redlinehide index 0
b86ff2c6a8 tdf#118699 sw_redlinehide: need some more changes to use the last node
fa5eb82b39 tdf#118699 change tracking: don't number empty lines
beec159458 tdf#125319 sw_redlinehide: handle empty paragraphs more like Word
c20308f1b9 sw_redlinehide_4b: surprising discoveries

Change-Id: If0e49a4d105dbf7d71e753967f36f2ec56f21f1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181918
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-02-20 17:27:12 +01:00
Michael Stahl ee482e8561 tdf#159029 sw: layout: fix cell vertical orientation after split
The vertical alignment of cells is implemented in SwCellFrame::Format(),
but it is disabled if IsRebuildLastLine() is true (apparently since the
time when splitting table rows was first implemented in commit
90b73c7b66 "INTEGRATION: CWS cellbreak")
which is in 2 different cases:

1. when another line fits on the page, around a call to
   lcl_RecalcRow(pLastLine) after RemoveFollowFlowLine() - this is the
   relevant case when the paragraph is deleted

This case used to work by accident before commit
068c133ac4, when after
RemoveFollowFlowLine() of row 406 the text frame moved to the top, then
a Split of the row after the one containing the last part of the merged
cell with the problem was attempted and failed, and in lcl_RecalcRow()
after the Split the alignment was fixed; this commit changed it so that
the first row frame 6 had an invalid position, which caused an earlier
correction of the position of all the cells and text frames during the
lcl_RecalcRow() after joining the follow, where m_bIsRebuildLastLine was
set.

2. after a successful Split() with bTryToSplit=true, i.e., a row was
   split - this is the relevant case on Undo of the paragraph delete

This actually was a problem already before the above mentioned commit,
but then it could be "fixed" by clicking on the cell, which stopped to
work.

Here there is no RemoveFollowFlowLine() at the start, but then again a
failed attempt to Split a row followed by a successful Split between
rows; before the 2nd Split the text frame is correctly positioned and
valid, but then lcl_RecalcSplitLine() calling
lcl_ShrinkCellsAndAllContent() moves the text frame up.

In both cases, explicitly invalidate the PrtArea of cells in the last
row where a vertical orientation is set.

(regression from commit 068c133ac4)

Change-Id: I7d2e85bb76a4b77c7871d759abbebd6abeb31282
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181113
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-02-04 15:42:03 +01:00
Michael Stahl b0d4b4664a tdf#158198 sw: prevent xBookmark.getAnchor().setString("") from deleting
... the bookmark.

Add a RANGE_IS_BOOKMARK to SwXTextRange and special case setString() so
that it will do a replace, not a delete, to prevent the bookmark from
being deleted.

SwXBookmark::getAnchor() will create such a SwXTextRange.

Bookmarks may be in table cells of course so we need RANGE_IN_CELL to be
a flag now so it can be used with 2 different enum values.

(regression from commit baf8d2c1c1)

Change-Id: I69169b9a5f6f7525715122b16de009c894246bef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180985
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-01-31 13:54:36 +01:00
Michael Stahl 163ddd7a84 tdf#158221 sw: fix performance disaster in SwInsertBookmarkDlg
Moving the shell cursor without Start/EndAction results in formatting
and repainting for every bookmark :(

(regression from commit aa6ec3f796)

Change-Id: I2eb77a7a6aa48a1f218957245d75399bddb594ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180965
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-01-31 10:54:46 +01:00
Michael Stahl 3227660e55 (tdf#159377 related) sw: fix undo of table pasted in middle of paragraph
The problem is that the !bCanMoveBack path doesn't work if the insert
position's content index isn't 0.

(regression from commit fcd4222d36)

Change-Id: I746db2187ab8f2e24eb694dc94d7eea9f50e2d9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180948
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-01-30 16:33:13 +01:00
Michael Stahl 3bbbe366e4 tdf#159377 sw: fix undo of paste table into footnote
Tables aren't allowed in footnotes, hence pasting a table into a
footnote will paste only the text nodes in the cells but not the table
nodes.

This code isn't prepared for this situation, so the adjustment of the
position doesn't happen.

        if (pCopyPam->GetPoint()->GetNode().IsStartNode())
            pCopyPam->GetPoint()->Adjust(SwNodeOffset(-1));

But then the corresponding adjustment in SwUndoInserts::SetInsertRange()
does happen and the stored start node index is wrong.

It looks like both of these adjustments can simply be removed.

(regression from commit fcd4222d36)

Change-Id: Ib419b29da552cf1df7150178924c45e3743cd7d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180947
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-01-30 16:33:04 +01:00
Michael Stahl ff16c4e3f2 tdf#158867 offapi,i18npool,starmath: fix "," in Math again
This is essentially the same bug that was fixed in commit
2caa9d7ddc "Resolves: tdf#127873 accept
',' comma group separator in number entities again".

The problem is that sw wants to recognize group separators only if there
are 3 digits following so it really looks like a number (see bug
tdf#42518), but starmath really wants to recognize either comma or dot
as a decimal separator and uses the GROUP_SEPARATOR_IN_NUMBER as a hack
to get this behaviour, so the same parser can work in any locale.

Introduce new constant GROUP_SEPARATOR_IN_NUMBER_3 so that sw and
starmath can request different parsing.

sc/source/core/tool/compiler.cxx also uses GROUP_SEPARATOR_IN_NUMBER and
it's unclear to me what is desired there, but there are no known
regression reports so leave the behaviour there unchanged.

(regression from commit 1bd9a51b826015746069fcc0d02a30a2ddc7e7f5)

Change-Id: Icb7662f26d89677cf84ccad07a2ea4c380587ab4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180920
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-01-30 16:32:41 +01:00
Michael Stahl b5967157b3 tdf#156348 sw: fix crash on converting text to table with SwSetExpField
The problem is that the table node only gets a SwFrameFormat assigned at
the end of the operation after all the nodes have been split etc., and
moving a field into a newly split node calls
sw::FindNeighbourFrameForNode() which needs to handle table node without
SwFrameFormat now when going backwards (not when going forwards because
the table node is always before the nodes in the table).

(regression from commit 9dc6e2c906)

Change-Id: Ia0c1f7d7b14f525aa8de4a2b6492c39b59f31052
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180914
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-01-29 19:43:42 +01:00
Michael Stahl f747378c4d sw: layout: fix loop with table at the end of a section
There is a table alone in a section, and there are 2 rows in the table,
with the 2nd row split across page 1 and page 2.

Due to space for another line of text being available, the table frame
first does RemoveFollowFlowLine() etc and grows much higher than the
section frame upper.

Then in SwTabFrame::Join(), the section frame on page 2 is destroyed via
SwSectionFrame::DelEmpty() so the section frame on page 1 doesn't have a
follow.

Then a SwTabFrame::Split() happens, and lcl_ShrinkCellsAndAllContent()
ends up shrinking the section frame to 0 height (because there is no
follow currently seen by SwSectionFrame::ToMaximize()), which is wrong
as there is a 1st row in the table, so the table is still height 3712.

If the table is directly in the body, then this works because the body
frame doesn't shrink or grow.

Then when the text frame in the 2nd row is formatted, it can't grow
because SetRestrictTableGrowth(true) was called as a follow flow line
exists, and in SwTabFrame::GrowFrame() nReal is -2777 due to the
SwTabFrame being higher than the upper; the result is that the text
frame is the same height/split at the same line as before
SwTabFrame::MakeAll().

Then the whole thing happens again until eventually
warn:sw.layout:875613:875613:sw/source/core/layout/layouter.cxx:194: Looping Louie: Stage 1!

Try to detect situation of too high table in section and propagate
Shrink only until the section is the same height as the table.

Change-Id: If4b6db8b03d93a3227ad223203f2b0c3f73d3cc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180857
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-01-29 16:02:26 +01:00
Michael Stahl 225ce4b678 sw: layout: fix bad split table resulting in empty cell
The problem is that the table goes into an infinite loop of splitting
and joining, because there is a temporarily negative PrtArea height in
the top row's cells (-170), because of setting all heights to 0.

This causes an inconsistency where it is first joined because in
ShouldBwdMoved() another line of text in the right column cell can move
backward, but then there isn't enough space for another row as the
negative cell PrtArea height is added to the available space and so the
line won't fit in SwTextFrameBreak::IsInside(); the same situation
occurs until a "Looping Louie" aborts the iteration with a bad result.

This is somehow caused by the hidden section following the table, but
not sure how exactly (the "if (pNxt->IsHiddenNow()) bCalcNxt = false"
suspect code was actually added in a later commit).

Prevent it by preventing negative PrtArea heights.

(regression from commit 0c96119895)

Change-Id: I36ce8a8bf750cf407cece5ad3cc23374182179de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180719
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-01-24 20:22:56 +01:00
Michael Stahl f8126c5d93 sw: HTML import: apply hard formatting at insert position ...
... even if the paragraph style contains the same item, but with a
different value.

Surprisingly, SfxItemSet::Differentiate() doesn't actually compare if
the items in the 2 sets have the same value, just that 2 items with the
same WhichId exist.

Also, apply paragraph attributes, except list and breaks and other ones.

(follow-up to commit f45d2fa85b)

Change-Id: I1e11705f63c1f059e2f5baa658238f2d62f6c66c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180422
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-01-20 11:42:51 +01:00
Michael Stahl 2b50dc0e44 redland: disable all raptor parsers except for "rdfxml"
It's the only one the unordf component invokes.

CVE-2024-57823 CVE-2024-57822 affect the "ntriples" and "turtle"
parsers.

However it appears that the function raptor_uri_normalize_path() could
also be called from raptor_libxml_* functions?  Somewhat unclear, let's
add the patch just in case.

Change-Id: Idd7ebbc29c63e84ca2434b06c26f7aca34bdcaa5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180272
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-01-15 13:13:59 +01:00
Michael Stahl 670e3fe735 poppler: try to patch out all uses of std::ranges
Cloph reports it is not supported by macOS baseline XCode 14.2

Change-Id: I70a2e4c3ffd91c1a41123d1fa4d371406b300cba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180026
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
2025-01-13 22:17:17 +01:00
Michael Stahl 8ec4fd8fe5 sw: tweak assert in SwFlowFrame::IsKeep()
There is a slight inconsistency that causes this to trigger in kde84547-1.doc

For text frames, IsHiddenNowImpl() needs to be called because that is
what SwContentFrame::MakeAll() is calling.

(regression from commit cd8468bcba)

Change-Id: Icb8cb238b8460c07b99a6479cb78c523494f7248
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180172
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-01-13 16:39:37 +01:00
Michael Stahl 77e536c61a sw: clean up Start/EndAction in SwViewShell hierarchy
SwViewShell and SwCursorShell both have non-virtual
StartAction()/EndAction()?

Also, StartAllAction()/EndAllAction() can just be on the base class.

Change-Id: Ieaf88bb746b2479f44a635e4fd917fc91efb51a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180072
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-01-10 16:38:28 +01:00
Michael Stahl b57f1f7be1 xmlsecurity: fix --without-system-nss build
signing2.cxx:71: error: undefined reference to 'NSS_OptionSet'

(regression from commit f0efcb9170)

Change-Id: Idad3f7d5d1a2cb642ac3485a750cdc7631fbf4df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179954
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2025-01-08 16:48:37 +01:00
Michael Stahl e28c5a2c93 poppler: upgrade to release 25.01
Fixes CVE-2024-56378

- remove disable-nss-and-gpgmepp.patch.1 and instead build
  CryptoSignBackend.cc which appears to have working ifdefs now
- run the update_pch script
- add clang-std-rotate.patch.1 because jenkins failed

Change-Id: I7fcdd10766287e83dc666041644f129378584d91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179903
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-01-08 15:00:00 +01:00
Michael Stahl aa94faf493 sdext: adapt xpdfwrapper to poppler 24.12
Change-Id: Ia47edf2ac821e3ef5c40f7582253f894eac74060
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179902
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-01-08 10:18:17 +01:00
Michael Stahl f0efcb9170 xmlsecurity: fix CppunitTest_xmlsecurity_xmlsec with F41 system NSS
xmlsecurity/qa/xmlsec/xmlsec.cxx:102:(anonymous namespace)::testInsertPrivateKey::TestBody
    equality assertion failed
    - Expected: 1
    - Actual  : 0

Just copying the NSS setup code from the other tests lets the test pass.

Also sync all the copies of the setup code while at it.

Change-Id: Idcaebec4dff29f37e0ed0f05d6d7d62782947325
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179893
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-01-07 16:40:07 +01:00
Michael Stahl fae1eb775d xmlsecurity: fix tests to run with system NSS on Fedora 40
testDropMacroTemplateSignature fails printing this:

  warn:xmlsecurity.xmlsec:3511616:3511616:xmlsecurity/source/xmlsec/errorcallback.cxx:53: signatures.c:599: xmlSecNssSignatureSetKey() 'rsa-sha1' 'VFY_CreateContext' 4 'NSS error: -8011'

because policy sets NSS_RSA_MIN_KEY_SIZE to 2048.

testPDFGood fails printing this:

  warn:svl.crypto:3587940:3587940:svl/source/crypto/cryptosign.cxx:1941: ValidateSignature: message is not signed
  warn:xmlsecurity.helper:3587940:3587940:xmlsecurity/source/helper/pdfsignaturehelper.cxx:482: failed to determine digest match

because enabling SEC_OID_SHA1 for NSS_USE_ALG_IN_ANY_SIGNATURE doesn't
enable it for SMIME signatures, so smime_allowed_by_policy() fails -
obviously one has to use NSS_USE_ALG_IN_SIGNATURE to enable it in any
signature.

Change-Id: I59ffaf0994eee6b51362fd3296f61465d0fc7903
(cherry picked from commit a7b7b00b78426bff8607c77106ea62dd213f0821)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178663
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-12-17 14:59:13 +01:00
Michael Stahl bb7d9c4798 tdf#159549 sw: lcl_getUsedPageStyles() needs to use FillProgName()
... not FillUIName().

Thanks to Noel Grandin for pointing out this mistake in commit
0bc6fe5c1b

Change-Id: I4b86ec7363b2a09d3e328b6d77772db63873795f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178301
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-12-11 12:58:08 +01:00
Michael Stahl d821cc66d9 tdf#159549 sw: try to fix style mapping for Table Styles
Fix the SwStyleNameMapper mapping for all families except TabStyle
because testTdf129568ui fails; commit
7d08664be4 "tdf#129568 Rename the default
table style" indicates that earlier LO versions wrote UIName into
table:template-name attributes which is quite tragic and prevents fixing
this case.

Rename SwXTextCellStyle::m_sParentStyle to m_sTableStyleUIName

Actual changes to name conversion in SwXStyleFamily::insertByName(),
SwXStyleFamily::replaceByName(), SwXStyleFamily::removeByName(),
SwXTextTableStyle::setName(), SwXTextCellStyle::isInUse()

Change-Id: I886d1196f0a4e93b0770d2859beddd9424a79430
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177860
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-12-11 11:17:31 +01:00
Michael Stahl 7aae0e71a4 tdf#159549 sw: fix FN_UNO_PARA_STYLE in unotbl.cxx
SwXTextTableCursor::getPropertyValue() and
SwXCellRange::getPropertyValue() were erroneously returning UINames.

Thanks to Noel Grandin for pointing these out.

Change-Id: I232b86512cac1adf9c00ac00bf8afaf3ccfeb3cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178258
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-12-10 19:58:20 +01:00
Michael Stahl f32ee6801a tdf#159549 sw: rename SwXStyle variables to make it more obvious
There are only 2 actual changes in behaviour, in SwXStyle::getName() and
SwXStyle::setName(): these now convert the name, but in practice it
should not make any difference, because it looks like any attempt to set
the name of a built-in style, or set a style's name to the name of a
built-in style, will eventually throw an exception without changing the
document model.

Change-Id: If11fba2797e28b10c98c383c5d130f19ce0c77b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178209
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-12-10 16:42:50 +01:00
Michael Stahl 44878a26e0 tdf#159549 sw: fix style mapping for Character Styles
Change-Id: If6a130f21bfb29fe834c7004788183849f39f51e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178172
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-12-10 16:42:42 +01:00
Michael Stahl 0bc6fe5c1b tdf#159549 sw: fix style mapping for Page Styles
lcl_getUsedPageStyles() needs to convert the style names.

Lots of tests request the UIName, testTdf87533_bidi even checks the same
style twice with different names.

Change-Id: Id173493daffadd0d0a74e089ecba8f19d2b267c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177859
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-12-10 16:42:32 +01:00
Michael Stahl bfdba3c863 tdf#159549 sw: add unit test
Change-Id: I8b964d4436835b66f25acece9562516ed70473eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178148
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-12-09 17:35:50 +01:00
Michael Stahl 2b8d794e44 tdf#159549 sw: fix style name in SwXStyle::getParentStyle()
For a style that isn't inserted yet, the m_sParentStyleName is converted
to UIName by setParentStyle() but isn't converted back to ProgName in
getParentStyle().

This caused all of the writerfilter test failures in commit
c166d112381f195a171425d1f9c1d38ce579319a.

Change-Id: Ib5495785996807a8f3d9339ed2740f286b04d716
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177998
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-12-09 14:44:37 +01:00
Michael Stahl afab0fa906 sw: layout: ignore Keep-With-Next on hidden frames, part3
SwTabFrame: :MakeAll(), SwRowFrame::ShouldRowKeepWithNext()
Change-Id: I7cb6e558dc05736658a9bc75d6c735e6a47062b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177977
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-12-06 18:07:45 +01:00
Michael Stahl a08b8fa2d0 sw: layout: ignore Keep-With-Next on hidden frames, part2
SwFrame::PrepareMake(), SwContentFrame::MakeAll(),
SwContentFrame::WouldFit_()

Change-Id: I2a909ac6d147668dddece97bd99e31fdddcf20eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177976
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-12-06 18:07:39 +01:00
Michael Stahl cd8468bcba sw: layout: ignore Keep-With-Next on hidden frames, part1
When a frame is hidden, don't consider it when evaluating keep-with-next
attributes - this was the case for content in hidden sections before
commit 0c96119895

~SwFrameNotify() invalidating position of hidden frame with keep
attribute causes layout loops.

Also skip hidden frames in SwFlowFrame::IsKeepFwdMoveAllowed(),
SwFlowFrame::CheckKeep(), SwFlowFrame::IsPrevObjMove(),
SwFlowFrame::MoveBwd(), CalcContent().

Change-Id: I68556ba0a8e016d962399f3ce199e5eda0378867
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177975
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-12-06 18:07:35 +01:00
Michael Stahl bd727654ec tdf#159549 sw: fix ODF import of newly colliding Body Text styles
Commit c83d241eff "tdf#154933 Rename "Text
Body" para style to "Body Text"" introduced a regression when importing
certain ODF documents, but the problem is actually pre-existing.

What happens is that first the built-in "Text body" style is created,
and then a non-built-in style with the same translated name as "Text
body" is imported, and instead of creating a new style, the built-in one
is found and used, and so its properties are overwritten.

The root cause is that SwStyleNameMapper::FillProgName() and in
particular SwStyleNameMapper::FillUIName() are defined poorly, ever
since they were introduced in 2001 in commit
4fbc9dd48b

It becomes obvious relatively quickly that the way style names work is
that at the UNO API level, the "ProgName" (internal, non-localised)
names are used, and at the core document level, the "UIName" (localised)
names are used.

This is in itself questionable - why is the translation from ProgName to
UIName not done in the UI? - but also very expensive to change now.

So then the UNO services are responsible for translating between
ProgName and UIName.

But the 2 functions don't do that properly; both need to check if the
given name is a known ProgName *or* a known UIName, and rename it in
case it collides with a known target name; also the 2 functions need to
cancel each other out, not add " (user)" at the end in both directions.

Fixing this causes numerous tests to fail, due to:

1. the UNO services calling themselves with already converted style
   names, which are then translated a second time, which fails now.
   (or calling the wrong function like SwXStyleFamily::getByIndex())

2. many tests call the UNO API with UINames instead of ProgNames

3. somehow the writerfilter import is also changed, causing failures in
   e.g. testTdf113182 and testTdf104492

4. buggy code elsewhere (lcl_getUsedPageStyles()), problem similar to
   1., for PageDescs

5. potentially more buggy code yet to be discovered (definitely table
   styles, forgot which test that was)

So limit this fix for now to only paragraph styles, and don't do it in
writerfilter import, now at least sw.check passes.

Change-Id: I5cbdf3e174622e83f9af8787c3671b88c0e37bac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177858
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
2024-12-06 14:24:32 +01:00
Michael Stahl 1b4bf7effc sw: HTML import: apply hard formatting at insert position ...
... even if there is a character format hint there - in this case, a
RES_TXTATR_AUTOFMT attribute will not be converted to the SwTextNode's
item set.

Also add a test that uses the XDocumentInsertable interface to insert
the HTML, which is closer to the real use case.

(follow-up to commit f45d2fa85b)

Change-Id: Idbf7efceabca8d43d3e32d0b29fb37a9322c184c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177740
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-12-03 19:25:02 +01:00
Michael Stahl 654e3134ad unotest,sw: introduce queryDispatchStatus()
... and reset the view options that are toggled in
testHiddenParagraphFollowFrame and testHiddenParagraphFlys.

Backporting these tests to the libreoffice-24-8 branch broke 2 unrelated
tests because of the changed view settings:

Test name: (anonymous namespace)::testHiddenSectionPageDescs::TestBody
equality assertion failed
- Expected: 532
- Actual  : 798
- In <>, attribute 'height' of '/root/page[2]/body/section[1]/infos/bounds' incorrect value.

xmltesttools.cxx:203:Assertion
Test name: (anonymous namespace)::testTable0HeightRows::TestBody
equality assertion failed
- Expected: 28
- Actual  : 22
- In <>, XPath '/root/page[1]/body/tab/row' number of nodes is incorrect

Change-Id: Ie58242348fecabe163e54048f3896c6d427d2608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177691
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-12-02 18:46:39 +01:00
Michael Stahl 0795698c1c sw: layout: fix toggling Hidden Paragraphs not shrinking flys
There are 2 as-char flys with 2 hidden paragraphs each, and when turning
off show hidden paragraphs, the paragraphs shrink to height 0 but the
flys don't - this is because due to other hidden paragraphs earlier, the
position of the flys change and Shrink() is called before MakePos() and
then it uses the old position to check and that results in a negative
nRstHeight, so the upper doesn't actually shrink.

Fix this by always calling MakePos() before MakeValidZeroHeight().

(presumably regression from commit
 0c96119895 or one of its follow-ups)

Change-Id: I9a4ffadff02b6a2bc59c6a37aa15abec429e1068
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177524
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-11-29 18:45:54 +01:00
Michael Stahl a60f016a89 sw: layout: fix toggling Hidden Paragraphs that have follows
When a hidden paragraph is split across pages, there is nothing that
joins its follow (SwContentFrame::MakePrtArea() has code to do it but it
wasn't called even before the previous commit?) and when the follow is
formatted is doesn't move back.

So just join all follows asap in SwContentFrame::MakeAll().

(presumably regression from commit
 0c96119895 or one of its follow-ups)

Change-Id: Icecdf17c1c1e11a3b62c7e5bf2c6624f234c94f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177500
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-11-29 18:45:38 +01:00
Michael Stahl 0a3f5169ac sw: layout: fix toggling Hidden Paragraphs resulting in bad layout
1. SwContentFrame::MakeAll() needs some more checks to ensure that it
   never Formats a hidden text frame. This fixes the reported problem
   that turning off "Hidden Paragraphs" in Tools->Options->Writer->View
   results in bad layout (extra completely empty page at the end).

3. This means HideAndShowObjects() must be called manually in that case
   as it was previously called inside Format(), see
   testHiddenSectionFlys.

2. SwTextFrame::Prepare() as called from calcing some upper (table cell)
   in the bugdoc needs to avoid invalidating a hidden frame so it isn't
   formatted (triggered new assert).

4. SwLayAction::IsShortCut() had what looks like an obvious and ancient
   mistake that was causing a crash in testTdf155011.

5. SwTabFrame::MakeAll() should not calc the next if it's hidden, that
   was causing a problem in testThemeCrash where a hidden frame moved
   back into an overfull body and immediately forward again, triggering
   the new asserts.

6. SwTextFrame::IsHiddenNow() caused interesting problem where some
   ancient (CVS import) check for a 0 width would skip the invalidating
   due to the 2. change when called from SwViewShell::Reformat() ...
   lcl_InvalidateContent() in testParagraphMarkInCell; unclear why this
   check exists, let's avoid it for the cases where we definitely know
   that only doc model should determine visibility.

7. JunitTest_sw_unoapi_1 triggers new asserts because MakePos() in a
   cell ends up invalidating the text frame; fix it up again.

(presumably regression from commit
 0c96119895 or one of its follow-ups)

Change-Id: I619f4be852eca5124f49d9a91e1de658b7070074
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177486
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-11-29 17:26:45 +01:00
Michael Stahl 4fef75d4c8 sw: fix property set implementation of SwXTextRange RANGE_IS_SECTION
Use cursor that includes section nodes, the core implementation should
not need start/end to be a text node.

Fix one case in SwDoc::ResetAttrs() where a text node is expected.

(regression from commit 7ab349296d)

Change-Id: I56960b5d233ced02703a7c522ebe6afa3347cd25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177259
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-11-25 15:55:04 +01:00
Michael Stahl ea1d0a62d9 sw: do not paint hidden frames' borders
SwFrame::PaintSwFrameShadowAndBorder() is called by upper's
SwFrame::PaintSwFrameBackground() so it needs another check.

(regression from commit ff7f1b59e22092d8548459e75fe912db852f056f)

Change-Id: Ic7ac28e4af8e0abf4970d87edb40a79ad4d25156
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177032
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-11-22 17:06:40 +01:00
Michael Stahl fbfbd2f51e sw: fix hiding/unhiding section via condition
The problem was that when un-hiding a section, table rows that contained
only empty paragraphs were not reformatted and remained at height 0.

It turns out that the table row that became visible did so because the
cells had a VertOrientation different from NONE and so
SwContentNotify::ImplDestroy() invalidated the cells' printarea.

However, the real problem isn't in the layout code at all, as it then
turns out that the reason why anything is reformatted at all is that
there are docinfo fields on the same page as the section and also in the
paragraphs at the start of the section, and these get invalidated
somehow after unhiding the section.

Unhiding the section didn't actually invalidate anything in the layout
because in ImplSetHiddenFlag() no change is detected, and that is
because the section was first hidden by removing its (false) condition,
which calls SwSection::SetSectionData() and that didn't call
ImplSetHiddenFlag(), again relying on docinfo field update to trigger
the relayouting.

Change-Id: Ie5d9e4d5a0467c17c662f20f8d54aa6b22b382da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176914
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-11-21 14:46:29 +01:00
Michael Stahl 483a3db520 sw: layout: fix unhiding section containing multiple page breaks
With multiple page breaks in a hidden section, the following frames were
only moved on the first break, and with the second break the frames go
out of order in SwSectionFrame::SwClientNotify().

Also handle multiple columns there.

(regression from commit a97e245ba1)

Change-Id: I4120e72bf083f3bed75f9305fbd757efd55f0b3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176773
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-11-21 14:41:47 +01:00
Michael Stahl e8c5941401 sw: layout: fix crash in SwSectionFrame::MakeAll()
sectfrm.cxx:854: Assertion `moveBackPos == &GetPrecede()->GetFrame()' failed.

Because the section has columns, and GetPrevSctLeaf() apparently returns
the body frame in a column.

(regression from commit c60ad7e0fb)

Change-Id: I16fcd7a42b24e54873cde0aa0087c7aa56b0a8e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176738
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-11-21 12:01:13 +01:00
Michael Stahl 58948dd224 tdf#161775 sfx2: SfxRedactionHelper: actually use font for layout
Don't just use the font's height, but set the font at the OutputDevice,
to get the correct Y position of the redaction rectangle.

Still need to increase the top/bottom of the rectangle a little; also add
a little on the right edge, at least the "t" in Arial sticks out.

Change-Id: Ic6505fc7fa8697d72a6b11259005bb308e74a50c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176498
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-11-12 21:39:40 +01:00
Michael Stahl f7368c95b6 tdf#161775 vcl: WMF export: remove special case of Dx in EXTTEXTOUT
EMFWriter::ImplWriteTextRecord() has a special case for the last
position of the DX array to write an average width of all the characters
excluding the last one.

This has been the case since CVS initial import, and i was unable to
find any reason for it.

When redacting "Schritte" (large text in bugdoc), it causes the right
edge of the rectangle to be at 2964 instead of 3103, exposing the last
character.

Change-Id: I86391e97c4d06093adf3045b04f69153e8e3b0ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176497
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-11-12 21:39:27 +01:00
Michael Stahl 80cda6954a tdf#163818 package: fix recovery of zip entry local header with ...
... compressed size = 0.

The problem is that vector::data() on a vector of size 0 returns
nullptr, and osl_readFile into a nullptr buffer returns E_INVAL, which
causes an exception to be thrown.

Catch the exception, so that there is a chance to read the values from
the data descriptor instead.

(regression from commit 32cad89592
 and/or commit a6ad198d09)

Change-Id: I9b2d9a930997146faf224d8033955b142fe93f58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176289
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-11-11 10:16:15 +01:00
Michael Stahl d79790da8a tdf#162944 package: add test file
Change-Id: Ie689e8dff3405fc2a0da3791089d077db8bf59b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176288
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-11-08 19:33:56 +01:00
Michael Stahl 0f39e6fbb4 tdf#162944 package: try to detect Zip64 via version
https://rzymek.github.io/post/excel-zip64/ claims that it's sufficient
for the version number to be 45 (4.5 - File uses ZIP64 format
extensions) for Excel to read a zip entry's data descriptor as
Zip64, while the Zip APPNOTE seems to require a zip64 extended
information extra field to be present (see 4.3.9.2).

Let's try to use the "version needed to extract" to be able to read
zip files produced by Apache POI Zip64Mode.Always.

Change-Id: I20f10471e3a85eb42d21c0cb08e36e345ef8fc9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176211
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-11-07 15:47:43 +01:00
Michael Stahl 7fa083459e tdf#162268 sw: formatting: paragraph style also applies to para marker
... so check it in SwTextFrame::IsHiddenNow().

During RTF import, the \v produces a RTFSprm that may be deleted before
inserting by cloneAndDeduplicate() because the style already has the
same value; this happens in one paragraph in the table in the footer of
the bugdoc and that's why that row is visible.

(regression from commit 7b8cec8322)

Change-Id: I064ecdc04c26afab7ef2196ac4da338b9d0bb1f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176093
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-11-06 20:28:37 +01:00
Michael Stahl a6d0b7f683 tdf#162268 sw: layout: hidden formatting is ignored on cell end marker
... in Word, so ignore it in Writer on the last paragraph in a cell.

(regression from commit 7b8cec8322)

Word also uses hidden character formatting on the row end marker to
determine if a row should be hidden; this isn't possible yet.

Change-Id: I7ceaea0d807193155631083616a93cdd058e20d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176060
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
2024-11-06 20:28:19 +01:00