sw/qa/extras/odfexport/data/tdf169882.odt |binary sw/qa/extras/odfexport/odfexport4.cxx | 88 ++++++++------- sw/source/core/layout/flycnt.cxx | 20 --- sw/source/core/layout/objectformattertxtfrm.cxx | 138 +----------------------- sw/source/core/layout/objectformattertxtfrm.hxx | 6 - 5 files changed, 64 insertions(+), 188 deletions(-)
New commits: commit c6d9c76be68a8eea65d4c0c236006b7ee9ec8355 Author: Mike Kaganski <[email protected]> AuthorDate: Wed Dec 10 21:13:55 2025 +0500 Commit: Mike Kaganski <[email protected]> CommitDate: Thu Dec 11 18:10:31 2025 +0100 tdf#169882: revert commit c799de145f7e289f31e3669646e5bd12814e6c5e (tdf#138518 sw: layout: avoid moving flys forward prematurely, 2021-04-22). That change made sure that if a fly tries to move its anchor forward, and there are more fly frames on this page anchored after this fly's anchor, then the anchor was not added to "moved forward frames" list that is used to prevent frames from moving backward. (Note that the problem is similar to the problem fixed by commit 02a1edc64bde14401899d0f026d49dbf125e3ffc - see its commit message for details.) Bugdoc for tdf#169882 has a table with a row having two cells, each with an image; the images require the row to move forward. For the first cell, layout moved the image forward (which caused the whole row to move), but didn't mark its anchor, because there was another fly "below this". Then the text succeeded moving back, creating a layout loop. Before the fix of tdf#166871 (which caused the regression addressed here), the optimization allowed the layout to skip the problem (but it was actually possible to trigger it in a different way). It could be possible to modify the code to special-case table rows. The code in SwObjectFormatterTextFrame::CheckMovedFwdCondition contained a similar condition for "on same page" case. But it seems that the whole workaround is now not needed. Reverting it keeps bugdoc from tdf#138518 fixed, so avoid the fragile workaround. This change also reverts commit d9e38d5830ac278d7180b96fb6cefe3ee8ef6d76 (tdf#135220 sw: fix layout after SwUndoDelete), which keeps its steps behave correctly. Change-Id: I299e8f78b83c1d73402e548ea7f6cce1a2e5af0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195395 Reviewed-by: Mike Kaganski <[email protected]> Tested-by: Jenkins diff --git a/sw/qa/extras/odfexport/data/tdf169882.odt b/sw/qa/extras/odfexport/data/tdf169882.odt new file mode 100644 index 000000000000..9f5ff59ec5f1 Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf169882.odt differ diff --git a/sw/qa/extras/odfexport/odfexport4.cxx b/sw/qa/extras/odfexport/odfexport4.cxx index 94f6b03d00ba..e7cb22bcd3fb 100644 --- a/sw/qa/extras/odfexport/odfexport4.cxx +++ b/sw/qa/extras/odfexport/odfexport4.cxx @@ -1743,6 +1743,13 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf162120StyleWritingModeAutomaticSerialization) assertXPath(pContentDoc, "//style:paragraph-properties[@style:writing-mode-automatic]", 2); } +CPPUNIT_TEST_FIXTURE(Test, testTdf169882) +{ + // The document must not hang on layout + createSwDoc("tdf169882.odt"); + saveAndReload(TestFilter::ODT); +} + } // end of anonymous namespace CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index f31a5deda331..80c01412b479 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -444,17 +444,12 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext) // <SwObjectFormatterTextFrame::CheckMovedFwdCondition(..)> sal_uInt32 nToPageNum( 0 ); bool bDummy( false ); - bool bPageHasFlysAnchoredBelowThis(false); if ( SwObjectFormatterTextFrame::CheckMovedFwdCondition( // TODO: what if this fly moved bc it's in table? does sth prevent that? *this, *GetPageFrame(), - bAnchoredAtMaster, nToPageNum, bDummy, - bPageHasFlysAnchoredBelowThis) ) + bAnchoredAtMaster, nToPageNum, bDummy)) { - if (!bPageHasFlysAnchoredBelowThis) - { - bConsiderWrapInfluenceDueToMovedFwdAnchor = true; - } + bConsiderWrapInfluenceDueToMovedFwdAnchor = true; // mark anchor text frame // directly, that it is moved forward by object positioning. SwTextFrame* pAnchorTextFrame( static_cast<SwTextFrame*>(AnchorFrame()) ); @@ -465,21 +460,14 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext) { if ( nAnchorFrameToPageNum < nToPageNum ) { - if (!bPageHasFlysAnchoredBelowThis) - { - SwLayouter::RemoveMovedFwdFrame(rDoc, *pAnchorTextFrame); - } + SwLayouter::RemoveMovedFwdFrame(rDoc, *pAnchorTextFrame); } else bInsert = false; } if ( bInsert ) { - if (!bPageHasFlysAnchoredBelowThis) - { - SwLayouter::InsertMovedFwdFrame(rDoc, *pAnchorTextFrame, - nToPageNum); - } + SwLayouter::InsertMovedFwdFrame(rDoc, *pAnchorTextFrame, nToPageNum); } } } diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx index 00f215b9ecfc..19f544302954 100644 --- a/sw/source/core/layout/objectformattertxtfrm.cxx +++ b/sw/source/core/layout/objectformattertxtfrm.cxx @@ -29,7 +29,6 @@ #include <fmtwrapinfluenceonobjpos.hxx> #include <fmtfollowtextflow.hxx> #include <layact.hxx> -#include <flyfrm.hxx> #include <ftnfrm.hxx> #include <osl/diagnose.h> @@ -230,7 +229,6 @@ bool SwObjectFormatterTextFrame::DoFormatObj( SwAnchoredObject& _rAnchoredObj, sal_uInt32 nToPageNum( 0 ); // #i43913# bool bDummy( false ); - bool bPageHasFlysAnchoredBelowThis(false); // see how SwObjectFormatter::FormatObjsAtFrame_() checks // "pPageFrameOfAnchor == &mrPageFrame" - only caller relevant for // this subclass @@ -238,8 +236,7 @@ bool SwObjectFormatterTextFrame::DoFormatObj( SwAnchoredObject& _rAnchoredObj, if ( SwObjectFormatterTextFrame::CheckMovedFwdCondition( *GetCollectedObj( nIdx ), GetPageFrame(), IsCollectedAnchoredAtMaster( nIdx ), - nToPageNum, bDummy, - bPageHasFlysAnchoredBelowThis)) + nToPageNum, bDummy)) { // #i49987# - consider, that anchor frame // could already been marked to move forward. @@ -251,10 +248,7 @@ bool SwObjectFormatterTextFrame::DoFormatObj( SwAnchoredObject& _rAnchoredObj, { if ( nMovedFwdToPageNum < nToPageNum ) { - if (!bPageHasFlysAnchoredBelowThis) - { - SwLayouter::RemoveMovedFwdFrame(rDoc, mrAnchorTextFrame); - } + SwLayouter::RemoveMovedFwdFrame(rDoc, mrAnchorTextFrame); } else bInsert = false; @@ -263,11 +257,7 @@ bool SwObjectFormatterTextFrame::DoFormatObj( SwAnchoredObject& _rAnchoredObj, { // Indicate that anchor text frame has to move forward and // invalidate its position to force a re-format. - if (!bPageHasFlysAnchoredBelowThis) - { - SwLayouter::InsertMovedFwdFrame(rDoc, - mrAnchorTextFrame, nToPageNum); - } + SwLayouter::InsertMovedFwdFrame(rDoc, mrAnchorTextFrame, nToPageNum); mrAnchorTextFrame.InvalidatePos(); // Indicate restart of the layout process @@ -369,14 +359,13 @@ bool SwObjectFormatterTextFrame::DoFormatObjs() sal_uInt32 nToPageNum( 0 ); // #i43913# bool bInFollow( false ); - bool bPageHasFlysAnchoredBelowThis(false); SwAnchoredObject* pObj = nullptr; if ( !mrAnchorTextFrame.IsFollow() ) { pObj = GetFirstObjWithMovedFwdAnchor( // #i35017# - constant name has changed text::WrapInfluenceOnPosition::ONCE_CONCURRENT, - nToPageNum, bInFollow, bPageHasFlysAnchoredBelowThis ); + nToPageNum, bInFollow ); } // #i35911# if ( pObj && pObj->HasClearedEnvironment() ) @@ -398,21 +387,15 @@ bool SwObjectFormatterTextFrame::DoFormatObjs() { if ( nTmpToPageNum < pAnchorPageFrame->GetPhyPageNum() ) { - if (!bPageHasFlysAnchoredBelowThis) - { - SwLayouter::RemoveMovedFwdFrame(rDoc, mrAnchorTextFrame); - } + SwLayouter::RemoveMovedFwdFrame(rDoc, mrAnchorTextFrame); } else bInsert = false; } if ( bInsert ) { - if (!bPageHasFlysAnchoredBelowThis) - { - SwLayouter::InsertMovedFwdFrame(rDoc, mrAnchorTextFrame, - pAnchorPageFrame->GetPhyPageNum()); - } + SwLayouter::InsertMovedFwdFrame(rDoc, mrAnchorTextFrame, + pAnchorPageFrame->GetPhyPageNum()); mrAnchorTextFrame.InvalidatePos(); bSuccess = false; InvalidatePrevObjs( *pObj ); @@ -532,8 +515,7 @@ void SwObjectFormatterTextFrame::InvalidateFollowObjs( SwAnchoredObject& _rAncho SwAnchoredObject* SwObjectFormatterTextFrame::GetFirstObjWithMovedFwdAnchor( const sal_Int16 _nWrapInfluenceOnPosition, sal_uInt32& _noToPageNum, - bool& _boInFollow, - bool& o_rbPageHasFlysAnchoredBelowThis) + bool& _boInFollow) { // #i35017# - constant names have changed OSL_ENSURE( _nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE || @@ -560,8 +542,7 @@ SwAnchoredObject* SwObjectFormatterTextFrame::GetFirstObjWithMovedFwdAnchor( if ( SwObjectFormatterTextFrame::CheckMovedFwdCondition( *GetCollectedObj( i ), GetPageFrame(), IsCollectedAnchoredAtMaster( i ), - _noToPageNum, _boInFollow, - o_rbPageHasFlysAnchoredBelowThis) ) + _noToPageNum, _boInFollow ) ) { pRetAnchoredObj = pAnchoredObj; break; @@ -572,40 +553,6 @@ SwAnchoredObject* SwObjectFormatterTextFrame::GetFirstObjWithMovedFwdAnchor( return pRetAnchoredObj; } -static SwRowFrame const* FindTopLevelRowFrame(SwFrame const*const pFrame) -{ - SwRowFrame * pRow = const_cast<SwFrame*>(pFrame)->FindRowFrame(); - if (!pRow) - return nullptr; - // looks like SwTabFrame has mbInfTab = true so go up 2 levels - while (pRow->GetUpper()->GetUpper()->IsInTab()) - { - pRow = pRow->GetUpper()->GetUpper()->FindRowFrame(); - } - return pRow; -} - -static SwContentFrame const* FindFrameInBody(SwAnchoredObject const& rAnchored) -{ - SwFrame const*const pAnchor(rAnchored.GetAnchorFrame()); - assert(pAnchor); - if (pAnchor->IsPageFrame() || pAnchor->FindFooterOrHeader()) - { - return nullptr; - } - if (pAnchor->IsInFly()) - { - return FindFrameInBody(*pAnchor->FindFlyFrame()); - } - if (pAnchor->IsInFootnote()) - { - return pAnchor->FindFootnoteFrame()->GetRef(); - } - assert(pAnchor->IsInDocBody()); - assert(pAnchor->IsContentFrame()); - return static_cast<SwContentFrame const*>(pAnchor); -} - // #i58182# // - replace private method by corresponding static public method bool SwObjectFormatterTextFrame::CheckMovedFwdCondition( @@ -613,8 +560,7 @@ bool SwObjectFormatterTextFrame::CheckMovedFwdCondition( SwPageFrame const& rFromPageFrame, const bool _bAnchoredAtMasterBeforeFormatAnchor, sal_uInt32& _noToPageNum, - bool& _boInFollow, - bool& o_rbPageHasFlysAnchoredBelowThis) + bool& _boInFollow) { const sal_uInt32 _nFromPageNum(rFromPageFrame.GetPhyPageNum()); bool bAnchorIsMovedForward( false ); @@ -691,70 +637,6 @@ bool SwObjectFormatterTextFrame::CheckMovedFwdCondition( } } - if (bAnchorIsMovedForward) - { - // tdf#138518 try to determine if there is a fly on page rFromPageFrame - // which is anchored in a frame that is "below" the anchor frame - // of _rAnchoredObj, such that it should move to the next page before - // _rAnchoredObj does - if (auto * pObjs = rFromPageFrame.GetSortedObjs()) - { - for (SwAnchoredObject *const pObj : *pObjs) - { - SwPageFrame const*const pObjAnchorPage(pObj->FindPageFrameOfAnchor()); - assert(pObjAnchorPage); - if ((pObjAnchorPage == &rFromPageFrame - ? _boInFollow // same-page but will move forward - : rFromPageFrame.GetPhyPageNum() < pObjAnchorPage->GetPhyPageNum()) - && pObj->GetFrameFormat()->GetAnchor().GetAnchorId() - != RndStdIds::FLY_AS_CHAR) - { - assert(pPageFrameOfAnchor); - if (pPageFrameOfAnchor->GetPhyPageNum() < pObjAnchorPage->GetPhyPageNum()) - { - SAL_INFO("sw.layout", "SwObjectFormatterTextFrame::CheckMovedFwdCondition(): o_rbPageHasFlysAnchoredBelowThis because next page"); - o_rbPageHasFlysAnchoredBelowThis = true; - break; - } - // on same page: check if it's in next-chain in the document body - // (in case both are in the same fly the flag must not be - // set because the whole fly moves at once) - SwContentFrame const*const pInBodyFrameObj(FindFrameInBody(*pObj)); - SwContentFrame const*const pInBodyFrameAnchoredObj(FindFrameInBody(_rAnchoredObj)); - if (pInBodyFrameObj && pInBodyFrameAnchoredObj) - { - bool isBreakMore(false); - // currently this ignores index of at-char flys - for (SwContentFrame const* pContentFrame = pInBodyFrameAnchoredObj->FindNextCnt(); - pContentFrame; - pContentFrame = pContentFrame->FindNextCnt()) - { - if (pInBodyFrameObj == pContentFrame) - { - // subsequent cells in a row are not automatically - // "below" and the row could potentially be split - // TODO refine check if needed - if (!pInBodyFrameAnchoredObj->IsInTab() - || FindTopLevelRowFrame(pInBodyFrameObj) - != FindTopLevelRowFrame(pInBodyFrameAnchoredObj)) - { // anchored in next chain on same page - SAL_INFO("sw.layout", "SwObjectFormatterTextFrame::CheckMovedFwdCondition(): o_rbPageHasFlysAnchoredBelowThis because next chain on same page"); - o_rbPageHasFlysAnchoredBelowThis = true; - isBreakMore = true; - } - break; - } - } - if (isBreakMore) - { - break; - } - } - } - } - } - } - return bAnchorIsMovedForward; } diff --git a/sw/source/core/layout/objectformattertxtfrm.hxx b/sw/source/core/layout/objectformattertxtfrm.hxx index 25a7a7e92b77..1785ba25a46f 100644 --- a/sw/source/core/layout/objectformattertxtfrm.hxx +++ b/sw/source/core/layout/objectformattertxtfrm.hxx @@ -96,8 +96,7 @@ class SwObjectFormatterTextFrame : public SwObjectFormatter SwAnchoredObject* GetFirstObjWithMovedFwdAnchor( const sal_Int16 _nWrapInfluenceOnPosition, sal_uInt32& _noToPageNum, - bool& _boInFollow, - bool& o_rbPageHasFlysAnchoredBelowThis); + bool& _boInFollow); /** method to format the anchor frame for checking of the move forward condition @@ -181,8 +180,7 @@ class SwObjectFormatterTextFrame : public SwObjectFormatter SwPageFrame const& rFromPageFrame, const bool _bAnchoredAtMasterBeforeFormatAnchor, sal_uInt32& _noToPageNum, - bool& _boInFollow, - bool& o_rbPageHasFlysAnchoredBelowThis); + bool& _boInFollow); }; #endif commit 50002d314141b7b67f14106fbd9fa1213f39859e Author: Mike Kaganski <[email protected]> AuthorDate: Thu Dec 11 08:02:01 2025 +0100 Commit: Mike Kaganski <[email protected]> CommitDate: Thu Dec 11 18:10:24 2025 +0100 Fix test checking metafile's coordinates Respect the mapmode stored in the metafile, to enable it on all platforms. On my Windows system, it was <mapmode mapunit="MapRelative" x="-1065" y="-284" scalex="(1/1)" scaley="(1/1)"/> and on a Linux system, it was <mapmode mapunit="MapRelative" x="-284" y="-284" scalex="(1/1)" scaley="(1/1)"/> which explained the difference. Note that the metafile mapmode is obviously unstable. E.g., commit I299e8f78b83c1d73402e548ea7f6cce1a2e5af0d causes the uncorrected test fail on Linux with - Expected: 2306 - Actual : 4595 - In <>, attribute 'x' of '//textarray[1]' incorrect value. But curiously, running the test *individually*, like make CppunitTest_sw_odfexport4 CPPUNIT_TEST_NAME=testTdf78510 passes. So the change to mapmode is caused by some other test, which is worrying, but that mapmode change is not addressed in this patch. The fixed, more robust test will pass. Change-Id: Ib004fd89aa03be38ab83d7ef70e0d5e791987298 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195421 Reviewed-by: Mike Kaganski <[email protected]> Tested-by: Jenkins diff --git a/sw/qa/extras/odfexport/odfexport4.cxx b/sw/qa/extras/odfexport/odfexport4.cxx index 45cccd53f3e1..94f6b03d00ba 100644 --- a/sw/qa/extras/odfexport/odfexport4.cxx +++ b/sw/qa/extras/odfexport/odfexport4.cxx @@ -763,69 +763,70 @@ DECLARE_ODFEXPORT_TEST(testTdf78510, "WordTest_edit.odt") assertXPath(pXmlDoc, "/root/page[1]/body/txt[13]/infos/prtBounds", "right", u"9359"); } - // now check the positions where text is actually painted - - // wonder how fragile this is... - // FIXME some platform difference, 1st one is 2306 on Linux, 3087 on WNT ? - // some Mac has 3110 -#if !defined(_WIN32) && !defined(MACOSX) + // now check the positions where text is actually painted { std::shared_ptr<GDIMetaFile> pMetaFile = getSwDocShell()->GetPreviewMetaFile(); MetafileXmlDump aDumper; xmlDocUniquePtr pXmlDoc = dumpAndParse(aDumper, *pMetaFile); + auto x_value = [ this, &pXmlDoc, + dx = getXPath(pXmlDoc, "//mapmode", "x").toInt32() ](const char* xPath) + { + return static_cast<int>(getXPath(pXmlDoc, xPath, "x").toInt32() + dx); + }; + // 1: inherited from paragraph style and overridden by list // bullet char is extra - assertXPath(pXmlDoc, "//textarray[1]", "x", u"2306"); + CPPUNIT_ASSERT_EQUAL(2022, x_value("//textarray[1]")); // text is after a tab from list - haven't checked if that is correct? - assertXPath(pXmlDoc, "//textarray[2]", "x", u"2873"); + CPPUNIT_ASSERT_EQUAL(2589, x_value("//textarray[2]")); // second line - assertXPath(pXmlDoc, "//textarray[3]", "x", u"2873"); + CPPUNIT_ASSERT_EQUAL(2589, x_value("//textarray[3]")); // 2: as 1 + paragraph sets firstline - assertXPath(pXmlDoc, "//textarray[4]", "x", u"3440"); - assertXPath(pXmlDoc, "//textarray[5]", "x", u"3593"); - assertXPath(pXmlDoc, "//textarray[6]", "x", u"2873"); + CPPUNIT_ASSERT_EQUAL(3156, x_value("//textarray[4]")); + CPPUNIT_ASSERT_EQUAL(3309, x_value("//textarray[5]")); + CPPUNIT_ASSERT_EQUAL(2589, x_value("//textarray[6]")); // 3: as 1 + paragraph sets textleft - assertXPath(pXmlDoc, "//textarray[7]", "x", u"2873"); - assertXPath(pXmlDoc, "//textarray[8]", "x", u"3440"); - assertXPath(pXmlDoc, "//textarray[9]", "x", u"3440"); + CPPUNIT_ASSERT_EQUAL(2589, x_value("//textarray[7]")); + CPPUNIT_ASSERT_EQUAL(3156, x_value("//textarray[8]")); + CPPUNIT_ASSERT_EQUAL(3156, x_value("//textarray[9]")); // 4: as 1 + paragraph sets firstline, textleft - assertXPath(pXmlDoc, "//textarray[10]", "x", u"2306"); - assertXPath(pXmlDoc, "//textarray[11]", "x", u"3440"); - assertXPath(pXmlDoc, "//textarray[12]", "x", u"3440"); + CPPUNIT_ASSERT_EQUAL(2022, x_value("//textarray[10]")); + CPPUNIT_ASSERT_EQUAL(3156, x_value("//textarray[11]")); + CPPUNIT_ASSERT_EQUAL(3156, x_value("//textarray[12]")); // 5: as 1 + paragraph sets firstline - assertXPath(pXmlDoc, "//textarray[13]", "x", u"1739"); - assertXPath(pXmlDoc, "//textarray[14]", "x", u"2873"); - assertXPath(pXmlDoc, "//textarray[15]", "x", u"2873"); + CPPUNIT_ASSERT_EQUAL(1455, x_value("//textarray[13]")); + CPPUNIT_ASSERT_EQUAL(2589, x_value("//textarray[14]")); + CPPUNIT_ASSERT_EQUAL(2589, x_value("//textarray[15]")); // 6: as 1 - assertXPath(pXmlDoc, "//textarray[16]", "x", u"2306"); - assertXPath(pXmlDoc, "//textarray[17]", "x", u"2873"); + CPPUNIT_ASSERT_EQUAL(2022, x_value("//textarray[16]")); + CPPUNIT_ASSERT_EQUAL(2589, x_value("//textarray[17]")); // 8: inherited from paragraph style and overridden by list - assertXPath(pXmlDoc, "//textarray[18]", "x", u"2873"); - assertXPath(pXmlDoc, "//textarray[19]", "x", u"3746"); - assertXPath(pXmlDoc, "//textarray[20]", "x", u"2306"); + CPPUNIT_ASSERT_EQUAL(2589, x_value("//textarray[18]")); + CPPUNIT_ASSERT_EQUAL(3462, x_value("//textarray[19]")); + CPPUNIT_ASSERT_EQUAL(2022, x_value("//textarray[20]")); // 9: as 8 + paragraph sets firstline - assertXPath(pXmlDoc, "//textarray[21]", "x", u"3440"); - assertXPath(pXmlDoc, "//textarray[22]", "x", u"3746"); - assertXPath(pXmlDoc, "//textarray[23]", "x", u"2306"); + CPPUNIT_ASSERT_EQUAL(3156, x_value("//textarray[21]")); + CPPUNIT_ASSERT_EQUAL(3462, x_value("//textarray[22]")); + CPPUNIT_ASSERT_EQUAL(2022, x_value("//textarray[23]")); // 10: as 8 + paragraph sets textleft - assertXPath(pXmlDoc, "//textarray[24]", "x", u"4007"); - assertXPath(pXmlDoc, "//textarray[25]", "x", u"4880"); - assertXPath(pXmlDoc, "//textarray[26]", "x", u"3440"); + CPPUNIT_ASSERT_EQUAL(3723, x_value("//textarray[24]")); + CPPUNIT_ASSERT_EQUAL(4596, x_value("//textarray[25]")); + CPPUNIT_ASSERT_EQUAL(3156, x_value("//textarray[26]")); // 11: as 8 + paragraph sets firstline, textleft - assertXPath(pXmlDoc, "//textarray[27]", "x", u"2306"); - assertXPath(pXmlDoc, "//textarray[28]", "x", u"3440"); - assertXPath(pXmlDoc, "//textarray[29]", "x", u"3440"); + CPPUNIT_ASSERT_EQUAL(2022, x_value("//textarray[27]")); + CPPUNIT_ASSERT_EQUAL(3156, x_value("//textarray[28]")); + CPPUNIT_ASSERT_EQUAL(3156, x_value("//textarray[29]")); // 12: as 8 + paragraph sets firstline - assertXPath(pXmlDoc, "//textarray[30]", "x", u"1172"); - assertXPath(pXmlDoc, "//textarray[31]", "x", u"1739"); - assertXPath(pXmlDoc, "//textarray[32]", "x", u"2306"); + CPPUNIT_ASSERT_EQUAL(888, x_value("//textarray[30]")); + CPPUNIT_ASSERT_EQUAL(1455, x_value("//textarray[31]")); + CPPUNIT_ASSERT_EQUAL(2022, x_value("//textarray[32]")); // 13: as 8 - assertXPath(pXmlDoc, "//textarray[33]", "x", u"2873"); - assertXPath(pXmlDoc, "//textarray[34]", "x", u"3746"); + CPPUNIT_ASSERT_EQUAL(2589, x_value("//textarray[33]")); + CPPUNIT_ASSERT_EQUAL(3462, x_value("//textarray[34]")); } -#endif } CPPUNIT_TEST_FIXTURE(Test, testParagraphMarkerMarkupRoundtrip)
