diff options
author | Radu Ioan <ioan.radu.g@gmail.com> | 2014-01-26 15:12:53 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-01-29 22:18:09 +0000 |
commit | c634faf12886228754eb59ec9bedf6cd6f631054 (patch) | |
tree | da8144d9fec60cb93273c75bb5222e7225927534 /sd | |
parent | cb9b6d94d805026062ebc6e2f7bdb2f659d9665a (diff) |
fdo#39440 - cppcheck cleanliness
- Fixed some The scope of the variable 'x' can be reduced.
Change-Id: I6b586314b2ed201249dc52469cc4bb86b99f79d2
Reviewed-on: https://gerrit.libreoffice.org/7665
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/sdpage.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 21ec27ec6bcf..3bd13e4dc20b 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -933,7 +933,6 @@ void getPresObjProp( const SdPage& rPage, const char* sObjKind, const char* sPag SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert) { - double propvalue[] = {0,0,0,0}; if( eObjKind == PRESOBJ_TITLE ) { @@ -952,6 +951,7 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert) } else if( (eObjKind == PRESOBJ_FOOTER) || (eObjKind == PRESOBJ_DATETIME) || (eObjKind == PRESOBJ_SLIDENUMBER) || (eObjKind == PRESOBJ_HEADER ) ) { + double propvalue[] = {0,0,0,0}; const char* sObjKind = PresObjKindVector[eObjKind]; const char* sPageKind = PageKindVector[mePageKind]; // create footer objects for standard master page @@ -1026,10 +1026,11 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert) Rectangle SdPage::GetTitleRect() const { Rectangle aTitleRect; - double propvalue[] = {0,0,0,0}; if (mePageKind != PK_HANDOUT) { + double propvalue[] = {0,0,0,0}; + /****************************************************************** * standard- or note page: title area ******************************************************************/ @@ -1110,10 +1111,11 @@ Rectangle SdPage::GetTitleRect() const Rectangle SdPage::GetLayoutRect() const { Rectangle aLayoutRect; - double propvalue[] = {0,0,0,0}; if (mePageKind != PK_HANDOUT) { + double propvalue[] = {0,0,0,0}; + Point aLayoutPos ( GetLftBorder(), GetUppBorder() ); Size aLayoutSize ( GetSize() ); aLayoutSize.Width() -= GetLftBorder() + GetRgtBorder(); |