summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/tblrwcl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc/tblrwcl.cxx')
-rw-r--r--sw/source/core/doc/tblrwcl.cxx992
1 files changed, 496 insertions, 496 deletions
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index fe5beeb006a0..d36e669ee860 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -102,10 +102,10 @@ struct _CpyTabFrm
_CpyTabFrm& operator=( const _CpyTabFrm& );
- BOOL operator==( const _CpyTabFrm& rCpyTabFrm )
- { return (ULONG)Value.nSize == (ULONG)rCpyTabFrm.Value.nSize; }
- BOOL operator<( const _CpyTabFrm& rCpyTabFrm )
- { return (ULONG)Value.nSize < (ULONG)rCpyTabFrm.Value.nSize; }
+ sal_Bool operator==( const _CpyTabFrm& rCpyTabFrm )
+ { return (sal_uLong)Value.nSize == (sal_uLong)rCpyTabFrm.Value.nSize; }
+ sal_Bool operator<( const _CpyTabFrm& rCpyTabFrm )
+ { return (sal_uLong)Value.nSize < (sal_uLong)rCpyTabFrm.Value.nSize; }
};
struct CR_SetBoxWidth
@@ -118,15 +118,15 @@ struct CR_SetBoxWidth
SwUndoTblNdsChg* pUndo;
SwTwips nDiff, nSide, nMaxSize, nLowerDiff;
TblChgMode nMode;
- USHORT nTblWidth, nRemainWidth, nBoxWidth;
- BOOL bBigger, bLeft, bSplittBox, bAnyBoxFnd;
+ sal_uInt16 nTblWidth, nRemainWidth, nBoxWidth;
+ sal_Bool bBigger, bLeft, bSplittBox, bAnyBoxFnd;
- CR_SetBoxWidth( USHORT eType, SwTwips nDif, SwTwips nSid, SwTwips nTblW,
+ CR_SetBoxWidth( sal_uInt16 eType, SwTwips nDif, SwTwips nSid, SwTwips nTblW,
SwTwips nMax, SwTableNode* pTNd )
: pTblNd( pTNd ),
nDiff( nDif ), nSide( nSid ), nMaxSize( nMax ), nLowerDiff( 0 ),
- nTblWidth( (USHORT)nTblW ), nRemainWidth( 0 ), nBoxWidth( 0 ),
- bSplittBox( FALSE ), bAnyBoxFnd( FALSE )
+ nTblWidth( (sal_uInt16)nTblW ), nRemainWidth( 0 ), nBoxWidth( 0 ),
+ bSplittBox( sal_False ), bAnyBoxFnd( sal_False )
{
bLeft = nsTblChgWidthHeightType::WH_COL_LEFT == ( eType & 0xff ) ||
nsTblChgWidthHeightType::WH_CELL_LEFT == ( eType & 0xff );
@@ -157,20 +157,20 @@ struct CR_SetBoxWidth
nLowerDiff = 0; nRemainWidth = 0;
}
- void AddBoxWidth( const SwTableBox& rBox, USHORT nWidth )
+ void AddBoxWidth( const SwTableBox& rBox, sal_uInt16 nWidth )
{
SwTableLinePtr p = (SwTableLine*)rBox.GetUpper();
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( aLines.Insert( p, nFndPos ))
aLinesWidth.Insert( nWidth, nFndPos );
else
aLinesWidth[ nFndPos ] = aLinesWidth[ nFndPos ] + nWidth;
}
- USHORT GetBoxWidth( const SwTableLine& rLn ) const
+ sal_uInt16 GetBoxWidth( const SwTableLine& rLn ) const
{
SwTableLinePtr p = (SwTableLine*)&rLn;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( aLines.Seek_Entry( p, &nFndPos ) )
nFndPos = aLinesWidth[ nFndPos ];
else
@@ -179,20 +179,20 @@ struct CR_SetBoxWidth
}
};
-BOOL lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_DelSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_DelOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-
-typedef BOOL (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, BOOL );
+sal_Bool lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_DelSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_DelOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+
+typedef sal_Bool (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, sal_Bool );
#if defined(DBG_UTIL) || defined( JP_DEBUG )
@@ -201,13 +201,13 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize );
#define CHECKBOXWIDTH \
{ \
SwTwips nSize = GetFrmFmt()->GetFrmSize().GetWidth(); \
- for( USHORT nTmp = 0; nTmp < aLines.Count(); ++nTmp ) \
+ for( sal_uInt16 nTmp = 0; nTmp < aLines.Count(); ++nTmp ) \
::_CheckBoxWidth( *aLines[ nTmp ], nSize ); \
}
#define CHECKTABLELAYOUT \
{ \
- for ( USHORT i = 0; i < GetTabLines().Count(); ++i ) \
+ for ( sal_uInt16 i = 0; i < GetTabLines().Count(); ++i ) \
{ \
SwFrmFmt* pFmt = GetTabLines()[i]->GetFrmFmt(); \
SwClientIter aIter( *pFmt ); \
@@ -244,13 +244,13 @@ struct CR_SetLineHeight
SwUndoTblNdsChg* pUndo;
SwTwips nMaxSpace, nMaxHeight;
TblChgMode nMode;
- USHORT nLines;
- BOOL bBigger, bTop, bSplittBox, bAnyBoxFnd;
+ sal_uInt16 nLines;
+ sal_Bool bBigger, bTop, bSplittBox, bAnyBoxFnd;
- CR_SetLineHeight( USHORT eType, SwTableNode* pTNd )
+ CR_SetLineHeight( sal_uInt16 eType, SwTableNode* pTNd )
: pTblNd( pTNd ), pUndo( 0 ),
nMaxSpace( 0 ), nMaxHeight( 0 ), nLines( 0 ),
- bSplittBox( FALSE ), bAnyBoxFnd( FALSE )
+ bSplittBox( sal_False ), bAnyBoxFnd( sal_False )
{
bTop = nsTblChgWidthHeightType::WH_ROW_TOP == ( eType & 0xff ) || nsTblChgWidthHeightType::WH_CELL_TOP == ( eType & 0xff );
bBigger = 0 != (eType & nsTblChgWidthHeightType::WH_FLAG_BIGGER );
@@ -272,14 +272,14 @@ struct CR_SetLineHeight
}
};
-BOOL lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck );
+sal_Bool lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck );
-typedef BOOL (*FN_lcl_SetLineHeight)(SwTableLine*, CR_SetLineHeight&, SwTwips, BOOL );
+typedef sal_Bool (*FN_lcl_SetLineHeight)(SwTableLine*, CR_SetLineHeight&, SwTwips, sal_Bool );
_CpyTabFrm& _CpyTabFrm::operator=( const _CpyTabFrm& rCpyTabFrm )
{
@@ -297,21 +297,21 @@ void lcl_DelCpyTabFrmFmts( _CpyTabFrm& rArr );
struct _CpyPara
{
- boost::shared_ptr< std::vector< std::vector< ULONG > > > pWidths;
+ boost::shared_ptr< std::vector< std::vector< sal_uLong > > > pWidths;
SwDoc* pDoc;
SwTableNode* pTblNd;
_CpyTabFrms& rTabFrmArr;
SwTableLine* pInsLine;
SwTableBox* pInsBox;
- ULONG nOldSize, nNewSize; // zum Korrigieren der Size-Attribute
- ULONG nMinLeft, nMaxRight;
- USHORT nCpyCnt, nInsPos;
- USHORT nLnIdx, nBoxIdx;
- BYTE nDelBorderFlag;
- BOOL bCpyCntnt;
-
- _CpyPara( SwTableNode* pNd, USHORT nCopies, _CpyTabFrms& rFrmArr,
- BOOL bCopyContent = TRUE )
+ sal_uLong nOldSize, nNewSize; // zum Korrigieren der Size-Attribute
+ sal_uLong nMinLeft, nMaxRight;
+ sal_uInt16 nCpyCnt, nInsPos;
+ sal_uInt16 nLnIdx, nBoxIdx;
+ sal_uInt8 nDelBorderFlag;
+ sal_Bool bCpyCntnt;
+
+ _CpyPara( SwTableNode* pNd, sal_uInt16 nCopies, _CpyTabFrms& rFrmArr,
+ sal_Bool bCopyContent = sal_True )
: pDoc( pNd->GetDoc() ), pTblNd( pNd ), rTabFrmArr(rFrmArr),
pInsLine(0), pInsBox(0), nOldSize(0), nNewSize(0),
nMinLeft(ULONG_MAX), nMaxRight(0),
@@ -339,7 +339,7 @@ struct _CpyPara
};
-BOOL lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
+sal_Bool lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
{
_CpyPara* pCpyPara = (_CpyPara*)pPara;
@@ -347,7 +347,7 @@ BOOL lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
SwTableBox* pBox = (SwTableBox*)rpFndBox->GetBox();
_CpyTabFrm aFindFrm( (SwTableBoxFmt*)pBox->GetFrmFmt() );
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( pCpyPara->nCpyCnt )
{
if( !pCpyPara->rTabFrmArr.Seek_Entry( aFindFrm, &nFndPos ))
@@ -373,7 +373,7 @@ BOOL lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
// die erste Line sollte reichen
_FndBoxes& rFndBoxes = pCmpLine->GetBoxes();
long nSz = 0;
- for( USHORT n = rFndBoxes.Count(); n; )
+ for( sal_uInt16 n = rFndBoxes.Count(); n; )
nSz += rFndBoxes[ --n ]->GetBox()->GetFrmFmt()->GetFrmSize().GetWidth();
aFrmSz.SetWidth( aFrmSz.GetWidth() -
nSz / ( pCpyPara->nCpyCnt + 1 ) );
@@ -466,10 +466,10 @@ BOOL lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
}
}
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_CopyRow( const _FndLine*& rpFndLine, void* pPara )
+sal_Bool lcl_CopyRow( const _FndLine*& rpFndLine, void* pPara )
{
_CpyPara* pCpyPara = (_CpyPara*)pPara;
SwTableLine* pNewLine = new SwTableLine(
@@ -489,13 +489,13 @@ BOOL lcl_CopyRow( const _FndLine*& rpFndLine, void* pPara )
((_FndLine*)rpFndLine)->GetBoxes().ForEach( &lcl_CopyCol, &aPara );
pCpyPara->nDelBorderFlag &= 0xf8;
- return TRUE;
+ return sal_True;
}
//-----------------------------------------------------------
-void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, USHORT nCpyCnt,
- BOOL bBehind )
+void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, sal_uInt16 nCpyCnt,
+ sal_Bool bBehind )
{
// Bug 29124: nicht nur in den Grundlines kopieren. Wenns geht, so weit
// runter wie moeglich.
@@ -504,7 +504,7 @@ void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, USHORT nCpyCnt,
!( pFBox = pFndLn->GetBoxes()[ 0 ] )->GetBox()->GetSttNd() )
{
// eine Box mit mehreren Lines, also in diese Lines einfuegen
- for( USHORT n = 0; n < pFBox->GetLines().Count(); ++n )
+ for( sal_uInt16 n = 0; n < pFBox->GetLines().Count(); ++n )
lcl_InsCol( pFBox->GetLines()[ n ], rCpyPara, nCpyCnt, bBehind );
}
else
@@ -516,7 +516,7 @@ void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, USHORT nCpyCnt,
if( bBehind )
++rCpyPara.nInsPos;
- for( USHORT n = 0; n < nCpyCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCpyCnt; ++n )
{
if( n + 1 == nCpyCnt && bBehind )
rCpyPara.nDelBorderFlag = 9;
@@ -538,14 +538,14 @@ SwRowFrm* GetRowFrm( SwTableLine& rLine )
}
-BOOL SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt, BOOL bBehind )
+sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind )
{
ASSERT( rBoxes.Count() && nCnt, "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
- BOOL bRes = TRUE;
+ sal_Bool bRes = sal_True;
if( IsNewModel() )
bRes = NewInsertCol( pDoc, rBoxes, nCnt, bBehind );
else
@@ -557,7 +557,7 @@ BOOL SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt, BOO
GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
@@ -571,7 +571,7 @@ BOOL SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt, BOO
_CpyTabFrms aTabFrmArr;
_CpyPara aCpyPara( pTblNd, nCnt, aTabFrmArr );
- for( USHORT n = 0; n < aFndBox.GetLines().Count(); ++n )
+ for( sal_uInt16 n = 0; n < aFndBox.GetLines().Count(); ++n )
lcl_InsCol( aFndBox.GetLines()[ n ], aCpyPara, nCnt, bBehind );
// dann raeume die Struktur dieser Line noch mal auf, generell alle
@@ -582,7 +582,7 @@ BOOL SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt, BOO
CHECKBOXWIDTH
CHECKTABLELAYOUT
- bRes = TRUE;
+ bRes = sal_True;
}
SwChartDataProvider *pPCD = pDoc->GetChartDataProvider();
@@ -593,13 +593,13 @@ BOOL SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt, BOO
return bRes;
}
-BOOL SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
- USHORT nCnt, BOOL bBehind )
+sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt, sal_Bool bBehind )
{
ASSERT( pDoc && rBoxes.Count() && nCnt, "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -608,7 +608,7 @@ BOOL SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
@@ -628,7 +628,7 @@ BOOL SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
}
//Lines fuer das Layout-Update herausuchen.
- const BOOL bLayout = !IsNewModel() &&
+ const sal_Bool bLayout = !IsNewModel() &&
0 != SwClientIter( *GetFrmFmt() ).First( TYPE(SwTabFrm) );
if ( bLayout )
@@ -661,7 +661,7 @@ BOOL SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
else
aCpyPara.nDelBorderFlag = 2;
- for( USHORT nCpyCnt = 0; nCpyCnt < nCnt; ++nCpyCnt )
+ for( sal_uInt16 nCpyCnt = 0; nCpyCnt < nCnt; ++nCpyCnt )
{
if( bBehind )
aCpyPara.nDelBorderFlag = 1;
@@ -689,12 +689,12 @@ BOOL SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pPCD->AddRowCols( *this, rBoxes, nCnt, bBehind );
pDoc->UpdateCharts( GetFrmFmt()->GetName() );
- return TRUE;
+ return sal_True;
}
-BOOL _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara );
+sal_Bool _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara );
-BOOL _FndBoxAppendRowBox( const SwTableBox*& rpBox, void* pPara )
+sal_Bool _FndBoxAppendRowBox( const SwTableBox*& rpBox, void* pPara )
{
_FndPara* pFndPara = (_FndPara*)pPara;
_FndBox* pFndBox = new _FndBox( (SwTableBox*)rpBox, pFndPara->pFndLine );
@@ -708,10 +708,10 @@ BOOL _FndBoxAppendRowBox( const SwTableBox*& rpBox, void* pPara )
else
pFndPara->pFndLine->GetBoxes().C40_INSERT( _FndBox, pFndBox,
pFndPara->pFndLine->GetBoxes().Count() );
- return TRUE;
+ return sal_True;
}
-BOOL _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara )
+sal_Bool _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara )
{
_FndPara* pFndPara = (_FndPara*)pPara;
_FndLine* pFndLine = new _FndLine( (SwTableLine*)rpLine, pFndPara->pFndBox );
@@ -724,15 +724,15 @@ BOOL _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara )
}
else
delete pFndLine;
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::AppendRow( SwDoc* pDoc, USHORT nCnt )
+sal_Bool SwTable::AppendRow( SwDoc* pDoc, sal_uInt16 nCnt )
{
SwTableNode* pTblNd = (SwTableNode*)aSortCntBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -745,12 +745,12 @@ BOOL SwTable::AppendRow( SwDoc* pDoc, USHORT nCnt )
_FndBoxAppendRowLine( pLLine, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
//Lines fuer das Layout-Update herausuchen.
- const BOOL bLayout = 0 != SwClientIter( *GetFrmFmt() ).First( TYPE(SwTabFrm) );
+ const sal_Bool bLayout = 0 != SwClientIter( *GetFrmFmt() ).First( TYPE(SwTabFrm) );
if( bLayout )
{
aFndBox.SetTableLines( *this );
@@ -763,7 +763,7 @@ BOOL SwTable::AppendRow( SwDoc* pDoc, USHORT nCnt )
aCpyPara.nInsPos = GetTabLines().Count();
aCpyPara.nDelBorderFlag = 1;
- for( USHORT nCpyCnt = 0; nCpyCnt < nCnt; ++nCpyCnt )
+ for( sal_uInt16 nCpyCnt = 0; nCpyCnt < nCnt; ++nCpyCnt )
{
aCpyPara.nDelBorderFlag = 1;
aFndBox.GetLines().ForEach( &lcl_CopyRow, &aCpyPara );
@@ -776,7 +776,7 @@ BOOL SwTable::AppendRow( SwDoc* pDoc, USHORT nCnt )
//Layout updaten
if ( bLayout )
{
- aFndBox.MakeNewFrms( *this, nCnt, TRUE );
+ aFndBox.MakeNewFrms( *this, nCnt, sal_True );
}
// TL_CHART2: need to inform chart of probably changed cell names
pDoc->UpdateCharts( GetFrmFmt()->GetName() );
@@ -784,23 +784,23 @@ BOOL SwTable::AppendRow( SwDoc* pDoc, USHORT nCnt )
CHECKBOXWIDTH
CHECKTABLELAYOUT
- return TRUE;
+ return sal_True;
}
void lcl_LastBoxSetWidth( SwTableBoxes &rBoxes, const long nOffset,
- BOOL bFirst, SwShareBoxFmts& rShareFmts );
+ sal_Bool bFirst, SwShareBoxFmts& rShareFmts );
void lcl_LastBoxSetWidthLine( SwTableLines &rLines, const long nOffset,
- BOOL bFirst, SwShareBoxFmts& rShareFmts )
+ sal_Bool bFirst, SwShareBoxFmts& rShareFmts )
{
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
::lcl_LastBoxSetWidth( rLines[i]->GetTabBoxes(), nOffset, bFirst,
rShareFmts );
}
void lcl_LastBoxSetWidth( SwTableBoxes &rBoxes, const long nOffset,
- BOOL bFirst, SwShareBoxFmts& rShareFmts )
+ sal_Bool bFirst, SwShareBoxFmts& rShareFmts )
{
SwTableBox& rBox = *rBoxes[ bFirst ? 0 : rBoxes.Count() - 1 ];
if( !rBox.GetSttNd() )
@@ -827,7 +827,7 @@ void lcl_LastBoxSetWidth( SwTableBoxes &rBoxes, const long nOffset,
}
void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
- BOOL bCalcNewSize, const BOOL bCorrBorder,
+ sal_Bool bCalcNewSize, const sal_Bool bCorrBorder,
SwShareBoxFmts* pShareFmts )
{
do {
@@ -835,13 +835,13 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
pBox->GetFrmFmt()->GetFrmSize().GetWidth() : 0;
SwTableLine* pLine = pBox->GetUpper();
SwTableBoxes& rTblBoxes = pLine->GetTabBoxes();
- USHORT nDelPos = rTblBoxes.C40_GETPOS( SwTableBox, pBox );
+ sal_uInt16 nDelPos = rTblBoxes.C40_GETPOS( SwTableBox, pBox );
SwTableBox* pUpperBox = pBox->GetUpper()->GetUpper();
// Sonderbehandlung fuer Umrandung:
if( bCorrBorder && 1 < rTblBoxes.Count() )
{
- BOOL bChgd = FALSE;
+ sal_Bool bChgd = sal_False;
const SvxBoxItem& rBoxItem = pBox->GetFrmFmt()->GetBox();
if( rBoxItem.GetLeft() || rBoxItem.GetRight() )
@@ -866,7 +866,7 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
pShareFmts->SetAttr( *pNxtBox, aTmp );
else
pNxtBox->ClaimFrmFmt()->SetFmtAttr( aTmp );
- bChgd = TRUE;
+ bChgd = sal_True;
}
}
if( !bChgd && nDelPos )
@@ -913,7 +913,7 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
if( rTblBoxes.Count() )
{
// dann passe noch die Frame-SSize an
- BOOL bLastBox = nDelPos == rTblBoxes.Count();
+ sal_Bool bLastBox = nDelPos == rTblBoxes.Count();
if( bLastBox )
--nDelPos;
pBox = rTblBoxes[nDelPos];
@@ -961,8 +961,8 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
SwTwips nBoxStt, SwTwips nBoxWidth,
- USHORT nLinePos, BOOL bNxt,
- SwSelBoxes* pAllDelBoxes, USHORT* pCurPos )
+ sal_uInt16 nLinePos, sal_Bool bNxt,
+ SwSelBoxes* pAllDelBoxes, sal_uInt16* pCurPos )
{
SwTableBox* pFndBox = 0;
do {
@@ -973,10 +973,10 @@ SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
SwTableLine* pLine = rTblLns[ nLinePos ];
SwTwips nFndBoxWidth = 0;
SwTwips nFndWidth = nBoxStt + nBoxWidth;
- USHORT nBoxCnt = pLine->GetTabBoxes().Count();
+ sal_uInt16 nBoxCnt = pLine->GetTabBoxes().Count();
pFndBox = pLine->GetTabBoxes()[ 0 ];
- for( USHORT n = 0; 0 < nFndWidth && n < nBoxCnt; ++n )
+ for( sal_uInt16 n = 0; 0 < nFndWidth && n < nBoxCnt; ++n )
{
pFndBox = pLine->GetTabBoxes()[ n ];
nFndWidth -= (nFndBoxWidth = pFndBox->GetFrmFmt()->
@@ -999,7 +999,7 @@ SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
else if( pAllDelBoxes )
{
// falls der Vorganger auch geloscht wird, ist nicht zu tun
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( !pAllDelBoxes->Seek_Entry( pFndBox, &nFndPos ) )
break;
@@ -1017,45 +1017,45 @@ SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
void lcl_SaveUpperLowerBorder( SwTable& rTbl, const SwTableBox& rBox,
SwShareBoxFmts& rShareFmts,
SwSelBoxes* pAllDelBoxes = 0,
- USHORT* pCurPos = 0 )
+ sal_uInt16* pCurPos = 0 )
{
//JP 16.04.97: 2.Teil fuer Bug 36271
- BOOL bChgd = FALSE;
+ sal_Bool bChgd = sal_False;
const SwTableLine* pLine = rBox.GetUpper();
const SwTableBoxes& rTblBoxes = pLine->GetTabBoxes();
const SwTableBox* pUpperBox = &rBox;
- USHORT nDelPos = rTblBoxes.C40_GETPOS( SwTableBox, pUpperBox );
+ sal_uInt16 nDelPos = rTblBoxes.C40_GETPOS( SwTableBox, pUpperBox );
pUpperBox = rBox.GetUpper()->GetUpper();
const SvxBoxItem& rBoxItem = rBox.GetFrmFmt()->GetBox();
// dann die unteren/oberen Kanten
if( rBoxItem.GetTop() || rBoxItem.GetBottom() )
{
- bChgd = FALSE;
+ bChgd = sal_False;
const SwTableLines* pTblLns;
if( pUpperBox )
pTblLns = &pUpperBox->GetTabLines();
else
pTblLns = &rTbl.GetTabLines();
- USHORT nLnPos = pTblLns->GetPos( pLine );
+ sal_uInt16 nLnPos = pTblLns->GetPos( pLine );
// bestimme die Attr.Position der akt. zu loeschenden Box
// und suche dann in der unteren / oberen Line die entspr.
// Gegenstuecke
SwTwips nBoxStt = 0;
- for( USHORT n = 0; n < nDelPos; ++n )
+ for( sal_uInt16 n = 0; n < nDelPos; ++n )
nBoxStt += rTblBoxes[ n ]->GetFrmFmt()->GetFrmSize().GetWidth();
SwTwips nBoxWidth = rBox.GetFrmFmt()->GetFrmSize().GetWidth();
SwTableBox *pPrvBox = 0, *pNxtBox = 0;
if( nLnPos ) // Vorgaenger?
pPrvBox = ::lcl_FndNxtPrvDelBox( *pTblLns, nBoxStt, nBoxWidth,
- nLnPos, FALSE, pAllDelBoxes, pCurPos );
+ nLnPos, sal_False, pAllDelBoxes, pCurPos );
if( nLnPos + 1 < pTblLns->Count() ) // Nachfolger?
pNxtBox = ::lcl_FndNxtPrvDelBox( *pTblLns, nBoxStt, nBoxWidth,
- nLnPos, TRUE, pAllDelBoxes, pCurPos );
+ nLnPos, sal_True, pAllDelBoxes, pCurPos );
if( pNxtBox && pNxtBox->GetSttNd() )
{
@@ -1068,7 +1068,7 @@ void lcl_SaveUpperLowerBorder( SwTable& rTbl, const SwTableBox& rBox,
: rBoxItem.GetBottom(),
BOX_LINE_TOP );
rShareFmts.SetAttr( *pNxtBox, aTmp );
- bChgd = TRUE;
+ bChgd = sal_True;
}
}
if( !bChgd && pPrvBox && pPrvBox->GetSttNd() )
@@ -1089,12 +1089,12 @@ void lcl_SaveUpperLowerBorder( SwTable& rTbl, const SwTableBox& rBox,
}
-BOOL SwTable::DeleteSel(
+sal_Bool SwTable::DeleteSel(
SwDoc* pDoc
,
const SwSelBoxes& rBoxes,
const SwSelBoxes* pMerged, SwUndo* pUndo,
- const BOOL bDelMakeFrms, const BOOL bCorrBorder )
+ const sal_Bool bDelMakeFrms, const sal_Bool bCorrBorder )
{
ASSERT( pDoc, "No doc?" );
SwTableNode* pTblNd = 0;
@@ -1102,7 +1102,7 @@ BOOL SwTable::DeleteSel(
{
pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
}
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
@@ -1125,7 +1125,7 @@ BOOL SwTable::DeleteSel(
{
SwSelBoxes aBoxes;
aBoxes.Insert( &rBoxes );
- for( USHORT n = 0; n < aBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aBoxes.Count(); ++n )
::lcl_SaveUpperLowerBorder( *this, *rBoxes[ n ], aShareFmts,
&aBoxes, &n );
}
@@ -1135,9 +1135,9 @@ BOOL SwTable::DeleteSel(
SwChartDataProvider *pPCD = pDoc->GetChartDataProvider();
//
// delete boxes from last to first
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
- USHORT nIdx = rBoxes.Count() - 1 - n;
+ sal_uInt16 nIdx = rBoxes.Count() - 1 - n;
// first adapt the data-sequence for chart if necessary
// (needed to move the implementation cursor properly to it's new
@@ -1146,7 +1146,7 @@ BOOL SwTable::DeleteSel(
pPCD->DeleteBox( &pTblNd->GetTable(), *rBoxes[nIdx] );
// ... then delete the boxes
- _DeleteBox( *this, rBoxes[nIdx], pUndo, TRUE, bCorrBorder, &aShareFmts );
+ _DeleteBox( *this, rBoxes[nIdx], pUndo, sal_True, bCorrBorder, &aShareFmts );
}
// dann raeume die Struktur aller Lines auf
@@ -1161,19 +1161,19 @@ BOOL SwTable::DeleteSel(
CHECKTABLELAYOUT
CHECK_TABLE( *this )
- return TRUE;
+ return sal_True;
}
// ---------------------------------------------------------------
-BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
- BOOL bSameHeight )
+sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt,
+ sal_Bool bSameHeight )
{
ASSERT( pDoc && rBoxes.Count() && nCnt, "keine gueltigen Werte" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// TL_CHART2: splitting/merging of a number of cells or rows will usually make
// the table to complex to be handled with chart.
@@ -1188,7 +1188,7 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
if ( bSameHeight )
{
pRowHeights = new long[ rBoxes.Count() ];
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pSelBox = *( rBoxes.GetData() + n );
const SwRowFrm* pRow = GetRowFrm( *pSelBox->GetUpper() );
@@ -1203,7 +1203,7 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
aFndBox.SetTableLines( rBoxes, *this );
aFndBox.DelFrms( *this );
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pSelBox = *( rBoxes.GetData() + n );
ASSERT( pSelBox, "Box steht nicht in der Tabelle" );
@@ -1217,13 +1217,13 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
if ( bSameHeight && ATT_VAR_SIZE == aFSz.GetHeightSizeType() )
aFSz.SetHeightSizeType( ATT_MIN_SIZE );
- BOOL bChgLineSz = 0 != aFSz.GetHeight() || bSameHeight;
+ sal_Bool bChgLineSz = 0 != aFSz.GetHeight() || bSameHeight;
if ( bChgLineSz )
aFSz.SetHeight( ( bSameHeight ? pRowHeights[ n ] : aFSz.GetHeight() ) /
(nCnt + 1) );
SwTableBox* pNewBox = new SwTableBox( pFrmFmt, nCnt, pInsLine );
- USHORT nBoxPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSelBox );
+ sal_uInt16 nBoxPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSelBox );
pInsLine->GetTabBoxes().Remove( nBoxPos ); // alte loeschen
pInsLine->GetTabBoxes().C40_INSERT( SwTableBox, pNewBox, nBoxPos );
@@ -1231,24 +1231,24 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
SwTableBox* pLastBox = pSelBox; // zum verteilen der TextNodes !!
// sollte Bereiche in der Box stehen, dann bleibt sie so bestehen
// !! FALLS DAS GEAENDERT WIRD MUSS DAS UNDO ANGEPASST WERDEN !!!
- BOOL bMoveNodes = TRUE;
+ sal_Bool bMoveNodes = sal_True;
{
- ULONG nSttNd = pLastBox->GetSttIdx() + 1,
+ sal_uLong nSttNd = pLastBox->GetSttIdx() + 1,
nEndNd = pLastBox->GetSttNd()->EndOfSectionIndex();
while( nSttNd < nEndNd )
if( !pDoc->GetNodes()[ nSttNd++ ]->IsTxtNode() )
{
- bMoveNodes = FALSE;
+ bMoveNodes = sal_False;
break;
}
}
SwTableBoxFmt* pCpyBoxFrmFmt = (SwTableBoxFmt*)pSelBox->GetFrmFmt();
- BOOL bChkBorder = 0 != pCpyBoxFrmFmt->GetBox().GetTop();
+ sal_Bool bChkBorder = 0 != pCpyBoxFrmFmt->GetBox().GetTop();
if( bChkBorder )
pCpyBoxFrmFmt = (SwTableBoxFmt*)pSelBox->ClaimFrmFmt();
- for( USHORT i = 0; i <= nCnt; ++i )
+ for( sal_uInt16 i = 0; i <= nCnt; ++i )
{
// also erstmal eine neue Linie in der neuen Box
SwTableLine* pNewLine = new SwTableLine(
@@ -1276,7 +1276,7 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
SvxBoxItem aTmp( pCpyBoxFrmFmt->GetBox() );
aTmp.SetLine( 0, BOX_LINE_TOP );
pCpyBoxFrmFmt->SetFmtAttr( aTmp );
- bChkBorder = FALSE;
+ bChkBorder = sal_False;
}
if( bMoveNodes )
@@ -1288,7 +1288,7 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
SwNodeRange aRg( *pLastBox->GetSttNd(), +2, *pEndNd );
pLastBox = pNewLine->GetTabBoxes()[0]; // neu setzen
SwNodeIndex aInsPos( *pLastBox->GetSttNd(), 1 );
- pDoc->GetNodes()._MoveNodes(aRg, pDoc->GetNodes(), aInsPos, FALSE);
+ pDoc->GetNodes()._MoveNodes(aRg, pDoc->GetNodes(), aInsPos, sal_False);
pDoc->GetNodes().Delete( aInsPos, 1 ); // den leeren noch loeschen
}
}
@@ -1308,15 +1308,15 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
CHECKBOXWIDTH
CHECKTABLELAYOUT
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
+sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt )
{
ASSERT( pDoc && rBoxes.Count() && nCnt, "keine gueltigen Werte" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// TL_CHART2: splitting/merging of a number of cells or rows will usually make
// the table to complex to be handled with chart.
@@ -1335,8 +1335,8 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
_CpyTabFrms aFrmArr;
SvPtrarr aLastBoxArr;
- USHORT nFndPos;
- for( USHORT n = 0; n < aSelBoxes.Count(); ++n )
+ sal_uInt16 nFndPos;
+ for( sal_uInt16 n = 0; n < aSelBoxes.Count(); ++n )
{
SwTableBox* pSelBox = *( aSelBoxes.GetData() + n );
ASSERT( pSelBox, "Box steht nicht in der Tabelle" );
@@ -1347,7 +1347,7 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
// dann teile die Box nCnt in nCnt Boxen
SwTableLine* pInsLine = pSelBox->GetUpper();
- USHORT nBoxPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSelBox );
+ sal_uInt16 nBoxPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSelBox );
// suche das FrmFmt im Array aller Frame-Formate
SwTableBoxFmt* pLastBoxFmt;
@@ -1382,7 +1382,7 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
}
// dann fuege mal an der Position die neuen Boxen ein
- for( USHORT i = 1; i < nCnt; ++i )
+ for( sal_uInt16 i = 1; i < nCnt; ++i )
::_InsTblBox( pDoc, pTblNd, pInsLine, aFindFrm.pNewFrmFmt,
pSelBox, nBoxPos + i ); // dahinter einfuegen
@@ -1400,7 +1400,7 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
aFindFrm.pNewFrmFmt->SetFmtAttr( aTmp );
// und dann das Format aus dem "cache" entfernen
- for( USHORT i = aFrmArr.Count(); i; )
+ for( sal_uInt16 i = aFrmArr.Count(); i; )
{
const _CpyTabFrm& rCTF = aFrmArr[ --i ];
if( rCTF.pNewFrmFmt == aFindFrm.pNewFrmFmt ||
@@ -1418,7 +1418,7 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
CHECKBOXWIDTH
CHECKTABLELAYOUT
- return TRUE;
+ return sal_True;
}
// ---------------------------------------------------------------
@@ -1438,12 +1438,12 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
----------------------- >> MERGE << ------------------------
*/
-void lcl_CpyLines( USHORT nStt, USHORT nEnd,
+void lcl_CpyLines( sal_uInt16 nStt, sal_uInt16 nEnd,
SwTableLines& rLines,
SwTableBox* pInsBox,
- USHORT nPos = USHRT_MAX )
+ sal_uInt16 nPos = USHRT_MAX )
{
- for( USHORT n = nStt; n < nEnd; ++n )
+ for( sal_uInt16 n = nStt; n < nEnd; ++n )
rLines[n]->SetUpper( pInsBox );
if( USHRT_MAX == nPos )
nPos = pInsBox->GetTabLines().Count();
@@ -1451,12 +1451,12 @@ void lcl_CpyLines( USHORT nStt, USHORT nEnd,
rLines.Remove( nStt, nEnd - nStt );
}
-void lcl_CpyBoxes( USHORT nStt, USHORT nEnd,
+void lcl_CpyBoxes( sal_uInt16 nStt, sal_uInt16 nEnd,
SwTableBoxes& rBoxes,
SwTableLine* pInsLine,
- USHORT nPos = USHRT_MAX )
+ sal_uInt16 nPos = USHRT_MAX )
{
- for( USHORT n = nStt; n < nEnd; ++n )
+ for( sal_uInt16 n = nStt; n < nEnd; ++n )
rBoxes[n]->SetUpper( pInsLine );
if( USHRT_MAX == nPos )
nPos = pInsLine->GetTabBoxes().Count();
@@ -1474,7 +1474,7 @@ void lcl_CalcWidth( SwTableBox* pBox )
ASSERT( pLine, "Box steht in keiner Line" );
long nWidth = 0;
- for( USHORT n = 0; n < pLine->GetTabBoxes().Count(); ++n )
+ for( sal_uInt16 n = 0; n < pLine->GetTabBoxes().Count(); ++n )
nWidth += pLine->GetTabBoxes()[n]->GetFrmFmt()->GetFrmSize().GetWidth();
pFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nWidth, 0 ));
@@ -1491,14 +1491,14 @@ struct _InsULPara
SwTableNode* pTblNd;
SwTableLine* pInsLine;
SwTableBox* pInsBox;
- BOOL bUL_LR : 1; // Upper-Lower(TRUE) oder Left-Right(FALSE) ?
- BOOL bUL : 1; // Upper-Left(TRUE) oder Lower-Right(FALSE) ?
+ sal_Bool bUL_LR : 1; // Upper-Lower(sal_True) oder Left-Right(sal_False) ?
+ sal_Bool bUL : 1; // Upper-Left(sal_True) oder Lower-Right(sal_False) ?
SwTableBox* pLeftBox;
SwTableBox* pRightBox;
SwTableBox* pMergeBox;
- _InsULPara( SwTableNode* pTNd, BOOL bUpperLower, BOOL bUpper,
+ _InsULPara( SwTableNode* pTNd, sal_Bool bUpperLower, sal_Bool bUpper,
SwTableBox* pLeft, SwTableBox* pMerge, SwTableBox* pRight,
SwTableLine* pLine=0, SwTableBox* pBox=0 )
: pTblNd( pTNd ), pInsLine( pLine ), pInsBox( pBox ),
@@ -1506,26 +1506,26 @@ struct _InsULPara
{ bUL_LR = bUpperLower; bUL = bUpper; }
void SetLeft( SwTableBox* pBox=0 )
- { bUL_LR = FALSE; bUL = TRUE; if( pBox ) pInsBox = pBox; }
+ { bUL_LR = sal_False; bUL = sal_True; if( pBox ) pInsBox = pBox; }
void SetRight( SwTableBox* pBox=0 )
- { bUL_LR = FALSE; bUL = FALSE; if( pBox ) pInsBox = pBox; }
+ { bUL_LR = sal_False; bUL = sal_False; if( pBox ) pInsBox = pBox; }
void SetUpper( SwTableLine* pLine=0 )
- { bUL_LR = TRUE; bUL = TRUE; if( pLine ) pInsLine = pLine; }
+ { bUL_LR = sal_True; bUL = sal_True; if( pLine ) pInsLine = pLine; }
void SetLower( SwTableLine* pLine=0 )
- { bUL_LR = TRUE; bUL = FALSE; if( pLine ) pInsLine = pLine; }
+ { bUL_LR = sal_True; bUL = sal_False; if( pLine ) pInsLine = pLine; }
};
-BOOL lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara )
+sal_Bool lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara )
{
_InsULPara* pULPara = (_InsULPara*)pPara;
SwTableBoxes* pBoxes;
- USHORT nStt = 0, nEnd = rpFndBox->GetLines().Count();
- USHORT nInsPos = USHRT_MAX;
+ sal_uInt16 nStt = 0, nEnd = rpFndBox->GetLines().Count();
+ sal_uInt16 nInsPos = USHRT_MAX;
if( !pULPara->bUL_LR ) // Left/Right
{
- USHORT nPos;
+ sal_uInt16 nPos;
SwTableBox* pFndBox = (SwTableBox*)rpFndBox->GetBox();
pBoxes = &pFndBox->GetUpper()->GetTabBoxes();
if( pULPara->bUL ) // Left ?
@@ -1572,19 +1572,19 @@ BOOL lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara )
else
delete pBox;
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
+sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
{
_InsULPara* pULPara = (_InsULPara*)pPara;
SwTableLines* pLines;
- USHORT nStt = 0, nEnd = rpFndLine->GetBoxes().Count();
- USHORT nInsPos = USHRT_MAX;
+ sal_uInt16 nStt = 0, nEnd = rpFndLine->GetBoxes().Count();
+ sal_uInt16 nInsPos = USHRT_MAX;
if( pULPara->bUL_LR ) // UpperLower ?
{
- USHORT nPos;
+ sal_uInt16 nPos;
SwTableLine* pFndLn = (SwTableLine*)rpFndLine->GetLine();
pLines = pFndLn->GetUpper() ?
&pFndLn->GetUpper()->GetTabLines() :
@@ -1593,8 +1593,8 @@ BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
SwTableBox* pLBx = rpFndLine->GetBoxes()[0]->GetBox();
SwTableBox* pRBx = rpFndLine->GetBoxes()[
rpFndLine->GetBoxes().Count()-1]->GetBox();
- USHORT nLeft = pFndLn->GetTabBoxes().C40_GETPOS( SwTableBox, pLBx );
- USHORT nRight = pFndLn->GetTabBoxes().C40_GETPOS( SwTableBox, pRBx );
+ sal_uInt16 nLeft = pFndLn->GetTabBoxes().C40_GETPOS( SwTableBox, pLBx );
+ sal_uInt16 nRight = pFndLn->GetTabBoxes().C40_GETPOS( SwTableBox, pRBx );
// if( ( nLeft && nRight+1 < pFndLn->GetTabBoxes().Count() ) ||
// ( !nLeft && nRight+1 >= pFndLn->GetTabBoxes().Count() ) )
@@ -1674,7 +1674,7 @@ BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
// Right auch mit in die Line
pInsLine = pULPara->pLeftBox->GetUpper();
- USHORT nMvPos = pULPara->pRightBox->GetUpper()->GetTabBoxes().
+ sal_uInt16 nMvPos = pULPara->pRightBox->GetUpper()->GetTabBoxes().
C40_GETPOS( SwTableBox, pULPara->pRightBox );
lcl_CpyBoxes( nMvPos, nMvPos+1,
pULPara->pRightBox->GetUpper()->GetTabBoxes(),
@@ -1696,7 +1696,7 @@ BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
pRMBox = new SwTableBox( (SwTableBoxFmt*)pRMBox->GetFrmFmt(), 0, pNewLn );
pNewLn->GetTabBoxes().C40_INSERT( SwTableBox, pRMBox, 0 );
- USHORT nPos1, nPos2;
+ sal_uInt16 nPos1, nPos2;
if( pULPara->bUL )
nPos1 = 0,
nPos2 = nMvPos;
@@ -1727,7 +1727,7 @@ BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
lcl_CalcWidth( pRMBox ); // bereche die Breite der Box
}
else {
- ASSERT( FALSE , "Was denn nun" );
+ ASSERT( sal_False , "Was denn nun" );
}
}
// Left/Right
@@ -1754,17 +1754,17 @@ BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
else
delete pNewLine;
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
+sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
SwTableBox* pMergeBox, SwUndoTblMerge* pUndo )
{
ASSERT( rBoxes.Count() && pMergeBox, "keine gueltigen Werte" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -1773,7 +1773,7 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
// TL_CHART2: splitting/merging of a number of cells or rows will usually make
// the table to complex to be handled with chart.
@@ -1804,7 +1804,7 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
&pFndBox->GetBox()->GetTabLines() : &GetTabLines();
SwTableLine* pNewLine = pFndBox->GetLines()[0]->GetLine();
- USHORT nInsPos = pLines->C40_GETPOS( SwTableLine, pNewLine );
+ sal_uInt16 nInsPos = pLines->C40_GETPOS( SwTableLine, pNewLine );
pLines->C40_INSERT( SwTableLine, pInsLine, nInsPos );
SwTableBox* pLeftBox = new SwTableBox( (SwTableBoxFmt*)pMergeBox->GetFrmFmt(), 0, pInsLine );
@@ -1818,13 +1818,13 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
// in diese kommen alle Lines, die ueber dem selektierten Bereich stehen
// Sie bilden also eine Upper/Lower Line
- _InsULPara aPara( pTblNd, TRUE, TRUE, pLeftBox, pMergeBox, pRightBox, pInsLine );
+ _InsULPara aPara( pTblNd, sal_True, sal_True, pLeftBox, pMergeBox, pRightBox, pInsLine );
// move die oben/unten ueberhaengenden Lines vom selektierten Bereich
pFndBox->GetLines()[0]->GetBoxes().ForEach( &lcl_Merge_MoveBox,
&aPara );
aPara.SetLower( pInsLine );
- USHORT nEnd = pFndBox->GetLines().Count()-1;
+ sal_uInt16 nEnd = pFndBox->GetLines().Count()-1;
pFndBox->GetLines()[nEnd]->GetBoxes().ForEach( &lcl_Merge_MoveBox,
&aPara );
@@ -1836,7 +1836,7 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pFndBox->GetLines().ForEach( &lcl_Merge_MoveLine, &aPara );
if( !pLeftBox->GetTabLines().Count() )
- _DeleteBox( *this, pLeftBox, 0, FALSE, FALSE );
+ _DeleteBox( *this, pLeftBox, 0, sal_False, sal_False );
else
{
lcl_CalcWidth( pLeftBox ); // bereche die Breite der Box
@@ -1844,7 +1844,7 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pUndo->AddNewBox( pLeftBox->GetSttIdx() );
}
if( !pRightBox->GetTabLines().Count() )
- _DeleteBox( *this, pRightBox, 0, FALSE, FALSE );
+ _DeleteBox( *this, pRightBox, 0, sal_False, sal_False );
else
{
lcl_CalcWidth( pRightBox ); // bereche die Breite der Box
@@ -1852,7 +1852,7 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pUndo->AddNewBox( pRightBox->GetSttIdx() );
}
- DeleteSel( pDoc, rBoxes, 0, 0, FALSE, FALSE );
+ DeleteSel( pDoc, rBoxes, 0, 0, sal_False, sal_False );
// dann raeume die Struktur dieser Line noch mal auf:
// generell alle Aufraeumen
@@ -1865,20 +1865,20 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
CHECKBOXWIDTH
CHECKTABLELAYOUT
- return TRUE;
+ return sal_True;
}
// ---------------------------------------------------------------
void lcl_CheckRowSpan( SwTable &rTbl )
{
- USHORT nLineCount = rTbl.GetTabLines().Count();
- USHORT nMaxSpan = nLineCount;
+ sal_uInt16 nLineCount = rTbl.GetTabLines().Count();
+ sal_uInt16 nMaxSpan = nLineCount;
long nMinSpan = 1;
while( nMaxSpan )
{
SwTableLine* pLine = rTbl.GetTabLines()[ nLineCount - nMaxSpan ];
- for( USHORT nBox = 0; nBox < pLine->GetTabBoxes().Count(); ++nBox )
+ for( sal_uInt16 nBox = 0; nBox < pLine->GetTabBoxes().Count(); ++nBox )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nBox];
long nRowSpan = pBox->getRowSpan();
@@ -1892,31 +1892,31 @@ void lcl_CheckRowSpan( SwTable &rTbl )
}
}
-USHORT lcl_GetBoxOffset( const _FndBox& rBox )
+sal_uInt16 lcl_GetBoxOffset( const _FndBox& rBox )
{
// suche die erste Box
const _FndBox* pFirstBox = &rBox;
while( pFirstBox->GetLines().Count() )
pFirstBox = pFirstBox->GetLines()[ 0 ]->GetBoxes()[ 0 ];
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
// dann ueber die Lines nach oben die Position bestimmen
const SwTableBox* pBox = pFirstBox->GetBox();
do {
const SwTableBoxes& rBoxes = pBox->GetUpper()->GetTabBoxes();
const SwTableBox* pCmp;
- for( USHORT n = 0; pBox != ( pCmp = rBoxes[ n ] ); ++n )
- nRet = nRet + (USHORT) pCmp->GetFrmFmt()->GetFrmSize().GetWidth();
+ for( sal_uInt16 n = 0; pBox != ( pCmp = rBoxes[ n ] ); ++n )
+ nRet = nRet + (sal_uInt16) pCmp->GetFrmFmt()->GetFrmSize().GetWidth();
pBox = pBox->GetUpper()->GetUpper();
} while( pBox );
return nRet;
}
-USHORT lcl_GetLineWidth( const _FndLine& rLine )
+sal_uInt16 lcl_GetLineWidth( const _FndLine& rLine )
{
- USHORT nRet = 0;
- for( USHORT n = rLine.GetBoxes().Count(); n; )
- nRet = nRet + (USHORT)rLine.GetBoxes()[ --n ]->GetBox()->GetFrmFmt()
+ sal_uInt16 nRet = 0;
+ for( sal_uInt16 n = rLine.GetBoxes().Count(); n; )
+ nRet = nRet + (sal_uInt16)rLine.GetBoxes()[ --n ]->GetBox()->GetFrmFmt()
->GetFrmSize().GetWidth();
return nRet;
}
@@ -1924,27 +1924,27 @@ USHORT lcl_GetLineWidth( const _FndLine& rLine )
void lcl_CalcNewWidths( const _FndLines& rFndLines, _CpyPara& rPara )
{
rPara.pWidths.reset();
- USHORT nLineCount = rFndLines.Count();
+ sal_uInt16 nLineCount = rFndLines.Count();
if( nLineCount )
{
- rPara.pWidths = boost::shared_ptr< std::vector< std::vector< ULONG > > >
- ( new std::vector< std::vector< ULONG > >( nLineCount ));
+ rPara.pWidths = boost::shared_ptr< std::vector< std::vector< sal_uLong > > >
+ ( new std::vector< std::vector< sal_uLong > >( nLineCount ));
// First we collect information about the left/right borders of all
// selected cells
- for( USHORT nLine = 0; nLine < nLineCount; ++nLine )
+ for( sal_uInt16 nLine = 0; nLine < nLineCount; ++nLine )
{
- std::vector< ULONG > &rWidth = (*rPara.pWidths.get())[ nLine ];
+ std::vector< sal_uLong > &rWidth = (*rPara.pWidths.get())[ nLine ];
const _FndLine *pFndLine = rFndLines[ nLine ];
if( pFndLine && pFndLine->GetBoxes().Count() )
{
const SwTableLine *pLine = pFndLine->GetLine();
if( pLine && pLine->GetTabBoxes().Count() )
{
- USHORT nBoxCount = pLine->GetTabBoxes().Count();
- ULONG nPos = 0;
+ sal_uInt16 nBoxCount = pLine->GetTabBoxes().Count();
+ sal_uLong nPos = 0;
// The first selected box...
const SwTableBox *pSel = pFndLine->GetBoxes()[0]->GetBox();
- USHORT nBox = 0;
+ sal_uInt16 nBox = 0;
// Sum up the width of all boxes before the first selected box
while( nBox < nBoxCount )
{
@@ -1958,7 +1958,7 @@ void lcl_CalcNewWidths( const _FndLines& rFndLines, _CpyPara& rPara )
if( rPara.nMinLeft > nPos )
rPara.nMinLeft = nPos;
nBoxCount = pFndLine->GetBoxes().Count();
- rWidth = std::vector< ULONG >( nBoxCount+2 );
+ rWidth = std::vector< sal_uLong >( nBoxCount+2 );
rWidth[ 0 ] = nPos;
// Add now the widths of all selected boxes and store
// the positions in the vector
@@ -1978,39 +1978,39 @@ void lcl_CalcNewWidths( const _FndLines& rFndLines, _CpyPara& rPara )
}
}
// Second step: calculate the new widths for the copied cells
- ULONG nSelSize = rPara.nMaxRight - rPara.nMinLeft;
+ sal_uLong nSelSize = rPara.nMaxRight - rPara.nMinLeft;
if( nSelSize )
{
- for( USHORT nLine = 0; nLine < nLineCount; ++nLine )
+ for( sal_uInt16 nLine = 0; nLine < nLineCount; ++nLine )
{
- std::vector< ULONG > &rWidth = (*rPara.pWidths.get())[ nLine ];
- USHORT nCount = (USHORT)rWidth.size();
+ std::vector< sal_uLong > &rWidth = (*rPara.pWidths.get())[ nLine ];
+ sal_uInt16 nCount = (sal_uInt16)rWidth.size();
if( nCount > 2 )
{
rWidth[ nCount - 1 ] = rPara.nMaxRight;
- ULONG nLastPos = 0;
- for( USHORT nBox = 0; nBox < nCount; ++nBox )
+ sal_uLong nLastPos = 0;
+ for( sal_uInt16 nBox = 0; nBox < nCount; ++nBox )
{
sal_uInt64 nNextPos = rWidth[ nBox ];
nNextPos -= rPara.nMinLeft;
nNextPos *= rPara.nNewSize;
nNextPos /= nSelSize;
- rWidth[ nBox ] = (ULONG)(nNextPos - nLastPos);
- nLastPos = (ULONG)nNextPos;
+ rWidth[ nBox ] = (sal_uLong)(nNextPos - nLastPos);
+ nLastPos = (sal_uLong)nNextPos;
}
}
}
}
}
-BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
+sal_Bool lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
{
_CpyPara* pCpyPara = (_CpyPara*)pPara;
// Calculation of new size
- ULONG nRealSize;
- ULONG nDummy1 = 0;
- ULONG nDummy2 = 0;
+ sal_uLong nRealSize;
+ sal_uLong nDummy1 = 0;
+ sal_uLong nDummy2 = 0;
if( pCpyPara->pTblNd->GetTable().IsNewModel() )
{
if( pCpyPara->nBoxIdx == 1 )
@@ -2026,7 +2026,7 @@ BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
nRealSize /= pCpyPara->nOldSize;
}
- ULONG nSize;
+ sal_uLong nSize;
bool bDummy = nDummy1 > 0;
if( bDummy )
nSize = nDummy1;
@@ -2041,7 +2041,7 @@ BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
_CpyTabFrm aFindFrm( (SwTableBoxFmt*)rpFndBox->GetBox()->GetFrmFmt() );
SwFmtFrmSize aFrmSz;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( !pCpyPara->rTabFrmArr.Seek_Entry( aFindFrm, &nFndPos ) ||
( aFrmSz = ( aFindFrm = pCpyPara->rTabFrmArr[ nFndPos ]).pNewFrmFmt->
GetFrmSize()).GetWidth() != (SwTwips)nSize )
@@ -2090,12 +2090,12 @@ BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
if( aBoxAttrSet.Count() )
{
const SfxPoolItem* pItem;
- SvNumberFormatter* pN = pCpyPara->pDoc->GetNumberFormatter( FALSE );
+ SvNumberFormatter* pN = pCpyPara->pDoc->GetNumberFormatter( sal_False );
if( pN && pN->HasMergeFmtTbl() && SFX_ITEM_SET == aBoxAttrSet.
- GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem ) )
+ GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem ) )
{
- ULONG nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
- ULONG nNewIdx = pN->GetMergeFmtIndex( nOldIdx );
+ sal_uLong nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
+ sal_uLong nNewIdx = pN->GetMergeFmtIndex( nOldIdx );
if( nNewIdx != nOldIdx )
aBoxAttrSet.Put( SwTblBoxNumFormat( nNewIdx ));
}
@@ -2107,7 +2107,7 @@ BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
*rpFndBox->GetBox()->GetSttNd()->EndOfSectionNode() );
SwNodeIndex aInsIdx( *pBox->GetSttNd(), 1 );
- pFromDoc->CopyWithFlyInFly( aCpyRg, 0, aInsIdx, FALSE );
+ pFromDoc->CopyWithFlyInFly( aCpyRg, 0, aInsIdx, sal_False );
// den initialen TextNode loeschen
pCpyPara->pDoc->GetNodes().Delete( aInsIdx, 1 );
}
@@ -2127,16 +2127,16 @@ BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
}
}
while( nSize );
- return TRUE;
+ return sal_True;
}
-BOOL lcl_CopyLineToDoc( const _FndLine*& rpFndLine, void* pPara )
+sal_Bool lcl_CopyLineToDoc( const _FndLine*& rpFndLine, void* pPara )
{
_CpyPara* pCpyPara = (_CpyPara*)pPara;
// suche das Format in der Liste aller Formate
_CpyTabFrm aFindFrm( (SwTableBoxFmt*)rpFndLine->GetLine()->GetFrmFmt() );
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( !pCpyPara->rTabFrmArr.Seek_Entry( aFindFrm, &nFndPos ))
{
// es ist noch nicht vorhanden, also kopiere es
@@ -2180,23 +2180,23 @@ BOOL lcl_CopyLineToDoc( const _FndLine*& rpFndLine, void* pPara )
}
else
// errechne sie
- for( USHORT n = 0; n < rpFndLine->GetBoxes().Count(); ++n )
+ for( sal_uInt16 n = 0; n < rpFndLine->GetBoxes().Count(); ++n )
aPara.nOldSize += rpFndLine->GetBoxes()[n]
->GetBox()->GetFrmFmt()->GetFrmSize().GetWidth();
((_FndLine*)rpFndLine)->GetBoxes().ForEach( &lcl_CopyBoxToDoc, &aPara );
if( pCpyPara->pTblNd->GetTable().IsNewModel() )
++pCpyPara->nLnIdx;
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
+sal_Bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
{
// suche alle Boxen / Lines
SwSelBoxes aSelBoxes;
SwTableBox* pBox = GetTabSortBoxes()[ 0 ];
pBox = GetTblBox( pBox->GetSttNd()->StartOfSectionNode()->GetIndex() + 1 );
- SelLineFromBox( pBox, aSelBoxes, TRUE );
+ SelLineFromBox( pBox, aSelBoxes, sal_True );
_FndBox aFndBox( 0, 0 );
{
@@ -2204,7 +2204,7 @@ BOOL SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
((SwTableLines&)GetTabLines()).ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
{
// Tabellen-Formeln in die relative Darstellung umwandeln
@@ -2214,7 +2214,7 @@ BOOL SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
}
_CpyTabFrms aCpyFmt;
- _CpyPara aPara( &rTblNd, 1, aCpyFmt, TRUE );
+ _CpyPara aPara( &rTblNd, 1, aCpyFmt, sal_True );
aPara.nNewSize = aPara.nOldSize = rTblNd.GetTable().GetFrmFmt()->GetFrmSize().GetWidth();
// dann kopiere mal
if( IsNewModel() )
@@ -2223,9 +2223,9 @@ BOOL SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
if( rTblNd.GetTable().IsNewModel() )
{ // The copied line must not contain any row span attributes > 1
SwTableLine* pLine = rTblNd.GetTable().GetTabLines()[0];
- USHORT nColCount = pLine->GetTabBoxes().Count();
+ sal_uInt16 nColCount = pLine->GetTabBoxes().Count();
ASSERT( nColCount, "Empty Table Line" )
- for( USHORT nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
+ for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pTableBox = pLine->GetTabBoxes()[nCurrCol];
ASSERT( pTableBox, "Missing Table Box" );
@@ -2233,12 +2233,12 @@ BOOL SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
}
}
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
- const SwSelBoxes& rSelBoxes, BOOL bCpyNds,
- BOOL bCpyName ) const
+sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
+ const SwSelBoxes& rSelBoxes, sal_Bool bCpyNds,
+ sal_Bool bCpyName ) const
{
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -2247,7 +2247,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
((SwTableLines&)GetTabLines()).ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
// erst die Poolvorlagen fuer die Tabelle kopieren, damit die dann
// wirklich kopiert und damit die gueltigen Werte haben.
@@ -2261,9 +2261,9 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
SwTable* pNewTbl = (SwTable*)pInsDoc->InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 1 ),
rPos, 1, 1, GetFrmFmt()->GetHoriOrient().GetHoriOrient(),
- 0, 0, FALSE, IsNewModel() );
+ 0, 0, sal_False, IsNewModel() );
if( !pNewTbl )
- return FALSE;
+ return sal_False;
SwNodeIndex aIdx( rPos.nNode, -1 );
SwTableNode* pTblNd = aIdx.GetNode().FindTableNode();
@@ -2283,7 +2283,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
// tauschen am Node den Tabellen-Pointer aus
pNewTbl = new SwDDETable( *pNewTbl,
(SwDDEFieldType*)pFldType );
- pTblNd->SetNewTable( pNewTbl, FALSE );
+ pTblNd->SetNewTable( pNewTbl, sal_False );
}
pNewTbl->GetFrmFmt()->CopyAttrs( *GetFrmFmt() );
@@ -2319,11 +2319,11 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
_FndLine* pFndLn = aFndBox.GetLines()[ 0 ];
SwTableLine* pLn = pFndLn->GetLine();
const SwTableLine* pTmp = pLn;
- USHORT nLnPos = GetTabLines().GetPos( pTmp );
+ sal_uInt16 nLnPos = GetTabLines().GetPos( pTmp );
if( USHRT_MAX != nLnPos && nLnPos )
{
// es gibt eine Line davor
- SwCollectTblLineBoxes aLnPara( FALSE, HEADLINE_BORDERCOPY );
+ SwCollectTblLineBoxes aLnPara( sal_False, HEADLINE_BORDERCOPY );
pLn = GetTabLines()[ nLnPos - 1 ];
pLn->GetTabBoxes().ForEach( &lcl_Box_CollectBox, &aLnPara );
@@ -2331,7 +2331,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
if( aLnPara.Resize( lcl_GetBoxOffset( aFndBox ),
lcl_GetLineWidth( *pFndLn )) )
{
- aLnPara.SetValues( TRUE );
+ aLnPara.SetValues( sal_True );
pLn = pNewTbl->GetTabLines()[ 0 ];
pLn->GetTabBoxes().ForEach( &lcl_BoxSetSplitBoxFmts, &aLnPara );
}
@@ -2344,7 +2344,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
if( nLnPos < GetTabLines().Count() - 1 )
{
// es gibt eine Line dahinter
- SwCollectTblLineBoxes aLnPara( TRUE, HEADLINE_BORDERCOPY );
+ SwCollectTblLineBoxes aLnPara( sal_True, HEADLINE_BORDERCOPY );
pLn = GetTabLines()[ nLnPos + 1 ];
pLn->GetTabBoxes().ForEach( &lcl_Box_CollectBox, &aLnPara );
@@ -2352,7 +2352,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
if( aLnPara.Resize( lcl_GetBoxOffset( aFndBox ),
lcl_GetLineWidth( *pFndLn )) )
{
- aLnPara.SetValues( FALSE );
+ aLnPara.SetValues( sal_False );
pLn = pNewTbl->GetTabLines()[ pNewTbl->GetTabLines().Count()-1 ];
pLn->GetTabBoxes().ForEach( &lcl_BoxSetSplitBoxFmts, &aLnPara );
}
@@ -2362,7 +2362,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
// die initiale Box muss noch geloescht werden
_DeleteBox( *pNewTbl, pNewTbl->GetTabLines()[
pNewTbl->GetTabLines().Count() - 1 ]->GetTabBoxes()[0],
- 0, FALSE, FALSE );
+ 0, sal_False, sal_False );
if( pNewTbl->IsNewModel() )
lcl_CheckRowSpan( *pNewTbl );
@@ -2373,7 +2373,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
CHECKTABLELAYOUT
- return TRUE;
+ return sal_True;
}
@@ -2382,11 +2382,11 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
// suche ab dieser Line nach der naechsten Box mit Inhalt
SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl,
- const SwTableBox* pSrchBox, BOOL bOvrTblLns ) const
+ const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
{
const SwTableLine* pLine = this; // fuer M800
SwTableBox* pBox;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( GetTabBoxes().Count() && pSrchBox &&
USHRT_MAX != ( nFndPos = GetTabBoxes().GetPos( pSrchBox )) &&
nFndPos + 1 != GetTabBoxes().Count() )
@@ -2430,11 +2430,11 @@ SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl,
// suche ab dieser Line nach der vorherigen Box
SwTableBox* SwTableLine::FindPreviousBox( const SwTable& rTbl,
- const SwTableBox* pSrchBox, BOOL bOvrTblLns ) const
+ const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
{
const SwTableLine* pLine = this; // fuer M800
SwTableBox* pBox;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( GetTabBoxes().Count() && pSrchBox &&
USHRT_MAX != ( nFndPos = GetTabBoxes().GetPos( pSrchBox )) &&
nFndPos )
@@ -2484,7 +2484,7 @@ SwTableBox* SwTableLine::FindPreviousBox( const SwTable& rTbl,
// suche ab dieser Line nach der naechsten Box mit Inhalt
SwTableBox* SwTableBox::FindNextBox( const SwTable& rTbl,
- const SwTableBox* pSrchBox, BOOL bOvrTblLns ) const
+ const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
{
if( !pSrchBox && !GetTabLines().Count() )
return (SwTableBox*)this;
@@ -2495,7 +2495,7 @@ SwTableBox* SwTableBox::FindNextBox( const SwTable& rTbl,
// suche ab dieser Line nach der naechsten Box mit Inhalt
SwTableBox* SwTableBox::FindPreviousBox( const SwTable& rTbl,
- const SwTableBox* pSrchBox, BOOL bOvrTblLns ) const
+ const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
{
if( !pSrchBox && !GetTabLines().Count() )
return (SwTableBox*)this;
@@ -2504,7 +2504,7 @@ SwTableBox* SwTableBox::FindPreviousBox( const SwTable& rTbl,
}
-BOOL lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* )
+sal_Bool lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* )
{
// in der HeadLine sind die Absaetze mit BedingtenVorlage anzupassen
const SwStartNode* pSttNd = rpBox->GetSttNd();
@@ -2512,29 +2512,29 @@ BOOL lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* )
pSttNd->CheckSectionCondColl();
else
((SwTableBox*)rpBox)->GetTabLines().ForEach( &lcl_LineSetHeadCondColl, 0 );
- return TRUE;
+ return sal_True;
}
-BOOL lcl_LineSetHeadCondColl( const SwTableLine*& rpLine, void* )
+sal_Bool lcl_LineSetHeadCondColl( const SwTableLine*& rpLine, void* )
{
((SwTableLine*)rpLine)->GetTabBoxes().ForEach( &lcl_BoxSetHeadCondColl, 0 );
- return TRUE;
+ return sal_True;
}
/* */
-SwTwips lcl_GetDistance( SwTableBox* pBox, BOOL bLeft )
+SwTwips lcl_GetDistance( SwTableBox* pBox, sal_Bool bLeft )
{
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
SwTwips nRet = 0;
SwTableLine* pLine;
while( pBox && 0 != ( pLine = pBox->GetUpper() ) )
{
- USHORT nStt = 0, nPos = pLine->GetTabBoxes().C40_GETPOS( SwTableBox, pBox );
+ sal_uInt16 nStt = 0, nPos = pLine->GetTabBoxes().C40_GETPOS( SwTableBox, pBox );
if( bFirst && !bLeft )
++nPos;
- bFirst = FALSE;
+ bFirst = sal_False;
while( nStt < nPos )
nRet += pLine->GetTabBoxes()[ nStt++ ]->GetFrmFmt()
@@ -2544,30 +2544,30 @@ SwTwips lcl_GetDistance( SwTableBox* pBox, BOOL bLeft )
return nRet;
}
-BOOL lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pBox = rBoxes[ n ];
SwFrmFmt* pFmt = pBox->GetFrmFmt();
const SwFmtFrmSize& rSz = pFmt->GetFrmSize();
SwTwips nWidth = rSz.GetWidth();
- BOOL bGreaterBox = FALSE;
+ sal_Bool bGreaterBox = sal_False;
if( bCheck )
{
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
if( !::lcl_SetSelBoxWidth( pBox->GetTabLines()[ i ], rParam,
- nDist, TRUE ))
- return FALSE;
+ nDist, sal_True ))
+ return sal_False;
// dann noch mal alle "ContentBoxen" sammeln
if( ( 0 != ( bGreaterBox = TBLFIX_CHGABS != rParam.nMode && ( nDist + ( rParam.bLeft ? 0 : nWidth ) ) >= rParam.nSide)) ||
( !rParam.bBigger && ( Abs( nDist + (( rParam.nMode && rParam.bLeft ) ? 0 : nWidth ) - rParam.nSide ) < COLFUZZY ) ) )
{
- rParam.bAnyBoxFnd = TRUE;
+ rParam.bAnyBoxFnd = sal_True;
SwTwips nLowerDiff;
if( bGreaterBox && TBLFIX_CHGPROP == rParam.nMode )
{
@@ -2582,16 +2582,16 @@ BOOL lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nLowerDiff = rParam.nDiff;
if( nWidth < nLowerDiff || nWidth - nLowerDiff < MINLAY )
- return FALSE;
+ return sal_False;
}
}
else
{
SwTwips nLowerDiff = 0, nOldLower = rParam.nLowerDiff;
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
{
rParam.nLowerDiff = 0;
- lcl_SetSelBoxWidth( pBox->GetTabLines()[ i ], rParam, nDist, FALSE );
+ lcl_SetSelBoxWidth( pBox->GetTabLines()[ i ], rParam, nDist, sal_False );
if( nLowerDiff < rParam.nLowerDiff )
nLowerDiff = rParam.nLowerDiff;
@@ -2644,14 +2644,14 @@ BOOL lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDist >= rParam.nSide )
break;
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pBox = rBoxes[ n ];
SwFrmFmt* pFmt = pBox->GetFrmFmt();
@@ -2660,17 +2660,17 @@ BOOL lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( bCheck )
{
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
if( !::lcl_SetOtherBoxWidth( pBox->GetTabLines()[ i ],
- rParam, nDist, TRUE ))
- return FALSE;
+ rParam, nDist, sal_True ))
+ return sal_False;
if( rParam.bBigger && ( TBLFIX_CHGABS == rParam.nMode
? Abs( nDist - rParam.nSide ) < COLFUZZY
: ( rParam.bLeft ? nDist < rParam.nSide - COLFUZZY
: nDist >= rParam.nSide - COLFUZZY )) )
{
- rParam.bAnyBoxFnd = TRUE;
+ rParam.bAnyBoxFnd = sal_True;
SwTwips nDiff;
if( TBLFIX_CHGPROP == rParam.nMode ) // Tabelle fix, proport.
{
@@ -2683,17 +2683,17 @@ BOOL lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDiff = rParam.nDiff;
if( nWidth < nDiff || nWidth - nDiff < MINLAY )
- return FALSE;
+ return sal_False;
}
}
else
{
SwTwips nLowerDiff = 0, nOldLower = rParam.nLowerDiff;
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
{
rParam.nLowerDiff = 0;
lcl_SetOtherBoxWidth( pBox->GetTabLines()[ i ], rParam,
- nDist, FALSE );
+ nDist, sal_False );
if( nLowerDiff < rParam.nLowerDiff )
nLowerDiff = rParam.nLowerDiff;
@@ -2738,16 +2738,16 @@ BOOL lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDist > rParam.nSide )
break;
}
- return TRUE;
+ return sal_True;
}
/* */
-BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- USHORT n, nCmp;
+ sal_uInt16 n, nCmp;
for( n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pBox = rBoxes[ n ];
@@ -2757,10 +2757,10 @@ BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( bCheck )
{
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
if( !::lcl_InsSelBox( pBox->GetTabLines()[ i ], rParam,
- nDist, TRUE ))
- return FALSE;
+ nDist, sal_True ))
+ return sal_False;
// dann noch mal alle "ContentBoxen" sammeln
if( Abs( nDist + ( rParam.bLeft ? 0 : nWidth )
@@ -2773,14 +2773,14 @@ BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( nCmp )
{
- rParam.bAnyBoxFnd = TRUE;
+ rParam.bAnyBoxFnd = sal_True;
if( pFmt->GetProtect().IsCntntProtected() )
- return FALSE;
+ return sal_False;
if( rParam.bSplittBox &&
nWidth - rParam.nDiff <= COLFUZZY +
( 567 / 2 /* min. 0,5 cm Platz lassen*/) )
- return FALSE;
+ return sal_False;
if( pBox->GetSttNd() )
rParam.aBoxes.Insert( pBox );
@@ -2791,10 +2791,10 @@ BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
else
{
SwTwips nLowerDiff = 0, nOldLower = rParam.nLowerDiff;
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
{
rParam.nLowerDiff = 0;
- lcl_InsSelBox( pBox->GetTabLines()[ i ], rParam, nDist, FALSE );
+ lcl_InsSelBox( pBox->GetTabLines()[ i ], rParam, nDist, sal_False );
if( nLowerDiff < rParam.nLowerDiff )
nLowerDiff = rParam.nLowerDiff;
@@ -2874,18 +2874,18 @@ BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDist += nWidth;
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
// Sonderfall: kein Platz in den anderen Boxen aber in der Zelle
if( rParam.bSplittBox )
- return TRUE;
+ return sal_True;
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- USHORT n;
+ sal_uInt16 n;
// Tabelle fix, proport.
if( !rParam.nRemainWidth && TBLFIX_CHGPROP == rParam.nMode )
@@ -2899,8 +2899,8 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( (nTmpDist + nWidth / 2 ) > rParam.nSide )
{
rParam.nRemainWidth = rParam.bLeft
- ? USHORT(nTmpDist)
- : USHORT(rParam.nTblWidth - nTmpDist);
+ ? sal_uInt16(nTmpDist)
+ : sal_uInt16(rParam.nTblWidth - nTmpDist);
break;
}
nTmpDist += nWidth;
@@ -2916,10 +2916,10 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( bCheck )
{
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
if( !::lcl_InsOtherBox( pBox->GetTabLines()[ i ],
- rParam, nDist, TRUE ))
- return FALSE;
+ rParam, nDist, sal_True ))
+ return sal_False;
if(
rParam.bLeft ? ((nDist + nWidth / 2 ) <= rParam.nSide &&
@@ -2931,7 +2931,7 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
: (nDist + nWidth / 2 ) > rParam.nSide
)
{
- rParam.bAnyBoxFnd = TRUE;
+ rParam.bAnyBoxFnd = sal_True;
SwTwips nDiff;
if( TBLFIX_CHGPROP == rParam.nMode ) // Tabelle fix, proport.
{
@@ -2941,7 +2941,7 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDiff /= rParam.nRemainWidth;
if( nWidth < nDiff || nWidth - nDiff < MINLAY )
- return FALSE;
+ return sal_False;
}
else
{
@@ -2954,7 +2954,7 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( rParam.bLeft && pBox->GetUpper()->GetUpper() )
{
const SwTableBox* pTmpBox = pBox;
- USHORT nBoxPos = n;
+ sal_uInt16 nBoxPos = n;
while( !nBoxPos && pTmpBox->GetUpper()->GetUpper() )
{
pTmpBox = pTmpBox->GetUpper()->GetUpper();
@@ -2967,7 +2967,7 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
}
if( nTmpWidth < nDiff || nTmpWidth - nDiff < MINLAY )
- return FALSE;
+ return sal_False;
break;
}
}
@@ -2975,11 +2975,11 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
else
{
SwTwips nLowerDiff = 0, nOldLower = rParam.nLowerDiff;
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
{
rParam.nLowerDiff = 0;
lcl_InsOtherBox( pBox->GetTabLines()[ i ], rParam,
- nDist, FALSE );
+ nDist, sal_False );
if( nLowerDiff < rParam.nLowerDiff )
nLowerDiff = rParam.nLowerDiff;
@@ -3024,7 +3024,7 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDist += nWidth;
}
- return TRUE;
+ return sal_True;
}
@@ -3037,8 +3037,8 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
// POS_OVERLAP_BEFORE, // Box ueberlappt den Start
// POS_OVERLAP_BEHIND // Box ueberlappt das Ende
-SwComparePosition _CheckBoxInRange( USHORT nStt, USHORT nEnd,
- USHORT nBoxStt, USHORT nBoxEnd )
+SwComparePosition _CheckBoxInRange( sal_uInt16 nStt, sal_uInt16 nEnd,
+ sal_uInt16 nBoxStt, sal_uInt16 nBoxEnd )
{
// COLFUZZY noch beachten!!
SwComparePosition nRet;
@@ -3079,7 +3079,7 @@ void lcl_DelSelBox_CorrLowers( SwTableLine& rLine, CR_SetBoxWidth& rParam,
// 1. Schritt die eigene Breite feststellen
SwTableBoxes& rBoxes = rLine.GetTabBoxes();
SwTwips nBoxWidth = 0;
- USHORT n;
+ sal_uInt16 n;
for( n = rBoxes.Count(); n; )
nBoxWidth += rBoxes[ --n ]->GetFrmFmt()->GetFrmSize().GetWidth();
@@ -3101,7 +3101,7 @@ void lcl_DelSelBox_CorrLowers( SwTableLine& rLine, CR_SetBoxWidth& rParam,
if( !pBox->GetSttNd() )
{
// hat selbst auch Lower, also auch die anpassen
- for( USHORT i = pBox->GetTabLines().Count(); i; )
+ for( sal_uInt16 i = pBox->GetTabLines().Count(); i; )
::lcl_DelSelBox_CorrLowers( *pBox->GetTabLines()[ --i ],
rParam, nDiff );
}
@@ -3111,16 +3111,16 @@ void lcl_DelSelBox_CorrLowers( SwTableLine& rLine, CR_SetBoxWidth& rParam,
void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam,
const SwFmtFrmSize& rOldSz,
- USHORT& rDelWidth, SwTwips nDist )
+ sal_uInt16& rDelWidth, SwTwips nDist )
{
long nDiff = 0;
- BOOL bSetSize = FALSE;
+ sal_Bool bSetSize = sal_False;
switch( rParam.nMode )
{
case TBLFIX_CHGABS: // Tabelle feste Breite, den Nachbar andern
nDiff = rDelWidth + rParam.nLowerDiff;
- bSetSize = TRUE;
+ bSetSize = sal_True;
break;
case TBLFIX_CHGPROP: // Tabelle feste Breite, alle Nachbarn aendern
@@ -3128,9 +3128,9 @@ void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam,
{
// dann kurz berechnen:
if( rParam.bLeft )
- rParam.nRemainWidth = USHORT(nDist);
+ rParam.nRemainWidth = sal_uInt16(nDist);
else
- rParam.nRemainWidth = USHORT(rParam.nTblWidth - nDist);
+ rParam.nRemainWidth = sal_uInt16(rParam.nTblWidth - nDist);
}
// relativ berechnen
@@ -3138,7 +3138,7 @@ void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam,
nDiff *= rDelWidth + rParam.nLowerDiff;
nDiff /= rParam.nRemainWidth;
- bSetSize = TRUE;
+ bSetSize = sal_True;
break;
case TBLVAR_CHGABS: // Tabelle variable, alle Nachbarn aendern
@@ -3147,10 +3147,10 @@ void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam,
{
nDiff = rDelWidth + rParam.nLowerDiff - rParam.nBoxWidth;
if( 0 < nDiff )
- rDelWidth = rDelWidth - USHORT(nDiff);
+ rDelWidth = rDelWidth - sal_uInt16(nDiff);
else
- rDelWidth = rDelWidth + USHORT(-nDiff);
- bSetSize = TRUE;
+ rDelWidth = rDelWidth + sal_uInt16(-nDiff);
+ bSetSize = sal_True;
}
break;
}
@@ -3162,23 +3162,23 @@ void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam,
rParam.aShareFmts.SetSize( rBox, aNew );
// dann leider nochmals die Lower anpassen
- for( USHORT i = rBox.GetTabLines().Count(); i; )
+ for( sal_uInt16 i = rBox.GetTabLines().Count(); i; )
::lcl_DelSelBox_CorrLowers( *rBox.GetTabLines()[ --i ], rParam,
aNew.GetWidth() );
}
}
-BOOL lcl_DeleteBox_Rekursiv( CR_SetBoxWidth& rParam, SwTableBox& rBox,
- BOOL bCheck )
+sal_Bool lcl_DeleteBox_Rekursiv( CR_SetBoxWidth& rParam, SwTableBox& rBox,
+ sal_Bool bCheck )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( rBox.GetSttNd() )
{
if( bCheck )
{
- rParam.bAnyBoxFnd = TRUE;
+ rParam.bAnyBoxFnd = sal_True;
if( rBox.GetFrmFmt()->GetProtect().IsCntntProtected() )
- bRet = FALSE;
+ bRet = sal_False;
else
{
SwTableBox* pBox = &rBox;
@@ -3187,42 +3187,42 @@ BOOL lcl_DeleteBox_Rekursiv( CR_SetBoxWidth& rParam, SwTableBox& rBox,
}
else
::_DeleteBox( rParam.pTblNd->GetTable(), &rBox,
- rParam.pUndo, FALSE, TRUE, &rParam.aShareFmts );
+ rParam.pUndo, sal_False, sal_True, &rParam.aShareFmts );
}
else
{
// die muessen leider alle sequentiel ueber die
// Contentboxen geloescht werden
- for( USHORT i = rBox.GetTabLines().Count(); i; )
+ for( sal_uInt16 i = rBox.GetTabLines().Count(); i; )
{
SwTableLine& rLine = *rBox.GetTabLines()[ --i ];
- for( USHORT n = rLine.GetTabBoxes().Count(); n; )
+ for( sal_uInt16 n = rLine.GetTabBoxes().Count(); n; )
if( !::lcl_DeleteBox_Rekursiv( rParam,
*rLine.GetTabBoxes()[ --n ], bCheck ))
- return FALSE;
+ return sal_False;
}
}
return bRet;
}
-BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
SwTableBoxes& rBoxes = pTabLine->GetTabBoxes();
- USHORT n, nCntEnd, nBoxChkStt, nBoxChkEnd, nDelWidth = 0;
+ sal_uInt16 n, nCntEnd, nBoxChkStt, nBoxChkEnd, nDelWidth = 0;
if( rParam.bLeft )
{
n = rBoxes.Count();
nCntEnd = 0;
- nBoxChkStt = (USHORT)rParam.nSide;
- nBoxChkEnd = static_cast<USHORT>(rParam.nSide + rParam.nBoxWidth);
+ nBoxChkStt = (sal_uInt16)rParam.nSide;
+ nBoxChkEnd = static_cast<sal_uInt16>(rParam.nSide + rParam.nBoxWidth);
}
else
{
n = 0;
nCntEnd = rBoxes.Count();
- nBoxChkStt = static_cast<USHORT>(rParam.nSide - rParam.nBoxWidth);
- nBoxChkEnd = (USHORT)rParam.nSide;
+ nBoxChkStt = static_cast<sal_uInt16>(rParam.nSide - rParam.nBoxWidth);
+ nBoxChkEnd = (sal_uInt16)rParam.nSide;
}
@@ -3237,13 +3237,13 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
SwFrmFmt* pFmt = pBox->GetFrmFmt();
const SwFmtFrmSize& rSz = pFmt->GetFrmSize();
long nWidth = rSz.GetWidth();
- BOOL bDelBox = FALSE, bChgLowers = FALSE;
+ sal_Bool bDelBox = sal_False, bChgLowers = sal_False;
// die Boxenbreite testen und entpsrechend reagieren
SwComparePosition ePosType = ::_CheckBoxInRange(
nBoxChkStt, nBoxChkEnd,
- USHORT(rParam.bLeft ? nDist - nWidth : nDist),
- USHORT(rParam.bLeft ? nDist : nDist + nWidth));
+ sal_uInt16(rParam.bLeft ? nDist - nWidth : nDist),
+ sal_uInt16(rParam.bLeft ? nDist : nDist + nWidth));
switch( ePosType )
{
@@ -3251,7 +3251,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
if( bCheck )
{
if( rParam.bLeft )
- return TRUE;
+ return sal_True;
}
else if( rParam.bLeft )
{
@@ -3265,7 +3265,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
if( bCheck )
{
if( !rParam.bLeft )
- return TRUE;
+ return sal_True;
}
else if( !rParam.bLeft )
{
@@ -3278,7 +3278,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
case POS_OUTSIDE: // Box ueberlappt Start/End vollstaendig
case POS_INSIDE: // Box liegt vollstaendig in Start/End
case POS_EQUAL: // Box und Start/End sind gleich
- bDelBox = TRUE;
+ bDelBox = sal_True;
break;
case POS_OVERLAP_BEFORE: // Box ueberlappt den Start
@@ -3286,14 +3286,14 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
: nWidth / 2 )))
{
if( !pBox->GetSttNd() )
- bChgLowers = TRUE;
+ bChgLowers = sal_True;
else
- bDelBox = TRUE;
+ bDelBox = sal_True;
}
else if( !bCheck && rParam.bLeft )
{
if( !pBox->GetSttNd() )
- bChgLowers = TRUE;
+ bChgLowers = sal_True;
else
{
::lcl_ChgBoxSize( *pBox, rParam, rSz, nDelWidth, nDist );
@@ -3308,16 +3308,16 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
// generell loeschen oder wie beim OVERLAP_Before nur die, die
// bis zur Haelfte in die "Loesch-"Box reicht ???
if( !pBox->GetSttNd() )
- bChgLowers = TRUE;
+ bChgLowers = sal_True;
else
- bDelBox = TRUE;
+ bDelBox = sal_True;
break;
default: break;
}
if( bDelBox )
{
- nDelWidth = nDelWidth + USHORT(nWidth);
+ nDelWidth = nDelWidth + sal_uInt16(nWidth);
if( bCheck )
{
// die letzte/erste Box kann nur bei Tbl-Var geloescht werden,
@@ -3328,10 +3328,10 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
? nWidth - nDist
: (nDist + nWidth - rParam.nTblWidth )))
|| !::lcl_DeleteBox_Rekursiv( rParam, *pBox, bCheck ) )
- return FALSE;
+ return sal_False;
if( pFmt->GetProtect().IsCntntProtected() )
- return FALSE;
+ return sal_False;
}
else
{
@@ -3343,11 +3343,11 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
}
else if( bChgLowers )
{
- BOOL bFirst = TRUE, bCorrLowers = FALSE;
+ sal_Bool bFirst = sal_True, bCorrLowers = sal_False;
long nLowerDiff = 0;
long nOldLower = rParam.nLowerDiff;
- USHORT nOldRemain = rParam.nRemainWidth;
- USHORT i;
+ sal_uInt16 nOldRemain = rParam.nRemainWidth;
+ sal_uInt16 i;
for( i = pBox->GetTabLines().Count(); i; )
{
@@ -3355,7 +3355,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
rParam.nRemainWidth = nOldRemain;
SwTableLine* pLine = pBox->GetTabLines()[ --i ];
if( !::lcl_DelSelBox( pLine, rParam, nDist, bCheck ))
- return FALSE;
+ return sal_False;
// gibt es die Box und die darin enthaltenen Lines noch??
if( n < rBoxes.Count() &&
@@ -3365,14 +3365,14 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
{
if( !bFirst && !bCorrLowers &&
COLFUZZY < Abs( nLowerDiff - rParam.nLowerDiff ) )
- bCorrLowers = TRUE;
+ bCorrLowers = sal_True;
// die groesste "loesch" Breite entscheidet, aber nur wenn
// nicht die gesamte Line geloescht wurde
if( nLowerDiff < rParam.nLowerDiff )
nLowerDiff = rParam.nLowerDiff;
- bFirst = FALSE;
+ bFirst = sal_False;
}
}
rParam.nLowerDiff = nOldLower;
@@ -3384,7 +3384,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
nLowerDiff = nWidth;
// DelBreite anpassen!!
- nDelWidth = nDelWidth + USHORT(nLowerDiff);
+ nDelWidth = nDelWidth + sal_uInt16(nLowerDiff);
if( !bCheck )
{
@@ -3400,7 +3400,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
{
// sonst muss die Groesse der Box angepasst werden
SwFmtFrmSize aNew( rSz );
- BOOL bCorrRel = FALSE;
+ sal_Bool bCorrRel = sal_False;
if( TBLVAR_CHGABS != rParam.nMode )
{
@@ -3412,7 +3412,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
else if( rParam.bLeft ) // TBLFIX_CHGABS
{
nLowerDiff = nLowerDiff - nDelWidth;
- bCorrLowers = TRUE;
+ bCorrLowers = sal_True;
n = nCntEnd;
}
break;
@@ -3423,7 +3423,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
else if( !rParam.bLeft ) // TBLFIX_CHGABS
{
nLowerDiff = nLowerDiff - nDelWidth;
- bCorrLowers = TRUE;
+ bCorrLowers = sal_True;
n = nCntEnd;
}
break;
@@ -3440,9 +3440,9 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
{
// dann kurz berechnen:
if( rParam.bLeft )
- rParam.nRemainWidth = USHORT(nDist - nLowerDiff);
+ rParam.nRemainWidth = sal_uInt16(nDist - nLowerDiff);
else
- rParam.nRemainWidth = USHORT(rParam.nTblWidth - nDist
+ rParam.nRemainWidth = sal_uInt16(rParam.nTblWidth - nDist
- nLowerDiff );
}
@@ -3473,13 +3473,13 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
nDist += nWidth;
}
rParam.nLowerDiff = nDelWidth;
- return TRUE;
+ return sal_True;
}
// Dummy Funktion fuer die Methode SetColWidth
-BOOL lcl_DelOtherBox( SwTableLine* , CR_SetBoxWidth& , SwTwips , BOOL )
+sal_Bool lcl_DelOtherBox( SwTableLine* , CR_SetBoxWidth& , SwTwips , sal_Bool )
{
- return TRUE;
+ return sal_True;
}
/* */
@@ -3487,7 +3487,7 @@ BOOL lcl_DelOtherBox( SwTableLine* , CR_SetBoxWidth& , SwTwips , BOOL )
void lcl_AjustLines( SwTableLine* pLine, CR_SetBoxWidth& rParam )
{
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pBox = rBoxes[ n ];
@@ -3498,7 +3498,7 @@ void lcl_AjustLines( SwTableLine* pLine, CR_SetBoxWidth& rParam )
aSz.SetWidth( nWidth );
rParam.aShareFmts.SetSize( *pBox, aSz );
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
::lcl_AjustLines( pBox->GetTabLines()[ i ], rParam );
}
}
@@ -3511,13 +3511,13 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize )
SwTwips nAktSize = 0;
// checke doch mal ob die Tabellen korrekte Breiten haben
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
const SwTableBox* pBox = rBoxes[ n ];
const SwTwips nBoxW = pBox->GetFrmFmt()->GetFrmSize().GetWidth();
nAktSize += nBoxW;
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
_CheckBoxWidth( *pBox->GetTabLines()[ i ], nBoxW );
}
@@ -3542,11 +3542,11 @@ _FndBox* lcl_SaveInsDelData( CR_SetBoxWidth& rParam, SwUndo** ppUndo,
{
// erstmal die Boxen besorgen !
if( rParam.bBigger )
- for( USHORT n = 0; n < rTbl.GetTabLines().Count(); ++n )
- ::lcl_DelSelBox( rTbl.GetTabLines()[ n ], rParam, nDistStt, TRUE );
+ for( sal_uInt16 n = 0; n < rTbl.GetTabLines().Count(); ++n )
+ ::lcl_DelSelBox( rTbl.GetTabLines()[ n ], rParam, nDistStt, sal_True );
else
- for( USHORT n = 0; n < rTbl.GetTabLines().Count(); ++n )
- ::lcl_InsSelBox( rTbl.GetTabLines()[ n ], rParam, nDistStt, TRUE );
+ for( sal_uInt16 n = 0; n < rTbl.GetTabLines().Count(); ++n )
+ ::lcl_InsSelBox( rTbl.GetTabLines()[ n ], rParam, nDistStt, sal_True );
}
// loeschen der gesamten Tabelle verhindern
@@ -3578,7 +3578,7 @@ _FndBox* lcl_SaveInsDelData( CR_SetBoxWidth& rParam, SwUndo** ppUndo,
return pFndBox;
}
-BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
+sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo )
{
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
@@ -3588,13 +3588,13 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
_FndBox* pFndBox = 0; // fuers Einfuegen/Loeschen
SwTableSortBoxes aTmpLst( 0, 5 ); // fuers Undo
- BOOL bBigger,
- bRet = FALSE,
+ sal_Bool bBigger,
+ bRet = sal_False,
bLeft = nsTblChgWidthHeightType::WH_COL_LEFT == ( eType & 0xff ) ||
nsTblChgWidthHeightType::WH_CELL_LEFT == ( eType & 0xff ),
bInsDel = 0 != (eType & nsTblChgWidthHeightType::WH_FLAG_INSDEL );
- USHORT n;
- ULONG nBoxIdx = rAktBox.GetSttIdx();
+ sal_uInt16 n;
+ sal_uLong nBoxIdx = rAktBox.GetSttIdx();
// bestimme die akt. Kante der Box
// wird nur fuer die Breitenmanipulation benoetigt!
@@ -3612,7 +3612,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
{
fnSelBox = lcl_DelSelBox;
fnOtherBox = lcl_DelOtherBox;
- aParam.nBoxWidth = (USHORT)rAktBox.GetFrmFmt()->GetFrmSize().GetWidth();
+ aParam.nBoxWidth = (sal_uInt16)rAktBox.GetFrmFmt()->GetFrmSize().GetWidth();
if( bLeft )
nDistStt = rSz.GetWidth();
}
@@ -3639,7 +3639,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
bBigger = !bBigger;
// erstmal testen, ob ueberhaupt Platz ist
- BOOL bChgLRSpace = TRUE;
+ sal_Bool bChgLRSpace = sal_True;
if( bBigger )
{
if( GetFrmFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
@@ -3658,7 +3658,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
( bLeft ? rLR.GetRight() >= nAbsDiff
: rLR.GetLeft() >= nAbsDiff ))
{
- bRet = TRUE; bLeft = !bLeft;
+ bRet = sal_True; bLeft = !bLeft;
}
if( !bRet )
@@ -3676,13 +3676,13 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
}
else
{
- bRet = TRUE;
+ bRet = sal_True;
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, TRUE ))
+ if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -3699,7 +3699,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
{
// dies gesamte Tabelle soll geloescht werden!!
GetFrmFmt()->GetDoc()->DeleteRowCol( aParam.aBoxes );
- return FALSE;
+ return sal_False;
}
if( ppUndo )
@@ -3708,7 +3708,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
: UNDO_TABLE_INSCOL );
}
else if( ppUndo )
- *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, TRUE );
+ *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, sal_True );
long nFrmWidth = LONG_MAX;
LockModify();
@@ -3723,7 +3723,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
// dann mal herunterbrechen auf USHRT_MAX / 2
CR_SetBoxWidth aTmpPara( 0, aSz.GetWidth() / 2,
0, aSz.GetWidth(), aSz.GetWidth(), aParam.pTblNd );
- for( USHORT nLn = 0; nLn < aLines.Count(); ++nLn )
+ for( sal_uInt16 nLn = 0; nLn < aLines.Count(); ++nLn )
::lcl_AjustLines( aLines[ nLn ], aTmpPara );
aSz.SetWidth( aSz.GetWidth() / 2 );
aParam.nDiff = nRelDiff /= 2;
@@ -3732,14 +3732,14 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
}
if( bLeft )
- aLR.SetLeft( USHORT( aLR.GetLeft() - nAbsDiff ) );
+ aLR.SetLeft( sal_uInt16( aLR.GetLeft() - nAbsDiff ) );
else
- aLR.SetRight( USHORT( aLR.GetRight() - nAbsDiff ) );
+ aLR.SetRight( sal_uInt16( aLR.GetRight() - nAbsDiff ) );
}
else if( bLeft )
- aLR.SetLeft( USHORT( aLR.GetLeft() + nAbsDiff ) );
+ aLR.SetLeft( sal_uInt16( aLR.GetLeft() + nAbsDiff ) );
else
- aLR.SetRight( USHORT( aLR.GetRight() + nAbsDiff ) );
+ aLR.SetRight( sal_uInt16( aLR.GetRight() + nAbsDiff ) );
if( bChgLRSpace )
GetFrmFmt()->SetFmtAttr( aLR );
@@ -3778,11 +3778,11 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
aSz.SetWidth( aSz.GetWidth() - nRelDiff );
if( rSz.GetWidthPercent() )
- aSz.SetWidthPercent( static_cast<BYTE>(( aSz.GetWidth() * 100 ) /
+ aSz.SetWidthPercent( static_cast<sal_uInt8>(( aSz.GetWidth() * 100 ) /
( aSz.GetWidth() + aLR.GetRight() + aLR.GetLeft())));
GetFrmFmt()->SetFmtAttr( aSz );
- aParam.nTblWidth = USHORT( aSz.GetWidth() );
+ aParam.nTblWidth = sal_uInt16( aSz.GetWidth() );
UnlockModify();
@@ -3790,7 +3790,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
{
--n;
aParam.LoopClear();
- (*fnSelBox)( aLines[ n ], aParam, nDistStt, FALSE );
+ (*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_False );
}
// sollte die Tabelle noch auf relativen Werten
@@ -3807,7 +3807,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
else if( bInsDel ||
( bLeft ? nDist : Abs( rSz.GetWidth() - nDist ) > COLFUZZY ) )
{
- bRet = TRUE;
+ bRet = sal_True;
if( bLeft && TBLFIX_CHGABS == eTblChgMode && !bInsDel )
aParam.bBigger = !bBigger;
@@ -3819,9 +3819,9 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, TRUE ))
+ if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -3834,14 +3834,14 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnOtherBox)( aLines[ n ], aParam, 0, TRUE ))
+ if( !(*fnOtherBox)( aLines[ n ], aParam, 0, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
if( bRet && !aParam.bAnyBoxFnd )
- bRet = FALSE;
+ bRet = sal_False;
}
if( !bRet && rAktBox.GetFrmFmt()->GetFrmSize().GetWidth()
@@ -3849,16 +3849,16 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
( 567 / 2 /* min. 0,5 cm Platz lassen*/) )
{
// dann den Platz von der akt. Zelle nehmen
- aParam.bSplittBox = TRUE;
+ aParam.bSplittBox = sal_True;
// aber das muss auch mal getestet werden!
- bRet = TRUE;
+ bRet = sal_True;
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, TRUE ))
+ if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -3870,9 +3870,9 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnOtherBox)( aLines[ n ], aParam, 0, TRUE ))
+ if( !(*fnOtherBox)( aLines[ n ], aParam, 0, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -3882,9 +3882,9 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, TRUE ))
+ if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -3905,7 +3905,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
: UNDO_TABLE_INSCOL );
}
else if( ppUndo )
- *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, TRUE );
+ *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, sal_True );
if( bInsDel
? ( TBLFIX_CHGABS == eTblChgMode ? bLeft : bLeft )
@@ -3916,8 +3916,8 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
--n;
aParam.LoopClear();
aParam1.LoopClear();
- (*fnSelBox)( aLines[ n ], aParam, nDistStt, FALSE );
- (*fnOtherBox)( aLines[ n ], aParam1, nDistStt, FALSE );
+ (*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_False );
+ (*fnOtherBox)( aLines[ n ], aParam1, nDistStt, sal_False );
}
}
else
@@ -3926,8 +3926,8 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
--n;
aParam.LoopClear();
aParam1.LoopClear();
- (*fnOtherBox)( aLines[ n ], aParam1, nDistStt, FALSE );
- (*fnSelBox)( aLines[ n ], aParam, nDistStt, FALSE );
+ (*fnOtherBox)( aLines[ n ], aParam1, nDistStt, sal_False );
+ (*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_False );
}
}
}
@@ -3958,7 +3958,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
SwTableLine* pLine = rAktBox.GetUpper();
while( pLine->GetUpper() )
{
- USHORT nPos = pLine->GetTabBoxes().C40_GETPOS( SwTableBox, pBox );
+ sal_uInt16 nPos = pLine->GetTabBoxes().C40_GETPOS( SwTableBox, pBox );
if( bLeft ? nPos : nPos + 1 != pLine->GetTabBoxes().Count() )
break;
@@ -3969,7 +3969,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
if( pLine->GetUpper() )
{
// dann muss die Distanz wieder korriegiert werden!
- aParam.nSide -= ::lcl_GetDistance( pLine->GetUpper(), TRUE );
+ aParam.nSide -= ::lcl_GetDistance( pLine->GetUpper(), sal_True );
if( bLeft )
aParam.nMaxSize = aParam.nSide;
@@ -3985,9 +3985,9 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
: ( rSz.GetWidth() - nDist ) > COLFUZZY ) &&
!aParam.bBigger )
{
- bRet = (*fnOtherBox)( pLine, aParam, 0, TRUE );
+ bRet = (*fnOtherBox)( pLine, aParam, 0, sal_True );
if( bRet && !aParam.bAnyBoxFnd )
- bRet = FALSE;
+ bRet = sal_False;
}
if( !bRet && !aParam.bBigger && rAktBox.GetFrmFmt()->
@@ -3995,14 +3995,14 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
( 567 / 2 /* min. 0,5 cm Platz lassen*/) )
{
// dann den Platz von der akt. Zelle nehmen
- aParam.bSplittBox = TRUE;
- bRet = TRUE;
+ aParam.bSplittBox = sal_True;
+ bRet = sal_True;
}
}
else
{
FN_lcl_SetBoxWidth fnTmp = aParam.bBigger ? fnOtherBox : fnSelBox;
- bRet = (*fnTmp)( pLine, aParam, nDistStt, TRUE );
+ bRet = (*fnTmp)( pLine, aParam, nDistStt, sal_True );
}
// wenn ja, dann setzen
@@ -4019,19 +4019,19 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
: UNDO_TABLE_INSCOL );
}
else if( ppUndo )
- *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, TRUE );
+ *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, sal_True );
if( bInsDel
? ( TBLFIX_CHGABS == eTblChgMode ? (bBigger && bLeft) : bLeft )
: ( TBLFIX_CHGABS != eTblChgMode && bLeft ) )
{
- (*fnSelBox)( pLine, aParam, nDistStt, FALSE );
- (*fnOtherBox)( pLine, aParam1, nDistStt, FALSE );
+ (*fnSelBox)( pLine, aParam, nDistStt, sal_False );
+ (*fnOtherBox)( pLine, aParam1, nDistStt, sal_False );
}
else
{
- (*fnOtherBox)( pLine, aParam1, nDistStt, FALSE );
- (*fnSelBox)( pLine, aParam, nDistStt, FALSE );
+ (*fnOtherBox)( pLine, aParam1, nDistStt, sal_False );
+ (*fnSelBox)( pLine, aParam, nDistStt, sal_False );
}
}
}
@@ -4056,7 +4056,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
if( ppUndo && *ppUndo )
{
- aParam.pUndo->SetColWidthParam( nBoxIdx, static_cast<USHORT>(eTblChgMode), eType,
+ aParam.pUndo->SetColWidthParam( nBoxIdx, static_cast<sal_uInt16>(eTblChgMode), eType,
nAbsDiff, nRelDiff );
if( !aParam.bBigger )
aParam.pUndo->SaveNewBoxes( *aParam.pTblNd, aTmpLst );
@@ -4109,7 +4109,7 @@ _FndBox* lcl_SaveInsDelData( CR_SetLineHeight& rParam, SwUndo** ppUndo,
}
void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight,
- BOOL bMinSize )
+ sal_Bool bMinSize )
{
SwLayoutFrm* pLineFrm = GetRowFrm( rLine );
ASSERT( pLineFrm, "wo ist der Frm von der SwTableLine?" );
@@ -4137,18 +4137,18 @@ void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight,
// erst alle inneren anpassen
SwTableBoxes& rBoxes = rLine.GetTabBoxes();
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox& rBox = *rBoxes[ n ];
- for( USHORT i = 0; i < rBox.GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBox.GetTabLines().Count(); ++i )
SetLineHeight( *rBox.GetTabLines()[ i ], nMyOldH, nMyNewH, bMinSize );
}
}
-BOOL lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( !bCheck )
{
// Zeilenhoehe einstellen
@@ -4162,15 +4162,15 @@ BOOL lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
ASSERT( pLineFrm, "wo ist der Frm von der SwTableLine?" );
SwTwips nRstHeight = CalcRowRstHeight( pLineFrm );
if( (nRstHeight + ROWFUZZY) < nDist )
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
-BOOL lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( bCheck )
{
if( rParam.bBigger )
@@ -4217,17 +4217,17 @@ BOOL lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
return bRet;
}
-BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( !bCheck )
{
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
SwDoc* pDoc = pLine->GetFrmFmt()->GetDoc();
if( !rParam.bBigger )
{
- USHORT n;
+ sal_uInt16 n;
for( n = rBoxes.Count(); n; )
::lcl_SaveUpperLowerBorder( rParam.pTblNd->GetTable(),
@@ -4235,8 +4235,8 @@ BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
rParam.aShareFmts );
for( n = rBoxes.Count(); n; )
::_DeleteBox( rParam.pTblNd->GetTable(),
- rBoxes[ --n ], rParam.pUndo, FALSE,
- FALSE, &rParam.aShareFmts );
+ rBoxes[ --n ], rParam.pUndo, sal_False,
+ sal_False, &rParam.aShareFmts );
}
else
{
@@ -4248,7 +4248,7 @@ BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
pLines = &pLine->GetUpper()->GetTabLines();
else
pLines = &rParam.pTblNd->GetTable().GetTabLines();
- USHORT nPos = pLines->C40_GETPOS( SwTableLine, pLine );
+ sal_uInt16 nPos = pLines->C40_GETPOS( SwTableLine, pLine );
if( !rParam.bTop )
++nPos;
pLines->C40_INSERT( SwTableLine, pNewLine, nPos );
@@ -4258,7 +4258,7 @@ BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
// und noch mal die Anzahl Boxen erzeugen
SwTableBoxes& rNewBoxes = pNewLine->GetTabBoxes();
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTwips nWidth = 0;
SwTableBox* pOld = rBoxes[ n ];
@@ -4295,26 +4295,26 @@ BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
{
// Boxen einsammeln!
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- for( USHORT n = rBoxes.Count(); n; )
+ for( sal_uInt16 n = rBoxes.Count(); n; )
{
SwTableBox* pBox = rBoxes[ --n ];
if( pBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
- return FALSE;
+ return sal_False;
if( pBox->GetSttNd() )
rParam.aBoxes.Insert( pBox );
else
{
- for( USHORT i = pBox->GetTabLines().Count(); i; )
+ for( sal_uInt16 i = pBox->GetTabLines().Count(); i; )
lcl_InsDelSelLine( pBox->GetTabLines()[ --i ],
- rParam, 0, TRUE );
+ rParam, 0, sal_True );
}
}
}
return bRet;
}
-BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
+sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff,SwUndo** ppUndo )
{
SwTableLine* pLine = rAktBox.GetUpper();
@@ -4325,13 +4325,13 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
_FndBox* pFndBox = 0; // fuers Einfuegen/Loeschen
SwTableSortBoxes aTmpLst( 0, 5 ); // fuers Undo
- BOOL bBigger,
- bRet = FALSE,
+ sal_Bool bBigger,
+ bRet = sal_False,
bTop = nsTblChgWidthHeightType::WH_ROW_TOP == ( eType & 0xff ) ||
nsTblChgWidthHeightType::WH_CELL_TOP == ( eType & 0xff ),
bInsDel = 0 != (eType & nsTblChgWidthHeightType::WH_FLAG_INSDEL );
- USHORT n, nBaseLinePos = GetTabLines().C40_GETPOS( SwTableLine, pBaseLine );
- ULONG nBoxIdx = rAktBox.GetSttIdx();
+ sal_uInt16 n, nBaseLinePos = GetTabLines().C40_GETPOS( SwTableLine, pBaseLine );
+ sal_uLong nBoxIdx = rAktBox.GetSttIdx();
CR_SetLineHeight aParam( eType,
(SwTableNode*)rAktBox.GetSttNd()->FindTableNode() );
@@ -4372,7 +4372,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
// erstmal testen, ob ueberhaupt Platz ist
if( bBigger )
{
- bRet = TRUE;
+ bRet = sal_True;
// was ist mit Top, was ist mit Tabelle im Rahmen oder in Kopf-/Fusszeile
// mit fester Hoehe ??
if( !bRet )
@@ -4391,7 +4391,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
}
else
bRet = (*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam,
- nAbsDiff, TRUE );
+ nAbsDiff, sal_True );
if( bRet )
{
@@ -4399,7 +4399,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
{
if( !aParam.aBoxes.Count() )
::lcl_InsDelSelLine( (*pLines)[ nBaseLinePos ],
- aParam, 0, TRUE );
+ aParam, 0, sal_True );
pFndBox = ::lcl_SaveInsDelData( aParam, ppUndo, aTmpLst );
@@ -4409,7 +4409,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
aParam.aBoxes.Count() == aSortCntBoxes.Count() )
{
GetFrmFmt()->GetDoc()->DeleteRowCol( aParam.aBoxes );
- return FALSE;
+ return sal_False;
}
@@ -4419,16 +4419,16 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
: UNDO_ROW_DELETE );
}
else if( ppUndo )
- *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, TRUE );
+ *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, sal_True );
(*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam,
- nAbsDiff, FALSE );
+ nAbsDiff, sal_False );
}
}
else
{
- bRet = TRUE;
- USHORT nStt, nEnd;
+ bRet = sal_True;
+ sal_uInt16 nStt, nEnd;
if( bTop )
nStt = 0, nEnd = nBaseLinePos;
else
@@ -4445,7 +4445,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
aParam.nMaxHeight += pLineFrm->Frm().Height();
}
if( bBigger && aParam.nMaxSpace < nAbsDiff )
- bRet = FALSE;
+ bRet = sal_False;
}
else
{
@@ -4457,7 +4457,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
nEnd = nStt + 1;
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
if( bRet )
@@ -4467,16 +4467,16 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
for( n = nStt; n < nEnd; ++n )
{
if( !(*fnOtherLine)( (*pLines)[ n ], aParam,
- nAbsDiff, TRUE ))
+ nAbsDiff, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
}
else
bRet = (*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam,
- nAbsDiff, TRUE );
+ nAbsDiff, sal_True );
}
if( bRet )
@@ -4486,7 +4486,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
{
if( !aParam.aBoxes.Count() )
::lcl_InsDelSelLine( (*pLines)[ nBaseLinePos ],
- aParam, 0, TRUE );
+ aParam, 0, sal_True );
pFndBox = ::lcl_SaveInsDelData( aParam, ppUndo, aTmpLst );
if( ppUndo )
*ppUndo = aParam.CreateUndo(
@@ -4494,7 +4494,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
: UNDO_ROW_DELETE );
}
else if( ppUndo )
- *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, TRUE );
+ *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, sal_True );
CR_SetLineHeight aParam1( aParam );
if( TBLFIX_CHGPROP == eTblChgMode && !bBigger &&
@@ -4509,18 +4509,18 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
if( bTop )
{
(*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam,
- nAbsDiff, FALSE );
+ nAbsDiff, sal_False );
for( n = nStt; n < nEnd; ++n )
(*fnOtherLine)( (*pLines)[ n ], aParam1,
- nAbsDiff, FALSE );
+ nAbsDiff, sal_False );
}
else
{
for( n = nStt; n < nEnd; ++n )
(*fnOtherLine)( (*pLines)[ n ], aParam1,
- nAbsDiff, FALSE );
+ nAbsDiff, sal_False );
(*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam,
- nAbsDiff, FALSE );
+ nAbsDiff, sal_False );
}
}
else
@@ -4556,7 +4556,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
if( ppUndo && *ppUndo )
{
- aParam.pUndo->SetColWidthParam( nBoxIdx, static_cast<USHORT>(eTblChgMode), eType,
+ aParam.pUndo->SetColWidthParam( nBoxIdx, static_cast<sal_uInt16>(eTblChgMode), eType,
nAbsDiff, nRelDiff );
if( bBigger )
aParam.pUndo->SaveNewBoxes( *aParam.pTblNd, aTmpLst );
@@ -4573,7 +4573,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
SwFrmFmt* SwShareBoxFmt::GetFormat( long nWidth ) const
{
SwFrmFmt *pRet = 0, *pTmp;
- for( USHORT n = aNewFmts.Count(); n; )
+ for( sal_uInt16 n = aNewFmts.Count(); n; )
if( ( pTmp = (SwFrmFmt*)aNewFmts[ --n ])->GetFrmSize().GetWidth()
== nWidth )
{
@@ -4586,13 +4586,13 @@ SwFrmFmt* SwShareBoxFmt::GetFormat( long nWidth ) const
SwFrmFmt* SwShareBoxFmt::GetFormat( const SfxPoolItem& rItem ) const
{
const SfxPoolItem* pItem;
- USHORT nWhich = rItem.Which();
+ sal_uInt16 nWhich = rItem.Which();
SwFrmFmt *pRet = 0, *pTmp;
- const SfxPoolItem& rFrmSz = pOldFmt->GetFmtAttr( RES_FRM_SIZE, FALSE );
- for( USHORT n = aNewFmts.Count(); n; )
+ const SfxPoolItem& rFrmSz = pOldFmt->GetFmtAttr( RES_FRM_SIZE, sal_False );
+ for( sal_uInt16 n = aNewFmts.Count(); n; )
if( SFX_ITEM_SET == ( pTmp = (SwFrmFmt*)aNewFmts[ --n ])->
- GetItemState( nWhich, FALSE, &pItem ) && *pItem == rItem &&
- pTmp->GetFmtAttr( RES_FRM_SIZE, FALSE ) == rFrmSz )
+ GetItemState( nWhich, sal_False, &pItem ) && *pItem == rItem &&
+ pTmp->GetFmtAttr( RES_FRM_SIZE, sal_False ) == rFrmSz )
{
pRet = pTmp;
break;
@@ -4606,14 +4606,14 @@ void SwShareBoxFmt::AddFormat( const SwFrmFmt& rNew )
aNewFmts.Insert( pFmt, aNewFmts.Count() );
}
-BOOL SwShareBoxFmt::RemoveFormat( const SwFrmFmt& rFmt )
+sal_Bool SwShareBoxFmt::RemoveFormat( const SwFrmFmt& rFmt )
{
- // returnt TRUE, wenn geloescht werden kann
+ // returnt sal_True, wenn geloescht werden kann
if( pOldFmt == &rFmt )
- return TRUE;
+ return sal_True;
void* p = (void*)&rFmt;
- USHORT nFnd = aNewFmts.GetPos( p );
+ sal_uInt16 nFnd = aNewFmts.GetPos( p );
if( USHRT_MAX != nFnd )
aNewFmts.Remove( nFnd );
return 0 == aNewFmts.Count();
@@ -4625,7 +4625,7 @@ SwShareBoxFmts::~SwShareBoxFmts()
SwFrmFmt* SwShareBoxFmts::GetFormat( const SwFrmFmt& rFmt, long nWidth ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
return Seek_Entry( rFmt, &nPos )
? aShareArr[ nPos ]->GetFormat( nWidth )
: 0;
@@ -4633,7 +4633,7 @@ SwFrmFmt* SwShareBoxFmts::GetFormat( const SwFrmFmt& rFmt, long nWidth ) const
SwFrmFmt* SwShareBoxFmts::GetFormat( const SwFrmFmt& rFmt,
const SfxPoolItem& rItem ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
return Seek_Entry( rFmt, &nPos )
? aShareArr[ nPos ]->GetFormat( rItem )
: 0;
@@ -4646,7 +4646,7 @@ void SwShareBoxFmts::AddFormat( const SwFrmFmt& rOld, const SwFrmFmt& rNew )
//leider werden auch die CellFrms gefunden
// if( !rOld.IsLastDepend() )
{
- USHORT nPos;
+ sal_uInt16 nPos;
SwShareBoxFmt* pEntry;
if( !Seek_Entry( rOld, &nPos ))
{
@@ -4727,27 +4727,27 @@ void SwShareBoxFmts::SetAttr( SwTableLine& rLine, const SfxPoolItem& rItem )
void SwShareBoxFmts::RemoveFormat( const SwFrmFmt& rFmt )
{
- for( USHORT i = aShareArr.Count(); i; )
+ for( sal_uInt16 i = aShareArr.Count(); i; )
if( aShareArr[ --i ]->RemoveFormat( rFmt ))
aShareArr.DeleteAndDestroy( i );
}
-BOOL SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, USHORT* pPos ) const
+sal_Bool SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, sal_uInt16* pPos ) const
{
- ULONG nIdx = (ULONG)&rFmt;
- USHORT nO = aShareArr.Count(), nM, nU = 0;
+ sal_uLong nIdx = (sal_uLong)&rFmt;
+ sal_uInt16 nO = aShareArr.Count(), nM, nU = 0;
if( nO > 0 )
{
nO--;
while( nU <= nO )
{
nM = nU + ( nO - nU ) / 2;
- ULONG nFmt = (ULONG)&aShareArr[ nM ]->GetOldFormat();
+ sal_uLong nFmt = (sal_uLong)&aShareArr[ nM ]->GetOldFormat();
if( nFmt == nIdx )
{
if( pPos )
*pPos = nM;
- return TRUE;
+ return sal_True;
}
else if( nFmt < nIdx )
nU = nM + 1;
@@ -4755,7 +4755,7 @@ BOOL SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, USHORT* pPos ) const
{
if( pPos )
*pPos = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
@@ -4763,7 +4763,7 @@ BOOL SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, USHORT* pPos ) const
}
if( pPos )
*pPos = nU;
- return FALSE;
+ return sal_False;
}