diff options
Diffstat (limited to 'sw/source/ui/table')
-rw-r--r-- | sw/source/ui/table/chartins.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/table/colwd.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/table/convert.cxx | 24 | ||||
-rw-r--r-- | sw/source/ui/table/instable.cxx | 16 | ||||
-rw-r--r-- | sw/source/ui/table/mergetbl.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/table/swtablerep.cxx | 38 | ||||
-rw-r--r-- | sw/source/ui/table/tabledlg.cxx | 364 | ||||
-rw-r--r-- | sw/source/ui/table/tablemgr.cxx | 48 | ||||
-rw-r--r-- | sw/source/ui/table/tablepg.hxx | 40 | ||||
-rw-r--r-- | sw/source/ui/table/tautofmt.cxx | 118 |
10 files changed, 334 insertions, 334 deletions
diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx index 5649fca2b8..bab04f6773 100644 --- a/sw/source/ui/table/chartins.cxx +++ b/sw/source/ui/table/chartins.cxx @@ -94,7 +94,7 @@ Point SwGetChartDialogPos( const Window *pParentWin, const Size& rDialogSize, co Rectangle aDesktop = pParentWin->GetDesktopRectPixel(); Size aSpace = pParentWin->LogicToPixel( Size( 8, 12 ), MAP_APPFONT ); - BOOL bLayoutRTL = ::GetActiveView()->GetWrtShell().IsTableRightToLeft(); + sal_Bool bLayoutRTL = ::GetActiveView()->GetWrtShell().IsTableRightToLeft(); bool bCenterHor = false; if ( aDesktop.Bottom() - aObjAbs.Bottom() >= rDialogSize.Height() + aSpace.Height() ) @@ -192,7 +192,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings ) } SwFlyFrmFmt *pFlyFrmFmt = 0; - xChartModel.set( SwTableFUNC( &rWrtShell, FALSE ).InsertChart( xDataProvider, (sal_True == xDataProvider.is()), aRangeString, &pFlyFrmFmt )); + xChartModel.set( SwTableFUNC( &rWrtShell, sal_False ).InsertChart( xDataProvider, (sal_True == xDataProvider.is()), aRangeString, &pFlyFrmFmt )); //open wizard //@todo get context from writer if that has one @@ -277,7 +277,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings ) void __EXPORT AutoEdit::KeyInput( const KeyEvent& rEvt ) { - USHORT nCode = rEvt.GetKeyCode().GetCode(); + sal_uInt16 nCode = rEvt.GetKeyCode().GetCode(); if( nCode != KEY_SPACE ) Edit::KeyInput( rEvt ); } diff --git a/sw/source/ui/table/colwd.cxx b/sw/source/ui/table/colwd.cxx index a5b4d9cf9c..dc7ca95821 100644 --- a/sw/source/ui/table/colwd.cxx +++ b/sw/source/ui/table/colwd.cxx @@ -63,7 +63,7 @@ IMPL_LINK_INLINE_START( SwTableWidthDlg, LoseFocusHdl, Edit *, EMPTYARG ) { - USHORT nId = (USHORT)aColEdit.GetValue()-1; + sal_uInt16 nId = (sal_uInt16)aColEdit.GetValue()-1; const SwTwips lWidth = rFnc.GetColWidth(nId); aWidthEdit.SetValue(aWidthEdit.Normalize(lWidth), FUNIT_TWIP); aWidthEdit.SetMax(aWidthEdit.Normalize(rFnc.GetMaxColWidth(nId)), FUNIT_TWIP); @@ -89,10 +89,10 @@ SwTableWidthDlg::SwTableWidthDlg(Window *pParent, SwTableFUNC &rTableFnc ) : { FreeResource(); - BOOL bIsWeb = rTableFnc.GetShell() - ? static_cast< BOOL >(0 != PTR_CAST( SwWebDocShell, + sal_Bool bIsWeb = rTableFnc.GetShell() + ? static_cast< sal_Bool >(0 != PTR_CAST( SwWebDocShell, rTableFnc.GetShell()->GetView().GetDocShell()) ) - : FALSE; + : sal_False; FieldUnit eFieldUnit = SW_MOD()->GetUsrPref( bIsWeb )->GetMetric(); ::SetFieldUnit(aWidthEdit, eFieldUnit ); @@ -114,8 +114,8 @@ void SwTableWidthDlg::Apply() { rFnc.InitTabCols(); rFnc.SetColWidth( - static_cast< USHORT >(aColEdit.GetValue() - 1), - static_cast< USHORT >(aWidthEdit.Denormalize(aWidthEdit.GetValue(FUNIT_TWIP)))); + static_cast< sal_uInt16 >(aColEdit.GetValue() - 1), + static_cast< sal_uInt16 >(aWidthEdit.Denormalize(aWidthEdit.GetValue(FUNIT_TWIP)))); } diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index 9418e7fbaf..9678ff6f51 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -96,13 +96,13 @@ void SwConvertTableDlg::GetValues( sal_Unicode& rDelim, } - USHORT nInsMode = 0; + sal_uInt16 nInsMode = 0; if (aBorderCB.IsChecked()) nInsMode |= tabopts::DEFAULT_BORDER; if (aHeaderCB.IsChecked()) nInsMode |= tabopts::HEADLINE; if (aRepeatHeaderCB.IsEnabled() && aRepeatHeaderCB.IsChecked()) - rInsTblOpts.mnRowsToRepeat = USHORT( aRepeatHeaderNF.GetValue() ); + rInsTblOpts.mnRowsToRepeat = sal_uInt16( aRepeatHeaderNF.GetValue() ); else rInsTblOpts.mnRowsToRepeat = 0; if (!aDontSplitCB.IsChecked()) @@ -184,12 +184,12 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable ) else { //Einfuege-Optionen verstecken - aHeaderCB .Show(FALSE); - aRepeatHeaderCB .Show(FALSE); - aDontSplitCB .Show(FALSE); - aBorderCB .Show(FALSE); - aOptionsFL .Show(FALSE); - aRepeatHeaderCombo.Show(FALSE); + aHeaderCB .Show(sal_False); + aRepeatHeaderCB .Show(sal_False); + aDontSplitCB .Show(sal_False); + aBorderCB .Show(sal_False); + aOptionsFL .Show(sal_False); + aRepeatHeaderCombo.Show(sal_False); //Groesse anpassen Size aSize(GetSizePixel()); @@ -207,10 +207,10 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable ) const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); - BOOL bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); + sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode); - USHORT nInsTblFlags = aInsOpts.mnInsMode; + sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode; aHeaderCB.Check( 0 != (nInsTblFlags & tabopts::HEADLINE) ); aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0); @@ -233,7 +233,7 @@ IMPL_LINK( SwConvertTableDlg, AutoFmtHdl, PushButton*, pButton ) SwAbstractDialogFactory* pFact = swui::GetFactory(); DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); - AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pShell, DLG_AUTOFMT_TABLE, FALSE, pTAutoFmt); + AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pShell, DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if( RET_OK == pDlg->Execute()) pDlg->FillAutoFmtOfIndex( pTAutoFmt ); @@ -249,7 +249,7 @@ IMPL_LINK( SwConvertTableDlg, BtnHdl, Button*, pButton ) { if( aKeepColumn.IsEnabled() ) aKeepColumn.SaveValue(); - aKeepColumn.Check( TRUE ); + aKeepColumn.Check( sal_True ); } aKeepColumn.Enable( aTabBtn.IsChecked() ); aOtherEd.Enable( aOtherBtn.IsChecked() ); diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx index a81074c8df..d5243cef98 100644 --- a/sw/source/ui/table/instable.cxx +++ b/sw/source/ui/table/instable.cxx @@ -57,21 +57,21 @@ namespace swui #define ROW_COL_PROD 16384 -void SwInsTableDlg::GetValues( String& rName, USHORT& rRow, USHORT& rCol, +void SwInsTableDlg::GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol, SwInsertTableOptions& rInsTblOpts, String& rAutoName, SwTableAutoFmt *& prTAFmt ) { - USHORT nInsMode = 0; + sal_uInt16 nInsMode = 0; rName = aNameEdit.GetText(); - rRow = (USHORT)aRowEdit.GetValue(); - rCol = (USHORT)aColEdit.GetValue(); + rRow = (sal_uInt16)aRowEdit.GetValue(); + rCol = (sal_uInt16)aColEdit.GetValue(); if (aBorderCB.IsChecked()) nInsMode |= tabopts::DEFAULT_BORDER; if (aHeaderCB.IsChecked()) nInsMode |= tabopts::HEADLINE; if (aRepeatHeaderCB.IsEnabled() && aRepeatHeaderCB.IsChecked()) - rInsTblOpts.mnRowsToRepeat = USHORT( aRepeatHeaderNF.GetValue() ); + rInsTblOpts.mnRowsToRepeat = sal_uInt16( aRepeatHeaderNF.GetValue() ); else rInsTblOpts.mnRowsToRepeat = 0; if (!aDontSplitCB.IsChecked()) @@ -130,11 +130,11 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView ) aColEdit.SetMax(ROW_COL_PROD/aRowEdit.GetValue()); aAutoFmtBtn.SetClickHdl(LINK(this, SwInsTableDlg, AutoFmtHdl)); - BOOL bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); + sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON); const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode); - USHORT nInsTblFlags = aInsOpts.mnInsMode; + sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode; aHeaderCB.Check( 0 != (nInsTblFlags & tabopts::HEADLINE) ); aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0); @@ -222,7 +222,7 @@ IMPL_LINK( SwInsTableDlg, AutoFmtHdl, PushButton*, pButton ) SwAbstractDialogFactory* pFact = swui::GetFactory(); DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!"); - AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton,pShell, DLG_AUTOFMT_TABLE, FALSE, pTAutoFmt ); + AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton,pShell, DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); if( RET_OK == pDlg->Execute()) pDlg->FillAutoFmtOfIndex( pTAutoFmt ); diff --git a/sw/source/ui/table/mergetbl.cxx b/sw/source/ui/table/mergetbl.cxx index 2e96a58846..777f38db0f 100644 --- a/sw/source/ui/table/mergetbl.cxx +++ b/sw/source/ui/table/mergetbl.cxx @@ -43,7 +43,7 @@ #endif -SwMergeTblDlg::SwMergeTblDlg( Window *pParent, BOOL& rWithPrev ) +SwMergeTblDlg::SwMergeTblDlg( Window *pParent, sal_Bool& rWithPrev ) : SvxStandardDialog(pParent, SW_RES(DLG_MERGE_TABLE)), aOKPB( this, SW_RES(PB_OK )), aCancelPB( this, SW_RES(PB_CANCEL )), diff --git a/sw/source/ui/table/swtablerep.cxx b/sw/source/ui/table/swtablerep.cxx index ae561b2bc5..018628680b 100644 --- a/sw/source/ui/table/swtablerep.cxx +++ b/sw/source/ui/table/swtablerep.cxx @@ -81,9 +81,9 @@ #ifdef DEBUG_TBLDLG -void DbgTColumn(TColumn* pTColumn, USHORT nCount) +void DbgTColumn(TColumn* pTColumn, sal_uInt16 nCount) { - for(USHORT i = 0; i < nCount; i++) + for(sal_uInt16 i = 0; i < nCount; i++) { String sMsg(i); sMsg += pTColumn[i].bVisible ? " v " : " h "; @@ -96,7 +96,7 @@ void DbgTColumn(TColumn* pTColumn, USHORT nCount) /*-----------------20.08.96 09.43------------------- --------------------------------------------------*/ -SwTableRep::SwTableRep( const SwTabCols& rTabCol, BOOL bCplx ) +SwTableRep::SwTableRep( const SwTabCols& rTabCol, sal_Bool bCplx ) : nTblWidth(0), nSpace(0), @@ -105,15 +105,15 @@ SwTableRep::SwTableRep( const SwTabCols& rTabCol, BOOL bCplx ) nAlign(0), nWidthPercent(0), bComplex(bCplx), - bLineSelected(FALSE), - bWidthChanged(FALSE), - bColsChanged(FALSE) + bLineSelected(sal_False), + bWidthChanged(sal_False), + bColsChanged(sal_False) { nAllCols = nColCount = rTabCol.Count(); pTColumns = new TColumn[ nColCount + 1 ]; SwTwips nStart = 0, nEnd; - for( USHORT i = 0; i < nAllCols; ++i ) + for( sal_uInt16 i = 0; i < nAllCols; ++i ) { nEnd = rTabCol[ i ] - rTabCol.GetLeft(); pTColumns[ i ].nWidth = nEnd - nStart; @@ -123,7 +123,7 @@ SwTableRep::SwTableRep( const SwTabCols& rTabCol, BOOL bCplx ) nStart = nEnd; } pTColumns[ nAllCols ].nWidth = rTabCol.GetRight() - rTabCol.GetLeft() - nStart; - pTColumns[ nAllCols ].bVisible = TRUE; + pTColumns[ nAllCols ].bVisible = sal_True; nColCount++; nAllCols++; } @@ -137,18 +137,18 @@ SwTableRep::~SwTableRep() /*-----------------20.08.96 13.33------------------- --------------------------------------------------*/ -BOOL SwTableRep::FillTabCols( SwTabCols& rTabCols ) const +sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const { long nOldLeft = rTabCols.GetLeft(), nOldRight = rTabCols.GetRight(); - BOOL bSingleLine = FALSE; - USHORT i; + sal_Bool bSingleLine = sal_False; + sal_uInt16 i; for ( i = 0; i < rTabCols.Count(); ++i ) if(!pTColumns[i].bVisible) { - bSingleLine = TRUE; + bSingleLine = sal_True; break; } @@ -174,18 +174,18 @@ BOOL SwTableRep::FillTabCols( SwTabCols& rTabCols ) const nStart = nEnd; } pOldTColumns[nAllCols - 1].nWidth = rTabCols.GetRight() - rTabCols.GetLeft() - nStart; - pOldTColumns[nAllCols - 1].bVisible = TRUE; + pOldTColumns[nAllCols - 1].bVisible = sal_True; #ifdef DEBUG_TBLDLG #define DbgTColumn(pOldTColumns, nAllCols); #endif - USHORT nOldPos = 0; - USHORT nNewPos = 0; + sal_uInt16 nOldPos = 0; + sal_uInt16 nNewPos = 0; SwTwips nOld = 0; SwTwips nNew = 0; - BOOL bOld = FALSE; - BOOL bFirst = TRUE; + sal_Bool bOld = sal_False; + sal_Bool bFirst = sal_True; i = 0; while ( i < nAllCols -1 ) @@ -204,10 +204,10 @@ BOOL SwTableRep::FillTabCols( SwTabCols& rTabCols ) const if(pOldTColumns[nNewPos - 1].bVisible) break; } - bFirst = FALSE; + bFirst = sal_False; // sie muessen sortiert eingefuegt werden bOld = nOld < nNew; - nPos = USHORT(bOld ? nOld : nNew); + nPos = sal_uInt16(bOld ? nOld : nNew); rTabCols[i] = nPos + nLeft; rTabCols.SetHidden( i, bOld ); i++; diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 8578dc3b99..3d8f81241c 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -96,7 +96,7 @@ void DbgTblRep(SwTableRep* pRep) DBG_ERROR(String(pRep->GetColCount())) DBG_ERROR(String(pRep->GetAllColCount())) SwTwips nSum = 0; - for(USHORT i = 0; i < pRep->GetAllColCount(); i++) + for(sal_uInt16 i = 0; i < pRep->GetAllColCount(); i++) { String sMsg(i); sMsg += pRep->GetColumns()[i].bVisible ? " v " : " h "; @@ -159,7 +159,7 @@ SwFormatTablePage::SwFormatTablePage( Window* pParent, const SfxItemSet& rSet ) pTblData(0), nSaveWidth(0), nMinTableWidth(MINLAY), - bModified(FALSE), + bModified(sal_False), bFull(0), bHtmlMode(sal_False) { @@ -167,7 +167,7 @@ SwFormatTablePage::SwFormatTablePage( Window* pParent, const SfxItemSet& rSet ) SetExchangeSupport(); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem)) + if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem)) bHtmlMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON); sal_Bool bCTL = SW_MOD()->GetCTLOptions().IsCTLFontEnabled(); @@ -224,7 +224,7 @@ void SwFormatTablePage::Init() IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn ) { DBG_ASSERT(pTblData, "Tabellendaten nicht da?"); - BOOL bIsChecked = pBtn->IsChecked(); + sal_Bool bIsChecked = pBtn->IsChecked(); sal_Int64 nLeft = aLeftMF.DenormalizePercent(aLeftMF.GetValue(FUNIT_TWIP )); sal_Int64 nRight = aRightMF.DenormalizePercent(aRightMF.GetValue(FUNIT_TWIP )); aWidthMF.ShowPercent(bIsChecked); @@ -248,11 +248,11 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn ) if(aFreeBtn.IsChecked()) { - BOOL bEnable = !pBtn->IsChecked(); + sal_Bool bEnable = !pBtn->IsChecked(); aRightMF.Enable(bEnable); aRightFT.Enable(bEnable); } - bModified = TRUE; + bModified = sal_True; return 0; } @@ -261,45 +261,45 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn ) ------------------------------------------------------------------------*/ IMPL_LINK( SwFormatTablePage, AutoClickHdl, CheckBox *, pBox ) { - BOOL bRestore = TRUE, - bLeftEnable = FALSE, - bRightEnable= FALSE, - bWidthEnable= FALSE, - bOthers = TRUE; + sal_Bool bRestore = sal_True, + bLeftEnable = sal_False, + bRightEnable= sal_False, + bWidthEnable= sal_False, + bOthers = sal_True; if( (RadioButton *) pBox == &aFullBtn ) { aLeftMF.SetPrcntValue(0); aRightMF.SetPrcntValue(0); nSaveWidth = static_cast< SwTwips >(aWidthMF.DenormalizePercent(aWidthMF.GetValue(FUNIT_TWIP ))); aWidthMF.SetPrcntValue(aWidthMF.NormalizePercent(pTblData->GetSpace() ), FUNIT_TWIP ); - bFull = TRUE; - bRestore = FALSE; + bFull = sal_True; + bRestore = sal_False; } else if( (RadioButton *) pBox == &aLeftBtn ) { - bRightEnable = bWidthEnable = TRUE; + bRightEnable = bWidthEnable = sal_True; aLeftMF.SetPrcntValue(0); } else if( (RadioButton *) pBox == &aFromLeftBtn ) { - bLeftEnable = bWidthEnable = TRUE; + bLeftEnable = bWidthEnable = sal_True; aRightMF.SetPrcntValue(0); } else if( (RadioButton *) pBox == &aRightBtn ) { - bLeftEnable = bWidthEnable = TRUE; + bLeftEnable = bWidthEnable = sal_True; aRightMF.SetPrcntValue(0); } else if( ( RadioButton * ) pBox == &aCenterBtn ) { - bLeftEnable = bWidthEnable = TRUE; + bLeftEnable = bWidthEnable = sal_True; } else if( ( RadioButton * ) pBox == &aFreeBtn ) { RightModifyHdl(&aRightMF); - bLeftEnable = TRUE; - bWidthEnable = TRUE; - bOthers = FALSE; + bLeftEnable = sal_True; + bWidthEnable = sal_True; + bOthers = sal_False; } aLeftMF.Enable(bLeftEnable); aLeftFT.Enable(bLeftEnable); @@ -316,11 +316,11 @@ IMPL_LINK( SwFormatTablePage, AutoClickHdl, CheckBox *, pBox ) { // nachdem auf autom. geschaltet wurde, wurde die Breite gemerkt, // um sie beim Zurueckschalten restaurieren zu koennen - bFull = FALSE; + bFull = sal_False; aWidthMF.SetPrcntValue(aWidthMF.NormalizePercent(nSaveWidth ), FUNIT_TWIP ); } ModifyHdl(&aWidthMF); - bModified = TRUE; + bModified = sal_True; return 0; } @@ -329,13 +329,13 @@ IMPL_LINK( SwFormatTablePage, RightModifyHdl, MetricField *, EMPTYARG ) { if(aFreeBtn.IsChecked()) { - BOOL bEnable = aRightMF.GetValue() == 0; + sal_Bool bEnable = aRightMF.GetValue() == 0; // aWidthMF.Enable(bEnable); aRelWidthCB.Enable(bEnable); // aWidthFT.Enable(bEnable); if ( !bEnable ) { - aRelWidthCB.Check(FALSE); + aRelWidthCB.Check(sal_False); RelWidthClickHdl(&aRelWidthCB); } bEnable = aRelWidthCB.IsChecked(); @@ -430,7 +430,7 @@ void SwFormatTablePage::ModifyHdl( Edit* pEdit ) { if(!aFromLeftBtn.IsChecked()) { - BOOL bCenter = aCenterBtn.IsChecked(); + sal_Bool bCenter = aCenterBtn.IsChecked(); if( bCenter ) nRight = nLeft; if(nRight + nLeft > pTblData->GetSpace() - MINLAY ) @@ -455,7 +455,7 @@ void SwFormatTablePage::ModifyHdl( Edit* pEdit ) aWidthMF.SetPrcntValue( aWidthMF.NormalizePercent( nCurWidth ), FUNIT_TWIP ); aRightMF.SetPrcntValue( aRightMF.NormalizePercent( nRight ), FUNIT_TWIP ); aLeftMF.SetPrcntValue( aLeftMF.NormalizePercent( nLeft ), FUNIT_TWIP ); - bModified = TRUE; + bModified = sal_True; } /*------------------------------------------------------------------------ @@ -468,7 +468,7 @@ SfxTabPage* SwFormatTablePage::Create( Window* pParent, /*------------------------------------------------------------------------ -------------------------------------------------------------------------*/ -BOOL SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet ) +sal_Bool SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet ) { // Testen, ob eins der Control noch den Focus hat if(aWidthMF.HasFocus()) @@ -488,9 +488,9 @@ BOOL SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet ) aTopMF.GetText() != aTopMF.GetSavedValue() ) { SvxULSpaceItem aULSpace(RES_UL_SPACE); - aULSpace.SetUpper( (USHORT) aTopMF.Denormalize( + aULSpace.SetUpper( (sal_uInt16) aTopMF.Denormalize( aTopMF.GetValue( FUNIT_TWIP ))); - aULSpace.SetLower( (USHORT) aBottomMF.Denormalize( + aULSpace.SetLower( (sal_uInt16) aBottomMF.Denormalize( aBottomMF.GetValue( FUNIT_TWIP ))); rCoreSet.Put(aULSpace); } @@ -499,17 +499,17 @@ BOOL SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet ) if(aNameED.GetText() != aNameED.GetSavedValue()) { rCoreSet.Put(SfxStringItem( FN_PARAM_TABLE_NAME, aNameED.GetText())); - bModified = TRUE; + bModified = sal_True; } - USHORT nPos; + sal_uInt16 nPos; if( aTextDirectionLB.IsVisible() && ( nPos = aTextDirectionLB.GetSelectEntryPos() ) != aTextDirectionLB.GetSavedValue() ) { sal_uInt32 nDirection = (sal_uInt32)(sal_uIntPtr)aTextDirectionLB.GetEntryData( nPos ); rCoreSet.Put( SvxFrameDirectionItem( (SvxFrameDirection)nDirection, RES_FRAMEDIR)); - bModified = TRUE; + bModified = sal_True; } return bModified; @@ -529,7 +529,7 @@ void SwFormatTablePage::Reset( const SfxItemSet& ) aTopMF .Hide(); aBottomFT.Hide(); aBottomMF.Hide(); - aFreeBtn.Enable(FALSE); + aFreeBtn.Enable(sal_False); } FieldUnit aMetric = ::GetDfltMetric(bHtmlMode); SetMetric( aWidthMF, aMetric ); @@ -539,20 +539,20 @@ void SwFormatTablePage::Reset( const SfxItemSet& ) SetMetric( aBottomMF, aMetric ); //Name - if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, sal_False, &pItem )) { aNameED.SetText(((const SfxStringItem*)pItem)->GetValue()); aNameED.SaveValue(); } - if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, sal_False, &pItem )) { pTblData = (SwTableRep*)((const SwPtrItem*) pItem)->GetValue(); nMinTableWidth = pTblData->GetColCount() * MINLAY; if(pTblData->GetWidthPercent()) { - aRelWidthCB.Check(TRUE); + aRelWidthCB.Check(sal_True); RelWidthClickHdl(&aRelWidthCB); aWidthMF.SetPrcntValue(pTblData->GetWidthPercent(), FUNIT_CUSTOM); @@ -582,45 +582,45 @@ void SwFormatTablePage::Reset( const SfxItemSet& ) nOldAlign = pTblData->GetAlign(); - BOOL bSetRight = FALSE, bRightEnable = FALSE, - bSetLeft = FALSE, bLeftEnable = FALSE; + sal_Bool bSetRight = sal_False, bRightEnable = sal_False, + bSetLeft = sal_False, bLeftEnable = sal_False; switch( nOldAlign ) { case text::HoriOrientation::NONE: aFreeBtn.Check(); if(aRelWidthCB.IsChecked()) - bSetRight = TRUE; + bSetRight = sal_True; break; case text::HoriOrientation::FULL: { - bSetRight = bSetLeft = TRUE; + bSetRight = bSetLeft = sal_True; aFullBtn.Check(); - aWidthMF.Enable(FALSE); - aRelWidthCB.Enable(FALSE); - aWidthFT.Enable(FALSE); + aWidthMF.Enable(sal_False); + aRelWidthCB.Enable(sal_False); + aWidthFT.Enable(sal_False); } break; case text::HoriOrientation::LEFT: { - bSetLeft = TRUE; + bSetLeft = sal_True; aLeftBtn.Check(); } break; case text::HoriOrientation::LEFT_AND_WIDTH : { - bSetRight = TRUE; + bSetRight = sal_True; aFromLeftBtn.Check(); } break; case text::HoriOrientation::RIGHT: { - bSetRight = TRUE; + bSetRight = sal_True; aRightBtn.Check(); } break; case text::HoriOrientation::CENTER: { - bSetRight = TRUE; + bSetRight = sal_True; aCenterBtn.Check(); } break; @@ -639,7 +639,7 @@ void SwFormatTablePage::Reset( const SfxItemSet& ) } //Raender - if(SFX_ITEM_SET == rSet.GetItemState( RES_UL_SPACE, FALSE,&pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( RES_UL_SPACE, sal_False,&pItem )) { aTopMF.SetValue(aTopMF.Normalize( ((const SvxULSpaceItem*)pItem)->GetUpper()), FUNIT_TWIP); @@ -650,10 +650,10 @@ void SwFormatTablePage::Reset( const SfxItemSet& ) } //text direction - if( SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, TRUE, &pItem ) ) + if( SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, sal_True, &pItem ) ) { sal_uInt32 nVal = ((SvxFrameDirectionItem*)pItem)->GetValue(); - USHORT nPos = aTextDirectionLB.GetEntryPos( (void*) nVal ); + sal_uInt16 nPos = aTextDirectionLB.GetEntryPos( (void*) nVal ); aTextDirectionLB.SelectEntryPos( nPos ); aTextDirectionLB.SaveValue(); } @@ -728,7 +728,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) if (aRelWidthCB.IsChecked() && aRelWidthCB.IsEnabled()) { lWidth = pTblData->GetSpace() - lRight - lLeft; - USHORT nPercentWidth = (USHORT)aWidthMF.GetValue(FUNIT_CUSTOM); + sal_uInt16 nPercentWidth = (sal_uInt16)aWidthMF.GetValue(FUNIT_CUSTOM); if(pTblData->GetWidthPercent() != nPercentWidth) { pTblData->SetWidthPercent(nPercentWidth); @@ -743,7 +743,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) pTblData->SetWidth(lWidth); SwTwips nColSum = 0; - USHORT i; + sal_uInt16 i; for( i = 0; i < pTblData->GetColCount(); i++) { @@ -812,7 +812,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) DbgTblRep(pTblData) #endif } - return TRUE; + return sal_True; } /*------------------------------------------------------------------------ Beschreibung: Seite Spaltenkonfiguration @@ -845,9 +845,9 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent, nMinWidth( MINLAY ), nNoOfCols( 0 ), nNoOfVisibleCols( 0 ), - bModified(FALSE), - bModifyTbl(FALSE), - bPercentMode(FALSE) + bModified(sal_False), + bModifyTbl(sal_False), + bPercentMode(sal_False) { FreeResource(); SetExchangeSupport(); @@ -867,7 +867,7 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent, pTextArr[5] = &aFT6; const SfxPoolItem* pItem; - Init((SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, FALSE,&pItem ) + Init((SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, sal_False,&pItem ) && ((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)); }; @@ -893,7 +893,7 @@ void SwTableColumnPage::Reset( const SfxItemSet& ) const SfxItemSet& rSet = GetItemSet(); const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, sal_False, &pItem )) { pTblData = (SwTableRep*)((const SwPtrItem*) pItem)->GetValue(); nNoOfVisibleCols = pTblData->GetColCount(); @@ -902,7 +902,7 @@ void SwTableColumnPage::Reset( const SfxItemSet& ) pTblData->GetAlign() != text::HoriOrientation::LEFT_AND_WIDTH? pTblData->GetWidth() : pTblData->GetSpace(); - USHORT i; + sal_uInt16 i; for( i = 0; i < nNoOfCols; i++ ) { if( pTblData->GetColumns()[i].nWidth < nMinWidth ) @@ -936,13 +936,13 @@ void SwTableColumnPage::Reset( const SfxItemSet& ) /*------------------------------------------------------------------------ ------------------------------------------------------------------------*/ -void SwTableColumnPage::Init(BOOL bWeb) +void SwTableColumnPage::Init(sal_Bool bWeb) { FieldUnit aMetric = ::GetDfltMetric(bWeb); Link aLkUp = LINK( this, SwTableColumnPage, UpHdl ); Link aLkDown = LINK( this, SwTableColumnPage, DownHdl ); Link aLkLF = LINK( this, SwTableColumnPage, LoseFocusHdl ); - for( USHORT i = 0; i < MET_FIELDS; i++ ) + for( sal_uInt16 i = 0; i < MET_FIELDS; i++ ) { aValueTbl[i] = i; SetMetric(*pFieldArr[i], aMetric); @@ -971,7 +971,7 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox ) { if(aValueTbl[0] > 0) { - for( USHORT i=0; i < MET_FIELDS; i++ ) + for( sal_uInt16 i=0; i < MET_FIELDS; i++ ) aValueTbl[i] -= 1; } } @@ -979,11 +979,11 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox ) { if( aValueTbl[ MET_FIELDS -1 ] < nNoOfVisibleCols -1 ) { - for(USHORT i=0;i < MET_FIELDS;i++) + for(sal_uInt16 i=0;i < MET_FIELDS;i++) aValueTbl[i] += 1; } } - for( USHORT i = 0; (i < nNoOfVisibleCols ) && ( i < MET_FIELDS); i++ ) + for( sal_uInt16 i = 0; (i < nNoOfVisibleCols ) && ( i < MET_FIELDS); i++ ) { String sEntry('~'); sEntry += String::CreateFromInt32( aValueTbl[i] + 1 ); @@ -1000,7 +1000,7 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox ) ------------------------------------------------------------------------*/ IMPL_LINK_INLINE_START( SwTableColumnPage, UpHdl, PercentField *, pEdit ) { - bModified = TRUE; + bModified = sal_True; ModifyHdl( pEdit ); return 0; }; @@ -1010,7 +1010,7 @@ IMPL_LINK_INLINE_END( SwTableColumnPage, UpHdl, PercentField *, pEdit ) ------------------------------------------------------------------------*/ IMPL_LINK_INLINE_START( SwTableColumnPage, DownHdl, PercentField *, pEdit ) { - bModified = TRUE; + bModified = sal_True; ModifyHdl( pEdit ); return 0; }; @@ -1022,7 +1022,7 @@ IMPL_LINK_INLINE_START( SwTableColumnPage, LoseFocusHdl, PercentField *, pEdit ) { if(pEdit->IsModified()) { - bModified = TRUE; + bModified = sal_True; ModifyHdl( pEdit ); } return 0; @@ -1033,7 +1033,7 @@ IMPL_LINK_INLINE_END( SwTableColumnPage, LoseFocusHdl, PercentField *, pEdit ) ------------------------------------------------------------------------*/ IMPL_LINK( SwTableColumnPage, ModeHdl, CheckBox*, pBox ) { - BOOL bCheck = pBox->IsChecked(); + sal_Bool bCheck = pBox->IsChecked(); if(pBox == &aProportionalCB) { if(bCheck) @@ -1045,9 +1045,9 @@ IMPL_LINK( SwTableColumnPage, ModeHdl, CheckBox*, pBox ) /*------------------------------------------------------------------------ ------------------------------------------------------------------------*/ -BOOL SwTableColumnPage::FillItemSet( SfxItemSet& ) +sal_Bool SwTableColumnPage::FillItemSet( SfxItemSet& ) { - for( USHORT i = 0; i < MET_FIELDS; i++ ) + for( sal_uInt16 i = 0; i < MET_FIELDS; i++ ) { if(pFieldArr[i]->HasFocus()) { @@ -1067,8 +1067,8 @@ BOOL SwTableColumnPage::FillItemSet( SfxItemSet& ) ------------------------------------------------------------------------*/ void SwTableColumnPage::ModifyHdl( PercentField* pEdit ) { - USHORT nAktPos; - USHORT i; + sal_uInt16 nAktPos; + sal_uInt16 i; for( i = 0; i < MET_FIELDS; i++) if(pEdit == pFieldArr[i]) @@ -1082,10 +1082,10 @@ void SwTableColumnPage::ModifyHdl( PercentField* pEdit ) /*------------------------------------------------------------------------ ------------------------------------------------------------------------*/ -void SwTableColumnPage::UpdateCols( USHORT nAktPos ) +void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos ) { SwTwips nSum = 0; - USHORT i; + sal_uInt16 i; for( i = 0; i < nNoOfCols; i++ ) { @@ -1093,8 +1093,8 @@ void SwTableColumnPage::UpdateCols( USHORT nAktPos ) } SwTwips nDiff = nSum - nTableWidth; - BOOL bModifyTable = aModifyTableCB.IsChecked(); - BOOL bProp = aProportionalCB.IsChecked(); + sal_Bool bModifyTable = aModifyTableCB.IsChecked(); + sal_Bool bProp = aProportionalCB.IsChecked(); if(!bModifyTable && !bProp ) { @@ -1187,10 +1187,10 @@ void SwTableColumnPage::UpdateCols( USHORT nAktPos ) SwTwips nDiffn = nDiff/(nNoOfVisibleCols - 1); if(nDiff < 0 && (nNoOfVisibleCols - 1) * nDiffn != nDiff) nDiffn-- ; - USHORT nStart = nAktPos++; + sal_uInt16 nStart = nAktPos++; if(nAktPos == nNoOfVisibleCols) nStart = 0; - for(USHORT i = 0; i < nNoOfVisibleCols; i++ ) + for(sal_uInt16 i = 0; i < nNoOfVisibleCols; i++ ) { if((nVisWidth = GetVisibleWidth(i)) + nDiff < MINLAY) { @@ -1223,13 +1223,13 @@ DbgTblRep(pTblData) void SwTableColumnPage::ActivatePage( const SfxItemSet& ) { bPercentMode = pTblData->GetWidthPercent() != 0; - for( USHORT i = 0; (i < MET_FIELDS) && (i < nNoOfVisibleCols); i++ ) + for( sal_uInt16 i = 0; (i < MET_FIELDS) && (i < nNoOfVisibleCols); i++ ) { pFieldArr[i]->SetRefValue(pTblData->GetWidth()); pFieldArr[i]->ShowPercent( bPercentMode ); } - USHORT nTblAlign = pTblData->GetAlign(); + sal_uInt16 nTblAlign = pTblData->GetAlign(); if((text::HoriOrientation::FULL != nTblAlign && nTableWidth != pTblData->GetWidth()) || (text::HoriOrientation::FULL == nTblAlign && nTableWidth != pTblData->GetSpace())) { @@ -1238,20 +1238,20 @@ void SwTableColumnPage::ActivatePage( const SfxItemSet& ) pTblData->GetWidth(); UpdateCols(0); } - bModifyTbl = TRUE; + bModifyTbl = sal_True; if(pTblData->GetWidthPercent() || text::HoriOrientation::FULL == nTblAlign || pTblData->IsLineSelected() ) - bModifyTbl = FALSE; + bModifyTbl = sal_False; if(bPercentMode) { - aModifyTableCB .Check(FALSE); - aProportionalCB .Check(FALSE); + aModifyTableCB .Check(sal_False); + aProportionalCB .Check(sal_False); } else if( !bModifyTbl ) { - aProportionalCB.Check(FALSE); - aModifyTableCB.Check(FALSE); + aProportionalCB.Check(sal_False); + aModifyTableCB.Check(sal_False); } aSpaceFT.Enable(!bPercentMode); aSpaceED.Enable(!bPercentMode); @@ -1331,14 +1331,14 @@ DbgTblRep(pTblData) #endif _pSet->Put(SwPtrItem( FN_TABLE_REP, pTblData )); } - return TRUE; + return sal_True; } /*------------------------------------------------------------------------ ------------------------------------------------------------------------*/ -SwTwips SwTableColumnPage::GetVisibleWidth(USHORT nPos) +SwTwips SwTableColumnPage::GetVisibleWidth(sal_uInt16 nPos) { - USHORT i=0; + sal_uInt16 i=0; while( nPos ) { @@ -1357,9 +1357,9 @@ SwTwips SwTableColumnPage::GetVisibleWidth(USHORT nPos) /*------------------------------------------------------------------------ ------------------------------------------------------------------------*/ -void SwTableColumnPage::SetVisibleWidth(USHORT nPos, SwTwips nNewWidth) +void SwTableColumnPage::SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth) { - USHORT i=0; + sal_uInt16 i=0; while( nPos ) { if(pTblData->GetColumns()[i].bVisible && nPos) @@ -1394,7 +1394,7 @@ SwTableTabDlg::SwTableTabDlg(Window* pParent, SfxItemPool& , /*------------------------------------------------------------------------ ------------------------------------------------------------------------*/ -void SwTableTabDlg::PageCreated(USHORT nId, SfxTabPage& rPage) +void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); if( TP_BACKGROUND == nId ) @@ -1414,7 +1414,7 @@ void SwTableTabDlg::PageCreated(USHORT nId, SfxTabPage& rPage) else if(TP_TABLE_TEXTFLOW == nId) { ((SwTextFlowPage&)rPage).SetShell(pShell); - const USHORT eType = pShell->GetFrmType(0,TRUE); + const sal_uInt16 eType = pShell->GetFrmType(0,sal_True); if( !(FRMTYPE_BODY & eType) ) ((SwTextFlowPage&)rPage).DisablePageBreak(); } @@ -1453,8 +1453,8 @@ SwTextFlowPage::SwTextFlowPage( Window* pParent, pShell(0), - bPageBreak(TRUE), - bHtmlMode(FALSE) + bPageBreak(sal_True), + bHtmlMode(sal_False) { FreeResource(); @@ -1477,7 +1477,7 @@ SwTextFlowPage::SwTextFlowPage( Window* pParent, #ifndef SW_FILEFORMAT_40 const SfxPoolItem *pItem; - if(SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, FALSE,&pItem ) + if(SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, sal_False,&pItem ) && ((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) #endif { @@ -1507,16 +1507,16 @@ SfxTabPage* SwTextFlowPage::Create( Window* pParent, /*-----------------12.12.96 12.22------------------- --------------------------------------------------*/ -BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) +sal_Bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; //Ueberschrift wiederholen if(aHeadLineCB.IsChecked() != aHeadLineCB.GetSavedValue() || - String::CreateFromInt32( static_cast< INT32 >(aRepeatHeaderNF.GetValue()) ) != aRepeatHeaderNF.GetSavedValue() ) + String::CreateFromInt32( static_cast< sal_Int32 >(aRepeatHeaderNF.GetValue()) ) != aRepeatHeaderNF.GetSavedValue() ) { bModified |= 0 != rSet.Put( - SfxUInt16Item(FN_PARAM_TABLE_HEADLINE, aHeadLineCB.IsChecked()? USHORT(aRepeatHeaderNF.GetValue()) : 0 )); + SfxUInt16Item(FN_PARAM_TABLE_HEADLINE, aHeadLineCB.IsChecked()? sal_uInt16(aRepeatHeaderNF.GetValue()) : 0 )); } if(aKeepCB.IsChecked() != aKeepCB.GetSavedValue()) bModified |= 0 != rSet.Put( SvxFmtKeepItem( aKeepCB.IsChecked(), RES_KEEP)); @@ -1532,10 +1532,10 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) const SwFmtPageDesc* pDesc = (const SwFmtPageDesc*) GetOldItem( rSet, RES_PAGEDESC ); - BOOL bState = aPageCollCB.IsChecked(); + sal_Bool bState = aPageCollCB.IsChecked(); //Wenn Seitenvorlage, dann kein Break - BOOL bPageItemPut = FALSE; + sal_Bool bPageItemPut = sal_False; if ( bState != aPageCollCB.GetSavedValue() || ( bState && aPageCollLB.GetSelectEntryPos() != aPageCollLB.GetSavedValue() ) @@ -1547,18 +1547,18 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) { sPage = aPageCollLB.GetSelectEntry(); } - USHORT nPgNum = static_cast< USHORT >(aPageNoNF.GetValue()); + sal_uInt16 nPgNum = static_cast< sal_uInt16 >(aPageNoNF.GetValue()); if ( !pDesc || !pDesc->GetPageDesc() || ( pDesc->GetPageDesc() && ((pDesc->GetPageDesc()->GetName() != sPage) || aPageNoNF.GetSavedValue() != (String)nPgNum))) { - SwFmtPageDesc aFmt( pShell->FindPageDescByName( sPage, TRUE ) ); + SwFmtPageDesc aFmt( pShell->FindPageDescByName( sPage, sal_True ) ); aFmt.SetNumOffset(bState ? nPgNum : 0); bModified |= 0 != rSet.Put( aFmt ); bPageItemPut = bState; } } - BOOL bIsChecked = aPgBrkCB.IsChecked(); + sal_Bool bIsChecked = aPgBrkCB.IsChecked(); if ( !bPageItemPut && ( bState != aPageCollCB.GetSavedValue() || bIsChecked != aPgBrkCB.GetSavedValue() || @@ -1570,7 +1570,7 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) if(bIsChecked) { - BOOL bBefore = aPgBrkBeforeRB.IsChecked(); + sal_Bool bBefore = aPgBrkBeforeRB.IsChecked(); if ( aPgBrkRB.IsChecked() ) { @@ -1602,13 +1602,13 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) { bModified |= 0 != rSet.Put( SvxFrameDirectionItem( - (SvxFrameDirection)(ULONG)aTextDirectionLB.GetEntryData(aTextDirectionLB.GetSelectEntryPos()) + (SvxFrameDirection)(sal_uLong)aTextDirectionLB.GetEntryData(aTextDirectionLB.GetSelectEntryPos()) , FN_TABLE_BOX_TEXTDIRECTION)); } if(aVertOrientLB.GetSelectEntryPos() != aVertOrientLB.GetSavedValue()) { - USHORT nOrient = USHRT_MAX; + sal_uInt16 nOrient = USHRT_MAX; switch(aVertOrientLB.GetSelectEntryPos()) { case 0 : nOrient = text::VertOrientation::NONE; break; @@ -1629,12 +1629,12 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) { const SfxPoolItem* pItem; SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get(); - BOOL bFlowAllowed = !bHtmlMode || pHtmlOpt->IsPrintLayoutExtension(); + sal_Bool bFlowAllowed = !bHtmlMode || pHtmlOpt->IsPrintLayoutExtension(); if(bFlowAllowed) { // Einfuegen der vorhandenen Seitenvorlagen in die Listbox - const USHORT nCount = pShell->GetPageDescCnt(); - USHORT i; + const sal_uInt16 nCount = pShell->GetPageDescCnt(); + sal_uInt16 i; for( i = 0; i < nCount; ++i) { @@ -1648,12 +1648,12 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ) )) aPageCollLB.InsertEntry( aFmtName ); - if(SFX_ITEM_SET == rSet.GetItemState( RES_KEEP, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( RES_KEEP, sal_False, &pItem )) { aKeepCB.Check( ((const SvxFmtKeepItem*)pItem)->GetValue() ); aKeepCB.SaveValue(); } - if(SFX_ITEM_SET == rSet.GetItemState( RES_LAYOUT_SPLIT, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( RES_LAYOUT_SPLIT, sal_False, &pItem )) { aSplitCB.Check( ((const SwFmtLayoutSplit*)pItem)->GetValue() ); } @@ -1663,7 +1663,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) aSplitCB.SaveValue(); SplitHdl_Impl(&aSplitCB); - if(SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, sal_False, &pItem )) { aSplitRowCB.Check( ((const SwFmtRowSplit*)pItem)->GetValue() ); } @@ -1673,7 +1673,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) if(bPageBreak) { - if(SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, sal_False, &pItem )) { String sPageDesc; const SwPageDesc* pDesc = ((const SwFmtPageDesc*)pItem)->GetPageDesc(); @@ -1694,19 +1694,19 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) aPageCollCB.Enable(); aPgBrkCB.Check(); - aPgBrkCB.Check( TRUE ); - aColBrkRB.Check( FALSE ); - aPgBrkBeforeRB.Check( TRUE ); - aPgBrkAfterRB.Check( FALSE ); + aPgBrkCB.Check( sal_True ); + aColBrkRB.Check( sal_False ); + aPgBrkBeforeRB.Check( sal_True ); + aPgBrkAfterRB.Check( sal_False ); } else { aPageCollLB.SetNoSelection(); - aPageCollCB.Check(FALSE); + aPageCollCB.Check(sal_False); } } - if(SFX_ITEM_SET == rSet.GetItemState( RES_BREAK, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( RES_BREAK, sal_False, &pItem )) { const SvxFmtBreakItem* pPageBreak = (const SvxFmtBreakItem*)pItem; SvxBreak eBreak = (SvxBreak)pPageBreak->GetValue(); @@ -1714,36 +1714,36 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) if ( eBreak != SVX_BREAK_NONE ) { aPgBrkCB.Check(); - aPageCollCB.Enable(FALSE); - aPageCollLB.Enable(FALSE); - aPageNoFT.Enable(FALSE); - aPageNoNF.Enable(FALSE); + aPageCollCB.Enable(sal_False); + aPageCollLB.Enable(sal_False); + aPageNoFT.Enable(sal_False); + aPageNoNF.Enable(sal_False); } switch ( eBreak ) { case SVX_BREAK_PAGE_BEFORE: - aPgBrkRB.Check( TRUE ); - aColBrkRB.Check( FALSE ); - aPgBrkBeforeRB.Check( TRUE ); - aPgBrkAfterRB.Check( FALSE ); + aPgBrkRB.Check( sal_True ); + aColBrkRB.Check( sal_False ); + aPgBrkBeforeRB.Check( sal_True ); + aPgBrkAfterRB.Check( sal_False ); break; case SVX_BREAK_PAGE_AFTER: - aPgBrkRB.Check( TRUE ); - aColBrkRB.Check( FALSE ); - aPgBrkBeforeRB.Check( FALSE ); - aPgBrkAfterRB.Check( TRUE ); + aPgBrkRB.Check( sal_True ); + aColBrkRB.Check( sal_False ); + aPgBrkBeforeRB.Check( sal_False ); + aPgBrkAfterRB.Check( sal_True ); break; case SVX_BREAK_COLUMN_BEFORE: - aPgBrkRB.Check( FALSE ); - aColBrkRB.Check( TRUE ); - aPgBrkBeforeRB.Check( TRUE ); - aPgBrkAfterRB.Check( FALSE ); + aPgBrkRB.Check( sal_False ); + aColBrkRB.Check( sal_True ); + aPgBrkBeforeRB.Check( sal_True ); + aPgBrkAfterRB.Check( sal_False ); break; case SVX_BREAK_COLUMN_AFTER: - aPgBrkRB.Check( FALSE ); - aColBrkRB.Check( TRUE ); - aPgBrkBeforeRB.Check( FALSE ); - aPgBrkAfterRB.Check( TRUE ); + aPgBrkRB.Check( sal_False ); + aColBrkRB.Check( sal_True ); + aPgBrkBeforeRB.Check( sal_False ); + aPgBrkAfterRB.Check( sal_True ); break; default:; //prevent warning } @@ -1758,20 +1758,20 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) } else { - aPgBrkRB.Enable(FALSE); - aColBrkRB.Enable(FALSE); - aPgBrkBeforeRB.Enable(FALSE); - aPgBrkAfterRB.Enable(FALSE); - aKeepCB .Enable(FALSE); - aSplitCB.Enable(FALSE); - aPgBrkCB.Enable(FALSE); - aPageCollCB.Enable(FALSE); - aPageCollLB.Enable(FALSE); + aPgBrkRB.Enable(sal_False); + aColBrkRB.Enable(sal_False); + aPgBrkBeforeRB.Enable(sal_False); + aPgBrkAfterRB.Enable(sal_False); + aKeepCB .Enable(sal_False); + aSplitCB.Enable(sal_False); + aPgBrkCB.Enable(sal_False); + aPageCollCB.Enable(sal_False); + aPageCollLB.Enable(sal_False); } - if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, FALSE, &pItem )) + if(SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, sal_False, &pItem )) { - USHORT nRep = ((const SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nRep = ((const SfxUInt16Item*)pItem)->GetValue(); aHeadLineCB.Check( nRep > 0 ); aHeadLineCB.SaveValue(); aRepeatHeaderNF.SetValue( nRep ); @@ -1779,14 +1779,14 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) } if ( rSet.GetItemState(FN_TABLE_BOX_TEXTDIRECTION) > SFX_ITEM_AVAILABLE ) { - ULONG nDirection = ((const SvxFrameDirectionItem&)rSet.Get(FN_TABLE_BOX_TEXTDIRECTION)).GetValue(); + sal_uLong nDirection = ((const SvxFrameDirectionItem&)rSet.Get(FN_TABLE_BOX_TEXTDIRECTION)).GetValue(); aTextDirectionLB.SelectEntryPos(aTextDirectionLB.GetEntryPos( (const void*)nDirection )); } if ( rSet.GetItemState(FN_TABLE_SET_VERT_ALIGN) > SFX_ITEM_AVAILABLE ) { - USHORT nVert = ((const SfxUInt16Item&)rSet.Get(FN_TABLE_SET_VERT_ALIGN)).GetValue(); - USHORT nPos = 0; + sal_uInt16 nVert = ((const SfxUInt16Item&)rSet.Get(FN_TABLE_SET_VERT_ALIGN)).GetValue(); + sal_uInt16 nPos = 0; switch(nVert) { case text::VertOrientation::NONE: nPos = 0; break; @@ -1819,8 +1819,8 @@ void SwTextFlowPage::SetShell(SwWrtShell* pSh) bHtmlMode = 0 != (::GetHtmlMode(pShell->GetView().GetDocShell()) & HTMLMODE_ON); if(bHtmlMode) { - aPageNoNF.Enable(FALSE); - aPageNoFT.Enable(FALSE); + aPageNoNF.Enable(sal_False); + aPageNoFT.Enable(sal_False); } } @@ -1839,7 +1839,7 @@ IMPL_LINK( SwTextFlowPage, PageBreakHdl_Impl, CheckBox*, EMPTYARG ) { aPageCollCB.Enable(); - BOOL bEnable = aPageCollCB.IsChecked() && + sal_Bool bEnable = aPageCollCB.IsChecked() && aPageCollLB.GetEntryCount(); aPageCollLB.Enable(bEnable); if(!bHtmlMode) @@ -1851,15 +1851,15 @@ IMPL_LINK( SwTextFlowPage, PageBreakHdl_Impl, CheckBox*, EMPTYARG ) } else { - aPageCollCB.Check( FALSE ); - aPageCollCB.Enable(FALSE); - aPageCollLB.Enable(FALSE); - aPageNoFT.Enable(FALSE); - aPageNoNF.Enable(FALSE); - aPgBrkRB. Enable(FALSE); - aColBrkRB. Enable(FALSE); - aPgBrkBeforeRB. Enable(FALSE); - aPgBrkAfterRB. Enable(FALSE); + aPageCollCB.Check( sal_False ); + aPageCollCB.Enable(sal_False); + aPageCollLB.Enable(sal_False); + aPageNoFT.Enable(sal_False); + aPageNoNF.Enable(sal_False); + aPgBrkRB. Enable(sal_False); + aColBrkRB. Enable(sal_False); + aPgBrkBeforeRB. Enable(sal_False); + aPgBrkAfterRB. Enable(sal_False); } return 0; } @@ -1868,11 +1868,11 @@ IMPL_LINK( SwTextFlowPage, PageBreakHdl_Impl, CheckBox*, EMPTYARG ) --------------------------------------------------*/ IMPL_LINK( SwTextFlowPage, ApplyCollClickHdl_Impl, CheckBox*, EMPTYARG ) { - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; if ( aPageCollCB.IsChecked() && aPageCollLB.GetEntryCount() ) { - bEnable = TRUE; + bEnable = sal_True; aPageCollLB.SelectEntryPos( 0 ); } else @@ -1898,7 +1898,7 @@ IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn ) { aPageCollCB.Enable(); - BOOL bEnable = aPageCollCB.IsChecked() && + sal_Bool bEnable = aPageCollCB.IsChecked() && aPageCollLB.GetEntryCount(); aPageCollLB.Enable(bEnable); @@ -1910,11 +1910,11 @@ IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn ) } else if ( pBtn == &aPgBrkAfterRB ) { - aPageCollCB .Check( FALSE ); - aPageCollCB .Enable(FALSE); - aPageCollLB .Enable(FALSE); - aPageNoFT .Enable(FALSE); - aPageNoNF .Enable(FALSE); + aPageCollCB .Check( sal_False ); + aPageCollCB .Enable(sal_False); + aPageCollLB .Enable(sal_False); + aPageNoFT .Enable(sal_False); + aPageNoNF .Enable(sal_False); } } return 0; @@ -1926,11 +1926,11 @@ IMPL_LINK( SwTextFlowPage, PageBreakTypeHdl_Impl, RadioButton*, pBtn ) { if ( pBtn == &aColBrkRB || aPgBrkAfterRB.IsChecked() ) { - aPageCollCB .Check(FALSE); - aPageCollCB .Enable(FALSE); - aPageCollLB .Enable(FALSE); - aPageNoFT .Enable(FALSE); - aPageNoNF .Enable(FALSE); + aPageCollCB .Check(sal_False); + aPageCollCB .Enable(sal_False); + aPageCollLB .Enable(sal_False); + aPageNoFT .Enable(sal_False); + aPageNoNF .Enable(sal_False); } else if ( aPgBrkBeforeRB.IsChecked() ) PageBreakPosHdl_Impl( &aPgBrkBeforeRB ); @@ -1949,7 +1949,7 @@ IMPL_LINK( SwTextFlowPage, SplitHdl_Impl, CheckBox*, pBox ) * --------------------------------------------------*/ IMPL_LINK( SwTextFlowPage, SplitRowHdl_Impl, TriStateBox*, pBox ) { - pBox->EnableTriState(FALSE); + pBox->EnableTriState(sal_False); return 0; } @@ -1965,7 +1965,7 @@ IMPL_LINK( SwTextFlowPage, HeadLineCBClickHdl, void*, EMPTYARG ) --------------------------------------------------*/ void SwTextFlowPage::DisablePageBreak() { - bPageBreak = FALSE; + bPageBreak = sal_False; aPgBrkCB .Disable(); aPgBrkRB .Disable(); aColBrkRB .Disable(); diff --git a/sw/source/ui/table/tablemgr.cxx b/sw/source/ui/table/tablemgr.cxx index 16958e3fc1..7ba9a89783 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++; } diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx index ea40fec677..ea200094c6 100644 --- a/sw/source/ui/table/tablepg.hxx +++ b/sw/source/ui/table/tablepg.hxx @@ -47,7 +47,7 @@ class SwTableRep; struct TColumn { SwTwips nWidth; - BOOL bVisible; + sal_Bool bVisible; }; class SwFormatTablePage : public SfxTabPage @@ -84,10 +84,10 @@ class SwFormatTablePage : public SfxTabPage SwTableRep* pTblData; SwTwips nSaveWidth; SwTwips nMinTableWidth; - USHORT nOldAlign; - BOOL bModified; - BOOL bFull:1; - BOOL bHtmlMode : 1; + sal_uInt16 nOldAlign; + sal_Bool bModified; + sal_Bool bFull:1; + sal_Bool bHtmlMode : 1; void Init(); void ModifyHdl( Edit* pEdit ); @@ -104,7 +104,7 @@ public: SwFormatTablePage( Window* pParent, const SfxItemSet& rSet ); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void ActivatePage( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet = 0 ); @@ -143,24 +143,24 @@ class SwTableColumnPage : public SfxTabPage FixedText* pTextArr[MET_FIELDS]; SwTwips nTableWidth; SwTwips nMinWidth; - USHORT nNoOfCols; - USHORT nNoOfVisibleCols; + sal_uInt16 nNoOfCols; + sal_uInt16 nNoOfVisibleCols; //Breite merken, wenn auf autom. Ausrichtung gestellt wird - USHORT aValueTbl[MET_FIELDS];//primaere Zuordnung der MetricFields - BOOL bModified:1; - BOOL bModifyTbl:1; - BOOL bPercentMode:1; + sal_uInt16 aValueTbl[MET_FIELDS];//primaere Zuordnung der MetricFields + sal_Bool bModified:1; + sal_Bool bModifyTbl:1; + sal_Bool bPercentMode:1; - void Init(BOOL bWeb); + void Init(sal_Bool bWeb); DECL_LINK( AutoClickHdl, CheckBox * ); void ModifyHdl( PercentField* pEdit ); DECL_LINK( UpHdl, PercentField * ); DECL_LINK( DownHdl, PercentField * ); DECL_LINK( LoseFocusHdl, PercentField * ); DECL_LINK( ModeHdl, CheckBox * ); - void UpdateCols( USHORT nAktPos ); - SwTwips GetVisibleWidth(USHORT nPos); - void SetVisibleWidth(USHORT nPos, SwTwips nNewWidth); + void UpdateCols( sal_uInt16 nAktPos ); + SwTwips GetVisibleWidth(sal_uInt16 nPos); + void SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth); using TabPage::ActivatePage; using TabPage::DeactivatePage; @@ -170,7 +170,7 @@ public: ~SwTableColumnPage(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); virtual void ActivatePage( const SfxItemSet& rSet ); virtual int DeactivatePage( SfxItemSet* pSet = 0 ); @@ -210,8 +210,8 @@ class SwTextFlowPage : public SfxTabPage SwWrtShell* pShell; - BOOL bPageBreak; - BOOL bHtmlMode; + sal_Bool bPageBreak; + sal_Bool bHtmlMode; DECL_LINK( PageBreakHdl_Impl, CheckBox* ); @@ -228,7 +228,7 @@ class SwTextFlowPage : public SfxTabPage public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); - virtual BOOL FillItemSet( SfxItemSet& rSet ); + virtual sal_Bool FillItemSet( SfxItemSet& rSet ); virtual void Reset( const SfxItemSet& rSet ); void SetShell(SwWrtShell* pSh); diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index a0a2f1c41e..e9665532f1 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -86,7 +86,7 @@ private: VirtualDevice aVD; SvtScriptedTextHelper aScriptedText; svx::frame::Array maArray; /// Implementation to draw the frame borders. - BOOL bFitWidth; + sal_Bool bFitWidth; bool mbRTL; Size aPrvSize; long nLabelColWidth; @@ -108,19 +108,19 @@ private: //------------------------------------------- void Init (); void DoPaint ( const Rectangle& rRect ); - void CalcCellArray ( BOOL bFitWidth ); + void CalcCellArray ( sal_Bool bFitWidth ); void CalcLineMap (); void PaintCells (); - BYTE GetFormatIndex( size_t nCol, size_t nRow ) const; + sal_uInt8 GetFormatIndex( size_t nCol, size_t nRow ) const; const SvxBoxItem& GetBoxItem( size_t nCol, size_t nRow ) const; void DrawString( size_t nCol, size_t nRow ); void DrawStrings(); void DrawBackground(); - void MakeFonts ( BYTE nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont ); - String MakeNumberString( String cellString, BOOL bAddDec ); + void MakeFonts ( sal_uInt8 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont ); + String MakeNumberString( String cellString, sal_Bool bAddDec ); }; //======================================================================== @@ -179,7 +179,7 @@ __EXPORT SwStringInputDlg::~SwStringInputDlg() SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell, - BOOL bSetAutoFormat, const SwTableAutoFmt* pSelFmt ) + sal_Bool bSetAutoFormat, const SwTableAutoFmt* pSelFmt ) : SfxModalDialog( pParent, SW_RES( DLG_AUTOFMT_TABLE ) ), // aFlFormat ( this, SW_RES( FL_FORMAT ) ), @@ -210,7 +210,7 @@ SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell, pShell ( pWrtShell ), nIndex ( 0 ), nDfltStylePos ( 0 ), - bCoreDataChanged( FALSE ), + bCoreDataChanged( sal_False ), bSetAutoFmt ( bSetAutoFormat ) { pTableTbl = new SwTableAutoFmtTbl; @@ -270,7 +270,7 @@ void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt ) nIndex = 255; } - for( BYTE i = 0, nCount = (BYTE)pTableTbl->Count(); i < nCount; i++ ) + for( sal_uInt8 i = 0, nCount = (sal_uInt8)pTableTbl->Count(); i < nCount; i++ ) { SwTableAutoFmt* pFmt = (*pTableTbl)[ i ]; aLbFormat.InsertEntry( pFmt->GetName() ); @@ -285,7 +285,7 @@ void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt ) //------------------------------------------------------------------------ -void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFmt& rFmt, BOOL bEnable ) +void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFmt& rFmt, sal_Bool bEnable ) { aBtnNumFormat.Enable( bEnable ); aBtnNumFormat.Check( rFmt.IsValueFormat() ); @@ -325,7 +325,7 @@ void SwAutoFormatDlg::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn ) { SwTableAutoFmtPtr pData = (*pTableTbl)[nIndex]; - BOOL bCheck = ((CheckBox*)pBtn)->IsChecked(), bDataChgd = TRUE; + sal_Bool bCheck = ((CheckBox*)pBtn)->IsChecked(), bDataChgd = sal_True; if( pBtn == &aBtnNumFormat ) pData->SetValueFormat( bCheck ); @@ -340,14 +340,14 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn ) // else if ( pBtn == &aBtnAdjust ) // pData->SetIncludeWidthHeight( bCheck ); else - bDataChgd = FALSE; + bDataChgd = sal_False; if( bDataChgd ) { if( !bCoreDataChanged ) { aBtnCancel.SetText( aStrClose ); - bCoreDataChanged = TRUE; + bCoreDataChanged = sal_True; } pWndPreview->NotifyChange( *pData ); @@ -360,7 +360,7 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn ) IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG ) { - BOOL bOk = FALSE, bFmtInserted = FALSE; + sal_Bool bOk = sal_False, bFmtInserted = sal_False; while( !bOk ) { SwStringInputDlg* pDlg = new SwStringInputDlg( this, @@ -374,7 +374,7 @@ IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG ) if( aFormatName.Len() > 0 ) { - USHORT n; + sal_uInt16 n; for( n = 0; n < pTableTbl->Count(); ++n ) if( (*pTableTbl)[n]->GetName() == aFormatName ) break; @@ -395,16 +395,16 @@ IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG ) pTableTbl->Insert( pNewData, n ); aLbFormat.InsertEntry( aFormatName, nDfltStylePos + n ); aLbFormat.SelectEntryPos( nDfltStylePos + n ); - bFmtInserted = TRUE; - aBtnAdd.Enable( FALSE ); + bFmtInserted = sal_True; + aBtnAdd.Enable( sal_False ); if ( !bCoreDataChanged ) { aBtnCancel.SetText( aStrClose ); - bCoreDataChanged = TRUE; + bCoreDataChanged = sal_True; } SelFmtHdl( 0 ); - bOk = TRUE; + bOk = sal_True; } } @@ -417,7 +417,7 @@ IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG ) } } else - bOk = TRUE; + bOk = sal_True; delete pDlg; } return 0; @@ -445,14 +445,14 @@ IMPL_LINK( SwAutoFormatDlg, RemoveHdl, void *, EMPTYARG ) if( !nIndex ) { - aBtnRemove.Enable(FALSE); - aBtnRename.Enable(FALSE); + aBtnRemove.Enable(sal_False); + aBtnRename.Enable(sal_False); } if( !bCoreDataChanged ) { aBtnCancel.SetText( aStrClose ); - bCoreDataChanged = TRUE; + bCoreDataChanged = sal_True; } } delete pBox; @@ -464,7 +464,7 @@ IMPL_LINK( SwAutoFormatDlg, RemoveHdl, void *, EMPTYARG ) IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG ) { - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; while( !bOk ) { SwStringInputDlg* pDlg = new SwStringInputDlg( this, @@ -472,13 +472,13 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG ) aEmptyStr ); if( pDlg->Execute() == RET_OK ) { - BOOL bFmtRenamed = FALSE; + sal_Bool bFmtRenamed = sal_False; String aFormatName; pDlg->GetInputString( aFormatName ); if ( aFormatName.Len() > 0 ) { - USHORT n; + sal_uInt16 n; for( n = 0; n < pTableTbl->Count(); ++n ) if ((*pTableTbl)[n]->GetName() == aFormatName) break; @@ -506,12 +506,12 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG ) if ( !bCoreDataChanged ) { aBtnCancel.SetText( aStrClose ); - bCoreDataChanged = TRUE; + bCoreDataChanged = sal_True; } SelFmtHdl( 0 ); - bOk = TRUE; - bFmtRenamed = TRUE; + bOk = sal_True; + bFmtRenamed = sal_True; } } @@ -524,7 +524,7 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG ) } } else - bOk = TRUE; + bOk = sal_True; delete pDlg; } return 0; @@ -534,30 +534,30 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG ) IMPL_LINK( SwAutoFormatDlg, SelFmtHdl, void *, EMPTYARG ) { - BOOL bBtnEnable = FALSE; - BYTE nSelPos = (BYTE) aLbFormat.GetSelectEntryPos(), nOldIdx = nIndex; + sal_Bool bBtnEnable = sal_False; + sal_uInt8 nSelPos = (sal_uInt8) aLbFormat.GetSelectEntryPos(), nOldIdx = nIndex; if( nSelPos >= nDfltStylePos ) { nIndex = nSelPos - nDfltStylePos; pWndPreview->NotifyChange( *(*pTableTbl)[nIndex] ); bBtnEnable = 0 != nIndex; - UpdateChecks( *(*pTableTbl)[nIndex], TRUE ); + UpdateChecks( *(*pTableTbl)[nIndex], sal_True ); } else { nIndex = 255; SwTableAutoFmt aTmp( ViewShell::GetShellRes()->aStrNone ); - aTmp.SetFont( FALSE ); - aTmp.SetJustify( FALSE ); - aTmp.SetFrame( FALSE ); - aTmp.SetBackground( FALSE ); - aTmp.SetValueFormat( FALSE ); - aTmp.SetWidthHeight( FALSE ); + aTmp.SetFont( sal_False ); + aTmp.SetJustify( sal_False ); + aTmp.SetFrame( sal_False ); + aTmp.SetBackground( sal_False ); + aTmp.SetValueFormat( sal_False ); + aTmp.SetWidthHeight( sal_False ); if( nOldIdx != nIndex ) pWndPreview->NotifyChange( aTmp ); - UpdateChecks( aTmp, FALSE ); + UpdateChecks( aTmp, sal_False ); } aBtnRemove.Enable( bBtnEnable ); @@ -572,7 +572,7 @@ IMPL_LINK_INLINE_START( SwAutoFormatDlg, OkHdl, Button *, EMPTYARG ) if( bSetAutoFmt ) pShell->SetTableAutoFmt( *(*pTableTbl)[ nIndex ] ); EndDialog( RET_OK ); - return TRUE; + return sal_True; } IMPL_LINK_INLINE_END( SwAutoFormatDlg, OkHdl, Button *, EMPTYARG ) @@ -587,7 +587,7 @@ AutoFmtPreview::AutoFmtPreview( Window* pParent, const ResId& rRes, SwWrtShell* aCurData ( aEmptyStr ), aVD ( *this ), aScriptedText ( aVD ), - bFitWidth ( FALSE ), + bFitWidth ( sal_False ), mbRTL ( false ), aPrvSize ( GetSizePixel().Width() - 6, GetSizePixel().Height() - 30 ), nLabelColWidth ( (aPrvSize.Width() - 4) / 4 - 12 ), @@ -650,7 +650,7 @@ rFont.MethodName( Value ); \ rCJKFont.MethodName( Value ); \ rCTLFont.MethodName( Value ); -void AutoFmtPreview::MakeFonts( BYTE nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont ) +void AutoFmtPreview::MakeFonts( sal_uInt8 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont ) { const SwBoxAutoFmt& rBoxFmt = aCurData.GetBoxFmt( nIndex ); @@ -668,14 +668,14 @@ void AutoFmtPreview::MakeFonts( BYTE nIndex, Font& rFont, Font& rCJKFont, Font& SETONALLFONTS( SetShadow, rBoxFmt.GetShadowed().GetValue() ); SETONALLFONTS( SetColor, rBoxFmt.GetColor().GetValue() ); SETONALLFONTS( SetSize, aFontSize ); - SETONALLFONTS( SetTransparent, TRUE ); + SETONALLFONTS( SetTransparent, sal_True ); } //------------------------------------------------------------------------ -BYTE AutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const +sal_uInt8 AutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const { - static const BYTE pnFmtMap[] = + static const sal_uInt8 pnFmtMap[] = { 0, 1, 2, 1, 3, 4, 5, 6, 5, 7, @@ -698,10 +698,10 @@ void AutoFmtPreview::DrawString( size_t nCol, size_t nRow ) //------------------------ // Ausgabe des Zelltextes: //------------------------ - ULONG nNum; + sal_uLong nNum; double nVal; String cellString; - BYTE nIndex = static_cast< BYTE >( maArray.GetCellIndex( nCol, nRow, mbRTL ) ); + sal_uInt8 nIndex = static_cast< sal_uInt8 >( maArray.GetCellIndex( nCol, nRow, mbRTL ) ); switch( nIndex ) { @@ -741,10 +741,10 @@ MAKENUMSTR: if( aCurData.IsValueFormat() ) { String sFmt; LanguageType eLng, eSys; - aCurData.GetBoxFmt( (BYTE)nNum ).GetValueFormat( sFmt, eLng, eSys ); + aCurData.GetBoxFmt( (sal_uInt8)nNum ).GetValueFormat( sFmt, eLng, eSys ); short nType; - BOOL bNew; + sal_Bool bNew; xub_StrLen nCheckPos; sal_uInt32 nKey = pNumFmt->GetIndexPuttingAndConverting( sFmt, eLng, eSys, nType, bNew, nCheckPos); @@ -760,11 +760,11 @@ MAKENUMSTR: if( cellString.Len() ) { Size aStrSize; - BYTE nFmtIndex = GetFormatIndex( nCol, nRow ); + sal_uInt8 nFmtIndex = GetFormatIndex( nCol, nRow ); Rectangle cellRect = maArray.GetCellRect( nCol, nRow ); Point aPos = cellRect.TopLeft(); - USHORT nRightX = 0; -// BOOL bJustify = aCurData.IsJustify(); + sal_uInt16 nRightX = 0; +// sal_Bool bJustify = aCurData.IsJustify(); // ScHorJustifyAttr aHorJustifyItem; // CellHorJustify eJustification; @@ -803,7 +803,7 @@ MAKENUMSTR: aStrSize = aScriptedText.GetTextSize(); } - nRightX = (USHORT)( cellRect.GetWidth() + nRightX = (sal_uInt16)( cellRect.GetWidth() - aStrSize.Width() - FRAME_OFFSET ); //------------- @@ -822,7 +822,7 @@ MAKENUMSTR: //----------------------------- // vertikal (immer zentrieren): //----------------------------- - aPos.Y() += (nRowHeight - (USHORT)aStrSize.Height()) / 2; + aPos.Y() += (nRowHeight - (sal_uInt16)aStrSize.Height()) / 2; //----------- // horizontal @@ -832,7 +832,7 @@ MAKENUMSTR: aPos.X() += nRightX; else if (aCurData.IsJustify()) { - USHORT nHorPos = (USHORT) + sal_uInt16 nHorPos = (sal_uInt16) ((cellRect.GetWidth()-aStrSize.Width())/2); const SvxAdjustItem& rAdj = aCurData.GetBoxFmt(nFmtIndex).GetAdjust(); switch ( rAdj.GetAdjust() ) @@ -927,14 +927,14 @@ void __EXPORT AutoFmtPreview::Init() SetBorderStyle( GetBorderStyle() | WINDOW_BORDER_MONO ); maArray.Initialize( 5, 5 ); maArray.SetUseDiagDoubleClipping( false ); - CalcCellArray( FALSE ); + CalcCellArray( sal_False ); CalcLineMap(); } //------------------------------------------------------------------------ -void AutoFmtPreview::CalcCellArray( BOOL _bFitWidth ) +void AutoFmtPreview::CalcCellArray( sal_Bool _bFitWidth ) { maArray.SetXOffset( 2 ); maArray.SetAllColWidths( _bFitWidth ? nDataColWidth2 : nDataColWidth1 ); @@ -988,7 +988,7 @@ void AutoFmtPreview::CalcLineMap() void AutoFmtPreview::NotifyChange( const SwTableAutoFmt& rNewData ) { aCurData = rNewData; - bFitWidth = aCurData.IsJustify();//TRUE; //??? + bFitWidth = aCurData.IsJustify();//sal_True; //??? CalcCellArray( bFitWidth ); CalcLineMap(); DoPaint( Rectangle( Point(0,0), GetSizePixel() ) ); @@ -1012,7 +1012,7 @@ void AutoFmtPreview::DoPaint( const Rectangle& /*rRect*/ ) Font aFont; aFont = aVD.GetFont(); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); aVD.SetFont ( aFont ); aVD.SetLineColor (); |