summaryrefslogtreecommitdiff
path: root/sw/source/ui/table/tablemgr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/table/tablemgr.cxx')
-rw-r--r--sw/source/ui/table/tablemgr.cxx48
1 files changed, 24 insertions, 24 deletions
diff --git a/sw/source/ui/table/tablemgr.cxx b/sw/source/ui/table/tablemgr.cxx
index c0f325862d82..7d4272880643 100644
--- a/sw/source/ui/table/tablemgr.cxx
+++ b/sw/source/ui/table/tablemgr.cxx
@@ -79,7 +79,7 @@ void SwTableFUNC::ColWidthDlg( Window *pParent )
--------------------------------------------------------------------*/
-SwTwips SwTableFUNC::GetColWidth(USHORT nNum) const
+SwTwips SwTableFUNC::GetColWidth(sal_uInt16 nNum) const
{
SwTwips nWidth = 0;
@@ -95,10 +95,10 @@ SwTwips SwTableFUNC::GetColWidth(USHORT nNum) const
else
{
SwTwips nRValid = nNum < GetColCount() ?
- aCols[(USHORT)GetRightSeparator((int)nNum)]:
+ aCols[(sal_uInt16)GetRightSeparator((int)nNum)]:
aCols.GetRight();
SwTwips nLValid = nNum ?
- aCols[(USHORT)GetRightSeparator((int)nNum - 1)]:
+ aCols[(sal_uInt16)GetRightSeparator((int)nNum - 1)]:
aCols.GetLeft();
nWidth = nRValid - nLValid;
}
@@ -111,7 +111,7 @@ SwTwips SwTableFUNC::GetColWidth(USHORT nNum) const
-SwTwips SwTableFUNC::GetMaxColWidth( USHORT nNum ) const
+SwTwips SwTableFUNC::GetMaxColWidth( sal_uInt16 nNum ) const
{
ASSERT(nNum <= aCols.Count(), "Index out of Area");
@@ -133,35 +133,35 @@ SwTwips SwTableFUNC::GetMaxColWidth( USHORT nNum ) const
-void SwTableFUNC::SetColWidth(USHORT nNum, SwTwips nNewWidth )
+void SwTableFUNC::SetColWidth(sal_uInt16 nNum, SwTwips nNewWidth )
{
// aktuelle Breite setzen
// alle folgenden Verschieben
- BOOL bCurrentOnly = FALSE;
+ sal_Bool bCurrentOnly = sal_False;
SwTwips nWidth = 0;
if ( aCols.Count() > 0 )
{
if(aCols.Count() != GetColCount())
- bCurrentOnly = TRUE;
+ bCurrentOnly = sal_True;
nWidth = GetColWidth(nNum);
int nDiff = (int)(nNewWidth - nWidth);
if( !nNum )
- aCols[ static_cast< USHORT >(GetRightSeparator(0)) ] += nDiff;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(0)) ] += nDiff;
else if( nNum < GetColCount() )
{
if(nDiff < GetColWidth(nNum + 1) - MINLAY)
- aCols[ static_cast< USHORT >(GetRightSeparator(nNum)) ] += nDiff;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum)) ] += nDiff;
else
{
int nDiffLeft = nDiff - (int)GetColWidth(nNum + 1) + (int)MINLAY;
- aCols[ static_cast< USHORT >(GetRightSeparator(nNum)) ] += (nDiff - nDiffLeft);
- aCols[ static_cast< USHORT >(GetRightSeparator(nNum - 1)) ] -= nDiffLeft;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum)) ] += (nDiff - nDiffLeft);
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum - 1)) ] -= nDiffLeft;
}
}
else
- aCols[ static_cast< USHORT >(GetRightSeparator(nNum-1)) ] -= nDiff;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum-1)) ] -= nDiff;
}
else
aCols.SetRight( Min( nNewWidth, aCols.GetRightMax()) );
@@ -183,7 +183,7 @@ void SwTableFUNC::InitTabCols()
-SwTableFUNC::SwTableFUNC(SwWrtShell *pShell, BOOL bCopyFmt)
+SwTableFUNC::SwTableFUNC(SwWrtShell *pShell, sal_Bool bCopyFmt)
: pFmt(pShell->GetTableFmt()),
pSh(pShell),
bCopy(bCopyFmt)
@@ -230,11 +230,11 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
aName = pSh->GetTableFmt()->GetName();
// insert node before table
pSh->MoveTable( fnTableCurr, fnTableStart );
- pSh->Up( FALSE, 1, FALSE );
+ pSh->Up( sal_False, 1, sal_False );
if ( pSh->IsCrsrInTbl() )
{
if ( aName != pSh->GetTableFmt()->GetName() )
- pSh->Down( FALSE, 1, FALSE ); // two adjacent tables
+ pSh->Down( sal_False, 1, sal_False ); // two adjacent tables
}
pSh->SplitNode();
}
@@ -275,7 +275,7 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
if ( !pClient )
{
pClient = new SwOleClient( &pSh->GetView(), &pSh->GetView().GetEditWin(), aEmbObjRef );
- pSh->SetCheckForOLEInCaption( TRUE );
+ pSh->SetCheckForOLEInCaption( sal_True );
}
pSh->CalcAndSetScale( aEmbObjRef );
//#50270# Error brauchen wir nicht handeln, das erledigt das
@@ -341,11 +341,11 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
return xChartModel;
}
-USHORT SwTableFUNC::GetCurColNum() const
+sal_uInt16 SwTableFUNC::GetCurColNum() const
{
- USHORT nPos = pSh->GetCurTabColNum();
- USHORT nCount = 0;
- for(USHORT i = 0; i < nPos; i++ )
+ sal_uInt16 nPos = pSh->GetCurTabColNum();
+ sal_uInt16 nCount = 0;
+ for(sal_uInt16 i = 0; i < nPos; i++ )
if(aCols.IsHidden(i))
nCount ++;
return nPos - nCount;
@@ -354,10 +354,10 @@ USHORT SwTableFUNC::GetCurColNum() const
-USHORT SwTableFUNC::GetColCount() const
+sal_uInt16 SwTableFUNC::GetColCount() const
{
- USHORT nCount = 0;
- for(USHORT i = 0; i < aCols.Count(); i++ )
+ sal_uInt16 nCount = 0;
+ for(sal_uInt16 i = 0; i < aCols.Count(); i++ )
if(aCols.IsHidden(i))
nCount ++;
return aCols.Count() - nCount;
@@ -371,7 +371,7 @@ int SwTableFUNC::GetRightSeparator(int nNum) const
int i = 0;
while( nNum >= 0 )
{
- if( !aCols.IsHidden( static_cast< USHORT >(i)) )
+ if( !aCols.IsHidden( static_cast< sal_uInt16 >(i)) )
nNum--;
i++;
}