From b8d4b8656f1f4e4782ba7460070e99babc8a499e Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sun, 27 Jan 2013 23:07:58 +0100 Subject: Some cppcheck cleaning Change-Id: I7217ab7500de5d8220b85e56aceb6e843bd0769f --- sw/source/ui/docvw/PostItMgr.cxx | 4 ++-- sw/source/ui/frmdlg/colex.cxx | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 90c369cb0830..768827d14b38 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -925,9 +925,7 @@ bool SwPostItMgr::LayoutByPage(std::list &aVisiblePostItList,cons long lTopBorder = rBorder.Top() + 5; long lBottomBorder = rBorder.Bottom() - 5; const long lVisibleHeight = lBottomBorder - lTopBorder; //rBorder.GetHeight() ; - long lSpaceUsed = 0; long lTranslatePos = 0; - int loop = 0; bool bScrollbars = false; // do all neccessary resizings @@ -956,6 +954,8 @@ bool SwPostItMgr::LayoutByPage(std::list &aVisiblePostItList,cons //start the real layout so nothing overlaps anymore if (aVisiblePostItList.size()>1) { + long lSpaceUsed = 0; + int loop = 0; bool bDone = false; // if no window is moved anymore we are finished while (!bDone) diff --git a/sw/source/ui/frmdlg/colex.cxx b/sw/source/ui/frmdlg/colex.cxx index 3fa7f2983cdf..a8cac2661fae 100644 --- a/sw/source/ui/frmdlg/colex.cxx +++ b/sw/source/ui/frmdlg/colex.cxx @@ -42,14 +42,13 @@ -----------------------------------------------------------------------*/ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) { - const SvxPageItem* pPage = 0; SfxItemPool* pPool = rSet.GetPool(); sal_uInt16 nWhich = pPool->GetWhich( SID_ATTR_PAGE ); if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) { // alignment - pPage = (const SvxPageItem*)&rSet.Get( nWhich ); + const SvxPageItem* pPage = (const SvxPageItem*)&rSet.Get( nWhich ); if ( pPage ) SetUsage( pPage->GetPageUsage() ); -- cgit