/source/de/readlicense_oo/

cs-git' href='git://go.suokunlong.cn/lo/core' title='lo/core Git repository'/>
summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/objectformattertxtfrm.hxx
AgeCommit message (Collapse)Author
2021-05-07tdf#138518 sw: layout: fix assert on ooo43913-1.docMichael Stahl
Assertion `rAnchoredObjPage.GetPhyPageNum() == _nFromPageNum' failed. Because not only the fly's anchor frame moves forward in FormatAnchorFrameForCheckMoveFwd(), but also the fly itself, apparently because it's in a table: 0 SwAnchoredObject::SetPageFrame(SwPageFrame*) (this=0x5a1d3d8, _pNewPageFrame=0x8cfbeb0) at sw/source/core/layout/anchoredobject.cxx:162 1 SwPageFrame::MoveFly(SwFlyFrame*, SwPageFrame*) (this=0x8cbd8c0, pToMove=0x5a1d280, pDest=0x8cfbeb0) at sw/source/core/layout/flylay.cxx:985 2 lcl_ArrangeLowers(SwLayoutFrame*, tools::Long, bool) (pLay=0x8cf80c0, lYStart=179488, bInva=false) at sw/source/core/layout/tabfrm.cxx:5000 3 SwCellFrame::Format(OutputDevice*, SwBorderAttrs const*) (this=0x8cf80c0, pAttrs=0x8ce78c0) at sw/source/core/layout/tabfrm.cxx:5359 4 SwLayoutFrame::MakeAll(OutputDevice*) (this=0x8cf80c0) at sw/source/core/layout/calcmove.cxx:1036 5 SwFrame::PrepareMake(OutputDevice*) (this=0x8cf80c0, pRenderContext=0x5b7fcf0) at sw/source/core/layout/calcmove.cxx:375 6 SwFrame::Calc(OutputDevice*) const (this=0x8cf80c0, pRenderContext=0x5b7fcf0) at sw/source/core/layout/trvlfrm.cxx:1792 7 SwFrame::MakePos() (this=0x8cebdb0) at sw/source/core/layout/calcmove.cxx:627 8 SwTextFrame::MakePos() (this=0x8cebdb0) at sw/source/core/text/frmform.cxx:340 9 SwContentFrame::MakeAll(OutputDevice*) (this=0x8cebdb0) at sw/source/core/layout/calcmove.cxx:1412 10 SwFrame::PrepareMake(OutputDevice*) (this=0x8cebdb0, pRenderContext=0x5b7fcf0) at sw/source/core/layout/calcmove.cxx:286 11 SwFrame::Calc(OutputDevice*) const (this=0x8cebdb0, pRenderContext=0x5b7fcf0) at sw/source/core/layout/trvlfrm.cxx:1792 12 SwTextFrame::CalcFollow(o3tl::strong_int<int, Tag_TextFrameIndex>) (this=0x5ae2c60, nTextOfst=...) at sw/source/core/text/frmform.cxx:279 13 SwTextFrame::AdjustFollow_(SwTextFormatter&, o3tl::strong_int<int, Tag_TextFrameIndex>, o3tl::strong_int<int, Tag_TextFrameIndex>, unsigned char) (this=0x5ae2c60, rLine=..., nOffset=..., nEnd=..., nMode=1 '\001') at sw/source/core/text/frmform.cxx:611 14 SwTextFrame::FormatAdjust(SwTextFormatter&, WidowsAndOrphans&, o3tl::strong_int<int, Tag_TextFrameIndex>, bool) (this=0x5ae2c60, rLine=..., rFrameBreak=..., nStrLen=..., bDummy=false) at sw/source/core/text/frmform.cxx:1166 15 SwTextFrame::Format_(SwTextFormatter&, SwTextFormatInfo&, bool) (this=0x5ae2c60, rLine=..., rInf=..., bAdjust=false) at sw/source/core/text/frmform.cxx:1613 16 SwTextFrame::Format_(OutputDevice*, SwParaPortion*) (this=0x5ae2c60, pRenderContext=0x5b7fcf0, pPara=0x8d07490) at sw/source/core/text/frmform.cxx:1720 17 SwTextFrame::Format(OutputDevice*, SwBorderAttrs const*) (this=0x5ae2c60, pRenderContext=0x5b7fcf0) at sw/source/core/text/frmform.cxx:1910 18 SwContentFrame::MakeAll(OutputDevice*) (this=0x5ae2c60) at sw/source/core/layout/calcmove.cxx:1525 19 SwFrame::PrepareMake(OutputDevice*) (this=0x5ae2f80, pRenderContext=0x5b7fcf0) at sw/source/core/layout/calcmove.cxx:321 20 SwFrame::Calc(OutputDevice*) const (this=0x5ae2f80, pRenderContext=0x5b7fcf0) at sw/source/core/layout/trvlfrm.cxx:1792 21 SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs(SwTextFrame&) (_rAnchorTextFrame=...) at sw/source/core/layout/objectformattertxtfrm.cxx:905 22 SwObjectFormatterTextFrame::FormatAnchorFrameForCheckMoveFwd() (this=0x8ce5720) at sw/source/core/layout/objectformattertxtfrm.cxx:919 23 SwObjectFormatterTextFrame::DoFormatObjs() (this=0x8ce5720) at sw/source/core/layout/objectformattertxtfrm.cxx:368 24 SwObjectFormatter::FormatObjsAtFrame(SwFrame&, SwPageFrame const&, SwLayAction*) (_rAnchorFrame=..., _rPageFrame=..., _pLayAction=0x0) at sw/source/core/layout/objectformatter.cxx:160 25 SwContentFrame::CalcLowers(SwLayoutFrame&, SwLayoutFrame const&, long, bool) (rLay=..., rDontLeave=..., nBottom=192048, bSkipRowSpanCells=true) at sw/source/core/layout/tabfrm.cxx:1534 26 lcl_RecalcRow(SwRowFrame&, tools::Long) (rRow=..., nBottom=192048) at sw/source/core/layout/tabfrm.cxx:1653 27 SwTabFrame::MakeAll(OutputDevice*) (this=0x8cf5f80, pRenderContext=0x5b7fcf0) at sw/source/core/layout/tabfrm.cxx:2425 It looks like the _nFromPageNum is always from the SwObjectFormatter::mrPageFrame anyway because that's a precondition of the mpPgNumAndTypeOfAnchors->Collect() being called, so just rely on that to get the correct page. (regression from c799de145f7e289f31e3669646e5bd12814e6c5e) Change-Id: Ibdffb2121cffbc04320d17a29ab2e160dec4250b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115188 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-04-22tdf#138518 sw: layout: avoid moving flys forward prematurelyMichael Stahl
(regression from b9ef71476fd70bc13f50ebe80390e0730d1b7afb "tdf#134298 sw: layout: remove left-over page frame without content") When updating the 3rd ToX, the change to remove empty page frames causes one page frame to be deleted. On the subsequent layout, things generally move backward, but there are some fly-related hiccups; the first problem is visible on page 7. Commit eb85de8e6b61fb3fcb6c03ae0145f7fe5478bccf "sw: layout: if fly's anchor moves forward, move fly off SwPageFrame" helps quite a bit, but not completely; now the first problem happens on page 54, when SwTextFrame 1261 and its fly 3132 are formatted. Frame 1261 moves forward to page 55, and then SwObjectFormatterTextFrame::CheckMovedFwdCondition() returns true and so SwMovedFwdFramesByObjPos::Insert() is called to prevent frame 1261 from moving back to page 54. But the reason why it moved forward is that there are 3 flys on page 54 that are anchored on frames in the next-chain of 1261, namely 1275, 1283 and 1284; if these flys weren't on the page then 1261 would fit. While the move forward cannot be easily prevented in the situation, it's possible to avoid the entry into the SwMovedFwdFramesByObjPos map, by detecting that there are flys on the page that would should forward *before* the current one does. With this fix and the above mentioned commit to get the flys off the page, frame 1261 will eventually move back to page 54 again. Change-Id: I83e44d65a0b889a49a313b0cd8b08efce4c3afa7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114478 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2020-03-13Revert "loplugin:constfields in sw"Noel Grandin
This reverts commit 4969f4c0d3e2581aaa8a5b5a5769840fa6b6f8ea. Change-Id: I527e9366b05e8a20633720e334395b285991c524 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90473 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-03loplugin:constfields in swNoel Grandin
Change-Id: I1eb6583bb9ec815bc0564b0d7c676f5b1fb9045f Reviewed-on: https://gerrit.libreoffice.org/61177 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-12loplugin:useuniqueptr in SwObjectFormatterNoel Grandin
Change-Id: I549173b942de19eb3ff1e74fdee6e72de720988f Reviewed-on: https://gerrit.libreoffice.org/60373 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-11Fix typosAndrea Gelmini
Change-Id: I8afde16343288888d9b1806fae6cba3514812d02 Reviewed-on: https://gerrit.libreoffice.org/35062 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-04-22Avoid reserved identifiersStephan Bergmann
Change-Id: I27ff0f4f0eb395d7e0a60dd604758c220a3134c4
2016-03-22loplugin:constantparam in swNoel Grandin
Change-Id: I56925a8fd776b3ee787cc26adbaa08c58dd022c0