summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2011-06-11 00:19:44 +0200
committerJulien Nabet <serval2412@yahoo.fr>2011-06-11 00:20:38 +0200
commit2edc318282cf2395b507d59ffc670358219ef0e7 (patch)
tree5af77adbb9b6f216965425af95672e1f4480f2cb /sc
parentce61ca5e029734baa07efef66f26fefba338687f (diff)
Some cppcheck cleaning
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/docshell/docfunc.cxx4
-rw-r--r--sc/source/ui/view/tabview2.cxx12
-rw-r--r--sc/source/ui/view/tabvwshf.cxx2
3 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index e4b020d7848f..ffe7fcd539c4 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1598,7 +1598,7 @@ sal_Bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMa
if( !qIncreaseRange.empty() )
{
- for( ::std::vector<ScRange>::const_iterator iIter( qIncreaseRange.begin()); iIter != qIncreaseRange.end(); iIter++ )
+ for( ::std::vector<ScRange>::const_iterator iIter( qIncreaseRange.begin()); iIter != qIncreaseRange.end(); ++iIter )
{
ScRange aRange( *iIter );
if( pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) )
@@ -2013,7 +2013,7 @@ sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMa
if( !qDecreaseRange.empty() )
{
- for( ::std::vector<ScRange>::const_iterator iIter( qDecreaseRange.begin()); iIter != qDecreaseRange.end(); iIter++ )
+ for( ::std::vector<ScRange>::const_iterator iIter( qDecreaseRange.begin()); iIter != qDecreaseRange.end(); ++iIter )
{
ScRange aRange( *iIter );
if( pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) )
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index df14b287d759..0ad18a4c54a1 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -504,9 +504,9 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
{
nBlockStartX = nCurX >= nBlockStartXOrig ? nBlockStartXOrig : nBlockStartXOrig + nColSpan - 1;
nBlockStartY = nCurY >= nBlockStartYOrig ? nBlockStartYOrig : nBlockStartYOrig + nRowSpan - 1;
- nCurXOffset = nCurX >= nBlockStartXOrig && nCurX < nBlockStartXOrig + nColSpan - 1 ?
+ nCurXOffset = (nCurX >= nBlockStartXOrig && nCurX < nBlockStartXOrig + nColSpan - 1) ?
nBlockStartXOrig - nCurX + nColSpan - 1 : 0;
- nCurYOffset = nCurY >= nBlockStartYOrig && nCurY < nBlockStartYOrig + nRowSpan - 1 ?
+ nCurYOffset = (nCurY >= nBlockStartYOrig && nCurY < nBlockStartYOrig + nRowSpan - 1) ?
nBlockStartYOrig - nCurY + nRowSpan - 1 : 0;
bBlockStartMerged = sal_True;
}
@@ -530,19 +530,19 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
{
if ( nBlockStartX <= nCurX + nColSpan - 1 )
{
- SCsCOL nCurXOffsetTemp = nCurX < nCurX + nColSpan - 1 ? nColSpan - 1 : 0;
+ SCsCOL nCurXOffsetTemp = (nCurX < nCurX + nColSpan - 1) ? nColSpan - 1 : 0;
nCurXOffset = nCurXOffset > nCurXOffsetTemp ? nCurXOffset : nCurXOffsetTemp;
}
if ( nBlockStartY <= nCurY + nRowSpan - 1 )
{
- SCsROW nCurYOffsetTemp = nCurY < nCurY + nRowSpan - 1 ? nRowSpan - 1 : 0;
+ SCsROW nCurYOffsetTemp = (nCurY < nCurY + nRowSpan - 1) ? nRowSpan - 1 : 0;
nCurYOffset = nCurYOffset > nCurYOffsetTemp ? nCurYOffset : nCurYOffsetTemp;
}
if ( !( nBlockStartX <= nCurX && nBlockStartY <= nCurY ) &&
!( nBlockStartX > nCurX + nColSpan - 1 && nBlockStartY > nCurY + nRowSpan - 1 ) )
{
- nBlockStartXOffset = nBlockStartX > nCurX && nBlockStartX <= nCurX + nColSpan - 1 ? nCurX - nBlockStartX : 0;
- nBlockStartYOffset = nBlockStartY > nCurY && nBlockStartY <= nCurY + nRowSpan - 1 ? nCurY - nBlockStartY : 0;
+ nBlockStartXOffset = (nBlockStartX > nCurX && nBlockStartX <= nCurX + nColSpan - 1) ? nCurX - nBlockStartX : 0;
+ nBlockStartYOffset = (nBlockStartY > nCurY && nBlockStartY <= nCurY + nRowSpan - 1) ? nCurY - nBlockStartY : 0;
}
}
}
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index c6266ef308cf..613c10d83174 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -261,7 +261,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
pStr = pDlg->GetNextTable( &n );
}
sal_Bool bLink = pDlg->GetTablesAsLink();
- if (0 < nTabs.size())
+ if (!nTabs.empty())
{
if(pDlg->IsTableBefore())
{