include/svx/svdoutl.hxx | 2 +- svx/source/svdraw/svdoutl.cxx | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)
New commits: commit 02ff8b2fbf1c3d47a08e6a6da4e301d304c15b31 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Nov 5 09:49:40 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Nov 5 09:44:50 2021 +0100 rename mpTextObj -> mxWeakTextObj because it helps me keep the referencing counting strategy in my head when reading the code Change-Id: I6363b688c8f5e649c82dec02e21498bcb961bd3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124729 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/svx/svdoutl.hxx b/include/svx/svdoutl.hxx index 453d3b4ba3a7..f706d85bdaa3 100644 --- a/include/svx/svdoutl.hxx +++ b/include/svx/svdoutl.hxx @@ -28,7 +28,7 @@ class SdrPage; class SVXCORE_DLLPUBLIC SdrOutliner : public Outliner { - tools::WeakReference<SdrTextObj> mpTextObj; + tools::WeakReference<SdrTextObj> mxWeakTextObj; const SdrPage* mpVisualizedPage; public: diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx index f13129a6d798..3737b1fdf268 100644 --- a/svx/source/svdraw/svdoutl.cxx +++ b/svx/source/svdraw/svdoutl.cxx @@ -39,7 +39,7 @@ SdrOutliner::~SdrOutliner() void SdrOutliner::SetTextObj( const SdrTextObj* pObj ) { - if( pObj && pObj != mpTextObj.get() ) + if( pObj && pObj != mxWeakTextObj.get() ) { SetUpdateLayout(false); OutlinerMode nOutlinerMode2 = OutlinerMode::OutlineObject; @@ -61,12 +61,12 @@ void SdrOutliner::SetTextObj( const SdrTextObj* pObj ) ClearPolygon(); } - mpTextObj.reset( const_cast< SdrTextObj* >(pObj) ); + mxWeakTextObj.reset( const_cast< SdrTextObj* >(pObj) ); } void SdrOutliner::SetTextObjNoInit( const SdrTextObj* pObj ) { - mpTextObj.reset( const_cast< SdrTextObj* >(pObj) ); + mxWeakTextObj.reset( const_cast< SdrTextObj* >(pObj) ); } OUString SdrOutliner::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, @@ -75,8 +75,8 @@ OUString SdrOutliner::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara bool bOk = false; OUString aRet; - if(mpTextObj.is()) - bOk = mpTextObj->CalcFieldValue(rField, nPara, nPos, false, rpTxtColor, rpFldColor, aRet); + if(mxWeakTextObj.is()) + bOk = mxWeakTextObj->CalcFieldValue(rField, nPara, nPos, false, rpTxtColor, rpFldColor, aRet); if (!bOk) aRet = Outliner::CalcFieldValue(rField, nPara, nPos, rpTxtColor, rpFldColor); @@ -86,7 +86,7 @@ OUString SdrOutliner::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara const SdrTextObj* SdrOutliner::GetTextObj() const { - return mpTextObj.get(); + return mxWeakTextObj.get(); } bool SdrOutliner::hasEditViewCallbacks() const