summaryrefslogtreecommitdiff
path: root/sw/source/core/frmedt/tblsel.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/frmedt/tblsel.cxx')
-rw-r--r--sw/source/core/frmedt/tblsel.cxx22
1 files changed, 14 insertions, 8 deletions
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index aa8fbc43924a..4826701c6d80 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -138,21 +138,25 @@ void GetTblSelCrs( const SwCrsrShell &rShell, SwSelBoxes& rBoxes )
{
rBoxes.clear();
if( rShell.IsTableMode() && ((SwCrsrShell&)rShell).UpdateTblSelBoxes())
- rBoxes.insert( (SwSelBoxes&)rShell.GetTableCrsr()->GetBoxes() );
+ {
+ rBoxes.insert(rShell.GetTableCrsr()->GetSelectedBoxes());
+ }
}
void GetTblSelCrs( const SwTableCursor& rTblCrsr, SwSelBoxes& rBoxes )
{
rBoxes.clear();
- if( rTblCrsr.IsChgd() || !rTblCrsr.GetBoxesCount() )
+ if (rTblCrsr.IsChgd() || !rTblCrsr.GetSelectedBoxesCount())
{
SwTableCursor* pTCrsr = (SwTableCursor*)&rTblCrsr;
pTCrsr->GetDoc()->GetCurrentLayout()->MakeTblCrsrs( *pTCrsr ); //swmod 080218
}
- if( rTblCrsr.GetBoxesCount() )
- rBoxes.insert( (SwSelBoxes&)rTblCrsr.GetBoxes() );
+ if (rTblCrsr.GetSelectedBoxesCount())
+ {
+ rBoxes.insert(rTblCrsr.GetSelectedBoxes());
+ }
}
void GetTblSel( const SwCrsrShell& rShell, SwSelBoxes& rBoxes,
@@ -267,7 +271,6 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
sal_Bool bTblIsValid;
// #i55421# Reduced value 10
int nLoopMax = 10;
- sal_uInt16 i;
do {
bTblIsValid = sal_True;
@@ -284,9 +287,10 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
const SwCellFrm* pCurrentTopRightFrm = 0;
const SwCellFrm* pCurrentBottomLeftFrm = 0;
const SwCellFrm* pCurrentBottomRightFrm = 0;
+ size_t i = 0;
// Now find boxes for each entry and emit
- for( i = 0; i < aUnions.size() && bTblIsValid; ++i )
+ for ( ; i < aUnions.size() && bTblIsValid; ++i)
{
SwSelUnion *pUnion = &aUnions[i];
const SwTabFrm *pTable = pUnion->GetTable();
@@ -848,12 +852,14 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes )
{
sal_Bool bRet = sal_False;
- for( sal_uInt16 n = 0, nCnt = rBoxes.size(); n < nCnt; ++n )
+ for (size_t n = 0; n < rBoxes.size(); ++n)
+ {
if( rBoxes[ n ]->GetFrmFmt()->GetProtect().IsCntntProtected() )
{
bRet = sal_True;
break;
}
+ }
return bRet;
}
@@ -2112,7 +2118,7 @@ void _FndBox::SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable )
sal_uInt16 nStPos = USHRT_MAX;
sal_uInt16 nEndPos= 0;
- for ( sal_uInt16 i = 0; i < rBoxes.size(); ++i )
+ for (size_t i = 0; i < rBoxes.size(); ++i)
{
SwTableLine *pLine = rBoxes[i]->GetUpper();
while ( pLine->GetUpper() )