Kaydet (Commit) c4b2921f authored tarafından Julien Nabet's avatar Julien Nabet

Some cppcheck cleaning

Change-Id: Id027823617d2328b9e827268825812634731a828
üst b2e5700d
...@@ -1221,10 +1221,10 @@ bool ScColumn::IsEmptyBlock(SCROW nStartRow, SCROW nEndRow) const ...@@ -1221,10 +1221,10 @@ bool ScColumn::IsEmptyBlock(SCROW nStartRow, SCROW nEndRow) const
SCSIZE ScColumn::GetEmptyLinesInBlock( SCROW nStartRow, SCROW nEndRow, ScDirection eDir ) const SCSIZE ScColumn::GetEmptyLinesInBlock( SCROW nStartRow, SCROW nEndRow, ScDirection eDir ) const
{ {
SCSIZE nLines = 0; SCSIZE nLines = 0;
bool bFound = false;
SCSIZE i; SCSIZE i;
if ( !maItems.empty() ) if ( !maItems.empty() )
{ {
bool bFound = false;
if (eDir == DIR_BOTTOM) if (eDir == DIR_BOTTOM)
{ {
i = maItems.size(); i = maItems.size();
......
...@@ -527,11 +527,9 @@ void ScConditionEntry::UpdateReference( UpdateRefMode eUpdateRefMode, ...@@ -527,11 +527,9 @@ void ScConditionEntry::UpdateReference( UpdateRefMode eUpdateRefMode,
bool bInsertTab = ( eUpdateRefMode == URM_INSDEL && nDz >= 1 ); bool bInsertTab = ( eUpdateRefMode == URM_INSDEL && nDz >= 1 );
bool bDeleteTab = ( eUpdateRefMode == URM_INSDEL && nDz <= -1 ); bool bDeleteTab = ( eUpdateRefMode == URM_INSDEL && nDz <= -1 );
bool bChanged1 = false;
bool bChanged2 = false;
if (pFormula1) if (pFormula1)
{ {
bool bChanged1 = false;
if ( bInsertTab ) if ( bInsertTab )
lcl_CondUpdateInsertTab( *pFormula1, rRange.aStart.Tab(), aSrcPos.Tab(), bChanged1, nDz ); lcl_CondUpdateInsertTab( *pFormula1, rRange.aStart.Tab(), aSrcPos.Tab(), bChanged1, nDz );
else else
...@@ -553,6 +551,7 @@ void ScConditionEntry::UpdateReference( UpdateRefMode eUpdateRefMode, ...@@ -553,6 +551,7 @@ void ScConditionEntry::UpdateReference( UpdateRefMode eUpdateRefMode,
} }
if (pFormula2) if (pFormula2)
{ {
bool bChanged2 = false;
if ( bInsertTab ) if ( bInsertTab )
lcl_CondUpdateInsertTab( *pFormula2, rRange.aStart.Tab(), aSrcPos.Tab(), bChanged2, nDz ); lcl_CondUpdateInsertTab( *pFormula2, rRange.aStart.Tab(), aSrcPos.Tab(), bChanged2, nDz );
else else
......
...@@ -449,8 +449,6 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers ...@@ -449,8 +449,6 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
ScStyleSheet* pStyle = NULL; ScStyleSheet* pStyle = NULL;
ScColumnIterator* pColIter = NULL; ScColumnIterator* pColIter = NULL;
ScTable* pTable = NULL; ScTable* pTable = NULL;
ScColumn* pColumn = NULL;
ScBaseCell* pCell = NULL;
SCTAB nTab = aCurTextWidthCalcPos.Tab(); SCTAB nTab = aCurTextWidthCalcPos.Tab();
SCROW nRow = aCurTextWidthCalcPos.Row(); SCROW nRow = aCurTextWidthCalcPos.Row();
SCsCOL nCol = aCurTextWidthCalcPos.Col(); SCsCOL nCol = aCurTextWidthCalcPos.Col();
...@@ -484,10 +482,11 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers ...@@ -484,10 +482,11 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
sal_uInt16 nRestart = 0; sal_uInt16 nRestart = 0;
sal_uInt16 nZoom = 0; sal_uInt16 nZoom = 0;
sal_uInt16 nCount = 0; sal_uInt16 nCount = 0;
ScBaseCell* pCell = NULL;
nZoom = GET_SCALEVALUE(pStyle->GetItemSet(),ATTR_PAGE_SCALE); nZoom = GET_SCALEVALUE(pStyle->GetItemSet(),ATTR_PAGE_SCALE);
Fraction aZoomFract( nZoom, 100 ); Fraction aZoomFract( nZoom, 100 );
pColumn = &pTable->aCol[nCol]; ScColumn* pColumn = &pTable->aCol[nCol];
pColIter = new ScColumnIterator( pColumn, nRow, MAXROW ); pColIter = new ScColumnIterator( pColumn, nRow, MAXROW );
while ( (nZoom > 0) && (nCount < CALCMAX) && (nRestart < 2) ) while ( (nZoom > 0) && (nCount < CALCMAX) && (nRestart < 2) )
......
...@@ -599,13 +599,13 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX ...@@ -599,13 +599,13 @@ void ScDocument::FillInfo( ScTableInfo& rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX
{ {
// Blockmarken // Blockmarken
const ScMarkArray* pThisMarkArr = pMarkData->GetArray()+nX; const ScMarkArray* pThisMarkArr = pMarkData->GetArray()+nX;
bool bThisMarked;
nArrY = 1; nArrY = 1;
nCurRow = nY1; // einzelne Zeile nCurRow = nY1; // einzelne Zeile
nThisRow = nY1; // Ende des Bereichs nThisRow = nY1; // Ende des Bereichs
if ( pThisMarkArr->Search( nY1, nIndex ) ) if ( pThisMarkArr->Search( nY1, nIndex ) )
{ {
bool bThisMarked;
do do
{ {
nThisRow=pThisMarkArr->pData[nIndex].nRow; // Ende des Bereichs nThisRow=pThisMarkArr->pData[nIndex].nRow; // Ende des Bereichs
......
...@@ -136,14 +136,13 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(Window* pWindow, const ScDataBarForma ...@@ -136,14 +136,13 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(Window* pWindow, const ScDataBarForma
void ScDataBarSettingsDlg::Init() void ScDataBarSettingsDlg::Init()
{ {
SfxObjectShell* pDocSh = SfxObjectShell::Current(); SfxObjectShell* pDocSh = SfxObjectShell::Current();
const SfxPoolItem* pItem = NULL;
XColorListRef pColorTable; XColorListRef pColorTable;
DBG_ASSERT( pDocSh, "DocShell not found!" ); DBG_ASSERT( pDocSh, "DocShell not found!" );
if ( pDocSh ) if ( pDocSh )
{ {
pItem = pDocSh->GetItem( SID_COLOR_TABLE ); const SfxPoolItem* pItem = pDocSh->GetItem( SID_COLOR_TABLE );
if ( pItem != NULL ) if ( pItem != NULL )
pColorTable = ( (SvxColorListItem*)pItem )->GetColorList(); pColorTable = ( (SvxColorListItem*)pItem )->GetColorList();
} }
......
...@@ -1480,10 +1480,10 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize) ...@@ -1480,10 +1480,10 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize)
const sal_Char* pChar; const sal_Char* pChar;
const sal_Char* pOldPos; const sal_Char* pOldPos;
int status;
for( pOldPos = pChar = (const sal_Char *) pMsgBuffer->GetData(); nBufSize--; for( pOldPos = pChar = (const sal_Char *) pMsgBuffer->GetData(); nBufSize--;
pChar++ ) pChar++ )
{ {
int status;
if( *pChar == '\r' || *pChar == '\n' ) if( *pChar == '\r' || *pChar == '\n' )
{ {
if( aDelim.compareTo(pOldPos, aDelim.getLength()) if( aDelim.compareTo(pOldPos, aDelim.getLength())
......
...@@ -682,9 +682,9 @@ PPDParser::PPDParser( const String& rFile ) : ...@@ -682,9 +682,9 @@ PPDParser::PPDParser( const String& rFile ) :
// read in the file // read in the file
std::list< rtl::OString > aLines; std::list< rtl::OString > aLines;
PPDDecompressStream aStream( m_aFile ); PPDDecompressStream aStream( m_aFile );
bool bLanguageEncoding = false;
if( aStream.IsOpen() ) if( aStream.IsOpen() )
{ {
bool bLanguageEncoding = false;
while( ! aStream.IsEof() ) while( ! aStream.IsEof() )
{ {
rtl::OString aCurLine = aStream.ReadLine(); rtl::OString aCurLine = aStream.ReadLine();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment