summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-06-01 14:29:52 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-06-01 14:38:59 +0100
commitec0dc4459784c6ed480d57509eb737fd163d3100 (patch)
treed406470e399b4c2ef4d532f4476b11c1562aafcb /sw
parent566f844dac12ec4a4d2dee1773e8a585e9b14b23 (diff)
targetted revert of minor cppcheck cleanups
Change-Id: I72bd86baaccb6f0604f04217046b1b523a02aa62
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/docnode/nodes.cxx2
-rw-r--r--sw/source/core/unocore/unocoll.cxx2
-rw-r--r--sw/source/ui/docvw/PostItMgr.cxx4
3 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index ab1243093d23..68b276ef96e8 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -1491,6 +1491,7 @@ sal_Bool SwNodes::CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& r
*************************************************************************/
void SwNodes::DelNodes( const SwNodeIndex & rStart, sal_uLong nCnt )
{
+ int bUpdateNum = 0;
sal_uLong nSttIdx = rStart.GetIndex();
if( !nSttIdx && nCnt == GetEndOfContent().GetIndex()+1 )
@@ -1518,7 +1519,6 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, sal_uLong nCnt )
}
else
{
- int bUpdateNum = 0;
for( sal_uLong n = nSttIdx, nEnd = nSttIdx + nCnt; n < nEnd; ++n )
{
SwNode* pNd = (*this)[ n ];
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 28417912f7c4..859cbd085710 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -1830,12 +1830,12 @@ uno::Any SwXFootnotes::getByIndex(sal_Int32 nIndex)
{
SolarMutexGuard aGuard;
uno::Any aRet;
+ sal_Int32 nCount = 0;
if(IsValid())
{
sal_uInt16 n, nFtnCnt = GetDoc()->GetFtnIdxs().Count();
SwTxtFtn* pTxtFtn;
uno::Reference< XFootnote > xRef;
- sal_Int32 nCount = 0;
for( n = 0; n < nFtnCnt; ++n )
{
pTxtFtn = GetDoc()->GetFtnIdxs()[ n ];
diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx
index 84e55a11619a..c82a782ea015 100644
--- a/sw/source/ui/docvw/PostItMgr.cxx
+++ b/sw/source/ui/docvw/PostItMgr.cxx
@@ -935,7 +935,9 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &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
@@ -965,8 +967,6 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons
if (aVisiblePostItList.size()>1)
{
bool bDone = false;
- long lSpaceUsed = 0;
- int loop = 0;
// if no window is moved anymore we are finished
while (!bDone)
{