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
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>
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
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>
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>
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>
* 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
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>
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
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>
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>
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
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>
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>
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
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
... 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>
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
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>
... 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
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>
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
... 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>
... 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>
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>
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>
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>
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>
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>
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
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
... 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
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
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>
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
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>
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>
... 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>
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>
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
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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
... 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
... 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>
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
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
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>
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>
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>
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>
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>
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>
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>
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
... 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
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
... 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>
... 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