diff options
Diffstat (limited to 'sw/source/core/layout/frmtool.cxx')
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 5c33911727bf..8e7c4a3700ff 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1977,7 +1977,7 @@ SwBorderAttrs::SwBorderAttrs(const SwModify *pMod, const SwFrame *pConstructor) , m_rUL(m_rAttrSet.GetULSpace()) // #i96772# // LRSpaceItem is copied due to the possibility that it is adjusted - see below - , m_rLR(m_rAttrSet.GetLRSpace()) + , m_rLR(static_cast<SvxLRSpaceItem*>(m_rAttrSet.GetLRSpace().Clone())) , m_rBox(m_rAttrSet.GetBox()) , m_rShadow(m_rAttrSet.GetShadow()) , m_aFrameSize(m_rAttrSet.GetFrameSize().GetSize()) @@ -2001,7 +2001,7 @@ SwBorderAttrs::SwBorderAttrs(const SwModify *pMod, const SwFrame *pConstructor) } else if ( pConstructor->IsNoTextFrame() ) { - m_rLR = SvxLRSpaceItem ( RES_LR_SPACE ); + m_rLR = std::make_shared<SvxLRSpaceItem>(RES_LR_SPACE); } // Caution: The USHORTs for the cached values are not initialized by intention! @@ -2054,9 +2054,9 @@ long SwBorderAttrs::CalcRight( const SwFrame* pCaller ) const } // for paragraphs, "left" is "before text" and "right" is "after text" if ( pCaller->IsTextFrame() && pCaller->IsRightToLeft() ) - nRight += m_rLR.GetLeft(); + nRight += m_rLR->GetLeft(); else - nRight += m_rLR.GetRight(); + nRight += m_rLR->GetRight(); // correction: retrieve left margin for numbering in R2L-layout if ( pCaller->IsTextFrame() && pCaller->IsRightToLeft() ) @@ -2103,7 +2103,7 @@ long SwBorderAttrs::CalcLeft( const SwFrame *pCaller ) const // for paragraphs, "left" is "before text" and "right" is "after text" if ( pCaller->IsTextFrame() && pCaller->IsRightToLeft() ) - nLeft += m_rLR.GetRight(); + nLeft += m_rLR->GetRight(); else { bool bIgnoreMargin = false; @@ -2121,7 +2121,7 @@ long SwBorderAttrs::CalcLeft( const SwFrame *pCaller ) const } } if (!bIgnoreMargin) - nLeft += m_rLR.GetLeft(); + nLeft += m_rLR->GetLeft(); } // correction: do not retrieve left margin for numbering in R2L-layout |