diff options
-rw-r--r-- | sw/source/core/text/pormulti.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index 13b7207b71d9..78423e440a6f 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -2094,11 +2094,13 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf, BuildPortions( aTmp ); - if ( rMulti.OnRight() ) + const SwLinePortion *pRightPortion = rMulti.OnRight() ? + rMulti.GetRoot().GetNext()->GetPortion() : nullptr; + if (pRightPortion) { // The ruby text on the right is vertical. // The width and the height are swapped. - SwTwips nHeight = rMulti.GetRoot().GetNext()->GetPortion()->Height(); + SwTwips nHeight = pRightPortion->Height(); // Keep room for the ruby text. rMulti.GetRoot().FindLastPortion()->AddPrtWidth( nHeight ); } |