diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-05-18 16:43:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-19 09:46:13 +0200 |
commit | 5aa4139416d6417564e38e9db0f0062e72ce6130 (patch) | |
tree | 18d26b04bba71e086ae22fdb3c2fce759c5d396a /editeng | |
parent | 692c5df18ec1f558abe1a3a658c9881cfb7210a9 (diff) |
ImplInitLayoutMode always deferences its OutputDevice* arg
Change-Id: I3a0041c702690c495d3f245c4ac00a2f4adf3988
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115760
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 14 |
3 files changed, 9 insertions, 9 deletions
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 284c55bc029c..e0c61a590bd1 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -702,7 +702,7 @@ private: tools::Long* pDXArray, sal_uInt16 n100thPercentFromMax, bool bManipulateDXArray ); void ImplExpandCompressedPortions( EditLine* pLine, ParaPortion* pParaPortion, tools::Long nRemainingWidth ); - void ImplInitLayoutMode( OutputDevice* pOutDev, sal_Int32 nPara, sal_Int32 nIndex ); + void ImplInitLayoutMode(OutputDevice& rOutDev, sal_Int32 nPara, sal_Int32 nIndex); LanguageType ImplCalcDigitLang(LanguageType eCurLang) const; void ImplInitDigitMode(OutputDevice* pOutDev, LanguageType eLang); static OUString convertDigits(const OUString &rString, sal_Int32 nStt, sal_Int32 nLen, LanguageType eDigitLang); diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 012342ce4d06..88b4711baf8d 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -3157,7 +3157,7 @@ sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, // potentially changing both) GetRefDevice()->Push( PushFlags::TEXTLAYOUTMODE|PushFlags::TEXTLANGUAGE ); - ImplInitLayoutMode( GetRefDevice(), nPara, -1 ); + ImplInitLayoutMode(*GetRefDevice(), nPara, -1); SvxAdjust eJustification = GetJustification( nPara ); diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index efc0e30ea90b..19444b9c75c0 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -691,7 +691,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) // Saving both layout mode and language (since I'm potentially changing both) GetRefDevice()->Push( PushFlags::TEXTLAYOUTMODE|PushFlags::TEXTLANGUAGE ); - ImplInitLayoutMode( GetRefDevice(), nPara, -1 ); + ImplInitLayoutMode(*GetRefDevice(), nPara, -1); sal_Int32 nRealInvalidStart = nInvalidStart; @@ -755,7 +755,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) EditLine aSaveLine( *pLine ); SvxFont aTmpFont( pNode->GetCharAttribs().GetDefFont() ); - ImplInitLayoutMode( GetRefDevice(), nPara, nIndex ); + ImplInitLayoutMode(*GetRefDevice(), nPara, nIndex); std::unique_ptr<tools::Long[]> pBuf(new tools::Long[ pNode->Len() ]); @@ -3194,7 +3194,7 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, tools::Rectangle aClipRect, Po // #114278# Saving both layout mode and language (since I'm // potentially changing both) rOutDev.Push( PushFlags::TEXTLAYOUTMODE|PushFlags::TEXTLANGUAGE ); - ImplInitLayoutMode( &rOutDev, n, nIndex ); + ImplInitLayoutMode(rOutDev, n, nIndex); ImplInitDigitMode(&rOutDev, aTmpFont.GetLanguage()); OUString aText; @@ -4280,7 +4280,7 @@ void ImpEditEngine::ImplInitDigitMode(OutputDevice* pOutDev, LanguageType eCurLa pOutDev->SetDigitLanguage(ImplCalcDigitLang(eCurLang)); } -void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, sal_Int32 nPara, sal_Int32 nIndex ) +void ImpEditEngine::ImplInitLayoutMode(OutputDevice& rOutDev, sal_Int32 nPara, sal_Int32 nIndex) { bool bCTL = false; bool bR2L = false; @@ -4299,7 +4299,7 @@ void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, sal_Int32 nPara, // it also works for issue 55927 } - ComplexTextLayoutFlags nLayoutMode = pOutDev->GetLayoutMode(); + ComplexTextLayoutFlags nLayoutMode = rOutDev.GetLayoutMode(); // We always use the left position for DrawText() nLayoutMode &= ~ComplexTextLayoutFlags::BiDiRtl; @@ -4319,12 +4319,12 @@ void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, sal_Int32 nPara, nLayoutMode |= ComplexTextLayoutFlags::BiDiRtl|ComplexTextLayoutFlags::TextOriginLeft; } - pOutDev->SetLayoutMode( nLayoutMode ); + rOutDev.SetLayoutMode( nLayoutMode ); // #114278# Also setting up digit language from Svt options // (cannot reliably inherit the outdev's setting) LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType(); - ImplInitDigitMode( pOutDev, eLang ); + ImplInitDigitMode(&rOutDev, eLang); } Reference < i18n::XBreakIterator > const & ImpEditEngine::ImplGetBreakIterator() const |