/drawinglayer/

office-5-2 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/writerfilter/CppunitTest_writerfilter_dmapper.mk
AgeCommit message (Collapse)Author
2023-10-26tdf#155040 sw floattable, RTF: fix table is overlapped by subsequent inline oneMiklos Vajna
The document had overlapping text on load since commit 05425f73bfa41d3f7591461e2ad0beb4fafc39b4 (sw floatable: teach the RTF import about SwFormatFlySplit, 2023-04-21). Interestingly the DOCX equivalent was fine, there the inline table is shifted down, below the floating table, so the overlap doesn't happen. Fix the problem by moving the AddVerticalFrameOffsets=true code from the DOCX filter to the shared dmapper, because RTF needs the same. See commit 50223ea6e212b60b7d33839c2753c5601fb50f95 (tdf#98987 sw: add AddVerticalFrameOffsets compat mode, 2016-03-31) for more details about this compat flag. It was already enabled for DOC, too. (cherry picked from commit 612629f4a81acd7b851b7eccc97aba9a5915d13c) [ The backport also contains a subset of commit 56e17186ffcda7e93530bef3a06120584bb7d579 ([API CHANGE] Merge sfx2::XmlDump into css::qa::XDumper, 2022-12-10), otherwise it's hard to verify the layout from writerfilter/. ] Conflicts: chart2/source/model/main/ChartModel.cxx chart2/source/view/main/ChartView.cxx include/comphelper/dumpxmltostring.hxx sw/source/uibase/inc/unotxvw.hxx Change-Id: I948b179c9ec5fa24377014b0e86826568c417b6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158481 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-09-22Related: tdf#55160 sw floattable, nested DOCX imp: fix inner tbl at cell startMiklos Vajna
The bugdoc has an outer table and also two inner tables: the problematic one is the floating table anchored at the start of B1, which should float but does not. This special-casing was added in commit c1eebcdac9f2b289fd363399130c485ca5ff444c (tdf#79329 DOCX import: fix missing outer table with floattable at cell start, 2016-11-08), because there was no easy way to make sure that an inner floating table at cell start keeps the outer table import working, and having 2 inline tables is better than having an inner floating table and no outer table at all. The root of the problem is that in case an SwXParagraph tracks the outer cell start and we have an inner floating table, then the inner conversion to text frame will invalidate that SwXParagraph, so the outer table conversion will fail. Fix the problem by creating a cursor at cell start, moving it away, performing the inner table resolution. And in case the cell start SwXParagraph is now invalid, then move the cursor back and work with that position. The original bugdoc has 2 floating tables at cell start, which is still broken, but this approach allows fixing that in a later commit; while the old approach simply didn't notice that the 2nd floating table is also at cell start. (cherry picked from commit 2d43c34333076fad092f0cdc0f60f81580acdbee) Change-Id: Iedad7b2f023e88dfc5de7875ebc00320c2e6ad65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157007 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-10sw floattable: import <w:tblOverlap w:val="never"> from DOCXMiklos Vajna
The bugdoc has 2 floating tables, the second one is shifted down in Word, so it doesn't overlap, even if the positioning attributes would lay them out with an overlap. The bugdoc has <w:tblOverlap w:val="never"> set for the second table, we can import that to Writer's SwFormatWrapInfluenceOnObjPos::mbAllowOverlap, which was originally added for shapes. writerfilter/ only has access to the UNO API, so do this via the AllowOverlap text frame property. The layout is still missing for this, but now the doc model is correct. (cherry picked from commit d3a0ff741f5a7ff0dcec301e5b34ee9d638acf98) Change-Id: I25df9b75633c05af206b94ff0ad71bd240f393f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155539 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-05-31sw floattable: handle <w:doNotBreakWrappedTables> in the DOCX filterMiklos Vajna
<w:doNotBreakWrappedTables> primarily appears in documents imported from RTF, unless \nobrkwrptbl is specified there (which, confusingly, means to do split floating tables). (cherry picked from commit f5dc52dc9a068fec3323c3089929a81675b0d1ba) Conflicts: sw/qa/filter/ww8/ww8.cxx Change-Id: I1891b89787719805e6c87045dee3c63c68ed2940 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152296 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-11-11move password handling from SwModelTestBase to UnoApiTestXisco Fauli
so other places inheriting from UnoApiTest can also import/export protected documents Change-Id: I0e2716204dbb171c9e17e3939b266977e1b96dda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142592 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-09UnoApiTest: factor out common codeXisco Fauli
Change-Id: I1d84d8c1e371016a4f4f068af1e9c76635f28cf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142490 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-08UnoApiTest: simplify code by using tempfile memberXisco Fauli
SwModelTestBase does the same. this will help to make SwModelTestBase inherit from UnoApiTest Change-Id: If1c824cf92f0e8b70253e4d5fdeddcaa521d4632 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142287 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-01CppunitTest_writerfilter_dmapper: inherit from UnoApiTestXisco Fauli
Change-Id: I342085e3c0e31794e0ec08f3b26ccf17caa8d2d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142097 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>