summaryrefslogtreecommitdiffstats
path: root/editeng/source/uno
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-02 09:36:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-02 10:46:46 +0200
commit268a49f473c1830be269a7db5f561e3681134bbd (patch)
tree259debcc224b3f211125ca6615b4fc25b2dcdeb2 /editeng/source/uno
parentfix SkiaTest::testDrawShaders() (diff)
downloadcore-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.cxx2
-rw-r--r--editeng/source/uno/unofored.cxx3
-rw-r--r--editeng/source/uno/unotext.cxx2
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 );
}