diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-02 09:36:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-02 10:46:46 +0200 |
commit | 268a49f473c1830be269a7db5f561e3681134bbd (patch) | |
tree | 259debcc224b3f211125ca6615b4fc25b2dcdeb2 /editeng/source/uno | |
parent | fix SkiaTest::testDrawShaders() (diff) | |
download | core-268a49f473c1830be269a7db5f561e3681134bbd.tar.gz core-268a49f473c1830be269a7db5f561e3681134bbd.zip |
loplugin:reducevarscope in desktop..emfio
Change-Id: I25ca760ae15114ada621d928997a7117401c75d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103811
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng/source/uno')
-rw-r--r-- | editeng/source/uno/unoedprx.cxx | 2 | ||||
-rw-r--r-- | editeng/source/uno/unofored.cxx | 3 | ||||
-rw-r--r-- | editeng/source/uno/unotext.cxx | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx index 628570fdca74..8cf7d8e62417 100644 --- a/editeng/source/uno/unoedprx.cxx +++ b/editeng/source/uno/unoedprx.cxx @@ -953,7 +953,6 @@ sal_Int32 SvxAccessibleTextAdapter::GetLineLen( sal_Int32 nPara, sal_Int32 nLine { assert(mpTextForwarder && "SvxAccessibleTextAdapter: no forwarder"); - SvxAccessibleTextIndex aStartIndex; SvxAccessibleTextIndex aEndIndex; sal_Int32 nCurrLine; sal_Int32 nCurrIndex, nLastIndex; @@ -967,6 +966,7 @@ sal_Int32 SvxAccessibleTextAdapter::GetLineLen( sal_Int32 nPara, sal_Int32 nLine aEndIndex.SetEEIndex( nPara, nCurrIndex, *this ); if( nLine > 0 ) { + SvxAccessibleTextIndex aStartIndex; aStartIndex.SetEEIndex( nPara, nLastIndex, *this ); return aEndIndex.GetIndex() - aStartIndex.GetIndex(); diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index 8b0a55bde535..bde2a75e26ab 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -340,7 +340,6 @@ tools::Rectangle SvxEditEngineForwarder::GetParaBounds( sal_Int32 nPara ) const const Point aPnt = rEditEngine.GetDocPosTopLeft( nPara ); sal_uLong nWidth; sal_uLong nHeight; - sal_uLong nTextWidth; if( rEditEngine.IsVertical() ) { @@ -349,7 +348,7 @@ tools::Rectangle SvxEditEngineForwarder::GetParaBounds( sal_Int32 nPara ) const // don't rotate. nWidth = rEditEngine.GetTextHeight( nPara ); nHeight = rEditEngine.GetTextHeight(); - nTextWidth = rEditEngine.GetTextHeight(); + sal_uLong nTextWidth = rEditEngine.GetTextHeight(); return tools::Rectangle( nTextWidth - aPnt.Y() - nWidth, 0, nTextWidth - aPnt.Y(), nHeight ); } diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index d4a3364f44fa..f15e57c8f704 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -1734,9 +1734,9 @@ void SAL_CALL SvxUnoTextBase::insertString( const uno::Reference< text::XTextRan if( !xRange.is() ) return; - ESelection aSelection; if (GetEditSource()) { + ESelection aSelection; ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() ); SetSelection( aSelection ); } |