diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-25 19:10:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-26 11:01:43 +0200 |
commit | b59b4a38b45e1bf158701355c8c70f1c59f3e112 (patch) | |
tree | e40ff4daa9acec5031a28453ad8686bd6267b024 /sd/source/core/sdpage.cxx | |
parent | 742f030d67f3d4179d3d0153cc16be35095eb580 (diff) |
loplugin:oncevar in sd
Change-Id: I56649b4df8c517f152ed4e9132985bbef22f8634
Reviewed-on: https://gerrit.libreoffice.org/39241
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/core/sdpage.cxx')
-rw-r--r-- | sd/source/core/sdpage.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 1af632010fe6..e28162b9e786 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -1943,11 +1943,8 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rN /********************************************************** * presentation template: adjust test height **********************************************************/ - sal_uInt16 nIndexTitle = 0; - sal_uInt16 nIndexOutline = 0; - sal_uInt16 nIndexNotes = 0; - if (pObj == GetPresObj(PRESOBJ_TITLE, nIndexTitle)) + if (pObj == GetPresObj(PRESOBJ_TITLE, 0)) { SfxStyleSheet* pTitleSheet = GetStyleSheetForPresObj(PRESOBJ_TITLE); @@ -1979,7 +1976,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rN pTitleSheet->Broadcast(SfxHint(SfxHintId::DataChanged)); } } - else if (pObj == GetPresObj(PRESOBJ_OUTLINE, nIndexOutline)) + else if (pObj == GetPresObj(PRESOBJ_OUTLINE, 0)) { OUString aName(GetLayoutName()); aName += " "; @@ -2040,7 +2037,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rN } } } - else if (pObj == GetPresObj(PRESOBJ_NOTES, nIndexNotes)) + else if (pObj == GetPresObj(PRESOBJ_NOTES, 0)) { SfxStyleSheet* pNotesSheet = GetStyleSheetForPresObj(PRESOBJ_NOTES); @@ -2556,8 +2553,7 @@ void SdPage::SetLayoutName(const OUString& aName) if( mbMaster ) { - OUString aSep(SD_LT_SEPARATOR); - sal_Int32 nPos = maLayoutName.indexOf(aSep); + sal_Int32 nPos = maLayoutName.indexOf(SD_LT_SEPARATOR); if (nPos != -1) FmFormPage::SetName(maLayoutName.copy(0, nPos)); } |