summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-06-13 10:16:56 +0200
committerNoel Grandin <noel@peralex.com>2015-06-15 14:06:31 +0200
commitdcf6abfcdf3f4b7aec5796c9f6c806889328135f (patch)
treef0d7081b5454bbe58318ec87dcc6b5465ed16965 /sw/source
parent8f60697cf8e5227d503738e3c186433ac5dacfc8 (diff)
cppcheck:unreadVariable
Change-Id: I03981ceba67280e8ed98a9add7f24b3bd958d522
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/text/itradj.cxx3
-rw-r--r--sw/source/ui/index/cnttab.cxx1
-rw-r--r--sw/source/ui/vba/vbarangehelper.cxx1
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx4
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx2
5 files changed, 2 insertions, 9 deletions
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index 1e74bdac46e2..1ad212baec7d 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -490,7 +490,6 @@ SwTwips SwTextAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
sal_uInt16 nCompress = ( pCurrent->GetKanaComp() )[ nKanaIdx ];
pPos = pCurrent->GetPortion();
long nDecompress = 0;
- nKanaDiffSum = 0;
while( pPos )
{
@@ -505,7 +504,6 @@ SwTwips SwTextAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
// check, if information is stored under other key
if ( !nMaxWidthDiff && pPos == pCurrent->GetFirstPortion() )
nMaxWidthDiff = GetInfo().GetMaxWidthDiff( pCurrent );
- nKanaDiffSum += nMaxWidthDiff;
pPos->Width( nMinWidth +
( ( 10000 - nCompress ) * nMaxWidthDiff ) / 10000 );
nDecompress += pPos->Width() - nMinWidth;
@@ -521,7 +519,6 @@ SwTwips SwTextAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
if ( ++nKanaIdx < pCurrent->GetKanaComp().size() )
nCompress = ( pCurrent->GetKanaComp() )[ nKanaIdx ];
- nKanaDiffSum = 0;
nDecompress = 0;
}
pPos = pPos->GetPortion();
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 49664e5530bf..7948ccdf6472 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -2851,7 +2851,6 @@ void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL)
}
if(!bLastWasText)
{
- bLastWasText = true;
SwFormToken aTemp(TOKEN_TEXT);
Control* pCtrl = InsertItem(aEmptyOUStr, aTemp);
if(!pSetActiveControl)
diff --git a/sw/source/ui/vba/vbarangehelper.cxx b/sw/source/ui/vba/vbarangehelper.cxx
index e4e1b92a6e9e..d5d5b70313be 100644
--- a/sw/source/ui/vba/vbarangehelper.cxx
+++ b/sw/source/ui/vba/vbarangehelper.cxx
@@ -124,7 +124,6 @@ uno::Reference< text::XTextCursor > SwVbaRangeHelper::initCursor( const uno::Ref
try
{
xTextCursor = rText->createTextCursor();
- bGotTextCursor = true;
}
catch (const uno::Exception& e)
{
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 2321dccdc567..bc86274004c7 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2018,11 +2018,9 @@ bool SwDBManager::GetColumnCnt(const OUString& rSourceName, const OUString& rTab
if ( nOldRow != static_cast<sal_Int32>(nAbsRecordId) )
bMove = lcl_MoveAbsolute(pFound, nAbsRecordId);
if(bMove)
- {
bRet = lcl_GetColumnCnt(pFound, rColumnName, nLanguage, rResult, pNumber);
- }
if ( nOldRow != static_cast<sal_Int32>(nAbsRecordId) )
- bMove = lcl_MoveAbsolute(pFound, nOldRow);
+ lcl_MoveAbsolute(pFound, nOldRow);
}
return bRet;
}
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 31315ec0f4ff..9a691adcf821 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -829,7 +829,7 @@ void SwWrtShell::ConnectObj( svt::EmbeddedObjectRef& xObj, const SwRect &rPrt,
{
SfxInPlaceClient* pCli = GetView().FindIPClient( xObj.GetObject(), &GetView().GetEditWin());
if ( !pCli )
- pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
+ new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
CalcAndSetScale( xObj, &rPrt, &rFrm );
}