summaryrefslogtreecommitdiff
path: root/sw/source/ui/uiview
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/uiview')
-rw-r--r--sw/source/ui/uiview/formatclipboard.cxx56
-rw-r--r--sw/source/ui/uiview/pview.cxx252
-rw-r--r--sw/source/ui/uiview/scroll.cxx26
-rw-r--r--sw/source/ui/uiview/srcview.cxx120
-rw-r--r--sw/source/ui/uiview/swcli.cxx6
-rw-r--r--sw/source/ui/uiview/uivwimp.cxx14
-rw-r--r--sw/source/ui/uiview/view.cxx66
-rw-r--r--sw/source/ui/uiview/view0.cxx24
-rw-r--r--sw/source/ui/uiview/view1.cxx20
-rw-r--r--sw/source/ui/uiview/view2.cxx292
-rw-r--r--sw/source/ui/uiview/viewcoll.cxx8
-rw-r--r--sw/source/ui/uiview/viewdlg.cxx12
-rw-r--r--sw/source/ui/uiview/viewdlg2.cxx20
-rw-r--r--sw/source/ui/uiview/viewdraw.cxx8
-rw-r--r--sw/source/ui/uiview/viewfunc.hxx10
-rwxr-xr-xsw/source/ui/uiview/viewling.cxx6
-rw-r--r--sw/source/ui/uiview/viewmdi.cxx70
-rw-r--r--sw/source/ui/uiview/viewport.cxx242
-rw-r--r--sw/source/ui/uiview/viewprt.cxx40
-rw-r--r--sw/source/ui/uiview/viewsrch.cxx128
-rw-r--r--sw/source/ui/uiview/viewstat.cxx8
-rw-r--r--sw/source/ui/uiview/viewtab.cxx376
22 files changed, 897 insertions, 907 deletions
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx
index 3c77dc41d4d6..c3927935870b 100644
--- a/sw/source/ui/uiview/formatclipboard.cxx
+++ b/sw/source/ui/uiview/formatclipboard.cxx
@@ -202,13 +202,13 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh )
void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
{
const SfxPoolItem* pItem = 0;
- BOOL bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) ||
+ sal_Bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) ||
SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) );
pItem = 0;
- BOOL bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, FALSE, &pItem );
+ sal_Bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, sal_False, &pItem );
const SfxPoolItem* pRowItem = 0, *pTableItem = 0;
- bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, FALSE, &pRowItem );
- bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, FALSE, &pTableItem );
+ bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, sal_False, &pRowItem );
+ bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, sal_False, &pTableItem );
if(bBackground)
{
@@ -230,7 +230,7 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
if(bBorder)
rSh.SetTabBorders( rSet );
- 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) )
rSh.SetRowsToRepeat( ((SfxUInt16Item*)pItem)->GetValue() );
SwFrmFmt* pFrmFmt = rSh.GetTableFmt();
@@ -238,57 +238,57 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
{
//RES_SHADOW
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_SHADOW), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_SHADOW), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_BREAK
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_BREAK), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_BREAK), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_PAGEDESC
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_PAGEDESC), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_PAGEDESC), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_LAYOUT_SPLIT
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_LAYOUT_SPLIT), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_LAYOUT_SPLIT), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_KEEP
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_KEEP), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_KEEP), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_FRAMEDIR
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_FRAMEDIR), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_FRAMEDIR), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, FALSE, &pItem) )
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, sal_False, &pItem) )
{
SvxFrameDirectionItem aDirection( FRMDIR_ENVIRONMENT, RES_FRAMEDIR );
aDirection.SetValue(static_cast< const SvxFrameDirectionItem* >(pItem)->GetValue());
rSh.SetBoxDirection(aDirection);
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, FALSE, &pItem))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, sal_False, &pItem))
rSh.SetBoxAlign(((SfxUInt16Item*)(pItem))->GetValue());
- if( SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, FALSE, &pItem) )
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, sal_False, &pItem) )
rSh.SetRowSplit(*static_cast<const SwFmtRowSplit*>(pItem));
//-- numberformat in cells
#ifdef FORMAT_PAINTBRUSH_ALSO_COPY_NUMBERFORMAT_FOR_TABLES
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem ))
{
SfxItemSet aBoxSet( *rSet.GetPool(), RES_BOXATR_FORMAT, RES_BOXATR_FORMAT );
aBoxSet.Put( SwTblBoxNumFormat( ((SfxUInt32Item*)pItem)->GetValue() ));
@@ -364,8 +364,8 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
{
SwPaM* pCrsr = rWrtShell.GetCrsr();
//select one character only to get the attributes of this single character only
- BOOL bHasSelection = pCrsr->HasMark();
- BOOL bForwardSelection = FALSE;
+ sal_Bool bHasSelection = pCrsr->HasMark();
+ sal_Bool bForwardSelection = sal_False;
if(!bHasSelection) //check for and handle multiselections
{
@@ -415,7 +415,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
SdrView* pDrawView = rWrtShell.GetDrawView();
if(pDrawView)
{
- BOOL bOnlyHardAttr = TRUE;
+ sal_Bool bOnlyHardAttr = sal_True;
if( pDrawView->AreObjectsMarked() )
{
pItemSet = new SfxItemSet( pDrawView->GetAttrFromMarked(bOnlyHardAttr) );
@@ -446,7 +446,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
if( pFmt )
m_aParaStyle = pFmt->GetName();
}
- rWrtShell.Pop(FALSE);
+ rWrtShell.Pop(sal_False);
rWrtShell.EndAction();
}
typedef boost::shared_ptr< SfxPoolItem > SfxPoolItemSharedPtr;
@@ -454,10 +454,10 @@ typedef std::vector< SfxPoolItemSharedPtr > ItemVector;
// #144857# collect all PoolItems from the applied styles
void lcl_AppendSetItems( ItemVector& rItemVector, const SfxItemSet& rStyleAttrSet )
{
- const USHORT* pRanges = rStyleAttrSet.GetRanges();
+ const sal_uInt16* pRanges = rStyleAttrSet.GetRanges();
while( *pRanges )
{
- for ( USHORT nWhich = *pRanges; nWhich <= *(pRanges+1); ++nWhich )
+ for ( sal_uInt16 nWhich = *pRanges; nWhich <= *(pRanges+1); ++nWhich )
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rStyleAttrSet.GetItemState( nWhich, sal_False, &pItem ) )
@@ -512,7 +512,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
SwFmtCharFmt aFmt(pStyle->GetCharFmt());
// #144857# collect items from character style
lcl_AppendSetItems( aItemVector, aFmt.GetCharFmt()->GetAttrSet());
- USHORT nFlags=0; //(nMode & KEY_SHIFT) ? SETATTR_DONTREPLACE : SETATTR_DEFAULT;
+ sal_uInt16 nFlags=0; //(nMode & KEY_SHIFT) ? SETATTR_DONTREPLACE : SETATTR_DEFAULT;
rWrtShell.SetAttr( aFmt, nFlags );
}
}
@@ -535,7 +535,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
SdrView* pDrawView = rWrtShell.GetDrawView();
if(pDrawView)
{
- BOOL bReplaceAll = TRUE;
+ sal_Bool bReplaceAll = sal_True;
pDrawView->SetAttrToMarked(*m_pItemSet, bReplaceAll);
}
}
@@ -561,22 +561,22 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
{
if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART) )
{
- BOOL bStart = ((SfxBoolItem&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART)).GetValue();
- USHORT nNumStart = USHRT_MAX;
+ sal_Bool bStart = ((SfxBoolItem&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART)).GetValue();
+ sal_uInt16 nNumStart = USHRT_MAX;
if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
nNumStart = ((SfxUInt16Item&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
if(USHRT_MAX != nNumStart)
- bStart = FALSE;
+ bStart = sal_False;
}
rWrtShell.SetNumRuleStart(bStart);
rWrtShell.SetNodeNumStart(nNumStart);
}
else if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
- USHORT nNumStart = ((SfxUInt16Item&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
+ sal_uInt16 nNumStart = ((SfxUInt16Item&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
rWrtShell.SetNodeNumStart(nNumStart);
- rWrtShell.SetNumRuleStart(FALSE);
+ rWrtShell.SetNumRuleStart(sal_False);
}
}
}
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index fd5d57ae35c0..b69f2edca327 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -118,13 +118,13 @@ TYPEINIT1(SwPagePreView,SfxViewShell)
/* -----------------26.11.2002 10:41-----------------
*
* --------------------------------------------------*/
-USHORT lcl_GetNextZoomStep(USHORT nCurrentZoom, BOOL bZoomIn)
+sal_uInt16 lcl_GetNextZoomStep(sal_uInt16 nCurrentZoom, sal_Bool bZoomIn)
{
- static USHORT aZoomArr[] =
+ static sal_uInt16 aZoomArr[] =
{
25, 50, 75, 100, 150, 200, 400, 600
};
- const sal_uInt16 nZoomArrSize = sizeof(aZoomArr)/sizeof(USHORT);
+ const sal_uInt16 nZoomArrSize = sizeof(aZoomArr)/sizeof(sal_uInt16);
if(bZoomIn)
for(int i = nZoomArrSize - 1; i >= 0; --i)
{
@@ -144,7 +144,7 @@ USHORT lcl_GetNextZoomStep(USHORT nCurrentZoom, BOOL bZoomIn)
* --------------------------------------------------*/
void lcl_InvalidateZoomSlots(SfxBindings& rBindings)
{
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_ZOOM, SID_ZOOM_OUT, SID_ZOOM_IN, SID_ATTR_ZOOMSLIDER, FN_PREVIEW_ZOOM, FN_STAT_ZOOM,
0
@@ -206,8 +206,8 @@ SwPreViewZoomDlg::~SwPreViewZoomDlg() {}
void SwPreViewZoomDlg::Apply()
{
((SwPagePreViewWin*)GetParent())->CalcWish(
- BYTE(aRowEdit.GetValue()),
- BYTE(aColEdit.GetValue()) );
+ sal_uInt8(aRowEdit.GetValue()),
+ sal_uInt8(aColEdit.GetValue()) );
}
/*--------------------------------------------------------------------
@@ -230,7 +230,7 @@ SwPagePreViewWin::SwPagePreViewWin( Window *pParent, SwPagePreView& rPView )
SetLineColor( GetBackground().GetColor());
SetMapMode( MapMode(MAP_TWIP) );
- const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(FALSE);
+ const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(sal_False);
mnRow = pUsrPref->GetPagePrevRow(); // 1 Zeile
mnCol = pUsrPref->GetPagePrevCol(); // 1 Spalte
// OD 24.03.2003 #108282# - member <mnVirtPage> no longer exists.
@@ -284,16 +284,16 @@ void SwPagePreViewWin::Paint( const Rectangle& rRect )
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
+void SwPagePreViewWin::CalcWish( sal_uInt8 nNewRow, sal_uInt8 nNewCol )
{
if( !mpViewShell || !mpViewShell->GetLayout() )
return;
- USHORT nOldCol = mnCol;
+ sal_uInt16 nOldCol = mnCol;
// OD 02.12.2002 #103492# - update <mnRow> and <mnCol>.
mnRow = nNewRow;
mnCol = nNewCol;
- USHORT nPages = mnRow * mnCol,
+ sal_uInt16 nPages = mnRow * mnCol,
nLastSttPg = mrView.GetPageCount()+1 > nPages
? mrView.GetPageCount()+1 - nPages : 0;
if( mnSttPage > nLastSttPg )
@@ -313,7 +313,7 @@ void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
// Sortierung muss eingehalten werden!!
// OD 24.03.2003 #108282# - additional invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_ZOOM, SID_ZOOM_OUT, SID_ZOOM_IN,
FN_PREVIEW_ZOOM,
@@ -337,11 +337,11 @@ void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
int SwPagePreViewWin::MovePage( int eMoveMode )
{
// soviele Seiten hoch
- USHORT nPages = mnRow * mnCol;
- USHORT nNewSttPage = mnSttPage;
+ sal_uInt16 nPages = mnRow * mnCol;
+ sal_uInt16 nNewSttPage = mnSttPage;
// OD 04.12.2002 #103492#
- USHORT nPageCount = mrView.GetPageCount();
- USHORT nDefSttPg = GetDefSttPage();
+ sal_uInt16 nPageCount = mrView.GetPageCount();
+ sal_uInt16 nDefSttPg = GetDefSttPage();
// OD 06.12.2002 #103492#
bool bPaintPageAtFirstCol = true;
@@ -420,13 +420,13 @@ int SwPagePreViewWin::MovePage( int eMoveMode )
maPaintedPreviewDocRect, bPaintPageAtFirstCol );
if( nNewSttPage == mnSttPage &&
eMoveMode != MV_SELPAGE )
- return FALSE;
+ return sal_False;
SetPagePreview(mnRow, mnCol);
mnSttPage = nNewSttPage;
// OD 24.03.2003 #108282# - additional invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -435,7 +435,7 @@ int SwPagePreViewWin::MovePage( int eMoveMode )
SfxBindings& rBindings = mrView.GetViewFrame()->GetBindings();
rBindings.Invalidate( aInval );
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -476,7 +476,7 @@ void SwPagePreViewWin::SetWinSize( const Size& rNewSize )
--------------------------------------------------------------------*/
-void SwPagePreViewWin::GetStatusStr( String& rStr, USHORT nPageCnt ) const
+void SwPagePreViewWin::GetStatusStr( String& rStr, sal_uInt16 nPageCnt ) const
{
// OD 24.03.2003 #108282# - show physical and virtual page number of
// selected page, if it's visible.
@@ -508,11 +508,11 @@ void SwPagePreViewWin::GetStatusStr( String& rStr, USHORT nPageCnt ) const
void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt )
{
const KeyCode& rKeyCode = rKEvt.GetKeyCode();
- USHORT nKey = rKeyCode.GetCode();
- BOOL bHandled = FALSE;
+ sal_uInt16 nKey = rKeyCode.GetCode();
+ sal_Bool bHandled = sal_False;
if(!rKeyCode.GetModifier())
{
- USHORT nSlot = 0;
+ sal_uInt16 nSlot = 0;
switch(nKey)
{
case KEY_ADD : nSlot = SID_ZOOM_OUT; break;
@@ -521,7 +521,7 @@ void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt )
}
if(nSlot)
{
- bHandled = TRUE;
+ bHandled = sal_True;
mrView.GetViewFrame()->GetDispatcher()->Execute(
nSlot, SFX_CALLMODE_ASYNCHRON );
}
@@ -536,12 +536,12 @@ void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt )
void SwPagePreViewWin::Command( const CommandEvent& rCEvt )
{
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
switch( rCEvt.GetCommand() )
{
case COMMAND_CONTEXTMENU:
mrView.GetViewFrame()->GetDispatcher()->ExecutePopup();
- bCallBase = FALSE;
+ bCallBase = sal_False;
break;
case COMMAND_WHEEL:
@@ -607,7 +607,7 @@ void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt )
mrView.SetVScrollbarThumbPos( nNewSelectedPage );
}
// OD 24.03.2003 #108282# - invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_STAT_PAGE, 0
};
@@ -622,9 +622,9 @@ void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt )
******************************************************************************/
-void SwPagePreViewWin::SetPagePreview( BYTE nRow, BYTE nCol )
+void SwPagePreViewWin::SetPagePreview( sal_uInt8 nRow, sal_uInt8 nCol )
{
- SwMasterUsrPref *pOpt = (SwMasterUsrPref *)SW_MOD()->GetUsrPref(FALSE);
+ SwMasterUsrPref *pOpt = (SwMasterUsrPref *)SW_MOD()->GetUsrPref(sal_False);
if (nRow != pOpt->GetPagePrevRow() || nCol != pOpt->GetPagePrevCol())
{
@@ -719,7 +719,7 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
const int eMvMode = _bPgUp ?
SwPagePreViewWin::MV_PAGE_UP :
SwPagePreViewWin::MV_PAGE_DOWN;
- if ( ChgPage( eMvMode, TRUE ) )
+ if ( ChgPage( eMvMode, sal_True ) )
aViewWin.Invalidate();
}
else
@@ -763,7 +763,7 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
}
ScrollViewSzChg();
// OD 24.03.2003 #108282# - additional invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -785,8 +785,8 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
void SwPagePreView::Execute( SfxRequest &rReq )
{
int eMvMode;
- BYTE nRow = 1;
- BOOL bRetVal = FALSE;
+ sal_uInt8 nRow = 1;
+ sal_Bool bRetVal = sal_False;
bool bRefresh = true;
switch(rReq.GetSlot())
@@ -801,9 +801,9 @@ void SwPagePreView::Execute( SfxRequest &rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
if( pArgs && pArgs->Count() >= 2 )
{
- BYTE nCols = (BYTE)((SfxUInt16Item &)pArgs->Get(
+ sal_uInt8 nCols = (sal_uInt8)((SfxUInt16Item &)pArgs->Get(
SID_ATTR_TABLE_COLUMN)).GetValue();
- BYTE nRows = (BYTE)((SfxUInt16Item &)pArgs->Get(
+ sal_uInt8 nRows = (sal_uInt8)((SfxUInt16Item &)pArgs->Get(
SID_ATTR_TABLE_ROW)).GetValue();
aViewWin.CalcWish( nRows, nCols );
@@ -818,7 +818,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
bool bBookPreview = GetViewShell()->GetViewOptions()->IsPagePrevBookview();
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_SHOW_BOOKVIEW, FALSE, &pItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_SHOW_BOOKVIEW, sal_False, &pItem ) )
{
bBookPreview = static_cast< const SfxBoolItem* >( pItem )->GetValue();
( ( SwViewOption* ) GetViewShell()->GetViewOptions() )->SetPagePrevBookview( bBookPreview );
@@ -829,7 +829,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
// book preview mode changed. Thus, adjust scrollbars and
// invalidate corresponding states.
ScrollViewSzChg();
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, FN_SHOW_BOOKVIEW, 0
@@ -881,13 +881,13 @@ void SwPagePreView::Execute( SfxRequest &rReq )
if( pArgs )
{
enum SvxZoomType eType = SVX_ZOOM_PERCENT;
- USHORT nZoomFactor = USHRT_MAX;
- if(SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOM, TRUE, &pItem))
+ sal_uInt16 nZoomFactor = USHRT_MAX;
+ if(SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOM, sal_True, &pItem))
{
eType = ((const SvxZoomItem *)pItem)->GetType();
nZoomFactor = ((const SvxZoomItem *)pItem)->GetValue();
}
- else if(SFX_ITEM_SET == pArgs->GetItemState(FN_PREVIEW_ZOOM, TRUE, &pItem))
+ else if(SFX_ITEM_SET == pArgs->GetItemState(FN_PREVIEW_ZOOM, sal_True, &pItem))
nZoomFactor = ((const SfxUInt16Item *)pItem)->GetValue();
if(USHRT_MAX != nZoomFactor)
SetZoom(eType, nZoomFactor);
@@ -900,9 +900,9 @@ void SwPagePreView::Execute( SfxRequest &rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, TRUE, &pItem ) )
+ if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, sal_True, &pItem ) )
{
- const USHORT nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
+ const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
SetZoom( SVX_ZOOM_PERCENT, nCurrentZoom );
}
}
@@ -949,12 +949,12 @@ void SwPagePreView::Execute( SfxRequest &rReq )
{
aViewWin.SetSelectedPage( nNewSelectedPage );
aViewWin.SetSttPage( nNewStartPage );
- int nRet = ChgPage( SwPagePreViewWin::MV_SELPAGE, TRUE );
+ int nRet = ChgPage( SwPagePreViewWin::MV_SELPAGE, sal_True );
bRefresh = 0 != nRet;
}
GetViewShell()->ShowPreViewSelection( nNewSelectedPage );
// OD 24.03.2003 #108282# - invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_STAT_PAGE, 0
};
@@ -977,14 +977,14 @@ void SwPagePreView::Execute( SfxRequest &rReq )
case FN_START_OF_LINE:
case FN_START_OF_DOCUMENT:
aViewWin.SetSelectedPage( 1 );
- eMvMode = SwPagePreViewWin::MV_DOC_STT; bRetVal = TRUE; goto MOVEPAGE;
+ eMvMode = SwPagePreViewWin::MV_DOC_STT; bRetVal = sal_True; goto MOVEPAGE;
case FN_END_OF_LINE:
case FN_END_OF_DOCUMENT:
aViewWin.SetSelectedPage( mnPageCount );
- eMvMode = SwPagePreViewWin::MV_DOC_END; bRetVal = TRUE; goto MOVEPAGE;
+ eMvMode = SwPagePreViewWin::MV_DOC_END; bRetVal = sal_True; goto MOVEPAGE;
MOVEPAGE:
{
- int nRet = ChgPage( eMvMode, TRUE );
+ int nRet = ChgPage( eMvMode, sal_True );
// return value fuer Basic
if(bRetVal)
rReq.SetReturnValue(SfxBoolItem(rReq.GetSlot(), nRet == 0));
@@ -1000,14 +1000,14 @@ MOVEPAGE:
// die Sache mit der Orientation
if(pPPVPD)
{
- SfxPrinter* pPrinter = GetPrinter( TRUE );
+ SfxPrinter* pPrinter = GetPrinter( sal_True );
if((pPrinter->GetOrientation() == ORIENTATION_LANDSCAPE)
!= pPPVPD->GetLandscape())
pPrinter->SetOrientation(pPPVPD->GetLandscape() ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT);
}
- ::SetAppPrintOptions( aViewWin.GetViewShell(), FALSE );
- bNormalPrint = FALSE;
- USHORT nPrtSlot = SID_PRINTDOC;
+ ::SetAppPrintOptions( aViewWin.GetViewShell(), sal_False );
+ bNormalPrint = sal_False;
+ sal_uInt16 nPrtSlot = SID_PRINTDOC;
rReq.SetSlot( nPrtSlot );
SfxViewShell::ExecuteSlot( rReq, SfxViewShell::GetInterface() );
rReq.SetSlot( FN_PRINT_PAGEPREVIEW );
@@ -1015,8 +1015,8 @@ MOVEPAGE:
}
case SID_PRINTDOCDIRECT:
case SID_PRINTDOC:
- ::SetAppPrintOptions( aViewWin.GetViewShell(), FALSE );
- bNormalPrint = TRUE;
+ ::SetAppPrintOptions( aViewWin.GetViewShell(), sal_False );
+ bNormalPrint = sal_True;
SfxViewShell::ExecuteSlot( rReq, SfxViewShell::GetInterface() );
return;
case FN_CLOSE_PAGEPREVIEW:
@@ -1028,7 +1028,7 @@ MOVEPAGE:
break;
case FN_INSERT_BREAK:
{
- USHORT nSelPage = aViewWin.SelectedPage();
+ sal_uInt16 nSelPage = aViewWin.SelectedPage();
//if a dummy page is selected (e.g. a non-existing right/left page)
//the direct neighbor is used
if(GetViewShell()->IsDummyPage( nSelPage ) && GetViewShell()->IsDummyPage( --nSelPage ))
@@ -1056,13 +1056,13 @@ MOVEPAGE:
void SwPagePreView::GetState( SfxItemSet& rSet )
{
SfxWhichIter aIter(rSet);
- BYTE nRow = 1;
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt8 nRow = 1;
+ sal_uInt16 nWhich = aIter.FirstWhich();
ASSERT(nWhich, leeres Set);
SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout();
//#106746# zoom has to be disabled if Accessibility support is switched on
// MT 2010/01, see #110498#
- BOOL bZoomEnabled = TRUE; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();
+ sal_Bool bZoomEnabled = sal_True; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();
while(nWhich)
{
@@ -1130,7 +1130,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
if(bZoomEnabled)
{
const SwViewOption* pVOpt = GetViewShell()->GetViewOptions();
- const USHORT nCurrentZoom = pVOpt->GetZoom();
+ const sal_uInt16 nCurrentZoom = pVOpt->GetZoom();
SvxZoomSliderItem aZoomSliderItem( nCurrentZoom, MINZOOM, MAXZOOM );
aZoomSliderItem.AddSnappingPoint( 100 );
rSet.Put( aZoomSliderItem );
@@ -1166,7 +1166,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
break;
case FN_SHOW_BOOKVIEW:
{
- BOOL b = GetViewShell()->GetViewOptions()->IsPagePrevBookview();
+ sal_Bool b = GetViewShell()->GetViewOptions()->IsPagePrevBookview();
rSet.Put(SfxBoolItem(nWhich, b));
}
break;
@@ -1183,10 +1183,10 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
SfxItemSet aSet( *rSet.GetPool(), SID_PRINTDOC, SID_PRINTDOC );
GetSlotState( SID_PRINTDOC, SfxViewShell::GetInterface(), &aSet );
if( SFX_ITEM_DISABLED == aSet.GetItemState( SID_PRINTDOC,
- FALSE, &pItem ))
+ sal_False, &pItem ))
rSet.DisableItem( nWhich );
else if( SFX_ITEM_SET == aSet.GetItemState( SID_PRINTDOC,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
((SfxPoolItem*)pItem)->SetWhich( FN_PRINT_PAGEPREVIEW );
rSet.Put( *pItem );
@@ -1195,7 +1195,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
break;
case SID_PRINTPREVIEW:
- rSet.Put( SfxBoolItem( nWhich, TRUE ) );
+ rSet.Put( SfxBoolItem( nWhich, sal_True ) );
break;
case SID_PRINTDOC:
@@ -1215,7 +1215,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
void SwPagePreView::StateUndo(SfxItemSet& rSet)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -1232,45 +1232,45 @@ void SwPagePreView::StateUndo(SfxItemSet& rSet)
void SwPagePreView::Init(const SwViewOption * pPrefs)
{
if ( GetViewShell()->HasDrawView() )
- GetViewShell()->GetDrawView()->SetAnimationEnabled( FALSE );
+ GetViewShell()->GetDrawView()->SetAnimationEnabled( sal_False );
- bNormalPrint = TRUE;
+ bNormalPrint = sal_True;
// Die DocSize erfragen und verarbeiten. Ueber die Handler konnte
// die Shell nicht gefunden werden, weil die Shell innerhalb CTOR-Phase
// nicht in der SFX-Verwaltung bekannt ist.
if( !pPrefs )
- pPrefs = SW_MOD()->GetUsrPref(FALSE);
+ pPrefs = SW_MOD()->GetUsrPref(sal_False);
// die Felder aktualisieren
// ACHTUNG: hochcasten auf die EditShell, um die SS zu nutzen.
// In den Methoden wird auf die akt. Shell abgefragt!
SwEditShell* pESh = (SwEditShell*)GetViewShell();
- BOOL bIsModified = pESh->IsModified();
+ sal_Bool bIsModified = pESh->IsModified();
SwViewOption aOpt( *pPrefs );
- aOpt.SetPagePreview(TRUE);
- aOpt.SetTab( FALSE );
- aOpt.SetBlank( FALSE );
- aOpt.SetHardBlank( FALSE );
- aOpt.SetParagraph( FALSE );
- aOpt.SetLineBreak( FALSE );
- aOpt.SetPageBreak( FALSE );
- aOpt.SetColumnBreak( FALSE );
- aOpt.SetSoftHyph( FALSE );
- aOpt.SetFldName( FALSE );
- aOpt.SetPostIts( FALSE );
- aOpt.SetShowHiddenChar( FALSE );
- aOpt.SetShowHiddenField( FALSE );
- aOpt.SetShowHiddenPara( FALSE );
- aOpt.SetViewHRuler( FALSE );
- aOpt.SetViewVRuler( FALSE );
- aOpt.SetGraphic( TRUE );
- aOpt.SetTable( TRUE );
- aOpt.SetSnap( FALSE );
- aOpt.SetGridVisible( FALSE );
+ aOpt.SetPagePreview(sal_True);
+ aOpt.SetTab( sal_False );
+ aOpt.SetBlank( sal_False );
+ aOpt.SetHardBlank( sal_False );
+ aOpt.SetParagraph( sal_False );
+ aOpt.SetLineBreak( sal_False );
+ aOpt.SetPageBreak( sal_False );
+ aOpt.SetColumnBreak( sal_False );
+ aOpt.SetSoftHyph( sal_False );
+ aOpt.SetFldName( sal_False );
+ aOpt.SetPostIts( sal_False );
+ aOpt.SetShowHiddenChar( sal_False );
+ aOpt.SetShowHiddenField( sal_False );
+ aOpt.SetShowHiddenPara( sal_False );
+ aOpt.SetViewHRuler( sal_False );
+ aOpt.SetViewVRuler( sal_False );
+ aOpt.SetGraphic( sal_True );
+ aOpt.SetTable( sal_True );
+ aOpt.SetSnap( sal_False );
+ aOpt.SetGridVisible( sal_False );
GetViewShell()->ApplyViewOptions( aOpt );
GetViewShell()->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions());
@@ -1282,7 +1282,7 @@ void SwPagePreView::Init(const SwViewOption * pPrefs)
if( pIDSA->get(IDocumentSettingAccess::BROWSE_MODE))
{
pIDSA->set(IDocumentSettingAccess::BROWSE_MODE, false);
- pESh->CheckBrowseView( TRUE );
+ pESh->CheckBrowseView( sal_True );
}
GetViewShell()->CalcLayout();
@@ -1320,8 +1320,8 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
SetName(String::CreateFromAscii("PageView" ));
SetWindow( &aViewWin );
SetHelpId(SW_PAGEPREVIEW);
- _CreateScrollbar( TRUE );
- _CreateScrollbar( FALSE );
+ _CreateScrollbar( sal_True );
+ _CreateScrollbar( sal_False );
SfxObjectShell* pObjShell = pViewFrame->GetObjectShell();
if ( !pOldSh )
@@ -1344,15 +1344,15 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
{
pVS = ((SwView*)pOldSh)->GetWrtShellPtr();
// save the current ViewData of the previous SwView
- pOldSh->WriteUserData( sSwViewData, FALSE );
+ pOldSh->WriteUserData( sSwViewData, sal_False );
}
else
pVS = GetDocShell()->GetWrtShell();
if( pVS )
{
// setze die akt. Seite als die erste
- USHORT nPhysPg, nVirtPg;
- ((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, /*FALSE*/TRUE, FALSE );
+ sal_uInt16 nPhysPg, nVirtPg;
+ ((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, /*sal_False*/sal_True, sal_False );
if( 1 != aViewWin.GetCol() && 1 == nPhysPg )
--nPhysPg;
aViewWin.SetSttPage( nPhysPg );
@@ -1422,7 +1422,7 @@ SwDocShell* SwPagePreView::GetDocShell()
--------------------------------------------------------------------*/
-int SwPagePreView::_CreateScrollbar( BOOL bHori )
+int SwPagePreView::_CreateScrollbar( sal_Bool bHori )
{
Window *pMDI = &GetViewFrame()->GetWindow();
SwScrollbar** ppScrollbar = bHori ? &pHScrollbar : &pVScrollbar;
@@ -1446,7 +1446,7 @@ int SwPagePreView::_CreateScrollbar( BOOL bHori )
*ppScrollbar = new SwScrollbar( pMDI, bHori );
ScrollDocSzChg();
- (*ppScrollbar)->EnableDrag( TRUE );
+ (*ppScrollbar)->EnableDrag( sal_True );
(*ppScrollbar)->SetEndScrollHdl( LINK( this, SwPagePreView, EndScrollHdl ));
@@ -1503,7 +1503,7 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
{
ScrollViewSzChg();
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT,
FN_PAGEUP, FN_PAGEDOWN, 0
@@ -1525,14 +1525,14 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
// ab hier alles aus der SwView uebernommen
-void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
+void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ )
{
// const long nAdd = bInner ? 0 : ScrollBar::GetWindowOverlapPixel();
const StyleSettings &rSet = aViewWin.GetSettings().GetStyleSettings();
const long nTmp = rSet.GetScrollBarSize();// - nAdd;
- if ( pVScrollbar->IsVisible( FALSE ))
+ if ( pVScrollbar->IsVisible( sal_False ))
rToFill.Right() = nTmp;
- if ( pHScrollbar->IsVisible( FALSE ) )
+ if ( pHScrollbar->IsVisible( sal_False ) )
rToFill.Bottom() = nTmp;
SetBorderPixel( rToFill );
}
@@ -1545,12 +1545,12 @@ void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
void SwPagePreView::InnerResizePixel( const Point &rOfst, const Size &rSize )
{
SvBorder aBorder;
- CalcAndSetBorderPixel( aBorder, TRUE );
+ CalcAndSetBorderPixel( aBorder, sal_True );
Rectangle aRect( rOfst, rSize );
aRect += aBorder;
ViewResizePixel( aViewWin, aRect.TopLeft(), aRect.GetSize(),
aViewWin.GetOutputSizePixel(),
- TRUE,
+ sal_True,
*pVScrollbar, *pHScrollbar, pPageUpBtn, pPageDownBtn, 0,
*pScrollFill );
@@ -1566,9 +1566,9 @@ void SwPagePreView::InnerResizePixel( const Point &rOfst, const Size &rSize )
void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize )
{
SvBorder aBorder;
- CalcAndSetBorderPixel( aBorder, FALSE );
+ CalcAndSetBorderPixel( aBorder, sal_False );
ViewResizePixel( aViewWin, rOfst, rSize, aViewWin.GetOutputSizePixel(),
- FALSE, *pVScrollbar,
+ sal_False, *pVScrollbar,
*pHScrollbar, pPageUpBtn, pPageDownBtn, 0, *pScrollFill );
//EditWin niemals einstellen!
@@ -1591,7 +1591,7 @@ void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize )
--------------------------------------------------------------------*/
-void SwPagePreView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
+void SwPagePreView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollbar )
{
const Point aTopLeft(AlignToPixel(rRect.TopLeft()));
const Point aBottomRight(AlignToPixel(rRect.BottomRight()));
@@ -1656,7 +1656,7 @@ IMPL_LINK( SwPagePreView, ScrollHdl, SwScrollbar *, pScrollbar )
{
// wieviele Seiten scrollen ??
String sStateStr(sPageStr);
- USHORT nThmbPos = (USHORT)pScrollbar->GetThumbPos();
+ sal_uInt16 nThmbPos = (sal_uInt16)pScrollbar->GetThumbPos();
if( 1 == aViewWin.GetCol() || !nThmbPos )
++nThmbPos;
sStateStr += String::CreateFromInt32( nThmbPos );
@@ -1699,7 +1699,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
if ( GetViewShell()->PagePreviewLayout()->DoesPreviewLayoutRowsFitIntoWindow() )
{
// wieviele Seiten scrollen ??
- USHORT nThmbPos = (USHORT)pScrollbar->GetThumbPos();
+ sal_uInt16 nThmbPos = (sal_uInt16)pScrollbar->GetThumbPos();
// OD 05.12.2002 #103492# - adjust to new preview functionality
if( nThmbPos != aViewWin.SelectedPage() )
{
@@ -1720,7 +1720,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
{
aViewWin.SetSttPage( nThmbPos );
aViewWin.SetSelectedPage( nThmbPos );
- ChgPage( SwPagePreViewWin::MV_SCROLL, FALSE );
+ ChgPage( SwPagePreViewWin::MV_SCROLL, sal_False );
// OD 20.01.2003 #103492# - update scrollbars
ScrollViewSzChg();
}
@@ -1760,7 +1760,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
aViewWin.Scroll(nThmbPos - aViewWin.GetPaintedPreviewDocRect().Left(), 0);
}
// OD 24.03.2003 #108282# - additional invalidate page status.
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -1803,7 +1803,7 @@ void SwPagePreView::DocSzChgd( const Size &rSz )
if( aVisArea.GetWidth() )
{
- ChgPage( SwPagePreViewWin::MV_CALC, TRUE );
+ ChgPage( SwPagePreViewWin::MV_CALC, sal_True );
ScrollDocSzChg();
aViewWin.Invalidate();
@@ -1826,7 +1826,7 @@ void SwPagePreView::ScrollViewSzChg()
{
//vertical scrolling by row
// OD 04.12.2002 #103492# - adjust to new preview functionality
- USHORT nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
+ sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
pVScrollbar->SetVisibleSize( nVisPages );
// OD 19.02.2003 #107369# - set selected page as scroll bar position,
// if it is visible.
@@ -1904,7 +1904,7 @@ void SwPagePreView::ScrollDocSzChg()
// alles zum Thema Drucken
-SfxPrinter* SwPagePreView::GetPrinter( BOOL bCreate )
+SfxPrinter* SwPagePreView::GetPrinter( sal_Bool bCreate )
{
return aViewWin.GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate );
}
@@ -1914,7 +1914,7 @@ SfxPrinter* SwPagePreView::GetPrinter( BOOL bCreate )
--------------------------------------------------------------------*/
-USHORT SwPagePreView::SetPrinter( SfxPrinter *pNew, USHORT nDiffFlags, bool )
+sal_uInt16 SwPagePreView::SetPrinter( SfxPrinter *pNew, sal_uInt16 nDiffFlags, bool )
{
ViewShell &rSh = *GetViewShell();
SfxPrinter* pOld = rSh.getIDocumentDeviceAccess()->getPrinter( false );
@@ -1929,15 +1929,15 @@ USHORT SwPagePreView::SetPrinter( SfxPrinter *pNew, USHORT nDiffFlags, bool )
rESh.SetModified();
}
if ( ( nDiffFlags & SFX_PRINTER_OPTIONS ) == SFX_PRINTER_OPTIONS )
- ::SetPrinter( rSh.getIDocumentDeviceAccess(), pNew, FALSE );
+ ::SetPrinter( rSh.getIDocumentDeviceAccess(), pNew, sal_False );
- const BOOL bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? TRUE : FALSE;
- const BOOL bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? TRUE : FALSE;
+ const sal_Bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? sal_True : sal_False;
+ const sal_Bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? sal_True : sal_False;
if ( bChgOri || bChgSize )
{
rESh.StartAllAction();
if ( bChgOri )
- rSh.ChgAllPageOrientation( USHORT(pNew->GetOrientation()) );
+ rSh.ChgAllPageOrientation( sal_uInt16(pNew->GetOrientation()) );
if ( bChgSize )
{
Size aSz( SvxPaperInfo::GetPaperSize( pNew ) );
@@ -1948,14 +1948,14 @@ USHORT SwPagePreView::SetPrinter( SfxPrinter *pNew, USHORT nDiffFlags, bool )
rESh.SetModified();
rESh.EndAllAction();
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_LONG_ULSPACE, SID_ATTR_LONG_LRSPACE,
SID_RULER_BORDERS, SID_RULER_PAGE_POS, 0
};
#ifdef DBG_UTIL
{
- const USHORT* pPtr = aInval + 1;
+ const sal_uInt16* pPtr = aInval + 1;
do {
ASSERT( *(pPtr - 1) < *pPtr, "falsche Sortierung!" );
} while( *++pPtr );
@@ -2000,8 +2000,8 @@ Size SwPagePreView::GetOptimalSizePixel() const
Size aMaxSize( aRect.GetWidth(), aRect.GetHeight() );
Size aInSize = rWin.GetOutputSizePixel();
Size aOutSize = rWin.GetSizePixel();
- USHORT nXBorder = USHORT(aOutSize.Width() - aInSize.Width());
- USHORT nYBorder = USHORT(aOutSize.Height() - aInSize.Height());
+ sal_uInt16 nXBorder = sal_uInt16(aOutSize.Width() - aInSize.Width());
+ sal_uInt16 nYBorder = sal_uInt16(aOutSize.Height() - aInSize.Height());
aMaxSize.Width() -= nXBorder;
//'auf Verdacht' etwas vom Border abziehen (Menue)
nYBorder -= (nYBorder - nXBorder) / 2;
@@ -2086,7 +2086,7 @@ void SwPagePreViewWin::AdjustPreviewToNewZoom( const sal_uInt16 _nZoomFactor,
* when less than the desired number of rows fits into
* the view
* --------------------------------------------------*/
-void SwPagePreViewWin::Scroll(long nXMove, long nYMove, USHORT /*nFlags*/)
+void SwPagePreViewWin::Scroll(long nXMove, long nYMove, sal_uInt16 /*nFlags*/)
{
maPaintedPreviewDocRect.Move(nXMove, nYMove);
mpPgPrevwLayout->Prepare( 0, maPaintedPreviewDocRect.TopLeft(),
@@ -2095,16 +2095,16 @@ void SwPagePreViewWin::Scroll(long nXMove, long nYMove, USHORT /*nFlags*/)
}
-BOOL SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
+sal_Bool SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
const CommandWheelData* pWData = rCEvt.GetWheelData();
if( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() )
{
if(!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport())
{
- USHORT nFactor = GetViewShell()->GetViewOptions()->GetZoom();
- const USHORT nOffset = 10;
+ sal_uInt16 nFactor = GetViewShell()->GetViewOptions()->GetZoom();
+ const sal_uInt16 nOffset = 10;
if( 0L > pWData->GetDelta() )
{
nFactor -= nOffset;
@@ -2119,7 +2119,7 @@ BOOL SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
}
SetZoom(SVX_ZOOM_PERCENT, nFactor);
}
- bOk = TRUE;
+ bOk = sal_True;
}
else
bOk = aViewWin.HandleScrollCommand( rCEvt, pHScrollbar, pVScrollbar );
@@ -2165,7 +2165,7 @@ void SwPagePreView::ShowVScrollbar(sal_Bool bShow)
/* -----------------25.11.2002 16:36-----------------
*
* --------------------------------------------------*/
-void SwPagePreView::SetZoom(SvxZoomType eType, USHORT nFactor)
+void SwPagePreView::SetZoom(SvxZoomType eType, sal_uInt16 nFactor)
{
ViewShell& rSh = *GetViewShell();
SwViewOption aOpt(*rSh.GetViewOptions());
diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx
index c8ecc2d92607..22109be8a039 100644
--- a/sw/source/ui/uiview/scroll.cxx
+++ b/sw/source/ui/uiview/scroll.cxx
@@ -37,18 +37,18 @@
#define SCROLL_LINE_SIZE 250
-SwScrollbar::SwScrollbar( Window *pWin, BOOL bHoriz ) :
+SwScrollbar::SwScrollbar( Window *pWin, sal_Bool bHoriz ) :
ScrollBar( pWin,
WinBits( WB_3DLOOK | WB_HIDE | ( bHoriz ? WB_HSCROLL : WB_VSCROLL) ) ),
bHori( bHoriz ),
- bAuto( FALSE ),
- bThumbEnabled( TRUE ),
- bVisible(FALSE),
- bSizeSet(FALSE)
+ bAuto( sal_False ),
+ bThumbEnabled( sal_True ),
+ bVisible(sal_False),
+ bSizeSet(sal_False)
{
// SSA: --- RTL --- no mirroring for horizontal scrollbars
if( bHoriz )
- EnableRTL( FALSE );
+ EnableRTL( sal_False );
}
@@ -63,7 +63,7 @@ void SwScrollbar::DocSzChgd( const Size &rSize )
{
aDocSz = rSize;
SetRange( Range( 0, bHori ? rSize.Width() : rSize.Height()) );
- const ULONG nVisSize = GetVisibleSize();
+ const sal_uLong nVisSize = GetVisibleSize();
SetLineSize( SCROLL_LINE_SIZE );
// SetLineSize( nVisSize * 10 / 100 );
SetPageSize( nVisSize * 77 / 100 );
@@ -100,7 +100,7 @@ void SwScrollbar::ViewPortChgd( const Rectangle &rRect )
/*-----------------10/21/97 02:48pm-----------------
--------------------------------------------------*/
-void SwScrollbar::ExtendedShow( BOOL bSet )
+void SwScrollbar::ExtendedShow( sal_Bool bSet )
{
bVisible = bSet;
if( (!bSet || !bAuto) && IsUpdateMode() && bSizeSet)
@@ -113,7 +113,7 @@ void SwScrollbar::ExtendedShow( BOOL bSet )
void SwScrollbar::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
{
ScrollBar::SetPosSizePixel(rNewPos, rNewSize);
- bSizeSet = TRUE;
+ bSizeSet = sal_True;
if(bVisible)
ExtendedShow();
@@ -123,7 +123,7 @@ void SwScrollbar::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
/*-----------------14.04.98 11:38-------------------
--------------------------------------------------*/
-void SwScrollbar::SetAuto(BOOL bSet)
+void SwScrollbar::SetAuto(sal_Bool bSet)
{
if(bAuto != bSet)
{
@@ -131,7 +131,7 @@ void SwScrollbar::SetAuto(BOOL bSet)
// automatisch versteckt - dann anzeigen
if(!bAuto && bVisible && !ScrollBar::IsVisible())
- ExtendedShow(TRUE);
+ ExtendedShow(sal_True);
else if(bAuto)
AutoShow(); // oder automatisch verstecken
}
@@ -147,14 +147,14 @@ void SwScrollbar::AutoShow()
if( nVis >= nLen - 1)
{
if(ScrollBar::IsVisible())
- ScrollBar::Show(FALSE);
+ ScrollBar::Show(sal_False);
}
else if ( !ScrollBar::IsVisible() &&
(!bHori || nVis) ) //Optimierung fuer Browser.
//Horizontaler Scrollbar per
//default aus.
{
- ScrollBar::Show(TRUE);
+ ScrollBar::Show(sal_True);
}
}
}
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index 1f223350ed70..e94b1952707f 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -90,10 +90,6 @@
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <sfx2/filedlghelper.hxx>
#define SwSrcView
-#define SearchSettings
-#define _ExecSearch Execute
-#define _StateSearch GetState
-#include <svx/svxslots.hxx>
#include "swslots.hxx"
#include <unomid.h>
@@ -146,7 +142,7 @@ TYPEINIT1(SwSrcView, SfxViewShell)
--------------------------------------------------*/
-void lcl_PrintHeader( OutputDevice &rOutDev, USHORT nPages, USHORT nCurPage, const String& rTitle )
+void lcl_PrintHeader( OutputDevice &rOutDev, sal_uInt16 nPages, sal_uInt16 nCurPage, const String& rTitle )
{
short nLeftMargin = LMARGPRN;
Size aSz = rOutDev.GetOutputSize();
@@ -222,8 +218,8 @@ void lcl_ConvertTabsToSpaces( String& rLine )
{
if ( rLine.Len() )
{
- USHORT nPos = 0;
- USHORT nMax = rLine.Len();
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nMax = rLine.Len();
while ( nPos < nMax )
{
if ( rLine.GetChar(nPos) == '\t' )
@@ -249,7 +245,7 @@ SwSrcView::SwSrcView(SfxViewFrame* pViewFrame, SfxViewShell*) :
SfxViewShell( pViewFrame, SWSRCVIEWFLAGS ),
aEditWin( &pViewFrame->GetWindow(), this ),
pSearchItem(0),
- bSourceSaved(FALSE),
+ bSourceSaved(sal_False),
eLoadEncoding(RTL_TEXTENCODING_DONTKNOW)
{
Init();
@@ -265,7 +261,7 @@ SwSrcView::~SwSrcView()
SwDocShell* pDocShell = GetDocShell();
DBG_ASSERT(PTR_CAST(SwWebDocShell, pDocShell), "Wieso keine WebDocShell?");
const TextSelection& rSel = aEditWin.GetTextView()->GetSelection();
- ((SwWebDocShell*)pDocShell)->SetSourcePara( static_cast< USHORT >( rSel.GetStart().GetPara() ) );
+ ((SwWebDocShell*)pDocShell)->SetSourcePara( static_cast< sal_uInt16 >( rSel.GetStart().GetPara() ) );
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
pDocShell->GetModel(), uno::UNO_QUERY_THROW);
@@ -307,11 +303,11 @@ void SwSrcView::Init()
Load(pDocShell);
else
{
- aEditWin.SetReadonly(TRUE);
+ aEditWin.SetReadonly(sal_True);
}
// StartListening(*GetViewFrame());
- StartListening(*pDocShell,TRUE);
+ StartListening(*pDocShell,sal_True);
}
/*--------------------------------------------------------------------
@@ -331,7 +327,7 @@ SwDocShell* SwSrcView::GetDocShell()
void SwSrcView::SaveContent(const String& rTmpFile)
{
- SfxMedium aMedium( rTmpFile, STREAM_WRITE, TRUE);
+ SfxMedium aMedium( rTmpFile, STREAM_WRITE, sal_True);
SvStream* pOutStream = aMedium.GetOutStream();
pOutStream->SetStreamCharSet( lcl_GetStreamCharSet(eLoadEncoding) );
aEditWin.Write(*pOutStream);//, EE_FORMAT_TEXT);
@@ -345,7 +341,7 @@ void SwSrcView::SaveContent(const String& rTmpFile)
void SwSrcView::Execute(SfxRequest& rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
TextView* pTextView = aEditWin.GetTextView();
switch( nSlot )
{
@@ -385,7 +381,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
{
SfxMedium aMedium( xFP->getFiles().getConstArray()[0],
STREAM_WRITE | STREAM_SHARE_DENYNONE,
- FALSE );
+ sal_False );
SvStream* pOutStream = aMedium.GetOutStream();
pOutStream->SetStreamCharSet(lcl_GetStreamCharSet(eLoadEncoding));
aEditWin.Write( *pOutStream );
@@ -424,11 +420,11 @@ void SwSrcView::Execute(SfxRequest& rReq)
{
const SfxItemSet* pTmpArgs = rReq.GetArgs();
- USHORT nWhich = pTmpArgs->GetWhichByPos( 0 );
+ sal_uInt16 nWhich = pTmpArgs->GetWhichByPos( 0 );
DBG_ASSERT( nWhich, "Wich fuer SearchItem ?" );
const SfxPoolItem& rItem = pTmpArgs->Get( nWhich );
SetSearchItem( (const SvxSearchItem&)rItem);
- StartSearchAndReplace( (const SvxSearchItem&)rItem, FALSE, rReq.IsAPI() );
+ StartSearchAndReplace( (const SvxSearchItem&)rItem, sal_False, rReq.IsAPI() );
if(aEditWin.IsModified())
GetDocShell()->GetDoc()->SetModified();
}
@@ -438,7 +434,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
SvxSearchItem* pSrchItem = GetSearchItem();
if(pSrchItem)
{
- StartSearchAndReplace( *pSrchItem, FALSE, rReq.IsAPI() );
+ StartSearchAndReplace( *pSrchItem, sal_False, rReq.IsAPI() );
if(aEditWin.IsModified())
GetDocShell()->GetDoc()->SetModified();
}
@@ -452,11 +448,11 @@ void SwSrcView::Execute(SfxRequest& rReq)
break;
case SID_UNDO:
pTextView->Undo();
- GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ GetViewFrame()->GetBindings().InvalidateAll(sal_False);
break;
case SID_REDO:
pTextView->Redo();
- GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ GetViewFrame()->GetBindings().InvalidateAll(sal_False);
break;
case SID_REPEAT:
break;
@@ -486,7 +482,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
void SwSrcView::GetState(SfxItemSet& rSet)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
TextView* pTextView = aEditWin.GetTextView();
while(nWhich)
@@ -520,7 +516,7 @@ void SwSrcView::GetState(SfxItemSet& rSet)
break;
case SID_SEARCH_OPTIONS:
{
- USHORT nOpt = SRC_SEARCHOPTIONS;
+ sal_uInt16 nOpt = SRC_SEARCHOPTIONS;
if(GetDocShell()->IsReadOnly())
nOpt &= ~(SEARCH_OPTIONS_REPLACE|SEARCH_OPTIONS_REPLACE_ALL);
@@ -554,7 +550,7 @@ void SwSrcView::GetState(SfxItemSet& rSet)
case SID_REDO:
{
::svl::IUndoManager& rMgr = pTextView->GetTextEngine()->GetUndoManager();
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
if(nWhich == SID_UNDO)
{
nCount = rMgr.GetUndoActionCount();
@@ -601,7 +597,7 @@ void SwSrcView::GetState(SfxItemSet& rSet)
TransferableDataHelper aDataHelper(
TransferableDataHelper::CreateFromSystemClipboard(
&aEditWin) );
- BOOL bDisable = !aDataHelper.GetXTransferable().is() ||
+ sal_Bool bDisable = !aDataHelper.GetXTransferable().is() ||
0 == aDataHelper.GetFormatCount();
if( bDisable )
rSet.DisableItem(nWhich);
@@ -642,20 +638,20 @@ void SwSrcView::SetSearchItem( const SvxSearchItem& rItem )
--------------------------------------------------------------------*/
-USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
- BOOL bFromStart,
- BOOL bApi,
- BOOL bRecursive)
+sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
+ sal_Bool bFromStart,
+ sal_Bool bApi,
+ sal_Bool bRecursive)
{
ExtTextView* pTextView = aEditWin.GetTextView();
TextSelection aSel;
TextPaM aPaM;
- BOOL bForward = !rSearchItem.GetBackward();
- BOOL bAtStart = pTextView->GetSelection() == TextSelection( aPaM, aPaM );
+ sal_Bool bForward = !rSearchItem.GetBackward();
+ sal_Bool bAtStart = pTextView->GetSelection() == TextSelection( aPaM, aPaM );
if( !bForward )
- aPaM = TextPaM( (ULONG)-1, (USHORT)-1 );
+ aPaM = TextPaM( (sal_uLong)-1, (sal_uInt16)-1 );
if( bFromStart )
{
@@ -667,8 +663,8 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
aSearchOpt.Locale = SvxCreateLocale(
static_cast< LanguageType >( GetAppLanguage() ) );
- USHORT nFound;
- BOOL bAll = FALSE;
+ sal_uInt16 nFound;
+ sal_Bool bAll = sal_False;
switch( rSearchItem.GetCommand() )
{
case SVX_SEARCHCMD_FIND:
@@ -676,7 +672,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
nFound = pTextView->Search( aSearchOpt, bForward );
break;
- case SVX_SEARCHCMD_REPLACE_ALL: bAll = TRUE;
+ case SVX_SEARCHCMD_REPLACE_ALL: bAll = sal_True;
case SVX_SEARCHCMD_REPLACE:
nFound = pTextView->Replace( aSearchOpt, bAll, bForward );
break;
@@ -687,7 +683,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
if( !nFound )
{
- BOOL bNotFoundMessage = FALSE;
+ sal_Bool bNotFoundMessage = sal_False;
if(!bRecursive)
{
if(!bFromStart)
@@ -696,13 +692,13 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
}
else
{
- bNotFoundMessage = TRUE;
+ bNotFoundMessage = sal_True;
pTextView->SetSelection( aSel );
}
}
else if(bAtStart)
{
- bNotFoundMessage = TRUE;
+ bNotFoundMessage = sal_True;
}
@@ -717,7 +713,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
: MSG_SEARCH_START)).Execute())
{
pTextView->SetSelection( TextSelection( aPaM, aPaM ) );
- StartSearchAndReplace( rSearchItem, FALSE, FALSE, TRUE );
+ StartSearchAndReplace( rSearchItem, sal_False, sal_False, sal_True );
}
}
}
@@ -728,7 +724,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
Beschreibung:
--------------------------------------------------------------------*/
-USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
+sal_uInt16 SwSrcView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool )
{
SwDocShell* pDocSh = GetDocShell();
if ( (SFX_PRINTER_JOBSETUP | SFX_PRINTER_PRINTER) & nDiffFlags )
@@ -738,10 +734,10 @@ USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
pDocSh->SetModified();
}
if ( nDiffFlags & SFX_PRINTER_OPTIONS )
- ::SetPrinter( pDocSh->getIDocumentDeviceAccess(), pNew, TRUE );
+ ::SetPrinter( pDocSh->getIDocumentDeviceAccess(), pNew, sal_True );
- const BOOL bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? TRUE : FALSE;
- const BOOL bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? TRUE : FALSE;
+ const sal_Bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? sal_True : sal_False;
+ const sal_Bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? sal_True : sal_False;
if ( bChgOri || bChgSize )
{
pDocSh->SetModified();
@@ -753,7 +749,7 @@ USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
Beschreibung:
--------------------------------------------------------------------*/
-SfxPrinter* SwSrcView::GetPrinter( BOOL bCreate )
+SfxPrinter* SwSrcView::GetPrinter( sal_Bool bCreate )
{
return GetDocShell()->GetDoc()->getPrinter( bCreate );
}
@@ -787,32 +783,32 @@ sal_Int32 SwSrcView::PrintSource(
String aTitle( GetViewFrame()->GetWindow().GetText() );
- USHORT nLineHeight = (USHORT) pOutDev->GetTextHeight(); // etwas mehr.
- USHORT nParaSpace = 10;
+ sal_uInt16 nLineHeight = (sal_uInt16) pOutDev->GetTextHeight(); // etwas mehr.
+ sal_uInt16 nParaSpace = 10;
Size aPaperSz = pOutDev->GetOutputSize();
aPaperSz.Width() -= (LMARGPRN + RMARGPRN);
aPaperSz.Height() -= (TMARGPRN + BMARGPRN);
// nLinepPage stimmt nicht, wenn Zeilen umgebrochen werden muessen...
- USHORT nLinespPage = (USHORT) (aPaperSz.Height() / nLineHeight);
- USHORT nCharspLine = (USHORT) (aPaperSz.Width() / pOutDev->GetTextWidth( 'X' ));
- USHORT nParas = static_cast< USHORT >( pTextEngine->GetParagraphCount() );
+ sal_uInt16 nLinespPage = (sal_uInt16) (aPaperSz.Height() / nLineHeight);
+ sal_uInt16 nCharspLine = (sal_uInt16) (aPaperSz.Width() / pOutDev->GetTextWidth( 'X' ));
+ sal_uInt16 nParas = static_cast< sal_uInt16 >( pTextEngine->GetParagraphCount() );
- USHORT nPages = (USHORT) (nParas / nLinespPage + 1 );
- USHORT nCurPage = 1;
+ sal_uInt16 nPages = (sal_uInt16) (nParas / nLinespPage + 1 );
+ sal_uInt16 nCurPage = 1;
// Header drucken...
if (!bCalcNumPagesOnly && nPage == nCurPage)
lcl_PrintHeader( *pOutDev, nPages, nCurPage, aTitle );
const Point aStartPos( LMARGPRN, TMARGPRN );
Point aPos( aStartPos );
- for ( USHORT nPara = 0; nPara < nParas; ++nPara )
+ for ( sal_uInt16 nPara = 0; nPara < nParas; ++nPara )
{
String aLine( pTextEngine->GetText( nPara ) );
lcl_ConvertTabsToSpaces( aLine );
- USHORT nLines = aLine.Len() / nCharspLine + 1;
- for ( USHORT nLine = 0; nLine < nLines; ++nLine )
+ sal_uInt16 nLines = aLine.Len() / nCharspLine + 1;
+ for ( sal_uInt16 nLine = 0; nLine < nLines; ++nLine )
{
String aTmpLine( aLine, nLine * nCharspLine, nCharspLine );
aPos.Y() += nLineHeight;
@@ -855,7 +851,7 @@ void SwSrcView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
// Broadcast kommt nur einmal!
const SwDocShell* pDocSh = GetDocShell();
- const BOOL bReadonly = pDocSh->IsReadOnly();
+ const sal_Bool bReadonly = pDocSh->IsReadOnly();
aEditWin.SetReadonly(bReadonly);
}
SfxViewShell::Notify(rBC, rHint);
@@ -876,8 +872,8 @@ void SwSrcView::Load(SwDocShell* pDocShell)
SfxMedium* pMedium = pDocShell->GetMedium();
const SfxFilter* pFilter = pMedium->GetFilter();
- BOOL bHtml = pFilter && pFilter->GetUserData().EqualsAscii("HTML");
- BOOL bDocModified = pDocShell->IsModified();
+ sal_Bool bHtml = pFilter && pFilter->GetUserData().EqualsAscii("HTML");
+ sal_Bool bDocModified = pDocShell->IsModified();
if(bHtml && !bDocModified && pDocShell->HasName())
{
SvStream* pStream = pMedium->GetInStream();
@@ -901,9 +897,9 @@ void SwSrcView::Load(SwDocShell* pDocShell)
pStream->SetStreamCharSet( eDestEnc );
pStream->Seek(0);
TextEngine* pTextEngine = aEditWin.GetTextEngine();
- pTextEngine->EnableUndo(FALSE);
+ pTextEngine->EnableUndo(sal_False);
aEditWin.Read(*pStream);//, EE_FORMAT_TEXT);
- pTextEngine->EnableUndo(TRUE);
+ pTextEngine->EnableUndo(sal_True);
}
else
{
@@ -919,18 +915,18 @@ void SwSrcView::Load(SwDocShell* pDocShell)
SvtSaveOptions aOpt;
{
- SfxMedium aMedium( sFileURL,STREAM_READWRITE, TRUE );
+ SfxMedium aMedium( sFileURL,STREAM_READWRITE, sal_True );
SwWriter aWriter( aMedium, *pDocShell->GetDoc() );
WriterRef xWriter;
::GetHTMLWriter(aEmptyStr, aMedium.GetBaseURL( true ), xWriter);
String sWriteName = pDocShell->HasName() ?
pMedium->GetName() :
(const String&) sFileURL;
- ULONG nRes = aWriter.Write(xWriter, &sWriteName);
+ sal_uLong nRes = aWriter.Write(xWriter, &sWriteName);
if(nRes)
{
ErrorHandler::HandleError(ErrCode(nRes));
- aEditWin.SetReadonly(TRUE);
+ aEditWin.SetReadonly(sal_True);
}
aMedium.Commit();
SvStream* pInStream = aMedium.GetInStream();
@@ -948,9 +944,9 @@ void SwSrcView::Load(SwDocShell* pDocShell)
if(bDocModified)
pDocShell->SetModified();// das Flag wird zwischendurch zurueckgesetzt
// AutoLoad abschalten
- pDocShell->SetAutoLoad(INetURLObject(), 0, FALSE);
+ pDocShell->SetAutoLoad(INetURLObject(), 0, sal_False);
DBG_ASSERT(PTR_CAST(SwWebDocShell, pDocShell), "Wieso keine WebDocShell?");
- USHORT nLine = ((SwWebDocShell*)pDocShell)->GetSourcePara();
+ sal_uInt16 nLine = ((SwWebDocShell*)pDocShell)->GetSourcePara();
aEditWin.SetStartLine(nLine);
aEditWin.GetTextEngine()->ResetUndo();
aEditWin.GetOutWin()->GrabFocus();
diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx
index 4265f3cf8cd0..eca1b71052fc 100644
--- a/sw/source/ui/uiview/swcli.cxx
+++ b/sw/source/ui/uiview/swcli.cxx
@@ -44,7 +44,7 @@
using namespace com::sun::star;
SwOleClient::SwOleClient( SwView *pView, SwEditWin *pWin, const svt::EmbeddedObjectRef& xObj ) :
- SfxInPlaceClient( pView, pWin, xObj.GetViewAspect() ), bInDoVerb( FALSE ),
+ SfxInPlaceClient( pView, pWin, xObj.GetViewAspect() ), bInDoVerb( sal_False ),
bOldCheckForOLEInCaption( pView->GetWrtShell().IsCheckForOLEInCaption() )
{
SetObject( xObj.GetObject() );
@@ -158,11 +158,11 @@ void SwOleClient::ViewChanged()
aVisSize.Height()= Fraction( aVisSize.Height() ) * GetScaleHeight();
SwRect aRect( Point( LONG_MIN, LONG_MIN ), aVisSize );
- rSh.LockView( TRUE ); //Scrollen im EndAction verhindern
+ rSh.LockView( sal_True ); //Scrollen im EndAction verhindern
rSh.StartAllAction();
rSh.RequestObjectResize( aRect, GetObject() );
rSh.EndAllAction();
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
}
void SwOleClient::MakeVisible()
diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx
index 73ec9ab71dd4..7050b8284d18 100644
--- a/sw/source/ui/uiview/uivwimp.cxx
+++ b/sw/source/ui/uiview/uivwimp.cxx
@@ -105,7 +105,7 @@ SwView_Impl::~SwView_Impl()
pScanEvtLstnr->ViewDestroyed();
if( xClipEvtLstnr.is() )
{
- pClipEvtLstnr->AddRemoveListener( FALSE );
+ pClipEvtLstnr->AddRemoveListener( sal_False );
pClipEvtLstnr->ViewDestroyed();
}
delete pConfigItem;
@@ -141,12 +141,12 @@ SwXTextView* SwView_Impl::GetUNOObject_Impl()
---------------------------------------------------------------------------*/
void SwView_Impl::ExecuteScan( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case SID_TWAIN_SELECT:
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
Reference< XScannerManager > xScanMgr = SW_MOD()->GetScannerManager();
if( xScanMgr.is() )
@@ -180,7 +180,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
case SID_TWAIN_TRANSFER:
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
Reference< XScannerManager > xScanMgr = SW_MOD()->GetScannerManager();
if( xScanMgr.is() )
@@ -193,7 +193,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
{
Reference< XEventListener > xLstner = &rListener;
xScanMgr->startScan( aContexts.getConstArray()[ 0 ], xLstner );
- bDone = TRUE;
+ bDone = sal_True;
}
}
catch(...)
@@ -234,7 +234,7 @@ void SwView_Impl::AddClipboardListener()
if(!xClipEvtLstnr.is())
{
xClipEvtLstnr = pClipEvtLstnr = new SwClipboardChangeListener( *pView );
- pClipEvtLstnr->AddRemoveListener( TRUE );
+ pClipEvtLstnr->AddRemoveListener( sal_True );
}
}
/* -----------------3/31/2003 11:42AM----------------
@@ -337,7 +337,7 @@ void SAL_CALL SwClipboardChangeListener::changedContents( const CLIP_NMSPC::Clip
}
}
-void SwClipboardChangeListener::AddRemoveListener( BOOL bAdd )
+void SwClipboardChangeListener::AddRemoveListener( sal_Bool bAdd )
{
pView->AddRemoveClipboardListener( Reference< XClipboardListener >( this ), bAdd );
}
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 2c4a556f6bca..e9e3bc34dc31 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -289,7 +289,7 @@ void SwView::SelectShell()
rDispatcher.Flush(); // alle gecachten Shells wirklich loeschen
//Zur alten Selektion merken welche Toolbar sichtbar war
- USHORT nId = static_cast< USHORT >( rDispatcher.GetObjectBarId( SFX_OBJECTBAR_OBJECT ));
+ sal_uInt16 nId = static_cast< sal_uInt16 >( rDispatcher.GetObjectBarId( SFX_OBJECTBAR_OBJECT ));
if ( nId )
pBarCfg->SetTopToolbar( nSelectionType, nId );
@@ -315,7 +315,7 @@ void SwView::SelectShell()
}
}
- BOOL bInitFormShell = sal_False;
+ sal_Bool bInitFormShell = sal_False;
if (!pFormShell)
{
bInitFormShell = sal_True;
@@ -324,7 +324,7 @@ void SwView::SelectShell()
StartListening(*pFormShell);
}
- BOOL bSetExtInpCntxt = sal_False;
+ sal_Bool bSetExtInpCntxt = sal_False;
nSelectionType = nNewSelectionType;
ShellModes eShellMode;
@@ -542,7 +542,7 @@ IMPL_LINK( SwView, AttrChangedNotify, SwWrtShell *, EMPTYARG )
// actual cursor position is a post-it field
// SwRect aFldRect;
// SwContentAtPos aCntntAtPos( SwContentAtPos::SW_FIELD);
-// if( pWrtShell->GetContentAtPos( pWrtShell->GetCrsrDocPos(), aCntntAtPos, FALSE, &aFldRect ) )
+// if( pWrtShell->GetContentAtPos( pWrtShell->GetCrsrDocPos(), aCntntAtPos, sal_False, &aFldRect ) )
// {
// const SwField* pFld = aCntntAtPos.aFnd.pFld;
// if (pFld->Which()== RES_POSTITFLD)
@@ -582,8 +582,8 @@ IMPL_LINK( SwView, TimeoutHdl, Timer *, EMPTYARG )
_CheckReadonlyState();
_CheckReadonlySelection();
- BOOL bOldUndo = pWrtShell->DoesUndo();
- pWrtShell->DoUndo( FALSE );
+ sal_Bool bOldUndo = pWrtShell->DoesUndo();
+ pWrtShell->DoUndo( sal_False );
SelectShell();
pWrtShell->DoUndo( bOldUndo );
bAttrChgNotified = sal_False;
@@ -779,9 +779,9 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
nLastPasteDestination( 0xFFFF ),
nLeftBorderDistance( 0 ),
nRightBorderDistance( 0 ),
- bInMailMerge(FALSE),
- bInDtor(FALSE),
- bOldShellWasPagePreView(FALSE)
+ bInMailMerge(sal_False),
+ bInDtor(sal_False),
+ bOldShellWasPagePreView(sal_False)
{
// OD 18.12.2002 #103492# - According to discussion with MBA and further
// investigations, no old SfxViewShell will be set as parameter <pOldSh>,
@@ -799,8 +799,8 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
bShowAtResize = bDrawSelMode = bDocSzUpdated = sal_True;
- _CreateScrollbar( TRUE );
- _CreateScrollbar( FALSE );
+ _CreateScrollbar( sal_True );
+ _CreateScrollbar( sal_False );
pViewImpl = new SwView_Impl(this);
SetName(C2S("View"));
@@ -809,7 +809,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
aTimer.SetTimeout( 120 );
SwDocShell* pDocSh = PTR_CAST( SwDocShell, _pFrame->GetObjectShell() );
- BOOL bOldModifyFlag = pDocSh->IsEnableSetModified();
+ sal_Bool bOldModifyFlag = pDocSh->IsEnableSetModified();
if(bOldModifyFlag)
pDocSh->EnableSetModified( sal_False );
ASSERT( pDocSh, "View ohne DocShell." );
@@ -825,7 +825,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
aUsrPref.SetOnlineSpell( aLinguOpt.bIsSpellAuto );
- sal_Bool bOldShellWasSrcView = FALSE;
+ sal_Bool bOldShellWasSrcView = sal_False;
// OD 18.12.2002 #103492# - determine, if there is an existing view for
// document
@@ -848,11 +848,11 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
sSwViewData = ((SwPagePreView*)pExistingSh)->GetPrevSwViewData();
sNewCrsrPos = ((SwPagePreView*)pExistingSh)->GetNewCrsrPos();
nNewPage = ((SwPagePreView*)pExistingSh)->GetNewPage();
- bOldShellWasPagePreView = TRUE;
+ bOldShellWasPagePreView = sal_True;
}
else if( pExistingSh &&
pExistingSh->IsA( TYPE( SwSrcView ) ) )
- bOldShellWasSrcView = TRUE;
+ bOldShellWasSrcView = sal_True;
RTL_LOGFILE_CONTEXT_TRACE( aLog, "before create WrtShell" );
if(PTR_CAST( SwView, pExistingSh))
@@ -939,8 +939,8 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
aUsrPref.SetViewVRuler(sal_False);
}
- StartListening( *pViewFrame, TRUE );
- StartListening( *pDocSh, TRUE );
+ StartListening( *pViewFrame, sal_True );
+ StartListening( *pDocSh, sal_True );
// Vom HLineal den ZOOM-Faktor einstellen
Fraction aZoomFract( aUsrPref.GetZoom(), 100 );
@@ -975,7 +975,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
pWrtShell->DoUndo( 0 != SW_MOD()->GetUndoOptions().GetUndoCount() );
- const BOOL bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_Bool bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
SetNewWindowAllowed(!bBrowse);
ShowVScrollbar(aUsrPref.IsViewVScrollBar());
@@ -1006,7 +1006,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
SfxRequest aSfxRequest( FN_UPDATE_TOX, SFX_CALLMODE_SLOT, GetPool() );
Execute( aSfxRequest );
pWrtShell->GetDoc()->SetUpdateTOX( sal_False ); // wieder zurueck setzen
- pWrtShell->SttEndDoc(TRUE);
+ pWrtShell->SttEndDoc(sal_True);
}
// kein ResetModified, wenn es schone eine View auf dieses Doc gibt
@@ -1079,7 +1079,7 @@ SwView::~SwView()
mpPostItMgr = 0;
// <--
- bInDtor = TRUE;
+ bInDtor = sal_True;
pEditWin->Hide(); // damit kein Paint Aerger machen kann!
// An der SwDocShell den Pointer auf die View ruecksetzen
SwDocShell* pDocSh = GetDocShell();
@@ -1273,7 +1273,7 @@ void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse )
Point aCrsrPos2( nXTmp, nYTmp );
bSelectObj = pWrtShell->IsObjSelectable( aCrsrPos2 );
- pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos2, FALSE );
+ pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos2, sal_False );
if( bSelectObj )
{
pWrtShell->SelectObj( aCrsrPos2 );
@@ -1284,7 +1284,7 @@ void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse )
}
else if(USHRT_MAX != nNewPage)
{
- pWrtShell->GotoPage(nNewPage, TRUE);
+ pWrtShell->GotoPage(nNewPage, sal_True);
nNewPage = USHRT_MAX;
}
@@ -1582,8 +1582,8 @@ void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSe
void SwView::ShowCursor( FASTBOOL bOn )
{
//JP 10.10.2001: Bug 90461 - don't scroll the cursor into the visible area
- BOOL bUnlockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); //lock visible section
+ sal_Bool bUnlockView = !pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True ); //lock visible section
if( !bOn )
pWrtShell->HideCrsr();
@@ -1591,7 +1591,7 @@ void SwView::ShowCursor( FASTBOOL bOn )
pWrtShell->ShowCrsr();
if( bUnlockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
}
@@ -1663,7 +1663,7 @@ SwGlossaryHdl* SwView::GetGlosHdl()
void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- BOOL bCallBase = sal_True;
+ sal_Bool bCallBase = sal_True;
if ( rHint.ISA(SfxSimpleHint) )
{
sal_uInt32 nId = ((SfxSimpleHint&)rHint).GetId();
@@ -1831,9 +1831,9 @@ sal_uInt16 SwView::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
// status methods for clipboard.
// Status changes now notified from the clipboard.
-BOOL SwView::IsPasteAllowed()
+sal_Bool SwView::IsPasteAllowed()
{
- USHORT nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell );
+ sal_uInt16 nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell );
if( nLastPasteDestination != nPasteDestination )
{
TransferableDataHelper aDataHelper(
@@ -1846,7 +1846,7 @@ BOOL SwView::IsPasteAllowed()
*pWrtShell, aDataHelper );
}
else
- bPasteState = bPasteSpecialState = FALSE;
+ bPasteState = bPasteSpecialState = sal_False;
if( 0xFFFF == nLastPasteDestination ) // the init value
pViewImpl->AddClipboardListener();
@@ -1855,12 +1855,12 @@ BOOL SwView::IsPasteAllowed()
return bPasteState;
}
-BOOL SwView::IsPasteSpecialAllowed()
+sal_Bool SwView::IsPasteSpecialAllowed()
{
if ( pFormShell && pFormShell->IsActiveControl() )
- return FALSE;
+ return sal_False;
- USHORT nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell );
+ sal_uInt16 nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell );
if( nLastPasteDestination != nPasteDestination )
{
TransferableDataHelper aDataHelper(
@@ -1873,7 +1873,7 @@ BOOL SwView::IsPasteSpecialAllowed()
*pWrtShell, aDataHelper );
}
else
- bPasteState = bPasteSpecialState = FALSE;
+ bPasteState = bPasteSpecialState = sal_False;
if( 0xFFFF == nLastPasteDestination ) // the init value
pViewImpl->AddClipboardListener();
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index 84000c3ae049..6e0ba4cba6bd 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -66,11 +66,6 @@
#define OLEObjects
#define SwView
-#define SearchAttributes
-#define ReplaceAttributes
-#define SearchSettings
-#define _ExecSearch ExecSearch
-#define _StateSearch StateSearch
#define Frames
#define Graphics
#define Tables
@@ -90,7 +85,6 @@
#define WebListInTable
#define TextPage
#include <sfx2/msg.hxx>
-#include <svx/svxslots.hxx>
#include "swslots.hxx"
#include <PostItMgr.hxx>
@@ -205,7 +199,7 @@ void lcl_SetViewMarks(SwViewOption& rVOpt, sal_Bool bOn )
rVOpt.SetHardBlank(bOn);
rVOpt.SetSoftHyph(bOn);
SwViewOption::SetAppearanceFlag(
- VIEWOPT_FIELD_SHADINGS, bOn, TRUE);
+ VIEWOPT_FIELD_SHADINGS, bOn, sal_True);
}
void lcl_SetViewMetaChars( SwViewOption& rVOpt, sal_Bool bOn)
@@ -249,7 +243,7 @@ void SwView::StateViewOptions(SfxItemSet &rSet)
{
case FN_RULER:
{
- if(!pOpt->IsViewHRuler(TRUE) && !pOpt->IsViewVRuler(TRUE))
+ if(!pOpt->IsViewHRuler(sal_True) && !pOpt->IsViewVRuler(sal_True))
{
rSet.DisableItem(nWhich);
nWhich = 0;
@@ -351,7 +345,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
eState = bSet ? STATE_ON : STATE_OFF;
}
- BOOL bFlag = STATE_ON == eState;
+ sal_Bool bFlag = STATE_ON == eState;
uno::Reference< beans::XPropertySet > xLngProp( ::GetLinguPropertySet() );
switch ( nSlot )
@@ -366,13 +360,13 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
case FN_VIEW_FIELDS:
if( STATE_TOGGLE == eState )
bFlag = !SwViewOption::IsFieldShadings() ;
- SwViewOption::SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bFlag, TRUE );
+ SwViewOption::SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bFlag, sal_True );
break;
case FN_VIEW_BOUNDS:
if( STATE_TOGGLE == eState )
bFlag = !SwViewOption::IsDocBoundaries();
- SwViewOption::SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bFlag, TRUE );
+ SwViewOption::SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bFlag, sal_True );
break;
case SID_GRID_VISIBLE:
@@ -452,7 +446,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
case FN_VIEW_TABLEGRID:
if( STATE_TOGGLE == eState )
bFlag = !SwViewOption::IsTableBoundaries();
- SwViewOption::SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bFlag, TRUE );
+ SwViewOption::SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bFlag, sal_True );
break;
case FN_VIEW_FIELDNAME:
@@ -541,15 +535,15 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
if ( nSlot == SID_AUTOSPELL_CHECK )
GetPostItMgr()->SetSpellChecking();
- const BOOL bLockedView = rSh.IsViewLocked();
- rSh.LockView( TRUE ); //lock visible section
+ const sal_Bool bLockedView = rSh.IsViewLocked();
+ rSh.LockView( sal_True ); //lock visible section
GetWrtShell().EndAction();
rSh.LockView( bLockedView );
delete pOpt;
Invalidate(rReq.GetSlot());
if(!pArgs)
- rReq.AppendItem(SfxBoolItem(nSlot, (BOOL)bFlag));
+ rReq.AppendItem(SfxBoolItem(nSlot, (sal_Bool)bFlag));
rReq.Done();
}
diff --git a/sw/source/ui/uiview/view1.cxx b/sw/source/ui/uiview/view1.cxx
index 208a9c27ebdc..2f9bdcbe9a83 100644
--- a/sw/source/ui/uiview/view1.cxx
+++ b/sw/source/ui/uiview/view1.cxx
@@ -69,7 +69,7 @@ extern int bDocSzUpdated;
--------------------------------------------------------------------*/
-void SwView::Activate(BOOL bMDIActivate)
+void SwView::Activate(sal_Bool bMDIActivate)
{
// aktuelle View anmelden an der DocShell
// die View bleibt solange an der DocShell
@@ -91,23 +91,23 @@ void SwView::Activate(BOOL bMDIActivate)
pWrtShell->MakeSelVisible();
bMakeSelectionVisible = sal_False;
}
- pHRuler->SetActive( TRUE );
- pVRuler->SetActive( TRUE );
+ pHRuler->SetActive( sal_True );
+ pVRuler->SetActive( sal_True );
if ( bMDIActivate )
{
- pWrtShell->ShGetFcs(FALSE); // Selektionen sichtbar
+ pWrtShell->ShGetFcs(sal_False); // Selektionen sichtbar
if( sSwViewData.Len() )
{
- ReadUserData( sSwViewData, FALSE );
+ ReadUserData( sSwViewData, sal_False );
sSwViewData.Erase();
}
AttrChangedNotify(pWrtShell);
// Flddlg ggf neu initialisieren (z.B. fuer TYP_SETVAR)
- USHORT nId = SwFldDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = SwFldDlgWrapper::GetChildWindowId();
SfxViewFrame* pVFrame = GetViewFrame();
SwFldDlgWrapper *pWrp = (SwFldDlgWrapper*)pVFrame->GetChildWindow(nId);
if (pWrp)
@@ -144,9 +144,9 @@ void SwView::Activate(BOOL bMDIActivate)
--------------------------------------------------------------------*/
-void SwView::Deactivate(BOOL bMDIActivate)
+void SwView::Deactivate(sal_Bool bMDIActivate)
{
- extern BOOL bFlushCharBuffer ;
+ extern sal_Bool bFlushCharBuffer ;
// Befinden sich noch Zeichen im Input Buffer?
if( bFlushCharBuffer )
GetEditWin().FlushInBuffer();
@@ -155,8 +155,8 @@ void SwView::Deactivate(BOOL bMDIActivate)
{
pWrtShell->ShLooseFcs(); // Selektionen unsichtbar
- pHRuler->SetActive( FALSE );
- pVRuler->SetActive( FALSE );
+ pHRuler->SetActive( sal_False );
+ pVRuler->SetActive( sal_False );
}
SfxViewShell::Deactivate(bMDIActivate);
}
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 960478c925dd..35b5c5648c96 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -159,14 +159,14 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::ui::dialogs;
-static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, USHORT nWhichId )
+static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, sal_uInt16 nWhichId )
{
if (nWhichId == RES_CHRATR_LANGUAGE ||
nWhichId == RES_CHRATR_CJK_LANGUAGE ||
nWhichId == RES_CHRATR_CTL_LANGUAGE)
{
rWrtSh.StartAction();
- rWrtSh.LockView( TRUE );
+ rWrtSh.LockView( sal_True );
rWrtSh.Push();
// prepare to apply new language to all text in document
@@ -178,8 +178,8 @@ static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, USHORT nWhichId
aAttribs.Insert( nWhichId );
rWrtSh.ResetAttr( &aAttribs );
- rWrtSh.Pop( FALSE );
- rWrtSh.LockView( FALSE );
+ rWrtSh.Pop( sal_False );
+ rWrtSh.LockView( sal_False );
rWrtSh.EndAction();
}
}
@@ -188,7 +188,7 @@ static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, USHORT nWhichId
Beschreibung: String fuer die Seitenanzeige in der Statusbar basteln.
----------------------------------------------------------------------------*/
-String SwView::GetPageStr( USHORT nPg, USHORT nLogPg,
+String SwView::GetPageStr( sal_uInt16 nPg, sal_uInt16 nLogPg,
const String& rDisplay )
{
String aStr( aPageStr );
@@ -210,10 +210,10 @@ String SwView::GetPageStr( USHORT nPg, USHORT nLogPg,
int SwView::InsertGraphic( const String &rPath, const String &rFilter,
- BOOL bLink, GraphicFilter *pFlt,
- Graphic* pPreviewGrf, BOOL bRule )
+ sal_Bool bLink, GraphicFilter *pFlt,
+ Graphic* pPreviewGrf, sal_Bool bRule )
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
Graphic aGrf;
int nRes = GRFILTER_OK;
@@ -228,7 +228,7 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter,
if( GRFILTER_OK == nRes )
{
- SwFlyFrmAttrMgr aFrmMgr( TRUE, GetWrtShellPtr(), FRMMGR_TYPE_GRF );
+ SwFlyFrmAttrMgr aFrmMgr( sal_True, GetWrtShellPtr(), FRMMGR_TYPE_GRF );
SwWrtShell &rSh = GetWrtShell();
rSh.StartAction();
@@ -255,15 +255,15 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter,
}
-BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
+sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
{
#ifndef ENABLE_PROP_WITHOUTLINK
#define ENABLE_PROP_WITHOUTLINK 0x08
#endif
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
SwDocShell* pDocShell = GetDocShell();
- USHORT nHtmlMode = ::GetHtmlMode(pDocShell);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(pDocShell);
// im HTML-Mode nur verknuepft einfuegen
FileDialogHelper* pFileDlg = new FileDialogHelper( SFXWB_GRAPHIC | SFXWB_SHOWSTYLES );
pFileDlg->SetTitle(SW_RESSTR(STR_INSERT_GRAPHIC ));
@@ -280,8 +280,8 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
SvStringsSortDtor aFormats;
SwDoc* pDoc = pDocShell->GetDoc();
- const USHORT nArrLen = pDoc->GetFrmFmts()->Count();
- USHORT i;
+ const sal_uInt16 nArrLen = pDoc->GetFrmFmts()->Count();
+ sal_uInt16 i;
for( i = 0; i < nArrLen; i++ )
{
SwFrmFmt* pFmt = (*pDoc->GetFrmFmts())[ i ];
@@ -328,7 +328,7 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
}
SFX_REQUEST_ARG( rReq, pName, SfxStringItem, SID_INSERT_GRAPHIC , sal_False );
- BOOL bShowError = !pName;
+ sal_Bool bShowError = !pName;
if( pName || ERRCODE_NONE == pFileDlg->Execute() )
{
@@ -425,7 +425,7 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
if(!pFmt)
pFmt = pDoc->MakeFrmFmt(sGraphicFormat,
pDocShell->GetDoc()->GetDfltFrmFmt(),
- TRUE, FALSE);
+ sal_True, sal_False);
rSh.SetFrmFmt( pFmt );
}
@@ -466,7 +466,7 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
else
{
// set the specific graphic attrbutes to the graphic
- bReturn = TRUE;
+ bReturn = sal_True;
AutoCaption( GRAPHIC_CAP );
rReq.Done();
}
@@ -482,10 +482,10 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
void __EXPORT SwView::Execute(SfxRequest &rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- BOOL bIgnore = FALSE;
+ sal_Bool bIgnore = sal_False;
switch( nSlot )
{
case SID_CREATE_SW_DRAWVIEW:
@@ -531,7 +531,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
case FN_REDLINE_ON:
{
if( pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem ))
+ SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem ))
{
IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
Sequence <sal_Int8> aPasswd = pIDRA->GetRedlinePassword();
@@ -541,7 +541,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
// xmlsec05: new password dialog
Window* pParent;
const SfxPoolItem* pParentItem;
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, sal_False, &pParentItem ) )
pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr();
else
pParent = &GetViewFrame()->GetWindow();
@@ -560,8 +560,8 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
}
- USHORT nOn = ((const SfxBoolItem*)pItem)->GetValue() ? nsRedlineMode_t::REDLINE_ON : 0;
- USHORT nMode = pWrtShell->GetRedlineMode();
+ sal_uInt16 nOn = ((const SfxBoolItem*)pItem)->GetValue() ? nsRedlineMode_t::REDLINE_ON : 0;
+ sal_uInt16 nMode = pWrtShell->GetRedlineMode();
pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
}
}
@@ -570,7 +570,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
{
IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
Sequence <sal_Int8> aPasswd = pIDRA->GetRedlinePassword();
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem )
&& ((SfxBoolItem*)pItem)->GetValue() == ( aPasswd.getLength() != 0 ) )
break;
@@ -578,7 +578,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
// message box for wrong password
Window* pParent;
const SfxPoolItem* pParentItem;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, sal_False, &pParentItem ) )
pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr();
else
pParent = &GetViewFrame()->GetWindow();
@@ -588,7 +588,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
aPasswdDlg.ShowExtras(SHOWEXTRAS_CONFIRM);
if (aPasswdDlg.Execute())
{
- USHORT nOn = nsRedlineMode_t::REDLINE_ON;
+ sal_uInt16 nOn = nsRedlineMode_t::REDLINE_ON;
String sNewPasswd( aPasswdDlg.GetPassword() );
Sequence <sal_Int8> aNewPasswd =
pIDRA->GetRedlinePassword();
@@ -602,20 +602,20 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
pIDRA->SetRedlinePassword(Sequence <sal_Int8> ());
nOn = 0;
}
- USHORT nMode = pIDRA->GetRedlineMode();
+ sal_uInt16 nMode = pIDRA->GetRedlineMode();
pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
rReq.AppendItem( SfxBoolItem( FN_REDLINE_PROTECT, ((nMode&nsRedlineMode_t::REDLINE_ON)==0) ) );
}
else
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
break;
case FN_REDLINE_SHOW:
if( pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem))
+ SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem))
{
- USHORT nMode = ( ~(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)
+ sal_uInt16 nMode = ( ~(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)
& pWrtShell->GetRedlineMode() ) | nsRedlineMode_t::REDLINE_SHOW_INSERT;
if( ((const SfxBoolItem*)pItem)->GetValue() )
nMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE;
@@ -634,8 +634,8 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
Point aCrsrPos = pWrtShell->GetCrsrDocPos( sal_True );
if( pWrtShell->GetContentAtPos( aCrsrPos, aCntntAtPos ) )
{
- USHORT nCount = pWrtShell->GetRedlineCount();
- for( USHORT nRedline = 0; nRedline < nCount; ++nRedline )
+ sal_uInt16 nCount = pWrtShell->GetRedlineCount();
+ for( sal_uInt16 nRedline = 0; nRedline < nCount; ++nRedline )
{
const SwRedline& rRedline = pWrtShell->GetRedline( nRedline );
if( *aCntntAtPos.aFnd.pRedl == rRedline )
@@ -654,20 +654,20 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
case SID_DOCUMENT_MERGE:
{
String sFileName, sFilterName;
- INT16 nVersion = 0;
+ sal_Int16 nVersion = 0;
bool bHasFileName = false;
pViewImpl->SetParam( 0 );
if( pArgs )
{
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILE_NAME, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILE_NAME, sal_False, &pItem ))
sFileName = ((const SfxStringItem*)pItem)->GetValue();
bHasFileName = ( sFileName.Len() > 0 );
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILTER_NAME, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILTER_NAME, sal_False, &pItem ))
sFilterName = ((const SfxStringItem*)pItem)->GetValue();
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_VERSION, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_VERSION, sal_False, &pItem ))
{
nVersion = ((const SfxInt16Item *)pItem)->GetValue();
pViewImpl->SetParam( nVersion );
@@ -687,7 +687,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
pVFrame->ShowChildWindow(FN_REDLINE_ACCEPT);
// RedlineDlg neu initialisieren
- USHORT nId = SwRedlineAcceptChild::GetChildWindowId();
+ sal_uInt16 nId = SwRedlineAcceptChild::GetChildWindowId();
SwRedlineAcceptChild *pRed = (SwRedlineAcceptChild*)
pVFrame->GetChildWindow(nId);
if (pRed)
@@ -695,12 +695,12 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
}
else
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
break;
case FN_SYNC_LABELS:
case FN_MAILMERGE_CHILDWINDOW:
- GetViewFrame()->ShowChildWindow(nSlot, TRUE);
+ GetViewFrame()->ShowChildWindow(nSlot, sal_True);
break;
case FN_ESCAPE:
{
@@ -747,7 +747,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
else if ( GetEditWin().IsChainMode() )
{
- GetEditWin().SetChainMode( FALSE );
+ GetEditWin().SetChainMode( sal_False );
}
else if( pWrtShell->GetFlyFrmFmt() )
{
@@ -760,9 +760,9 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
else
{
- SfxBoolItem aItem( SID_WIN_FULLSCREEN, FALSE );
+ SfxBoolItem aItem( SID_WIN_FULLSCREEN, sal_False );
GetViewFrame()->GetDispatcher()->Execute( SID_WIN_FULLSCREEN, SFX_CALLMODE_RECORD, &aItem, 0L );
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
}
break;
@@ -782,7 +782,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
{
if(pArgs)
{
- const USHORT nCurIdx = pWrtShell->GetCurPageDesc();
+ const sal_uInt16 nCurIdx = pWrtShell->GetCurPageDesc();
SwPageDesc aPageDesc( pWrtShell->GetPageDesc( nCurIdx ) );
::ItemSetToPageDesc( *pArgs, aPageDesc );
// Den Descriptor der Core veraendern.
@@ -826,12 +826,12 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
{
pWrtShell->StartAction();
pWrtShell->EnterStdMode();
- BOOL bOldCrsrInReadOnly = pWrtShell->IsReadOnlyAvailable();
- pWrtShell->SetReadOnlyAvailable( TRUE );
+ sal_Bool bOldCrsrInReadOnly = pWrtShell->IsReadOnlyAvailable();
+ pWrtShell->SetReadOnlyAvailable( sal_True );
- for( USHORT i = 0; i < 2; ++i )
+ for( sal_uInt16 i = 0; i < 2; ++i )
{
- USHORT nCount = pWrtShell->GetTOXCount();
+ sal_uInt16 nCount = pWrtShell->GetTOXCount();
if( 1 == nCount )
++i;
@@ -847,13 +847,13 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
pBase = pWrtShell->GetCurTOX();
}
- BOOL bAutoMarkApplied = FALSE;
+ sal_Bool bAutoMarkApplied = sal_False;
while( pBase )
{
if(TOX_INDEX == pBase->GetType() && !bAutoMarkApplied)
{
pWrtShell->ApplyAutoMark();
- bAutoMarkApplied = TRUE;
+ bAutoMarkApplied = sal_True;
}
// JP 15.07.96: das pBase wird nur fuer die Schnittstelle
// benoetigt. Muss mal umgetstellt werden!!!
@@ -871,9 +871,9 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
break;
case SID_ATTR_BRUSH:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_BACKGROUND, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_BACKGROUND, sal_False, &pItem))
{
- const USHORT nCurIdx = pWrtShell->GetCurPageDesc();
+ const sal_uInt16 nCurIdx = pWrtShell->GetCurPageDesc();
SwPageDesc aDesc( pWrtShell->GetPageDesc( nCurIdx ));
SwFrmFmt& rMaster = aDesc.GetMaster();
rMaster.SetFmtAttr(*pItem);
@@ -894,14 +894,14 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
case FN_INSERT_CTRL:
case FN_INSERT_OBJ_CTRL:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem))
{
- USHORT nValue = ((SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nValue = ((SfxUInt16Item*)pItem)->GetValue();
switch ( nSlot )
{
case FN_INSERT_CTRL:
{
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
if(bWeb)
SwView::nWebInsertCtrlState = nValue;
else
@@ -924,17 +924,17 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
case SID_ATTR_DEFTABSTOP:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_DEFTABSTOP, sal_False, &pItem))
{
SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
- USHORT nTab = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nTab = ((const SfxUInt16Item*)pItem)->GetValue();
MakeDefTabs( nTab, aDefTabs );
pWrtShell->SetDefault( aDefTabs );
}
}
break;
case SID_ATTR_LANGUAGE :
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_LANGUAGE, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_LANGUAGE, sal_False, &pItem))
{
SvxLanguageItem aLang(((SvxLanguageItem*)pItem)->GetLanguage(), RES_CHRATR_LANGUAGE);
pWrtShell->SetDefault( aLang );
@@ -942,21 +942,21 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
break;
case SID_ATTR_CHAR_CTL_LANGUAGE:
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CTL_LANGUAGE, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CTL_LANGUAGE, sal_False, &pItem))
{
pWrtShell->SetDefault( *pItem );
lcl_SetAllTextToDefaultLanguage( *pWrtShell, RES_CHRATR_CTL_LANGUAGE );
}
break;
case SID_ATTR_CHAR_CJK_LANGUAGE:
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CJK_LANGUAGE, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CJK_LANGUAGE, sal_False, &pItem))
{
pWrtShell->SetDefault( *pItem );
lcl_SetAllTextToDefaultLanguage( *pWrtShell, RES_CHRATR_CJK_LANGUAGE );
}
break;
case FN_SCROLL_NEXT_PREV:
- if(pArgs && pArgs->GetItemState(FN_SCROLL_NEXT_PREV, FALSE, &pItem))
+ if(pArgs && pArgs->GetItemState(FN_SCROLL_NEXT_PREV, sal_False, &pItem))
{
// call the handlers of PageUp/DownButtons, only
bool* pbNext = new bool ( ((const SfxBoolItem*)pItem)->GetValue() );
@@ -965,7 +965,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
}
break;
case SID_JUMPTOMARK:
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_JUMPTOMARK, FALSE, &pItem))
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_JUMPTOMARK, sal_False, &pItem))
JumpToSwMark( (( const SfxStringItem*)pItem)->GetValue() );
break;
case SID_GALLERY :
@@ -981,15 +981,15 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
if(pVFrame->HasChildWindow(SID_BROWSER))
{
const SwDBData& rData = GetWrtShell().GetDBDesc();
- SW_MOD()->ShowDBObj(*this, rData, FALSE);
+ SW_MOD()->ShowDBObj(*this, rData, sal_False);
}
}
break;
case FN_INSERT_FIELD_DATA_ONLY :
{
- BOOL bShow = FALSE;
+ sal_Bool bShow = sal_False;
if( pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem ))
+ SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem ))
bShow = ((const SfxBoolItem*)pItem)->GetValue();
//GetViewFrame()->ShowChildWindow(nSlot, bShow && bInMailMerge);
if((bShow && bInMailMerge) != GetViewFrame()->HasChildWindow(nSlot))
@@ -1017,7 +1017,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
pValues[0].Value <<= aData.sDataSource;
pValues[1].Value <<= aData.sCommand;
pValues[2].Value <<= aData.nCommandType;
- pNewDBMgr->ExecuteFormLetter(rSh, aProperties, TRUE);
+ pNewDBMgr->ExecuteFormLetter(rSh, aProperties, sal_True);
}
}
bInMailMerge &= bShow;
@@ -1026,8 +1026,8 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
break;
case FN_QRY_MERGE:
{
- BOOL bUseCurrentDocument = TRUE;
- BOOL bQuery = !pArgs||SFX_ITEM_SET != pArgs->GetItemState(nSlot);
+ sal_Bool bUseCurrentDocument = sal_True;
+ sal_Bool bQuery = !pArgs||SFX_ITEM_SET != pArgs->GetItemState(nSlot);
if(bQuery)
{
SfxViewFrame* pTmpFrame = GetViewFrame();
@@ -1088,7 +1088,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
case SID_ALIGN_ANY_HDEFAULT :
case SID_ALIGN_ANY_VDEFAULT :
{
- USHORT nAlias = 0;
+ sal_uInt16 nAlias = 0;
if( nSelectionType & (nsSelectionType::SEL_DRW_TXT|nsSelectionType::SEL_TXT) )
{
switch( nSlot )
@@ -1162,7 +1162,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
Beschreibung: SeitenNr-Feld invalidieren
--------------------------------------------------------------------*/
-void SwView::UpdatePageNums(USHORT nPhyNum, USHORT nVirtNum, const String& rPgStr)
+void SwView::UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr)
{
String sTemp(GetPageStr( nPhyNum, nVirtNum, rPgStr ));
const SfxStringItem aTmp( FN_STAT_PAGE, sTemp );
@@ -1181,7 +1181,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
SwWrtShell& rShell = GetWrtShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
ASSERT( nWhich, "leeres Set");
while( nWhich )
@@ -1202,24 +1202,24 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
else
*/ {
// Anzahl der Seiten, log. SeitenNr. SeitenNr ermitteln
- USHORT nPage, nLogPage;
+ sal_uInt16 nPage, nLogPage;
String sDisplay;
rShell.GetPageNumber( -1, rShell.IsCrsrVisible(), nPage, nLogPage, sDisplay );
rSet.Put( SfxStringItem( FN_STAT_PAGE,
GetPageStr( nPage, nLogPage, sDisplay) ));
- USHORT nCnt = GetWrtShell().GetPageCnt();
+ sal_uInt16 nCnt = GetWrtShell().GetPageCnt();
if (nPageCnt != nCnt) // Basic benachrichtigen
{
nPageCnt = nCnt;
- SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_PAGE_COUNT, SwDocShell::GetEventName(STR_SW_EVENT_PAGE_COUNT), GetViewFrame()->GetObjectShell()), FALSE);
+ SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_PAGE_COUNT, SwDocShell::GetEventName(STR_SW_EVENT_PAGE_COUNT), GetViewFrame()->GetObjectShell()), sal_False);
}
}
break;
case FN_STAT_TEMPLATE:
{
rSet.Put(SfxStringItem( FN_STAT_TEMPLATE,
- rShell.GetCurPageStyle(FALSE)));
+ rShell.GetCurPageStyle(sal_False)));
}
break;
@@ -1250,7 +1250,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
const SwViewOption* pVOpt = rShell.GetViewOptions();
- const USHORT nColumns = pVOpt->GetViewLayoutColumns();
+ const sal_uInt16 nColumns = pVOpt->GetViewLayoutColumns();
const bool bBookMode = pVOpt->IsViewLayoutBookMode();
SvxViewLayoutItem aViewLayout(nColumns, bBookMode);
rSet.Put( aViewLayout );
@@ -1264,13 +1264,13 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
const SwViewOption* pVOpt = rShell.GetViewOptions();
- const USHORT nCurrentZoom = pVOpt->GetZoom();
+ const sal_uInt16 nCurrentZoom = pVOpt->GetZoom();
SvxZoomSliderItem aZoomSliderItem( nCurrentZoom, MINZOOM, MAXZOOM );
aZoomSliderItem.AddSnappingPoint( 100 );
if ( !pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
{
- const USHORT nColumns = pVOpt->GetViewLayoutColumns();
+ const sal_uInt16 nColumns = pVOpt->GetViewLayoutColumns();
const bool bAutomaticViewLayout = 0 == nColumns;
const SwPostItMgr* pMgr = GetPostItMgr();
@@ -1388,7 +1388,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
//const SwNumRule* pNumRule = rShell.GetCurNumRule();
//if (pNumRule) // Cursor in Numerierung
//{
- // BYTE nNumLevel = rShell.GetNumLevel();
+ // sal_uInt8 nNumLevel = rShell.GetNumLevel();
// if( IsShowNum(nNumLevel) && MAXLEVEL >
// ( nNumLevel = GetRealLevel( nNumLevel )) )
// {
@@ -1403,7 +1403,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
// rShell.GetCurAttr(aSet);
// /* const SfxPoolItem* pItem; */
// if(SFX_ITEM_AVAILABLE <=
- // aSet.GetItemState(RES_PARATR_NUMRULE, TRUE
+ // aSet.GetItemState(RES_PARATR_NUMRULE, sal_True
// /*, &pItem */ ))
// {
// const String& rNumStyle =
@@ -1429,7 +1429,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if (pNumRule && !bOutlineNum ) // Cursor in Numerierung
{
- BYTE nNumLevel = rShell.GetNumLevel();
+ sal_uInt8 nNumLevel = rShell.GetNumLevel();
// --> OD 2008-04-02 #refactorlists#
// if( IsShowNum(nNumLevel) && MAXLEVEL >
// ( nNumLevel = GetRealLevel( nNumLevel )) )
@@ -1443,7 +1443,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
rShell.GetCurAttr(aSet);
/* const SfxPoolItem* pItem; */
if(SFX_ITEM_AVAILABLE <=
- aSet.GetItemState(RES_PARATR_NUMRULE, TRUE
+ aSet.GetItemState(RES_PARATR_NUMRULE, sal_True
/*, &pItem */ ))
{
const String& rNumStyle =
@@ -1529,8 +1529,8 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
SwWrtShell &rSh = GetWrtShell();
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem=NULL;
- BOOL bUp = FALSE;
- USHORT nWhich = rReq.GetSlot();
+ sal_Bool bUp = sal_False;
+ sal_uInt16 nWhich = rReq.GetSlot();
switch( nWhich )
{
case FN_STAT_PAGE:
@@ -1543,7 +1543,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
case FN_STAT_BOOKMARK:
if ( pArgs )
{
- if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, TRUE, &pItem))
+ if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, sal_True, &pItem))
{
const IDocumentMarkAccess* pMarkAccess = rSh.getIDocumentMarkAccess();
const sal_Int32 nIdx = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
@@ -1615,19 +1615,19 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
// PAGES01
const SfxPoolItem* pViewLayoutItem = 0;
- if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_VIEWLAYOUT, TRUE, &pViewLayoutItem))
+ if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_VIEWLAYOUT, sal_True, &pViewLayoutItem))
{
- const USHORT nColumns = ((const SvxViewLayoutItem *)pViewLayoutItem)->GetValue();
+ const sal_uInt16 nColumns = ((const SvxViewLayoutItem *)pViewLayoutItem)->GetValue();
const bool bBookMode = ((const SvxViewLayoutItem *)pViewLayoutItem)->IsBookMode();
SetViewLayout( nColumns, bBookMode );
}
- if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_ZOOM, TRUE, &pItem))
+ if ( pSet && SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_ZOOM, sal_True, &pItem))
{
enum SvxZoomType eType = ((const SvxZoomItem *)pItem)->GetType();
SetZoom( eType, ((const SvxZoomItem *)pItem)->GetValue() );
}
- bUp = TRUE;
+ bUp = sal_True;
if ( pItem )
rReq.AppendItem( *pItem );
rReq.Done();
@@ -1643,9 +1643,9 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) )
{
// PAGES01
- if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_VIEWLAYOUT, TRUE, &pItem ))
+ if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_VIEWLAYOUT, sal_True, &pItem ))
{
- const USHORT nColumns = ((const SvxViewLayoutItem *)pItem)->GetValue();
+ const sal_uInt16 nColumns = ((const SvxViewLayoutItem *)pItem)->GetValue();
const bool bBookMode = (0 == nColumns || 0 != (nColumns % 2)) ?
false :
((const SvxViewLayoutItem *)pItem)->IsBookMode();
@@ -1653,7 +1653,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
SetViewLayout( nColumns, bBookMode );
}
- bUp = TRUE;
+ bUp = sal_True;
rReq.Done();
InvalidateRulerPos();
@@ -1666,13 +1666,13 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
if ( pArgs && ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() ) )
{
// PAGES01
- if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, TRUE, &pItem ))
+ if ( SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, sal_True, &pItem ))
{
- const USHORT nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
+ const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
SetZoom( SVX_ZOOM_PERCENT, nCurrentZoom );
}
- bUp = TRUE;
+ bUp = sal_True;
rReq.Done();
}
}
@@ -1680,7 +1680,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
case SID_ATTR_SIZE:
{
- ULONG nId = FN_INSERT_FIELD;
+ sal_uLong nId = FN_INSERT_FIELD;
if( rSh.IsCrsrInTbl() )
nId = FN_FORMAT_TABLE_DLG;
else if( rSh.GetCurTOX() )
@@ -1707,7 +1707,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
if( nId )
GetViewFrame()->GetDispatcher()->Execute(
- static_cast< USHORT >( nId ), SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD );
+ static_cast< sal_uInt16 >( nId ), SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD );
}
break;
@@ -1715,7 +1715,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
{
if ( pArgs )
{
- if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, TRUE, &pItem))
+ if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, sal_True, &pItem))
{
switch ( ((const SfxUInt16Item *)pItem)->GetValue() )
{
@@ -1744,23 +1744,23 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
else
rSh.ToggleBlockMode();
}
- bUp = TRUE;
+ bUp = sal_True;
break;
}
case FN_SET_ADD_MODE:
rSh.ToggleAddMode();
nWhich = FN_STAT_SELMODE;
- bUp = TRUE;
+ bUp = sal_True;
break;
case FN_SET_BLOCK_MODE:
rSh.ToggleBlockMode();
nWhich = FN_STAT_SELMODE;
- bUp = TRUE;
+ bUp = sal_True;
break;
case FN_SET_EXT_MODE:
rSh.ToggleExtMode();
nWhich = FN_STAT_SELMODE;
- bUp = TRUE;
+ bUp = sal_True;
break;
case SID_ATTR_INSERT:
SwPostItMgr* pMgr = GetPostItMgr();
@@ -1770,7 +1770,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
else
rSh.ToggleInsMode();
- bUp = TRUE;
+ bUp = sal_True;
break;
}
@@ -1782,11 +1782,11 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
}
-void SwView::InsFrmMode(USHORT nCols)
+void SwView::InsFrmMode(sal_uInt16 nCols)
{
if ( pWrtShell->HasWholeTabSelection() )
{
- SwFlyFrmAttrMgr aMgr( TRUE, pWrtShell, FRMMGR_TYPE_TEXT );
+ SwFlyFrmAttrMgr aMgr( sal_True, pWrtShell, FRMMGR_TYPE_TEXT );
const SwFrmFmt &rPageFmt =
pWrtShell->GetPageDesc(pWrtShell->GetCurPageDesc()).GetMaster();
@@ -1812,7 +1812,7 @@ void SwView::InsFrmMode(USHORT nCols)
void SwView::EditLinkDlg()
{
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( &GetViewFrame()->GetWindow(), &GetWrtShell().GetLinkManager(), bWeb );
if ( pDlg )
@@ -1829,22 +1829,22 @@ void SwView::EditLinkDlg()
*/
}
-BOOL SwView::JumpToSwMark( const String& rMark )
+sal_Bool SwView::JumpToSwMark( const String& rMark )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rMark.Len() )
{
// wir wollen den Bookmark aber am oberen Rand haben
- BOOL bSaveCC = IsCrsrAtCenter();
- BOOL bSaveCT = IsCrsrAtTop();
- SetCrsrAtTop( TRUE );
+ sal_Bool bSaveCC = IsCrsrAtCenter();
+ sal_Bool bSaveCT = IsCrsrAtTop();
+ SetCrsrAtTop( sal_True );
//JP 27.04.98: Bug 49786
// Damit in FrameSet auch gescrollt werden kann, muss die
// entsprechende Shell auch das Focus-Flag gesetzt haben!
- BOOL bHasShFocus = pWrtShell->HasShFcs();
+ sal_Bool bHasShFocus = pWrtShell->HasShFcs();
if( !bHasShFocus )
- pWrtShell->ShGetFcs( FALSE );
+ pWrtShell->ShGetFcs( sal_False );
const SwFmtINetFmt* pINet;
String sCmp, sMark( INetURLObject::decode( rMark, INET_HEX_ESCAPE,
@@ -1900,22 +1900,22 @@ BOOL SwView::JumpToSwMark( const String& rMark )
TransliterationModules_IGNORE_CASE );
//todo/mba: assuming that notes shouldn't be searched
- BOOL bSearchInNotes = FALSE;
+ sal_Bool bSearchInNotes = sal_False;
if( pWrtShell->SearchPattern( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END ))
{
pWrtShell->EnterStdMode(); // Selektion wieder aufheben
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if( pMarkAccess->getMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)) )
- pWrtShell->GotoMark( ppMark->get(), FALSE, TRUE ), bRet = TRUE;
+ pWrtShell->GotoMark( ppMark->get(), sal_False, sal_True ), bRet = sal_True;
else if( 0 != ( pINet = pWrtShell->FindINetAttr( sMark ) ))
bRet = pWrtShell->GotoINetAttr( *pINet->GetTxtINetFmt() );
// fuer alle Arten von Flys
if( FLYCNTTYPE_ALL != eFlyType && pWrtShell->GotoFly( sName, eFlyType ))
{
- bRet = TRUE;
+ bRet = sal_True;
if( FLYCNTTYPE_FRM == eFlyType )
{
// TextFrames: Cursor in den Frame setzen
@@ -1930,7 +1930,7 @@ BOOL SwView::JumpToSwMark( const String& rMark )
}
}
else if( pMarkAccess->getMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)))
- pWrtShell->GotoMark( ppMark->get(), FALSE, TRUE ), bRet = TRUE;
+ pWrtShell->GotoMark( ppMark->get(), sal_False, sal_True ), bRet = sal_True;
else if( 0 != ( pINet = pWrtShell->FindINetAttr( sMark ) ))
bRet = pWrtShell->GotoINetAttr( *pINet->GetTxtINetFmt() );
@@ -1961,9 +1961,9 @@ sal_uInt16 lcl_PageDescWithHeader( const SwDoc& rDoc )
const SwPageDesc& rPageDesc = rDoc.GetPageDesc( i );
const SwFrmFmt& rMaster = rPageDesc.GetMaster();
const SfxPoolItem* pItem;
- if( ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem ) &&
+ if( ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem ) &&
((SwFmtHeader*)pItem)->IsActive() ) ||
- ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_FOOTER, FALSE, &pItem ) &&
+ ( SFX_ITEM_SET == rMaster.GetAttrSet().GetItemState( RES_FOOTER, sal_False, &pItem ) &&
((SwFmtFooter*)pItem)->IsActive()) )
++nRet;
}
@@ -1978,7 +1978,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem )
{
pViewImpl->InitRequest( rRequest );
pViewImpl->SetParam( pItem ? 1 : 0 );
- USHORT nSlot = rRequest.GetSlot();
+ sal_uInt16 nSlot = rRequest.GetSlot();
if ( !pItem )
{
@@ -1989,7 +1989,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem )
{
String sFile, sFilter;
sFile = ( (const SfxStringItem *)pItem )->GetValue();
- if ( SFX_ITEM_SET == rRequest.GetArgs()->GetItemState( FN_PARAM_1, TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rRequest.GetArgs()->GetItemState( FN_PARAM_1, sal_True, &pItem ) )
sFilter = ( (const SfxStringItem *)pItem )->GetValue();
bool bHasFileName = ( sFile.Len() > 0 );
@@ -2003,7 +2003,7 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem )
}
}
-long SwView::InsertDoc( USHORT nSlotId, const String& rFileName, const String& rFilterName, INT16 nVersion )
+long SwView::InsertDoc( sal_uInt16 nSlotId, const String& rFileName, const String& rFilterName, sal_Int16 nVersion )
{
SfxMedium* pMed = 0;
SwDocShell* pDocSh = GetDocShell();
@@ -2014,17 +2014,17 @@ long SwView::InsertDoc( USHORT nSlotId, const String& rFileName, const String& r
const SfxFilter* pFilter = rFact.GetFilterContainer()->GetFilter4FilterName( rFilterName );
if ( !pFilter )
{
- pMed = new SfxMedium(rFileName, STREAM_READ, TRUE, 0, 0 );
+ pMed = new SfxMedium(rFileName, STREAM_READ, sal_True, 0, 0 );
SfxFilterMatcher aMatcher( rFact.GetFilterContainer()->GetName() );
- pMed->UseInteractionHandler( TRUE );
- ErrCode nErr = aMatcher.GuessFilter( *pMed, &pFilter, FALSE );
+ pMed->UseInteractionHandler( sal_True );
+ ErrCode nErr = aMatcher.GuessFilter( *pMed, &pFilter, sal_False );
if ( nErr )
DELETEZ(pMed);
else
pMed->SetFilter( pFilter );
}
else
- pMed = new SfxMedium(rFileName, STREAM_READ, TRUE, pFilter, 0);
+ pMed = new SfxMedium(rFileName, STREAM_READ, sal_True, pFilter, 0);
}
else
{
@@ -2039,21 +2039,21 @@ long SwView::InsertDoc( USHORT nSlotId, const String& rFileName, const String& r
return InsertMedium( nSlotId, pMed, nVersion );
}
-long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
+long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion )
{
- BOOL bInsert = FALSE, bCompare = FALSE, bMerge = FALSE;
+ sal_Bool bInsert = sal_False, bCompare = sal_False, bMerge = sal_False;
long nFound = 0;
SwDocShell* pDocSh = GetDocShell();
switch( nSlotId )
{
- case SID_DOCUMENT_MERGE: bMerge = TRUE; break;
- case SID_DOCUMENT_COMPARE: bCompare = TRUE; break;
- case SID_INSERTDOC: bInsert = TRUE; break;
+ case SID_DOCUMENT_MERGE: bMerge = sal_True; break;
+ case SID_DOCUMENT_COMPARE: bCompare = sal_True; break;
+ case SID_INSERTDOC: bInsert = sal_True; break;
default:
ASSERT( !this, "Unbekannte SlotId!" );
- bInsert = TRUE;
+ bInsert = sal_True;
nSlotId = SID_INSERTDOC;
break;
}
@@ -2093,10 +2093,10 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
SwDoc *pDoc = pDocSh->GetDoc();
if( pRead && pDocSh->GetDoc() )
nUndoCheck = lcl_PageDescWithHeader( *pDoc );
- ULONG nErrno;
+ sal_uLong nErrno;
{ //Scope for SwWait-Object, to be able to execute slots
//outside this scope.
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
if ( pWrtShell->HasSelection() )
pWrtShell->DelRight(); // Selektionen loeschen
@@ -2118,7 +2118,7 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
{
SfxRequest aReq( FN_UPDATE_TOX, SFX_CALLMODE_SLOT, GetPool() );
Execute( aReq );
- pWrtShell->SetUpdateTOX( FALSE ); // wieder zurueck setzen
+ pWrtShell->SetUpdateTOX( sal_False ); // wieder zurueck setzen
}
if( pDoc )
@@ -2148,7 +2148,7 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh, SfxObjectShellLock& xLockRef,
const String& rFileName, const String& rPasswd,
- String& rFilter, INT16 nVersion,
+ String& rFilter, sal_Int16 nVersion,
SwDocShell* pDestSh );
String sFltNm;
@@ -2156,7 +2156,7 @@ extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh, SfxObjectShellLock& xLoc
sFltNm, nVersion, pDocSh );
if( nRet )
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
pWrtShell->EnterStdMode(); // Selektionen loeschen
@@ -2184,7 +2184,7 @@ extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh, SfxObjectShellLock& xLoc
/* -----------------05.02.2003 12:06-----------------
*
* --------------------------------------------------*/
-void SwView::EnableMailMerge(BOOL bEnable )
+void SwView::EnableMailMerge(sal_Bool bEnable )
{
bInMailMerge = bEnable;
SfxBindings& rBind = GetViewFrame()->GetBindings();
@@ -2260,7 +2260,7 @@ class SwMergeSourceWarningBox_Impl : public ModalDialog
-void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
+void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument)
{
if(bUseCurrentDocument)
{
@@ -2277,7 +2277,7 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
}
if(!xDBContext.is())
return ;
- BOOL bCallAddressPilot = FALSE;
+ sal_Bool bCallAddressPilot = sal_False;
if ( lcl_NeedAdditionalDataSource( xDBContext ) )
{
// no data sources are available - create a new one
@@ -2287,7 +2287,7 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
// no cancel allowed
if ( RET_OK != aWarning.Execute() )
return;
- bCallAddressPilot = TRUE;
+ bCallAddressPilot = sal_True;
}
else
{
@@ -2317,12 +2317,12 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
//call insert fields with database field page available, only
SfxViewFrame* pVFrame = GetViewFrame();
//at first hide the default field dialog if currently visible
- pVFrame->SetChildWindow(FN_INSERT_FIELD, FALSE);
+ pVFrame->SetChildWindow(FN_INSERT_FIELD, sal_False);
//enable the status of the db field dialog - it is disabled in the status method
//to prevent creation of the dialog without mail merge active
EnableMailMerge();
//then show the "Data base only" field dialog
- SfxBoolItem aOn(FN_INSERT_FIELD_DATA_ONLY, TRUE);
+ SfxBoolItem aOn(FN_INSERT_FIELD_DATA_ONLY, sal_True);
pVFrame->GetDispatcher()->Execute(FN_INSERT_FIELD_DATA_ONLY,
SFX_CALLMODE_SYNCHRON, &aOn, 0L);
return;
@@ -2370,7 +2370,7 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
pValues[0].Value <<= aData.sDataSource;
pValues[1].Value <<= aData.sCommand;
pValues[2].Value <<= aData.nCommandType;
- pNewDBMgr->ExecuteFormLetter(GetWrtShell(), aProperties, TRUE);
+ pNewDBMgr->ExecuteFormLetter(GetWrtShell(), aProperties, sal_True);
}
}
else
@@ -2410,7 +2410,7 @@ IMPL_LINK( SwView, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
SfxMedium* pMed = pViewImpl->CreateMedium();
if ( pMed )
{
- USHORT nSlot = pViewImpl->GetRequest()->GetSlot();
+ sal_uInt16 nSlot = pViewImpl->GetRequest()->GetSlot();
long nFound = InsertMedium( nSlot, pMed, pViewImpl->GetParam() );
if ( SID_INSERTDOC == nSlot )
@@ -2436,7 +2436,7 @@ IMPL_LINK( SwView, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
pVFrame->ShowChildWindow(FN_REDLINE_ACCEPT);
// RedlineDlg neu initialisieren
- USHORT nId = SwRedlineAcceptChild::GetChildWindowId();
+ sal_uInt16 nId = SwRedlineAcceptChild::GetChildWindowId();
SwRedlineAcceptChild* pRed = (SwRedlineAcceptChild*)pVFrame->GetChildWindow( nId );
if ( pRed )
pRed->ReInitDlg( GetDocShell() );
diff --git a/sw/source/ui/uiview/viewcoll.cxx b/sw/source/ui/uiview/viewcoll.cxx
index e5f9350277ee..853c5639348d 100644
--- a/sw/source/ui/uiview/viewcoll.cxx
+++ b/sw/source/ui/uiview/viewcoll.cxx
@@ -50,7 +50,7 @@ void SwView::ExecColl(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
- USHORT nWhich = rReq.GetSlot();
+ sal_uInt16 nWhich = rReq.GetSlot();
switch( nWhich )
{
case FN_SET_PAGE:
@@ -63,10 +63,10 @@ void SwView::ExecColl(SfxRequest &rReq)
if( pArgs )
{
if (pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState( nWhich , TRUE, &pItem ))
+ SFX_ITEM_SET == pArgs->GetItemState( nWhich , sal_True, &pItem ))
{
if( ((SfxStringItem*)pItem)->GetValue() !=
- GetWrtShell().GetCurPageStyle(FALSE) )
+ GetWrtShell().GetCurPageStyle(sal_False) )
{
SfxStringItem aName(SID_STYLE_APPLY,
((SfxStringItem*)pItem)->GetValue());
@@ -89,7 +89,7 @@ void SwView::ExecColl(SfxRequest &rReq)
}
break;
default:
- ASSERT(FALSE, falscher CommandProcessor fuer Dispatch);
+ ASSERT(sal_False, falscher CommandProcessor fuer Dispatch);
return;
}
}
diff --git a/sw/source/ui/uiview/viewdlg.cxx b/sw/source/ui/uiview/viewdlg.cxx
index 8c19c454b6ac..fa045a740b40 100644
--- a/sw/source/ui/uiview/viewdlg.cxx
+++ b/sw/source/ui/uiview/viewdlg.cxx
@@ -55,9 +55,9 @@ void SwView::ExecDlg(SfxRequest &rReq)
const SfxPoolItem* pItem = 0;
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState( GetPool().GetWhich(nSlot), FALSE, &pItem );
+ pArgs->GetItemState( GetPool().GetWhich(nSlot), sal_False, &pItem );
switch ( nSlot )
{
@@ -65,11 +65,11 @@ void SwView::ExecDlg(SfxRequest &rReq)
{
if ( pItem )
{
- USHORT nValue = ((SfxUInt16Item *)pItem)->GetValue();
- USHORT nOldValue = pWrtShell->GetPageOffset();
- USHORT nPage, nLogPage;
+ sal_uInt16 nValue = ((SfxUInt16Item *)pItem)->GetValue();
+ sal_uInt16 nOldValue = pWrtShell->GetPageOffset();
+ sal_uInt16 nPage, nLogPage;
pWrtShell->GetPageNum( nPage, nLogPage,
- pWrtShell->IsCrsrVisible(), FALSE);
+ pWrtShell->IsCrsrVisible(), sal_False);
if(nValue != nOldValue || nValue != nLogPage)
{
diff --git a/sw/source/ui/uiview/viewdlg2.cxx b/sw/source/ui/uiview/viewdlg2.cxx
index a6a64078840d..6a867b7e28a7 100644
--- a/sw/source/ui/uiview/viewdlg2.cxx
+++ b/sw/source/ui/uiview/viewdlg2.cxx
@@ -89,7 +89,7 @@ void SwView::ExecDlgExt(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE,
- pMDI, *pWrtShell, TRUE );
+ pMDI, *pWrtShell, sal_True );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
pDlg->SetHelpId(GetStaticInterface()->GetSlot(FN_EDIT_FOOTNOTE)->GetCommand());
@@ -105,15 +105,15 @@ void SwView::ExecDlgExt(SfxRequest &rReq)
*
* --------------------------------------------------*/
-void SwView::AutoCaption(const USHORT nType, const SvGlobalName *pOleId)
+void SwView::AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId)
{
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
if (pModOpt->IsInsWithCaption(bWeb))
{
const InsCaptionOpt *pOpt = pModOpt->GetCapOption(bWeb, (SwCapObjType)nType, pOleId);
- if (pOpt && pOpt->UseCaption() == TRUE)
+ if (pOpt && pOpt->UseCaption() == sal_True)
InsertCaption(pOpt);
}
}
@@ -133,7 +133,7 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
SwWrtShell &rSh = GetWrtShell();
if(rName.Len())
{
- USHORT nPoolId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
+ sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
if( USHRT_MAX != nPoolId )
rSh.GetTxtCollFromPool(nPoolId);
// Pool-Vorlage existiert nicht: Existiert sie am Dokument?
@@ -172,16 +172,16 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
if (pFldType)
{
pFldType->SetDelimiter(pOpt->GetSeparator());
- pFldType->SetOutlineLvl( static_cast< BYTE >(pOpt->GetLevel()) );
+ pFldType->SetOutlineLvl( static_cast< sal_uInt8 >(pOpt->GetLevel()) );
}
}
- USHORT nID = USHRT_MAX;
+ sal_uInt16 nID = USHRT_MAX;
SwFieldType* pType = 0;
- const USHORT nCount = aMgr.GetFldTypeCount();
+ const sal_uInt16 nCount = aMgr.GetFldTypeCount();
if( rName.Len() )
{
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
pType = aMgr.GetFldType(USHRT_MAX, i);
String aTmpName( pType->GetName() );
@@ -206,7 +206,7 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
if(pType)
((SwSetExpFieldType*)pType)->SetSeqFormat(pOpt->GetNumType());
- rSh.UpdateExpFlds( TRUE );
+ rSh.UpdateExpFlds( sal_True );
rSh.EndAllAction();
diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx
index abae753c1b56..4250b8a4f0e8 100644
--- a/sw/source/ui/uiview/viewdraw.cxx
+++ b/sw/source/ui/uiview/viewdraw.cxx
@@ -355,7 +355,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
};
GetViewFrame()->GetBindings().Invalidate(aInval);
- BOOL bEndTextEdit = TRUE;
+ sal_Bool bEndTextEdit = sal_True;
if (pFuncPtr)
{
if (GetDrawFuncPtr())
@@ -373,7 +373,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
{
if(SID_OBJECT_SELECT == nDrawSfxId )
{
- pWrtShell->GotoObj(TRUE);
+ pWrtShell->GotoObj(sal_True);
}
else
{
@@ -390,7 +390,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
BeginTextEdit(pObj);
- bEndTextEdit = FALSE;
+ bEndTextEdit = sal_False;
}
}
}
@@ -421,7 +421,7 @@ void SwView::ExitDraw()
{
//#126062 # the shell may be invalid at close/reload/SwitchToViewShell
SfxDispatcher* pDispatch = GetViewFrame()->GetDispatcher();
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
SfxShell* pTest = 0;
do
{
diff --git a/sw/source/ui/uiview/viewfunc.hxx b/sw/source/ui/uiview/viewfunc.hxx
index 6da6c01bbda4..2ac704db114f 100644
--- a/sw/source/ui/uiview/viewfunc.hxx
+++ b/sw/source/ui/uiview/viewfunc.hxx
@@ -41,16 +41,16 @@ class Window;
class SwWrtShell;
// folgende Funktionen stehen im viewprt.cxx
-void SetPrinter( IDocumentDeviceAccess*, SfxPrinter*, BOOL bWeb );
+void SetPrinter( IDocumentDeviceAccess*, SfxPrinter*, sal_Bool bWeb );
SfxTabPage* CreatePrintOptionsPage( Window*, const SfxItemSet& );
-void SetAppPrintOptions( ViewShell* pSh, BOOL bWeb );
+void SetAppPrintOptions( ViewShell* pSh, sal_Bool bWeb );
// folgende Funktionen stehen im viewport.cxx
void ViewResizePixel( const Window &rRef,
const Point &rOfst,
const Size &rSize,
const Size &rEditSz,
- const BOOL bInner,
+ const sal_Bool bInner,
SwScrollbar& rVScrollbar,
SwScrollbar& rHScrollbar,
ImageButton* pPageUpBtn,
@@ -59,8 +59,8 @@ void ViewResizePixel( const Window &rRef,
Window& rScrollBarBox,
SvxRuler* pVLineal = 0,
SvxRuler* pHLineal = 0,
- BOOL bWebView = FALSE,
- BOOL bVRulerRight = FALSE );
+ sal_Bool bWebView = sal_False,
+ sal_Bool bVRulerRight = sal_False );
#endif
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index b3f73f7c38e4..4414a96cdf72 100755
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -554,7 +554,7 @@ void SwView::InsertThesaurusSynonym( const String &rSynonmText, const String &rL
if( !bSelection )
{
if(pWrtShell->IsEndWrd())
- pWrtShell->Left(CRSR_SKIP_CELLS, FALSE, 1, FALSE );
+ pWrtShell->Left(CRSR_SKIP_CELLS, sal_False, 1, sal_False );
pWrtShell->SelWrd();
@@ -766,7 +766,7 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
if ( pMenu )
{
OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
- USHORT nId = ((PopupMenu*)pMenu)->Execute(pEditWin, aPixPos);
+ sal_uInt16 nId = ((PopupMenu*)pMenu)->Execute(pEditWin, aPixPos);
OUString aCommand = ((PopupMenu*)pMenu)->GetItemCommand(nId);
if (aCommand.getLength() == 0 )
{
@@ -978,7 +978,7 @@ IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox )
}
-BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM )
+sal_Bool SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM )
{
sal_Bool bRet = sal_False;
const sal_Bool bOldViewLock = pWrtShell->IsViewLocked();
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 9dfa8e79ecfa..84bce4002f11 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -83,7 +83,7 @@
#include <IDocumentSettingAccess.hxx>
#include <PostItMgr.hxx>
-USHORT SwView::nMoveType = NID_PGE;
+sal_uInt16 SwView::nMoveType = NID_PGE;
sal_Int32 SwView::nActMark = 0;
@@ -92,16 +92,16 @@ sal_Int32 SwView::nActMark = 0;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
-void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, BOOL bViewOnly )
+void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, sal_Bool bViewOnly )
{
_SetZoom( GetEditWin().GetOutputSizePixel(), eZoomType, nFactor, bViewOnly );
}
void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
- short nFactor, BOOL bViewOnly )
+ short nFactor, sal_Bool bViewOnly )
{
- BOOL bUnLockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE );
+ sal_Bool bUnLockView = !pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True );
pWrtShell->LockPaint();
{
@@ -109,7 +109,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
long nFac = nFactor;
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
SwMasterUsrPref *pUsrPref = (SwMasterUsrPref*)SW_MOD()->GetUsrPref(bWeb);
const SwPageDesc &rDesc = pWrtShell->GetPageDesc( pWrtShell->GetCurPageDesc() );
@@ -182,19 +182,19 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
//MasterUsrPrefs updaten UND DANACH die ViewOptions der aktuellen
//View updaten.
if ( !bViewOnly &&
- (USHORT(nFac) != pUsrPref->GetZoom() ||
- BYTE (eZoomType) != pUsrPref->GetZoomType()) )
+ (sal_uInt16(nFac) != pUsrPref->GetZoom() ||
+ sal_uInt8 (eZoomType) != pUsrPref->GetZoomType()) )
{
- pUsrPref->SetZoom ( USHORT(nFac) );
+ pUsrPref->SetZoom ( sal_uInt16(nFac) );
pUsrPref->SetZoomType( eZoomType );
SW_MOD()->ApplyUsrPref( *pUsrPref,
bViewOnly ? this: 0,
bViewOnly ? VIEWOPT_DEST_VIEW_ONLY : 0 );
pUsrPref->SetModified();
}
- if ( pOpt->GetZoom() != (USHORT) nFac )
+ if ( pOpt->GetZoom() != (sal_uInt16) nFac )
{
- aOpt.SetZoom ( USHORT(nFac) );
+ aOpt.SetZoom ( sal_uInt16(nFac) );
aOpt.SetReadonly(pOpt->IsReadonly());
pWrtShell->ApplyViewOptions( aOpt );
}
@@ -223,9 +223,9 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
((SwViewOption*)pWrtShell->GetViewOptions())->SetZoomType( eZoomType );
CalcVisArea( rEditSize ); //fuer das Neuberechnen des sichtbaren Bereiches
}
- else if ( USHORT(nFac) != pOpt->GetZoom() )
+ else if ( sal_uInt16(nFac) != pOpt->GetZoom() )
{
- aOpt.SetZoom ( USHORT(nFac) );
+ aOpt.SetZoom ( sal_uInt16(nFac) );
pWrtShell->ApplyViewOptions( aOpt );
}
@@ -238,7 +238,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
}
pWrtShell->UnlockPaint();
if( bUnLockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
// if ( mpPostItMgr )
// {
@@ -250,10 +250,10 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
// eZoom = eZoomType;
}
-void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
+void SwView::SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewOnly )
{
- const BOOL bUnLockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE );
+ const sal_Bool bUnLockView = !pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True );
pWrtShell->LockPaint();
{
@@ -262,7 +262,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
if ( !GetViewFrame()->GetFrame().IsInPlace() && !bViewOnly )
{
- const BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ const sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
SwMasterUsrPref *pUsrPref = (SwMasterUsrPref*)SW_MOD()->GetUsrPref(bWeb);
//MasterUsrPrefs updaten UND DANACH die ViewOptions der aktuellen
@@ -297,7 +297,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
pWrtShell->UnlockPaint();
if( bUnLockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
SfxBindings& rBnd = GetViewFrame()->GetBindings();
rBnd.Invalidate( SID_ATTR_VIEWLAYOUT );
@@ -308,7 +308,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
* Scrollbar - Handler
*/
-int SwView::_CreateScrollbar( BOOL bHori )
+int SwView::_CreateScrollbar( sal_Bool bHori )
{
Window *pMDI = &GetViewFrame()->GetWindow();
SwScrollbar** ppScrollbar = bHori ? &pHScrollbar : &pVScrollbar;
@@ -326,7 +326,7 @@ int SwView::_CreateScrollbar( BOOL bHori )
(*ppScrollbar)->SetScrollHdl( LINK( this, SwView, ScrollHdl ));
(*ppScrollbar)->SetEndScrollHdl( LINK( this, SwView, EndScrollHdl ));
- (*ppScrollbar)->EnableDrag( TRUE );
+ (*ppScrollbar)->EnableDrag( sal_True );
if(GetWindow())
InvalidateBorder();
@@ -339,12 +339,12 @@ int SwView::_CreateScrollbar( BOOL bHori )
return 1;
}
-void SwView::CreatePageButtons(BOOL bShow)
+void SwView::CreatePageButtons(sal_Bool bShow)
{
Window *pMDI = &GetViewFrame()->GetWindow();
- pPageUpBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEUP ), TRUE );
+ pPageUpBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEUP ), sal_True );
pPageUpBtn->SetHelpId(HID_SCRL_PAGEUP);
- pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), FALSE );
+ pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), sal_False );
pPageDownBtn->SetHelpId(HID_SCRL_PAGEDOWN);
Reference< XFrame > xFrame = GetViewFrame()->GetFrame().GetFrameInterface();
pNaviBtn = new SwNaviImageButton(pMDI, xFrame );
@@ -401,12 +401,12 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
case NID_GRF:
case NID_OLE:
{
- USHORT eType = GOTOOBJ_FLY_FRM;
+ sal_uInt16 eType = GOTOOBJ_FLY_FRM;
if(nMoveType == NID_GRF)
eType = GOTOOBJ_FLY_GRF;
else if(nMoveType == NID_OLE)
eType = GOTOOBJ_FLY_OLE;
- BOOL bSuccess = bNext ?
+ sal_Bool bSuccess = bNext ?
rSh.GotoNextFly(eType) :
rSh.GotoPrevFly(eType);
if(bSuccess)
@@ -502,7 +502,7 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
case NID_SRCH_REP:
if(pSrchItem)
{
- BOOL bBackward = pSrchItem->GetBackward();
+ sal_Bool bBackward = pSrchItem->GetBackward();
if(rSh.HasSelection() && !bNext == rSh.IsCrsrPtAtEnd())
rSh.SwapPam();
pSrchItem->SetBackward(!bNext);
@@ -520,7 +520,7 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
break;
case NID_TABLE_FORMULA_ERROR:
- rSh.GotoNxtPrvTblFormula( bNext, TRUE );
+ rSh.GotoNxtPrvTblFormula( bNext, sal_True );
break;
}
pThis->pEditWin->GrabFocus();
@@ -642,7 +642,7 @@ int SwView::KillVLineal()
IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler )
{
- USHORT nDefPage = 0;
+ sal_uInt16 nDefPage = 0;
switch( pRuler->GetClickType() )
{
case RULER_TYPE_DONTKNOW:
@@ -669,7 +669,7 @@ IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler )
--------------------------------------------------*/
-USHORT SwView::GetMoveType()
+sal_uInt16 SwView::GetMoveType()
{
return nMoveType;
}
@@ -677,11 +677,11 @@ USHORT SwView::GetMoveType()
--------------------------------------------------*/
-void SwView::SetMoveType(USHORT nSet)
+void SwView::SetMoveType(sal_uInt16 nSet)
{
- BOOL bLastPage = nMoveType == NID_PGE;
+ sal_Bool bLastPage = nMoveType == NID_PGE;
nMoveType = nSet;
- BOOL bNewPage = nMoveType == NID_PGE;
+ sal_Bool bNewPage = nMoveType == NID_PGE;
if(bNewPage != bLastPage)
{
Color aColor(bNewPage ? COL_BLACK : VIEW_IMAGECOLOR);
@@ -729,7 +729,7 @@ void SwView::ShowHScrollbar(sal_Bool bShow)
sal_Bool SwView::IsHScrollbarVisible()const
{
DBG_ASSERT(pHScrollbar, "Scrollbar invalid");
- return pHScrollbar->IsVisible( FALSE ) || pHScrollbar->IsAuto();
+ return pHScrollbar->IsVisible( sal_False ) || pHScrollbar->IsAuto();
}
/* -----------------------------2002/06/26 13:57------------------------------
@@ -748,7 +748,7 @@ void SwView::ShowVScrollbar(sal_Bool bShow)
sal_Bool SwView::IsVScrollbarVisible()const
{
DBG_ASSERT(pVScrollbar, "Scrollbar invalid");
- return pVScrollbar->IsVisible( FALSE );
+ return pVScrollbar->IsVisible( sal_False );
}
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index b343619f2ea8..465227dbd0bb 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -68,11 +68,11 @@
#define WB_RIGHT_ALIGNED ((WinBits)0x00008000)
#endif
-static BOOL bProtectDocShellVisArea = FALSE;
+static sal_Bool bProtectDocShellVisArea = sal_False;
-static USHORT nPgNum = 0;
+static sal_uInt16 nPgNum = 0;
-BOOL SwView::IsDocumentBorder()
+sal_Bool SwView::IsDocumentBorder()
{
return GetDocShell()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ||
pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ||
@@ -93,13 +93,13 @@ inline long GetLeftMargin( SwView &rView )
void lcl_GetPos(SwView* pView,
Point& rPos,
SwScrollbar* pScrollbar,
- BOOL bBorder)
+ sal_Bool bBorder)
{
SwWrtShell &rSh = pView->GetWrtShell();
const Size aDocSz( rSh.GetDocSize() );
const long lBorder = bBorder ? DOCUMENTBORDER : DOCUMENTBORDER * 2;
- BOOL bHori = pScrollbar->IsHoriScroll();
+ sal_Bool bHori = pScrollbar->IsHoriScroll();
const long lPos = pScrollbar->GetThumbPos() + (bBorder ? DOCUMENTBORDER : 0);
long Point:: *pPt = bHori ? &Point::nA : &Point::nB;
@@ -127,7 +127,7 @@ void lcl_GetPos(SwView* pView,
void SwView::InvalidateRulerPos()
{
- static USHORT __READONLY_DATA aInval[] =
+ static sal_uInt16 __READONLY_DATA aInval[] =
{
SID_ATTR_PARA_LRSPACE, SID_RULER_BORDERS, SID_RULER_PAGE_POS,
SID_RULER_LR_MIN_MAX, SID_ATTR_LONG_ULSPACE, SID_ATTR_LONG_LRSPACE,
@@ -189,14 +189,14 @@ aDocSz = rSz;
if( !pWrtShell || aVisArea.IsEmpty() ) // keine Shell -> keine Aenderung
{
- bDocSzUpdated = FALSE;
+ bDocSzUpdated = sal_False;
return;
}
//Wenn Text geloescht worden ist, kann es sein, dass die VisArea hinter
//den sichtbaren Bereich verweist
Rectangle aNewVisArea( aVisArea );
- BOOL bModified = false;
+ sal_Bool bModified = false;
SwTwips lGreenOffset = IsDocumentBorder() ? DOCUMENTBORDER : DOCUMENTBORDER * 2;
SwTwips lTmp = aDocSz.Width() + lGreenOffset;
@@ -205,7 +205,7 @@ aDocSz = rSz;
lTmp = aNewVisArea.Right() - lTmp;
aNewVisArea.Right() -= lTmp;
aNewVisArea.Left() -= lTmp;
- bModified = TRUE;
+ bModified = sal_True;
}
lTmp = aDocSz.Height() + lGreenOffset;
@@ -214,11 +214,11 @@ aDocSz = rSz;
lTmp = aNewVisArea.Bottom() - lTmp;
aNewVisArea.Bottom() -= lTmp;
aNewVisArea.Top() -= lTmp;
- bModified = TRUE;
+ bModified = sal_True;
}
if ( bModified )
- SetVisArea( aNewVisArea, FALSE );
+ SetVisArea( aNewVisArea, sal_False );
if ( UpdateScrollbars() && !bInOuterResizePixel && !bInInnerResizePixel &&
!GetViewFrame()->GetFrame().IsInPlace())
@@ -230,7 +230,7 @@ aDocSz = rSz;
Beschreibung: Visarea neu setzen
--------------------------------------------------------------------*/
-void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
+void SwView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollbar )
{
const Size aOldSz( aVisArea.GetSize() );
@@ -277,7 +277,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
aVisArea = aLR;
- const BOOL bOuterResize = bUpdateScrollbar && UpdateScrollbars();
+ const sal_Bool bOuterResize = bUpdateScrollbar && UpdateScrollbars();
if ( pWrtShell )
{
@@ -285,7 +285,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
if ( aOldSz != pWrtShell->VisArea().SSize() &&
( Abs(aOldSz.Width() - pWrtShell->VisArea().Width()) > 2 ||
Abs(aOldSz.Height() - pWrtShell->VisArea().Height()) > 2 ) )
- pWrtShell->CheckBrowseView( FALSE );
+ pWrtShell->CheckBrowseView( sal_False );
}
if ( !bProtectDocShellVisArea )
@@ -324,7 +324,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
Beschreibung: Pos VisArea setzen
--------------------------------------------------------------------*/
-void SwView::SetVisArea( const Point &rPt, BOOL bUpdateScrollbar )
+void SwView::SetVisArea( const Point &rPt, sal_Bool bUpdateScrollbar )
{
//einmal alignen, damit Brushes korrekt angesetzt werden.
//MA 31. May. 96: Das geht in der BrowseView schief, weil evlt.
@@ -364,7 +364,7 @@ void SwView::CheckVisArea()
Rectangle aNewVisArea( aVisArea );
aNewVisArea.Move( DOCUMENTBORDER - aVisArea.Left(),
DOCUMENTBORDER - aVisArea.Top() );
- SetVisArea( aNewVisArea, TRUE );
+ SetVisArea( aNewVisArea, sal_True );
}
}
}
@@ -376,12 +376,12 @@ void SwView::CheckVisArea()
Bereiches
IN Rectangle &rRect: Rechteck, das sich innerhalb des neuen
sichtbaren Bereiches befinden soll
- USHORT nRange optional exakte Angabe des Bereiches,
+ sal_uInt16 nRange optional exakte Angabe des Bereiches,
um den ggfs. gescrollt werden soll
--------------------------------------------------------------------*/
void SwView::CalcPt( Point *pPt, const Rectangle &rRect,
- USHORT nRangeX, USHORT nRangeY)
+ sal_uInt16 nRangeX, sal_uInt16 nRangeY)
{
const SwTwips lMin = IsDocumentBorder() ? DOCUMENTBORDER : 0;
@@ -428,13 +428,13 @@ void SwView::CalcPt( Point *pPt, const Rectangle &rRect,
Beschreibung: Scrolling
--------------------------------------------------------------------*/
-BOOL SwView::IsScroll( const Rectangle &rRect ) const
+sal_Bool SwView::IsScroll( const Rectangle &rRect ) const
{
return bCenterCrsr || bTopCrsr || !aVisArea.IsInside(rRect);
}
-void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY )
+void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRangeY )
{
if ( aVisArea.IsEmpty() )
return;
@@ -498,8 +498,8 @@ void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY )
aSize.Height()= Min( aSize.Height(),aVisSize.Height());
CalcPt( &aPt, Rectangle( rRect.TopLeft(), aSize ),
- static_cast< USHORT >((aVisSize.Width() - aSize.Width()) / 2),
- static_cast< USHORT >((aVisSize.Height()- aSize.Height())/ 2) );
+ static_cast< sal_uInt16 >((aVisSize.Width() - aSize.Width()) / 2),
+ static_cast< sal_uInt16 >((aVisSize.Height()- aSize.Height())/ 2) );
if( bTopCrsr )
{
@@ -561,10 +561,10 @@ void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY )
Liefern den Wert, um den bei PageUp / -Down gescrollt werden soll
--------------------------------------------------------------------*/
-BOOL SwView::GetPageScrollUpOffset( SwTwips &rOff ) const
+sal_Bool SwView::GetPageScrollUpOffset( SwTwips &rOff ) const
{
if ( !aVisArea.Top() || !aVisArea.GetHeight() )
- return FALSE;
+ return sal_False;
long nYScrl = GetYScroll() / 2;
rOff = -(aVisArea.GetHeight() - nYScrl);
//nicht vor den Dokumentanfang scrollen
@@ -572,15 +572,15 @@ BOOL SwView::GetPageScrollUpOffset( SwTwips &rOff ) const
rOff = rOff - aVisArea.Top();
else if( GetWrtShell().GetCharRect().Top() < (aVisArea.Top() + nYScrl))
rOff += nYScrl;
- return TRUE;
+ return sal_True;
}
-BOOL SwView::GetPageScrollDownOffset( SwTwips &rOff ) const
+sal_Bool SwView::GetPageScrollDownOffset( SwTwips &rOff ) const
{
if ( !aVisArea.GetHeight() ||
(aVisArea.GetHeight() > aDocSz.Height()) )
- return FALSE;
+ return sal_False;
long nYScrl = GetYScroll() / 2;
rOff = aVisArea.GetHeight() - nYScrl;
//nicht hinter das Dokumentende scrollen
@@ -622,7 +622,7 @@ long SwView::PageDown()
long SwView::PhyPageUp()
{
//aktuell sichtbare Seite erfragen, nicht formatieren
- USHORT nActPage = pWrtShell->GetNextPrevPageNum( FALSE );
+ sal_uInt16 nActPage = pWrtShell->GetNextPrevPageNum( sal_False );
if( USHRT_MAX != nActPage )
{
@@ -643,7 +643,7 @@ long SwView::PhyPageUp()
long SwView::PhyPageDown()
{
//aktuell sichtbare Seite erfragen, nicht formatieren
- USHORT nActPage = pWrtShell->GetNextPrevPageNum( TRUE );
+ sal_uInt16 nActPage = pWrtShell->GetNextPrevPageNum( sal_True );
// falls die letzte Dokumentseite sichtbar ist, nichts tun
if( USHRT_MAX != nActPage )
{
@@ -660,16 +660,16 @@ long SwView::PhyPageDown()
}
-long SwView::PageUpCrsr( BOOL bSelect )
+long SwView::PageUpCrsr( sal_Bool bSelect )
{
if ( !bSelect )
{
- const USHORT eType = pWrtShell->GetFrmType(0,TRUE);
+ const sal_uInt16 eType = pWrtShell->GetFrmType(0,sal_True);
if ( eType & FRMTYPE_FOOTNOTE )
{
pWrtShell->MoveCrsr();
pWrtShell->GotoFtnAnchor();
- pWrtShell->Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pWrtShell->Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
return 1;
}
}
@@ -681,13 +681,13 @@ long SwView::PageUpCrsr( BOOL bSelect )
PageUp() )
{
pWrtShell->ResetCursorStack();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-long SwView::PageDownCrsr(BOOL bSelect)
+long SwView::PageDownCrsr(sal_Bool bSelect)
{
SwTwips lOff = 0;
if ( GetPageScrollDownOffset( lOff ) &&
@@ -696,9 +696,9 @@ long SwView::PageDownCrsr(BOOL bSelect)
PageDown() )
{
pWrtShell->ResetCursorStack();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*------------------------------------------------------------------------
@@ -711,7 +711,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
return 0;
if ( pScrollbar->GetType() == SCROLL_DRAG )
- pWrtShell->EnableSmooth( FALSE );
+ pWrtShell->EnableSmooth( sal_False );
if(!pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
pScrollbar->GetType() == SCROLL_DRAG)
@@ -724,11 +724,11 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
Point aPos( aVisArea.TopLeft() );
lcl_GetPos(this, aPos, pScrollbar, IsDocumentBorder());
- USHORT nPhNum = 1;
- USHORT nVirtNum = 1;
+ sal_uInt16 nPhNum = 1;
+ sal_uInt16 nVirtNum = 1;
String sDisplay;
- if(pWrtShell->GetPageNumber( aPos.Y(), FALSE, nPhNum, nVirtNum, sDisplay ))
+ if(pWrtShell->GetPageNumber( aPos.Y(), sal_False, nPhNum, nVirtNum, sDisplay ))
{
// JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE,
// so we dont must do it agin.
@@ -771,7 +771,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
EndScrollHdl(pScrollbar);
if ( pScrollbar->GetType() == SCROLL_DRAG )
- pWrtShell->EnableSmooth( TRUE );
+ pWrtShell->EnableSmooth( sal_True );
return 0;
}
@@ -789,12 +789,12 @@ IMPL_LINK( SwView, EndScrollHdl, SwScrollbar *, pScrollbar )
Help::ShowQuickHelp(pScrollbar, Rectangle(), aEmptyStr, 0);
}
Point aPos( aVisArea.TopLeft() );
- BOOL bBorder = IsDocumentBorder();
+ sal_Bool bBorder = IsDocumentBorder();
lcl_GetPos(this, aPos, pScrollbar, bBorder);
if ( bBorder && aPos == aVisArea.TopLeft() )
UpdateScrollbars();
else
- SetVisArea( aPos, FALSE );
+ SetVisArea( aPos, sal_False );
GetViewFrame()->GetBindings().Update(FN_STAT_PAGE);
}
@@ -854,9 +854,9 @@ void SwView::CalcVisArea( const Size &rOutPixel )
--------------------------------------------------------------------*/
-void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
+void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ )
{
- BOOL bRightVRuler = pWrtShell->GetViewOptions()->IsVRulerRight();
+ sal_Bool bRightVRuler = pWrtShell->GetViewOptions()->IsVRulerRight();
if ( pVRuler->IsVisible() )
{
long nWidth = pVRuler->GetSizePixel().Width();
@@ -872,7 +872,7 @@ void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
const StyleSettings &rSet = GetEditWin().GetSettings().GetStyleSettings();
const long nTmp = rSet.GetScrollBarSize();
- if( pVScrollbar->IsVisible(FALSE) )
+ if( pVScrollbar->IsVisible(sal_False) )
{
if(bRightVRuler)
rToFill.Left() = nTmp;
@@ -892,7 +892,7 @@ void ViewResizePixel( const Window &rRef,
const Point &rOfst,
const Size &rSize,
const Size &rEditSz,
- const BOOL /*bInner*/,
+ const sal_Bool /*bInner*/,
SwScrollbar& rVScrollbar,
SwScrollbar& rHScrollbar,
ImageButton* pPageUpBtn,
@@ -901,23 +901,23 @@ void ViewResizePixel( const Window &rRef,
Window& rScrollBarBox,
SvxRuler* pVLineal,
SvxRuler* pHLineal,
- BOOL bWebView,
- BOOL bVRulerRight )
+ sal_Bool bWebView,
+ sal_Bool bVRulerRight )
{
// ViewResizePixel wird auch von der PreView benutzt!!!
- const BOOL bHLineal = pHLineal && pHLineal->IsVisible();
+ const sal_Bool bHLineal = pHLineal && pHLineal->IsVisible();
const long nHLinSzHeight = bHLineal ?
pHLineal->GetSizePixel().Height() : 0;
- const BOOL bVLineal = pVLineal && pVLineal->IsVisible();
+ const sal_Bool bVLineal = pVLineal && pVLineal->IsVisible();
const long nVLinSzWidth = bVLineal ?
pVLineal->GetSizePixel().Width() : 0;
- long nHBSzHeight2= rHScrollbar.IsVisible( FALSE ) || !rHScrollbar.IsAuto() ?
+ long nHBSzHeight2= rHScrollbar.IsVisible( sal_False ) || !rHScrollbar.IsAuto() ?
rRef.GetSettings().GetStyleSettings().GetScrollBarSize() : 0;
long nHBSzHeight =
- rHScrollbar.IsVisible(TRUE) || (rHScrollbar.IsVisible( FALSE ) && !rHScrollbar.IsAuto()) ?
+ rHScrollbar.IsVisible(sal_True) || (rHScrollbar.IsVisible( sal_False ) && !rHScrollbar.IsAuto()) ?
nHBSzHeight2:0;
- long nVBSzWidth = rVScrollbar.IsVisible(TRUE) || (rVScrollbar.IsVisible( FALSE ) && !rVScrollbar.IsAuto()) ?
+ long nVBSzWidth = rVScrollbar.IsVisible(sal_True) || (rVScrollbar.IsVisible( sal_False ) && !rVScrollbar.IsAuto()) ?
rRef.GetSettings().GetStyleSettings().GetScrollBarSize() : 0;
if(pVLineal)
@@ -986,10 +986,10 @@ void ViewResizePixel( const Window &rRef,
//#55949# wenn der Platz fuer Scrollbar und Page-Buttons zu klein wird, dann
// werden die Buttons versteckt
- USHORT nCnt = pNaviBtn ? 3 : 2;
+ sal_uInt16 nCnt = pNaviBtn ? 3 : 2;
long nSubSize = (aImgSz.Width() * nCnt );
//
- BOOL bHidePageButtons = aSize.Height() < ((bWebView ? 3 : 2) * nSubSize);
+ sal_Bool bHidePageButtons = aSize.Height() < ((bWebView ? 3 : 2) * nSubSize);
if(!bHidePageButtons)
aSize.Height() -= nSubSize;
else
@@ -1011,7 +1011,7 @@ void ViewResizePixel( const Window &rRef,
pPageDownBtn->SetPosSizePixel( aPos, aImgSz );
- if( rHScrollbar.IsVisible( FALSE ) )
+ if( rHScrollbar.IsVisible( sal_False ) )
{
aScrollFillPos.X() = aPos.X();
@@ -1024,7 +1024,7 @@ void ViewResizePixel( const Window &rRef,
void SwView::ShowAtResize()
{
- bShowAtResize = FALSE;
+ bShowAtResize = sal_False;
if ( pWrtShell->GetViewOptions()->IsViewHRuler() )
pHRuler->Show();
}
@@ -1044,15 +1044,15 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
Fraction( aSize.Height(), aObjSizePixel.Height() ) );
}
- bInInnerResizePixel = TRUE;
- const BOOL bHScrollVisible = pHScrollbar->IsVisible(TRUE);
- const BOOL bVScrollVisible = pVScrollbar->IsVisible(TRUE);
- BOOL bRepeat = FALSE;
+ bInInnerResizePixel = sal_True;
+ const sal_Bool bHScrollVisible = pHScrollbar->IsVisible(sal_True);
+ const sal_Bool bVScrollVisible = pVScrollbar->IsVisible(sal_True);
+ sal_Bool bRepeat = sal_False;
do
{
Size aSz( rSize );
SvBorder aBorder;
- CalcAndSetBorderPixel( aBorder, TRUE );
+ CalcAndSetBorderPixel( aBorder, sal_True );
if ( GetViewFrame()->GetFrame().IsInPlace() )
{
Size aViewSize( aSz );
@@ -1070,7 +1070,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
}
Size aEditSz( GetEditWin().GetOutputSizePixel() );
- ViewResizePixel( GetEditWin(), rOfst, aSz, aEditSz, TRUE, *pVScrollbar,
+ ViewResizePixel( GetEditWin(), rOfst, aSz, aEditSz, sal_True, *pVScrollbar,
*pHScrollbar, pPageUpBtn, pPageDownBtn,
pNaviBtn,
*pScrollFill, pVRuler, pHRuler,
@@ -1082,9 +1082,9 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
if( pHRuler->IsVisible() || pVRuler->IsVisible() )
{
const Fraction& rFrac = GetEditWin().GetMapMode().GetScaleX();
- USHORT nZoom = 100;
+ sal_uInt16 nZoom = 100;
if (0 != rFrac.GetDenominator())
- nZoom = USHORT(rFrac.GetNumerator() * 100L / rFrac.GetDenominator());
+ nZoom = sal_uInt16(rFrac.GetNumerator() * 100L / rFrac.GetDenominator());
const Fraction aFrac( nZoom, 100 );
pVRuler->SetZoom( aFrac );
@@ -1098,18 +1098,18 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
//EditWin niemals einstellen!
//VisArea einstellen, aber dort nicht das SetVisArea der DocShell rufen!
- bProtectDocShellVisArea = TRUE;
+ bProtectDocShellVisArea = sal_True;
CalcVisArea( aEditSz );
//visibility changes of the automatic horizontal scrollbar
//require to repeat the ViewResizePixel() call - but only once!
if(bRepeat)
- bRepeat = FALSE;
- else if(bHScrollVisible != pHScrollbar->IsVisible(TRUE) ||
- bVScrollVisible != pVScrollbar->IsVisible(TRUE))
- bRepeat = TRUE;
+ bRepeat = sal_False;
+ else if(bHScrollVisible != pHScrollbar->IsVisible(sal_True) ||
+ bVScrollVisible != pVScrollbar->IsVisible(sal_True))
+ bRepeat = sal_True;
}while( bRepeat );
- bProtectDocShellVisArea = FALSE;
- bInInnerResizePixel = FALSE;
+ bProtectDocShellVisArea = sal_False;
+ bInInnerResizePixel = sal_False;
}
@@ -1118,13 +1118,13 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
// FME 22.08.2003 #i16909# - return, if no size (caused by minimize window).
if ( bInOuterResizePixel || ( !rSize.Width() && !rSize.Height() ) )
return;
- bInOuterResizePixel = TRUE;
+ bInOuterResizePixel = sal_True;
// feststellen, ob Scrollbars angezeigt werden duerfen
- BOOL bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- BOOL bShowH = FALSE,
- bShowV = FALSE,
- bAuto = FALSE,
+ sal_Bool bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ sal_Bool bShowH = sal_False,
+ bShowV = sal_False,
+ bAuto = sal_False,
bHAuto = bBrowse;
switch( GetScrollingMode() )
{
@@ -1140,45 +1140,45 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
}
/* kein break hier */
case SCROLLING_AUTO:
- bAuto = bHAuto = TRUE;
- bShowH = bShowV = TRUE;
+ bAuto = bHAuto = sal_True;
+ bShowH = bShowV = sal_True;
break;
case SCROLLING_YES:
- bShowH = bShowV = TRUE;
+ bShowH = bShowV = sal_True;
break;
case SCROLLING_NO:
- bShowH = bShowV = bHAuto = FALSE;
+ bShowH = bShowV = bHAuto = sal_False;
break;
}
SwDocShell* pDocSh = GetDocShell();
- BOOL bIsPreview = pDocSh->IsPreview();
+ sal_Bool bIsPreview = pDocSh->IsPreview();
if( bIsPreview )
{
- bShowH = bShowV = bHAuto = bAuto = FALSE;
+ bShowH = bShowV = bHAuto = bAuto = sal_False;
}
- if(pHScrollbar->IsVisible(FALSE) != bShowH)
+ if(pHScrollbar->IsVisible(sal_False) != bShowH)
ShowHScrollbar(bShowH);
pHScrollbar->SetAuto( bHAuto );
- if(pVScrollbar->IsVisible(FALSE) != bShowV)
+ if(pVScrollbar->IsVisible(sal_False) != bShowV)
ShowVScrollbar(bShowV);
pVScrollbar->SetAuto(bAuto);
SET_CURR_SHELL( pWrtShell );
- BOOL bRepeat = FALSE;
+ sal_Bool bRepeat = sal_False;
long nCnt = 0;
- BOOL bUnLockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE );
+ sal_Bool bUnLockView = !pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True );
pWrtShell->LockPaint();
do {
++nCnt;
- const BOOL bScroll1 = pVScrollbar->IsVisible(TRUE);
- const BOOL bScroll2 = pHScrollbar->IsVisible(TRUE);
+ const sal_Bool bScroll1 = pVScrollbar->IsVisible(sal_True);
+ const sal_Bool bScroll2 = pHScrollbar->IsVisible(sal_True);
SvBorder aBorder;
- CalcAndSetBorderPixel( aBorder, FALSE );
+ CalcAndSetBorderPixel( aBorder, sal_False );
const Size aEditSz( GetEditWin().GetOutputSizePixel() );
- ViewResizePixel( GetEditWin(), rOfst, rSize, aEditSz, FALSE, *pVScrollbar,
+ ViewResizePixel( GetEditWin(), rOfst, rSize, aEditSz, sal_False, *pVScrollbar,
*pHScrollbar, pPageUpBtn, pPageDownBtn,
pNaviBtn,
*pScrollFill, pVRuler, pHRuler,
@@ -1215,12 +1215,12 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
pDocSh->SfxInPlaceObject::GetVisArea() );*/
if ( pWrtShell->GetViewOptions()->GetZoomType() != SVX_ZOOM_PERCENT &&
!pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- _SetZoom( aEditSz, (SvxZoomType)pWrtShell->GetViewOptions()->GetZoomType(), 100, TRUE );
+ _SetZoom( aEditSz, (SvxZoomType)pWrtShell->GetViewOptions()->GetZoomType(), 100, sal_True );
pWrtShell->EndAction();
- bRepeat = bScroll1 != pVScrollbar->IsVisible(TRUE);
+ bRepeat = bScroll1 != pVScrollbar->IsVisible(sal_True);
if ( !bRepeat )
- bRepeat = bScroll2 != pHScrollbar->IsVisible(TRUE);
+ bRepeat = bScroll2 != pHScrollbar->IsVisible(sal_True);
//Nicht endlosschleifen. Moeglichst dann stoppen wenn die
//(Auto-)Scrollbars sichtbar sind.
@@ -1228,14 +1228,14 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
( nCnt > 10 || ( nCnt > 3 && bHAuto && bAuto ) )
)
{
- bRepeat = FALSE;
+ bRepeat = sal_False;
}
}while ( bRepeat );
- if( pVScrollbar->IsVisible(FALSE) || pVScrollbar->IsAuto())
+ if( pVScrollbar->IsVisible(sal_False) || pVScrollbar->IsAuto())
{
- BOOL bShowButtons = pVScrollbar->IsVisible(TRUE);
+ sal_Bool bShowButtons = pVScrollbar->IsVisible(sal_True);
if(pPageUpBtn && pPageUpBtn->IsVisible() != bShowButtons)
{
pPageUpBtn->Show(bShowButtons);
@@ -1248,9 +1248,9 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
pWrtShell->UnlockPaint();
if( bUnLockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
- bInOuterResizePixel = FALSE;
+ bInOuterResizePixel = sal_False;
if ( mpPostItMgr )
{
@@ -1293,12 +1293,12 @@ Size SwView::GetOptimalSizePixel() const
}
-BOOL SwView::UpdateScrollbars()
+sal_Bool SwView::UpdateScrollbars()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !aVisArea.IsEmpty() )
{
- const BOOL bBorder = IsDocumentBorder();
+ const sal_Bool bBorder = IsDocumentBorder();
Rectangle aTmpRect( aVisArea );
if ( bBorder )
{
@@ -1312,11 +1312,11 @@ BOOL SwView::UpdateScrollbars()
aTmpSz.Width() += lOfst; aTmpSz.Height() += lOfst;
{
- const BOOL bVScrollVisible = pVScrollbar->IsVisible(TRUE);
+ const sal_Bool bVScrollVisible = pVScrollbar->IsVisible(sal_True);
pVScrollbar->DocSzChgd( aTmpSz );
pVScrollbar->ViewPortChgd( aTmpRect );
- BOOL bShowButtons = pVScrollbar->IsVisible(TRUE);
+ sal_Bool bShowButtons = pVScrollbar->IsVisible(sal_True);
if(pPageUpBtn && pPageUpBtn->IsVisible() != bShowButtons)
{
pPageUpBtn->Show(bShowButtons);
@@ -1326,16 +1326,16 @@ BOOL SwView::UpdateScrollbars()
pNaviBtn->Show(bShowButtons);
}
- if ( bVScrollVisible != pVScrollbar->IsVisible(TRUE) )
- bRet = TRUE;
+ if ( bVScrollVisible != pVScrollbar->IsVisible(sal_True) )
+ bRet = sal_True;
}
{
- const BOOL bHScrollVisible = pHScrollbar->IsVisible(TRUE);
+ const sal_Bool bHScrollVisible = pHScrollbar->IsVisible(sal_True);
pHScrollbar->DocSzChgd( aTmpSz );
pHScrollbar->ViewPortChgd( aTmpRect );
- if ( bHScrollVisible != pHScrollbar->IsVisible(TRUE) )
- bRet = TRUE;
- pScrollFill->Show(pHScrollbar->IsVisible(TRUE) && pVScrollbar->IsVisible(TRUE) );
+ if ( bHScrollVisible != pHScrollbar->IsVisible(sal_True) )
+ bRet = sal_True;
+ pScrollFill->Show(pHScrollbar->IsVisible(sal_True) && pVScrollbar->IsVisible(sal_True) );
}
}
return bRet;
@@ -1349,30 +1349,30 @@ void SwView::Move()
SfxViewShell::Move();
}
-BOOL SwView::HandleWheelCommands( const CommandEvent& rCEvt )
+sal_Bool SwView::HandleWheelCommands( const CommandEvent& rCEvt )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
const CommandWheelData* pWData = rCEvt.GetWheelData();
if( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() )
{
- USHORT nFact = pWrtShell->GetViewOptions()->GetZoom();
+ sal_uInt16 nFact = pWrtShell->GetViewOptions()->GetZoom();
if( 0L > pWData->GetDelta() )
- nFact = static_cast< USHORT >(Max( 20, nFact - 10 ));
+ nFact = static_cast< sal_uInt16 >(Max( 20, nFact - 10 ));
else
- nFact = static_cast< USHORT >(Min( 600, nFact + 10 ));
+ nFact = static_cast< sal_uInt16 >(Min( 600, nFact + 10 ));
SetZoom( SVX_ZOOM_PERCENT, nFact );
- bOk = TRUE;
+ bOk = sal_True;
}
else
{
- if (pWData && (COMMAND_WHEEL_SCROLL==pWData->GetMode()) && (((ULONG)0xFFFFFFFF) == pWData->GetScrollLines()))
+ if (pWData && (COMMAND_WHEEL_SCROLL==pWData->GetMode()) && (((sal_uLong)0xFFFFFFFF) == pWData->GetScrollLines()))
{
if (pWData->GetDelta()<0)
PhyPageDown();
else
PhyPageUp();
- bOk = TRUE;
+ bOk = sal_True;
}
else
bOk = pEditWin->HandleScrollCommand( rCEvt,
diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx
index 64e0d5142db7..4ba284987091 100644
--- a/sw/source/ui/uiview/viewprt.cxx
+++ b/sw/source/ui/uiview/viewprt.cxx
@@ -97,14 +97,14 @@ using namespace ::com::sun::star;
--------------------------------------------------------------------*/
-SfxPrinter* __EXPORT SwView::GetPrinter( BOOL bCreate )
+SfxPrinter* __EXPORT SwView::GetPrinter( sal_Bool bCreate )
{
const IDocumentDeviceAccess* pIDDA = GetWrtShell().getIDocumentDeviceAccess();
SfxPrinter *pOld = pIDDA->getPrinter( false );
SfxPrinter *pPrt = pIDDA->getPrinter( bCreate );
if ( pOld != pPrt )
{
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
::SetAppPrintOptions( &GetWrtShell(), bWeb );
}
return pPrt;
@@ -114,7 +114,7 @@ SfxPrinter* __EXPORT SwView::GetPrinter( BOOL bCreate )
Beschreibung: Druckerwechsel weitermelden
--------------------------------------------------------------------*/
-void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, BOOL bWeb )
+void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, sal_Bool bWeb )
{
SwPrintOptions* pOpt = SW_MOD()->GetPrtOptions(bWeb);
if( !pOpt)
@@ -124,7 +124,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, BOOL bWeb )
const SfxItemSet& rSet = pNew->GetOptions();
const SwAddPrinterItem* pAddPrinterAttr;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, FALSE,
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, sal_False,
(const SfxPoolItem**)&pAddPrinterAttr ) )
{
if( pIDDA )
@@ -135,7 +135,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, BOOL bWeb )
}
-USHORT __EXPORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
+sal_uInt16 __EXPORT SwView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool )
{
SwWrtShell &rSh = GetWrtShell();
SfxPrinter* pOld = rSh.getIDocumentDeviceAccess()->getPrinter( false );
@@ -148,17 +148,17 @@ USHORT __EXPORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
if ( nDiffFlags & SFX_PRINTER_PRINTER )
rSh.SetModified();
}
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
if ( nDiffFlags & SFX_PRINTER_OPTIONS )
::SetPrinter( rSh.getIDocumentDeviceAccess(), pNew, bWeb );
- const BOOL bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? TRUE : FALSE;
- const BOOL bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? TRUE : FALSE;
+ const sal_Bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? sal_True : sal_False;
+ const sal_Bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? sal_True : sal_False;
if ( bChgOri || bChgSize )
{
rSh.StartAllAction();
if ( bChgOri )
- rSh.ChgAllPageOrientation( USHORT(pNew->GetOrientation()) );
+ rSh.ChgAllPageOrientation( sal_uInt16(pNew->GetOrientation()) );
if ( bChgSize )
{
Size aSz( SvxPaperInfo::GetPaperSize( pNew ) );
@@ -178,7 +178,7 @@ USHORT __EXPORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
SfxTabPage* __EXPORT SwView::CreatePrintOptionsPage(Window* pParent,
const SfxItemSet& rSet)
{
- return ::CreatePrintOptionsPage( pParent, rSet, FALSE );
+ return ::CreatePrintOptionsPage( pParent, rSet, sal_False );
}
/*--------------------------------------------------------------------
@@ -187,7 +187,7 @@ SfxTabPage* __EXPORT SwView::CreatePrintOptionsPage(Window* pParent,
void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
{
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
::SetAppPrintOptions( &GetWrtShell(), bWeb );
switch (rReq.GetSlot())
{
@@ -198,7 +198,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
if (sFaxName.Len())
{
SfxStringItem aPrinterName(SID_PRINTER_NAME, sFaxName);
- SfxBoolItem aSilent( SID_SILENT, TRUE );
+ SfxBoolItem aSilent( SID_SILENT, sal_True );
GetViewFrame()->GetDispatcher()->Execute( SID_PRINTDOC,
SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD,
&aPrinterName, &aSilent, 0L );
@@ -207,7 +207,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
{
InfoBox aInfoBox(&GetEditWin(), SW_RES(MSG_ERR_NO_FAX));
String sMsg = aInfoBox.GetMessText();
- USHORT nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS;
+ sal_uInt16 nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS;
sMsg.SearchAndReplace(String::CreateFromAscii("%1"), String(SW_RES(nResNo)));
aInfoBox.SetMessText(sMsg);
aInfoBox.Execute();
@@ -222,12 +222,12 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
case SID_PRINTDOCDIRECT:
{
SwWrtShell* pSh = &GetWrtShell();
- SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, FALSE);
- BOOL bSilent = pSilentItem ? pSilentItem->GetValue() : FALSE;
- SFX_REQUEST_ARG(rReq, pPrintFromMergeItem, SfxBoolItem, FN_QRY_MERGE, FALSE);
+ SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, sal_False);
+ sal_Bool bSilent = pSilentItem ? pSilentItem->GetValue() : sal_False;
+ SFX_REQUEST_ARG(rReq, pPrintFromMergeItem, SfxBoolItem, FN_QRY_MERGE, sal_False);
if(pPrintFromMergeItem)
rReq.RemoveItem(FN_QRY_MERGE);
- BOOL bFromMerge = pPrintFromMergeItem ? pPrintFromMergeItem->GetValue() : FALSE;
+ sal_Bool bFromMerge = pPrintFromMergeItem ? pPrintFromMergeItem->GetValue() : sal_False;
SwMiscConfig aMiscConfig;
bool bPrintSelection = false;
if(!bSilent && !bFromMerge &&
@@ -237,7 +237,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
short nRet = aBox.Execute();
if(RET_YES == nRet)
{
- SfxBoolItem aBool(FN_QRY_MERGE, TRUE);
+ SfxBoolItem aBool(FN_QRY_MERGE, sal_True);
GetViewFrame()->GetDispatcher()->Execute(
FN_QRY_MERGE, SFX_CALLMODE_ASYNCHRON, &aBool, 0L);
rReq.Ignore();
@@ -281,7 +281,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
--------------------------------------------------------------------*/
SfxTabPage* CreatePrintOptionsPage( Window *pParent,
- const SfxItemSet &rOptions, BOOL bPreview )
+ const SfxItemSet &rOptions, sal_Bool bPreview )
{
SfxTabPage* pPage = NULL;
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -299,7 +299,7 @@ SfxTabPage* CreatePrintOptionsPage( Window *pParent,
}
-void SetAppPrintOptions( ViewShell* pSh, BOOL bWeb )
+void SetAppPrintOptions( ViewShell* pSh, sal_Bool bWeb )
{
const IDocumentDeviceAccess* pIDDA = pSh->getIDocumentDeviceAccess();
SwPrintData aPrtData = pIDDA->getPrintData();
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index dd2db26a58e8..1c702dddab3d 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -80,9 +80,9 @@ using namespace ::com::sun::star::i18n;
struct SwSearchOptions
{
SwDocPositions eStart, eEnd;
- BOOL bDontWrap;
+ sal_Bool bDontWrap;
- SwSearchOptions( SwWrtShell* pSh, BOOL bBackward );
+ SwSearchOptions( SwWrtShell* pSh, sal_Bool bBackward );
};
@@ -102,24 +102,24 @@ inline Window* GetParentWindow( SvxSearchDialog* pSrchDlg )
--------------------------------------------------*/
-void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
+void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
- const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
- BOOL bQuiet = FALSE;
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_SEARCH_QUIET, FALSE, &pItem))
+ sal_Bool bQuiet = sal_False;
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_SEARCH_QUIET, sal_False, &pItem))
bQuiet = ((const SfxBoolItem*) pItem)->GetValue();
- BOOL bApi = bQuiet | bNoMessage;
+ sal_Bool bApi = bQuiet | bNoMessage;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if (nSlot == FN_REPEAT_SEARCH && !pSrchItem)
{
if(bApi)
{
- rReq.SetReturnValue(SfxBoolItem(nSlot, FALSE));
+ rReq.SetReturnValue(SfxBoolItem(nSlot, sal_False));
nSlot = 0;
}
}
@@ -136,7 +136,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
break;
case FID_SEARCH_ON:
- bJustOpened = TRUE;
+ bJustOpened = sal_True;
GetViewFrame()->GetBindings().Invalidate(SID_SEARCH_ITEM);
break;
@@ -213,7 +213,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
{
case SVX_SEARCHCMD_FIND:
{
- BOOL bRet = SearchAndWrap(bApi);
+ sal_Bool bRet = SearchAndWrap(bApi);
if( bRet )
Scroll(pWrtShell->GetCharRect().SVRect());
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
@@ -221,7 +221,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
break;
case SVX_SEARCHCMD_FIND_ALL:
{
- BOOL bRet = SearchAll();
+ sal_Bool bRet = SearchAll();
if( !bRet )
{
if( !bApi )
@@ -229,7 +229,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
Window* pParentWindow = GetParentWindow( pSrchDlg );
InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute();
}
- bFound = FALSE;
+ bFound = sal_False;
}
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
}
@@ -242,7 +242,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
//JP 27.04.95: warum ?
// was ist, wenn man das gefundene nur attributieren will??
- USHORT nCmd = SVX_SEARCHCMD_FIND;
+ sal_uInt16 nCmd = SVX_SEARCHCMD_FIND;
if( pSrchItem->GetReplaceString().Len() ||
!pReplList )
{
@@ -250,7 +250,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
// Ersetzungsstring enthalten ist - der ersetzte String
// noch einmal gefunden wird.
- BOOL bBack = pSrchItem->GetBackward();
+ sal_Bool bBack = pSrchItem->GetBackward();
if (bBack)
pWrtShell->Push();
String aReplace( pSrchItem->GetReplaceString() );
@@ -275,9 +275,9 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
// 2) Weiter suchen (ohne zu ersetzen!)
- USHORT nOldCmd = pSrchItem->GetCommand();
+ sal_uInt16 nOldCmd = pSrchItem->GetCommand();
pSrchItem->SetCommand( nCmd );
- BOOL bRet = SearchAndWrap(bApi);
+ sal_Bool bRet = SearchAndWrap(bApi);
if( bRet )
Scroll( pWrtShell->GetCharRect().SVRect());
pSrchItem->SetCommand( nOldCmd );
@@ -294,18 +294,18 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
{
// bestehende Selektionen aufheben,
// wenn nicht in selektierten Bereichen gesucht werden soll
- (pWrtShell->*pWrtShell->fnKillSel)(0, FALSE);
+ (pWrtShell->*pWrtShell->fnKillSel)(0, sal_False);
if( DOCPOS_START == aOpts.eEnd )
pWrtShell->EndDoc();
else
pWrtShell->SttDoc();
}
- bExtra = FALSE;
- ULONG nFound;
+ bExtra = sal_False;
+ sal_uLong nFound;
{ //Scope for SwWait-Object
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
nFound = FUNC_Search( aOpts );
pWrtShell->EndAllAction();
@@ -318,7 +318,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
Window* pParentWindow = GetParentWindow( pSrchDlg );
InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute();
}
- bFound = FALSE;
+ bFound = sal_False;
return;
}
@@ -347,7 +347,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
case FID_SEARCH_SEARCHSET:
case FID_SEARCH_REPLACESET:
{
- static const USHORT aNormalAttr[] =
+ static const sal_uInt16 aNormalAttr[] =
{
/* 0 */ RES_CHRATR_CASEMAP, RES_CHRATR_CASEMAP,
/* 2 */ RES_CHRATR_COLOR, RES_CHRATR_POSTURE,
@@ -365,13 +365,13 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
/*24 */ 0
};
- static const USHORT aCJKAttr[] =
+ static const sal_uInt16 aCJKAttr[] =
{
RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_WEIGHT,
RES_CHRATR_EMPHASIS_MARK, RES_CHRATR_TWO_LINES,
RES_PARATR_SCRIPTSPACE, RES_PARATR_FORBIDDEN_RULES
};
- static const USHORT aCTLAttr[] =
+ static const sal_uInt16 aCTLAttr[] =
{
RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_WEIGHT
};
@@ -391,7 +391,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
14 );
SfxItemSet aSet( pWrtShell->GetAttrPool(), aArr.GetData() );
- USHORT nWhich = SID_SEARCH_SEARCHSET;
+ sal_uInt16 nWhich = SID_SEARCH_SEARCHSET;
if ( FID_SEARCH_REPLACESET == nSlot )
{
@@ -426,7 +426,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
}
-BOOL SwView::SearchAndWrap(BOOL bApi)
+sal_Bool SwView::SearchAndWrap(sal_Bool bApi)
{
SwSearchOptions aOpts( pWrtShell, pSrchItem->GetBackward() );
@@ -438,12 +438,12 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
// falls in selektierten Bereichen gesucht werden soll, duerfen sie
// nicht aufgehoben werden
if (!pSrchItem->GetSelection())
- (pWrtShell->*pWrtShell->fnKillSel)(0, FALSE);
+ (pWrtShell->*pWrtShell->fnKillSel)(0, sal_False);
- SwWait *pWait = new SwWait( *GetDocShell(), TRUE );
+ SwWait *pWait = new SwWait( *GetDocShell(), sal_True );
if( FUNC_Search( aOpts ) )
{
- bFound = TRUE;
+ bFound = sal_True;
if(pWrtShell->IsSelFrmMode())
{
pWrtShell->UnSelectFrm();
@@ -452,30 +452,30 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
pWrtShell->Pop();
pWrtShell->EndAllAction();
delete pWait;
- return TRUE;
+ return sal_True;
}
delete pWait, pWait = 0;
// Suchen in den Sonderbereichen, wenn keine
// Suche in Selektionen vorliegt. Bei Suche in Selektionen
// wird ohnehin in diesen Sonderbereichen gesucht
- BOOL bHasSrchInOther = bExtra;
+ sal_Bool bHasSrchInOther = bExtra;
if (!pSrchItem->GetSelection() && !bExtra )
{
- bExtra = TRUE;
+ bExtra = sal_True;
if( FUNC_Search( aOpts ) )
{
- bFound = TRUE;
+ bFound = sal_True;
pWrtShell->Pop();
pWrtShell->EndAllAction();
- return TRUE;
+ return sal_True;
}
- bExtra = FALSE;
+ bExtra = sal_False;
}
else
bExtra = !bExtra;
- const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
pSrchDlg = pWrp ? static_cast <SvxSearchDialog*> (pWrp->getDialog ()) : 0;
@@ -488,9 +488,9 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
Window* pParentWindow = GetParentWindow( pSrchDlg );
InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute();
}
- bFound = FALSE;
+ bFound = sal_False;
pWrtShell->Pop();
- return FALSE;
+ return sal_False;
}
pWrtShell->EndAllAction();
// noch mal mit WrapAround versuchen?
@@ -501,15 +501,15 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
: MSG_SEARCH_END )
).Execute() )
{
- bFound = FALSE;
+ bFound = sal_False;
pWrtShell->Pop();
- return FALSE;
+ return sal_False;
}
pWrtShell->StartAllAction();
- pWrtShell->Pop(FALSE);
- pWait = new SwWait( *GetDocShell(), TRUE );
+ pWrtShell->Pop(sal_False);
+ pWait = new SwWait( *GetDocShell(), sal_True );
- BOOL bSrchBkwrd = DOCPOS_START == aOpts.eEnd;
+ sal_Bool bSrchBkwrd = DOCPOS_START == aOpts.eEnd;
aOpts.eEnd = bSrchBkwrd ? DOCPOS_START : DOCPOS_END;
aOpts.eStart = bSrchBkwrd ? DOCPOS_END : DOCPOS_START;
@@ -533,13 +533,13 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
Window* pParentWindow = GetParentWindow( pSrchDlg );
InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute();
}
- return bFound = FALSE;
+ return bFound = sal_False;
}
-BOOL SwView::SearchAll(USHORT* pFound)
+sal_Bool SwView::SearchAll(sal_uInt16* pFound)
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
SwSearchOptions aOpts( pWrtShell, pSrchItem->GetBackward() );
@@ -548,15 +548,15 @@ BOOL SwView::SearchAll(USHORT* pFound)
{
// bestehende Selektionen aufheben,
// wenn nicht in selektierten Bereichen gesucht werden soll
- (pWrtShell->*pWrtShell->fnKillSel)(0, FALSE);
+ (pWrtShell->*pWrtShell->fnKillSel)(0, sal_False);
if( DOCPOS_START == aOpts.eEnd )
pWrtShell->EndDoc();
else
pWrtShell->SttDoc();
}
- bExtra = FALSE;
- USHORT nFound = (USHORT)FUNC_Search( aOpts );
+ bExtra = sal_False;
+ sal_uInt16 nFound = (sal_uInt16)FUNC_Search( aOpts );
if(pFound)
*pFound = nFound;
bFound = 0 != nFound;
@@ -568,7 +568,7 @@ BOOL SwView::SearchAll(USHORT* pFound)
void SwView::Replace()
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
@@ -611,7 +611,7 @@ void SwView::Replace()
-SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, BOOL bBackward )
+SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, sal_Bool bBackward )
{
eStart = DOCPOS_CURR;
if( bBackward )
@@ -626,9 +626,9 @@ SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, BOOL bBackward )
}
}
-ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
+sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
{
- BOOL bDoReplace = pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE ||
+ sal_Bool bDoReplace = pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE ||
pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE_ALL;
int eRanges = pSrchItem->GetSelection() ?
@@ -639,7 +639,7 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
pWrtShell->SttSelect();
- static USHORT __READONLY_DATA aSearchAttrRange[] = {
+ static sal_uInt16 __READONLY_DATA aSearchAttrRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -673,11 +673,11 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
// build SearchOptions to be used
//
SearchOptions aSearchOpt( pSrchItem->GetSearchOptions() );
- aSearchOpt.Locale = SvxCreateLocale( (USHORT)GetAppLanguage() );
+ aSearchOpt.Locale = SvxCreateLocale( (sal_uInt16)GetAppLanguage() );
if( !bDoReplace )
aSearchOpt.replaceString = aEmptyStr;
- ULONG nFound;
+ sal_uLong nFound;
if( aSrchSet.Count() || ( pReplSet && pReplSet->Count() ))
{
nFound = pWrtShell->SearchAttr(
@@ -714,7 +714,7 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
LAYOUT_NS Dialog* SwView::GetSearchDialog()
{
- const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)SfxViewFrame::Current()->GetChildWindow(nId);
if ( pWrp )
pSrchDlg = pWrp->getDialog ();
@@ -726,7 +726,7 @@ LAYOUT_NS Dialog* SwView::GetSearchDialog()
void SwView::StateSearch(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while(nWhich)
{
@@ -734,7 +734,7 @@ void SwView::StateSearch(SfxItemSet &rSet)
{
case SID_SEARCH_OPTIONS:
{
- UINT16 nOpt = 0xFFFF;
+ sal_uInt16 nOpt = 0xFFFF;
if( GetDocShell()->IsReadOnly() )
nOpt &= ~( SEARCH_OPTIONS_REPLACE |
SEARCH_OPTIONS_REPLACE_ALL );
@@ -757,13 +757,13 @@ void SwView::StateSearch(SfxItemSet &rSet)
( aTxt = pWrtShell->SwCrsrShell::GetSelTxt() ).Len() )
{
pSrchItem->SetSearchString( aTxt );
- pSrchItem->SetSelection( FALSE );
+ pSrchItem->SetSelection( sal_False );
}
else
- pSrchItem->SetSelection( TRUE );
+ pSrchItem->SetSelection( sal_True );
}
- bJustOpened = FALSE;
+ bJustOpened = sal_False;
rSet.Put( *pSrchItem );
}
break;
@@ -771,7 +771,7 @@ void SwView::StateSearch(SfxItemSet &rSet)
/* case SID_SEARCH_REPLACESET:
case SID_SEARCH_SEARCHSET:
{
- static USHORT __READONLY_DATA aSearchAttrRange[] =
+ static sal_uInt16 __READONLY_DATA aSearchAttrRange[] =
{
RES_CHRATR_CASEMAP, RES_CHRATR_POSTURE,
RES_CHRATR_SHADOWED, RES_CHRATR_WORDLINEMODE,
diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx
index d0b9d2a06827..fed08c5e90c9 100644
--- a/sw/source/ui/uiview/viewstat.cxx
+++ b/sw/source/ui/uiview/viewstat.cxx
@@ -183,7 +183,7 @@ void SwView::GetState(SfxItemSet &rSet)
if(pWrtShell->IsInVerticalText())
aImgItem.SetRotation(2700);
if(pWrtShell->IsInRightToLeftText())
- aImgItem.SetMirrored(TRUE);
+ aImgItem.SetMirrored(sal_True);
}
rSet.Put(aImgItem);
}
@@ -201,7 +201,7 @@ void SwView::GetState(SfxItemSet &rSet)
if(pWrtShell->IsInVerticalText())
aImgItem.SetRotation(2700);
if(pWrtShell->IsInRightToLeftText())
- aImgItem.SetMirrored(TRUE);
+ aImgItem.SetMirrored(sal_True);
}
rSet.Put(aImgItem);
}
@@ -355,7 +355,7 @@ void SwView::GetState(SfxItemSet &rSet)
if(pWrtShell->IsInVerticalText())
aImageItem.SetRotation( 2700 );
if(pWrtShell->IsInRightToLeftText())
- aImageItem.SetMirrored( TRUE );
+ aImageItem.SetMirrored( sal_True );
rSet.Put(aImageItem);
}
break;
@@ -383,7 +383,7 @@ void SwView::GetState(SfxItemSet &rSet)
{
if( !pShell )
SelectShell();
- USHORT nAlias = 0;
+ sal_uInt16 nAlias = 0;
bool bDraw = false;
if( nSelectionType & (nsSelectionType::SEL_DRW_TXT|nsSelectionType::SEL_TXT) )
{
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index ca65184c74e6..ee5522595f96 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -86,19 +86,19 @@ using namespace ::com::sun::star;
void lcl_FillSvxColumn(const SwFmtCol& rCol,
- USHORT nTotalWidth,
+ sal_uInt16 nTotalWidth,
SvxColumnItem& rColItem,
long nDistance)
{
const SwColumns& rCols = rCol.GetColumns();
- USHORT nWidth = 0;
+ sal_uInt16 nWidth = 0;
- BOOL bOrtho = rCol.IsOrtho() && rCols.Count();
+ sal_Bool bOrtho = rCol.IsOrtho() && rCols.Count();
long nInnerWidth = 0;
if( bOrtho )
{
nInnerWidth = nTotalWidth;
- for ( USHORT i = 0; i < rCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rCols.Count(); ++i )
{
SwColumn* pCol = rCols[i];
nInnerWidth -= pCol->GetLeft() + pCol->GetRight();
@@ -108,17 +108,17 @@ void lcl_FillSvxColumn(const SwFmtCol& rCol,
else
nInnerWidth /= rCols.Count();
}
- for ( USHORT i = 0; i < rCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rCols.Count(); ++i )
{
SwColumn* pCol = rCols[i];
- const USHORT nStart = USHORT(pCol->GetLeft() + nWidth + nDistance);
+ const sal_uInt16 nStart = sal_uInt16(pCol->GetLeft() + nWidth + nDistance);
if( bOrtho )
- nWidth = static_cast< USHORT >(nWidth + nInnerWidth + pCol->GetLeft() + pCol->GetRight());
+ nWidth = static_cast< sal_uInt16 >(nWidth + nInnerWidth + pCol->GetLeft() + pCol->GetRight());
else
- nWidth = static_cast< USHORT >(nWidth + rCol.CalcColWidth(i, nTotalWidth));
- const USHORT nEnd = USHORT(nWidth - pCol->GetRight() + nDistance);
+ nWidth = static_cast< sal_uInt16 >(nWidth + rCol.CalcColWidth(i, nTotalWidth));
+ const sal_uInt16 nEnd = sal_uInt16(nWidth - pCol->GetRight() + nDistance);
- SvxColumnDescription aColDesc(nStart, nEnd, TRUE);
+ SvxColumnDescription aColDesc(nStart, nEnd, sal_True);
rColItem.Append(aColDesc);
}
}
@@ -129,7 +129,7 @@ void lcl_FillSvxColumn(const SwFmtCol& rCol,
void lcl_ConvertToCols(const SvxColumnItem& rColItem,
- USHORT nTotalWidth,
+ sal_uInt16 nTotalWidth,
SwFmtCol& rCols)
{
ASSERT( rCols.GetNumCols() == rColItem.Count(), "Column count mismatch" );
@@ -138,27 +138,27 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
if(rCols.GetNumCols() != rColItem.Count())
return;
- USHORT nLeft = 0;
+ sal_uInt16 nLeft = 0;
SwTwips nSumAll= 0; // Summiere alle Spalten und Raender auf
SwColumns& rArr = rCols.GetColumns();
// Tabcols der Reihe nach
- for( USHORT i=0; i < rColItem.Count()-1; ++i )
+ for( sal_uInt16 i=0; i < rColItem.Count()-1; ++i )
{
DBG_ASSERT(rColItem[i+1].nStart >= rColItem[i].nEnd,"\201berlappende Spalten" );
- USHORT nStart = static_cast< USHORT >(rColItem[i+1].nStart);
- USHORT nEnd = static_cast< USHORT >(rColItem[i].nEnd);
+ sal_uInt16 nStart = static_cast< sal_uInt16 >(rColItem[i+1].nStart);
+ sal_uInt16 nEnd = static_cast< sal_uInt16 >(rColItem[i].nEnd);
if(nStart < nEnd)
nStart = nEnd;
- const USHORT nDiff = nStart - nEnd;
- const USHORT nRight = nDiff / 2;
+ const sal_uInt16 nDiff = nStart - nEnd;
+ const sal_uInt16 nRight = nDiff / 2;
- USHORT nWidth = static_cast< USHORT >(rColItem[i].nEnd - rColItem[i].nStart);
+ sal_uInt16 nWidth = static_cast< sal_uInt16 >(rColItem[i].nEnd - rColItem[i].nStart);
nWidth += nLeft + nRight;
SwColumn* pCol = rArr[i];
- pCol->SetWishWidth( USHORT(long(rCols.GetWishWidth()) * long(nWidth) /
+ pCol->SetWishWidth( sal_uInt16(long(rCols.GetWishWidth()) * long(nWidth) /
long(nTotalWidth) ));
pCol->SetLeft( nLeft );
pCol->SetRight( nRight );
@@ -170,9 +170,9 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
//Die Differenz aus der Gesamtwunschbreite und der Summe der bisher berechneten
// Spalten und Raender sollte die Breite der letzten Spalte ergeben.
- rArr[rColItem.Count()-1]->SetWishWidth( rCols.GetWishWidth() - (USHORT)nSumAll );
+ rArr[rColItem.Count()-1]->SetWishWidth( rCols.GetWishWidth() - (sal_uInt16)nSumAll );
- rCols.SetOrtho(FALSE, 0, 0 );
+ rCols.SetOrtho(sal_False, 0, 0 );
}
/*--------------------------------------------------------------------
@@ -183,7 +183,7 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
void lcl_EraseDefTabs(SvxTabStopItem& rTabStops)
{
// Def Tabs loeschen
- for ( USHORT i = 0; i < rTabStops.Count(); )
+ for ( sal_uInt16 i = 0; i < rTabStops.Count(); )
{
// Hier auch den DefTab auf Null rausschmeissen
if ( SVX_TAB_ADJUST_DEFAULT == rTabStops[i].GetAdjustment() ||
@@ -203,7 +203,7 @@ void lcl_EraseDefTabs(SvxTabStopItem& rTabStops)
void SwView::SwapPageMargin(const SwPageDesc& rDesc, SvxLRSpaceItem& rLRSpace)
{
- USHORT nPhyPage, nVirPage;
+ sal_uInt16 nPhyPage, nVirPage;
GetWrtShell().GetPageNum( nPhyPage, nVirPage );
if ( rDesc.GetUseOn() == nsUseOnPage::PD_MIRROR && (nPhyPage % 2) == 0 )
@@ -239,30 +239,30 @@ void ResizeFrameCols(SwFmtCol& rCol,
{
// wenn die Wunschbreite zu gross wird, dann muessen alle Werte passend skaliert werden
long nScale = (0xffffl << 8)/ nNewWishWidth;
- for(USHORT i = 0; i < rArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < rArr.Count(); i++)
{
SwColumn* pCol = rArr.GetObject(i);
long nVal = pCol->GetWishWidth();
lcl_Scale(nVal, nScale);
- pCol->SetWishWidth((USHORT) nVal);
+ pCol->SetWishWidth((sal_uInt16) nVal);
nVal = pCol->GetLeft();
lcl_Scale(nVal, nScale);
- pCol->SetLeft((USHORT) nVal);
+ pCol->SetLeft((sal_uInt16) nVal);
nVal = pCol->GetRight();
lcl_Scale(nVal, nScale);
- pCol->SetRight((USHORT) nVal);
+ pCol->SetRight((sal_uInt16) nVal);
}
lcl_Scale(nNewWishWidth, nScale);
lcl_Scale(nWishDiff, nScale);
}
- rCol.SetWishWidth( (USHORT) (nNewWishWidth) );
+ rCol.SetWishWidth( (sal_uInt16) (nNewWishWidth) );
if( nLeftDelta >= 2 || nLeftDelta <= -2)
- rArr[0]->SetWishWidth(rArr[0]->GetWishWidth() + (USHORT)nWishDiff);
+ rArr[0]->SetWishWidth(rArr[0]->GetWishWidth() + (sal_uInt16)nWishDiff);
else
- rArr[rArr.Count()-1]->SetWishWidth(rArr[rArr.Count()-1]->GetWishWidth() + (USHORT)nWishDiff);
+ rArr[rArr.Count()-1]->SetWishWidth(rArr[rArr.Count()-1]->GetWishWidth() + (sal_uInt16)nWishDiff);
//reset auto width
- rCol.SetOrtho(FALSE, 0, 0 );
+ rCol.SetOrtho(sal_False, 0, 0 );
}
/*--------------------------------------------------------------------
Beschreibung: Hier werden alle Aenderungen der Tableiste
@@ -273,18 +273,18 @@ void ResizeFrameCols(SwFmtCol& rCol,
void SwView::ExecTabWin( SfxRequest& rReq )
{
SwWrtShell &rSh = GetWrtShell();
- const USHORT nFrmType = rSh.IsObjSelected() ?
+ const sal_uInt16 nFrmType = rSh.IsObjSelected() ?
FRMTYPE_DRAWOBJ :
- rSh.GetFrmType(0,TRUE);
- const BOOL bFrmSelection = rSh.IsFrmSelected();
- const BOOL bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ rSh.GetFrmType(0,sal_True);
+ const sal_Bool bFrmSelection = rSh.IsFrmSelected();
+ const sal_Bool bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- const USHORT nSlot = rReq.GetSlot();
- const USHORT nDescId = rSh.GetCurPageDesc();
+ const sal_uInt16 nSlot = rReq.GetSlot();
+ const sal_uInt16 nDescId = rSh.GetCurPageDesc();
const SwPageDesc& rDesc = rSh.GetPageDesc( nDescId );
- const BOOL bVerticalWriting = rSh.IsInVerticalText();
+ const sal_Bool bVerticalWriting = rSh.IsInVerticalText();
const SwFmtHeader& rHeaderFmt = rDesc.GetMaster().GetHeader();
SwFrmFmt *pHeaderFmt = (SwFrmFmt*)rHeaderFmt.GetHeaderFmt();
@@ -297,9 +297,9 @@ void SwView::ExecTabWin( SfxRequest& rReq )
const long nPageWidth = bBrowse ? rPageRect.Width() : rFrmSize.GetWidth();
const long nPageHeight = bBrowse ? rPageRect.Height() : rFrmSize.GetHeight();
- BOOL bUnlockView = FALSE;
+ sal_Bool bUnlockView = sal_False;
rSh.StartAllAction();
- BOOL bSect = 0 != (nFrmType & FRMTYPE_COLSECT);
+ sal_Bool bSect = 0 != (nFrmType & FRMTYPE_COLSECT);
switch ( nSlot )
{
@@ -313,8 +313,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwFrmFmt* pFmt = ((SwFrmFmt*)rSh.GetFlyFrmFmt());
const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED);
- BOOL bRTL;
- BOOL bVerticalFrame = (bFrmSelection && rSh.IsFrmVertical(TRUE, bRTL))|| (!bFrmSelection && bVerticalWriting);
+ sal_Bool bRTL;
+ sal_Bool bVerticalFrame = (bFrmSelection && rSh.IsFrmVertical(sal_True, bRTL))|| (!bFrmSelection && bVerticalWriting);
long nDeltaX = bVerticalFrame ?
rRect.Right() - rPageRect.Right() + aLongLR.GetRight() :
rPageRect.Left() + aLongLR.GetLeft() - rRect.Left();
@@ -346,7 +346,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwRect aRect;
rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nPrtWidth = aRect.Width();
- aSize.SetWidthPercent(BYTE((nPageWidth - aLongLR.GetLeft() - aLongLR.GetRight()) * 100 /nPrtWidth));
+ aSize.SetWidthPercent(sal_uInt8((nPageWidth - aLongLR.GetLeft() - aLongLR.GetRight()) * 100 /nPrtWidth));
}
else
aSize.SetWidth( nPageWidth -
@@ -381,9 +381,9 @@ void SwView::ExecTabWin( SfxRequest& rReq )
aLongLR.SetLeft( nOld > aLongLR.GetLeft() ? 0 : aLongLR.GetLeft() - nOld );
nOld = rDesc.GetMaster().GetLRSpace().GetRight();
- aLongLR.SetRight( nOld > (USHORT)aLongLR.GetRight() ? 0 : aLongLR.GetRight() - nOld );
- aLR.SetLeft((USHORT)aLongLR.GetLeft());
- aLR.SetRight((USHORT)aLongLR.GetRight());
+ aLongLR.SetRight( nOld > (sal_uInt16)aLongLR.GetRight() ? 0 : aLongLR.GetRight() - nOld );
+ aLR.SetLeft((sal_uInt16)aLongLR.GetLeft());
+ aLR.SetRight((sal_uInt16)aLongLR.GetRight());
if ( nFrmType & FRMTYPE_HEADER && pHeaderFmt )
pHeaderFmt->SetFmtAttr( aLR );
@@ -427,8 +427,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
else
{ // Seitenraender einstellen
- aLR.SetLeft((USHORT)aLongLR.GetLeft());
- aLR.SetRight((USHORT)aLongLR.GetRight());
+ aLR.SetLeft((sal_uInt16)aLongLR.GetLeft());
+ aLR.SetRight((sal_uInt16)aLongLR.GetRight());
SwapPageMargin( rDesc, aLR );
SwPageDesc aDesc( rDesc );
aDesc.GetMaster().SetFmtAttr( aLR );
@@ -451,8 +451,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SfxItemSet aSet( GetPool(), RES_FRM_SIZE, RES_FRM_SIZE,
RES_VERT_ORIENT, RES_HORI_ORIENT, 0 );
//which of the orientation attributes is to be put depends on the frame's environment
- BOOL bRTL;
- if((bFrmSelection && rSh.IsFrmVertical(TRUE, bRTL))|| (!bFrmSelection && bVerticalWriting))
+ sal_Bool bRTL;
+ if((bFrmSelection && rSh.IsFrmVertical(sal_True, bRTL))|| (!bFrmSelection && bVerticalWriting))
{
SwFmtHoriOrient aHoriOrient(pFmt->GetHoriOrient());
aHoriOrient.SetHoriOrient(text::HoriOrientation::NONE);
@@ -472,7 +472,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwRect aRect;
rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nPrtHeight = aRect.Height();
- aSize.SetHeightPercent(BYTE(nHeight * 100 /nPrtHeight));
+ aSize.SetHeightPercent(sal_uInt8(nHeight * 100 /nPrtHeight));
}
else
aSize.SetHeight(nHeight );
@@ -521,12 +521,12 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if ( nFrmType & ( FRMTYPE_HEADER | FRMTYPE_FOOTER ))
{
- const BOOL bHead = nFrmType & FRMTYPE_HEADER ? TRUE : FALSE;
+ const sal_Bool bHead = nFrmType & FRMTYPE_HEADER ? sal_True : sal_False;
SvxULSpaceItem aUL( rDesc.GetMaster().GetULSpace() );
if ( bHead )
- aUL.SetUpper( (USHORT)aLongULSpace.GetUpper() );
+ aUL.SetUpper( (sal_uInt16)aLongULSpace.GetUpper() );
else
- aUL.SetLower( (USHORT)aLongULSpace.GetLower() );
+ aUL.SetLower( (sal_uInt16)aLongULSpace.GetLower() );
aDesc.GetMaster().SetFmtAttr( aUL );
if( (bHead && pHeaderFmt) || (!bHead && pFooterFmt) )
@@ -545,8 +545,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
else
{
SvxULSpaceItem aUL(RES_UL_SPACE);
- aUL.SetUpper((USHORT)aLongULSpace.GetUpper());
- aUL.SetLower((USHORT)aLongULSpace.GetLower());
+ aUL.SetUpper((sal_uInt16)aLongULSpace.GetUpper());
+ aUL.SetLower((sal_uInt16)aLongULSpace.GetLower());
aDesc.GetMaster().SetFmtAttr(aUL);
}
@@ -557,7 +557,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
case SID_ATTR_TABSTOP_VERTICAL:
case SID_ATTR_TABSTOP:
{
- USHORT nWhich = GetPool().GetWhich(nSlot);
+ sal_uInt16 nWhich = GetPool().GetWhich(nSlot);
SvxTabStopItem aTabStops( (const SvxTabStopItem&)rReq.GetArgs()->
Get( nWhich ));
aTabStops.SetWhich(RES_PARATR_TABSTOP);
@@ -576,7 +576,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
// auffuellen mit Default-Tabs
- USHORT nDef = ::GetTabDist( rDefTabs );
+ sal_uInt16 nDef = ::GetTabDist( rDefTabs );
::MakeDefTabs( nDef, aTabStops );
SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl();
@@ -601,12 +601,12 @@ void SwView::ExecTabWin( SfxRequest& rReq )
sal_Bool bLastColumn = sal_True;
if(nFrmType & FRMTYPE_COLUMN)
{
- USHORT nCurFrameCol = rSh.GetCurColNum() - 1;
+ sal_uInt16 nCurFrameCol = rSh.GetCurColNum() - 1;
bFirstColumn = !nCurFrameCol;
const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt();
const SwFmtCol* pCols = &pFmt->GetCol();
const SwColumns& rCols = pCols->GetColumns();
- USHORT nColumnCount = rCols.Count();
+ sal_uInt16 nColumnCount = rCols.Count();
bLastColumn = nColumnCount == nCurFrameCol + 1;
}
}
@@ -654,7 +654,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
const SvxTabStopItem& rTabStops = (const SvxTabStopItem&)aSet.Get(RES_PARATR_TABSTOP);
// Haben wir einen Tab an Stelle Null
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < rTabStops.Count(); ++i )
if ( rTabStops[i].GetTabPos() == 0 )
@@ -673,7 +673,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
const SvxTabStopItem& rDefTabs =
(const SvxTabStopItem&)rSh.GetDefault(RES_PARATR_TABSTOP);
- USHORT nDef = ::GetTabDist(rDefTabs);
+ sal_uInt16 nDef = ::GetTabDist(rDefTabs);
::MakeDefTabs( nDef, aTabStops );
if( pColl && pColl->IsAutoUpdateFmt())
@@ -698,7 +698,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
ASSERT(aColItem.Count(), "ColDesc ist leer!!");
- const BOOL bSingleLine = ((const SfxBoolItem&)rReq.
+ const sal_Bool bSingleLine = ((const SfxBoolItem&)rReq.
GetArgs()->Get(SID_RULER_ACT_LINE_ONLY)).GetValue();
SwTabCols aTabCols;
@@ -726,14 +726,14 @@ void SwView::ExecTabWin( SfxRequest& rReq )
// Tabcols der Reihe nach
// Die letzte Col wird durch den Rand definiert
//columns in right-to-left tables need to be mirrored
- BOOL bIsTableRTL =
+ sal_Bool bIsTableRTL =
IsTabColFromDoc() ?
rSh.IsMouseTableRightToLeft(aTabColFromDocPos)
: rSh.IsTableRightToLeft();
if(bIsTableRTL)
{
- USHORT nColCount = aColItem.Count() - 1;
- for ( USHORT i = 0; i < nColCount; ++i )
+ sal_uInt16 nColCount = aColItem.Count() - 1;
+ for ( sal_uInt16 i = 0; i < nColCount; ++i )
{
const SvxColumnDescription& rCol = aColItem[nColCount - i];
aTabCols[i] = aTabCols.GetRight() - rCol.nStart;
@@ -742,7 +742,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
else
{
- for ( USHORT i = 0; i < aColItem.Count()-1; ++i )
+ for ( sal_uInt16 i = 0; i < aColItem.Count()-1; ++i )
{
const SvxColumnDescription& rCol = aColItem[i];
aTabCols[i] = rCol.nEnd + aTabCols.GetLeft();
@@ -754,8 +754,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
if( !rSh.IsViewLocked() )
{
- bUnlockView = TRUE;
- rSh.LockView( TRUE );
+ bUnlockView = sal_True;
+ rSh.LockView( sal_True );
}
rSh.SetMouseTabCols( aTabCols, bSingleLine,
aTabColFromDocPos );
@@ -783,10 +783,10 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwFmtCol aCols(
bSect ?
pSectFmt->GetCol() :
- (const SwFmtCol&)aSet.Get( RES_COL, FALSE ));
+ (const SwFmtCol&)aSet.Get( RES_COL, sal_False ));
SwRect aCurRect = rSh.GetAnyCurRect(bSect ? RECT_SECTION_PRT : RECT_FLY_PRT_EMBEDDED);
const long lWidth = bVerticalWriting ? aCurRect.Height() : aCurRect.Width();
- ::lcl_ConvertToCols( aColItem, USHORT(lWidth), aCols );
+ ::lcl_ConvertToCols( aColItem, sal_uInt16(lWidth), aCols );
aSet.Put( aCols );
if(bSect)
rSh.SetSectionAttr( aSet, pSectFmt );
@@ -810,7 +810,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwFmtCol aCols( rDesc.GetMaster().GetCol() );
const SwRect aPrtRect = rSh.GetAnyCurRect(RECT_PAGE_PRT);
::lcl_ConvertToCols( aColItem,
- USHORT(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width()),
+ sal_uInt16(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width()),
aCols );
SwPageDesc aDesc( rDesc );
aDesc.GetMaster().SetFmtAttr( aCols );
@@ -849,7 +849,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if(bVerticalWriting)
{
- for ( USHORT i = aColItem.Count() - 1; i; --i )
+ for ( sal_uInt16 i = aColItem.Count() - 1; i; --i )
{
const SvxColumnDescription& rCol = aColItem[i - 1];
long nColumnPos = aTabCols.GetRight() - rCol.nEnd ;
@@ -859,23 +859,23 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
else
{
- for ( USHORT i = 0; i < aColItem.Count()-1; ++i )
+ for ( sal_uInt16 i = 0; i < aColItem.Count()-1; ++i )
{
const SvxColumnDescription& rCol = aColItem[i];
aTabCols[i] = rCol.nEnd + aTabCols.GetLeft();
aTabCols.SetHidden( i, !rCol.bVisible );
}
}
- BOOL bSingleLine = FALSE;
+ sal_Bool bSingleLine = sal_False;
const SfxPoolItem* pSingleLine;
- if( SFX_ITEM_SET == rReq.GetArgs()->GetItemState(SID_RULER_ACT_LINE_ONLY, FALSE, &pSingleLine))
+ if( SFX_ITEM_SET == rReq.GetArgs()->GetItemState(SID_RULER_ACT_LINE_ONLY, sal_False, &pSingleLine))
bSingleLine = ((const SfxBoolItem*)pSingleLine)->GetValue();
if ( bSetTabRowFromDoc )
{
if( !rSh.IsViewLocked() )
{
- bUnlockView = TRUE;
- rSh.LockView( TRUE );
+ bUnlockView = sal_True;
+ rSh.LockView( sal_True );
}
rSh.SetMouseTabRows( aTabCols, bSingleLine, aTabColFromDocPos );
}
@@ -891,9 +891,9 @@ void SwView::ExecTabWin( SfxRequest& rReq )
rSh.EndAllAction();
if( bUnlockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
- bSetTabColFromDoc = bSetTabRowFromDoc = bTabColFromDoc = bTabRowFromDoc = FALSE;
+ bSetTabColFromDoc = bSetTabRowFromDoc = bTabColFromDoc = bTabRowFromDoc = sal_False;
SetNumRuleNodeFromDoc(NULL);
}
@@ -909,13 +909,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SwWrtShell &rSh = GetWrtShell();
const Point* pPt = IsTabColFromDoc() || IsTabRowFromDoc() ? &aTabColFromDocPos : 0;
- const USHORT nFrmType = rSh.IsObjSelected()
+ const sal_uInt16 nFrmType = rSh.IsObjSelected()
? FRMTYPE_DRAWOBJ
- : rSh.GetFrmType( pPt, TRUE );
+ : rSh.GetFrmType( pPt, sal_True );
- const BOOL bFrmSelection = rSh.IsFrmSelected();
+ const sal_Bool bFrmSelection = rSh.IsFrmSelected();
- const BOOL bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_Bool bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
// PageOffset/Begrenzer
const SwRect& rPageRect = rSh.GetAnyCurRect( RECT_PAGE, pPt );
const SwRect& rPagePrtRect = rSh.GetAnyCurRect( RECT_PAGE_PRT, pPt );
@@ -927,7 +927,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
rSh.GetMousePageDesc(aTabColFromDocPos) : rSh.GetCurPageDesc() );
const SvxFrameDirectionItem& rFrameDir = rDesc.GetMaster().GetFrmDir();
- const BOOL bVerticalWriting = rSh.IsInVerticalText();
+ const sal_Bool bVerticalWriting = rSh.IsInVerticalText();
//enable tab stop display on the rulers depending on the writing direction
WinBits nRulerStyle = pHRuler->GetStyle() & ~WB_EXTRAFIELD;
@@ -952,7 +952,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SelectionType nSelType = rSh.GetSelectionType();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
sal_Bool bPutContentProtection = sal_False;
while ( nWhich )
@@ -1036,15 +1036,15 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
// Dokumentkoordinaten Frame auf Seitenkoordinaten umbrechen
const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt);
- aLongUL.SetUpper((USHORT)(rRect.Top() - rPageRect.Top() ));
- aLongUL.SetLower((USHORT)(rPageRect.Bottom() - rRect.Bottom() ));
+ aLongUL.SetUpper((sal_uInt16)(rRect.Top() - rPageRect.Top() ));
+ aLongUL.SetLower((sal_uInt16)(rPageRect.Bottom() - rRect.Bottom() ));
}
else if ( nFrmType & FRMTYPE_HEADER || nFrmType & FRMTYPE_FOOTER )
{
SwRect aRect( rSh.GetAnyCurRect( RECT_HEADERFOOTER, pPt));
aRect.Pos() -= rSh.GetAnyCurRect( RECT_PAGE, pPt ).Pos();
- aLongUL.SetUpper( (USHORT)aRect.Top() );
- aLongUL.SetLower( (USHORT)(nPageHeight - aRect.Bottom()) );
+ aLongUL.SetUpper( (sal_uInt16)aRect.Top() );
+ aLongUL.SetLower( (sal_uInt16)(nPageHeight - aRect.Bottom()) );
}
else if( nFrmType & FRMTYPE_DRAWOBJ)
{
@@ -1061,8 +1061,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
rSet.Put( aLongUL );
else
{
- SvxULSpaceItem aULTmp((USHORT)aLongUL.GetUpper(),
- (USHORT)aLongUL.GetLower(),
+ SvxULSpaceItem aULTmp((sal_uInt16)aLongUL.GetUpper(),
+ (sal_uInt16)aLongUL.GetLower(),
nWhich);
rSet.Put(aULTmp);
}
@@ -1125,7 +1125,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
short nOffset = static_cast< short >(aLR.GetTxtLeft() +
// --> FME 2005-02-22 #i42922# Mouse move of numbering label
// has to consider the left indent of the paragraph
- pNumRuleNodeFromDoc->GetLeftMarginWithNum( TRUE ) );
+ pNumRuleNodeFromDoc->GetLeftMarginWithNum( sal_True ) );
// <--
short nFLOffset;
@@ -1168,8 +1168,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aCoreSet.Put( aBoxInfo );
rSh.GetFlyFrmAttr( aCoreSet );
const SvxBoxItem& rBox = (const SvxBoxItem&)aCoreSet.Get(RES_BOX);
- aDistLR.SetLeft((USHORT)rBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight((USHORT)rBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft((sal_uInt16)rBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT));
//add the paragraph border distance
SfxItemSet aCoreSet1( GetPool(),
@@ -1177,12 +1177,12 @@ void SwView::StateTabWin(SfxItemSet& rSet)
0 );
rSh.GetCurAttr( aCoreSet1 );
const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSet1.Get(RES_BOX);
- aDistLR.SetLeft(aDistLR.GetLeft() + (USHORT)rParaBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight(aDistLR.GetRight() + (USHORT)rParaBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight(aDistLR.GetRight() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_RIGHT));
}
rSet.Put(aDistLR);
- nLeftBorderDistance = static_cast< USHORT >(aDistLR.GetLeft());
- nRightBorderDistance = static_cast< USHORT >(aDistLR.GetRight());
+ nLeftBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetLeft());
+ nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight());
}
else if ( IsTabColFromDoc() ||
( rSh.GetTableFmt() && !bFrmSelection &&
@@ -1192,13 +1192,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
RES_BOX, RES_BOX,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 );
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
- aBoxInfo.SetTable(FALSE);
- aBoxInfo.SetDist((BOOL) TRUE);
+ aBoxInfo.SetTable(sal_False);
+ aBoxInfo.SetDist((sal_Bool) sal_True);
aCoreSet2.Put(aBoxInfo);
rSh.GetTabBorders( aCoreSet2 );
const SvxBoxItem& rBox = (const SvxBoxItem&)aCoreSet2.Get(RES_BOX);
- aDistLR.SetLeft((USHORT)rBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight((USHORT)rBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft((sal_uInt16)rBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT));
//add the border distance of the paragraph
SfxItemSet aCoreSet1( GetPool(),
@@ -1206,19 +1206,19 @@ void SwView::StateTabWin(SfxItemSet& rSet)
0 );
rSh.GetCurAttr( aCoreSet1 );
const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSet1.Get(RES_BOX);
- aDistLR.SetLeft(aDistLR.GetLeft() + (USHORT)rParaBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight(aDistLR.GetRight() + (USHORT)rParaBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight(aDistLR.GetRight() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_RIGHT));
rSet.Put(aDistLR);
- nLeftBorderDistance = static_cast< USHORT >(aDistLR.GetLeft());
- nRightBorderDistance = static_cast< USHORT >(aDistLR.GetRight());
+ nLeftBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetLeft());
+ nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight());
}
else if ( !rSh.IsDirectlyInSection() )
{
//get the page/header/footer border distance
const SwFrmFmt& rMaster = rDesc.GetMaster();
const SvxBoxItem& rBox = (const SvxBoxItem&)rMaster.GetAttrSet().Get(RES_BOX);
- aDistLR.SetLeft((USHORT)rBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight((USHORT)rBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft((sal_uInt16)rBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT));
const SvxBoxItem* pBox = 0;
if(nFrmType & FRMTYPE_HEADER)
@@ -1238,8 +1238,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
if(pBox)
{
- aDistLR.SetLeft((USHORT)pBox->GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight((USHORT)pBox->GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft((sal_uInt16)pBox->GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight((sal_uInt16)pBox->GetDistance(BOX_LINE_RIGHT));
}
//add the border distance of the paragraph
@@ -1248,11 +1248,11 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 );
rSh.GetCurAttr( aCoreSetTmp );
const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSetTmp.Get(RES_BOX);
- aDistLR.SetLeft(aDistLR.GetLeft() + (USHORT)rParaBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight(aDistLR.GetRight() + (USHORT)rParaBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight(aDistLR.GetRight() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_RIGHT));
rSet.Put(aDistLR);
- nLeftBorderDistance = static_cast< USHORT >(aDistLR.GetLeft());
- nRightBorderDistance = static_cast< USHORT >(aDistLR.GetRight());
+ nLeftBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetLeft());
+ nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight());
}
}
}
@@ -1266,7 +1266,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
rSet.DisableItem(nWhich);
else
{
- BOOL bFlag = rSh.IsInRightToLeftText();
+ sal_Bool bFlag = rSh.IsInRightToLeftText();
rSet.Put(SfxBoolItem(nWhich, bFlag));
}
}
@@ -1274,13 +1274,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
case SID_RULER_BORDERS_VERTICAL:
case SID_RULER_BORDERS:
{
- BOOL bFrameRTL;
- BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection;
- BOOL bHasTable = ( IsTabColFromDoc() ||
+ sal_Bool bFrameRTL;
+ sal_Bool bFrameHasVerticalColumns = rSh.IsFrmVertical(sal_False, bFrameRTL) && bFrmSelection;
+ sal_Bool bHasTable = ( IsTabColFromDoc() ||
( rSh.GetTableFmt() && !bFrmSelection &&
!(nFrmType & FRMTYPE_COLSECT ) ) );
- BOOL bTableVertical = bHasTable && rSh.IsTableVertical();
+ sal_Bool bTableVertical = bHasTable && rSh.IsTableVertical();
if( ( (SID_RULER_BORDERS_VERTICAL == nWhich) &&
((bHasTable && !bTableVertical)||
@@ -1292,7 +1292,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else if ( bHasTable )
{
SwTabCols aTabCols;
- USHORT nNum;
+ sal_uInt16 nNum;
if ( 0 != ( bSetTabColFromDoc = IsTabColFromDoc() ) )
{
rSh.GetMouseTabCols( aTabCols, aTabColFromDocPos );
@@ -1308,47 +1308,47 @@ void SwView::StateTabWin(SfxItemSet& rSet)
ASSERT(nNum <= aTabCols.Count(), "TabCol not found");
const int nLft = aTabCols.GetLeftMin() + aTabCols.GetLeft();
- const int nRgt = (USHORT)(bTableVertical ? nPageHeight : nPageWidth) -
+ const int nRgt = (sal_uInt16)(bTableVertical ? nPageHeight : nPageWidth) -
(aTabCols.GetLeftMin() +
aTabCols.GetRight());
- const USHORT nL = static_cast< USHORT >(nLft > 0 ? nLft : 0);
- const USHORT nR = static_cast< USHORT >(nRgt > 0 ? nRgt : 0);
+ const sal_uInt16 nL = static_cast< sal_uInt16 >(nLft > 0 ? nLft : 0);
+ const sal_uInt16 nR = static_cast< sal_uInt16 >(nRgt > 0 ? nRgt : 0);
SvxColumnItem aColItem(nNum, nL, nR);
- USHORT nStart = 0,
+ sal_uInt16 nStart = 0,
nEnd;
//columns in right-to-left tables need to be mirrored
- BOOL bIsTableRTL =
+ sal_Bool bIsTableRTL =
IsTabColFromDoc() ?
rSh.IsMouseTableRightToLeft(aTabColFromDocPos)
: rSh.IsTableRightToLeft();
if(bIsTableRTL)
{
- for ( USHORT i = aTabCols.Count(); i ; --i )
+ for ( sal_uInt16 i = aTabCols.Count(); i ; --i )
{
const SwTabColsEntry& rEntry = aTabCols.GetEntry( i - 1 );
- nEnd = (USHORT)aTabCols.GetRight();
- nEnd = nEnd - (USHORT)rEntry.nPos;
+ nEnd = (sal_uInt16)aTabCols.GetRight();
+ nEnd = nEnd - (sal_uInt16)rEntry.nPos;
SvxColumnDescription aColDesc( nStart, nEnd,
- (USHORT(aTabCols.GetRight() - rEntry.nMax)),
- (USHORT(aTabCols.GetRight() - rEntry.nMin)),
+ (sal_uInt16(aTabCols.GetRight() - rEntry.nMax)),
+ (sal_uInt16(aTabCols.GetRight() - rEntry.nMin)),
!aTabCols.IsHidden(i - 1) );
aColItem.Append(aColDesc);
nStart = nEnd;
}
SvxColumnDescription aColDesc(nStart,
- aTabCols.GetRight() - aTabCols.GetLeft(), TRUE);
+ aTabCols.GetRight() - aTabCols.GetLeft(), sal_True);
aColItem.Append(aColDesc);
}
else
{
- for ( USHORT i = 0; i < aTabCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i )
{
const SwTabColsEntry& rEntry = aTabCols.GetEntry( i );
- nEnd = static_cast< USHORT >(rEntry.nPos - aTabCols.GetLeft());
+ nEnd = static_cast< sal_uInt16 >(rEntry.nPos - aTabCols.GetLeft());
SvxColumnDescription aColDesc( nStart, nEnd,
rEntry.nMin - aTabCols.GetLeft(), rEntry.nMax - aTabCols.GetLeft(),
!aTabCols.IsHidden(i) );
@@ -1357,7 +1357,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
SvxColumnDescription aColDesc(nStart, aTabCols.GetRight() - aTabCols.GetLeft(),
0, 0,
- TRUE);
+ sal_True);
aColItem.Append(aColDesc);
}
rSet.Put(aColItem, nWhich);
@@ -1365,7 +1365,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else if ( bFrmSelection || nFrmType & ( FRMTYPE_COLUMN | FRMTYPE_COLSECT ) )
{
// Aus Rahmen oder Seite ?
- USHORT nNum = 0;
+ sal_uInt16 nNum = 0;
if(bFrmSelection)
{
const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt();
@@ -1380,7 +1380,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
!bFrmSelection &&
nFrmType & FRMTYPE_COLSECT )
{
- const SwSection *pSect = rSh.GetAnySection(FALSE, pPt);
+ const SwSection *pSect = rSh.GetAnySection(sal_False, pPt);
ASSERT( pSect, "Welcher Bereich?");
if( pSect )
{
@@ -1394,14 +1394,14 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SwRect aRect = rSh.GetAnyCurRect(RECT_SECTION_PRT, pPt);
const SwRect aTmpRect = rSh.GetAnyCurRect(RECT_SECTION, pPt);
- ::lcl_FillSvxColumn(rCol, USHORT(bVerticalWriting ? aRect.Height() : aRect.Width()), aColItem, 0);
+ ::lcl_FillSvxColumn(rCol, sal_uInt16(bVerticalWriting ? aRect.Height() : aRect.Width()), aColItem, 0);
if(bVerticalWriting)
{
aRect.Pos() += Point(aTmpRect.Left(), aTmpRect.Top());
aRect.Pos().Y() -= rPageRect.Top();
- aColItem.SetLeft ((USHORT)(aRect.Top()));
- aColItem.SetRight((USHORT)(nPageHeight - aRect.Bottom() ));
+ aColItem.SetLeft ((sal_uInt16)(aRect.Top()));
+ aColItem.SetRight((sal_uInt16)(nPageHeight - aRect.Bottom() ));
}
else
{
@@ -1409,8 +1409,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
// PAGES01
// make relative to page position:
- aColItem.SetLeft ((USHORT)( aRect.Left() - rPageRect.Left() ));
- aColItem.SetRight((USHORT)( rPageRect.Right() - aRect.Right()));
+ aColItem.SetLeft ((sal_uInt16)( aRect.Left() - rPageRect.Left() ));
+ aColItem.SetRight((sal_uInt16)( rPageRect.Right() - aRect.Right()));
}
aColItem.SetOrtho(aColItem.CalcOrtho());
@@ -1432,24 +1432,24 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxColumnItem aColItem(nNum);
const SwRect &rSizeRect = rSh.GetAnyCurRect(RECT_FLY_PRT_EMBEDDED, pPt);
- BOOL bUseVertical = bFrameHasVerticalColumns || (!bFrmSelection && bVerticalWriting);
+ sal_Bool bUseVertical = bFrameHasVerticalColumns || (!bFrmSelection && bVerticalWriting);
const long lWidth = bUseVertical ? rSizeRect.Height() : rSizeRect.Width();
const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt);
long nDist2 = ((bUseVertical ? rRect.Height() : rRect.Width()) - lWidth) /2;
- ::lcl_FillSvxColumn(rCol, USHORT(lWidth), aColItem, nDist2);
+ ::lcl_FillSvxColumn(rCol, sal_uInt16(lWidth), aColItem, nDist2);
SfxItemSet aFrameSet(GetPool(), RES_LR_SPACE, RES_LR_SPACE);
rSh.GetFlyFrmAttr( aFrameSet );
if(bUseVertical)
{
- aColItem.SetLeft ((USHORT)(rRect.Top()- rPageRect.Top()));
- aColItem.SetRight((USHORT)(nPageHeight + rPageRect.Top() - rRect.Bottom() ));
+ aColItem.SetLeft ((sal_uInt16)(rRect.Top()- rPageRect.Top()));
+ aColItem.SetRight((sal_uInt16)(nPageHeight + rPageRect.Top() - rRect.Bottom() ));
}
else
{
- aColItem.SetLeft ((USHORT)(rRect.Left() - rPageRect.Left() ));
- aColItem.SetRight((USHORT)(rPageRect.Right() - rRect.Right() ));
+ aColItem.SetLeft ((sal_uInt16)(rRect.Left() - rPageRect.Left() ));
+ aColItem.SetRight((sal_uInt16)(rPageRect.Right() - rRect.Right() ));
}
aColItem.SetOrtho(aColItem.CalcOrtho());
@@ -1473,13 +1473,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
const SvxBoxItem& rBox = (const SvxBoxItem&)rMaster.GetFmtAttr(RES_BOX);
long nDist = rBox.GetDistance();
::lcl_FillSvxColumn(aCol,
- USHORT(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width() ),
+ sal_uInt16(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width() ),
aColItem, nDist);
if(bBrowse)
{
- aColItem.SetLeft((USHORT)rPagePrtRect.Left());
- aColItem.SetRight(USHORT(nPageWidth - rPagePrtRect.Right()));
+ aColItem.SetLeft((sal_uInt16)rPagePrtRect.Left());
+ aColItem.SetRight(sal_uInt16(nPageWidth - rPagePrtRect.Right()));
}
else
{
@@ -1498,8 +1498,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
case SID_RULER_ROWS :
case SID_RULER_ROWS_VERTICAL:
{
- BOOL bFrameRTL;
- BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection;
+ sal_Bool bFrameRTL;
+ sal_Bool bFrameHasVerticalColumns = rSh.IsFrmVertical(sal_False, bFrameRTL) && bFrmSelection;
if( ( (SID_RULER_ROWS == nWhich) &&
((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns)) ) ||
@@ -1512,7 +1512,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
SwTabCols aTabCols;
//no current value necessary
- USHORT nNum = 0;
+ sal_uInt16 nNum = 0;
if ( 0 != ( bSetTabRowFromDoc = IsTabRowFromDoc() ) )
{
rSh.GetMouseTabRows( aTabCols, aTabColFromDocPos );
@@ -1524,24 +1524,24 @@ void SwView::StateTabWin(SfxItemSet& rSet)
// ASSERT(nNum <= aTabCols.Count(), "TabCol not found");
const int nLft = aTabCols.GetLeftMin();
- const int nRgt = (USHORT)(bVerticalWriting ? nPageWidth : nPageHeight) -
+ const int nRgt = (sal_uInt16)(bVerticalWriting ? nPageWidth : nPageHeight) -
(aTabCols.GetLeftMin() +
aTabCols.GetRight());
- const USHORT nL = static_cast< USHORT >(nLft > 0 ? nLft : 0);
- const USHORT nR = static_cast< USHORT >(nRgt > 0 ? nRgt : 0);
+ const sal_uInt16 nL = static_cast< sal_uInt16 >(nLft > 0 ? nLft : 0);
+ const sal_uInt16 nR = static_cast< sal_uInt16 >(nRgt > 0 ? nRgt : 0);
SvxColumnItem aColItem(nNum, nL, nR);
- USHORT nStart = 0,
+ sal_uInt16 nStart = 0,
nEnd;
- for ( USHORT i = 0; i < aTabCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i )
{
const SwTabColsEntry& rEntry = aTabCols.GetEntry( i );
if(bVerticalWriting)
{
- nEnd = USHORT(aTabCols.GetRight() - rEntry.nPos);
+ nEnd = sal_uInt16(aTabCols.GetRight() - rEntry.nPos);
SvxColumnDescription aColDesc( nStart, nEnd,
aTabCols.GetRight() - rEntry.nMax, aTabCols.GetRight() - rEntry.nMin,
!aTabCols.IsHidden(i) );
@@ -1549,18 +1549,18 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
else
{
- nEnd = USHORT(rEntry.nPos - aTabCols.GetLeft());
+ nEnd = sal_uInt16(rEntry.nPos - aTabCols.GetLeft());
SvxColumnDescription aColDesc( nStart, nEnd,
- USHORT(rEntry.nMin - aTabCols.GetLeft()), USHORT(rEntry.nMax - aTabCols.GetLeft()),
+ sal_uInt16(rEntry.nMin - aTabCols.GetLeft()), sal_uInt16(rEntry.nMax - aTabCols.GetLeft()),
!aTabCols.IsHidden(i) );
aColItem.Append(aColDesc);
}
nStart = nEnd;
}
if(bVerticalWriting)
- nEnd = static_cast< USHORT >(aTabCols.GetRight());
+ nEnd = static_cast< sal_uInt16 >(aTabCols.GetRight());
else
- nEnd = static_cast< USHORT >(aTabCols.GetLeft());
+ nEnd = static_cast< sal_uInt16 >(aTabCols.GetLeft());
// put a position protection when the last row cannot be moved
// due to a page break inside of a row
if(!aTabCols.IsLastRowAllowedToChange())
@@ -1568,7 +1568,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxColumnDescription aColDesc( nStart, nEnd,
aTabCols.GetRight(), aTabCols.GetRight(),
- FALSE );
+ sal_False );
aColItem.Append(aColDesc);
rSet.Put(aColItem, nWhich);
@@ -1594,15 +1594,15 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
if( nFrmType & FRMTYPE_TABLE )
{
- const USHORT nNum = rSh.GetCurTabColNum();
+ const sal_uInt16 nNum = rSh.GetCurTabColNum();
SwTabCols aTabCols;
rSh.GetTabCols( aTabCols );
const int nLft = aTabCols.GetLeftMin() + aTabCols.GetLeft();
- const int nRgt = (USHORT)nPageWidth -(aTabCols.GetLeftMin() + aTabCols.GetRight());
+ const int nRgt = (sal_uInt16)nPageWidth -(aTabCols.GetLeftMin() + aTabCols.GetRight());
- const USHORT nL = static_cast< USHORT >(nLft > 0 ? nLft : 0);
- const USHORT nR = static_cast< USHORT >(nRgt > 0 ? nRgt : 0);
+ const sal_uInt16 nL = static_cast< sal_uInt16 >(nLft > 0 ? nLft : 0);
+ const sal_uInt16 nR = static_cast< sal_uInt16 >(nRgt > 0 ? nRgt : 0);
aRectangle.Left() = nL;
if(nNum > 1)
@@ -1623,8 +1623,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
const SwFmtCol* pCols = pFmt ? &pFmt->GetCol():
&rDesc.GetMaster().GetCol();
const SwColumns& rCols = pCols->GetColumns();
- USHORT nNum = rSh.GetCurOutColNum();
- USHORT nCount = Min(USHORT(nNum + 1), rCols.Count());
+ sal_uInt16 nNum = rSh.GetCurOutColNum();
+ sal_uInt16 nCount = Min(sal_uInt16(nNum + 1), rCols.Count());
const SwRect aRect( rSh.GetAnyCurRect( pFmt
? RECT_FLY_PRT_EMBEDDED
: RECT_PAGE_PRT, pPt ));
@@ -1633,14 +1633,14 @@ void SwView::StateTabWin(SfxItemSet& rSet)
: RECT_PAGE, pPt ));
//die Breite im Rahmen bzw. innerhalbe der Seitenraender
- const USHORT nTotalWidth = (USHORT)aRect.Width();
+ const sal_uInt16 nTotalWidth = (sal_uInt16)aRect.Width();
//die gesamte Rahmenbreite - die Differenz ist der doppelte Abstand zum Rand
- const USHORT nOuterWidth = (USHORT)aAbsRect.Width();
+ const sal_uInt16 nOuterWidth = (sal_uInt16)aAbsRect.Width();
int nWidth = 0,
nStart = 0,
nEnd = 0;
aRectangle.Left() = 0;
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
SwColumn* pCol = rCols[i];
nStart = pCol->GetLeft() + nWidth;
@@ -1682,13 +1682,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else if ( ((nFrmType & FRMTYPE_TABLE) || IsTabColFromDoc()) &&
!bFrmSelection )
{
- BOOL bColumn;
+ sal_Bool bColumn;
if ( IsTabColFromDoc() )
bColumn = rSh.GetCurMouseColNum( aTabColFromDocPos ) != 0;
else
bColumn = (nFrmType & (FRMTYPE_COLUMN|FRMTYPE_FLY_ANY|
FRMTYPE_COLSECTOUTTAB)) ?
- TRUE : FALSE;
+ sal_True : sal_False;
if ( !bColumn )
{
if( nFrmType & FRMTYPE_FLY_ANY && IsTabColFromDoc() )
@@ -1714,16 +1714,16 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
else
{ //hier nur fuer Tabelle in mehrspaltigen Seiten und Rahmen
- BOOL bSectOutTbl = (nFrmType & FRMTYPE_TABLE) ? TRUE : FALSE;
- BOOL bFrame = (nFrmType & FRMTYPE_FLY_ANY) ? TRUE : FALSE;
- BOOL bColSct = (nFrmType & ( bSectOutTbl
+ sal_Bool bSectOutTbl = (nFrmType & FRMTYPE_TABLE) ? sal_True : sal_False;
+ sal_Bool bFrame = (nFrmType & FRMTYPE_FLY_ANY) ? sal_True : sal_False;
+ sal_Bool bColSct = (nFrmType & ( bSectOutTbl
? FRMTYPE_COLSECTOUTTAB
: FRMTYPE_COLSECT )
- ) ? TRUE : FALSE;
+ ) ? sal_True : sal_False;
//Damit man auch mit der Mouse ziehen kann,
//ohne in der Tabelle zu stehen
CurRectType eRecType = RECT_PAGE_PRT;
- USHORT nNum = IsTabColFromDoc() ?
+ sal_uInt16 nNum = IsTabColFromDoc() ?
rSh.GetCurMouseColNum( aTabColFromDocPos ):
rSh.GetCurOutColNum();
const SwFrmFmt* pFmt = NULL;
@@ -1744,7 +1744,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
const SwFmtCol* pCols = pFmt ? &pFmt->GetCol():
&rDesc.GetMaster().GetCol();
const SwColumns& rCols = pCols->GetColumns();
- const USHORT nBorder = pFmt ? pFmt->GetBox().GetDistance() :
+ const sal_uInt16 nBorder = pFmt ? pFmt->GetBox().GetDistance() :
rDesc.GetMaster().GetBox().GetDistance();
/* RECT_FLY_PRT_EMBEDDED returns the relative position to
@@ -1756,7 +1756,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aRect.Pos() += rSh.GetAnyCurRect( RECT_FLY_EMBEDDED,
pPt ).Pos();
- const USHORT nTotalWidth = (USHORT)aRect.Width();
+ const sal_uInt16 nTotalWidth = (sal_uInt16)aRect.Width();
//nStart und nEnd initialisieren fuer nNum == 0
int nWidth = 0,
nStart = 0,
@@ -1768,7 +1768,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
nNum = rCols.Count();
}
- for( USHORT i = 0; i < nNum; ++i )
+ for( sal_uInt16 i = 0; i < nNum; ++i )
{
SwColumn* pCol = rCols[i];
nStart = pCol->GetLeft() + nWidth;
@@ -1814,7 +1814,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
if(bFrmSelection)
{
- BYTE nProtect = pWrtShell->IsSelObjProtected( FLYPROTECT_SIZE|FLYPROTECT_POS|FLYPROTECT_CONTENT );
+ sal_uInt8 nProtect = pWrtShell->IsSelObjProtected( FLYPROTECT_SIZE|FLYPROTECT_POS|FLYPROTECT_CONTENT );
SvxProtectItem aProt(SID_RULER_PROTECT);
aProt.SetCntntProtect((nProtect & FLYPROTECT_CONTENT) != 0);
@@ -1827,8 +1827,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxProtectItem aProtect(SID_RULER_PROTECT);
if(bBrowse && !(nFrmType & (FRMTYPE_DRAWOBJ|FRMTYPE_COLUMN)) && !rSh.GetTableFmt())
{
- aProtect.SetSizeProtect(TRUE);
- aProtect.SetPosProtect(TRUE);
+ aProtect.SetSizeProtect(sal_True);
+ aProtect.SetPosProtect(sal_True);
}
rSet.Put(aProtect);
}
@@ -1840,7 +1840,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
if(bPutContentProtection)
{
SvxProtectItem aProtect(SID_RULER_PROTECT);
- aProtect.SetCntntProtect(TRUE);
+ aProtect.SetCntntProtect(sal_True);
rSet.Put(aProtect);
}
}