svx/source/svdraw/svdotextdecomposition.cxx | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)
New commits: commit 7517fcd515d159973c308fa31cdfebca9bc4b169 Author: Armin Le Grand (allotropia) <[email protected]> AuthorDate: Wed Feb 12 14:35:49 2025 +0100 Commit: Thorsten Behrens <[email protected]> CommitDate: Thu Feb 13 00:39:54 2025 +0100 IASS: Use correct OutlinerParaObject in text decompositions In SdrTextObj the methods impDecomposeAutoFitTextPrimitive and impDecomposeChainedTextPrimitive used the wrong OutlinerParaObject. Unfortunately there are two OPOs available in the SdrTextPrimitive2D, one by using (A) getOutlinerParaObject() and one using (B) getSdrText()->GetOutlinerParaObject() whereby (A) is the one which contains possible changes from an active text edit while (B) contains the original text at the start of the possible text edit. By using (B) those two decomposes were not able to show the already changed text, thus the update in the SlideShow seemed not to work. Change-Id: Id2dcc3924fe8029688d0e76ca0f3f7300f461bd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181490 Tested-by: Jenkins Reviewed-by: Armin Le Grand <[email protected]> (cherry picked from commit d10117c9feb6b5c31370b9b474fea7569b98e9cb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181498 Tested-by: allotropia jenkins <[email protected]> Reviewed-by: Thorsten Behrens <[email protected]> diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index c7cc6998cbb8..d2d239af0f8c 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -962,10 +962,9 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive( // add one to range sizes to get back to the old Rectangle and outliner measurements const sal_uInt32 nAnchorTextWidth(basegfx::fround<sal_uInt32>(aAnchorTextRange.getWidth() + 1)); const sal_uInt32 nAnchorTextHeight(basegfx::fround<sal_uInt32>(aAnchorTextRange.getHeight() + 1)); - const OutlinerParaObject* pOutlinerParaObject = rSdrAutofitTextPrimitive.getSdrText()->GetOutlinerParaObject(); - OSL_ENSURE(pOutlinerParaObject, "impDecomposeBlockTextPrimitive used with no OutlinerParaObject (!)"); - const bool bVerticalWriting(pOutlinerParaObject->IsEffectivelyVertical()); - const bool bTopToBottom(pOutlinerParaObject->IsTopToBottom()); + const OutlinerParaObject& rOutlinerParaObject(rSdrAutofitTextPrimitive.getOutlinerParaObject()); + const bool bVerticalWriting(rOutlinerParaObject.IsEffectivelyVertical()); + const bool bTopToBottom(rOutlinerParaObject.IsTopToBottom()); const Size aAnchorTextSize(Size(nAnchorTextWidth, nAnchorTextHeight)); if(rSdrAutofitTextPrimitive.getWordWrap() || IsTextFrame()) @@ -987,7 +986,7 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive( rOutliner.SetPaperSize(aAnchorTextSize); rOutliner.SetUpdateLayout(true); - rOutliner.SetText(*pOutlinerParaObject); + rOutliner.SetText(rOutlinerParaObject); setupAutoFitText(rOutliner, aAnchorTextSize); // set visualizing page at Outliner; needed e.g. for PageNumberField decomposition @@ -1778,11 +1777,9 @@ void SdrTextObj::impDecomposeChainedTextPrimitive( const sal_uInt32 nAnchorTextHeight(basegfx::fround<sal_uInt32>(aAnchorTextRange.getHeight() + 1)); // Text - const OutlinerParaObject* pOutlinerParaObject = rSdrChainedTextPrimitive.getSdrText()->GetOutlinerParaObject(); - OSL_ENSURE(pOutlinerParaObject, "impDecomposeBlockTextPrimitive used with no OutlinerParaObject (!)"); - - const bool bVerticalWriting(pOutlinerParaObject->IsEffectivelyVertical()); - const bool bTopToBottom(pOutlinerParaObject->IsTopToBottom()); + const OutlinerParaObject& rOutlinerParaObject(rSdrChainedTextPrimitive.getOutlinerParaObject()); + const bool bVerticalWriting(rOutlinerParaObject.IsEffectivelyVertical()); + const bool bTopToBottom(rOutlinerParaObject.IsTopToBottom()); const Size aAnchorTextSize(Size(nAnchorTextWidth, nAnchorTextHeight)); if(IsTextFrame()) @@ -1803,7 +1800,7 @@ void SdrTextObj::impDecomposeChainedTextPrimitive( rOutliner.SetPaperSize(aNullSize); rOutliner.SetUpdateLayout(true); // Sets original text - rOutliner.SetText(*pOutlinerParaObject); + rOutliner.SetText(rOutlinerParaObject); /* Begin overflow/underflow handling */
