summaryrefslogtreecommitdiff
path: root/sd/source/ui/unoidl
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-09-30 12:08:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-09-30 15:22:38 +0200
commite4c8e666541a058dc9ca3c17029eb629bd7cf100 (patch)
treec5e9f8b3d6f25976fbf3e7dcceffe279e204221c /sd/source/ui/unoidl
parent46da549a68003ef5a35aedf4621482cb2b54e930 (diff)
loplugin:reducevarscope in sd
Change-Id: Ia4a62900536ea49583cc00853ff937fae35c2d7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103679 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/unoidl')
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx3
-rw-r--r--sd/source/ui/unoidl/unosrch.cxx4
2 files changed, 2 insertions, 5 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 88c134e9be5d..67871eaefdfd 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1537,12 +1537,11 @@ static sal_Int32 ImplPDFGetBookmarkPage( const OUString& rBookmark, SdDrawDocume
// is the bookmark a page ?
bool bIsMasterPage;
sal_uInt16 nPgNum = rDoc.GetPageByName( aBookmark, bIsMasterPage );
- SdrObject* pObj = nullptr;
if ( nPgNum == SDRPAGE_NOTFOUND )
{
// is the bookmark an object ?
- pObj = rDoc.GetObj( aBookmark );
+ SdrObject* pObj = rDoc.GetObj( aBookmark );
if (pObj)
nPgNum = pObj->getSdrPageFromSdrObject()->GetPageNum();
}
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index d4d7f1c67228..e23d2c26b5df 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -545,16 +545,14 @@ uno::Reference< text::XTextRange > SdUnoSearchReplaceShape::Search( const uno::
{
ESelection aSelection( pConvertPara[nStartPos], pConvertPos[nStartPos],
pConvertPara[nEndPos], pConvertPos[nEndPos] );
- SvxUnoTextRange *pRange;
SvxUnoTextBase* pParent = comphelper::getUnoTunnelImplementation<SvxUnoTextBase>( xParent );
if(pParent)
{
- pRange = new SvxUnoTextRange( *pParent );
+ SvxUnoTextRange *pRange = new SvxUnoTextRange( *pParent );
xFound = pRange;
pRange->SetSelection(aSelection);
-
}
}
else