summaryrefslogtreecommitdiff
path: root/sw/qa/extras
AgeCommit message (Collapse)AuthorFilesLines
8 hoursIntroduce query() and queryThrow() to css::uno::AnyMike Kaganski1-2/+1
Similar to commit f3ffdc1a5fe965016550f20ada405ef638bf5f75 (Introduce non-static query() and queryThrow() to css::uno::Reference, 2023-03-23), this adds a syntactic sugar for css::uno::Reference ctors: css::uno::Reference<css::SomeNamespace::SomeInterface> xSomeInterface(anAny, css::uno::UNO_QUERY); would become auto xSomeInterface(anAny.query<css::SomeNamespace::SomeInterface>()); and css::uno::Reference<css::SomeNamespace::SomeInterface> xSomeInterface(anAny, css::uno::UNO_QUERY_THROW); would become auto xSomeInterface(anAny.queryThrow<css::SomeNamespace::SomeInterface>()); Change-Id: I06f8d97fe200a7dd03ecc965a431eb54b10a3c91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149549 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
8 hoursCppunitTest_sw_uiwriter3: move failing test to another fileXisco Fauli2-75/+75
In order to see wether this test keeps failing in the new file or it's affected by another test Change-Id: I73ef0287a81d0ea8c2b26f466cd0d623a62933c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149543 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
8 hourstdf#115625 tdf#76022 sw table: CalcFlyOffset: get correct surround for textboxJustin Luth2-0/+13
The function thought it was dealing with a wrap-through shape, but actually it is wrap parallel. Attempts to syncProperty of RES_SURROUND meet with instant disaster, and likely this emulation works better if the doubled-up shape only has one wrap anyway. There is a helper function for this after all, so that highly suggests workarounds are necessary instead of just syncing the wrap property. There were two existing unit tests identified: -tdf123163-1.docx (doesn't even open in MS Word 2010/2003) -testCustomShapePresetExport.odt (on round-trip) -no differences noticed. Change-Id: I7b0828ce6406fa9cfb1debb68040ea02e8d6fe45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149463 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
9 hoursCppunitTest_sw_rtfexport: split in twoXisco Fauli2-653/+688
it already has 109 tests Change-Id: I1e7adf3fa9c1cdb22fb1402306c2f9478d94038c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149546 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
10 hourstdf#154360: use TOC(N) styles in DOCX as the source of ToC tab stop positionMike Kaganski1-12/+19
Change-Id: Iab8001f8be8a8af437e8898079d55ff57dd6fa3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149494 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
39 hoursIntroduce non-static query() and queryThrow() to css::uno::ReferenceMike Kaganski1-2/+1
As a syntactic sugar for the respective ctors: css::uno::Reference<css::SomeNamespace::SomeInterface> xSomeInterface(xAnotherInterface, css::uno::UNO_QUERY); would become auto xSomeInterface(xAnotherInterface.query<css::SomeNamespace::SomeInterface>()); and css::uno::Reference<css::SomeNamespace::SomeInterface> xSomeInterface(xAnotherInterface, css::uno::UNO_QUERY_THROW); would become auto xSomeInterface(xAnotherInterface.queryThrow<css::SomeNamespace::SomeInterface>()); Change-Id: Ic42da364562b702cd468cc708fbda70394c4f2a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149368 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
44 hoursFix typoAndrea Gelmini1-1/+1
Change-Id: I48bca01a495c2df86b3868a420b11ce4ab860bd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149354 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
46 hourstdf#154319: fix TOC field codes parsingMike Kaganski2-0/+50
Change-Id: I734697f52df14ca5b316481df8a58fef72ab9571 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149254 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2 daystdf#153664 Export correct Table of Figures paragraph styleGabor Kelemen2-0/+13
Change-Id: I892a0185a94aadd902e55ee9b719f855edbdfc89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149258 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2 daystdf#153659 Import Table of Figures paragraph style correctlyGabor Kelemen1-0/+3
Change-Id: I5a995349c168bfbb5c8933dafa72e06eddb74ac6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149257 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
3 daystdf#135581 sw UI: keep image in place when changing anchorJustin Luth2-0/+11
Changing the anchor type should not move an image around. The only time we have a prosition to fix AFAICS is when the anchor changes and the RelationOrient is no longer appropriate. In that case we always get a new p*OrientItem. If GetPos changed, then that means the user (or earlier algorithm) already adjusted for the change. If there is no difference in GetPos even though the relation changed, then that is the only time we (likely) need to recalculate. So the typical example requiring an adjustment would be a change from "to paragraph" at text position 0 to a "to page" anchor. In this case "page" has no relationship to "text margins" and thus needs to base the absolute position 0 on page instead of text, meaning that the margins would need to be added to the absolute position. This code is basically unchanged since initial import. I have no idea why it could possibly be good to change the position when there is no new information given (no pHoriOrientItem/pVertOrientItem). [I checked and "from top" and "from bottom" are both == NONE, as well of course as "from left".] make CppunitTest_sw_uiwriter3 CPPUNIT_TEST_NAME=testTdf135581 Change-Id: Ib89ad9ba26c8826ed43f6d4505a82502b9ad8af9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149012 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
3 dayssw floattable: limit the unfloat button to non-DOCX filesMiklos Vajna3-13/+4
CppunitTest_sw_uiwriter2's testUnfloatButton and testUnfloating failed in the SW_FORCE_FLY_SPLIT=1 case. The trouble was that it assumed that floating tables from DOCX are imported as tables in non-split flys, which is no longer the case. Fix the problem by limiting the test to ODT and DOC files. Once the DOC filter is there for SwFormatFlySplit, this can be restricted further to ODT files only (or perhaps it should be removed completely). Change-Id: Ie1db9a66c862c196aa3bf5326dfb20c67b9b493a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149291 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
3 dayssw floattable: fix inner floating table inside normal outer table from DOCXMiklos Vajna1-5/+12
The problem was that CppunitTest_sw_ooxmlexport9's testTdf79329 has a normal outer table and a floating inner table; the inner table was already not floating (so that's not a new problem), but SW_FORCE_FLY_SPLIT=1 even failed the text-to-table conversion for the outer table, so we just had 1 table, not 2 tables. The problem seems to be that the start/end positions for the outer table cell get invalidated by the inner table-to-frame conversion, so the outer table conversion will fail as well. Fix the problem by limiting the table-to-frame conversion for toplevel tables: this avoids the failing text-to-table conversion in the SW_FORCE_FLY_SPLIT=1 case. At some stage I should revisit this, since the DOC import has working floating tables for the inner case, for now just make sure that the DOCX import result has two tables, as before. Change-Id: I39aa00e46c12a32117c334cb97e1cc0270b77651 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149284 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
3 daysCppunitTest_sw_htmlexport: avoid XHTML magicMiklos Vajna1-4/+6
Set the filter option explicitly, rather than inferring it from the test name. Change-Id: Idaf476756b477bf55a31598ce67028fcf1c9d4ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149256 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
3 daysRemove executable bits from odtAndrea Gelmini1-0/+0
Change-Id: I719c1a156dea095d391f94b42f78f2a8c99b0673 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148938 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
3 daystdf#153255 DOCX import: fix footnote orderLászló Németh2-0/+35
Simple unit test for tdf#152203 allowed to create bad ordering algorithm by accident without noticing the problem, which caused problem for most of the DOCX files, where serialization in footnotes.xml doesn't follow the order of the footnotes. Regression from commit 9b39ce0e66acfe812e1d50e530dc2ccdef3e1357 "tdf#76260 DOCX import: fix slow footnote import". Follow-up to commit 09ae3c01940bbc25ffde51963683b04e3cb4bb6a "tdf#152203 DOCX import: fix mixed footnotes/endnotes". Change-Id: I0628d96e3b8ad4df38d26e9288b47d39b958c441 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149176 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
4 dayssw floattable, CppunitTest_sw_ooxmlimport2: assert the layout in testTdf114217Miklos Vajna1-2/+17
The point is that the table is multi-page, which is preserved. The detail that it's not in a fly is no longer true. Change-Id: I8fa61391eb26b434cd7e8b8adb5012c4909e5553 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149209 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
4 dayssw floattable, CppunitTest_sw_ooxmlexport9: assert can-split in testTdf109063Miklos Vajna1-3/+15
It should not be a problem if the table is in a frame, what matters is that the frame is marked to split. Change-Id: Ib289691dcdf78de494518a9afeac3ede9045ec1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149195 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
4 dayssw floattable, CppunitTest_sw_ooxmlexport9: assert the layout in testTdf107889Miklos Vajna1-4/+12
The point is that the table is multi-page, which is preserved. The detail that it's not in a fly is no longer true. Change-Id: I63ee8182638a2f0118584f5e985abaf1c3d7e337 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149188 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
4 daystdf#154273: sw_htmlimport: Add unittestXisco Fauli2-0/+19
Change-Id: I9d65f514979bbd24380210dc9006b6ed2649b37a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149165 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
5 dayssw floattable: fix handling of nested non-floating tables at cell startMiklos Vajna1-27/+34
CppunitTest_sw_ooxmlexport8's testN779642 failed in the SW_FORCE_FLY_SPLIT=1 case. The bugdoc has a floating table, then an inner, non-floating table. The conversion to floating tables was disabled by the c1eebcdac9f2b289fd363399130c485ca5ff444c (tdf#79329 DOCX import: fix missing outer table with floattable at cell start, 2016-11-08). Given that SwFormatFlySplit doesn't need the delayed text frame conversion, we can get rid of this workaround. Fix a similar problem on the export side as well, where the positioning properties of the outer table leaked into the inner table. Once both the import and export are fixed, the test passes. Change-Id: I884ad38cbc247c885991b0faf0d37221b70a6ba7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149154 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
5 dayssw floattable: fix CppunitTest_sw_ooxmlexport10's testTdf99140Miklos Vajna1-9/+44
Assert this at a layout level, which still passes: - the table is split on two different pages - the width of the floating table is correct Change-Id: I580db33fc7c049d27c1b2c8da5aac4b37e989695 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149137 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
5 dayssw floattable: fix CppunitTest_sw_ooxmlexport10's testTdf8255Miklos Vajna1-4/+16
This asserted that the table is not floating, rather assert that the floating table is allowed to split. Change-Id: I1dec6027b0774a1fc5380e65c7221b3b9d289e59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149133 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
7 dayssw floattable: fix redline import from DOCXMiklos Vajna1-0/+1
The problem was that sw/qa/extras/ooxmlexport/data/tdf149388.docx contained redlines but those were not imported for split flys. This happened because split flys get imported directly in DomainMapperTableHandler::endTable(), and the redling handling for floating tables was only implemented in SectionPropertyMap::CloseSectionGroup() (where delayed floating tables are imported). Fix this by extracting the redline import code for floating tables into 2 functions and then calling those also from DomainMapperTableHandler::endTable(). Note that the !isExported() branch of the testcase looks like dead code, since we always run this code after an export. Change-Id: I860ee0168807077eb5ed33d79888f4cc1de9a717 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149057 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
8 dayssw floattable: unconditionally map <w:tblpPr> to SwFormatFlySplitMiklos Vajna1-0/+1
CppunitTest_sw_ooxmlexport8's testN816593 failed in the SW_FORCE_FLY_SPLIT=1 case because the re-import of the document merged two tables into one. The problem starts earlier, we didn't import the table with a <w:tblpPr> as a floating table, but we should. Fix the problem by never going via m_aPendingFloatingTables in the SW_FORCE_FLY_SPLIT=1 case, since that was only a workaround for layout limitations. This conditionally reverts commit 78d1f1c2835b9fae0f91ed771fc1d594c7817502 (fdo#68607 bnc#816593 DomainMapperTableHandler: don't always start a frame, 2013-09-03). Also add a SwModelTestBase::FlySplitGuard, so it's just a one-liner change to test the SW_FORCE_FLY_SPLIT=1 case from cppunit. The goal is to have this on by default once it's mature enough. Change-Id: I9d94a49f7a0c27dd43e8fd388867c65d6d25f2e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149044 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
8 daysUpdate view options string based on themeParis Oplopoios1-0/+20
Update the view options string based on the theme when tiled rendering, and make sure only the currently active view is updated Change-Id: Ib24111848f2926fe7ae858ca2e18e946d980e83f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148943 Tested-by: Paris Oplopoios <parisoplop@gmail.com> Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
9 daysavoid font replacement in testCaolán McNamara1-0/+0
Change-Id: Id3ec97f0859cf7c702ad0a501c2431af1df997d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148923 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
9 daysSwModelTestBase: factor out common codeXisco Fauli5-139/+38
Change-Id: Iab415dadd3bc465d31bf14cbe2f384b9588466a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148929 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
9 daystdf#154129 writerfilter framePr: deduplicate BackColorTransparencyJustin Luth2-0/+9
Well, not really deduplicate, because it only existed once. Added long ago with commit 4ac48167662c592c21025b89fe8f6925c680c6e0 Author: Miklos Vajna on Mon Feb 20 15:46:08 2012 +0100 n#695479 fix rtf/docx import of transparent frames However, it didn't handle the situation where {\stylesheet{\fs19\lang1033 \snext0 Normal;}} was missing. In that case there is no "Normal" paragraph style to inherit from, and thus his fix is also needed in the no-style case. make CppunitTest_sw_rtfexport3 \ CPPUNIT_TEST_NAME=testTdf154129_transparentFrame Change-Id: Iaa5b92cd626192d44d11c1365b9b483bd46dff9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148815 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
10 daystdf#146984 writerfilter inline_inline: no break in shapeJustin Luth2-0/+11
Change-Id: I94efea80df1fee9ecd338bfec3430edfdf418e3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148918 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
10 daystdf#40142 - Consider level settings of the various text nodesAndreas Heinisch3-2/+14
Consider level settings of the various text nodes when creating a TOC from custom styles. Change-Id: I70759f9bcf63e8591ce89bc71afabb1da0c2f29c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148886 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
10 daystdf#153613 tdf#146984 writerfilter: split para after anchorsJustin Luth2-0/+10
Even though the w:br occurs in the paragraph before the anchors, the anchors stay on the first page, and don't move to the second page (unless it is the last paragraph in the section/document, which is not yet handled.) make CppunitTest_sw_ooxmlexport18 \ CPPUNIT_TEST_NAME=testTdf153613_textboxAfterPgBreak3 Change-Id: Icfc7e2a5d7657f1eb8f94263a4bfc8dcca7e52de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148897 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
10 daysRemove debug commandAndreas Heinisch1-1/+0
Change-Id: I6cd82e83288724896987c591f308fb7ab0eb880a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148863 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
11 daystdf#154129 writerfilter framePr: check whole style inheritance: X/XAlignJustin Luth2-0/+1
This patch depends on HAnchor, which created vProps. XAlign is not like YAlign - which is invalid with a text anchor. XAlign is still valid with a text anchor, and so doesn't need to copy YAlign's special vAnchor default. A unit test was added just to pre-emptively assert that. There were no existing unit tests where the old and new method produced different values. Change-Id: Ib3066f3d67c01a1bca972c6a114bb726bccac5af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148714 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins
11 daystdf#112287 tdf#154129 writerfilter framePr: fix vAnchor defaultJustin Luth2-0/+9
This patch depends on previous patches for tdf#154129. yAlign takes precedence over w:y. HOWEVER, there is a clause in the documentation that complicates everything. "If [yAlign is] specified, the position for this attribute supersedes any value which is specified in the y attribute, and that value is ignored, UNLESS the vAnchor is set to 'text', in which case any relative positioning is not allowed, and [yAlign] is itself ignored" So if vAnchor is not defined, it defaults to text (FRAME), but if yAlign is defined then it should mean margin (or else yAlign has no meaning), unless of course w:y is also defined, in which case "text" anchor has meaning again and this unit test shows that w:y wins out in this case. The anchor is not affected by wrapping. [P.S. This was already set correctly in the code, but worth noting: "The standard states that the default value for the vAnchor attribute is page. Word uses a default value of 'text' for this attribute."] make CppunitTest_sw_ooxmlexport5 CPPUNIT_TEST_NAME=testTdf112287 make CppunitTest_sw_ooxmlexport5 CPPUNIT_TEST_NAME=testTdf112287B Change-Id: I953afa89e3c0974a16d43500ce590e1a481c2251 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148691 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins
11 daystdf#154129 writerfilter framePr: check whole style inheritance: VAnchorJustin Luth1-2/+2
This patch depends on HAnchor, which created vProps. A style can inherit its properties from another style, but the code was naively just checking the first paragraph style, and not any of the parents. make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf154129_framePr1 Change-Id: I72159321485aca18bc4bb8384221ff59cb685fe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148689 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins
11 daysAlways update fields when loading documentSamuel Mehrbrodt2-0/+13
to make sure that table formulas are re-evaluated after loading. When a document has a wrong sum saved (which seems to happen sometimes), this sum is used until user clicks into the table or otherwise refreshes the formula. Change-Id: I5cc3f983524b395089c17aa35d8641847a388bad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148355 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
12 daystdf#154129 writerfilter framePr: check whole style inheritance: HAnchorJustin Luth2-0/+14
A style can inherit its properties from another style, but the code was naively just checking the first paragraph style, and not any of the parents. I'm going to onboard these one at a time. make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf154129_framePr1 Change-Id: I32eabc6c1090dbc2c467da74fe32c6377e9a3875 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148686 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
13 daysAssert that we only order nodes of the same arrayMike Kaganski1-1/+1
Change-Id: Id04aa8177552624078369d33c9e7bcdc783045bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148722 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
14 daystdf#141908: CppUnittests: replace usage of sal_Int32 with colorsShady Mohamed1-1/+1
Change-Id: I0cdd505833ab0f06ef37d7219df5e7e18f00591e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148654 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-03-10tdf#104394 writerfilter: no addDummyParaForTable when PrevFramedJustin Luth2-0/+6
The dummy paragraph is only supposed to be added when the table starts the section. In this case, a framed paragraph was the first item in the section. Since it ends up being a floating item, it is probably not correct to turn off GetIsFirstParagraphInSection. In any case, this is a much more targetted fix, and thus much less likely to lead to regressions. Change-Id: I7fb2c6189ddbff5d46828b27d68667c9d4a31122 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148656 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-03-10tdf#149996 DOCX export: fix hyperlinks in nested paragraphsTünde Tóth2-0/+46
Close all hyperlinks in the paragraph where they start. Regression from commit 20a3792502120d67b1a9fdea641e15ea504359d3 "fdo#76316 : File gets corrupt after Roundtrip". Change-Id: Ied5be90601f5a494f927d43aa6ff7efd3545f993 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148353 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2023-03-10sw: PDF/UA export: produce Lbl tagged elementMichael Stahl1-0/+423
Commit bd66a0201fb6d1a127139287cc8b5bd27e3a92c3 did this for editengine text in shapes, but it turns out it's a little more complicated in sw. The SwTaggedPDFHelper nicely lived stack allocated, but list labels are SwLinePortions inside a paragraph, and they can't be painted separately, so if there's a list label the creation of LBody has to be delayed until that is processed. The SwNumberPortion can't even generate the Lbl itself, because there can be multiple portions, they are broken across lines and at script boundaries, and checking their follow flags is also tricky (see previous commit). Change-Id: I0dd383089a7ca0edddf6f805e79615c611a446f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148556 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-03-10sw lok: notify clients about view option changesParis Oplopoios1-0/+30
Send a string of the view options to the kit when the view changes Change-Id: I89f65ff1d22a83a54dde35e39eb487edda0b58e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148078 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-09CppunitTest_sw_layoutwriter: split in twoXisco Fauli2-1546/+1580
it already has 110 tests Change-Id: I4f218c873b5771e46cd2037249f0bb9db5f6b808 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148554 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-03-09tdf#148026 DOCX export: fix link with target frame and anchorTünde Tóth2-0/+26
Hyperlink with target frame and anchor didn't work after export. Change-Id: I84980e30d2e1d6d53cfe201cf4cac60354151aba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148041 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2023-03-09tdf#153964 writerfilter: column break split should inherit most propertiesJustin Luth3-4/+38
When a column break or page break split occurs, the split off paragraph should keep (most of) the properties of the original paragraph. This already happened for page breaks. Exceptions are first line indents, and numbering if there was a run to apply them to already. This commit: -tells lcl_startParagraph when column breaks are m_bIsParaSplit, resulting in the paragraph properties being copied over -clears the para properties that shouldn't apply twice. [Top Margin was more complicated and handled separately.] make CppunitTest_sw_ooxmlexport18 \ CPPUNIT_TEST_NAME=testTdf153964_firstIndentAfterBreak14 make CppunitTest_sw_ooxmlexport18 \ CPPUNIT_TEST_NAME=testTdf153964_numberingAfterBreak14 Change-Id: I5ecd25da831894536044c6dbffbb0a262f8b6828 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148452 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-03-08tdf#136904 tdf#116084 tdf#121176 sw: fix Undo & anonymized w:del in w:insLászló Németh1-2/+40
Undo/Redo crash resulted by the workaround for anonymized w:del in w:ins. Anonymized (no time stamp) redlines are loaded with Epoch time (1970-01-01) since commit 2c51746997478ad5d0e7cc64aa6489769c473d43 "tdf#146171 DOCX: fix loss of change tracking, if no date", so it's possible to fix the original DOCX import problem using this value: don't combine anonymized deletion inside/over anonymized insertion, and remove all the workaround, keeping only their adjusted unit tests, and add new tests for the export fixed finally, which keeps anonymized w:del in anonymized w:ins. Revert commit 2de1fd7d8b8bd42c66190140cc4506df0c3367f1 "tdf#125187 DOCX track changes: fix w:del within w:ins", commit df4f405a153603551f67e289bbaccf9ac39b923c "tdf#121176 DOCX track changes: same size w:del in w:ins" and commit 7a810d6a9fb79a24d00e5dbd8e1223e6f8b09677 "tdf#116084 DOCX track changes: fix w:del within w:ins". Regression from commit 2de1fd7d8b8bd42c66190140cc4506df0c3367f1 "tdf#125187 DOCX track changes: fix w:del within w:ins". See also commit 64dcedcf7c073d1819794d68a33651b14877e1b5 "tdf#147760 tdf#142902 DOCX export: anonymize date and moveFromRangeStart". Change-Id: Id6e41187e7f94154389f24dd525067ac47ec7e58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148479 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2023-03-08tdf#153964 writerfilter compat15: top margin after break splitJustin Luth3-0/+90
The problem was that the top margin was being applied to the new paragraph after the split. This is absolutely attrocious in MS Word before 2013. If I am going to be in error, I want to error on the side of being compliant with compat15, since all other versions of MS Word are now unsupported. I think I have the logic of it mostly figured out. In compat15, the top margin never applies after the break. In compat14, if the paragraph properties are not applied to a run before the break, then they can be applied after the break. make CppunitTest_sw_ooxmlexport18 \ CPPUNIT_TEST_NAME=testTdf153964_topMarginAfterBreak14 make CppunitTest_sw_ooxmlexport18 \ CPPUNIT_TEST_NAME=testTdf153964_topMarginAfterBreak15 Change-Id: I8816b391e898cfea58c2e0dbf01c881f87bbc4c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148451 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2023-03-08sw floattable: partially re-enable widow / orphan control in tablesMiklos Vajna1-0/+16
Widow / orphan control in DOCX tables were disabled in commit 8b13da71aedd094de0d351a4bd5ad43fdb4bddde (tdf#128959 DOCX import: fix missing text lines in tables, 2020-01-28). That workaround helped with the particular bugdoc, but it also disabled widow / orphan handling in general, and breaks e.g. orig-nocompat.docx from tdf#61594, because the second page's last row is meant to contain 6 lines with widow control enabled, but the model has widow control disabled, so the layout can't work properly. Fix the problem by improving the layout's WidowsAndOrphans::FindWidows() to handle conflicting widow / orphan control requirements in a fixed table row height context, so the writerfilter/ change from the above commit can be reverted without re-introducing tdf#128959. An alternative would be to keep the layout unchanged and limit the writerfilter/ change to fixed height rows, but that still feels like a (more specific) workaround. Change-Id: I8378d356e116774275dff337d17b19bd79c84c1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148456 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins