summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2023-07-19Cleanup SfxApplication::Get/SetOptions, and drop unused SIDsMike Kaganski
The removed stuff was never used elsewhere; e.g. all uses of GetOptions use Which Ranges that don't include the removed identifiers. Elements removed from SetOptions weren't passed to that function from anywhere. Change-Id: Id81b57014b82f89538a46a609f3e4b328864bbcf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154604 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-19Move SwXReferenceMark Java tests to C++anfanite396
Change-Id: I95777931fd039b22983218d7472c3f7037e6c62d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154085 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-07-19Move SwXParagraphEnumeration Java tests to C++anfanite396
Change-Id: I8315d52e75ddbe3b4f844fcb645f857da3d12acb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154084 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-07-18Revert "ww8import create a pagedesc if continuous section changes margins"Paris Oplopoios
This reverts commit c5ed52b1cd6f22787c94bec035ceecf9e1da3271. The reverted commit would insert a pagebreak on section breaks if the margin before and after the section break was different. While this means a table after the section break will get the correct margin, it would also create a page which is very breaking - it shouldn't be the case in documents that have multiple continuous section breaks in a single page that a new page is created for each of those breaks if the margins are different - there are documents where this happens and in those documents a single page gets converted to multiple messy pages. Thus the table margins being correct after a section break with a margin change should be fixed in a different way. Change-Id: Ia5d5b98ddbd021803a6a9f80762b97db5808509f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154565 Tested-by: Jenkins Tested-by: Paris Oplopoios <parisoplop@gmail.com> Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
2023-07-18tdf#114441: Replace sal_uLong with size_t in doccomp.cxxVenetia Furtado
The caller of Compare::CheckDiscard passes value of type size_t. Therefore, replaced the type of the method’s first argument from sal_uLong to size_t. Further, refactored all dependent variables to size_t as well. Change-Id: Id32a88936e92f0d30aa6a7a07412a91845beed63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154203 Reviewed-by: Hossein <hossein@libreoffice.org> Tested-by: Hossein <hossein@libreoffice.org>
2023-07-18deduplicate virtual page info update in SwPageFrameBjoern Michaelsen
Change-Id: I2753f080f7751189675007ded8ba050245a8758c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154562 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-07-18tdf#120262 sw floattable, legacy: go outside body only for page frame vert posMiklos Vajna
The bugdoc has to pages, the floating table from the top of page 2 is partially moved to page 1 and overlaps with the footer text. Part of the reason this happens is that in case the vertical position is relative to the page frame, then Word allows using the footer area for floating tables (see tdf#155118), but turns out that in case the position is relative to other places (e.g. paragraph), then this is not necessary. Fix the problem by making the "is legacy" condition in GetFlyAnchorBottom() more strict, which keeps tdf#155118 fixed, but improves this bugdoc. Leave the layout unchanged for cases where the floating table is not in the body text (e.g. footnotes). Now the overlap is fixed, but still a bug remains where the first row on this split table is not moved page 2. Change-Id: I96d6eb527d7f33dd65de8a66f815219c02625d93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154573 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-07-18tdf#153319 sw: don't move footnotes to follow if portions in masterMichael Stahl
SwTextFrameBreak::IsInside() may be called in different situations, during formatting it should be possible to move the footnotes, but when called from SwTextFrame::CalcPreps() this is problematic as it does not format the lines, it iterates over existing lines. The problem is that the footnote frame is moved to the follow's page, but the footnote portion remains on the master, and then the follow is joined while the footnote frame's mpReference still points to it. (regression from commit 391613785ae6fbb735cf7a86ea2f6a93161a8769) Change-Id: I4290dcd242a7f5292ad4f50c1407c9cd88e80a6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154557 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-07-18tdf#156325 - Index of tables: support ctrl + click on an itemAndreas Heinisch
Change-Id: I6de76d946ab0810cc3c2ba9fbec5d3c1db043a1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154574 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-07-18sw: document SwFormatFootnoteMiklos Vajna
Explain this is just the anchor side, the content side is described by the SwTextFootnote around us. Change-Id: Id27ce3cabf30b31c494a9dbfbc94130c35bb61cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154556 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-07-18tdf#136905 NBB: let ValueSetWithTextControl set optimal heightJustin Luth
There was no way to specify a "good font size" to use for .uno:AttributePageSize in the notebookbar. The font "resized to match to size of the box" which is hard-coded to aSize(250, 300). (Even if ValueSet::SetOptimalSize worked, it would set an inadequate height.) So it seems like the best thing to do is simply add a function that allows the box height to be modified. Using the fontsize from GetDefaultFont is not correct. Use the OS-defined label font size instead, which seems to be the most common choice - GetPushButtonFont would has also worked. I verified that the label font size is controled by the OS' font preference. The ability to define the box's optimal height is still (somewhat) necessary. It isn't good enough to just "use the system font size". I tested with an OS font size of 48 (instead of 11), and in that case the box height was too small (but with the font only using 4/9's of a 12pt space, even a 24pt font looked OK without adjusting optimal height). Change-Id: I0a0774dea9c2a6c21a8e84439318a94f39783413 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154286 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-07-17sw: handle sequence of sections containing only tableMichael Stahl
SwNodes::FindPrvNxtFrameNode() still relies on the special-case code at the end to handle this situation, which exists only in the forward direction, and since commit af4e20426ad24c6f2c0164b37472f2b7b54ecd30 there's an assert which is triggered by forum-de3-11230.odt Add the handling to the loop, both backwards and forwards. Change-Id: I79702653ec6fc27854f664c2a41c02f9c97edff0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154553 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-07-17simply some LogicToPixel calculation sitesNoel Grandin
Change-Id: I9698562dd1f8d4679c9999342ded1022bde698be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154523 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-17tdf#156030: sw: better import of IF field for RTF and DOCXVasily Melenchuk
Since long time IF field was converted to ConditionalText, but no parameters were given. So condition, then text and else text were lost during import. Change-Id: I9b45e8ab394f3c53bb34370bf3ea15a939a400fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154101 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-07-17tdf#120262 sw floattable, legacy: fix text wrap around fly when no content fitsMiklos Vajna
The bugdoc is created from DOC (so tables are shifted to the left, slightly) and has 2 floating tables on 2 pages. Writer puts them to a single page, so they overlap, which is not wanted. The trouble is that there is some space (but not much) on the right of the floating table on page 1, and Writer wraps the empty anchor of the floating table on the right of the floating table, while Word puts it below the table, so no overlap happens. Fix the problem by extending the work from commit 8f8b31abd02876c3601e343b8b3274754f8a61b6 (compatibility setting for MS Word wrapping text in less space (bnc#822908), 2013-08-06), and work with that limit in SwTextFormatter::CalcFlyWidth(). This way Writer keeps its behavior that PARALLEL wrap text mode requires no minimal text width for existing documents, but correctly ~300 twips minimal text width (Word formats). The bugdoc still has a footer vs floating table overlap, but at least no 2 floating tables overlap now. Change-Id: Ib307ede08ead272fe16dca261db615fd8e9c547d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154509 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-07-14Use SwAnchoredObject::RegisterAtPageMike Kaganski
Change-Id: Icdc8266656bea5b44ce744457ad6a1d0ba87c473 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154447 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-14tdf#156287: don't try to move objects to pages other than their anchorMike Kaganski
Objects may have offset moving them outside of the current page, where their anchor is. This doesn't mean that they would move to another page, just that they will be clipped. Without this taken into account, objects which rectangle would be on another page, would trigger infinite loop because of their position invalidation in SwLayAction::FormatContent's cleanup code, where they will move to their correct page; and then their off-page rectangle would move them to another page again. Change-Id: I2b818403163041a49a3bc1640b1af9a1705fd671 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154444 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-14tdf#156267 sw: remove DdeBookmarks in SwDoc::DelTable()Michael Stahl
On Copy, a SwTransferDdeLink is created, which also creates a DDE_BOOKMARK (it's the only thing that does that) without Undo. On Delete, the DelTable() creates SwUndoDelete which creates a SwHistoryBookmark; then the DeleteAndJoin() deletes the DdeBookmark. On Undo, the SwHistoryBookmark doesn't find its bookmark, and crashes. Because the DdeBookmark is artificial and deliberately created without Undo, DelTable() should prevent the SwHistoryBookmark by deleting it first. (regression from commit d81379db730a163c5ff75d4f3a3cddbd7b5eddda) Change-Id: Ib24c788a49a6fee364b44a1dbc8d53870c074596 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154440 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-07-14Simplify the logic a bitMike Kaganski
At least for me, it's easier to understand it this way. Change-Id: Ib66d4163c85263971e93390161c37614c0e5d87b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154436 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-14tdf#154982 drawinglayer,svx,sw,vcl: PDF export: hell flys and shapes...Michael Stahl
... should be below their anchor paragraph in the structure tree. Refactor SwEnhancedPDFExportHelper (etc.) to use the new EnsureStructureElement()/InitStructureElement() functions instead of SetCurrentStructureElement() for the frames, and allow it for flys that don't have their anchor paragraphs created yet because the hell layer is exported before the document body. Change-Id: I1be3b54002e8196772e6f9d81dd0fd0c85b6e34b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154399 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-07-14tdf#154982 vcl: PDF Export: split BeginStructureElementMichael Stahl
... into 3 parts: EnsureStructureElement/InitStructureElement/BeginStructureElement So EnsureStructureElement and BeginStructureElement/EndStructureElement can be called multiple times for the same object, passing in a unique key and PDFExtOutDevData will only create the element once. InitStructureElement will be used exactly once for each object when its actual content is exported. In PDFExtOutDevData rely on the indexes being the same here and in PDFWriterImpl, because then only PDFExtOutDevData needs to maintain the map from key to index. Change-Id: Idea6e34627fe559038cf13cf01dafe84b759e3c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154357 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-07-14tdf#153866: Fix TOX crashBjoern Michaelsen
Im not sure why it should be valid that the ContentFrame should ever be nullptr here, but a simple check prevents the immediate crash. Change-Id: I19a2d04e41271ae6a5b6a3a79c31c3efd5db7875 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154404 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-07-14tdf#120262 sw floattable: don't wrap text around fly when no content would fitMiklos Vajna
The document has 2 pages with 2 floating tables, but instead Writer had a single page with 2 overlapping floating tables. What happened is that most of the horizontal space on page 1 was used by the floating table, but out of the 10466 twips body width, 11 remained (after accounting for the floating table and its margin. Considering that the empty paragraph needs no space, the paragraph marker was shifted up, next to the floating table, leading to losing page 2 and overlapping floating tables. Fix the problem by checking if the remaining space has some minimal size: if it has no space to host any actual content, then shift the paragraph marker down (in compat mode), similar to what Word >= 2013 does. Note this only fixes the "DOCX, Word >= 2013" version, the original bug DOC file still needs more work. Change-Id: I00864d9b3ae662cdf19fa63e004da1ee1cc7be7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154409 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-07-14sw layout xml dump: extract SwNoTextFrame::dumpAsXml() from SwFrameMiklos Vajna
Which means finally SwFrame::dumpAsXml() can be pure-virtual as all subclasses overwrite it. Change-Id: I5a8c5437bb64f6745653038105891e4fb6b54399 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154397 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-07-14Add test case for tdf#155705Colomban Wendling
Change-Id: Ib70bcd6ab8e269f21f7182e544490e6d19f2c940 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154130 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-07-14Move SwXNumberingRules Java tests to C++anfanite396
Change-Id: I3f5b1b6ce5ed475ef923f2c605c6ada7d29e0439 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154336 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-07-14Move SwXFrames Java tests to C++anfanite396
Change-Id: I92276f7b0b6537ebf2c5b4d554be1759c09e9544 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154299 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-07-14Move SwXFieldEnumeration Java tests to C++anfanite396
Change-Id: I6f1eb42e9284593bcc0db1934f3b14d090349d91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154298 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-07-14Move SwXDocumentIndexes Java tests to C++anfanite396
Change-Id: Ib764152762e55ba56df765f425b0f9254113c280 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154297 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-07-13tdf#154035: use correct Which range including the new WIDsMike Kaganski
After commit db115bec9254417ef7a3faf687478fe5424ab378 (tdf#78510 sw,cui: split SvxLRSpaceItem for SwTextNode, SwTextFormatColl, 2023-02-24), aCoreSet is now querying RES_MARGIN_FIRSTLINE, RES_MARGIN_TEXTLEFT, RES_MARGIN_RIGHT instead of RES_LR_SPACE. Without the fix, it would return wrong state, and disable the respective item in the cases of SID_ATTR_TABSTOP_VERTICAL / RES_PARATR_TABSTOP, which disabled the ruler. Change-Id: I8ca4ce586b414cefe2be79ec0226ac7808a231d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154395 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-13ImageMap::GetHitIMapObject can be constNoel Grandin
which removes an unnecessary const_cast Change-Id: I9ef2e7c8b87e15ebd04e8864bfdd322991d9af00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154383 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-13jsdialog: enable Manage Changes dialogSzymon Kłos
Change-Id: Ibc501dc595eba93adde7b635a5de1122b22c9651 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153190 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154331 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-07-13use more frozenNoel Grandin
Change-Id: Ie3e6e7e947d9322f3999cf3274a6c10ea717afe2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154276 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-12CppunitTest_sw_layoutwriter: fix unclosed component in testTdf109137Miklos Vajna
Is meant to fix this warning at the end of CppunitTest_sw_layoutwriter: warn:vcl:25875:25875:vcl/source/app/svmain.cxx:469: DeInitVCL: some top Windows are still alive text = "" type = "14FloatingWindow", ptr = 0x636cff0 text = "tdf109137.docx — LibreOfficeDev Writer 24.2 [ad8be98155e24a8d15948be493580df9eb2e56f5]" type = "10WorkWindow", ptr = 0x7d82920 Change-Id: I7a0a53c8a9aca0ed6e0eb04107c523be7cc23535 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154359 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-07-12Move SwXStyleFamilies Java tests to C++anfanite396
Change-Id: I1a399f33e71d05506b86b66c5ac15a9fe1106cba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154347 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-07-12Move SwXChapterNumbering Java tests to C++anfanite396
Change-Id: I891f74f73b18cd0ccc3b45e455913da292e558a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154275 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-07-12cool#6857 sw floattable: try harder to keep anchor text in the last followMiklos Vajna
The bugdoc has a single floating table, spanning over 6 pages. Loading results in a layout loop, SwFrame::GetNextFlyLeaf() never finishes as the last follow fly has no anchor, which should never happen. The root of the problem seems to be already on page 3. The 6 fly frames are meant to have 6 matching anchor frames, where the offset of these text frames is all 0, i.e. the anchor frame's text goes to the last follow, since commit 73bada774ef37efd5a4498ccc083b1358314557d (sw floattable, crashtesting: fix PDF export of fdo72790-1.docx, part 3, 2023-04-26). Fix the problem by improving SwTextFrame::FormatAdjust(), so it never sets the offset of a follow anchor frame to non-zero when the current frame has a non-last split fly. All the negative fly frame heights and the final layout loop was a result of this. Note that there are still calls to ManipOfst() on the follow frame after this, but all such calls are from SwTextFrame::RemoveFootnote(), and that always just sets a non-zero offset + restores it, so that is not a problem for us. Change-Id: If62a1e2690cffed2de0be047ffb741d524532dea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154343 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-07-12sw: getTestName() can goXisco Fauli
after commit 54d69f55d13ec39e1b2a2a6883b98cd23c6609a4 Author: Miklos Vajna <vmiklos@collabora.com> Date: Tue Jul 11 20:11:25 2023 +0200 CppunitTest_sw_htmlexport: clean up not needed reqif part of preTest() All reqif tests set the filter options explicitly already. Change-Id: Ib7962578ddb2ce002910868c6d6f85ae4a1f6c79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154353 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-07-12Simplify a bitMike Kaganski
Change-Id: I452619c5a1d0b414f09c1e3178fac9905b6d0374 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154349 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-12CppunitTest_sw_htmlexport: clean up not needed reqif part of preTest()Miklos Vajna
All reqif tests set the filter options explicitly already. Change-Id: I50e437c9922feaff94ce331df416114e25ac6aa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154339 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-07-12tdf#141135 notebookbar: use radio buttons instead of checkboxesJustin Luth
I mean of course in the places where mutually exclusive options are side by side. I mainly searched in menu.xml where menu:style="radio", and then changed the notebookbar menu items to do the same thing. It was all done by hand, unfortunately. Before testing, ensure you have no customized notebookbars: rm instdir/user/config/soffice.cfg/modules/*/ui/* git grep -B10 '.uno:NormalView\|.uno:BrowseView' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:PageMode\|.uno:MasterPage' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:.uno:PagebreakMode\|.uno:NormalViewMode' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:DefaultCellStyles' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:CommonAlign' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:StyleApply' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:TextBodyParaStyle' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:NumberListStyle' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:OutputQuality' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:ParaRightToLeft\|.uno:ParaLeftToRight' *.ui | grep -A10 GtkMenuItem git grep -B10 .uno:SpacePara *.ui | grep -A10 GtkMenuItem git log -p -1 | grep '^+' | grep -v GtkRadioMenuItem Change-Id: Ia2e29a6541fed66f4bcb0936d715969994671e65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154337 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-07-11sw layout xml dump: don't crash when text frame length is -1Miklos Vajna
Of course this should not happen once the layout settles, but it can happen in the middle of debugging and the dumper itself should never result in an assertion failure. Change-Id: I425b8758f6f6f948752d40d081c8ed61855f9bcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154294 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-07-11document the unusal application of a style-property to define DFJustin Luth
One would expect the normal process of a style defining a property, and direct formatting overriding the style. However, in the case of a list level, ODF spec says that the definition in the list level has no meaning at all, except at the time when the style is applied to a paragraph. At that time, the program can chose whether or not to set the list level directly on the paragraph to the suggested level. Change-Id: Ia415f7be438b5123127f292c9f02cb9b9cfe66fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154249 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2023-07-11tdf#150408: Implement "Legal" numbering (all levels using Arabic numbers)Mike Kaganski
Enabling this feature on a list level makes all numbered sublevels, that constitute the number of this level, to use Arabic numerals. This doesn't change the labels of other levels: e.g., if level 1 uses A,B,C; level 2 uses i,ii,iii; level 3 uses a,b,c, and is "Legal"; and level 4 uses 1,2,3; then a list may look like A. Something A.i. Some subitem A.ii. Another subitem 1.2.1. This is a "Legal" sub-subitem A.ii.a.1. And its child This improves interoperability with Word. This change introduces document model, ODF and OOXML import and export. In ODF, a new boolean attribute of 'text:outline-level-style' element, 'loext:is-legal', is introduced; its default value is "false". Change-Id: I5ae9f970864854c7e84c4b2f7ce46634b3ef104e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154288 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-07-11Fix typoAndrea Gelmini
Change-Id: I31031adff2ebecba430b79e301ff7d628d9301a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154289 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-07-11tdf#154939 sw: PDF/UA export: produce Link StructElem inside FigureMichael Stahl
... for a fly frame with a hyperlink set. Specification: ISO 14289-1:2014, Clause: 7.18.5, Test number: 1 Links shall be tagged according to ISO 32000-1:2008, 14.8.4.4.2, Link Element. A Link annotation is nested within null tag instead of Link Change-Id: I7a2bef8d6100adffb1f40085bba8f18fc68bd8d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154280 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-07-11sw floattable: make sure floattable after floattable gets own anch pos from DOCMiklos Vajna
The bugdoc has 2 floating tables next to each other, which overlap in Writer, but not in Word. This looks quite similar to the DOCX case, which was solved in commit 01ad8ec4bb5425446e95dbada81de435646824b4 (sw floattable: fix lost tables around a floating table from DOCX, 2023-06-05). Fix the problem by improving SwWW8ImplReader::StartApo() so it inserts a fake paragraph when a floating table is immediately followed by a floating table. A similar case, floating table followed immediately by an inline table was already handled like this in WW8TabDesc::CreateSwTable(). Creating a reproducer document from scratch is quite tricky, as Word will also insert a fake paragraph on the first save of the DOC test file (so the doc model will be floattable-para-floattable-para) and manual edit of binary DOC files is also not easy. So the compromise is that the testcase file has 2 floating tables anchored to the same paragraph, but they don't overlap visually, while they do overlap in the original, internal bugdoc. With this, finally the bnc#816603 DOC bugdoc renders without overlaps, which was the case before my multi-page floating table changes. Change-Id: Ib1b4c7c80833db5a7bde38092c8c3ed6fd1d2462 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154290 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-07-11Document connections between sw/inc/comcore.hxx and sw/inc/utlui.hrcMike Kaganski
Change-Id: Ibb646964ff031a34e13a814b79b0e73cb885fe37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154261 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-11tdf#156130: Use default tab stop when TOC*N style doesn't define oneMike Kaganski
When TOC*N style only defines one tab stop, it's used by Word as the page number position, and the tab between chapter number and chapter name is set to a default position. When the style has no tab stops, they are both defaulted. testTdf154319 is updated to test this. Change-Id: I561995a8e96882e1f17ee9982e3fc640e621cda2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154281 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-07-10tdf#148729 sw: PDF export: fix link targets when "comments in margin"Michael Stahl
... is enabled but there are no comments; the conditions in SwViewShell::PrintOrPDFExport() and SwEnhancedPDFExportHelper::SwRectToPDFRect() were out of sync. (regression from commit c77e01d63b4bd4805c4a499e4e0cab917d0eb403) Change-Id: I617185e6f30843a79190a54b73a5f44666697388 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154279 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>