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.cxx54
-rw-r--r--sw/source/ui/uiview/makefile.mk77
-rw-r--r--sw/source/ui/uiview/pview.cxx275
-rw-r--r--sw/source/ui/uiview/pview.src91
-rw-r--r--sw/source/ui/uiview/scroll.cxx26
-rw-r--r--sw/source/ui/uiview/srcview.cxx128
-rw-r--r--sw/source/ui/uiview/swcli.cxx23
-rw-r--r--sw/source/ui/uiview/uivwimp.cxx16
-rw-r--r--sw/source/ui/uiview/view.cxx111
-rwxr-xr-x[-rw-r--r--]sw/source/ui/uiview/view.hrc0
-rw-r--r--sw/source/ui/uiview/view.src154
-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.cxx307
-rw-r--r--sw/source/ui/uiview/viewcoll.cxx6
-rw-r--r--sw/source/ui/uiview/viewdlg.cxx12
-rw-r--r--sw/source/ui/uiview/viewdlg2.cxx24
-rw-r--r--sw/source/ui/uiview/viewdraw.cxx8
-rw-r--r--sw/source/ui/uiview/viewfunc.hxx12
-rw-r--r--sw/source/ui/uiview/viewling.cxx6
-rw-r--r--sw/source/ui/uiview/viewmdi.cxx80
-rw-r--r--sw/source/ui/uiview/viewport.cxx244
-rw-r--r--sw/source/ui/uiview/viewprt.cxx76
-rw-r--r--sw/source/ui/uiview/viewsrch.cxx129
-rw-r--r--sw/source/ui/uiview/viewstat.cxx13
-rw-r--r--sw/source/ui/uiview/viewtab.cxx395
26 files changed, 982 insertions, 1329 deletions
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx
index 40cba7f675..6fbb37e934 100644
--- a/sw/source/ui/uiview/formatclipboard.cxx
+++ b/sw/source/ui/uiview/formatclipboard.cxx
@@ -185,13 +185,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)
{
@@ -213,7 +213,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();
@@ -221,52 +221,52 @@ 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));
}
}//end anonymous namespace
@@ -336,8 +336,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
{
@@ -387,7 +387,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) );
@@ -418,7 +418,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;
@@ -426,10 +426,10 @@ typedef std::vector< SfxPoolItemSharedPtr > ItemVector;
// 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 ) )
@@ -484,7 +484,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
SwFmtCharFmt aFmt(pStyle->GetCharFmt());
// collect items from character style
lcl_AppendSetItems( aItemVector, aFmt.GetCharFmt()->GetAttrSet());
- USHORT nFlags=0;
+ sal_uInt16 nFlags=0;
rWrtShell.SetAttr( aFmt, nFlags );
}
}
@@ -507,7 +507,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);
}
}
@@ -533,22 +533,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/makefile.mk b/sw/source/ui/uiview/makefile.mk
deleted file mode 100644
index 70a4efa525..0000000000
--- a/sw/source/ui/uiview/makefile.mk
+++ /dev/null
@@ -1,77 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=uiview
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- view.src \
- pview.src
-
-EXCEPTIONSFILES= \
- $(SLO)$/formatclipboard.obj \
- $(SLO)$/pview.obj \
- $(SLO)$/scroll.obj \
- $(SLO)$/srcview.obj \
- $(SLO)$/swcli.obj \
- $(SLO)$/uivwimp.obj \
- $(SLO)$/view.obj \
- $(SLO)$/view0.obj \
- $(SLO)$/view1.obj \
- $(SLO)$/view2.obj \
- $(SLO)$/viewcoll.obj \
- $(SLO)$/viewdlg.obj \
- $(SLO)$/viewdlg2.obj \
- $(SLO)$/viewdraw.obj \
- $(SLO)$/viewling.obj \
- $(SLO)$/viewmdi.obj \
- $(SLO)$/viewport.obj \
- $(SLO)$/viewprt.obj \
- $(SLO)$/viewsrch.obj \
- $(SLO)$/viewstat.obj \
- $(SLO)$/viewtab.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-$(SRS)$/uiview.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc
-
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index 785bae4792..293b03022a 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -36,7 +36,6 @@
#include <vcl/help.hxx>
#include <vcl/cmdevt.hxx>
#include <vcl/button.hxx>
-#include <svtools/printdlg.hxx>
#include <svl/whiter.hxx>
#include <svl/stritem.hxx>
#include <svl/eitem.hxx>
@@ -69,7 +68,7 @@
#include <view.hxx>
#include <textsh.hxx>
#include <scroll.hxx>
-#include <swprtopt.hxx>
+#include <prtopt.hxx>
#include <docstat.hxx>
#include <usrpref.hxx>
#include <viewfunc.hxx>
@@ -89,8 +88,8 @@
#include <svx/dialogs.hrc>
#include <osl/mutex.hxx>
-using namespace ::com::sun::star;
+using namespace ::com::sun::star;
SFX_IMPL_NAMED_VIEWFACTORY(SwPagePreView, "PrintPreview")
{
SFX_VIEW_REGISTRATION(SwDocShell);
@@ -114,13 +113,13 @@ TYPEINIT1(SwPagePreView,SfxViewShell)
#define MIN_PREVIEW_ZOOM 25
#define MAX_PREVIEW_ZOOM 600
-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)
{
@@ -138,14 +137,14 @@ USHORT lcl_GetNextZoomStep(USHORT nCurrentZoom, BOOL bZoomIn)
void lcl_InvalidateZoomSlots(SfxBindings& rBindings)
{
- static USHORT const aInval[] =
+ static sal_uInt16 const aInval[] =
{
SID_ATTR_ZOOM, SID_ZOOM_OUT, SID_ZOOM_IN, SID_ATTR_ZOOMSLIDER, FN_PREVIEW_ZOOM, FN_STAT_ZOOM,
0
};
rBindings.Invalidate( aInval );
}
-
+
// erstmal der Zoom-Dialog
class SwPreViewZoomDlg : public SvxStandardDialog
{
@@ -181,15 +180,12 @@ SwPreViewZoomDlg::SwPreViewZoomDlg( SwPagePreViewWin& rParent ) :
aColEdit.SetValue( rParent.GetCol() );
}
-SwPreViewZoomDlg::~SwPreViewZoomDlg()
-{
-}
-
+SwPreViewZoomDlg::~SwPreViewZoomDlg() {}
void SwPreViewZoomDlg::Apply()
{
((SwPagePreViewWin*)GetParent())->CalcWish(
- BYTE(aRowEdit.GetValue()),
- BYTE(aColEdit.GetValue()) );
+ sal_uInt8(aRowEdit.GetValue()),
+ sal_uInt8(aColEdit.GetValue()) );
}
// alles fuers SwPagePreViewWin
@@ -206,7 +202,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
mnSttPage = USHRT_MAX;
@@ -246,15 +242,15 @@ void SwPagePreViewWin::Paint( const Rectangle& rRect )
}
}
-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;
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 )
@@ -274,7 +270,7 @@ void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
// Sortierung muss eingehalten werden!!
// additional invalidate page status.
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
SID_ATTR_ZOOM, SID_ZOOM_OUT, SID_ZOOM_IN,
FN_PREVIEW_ZOOM,
@@ -297,10 +293,10 @@ void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
int SwPagePreViewWin::MovePage( int eMoveMode )
{
// soviele Seiten hoch
- USHORT nPages = mnRow * mnCol;
- USHORT nNewSttPage = mnSttPage;
- USHORT nPageCount = mrView.GetPageCount();
- USHORT nDefSttPg = GetDefSttPage();
+ sal_uInt16 nPages = mnRow * mnCol;
+ sal_uInt16 nNewSttPage = mnSttPage;
+ sal_uInt16 nPageCount = mrView.GetPageCount();
+ sal_uInt16 nDefSttPg = GetDefSttPage();
bool bPaintPageAtFirstCol = true;
switch( eMoveMode )
@@ -377,13 +373,13 @@ int SwPagePreViewWin::MovePage( int eMoveMode )
maPaintedPreviewDocRect, bPaintPageAtFirstCol );
if( nNewSttPage == mnSttPage &&
eMoveMode != MV_SELPAGE )
- return FALSE;
+ return sal_False;
SetPagePreview(mnRow, mnCol);
mnSttPage = nNewSttPage;
// additional invalidate page status.
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -392,7 +388,7 @@ int SwPagePreViewWin::MovePage( int eMoveMode )
SfxBindings& rBindings = mrView.GetViewFrame()->GetBindings();
rBindings.Invalidate( aInval );
- return TRUE;
+ return sal_True;
}
void SwPagePreViewWin::SetWinSize( const Size& rNewSize )
@@ -422,7 +418,7 @@ void SwPagePreViewWin::SetWinSize( const Size& rNewSize )
maScale = GetMapMode().GetScaleX();
}
-void SwPagePreViewWin::GetStatusStr( String& rStr, USHORT nPageCnt ) const
+void SwPagePreViewWin::GetStatusStr( String& rStr, sal_uInt16 nPageCnt ) const
{
// show physical and virtual page number of
// selected page, if it's visible.
@@ -449,11 +445,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;
@@ -462,7 +458,7 @@ void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt )
}
if(nSlot)
{
- bHandled = TRUE;
+ bHandled = sal_True;
mrView.GetViewFrame()->GetDispatcher()->Execute(
nSlot, SFX_CALLMODE_ASYNCHRON );
}
@@ -473,12 +469,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:
@@ -542,7 +538,7 @@ void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt )
mrView.SetVScrollbarThumbPos( nNewSelectedPage );
}
// invalidate page status.
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
FN_STAT_PAGE, 0
};
@@ -555,9 +551,9 @@ void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt )
/******************************************************************************
* Beschreibung: Userprefs bzw Viewoptions setzen
******************************************************************************/
-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())
{
@@ -644,7 +640,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
@@ -688,7 +684,7 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
}
ScrollViewSzChg();
// additional invalidate page status.
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -707,8 +703,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())
@@ -723,9 +719,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 );
@@ -740,7 +736,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 );
@@ -751,7 +747,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
// book preview mode changed. Thus, adjust scrollbars and
// invalidate corresponding states.
ScrollViewSzChg();
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, FN_SHOW_BOOKVIEW, 0
@@ -803,13 +799,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);
@@ -822,9 +818,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 );
}
}
@@ -871,12 +867,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 );
// invalidate page status.
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
FN_STAT_PAGE, 0
};
@@ -899,14 +895,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));
@@ -922,14 +918,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 );
@@ -937,8 +933,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:
@@ -950,7 +946,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 ))
@@ -973,12 +969,12 @@ 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();
OSL_ENSURE(nWhich, "empty set");
SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout();
// zoom has to be disabled if Accessibility support is switched on
- BOOL bZoomEnabled = TRUE; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();
+ sal_Bool bZoomEnabled = sal_True; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();
while(nWhich)
{
@@ -1046,7 +1042,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 );
@@ -1082,7 +1078,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;
@@ -1099,10 +1095,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 );
@@ -1111,7 +1107,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:
@@ -1126,7 +1122,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)
{
@@ -1138,58 +1134,57 @@ 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());
// adjust view shell option to the same as for print
- SwPrtOptions aPrintOptions( GetViewFrame()->GetObjectShell()->GetTitle(0) );
- aPrintOptions.MakeOptions( false );
+ SwPrintData const aPrintOptions = *SW_MOD()->GetPrtOptions(false);
GetViewShell()->AdjustOptionsForPagePreview( aPrintOptions );
IDocumentSettingAccess* pIDSA = pESh->getIDocumentSettingAccess();
if( pIDSA->get(IDocumentSettingAccess::BROWSE_MODE))
{
pIDSA->set(IDocumentSettingAccess::BROWSE_MODE, false);
- pESh->CheckBrowseView( TRUE );
+ pESh->CheckBrowseView( sal_True );
}
GetViewShell()->CalcLayout();
@@ -1220,8 +1215,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 )
@@ -1244,15 +1239,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, TRUE, FALSE );
+ sal_uInt16 nPhysPg, nVirtPg;
+ ((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, sal_True, sal_False );
if( 1 != aViewWin.GetCol() && 1 == nPhysPg )
--nPhysPg;
aViewWin.SetSttPage( nPhysPg );
@@ -1296,7 +1291,7 @@ SwDocShell* SwPagePreView::GetDocShell()
return PTR_CAST(SwDocShell, GetViewFrame()->GetObjectShell());
}
-int SwPagePreView::_CreateScrollbar( BOOL bHori )
+int SwPagePreView::_CreateScrollbar( sal_Bool bHori )
{
Window *pMDI = &GetViewFrame()->GetWindow();
SwScrollbar** ppScrollbar = bHori ? &pHScrollbar : &pVScrollbar;
@@ -1307,9 +1302,9 @@ int SwPagePreView::_CreateScrollbar( BOOL bHori )
{
pPageUpBtn = new ImageButton(pMDI, SW_RES( BTN_PAGEUP ) );
- pPageUpBtn->SetHelpId(FN_PAGEUP);
+ pPageUpBtn->SetHelpId(GetStaticInterface()->GetSlot(FN_PAGEUP)->GetCommand());
pPageDownBtn = new ImageButton(pMDI, SW_RES( BTN_PAGEDOWN ) );
- pPageDownBtn->SetHelpId(FN_PAGEDOWN);
+ pPageDownBtn->SetHelpId(GetStaticInterface()->GetSlot(FN_PAGEDOWN)->GetCommand());
Link aLk( LINK( this, SwPagePreView, BtnPage ) );
pPageUpBtn->SetClickHdl( aLk );
pPageDownBtn->SetClickHdl( aLk );
@@ -1320,7 +1315,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 ));
@@ -1362,7 +1357,7 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
{
ScrollViewSzChg();
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT,
FN_PAGEUP, FN_PAGEDOWN, 0
@@ -1375,13 +1370,13 @@ 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 StyleSettings &rSet = aViewWin.GetSettings().GetStyleSettings();
const long nTmp = rSet.GetScrollBarSize();
- 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 );
}
@@ -1389,12 +1384,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 );
@@ -1405,9 +1400,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!
@@ -1425,7 +1420,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()));
@@ -1484,7 +1479,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 );
@@ -1521,7 +1516,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();
// adjust to new preview functionality
if( nThmbPos != aViewWin.SelectedPage() )
{
@@ -1542,7 +1537,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
{
aViewWin.SetSttPage( nThmbPos );
aViewWin.SetSelectedPage( nThmbPos );
- ChgPage( SwPagePreViewWin::MV_SCROLL, FALSE );
+ ChgPage( SwPagePreViewWin::MV_SCROLL, sal_False );
// update scrollbars
ScrollViewSzChg();
}
@@ -1582,7 +1577,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
aViewWin.Scroll(nThmbPos - aViewWin.GetPaintedPreviewDocRect().Left(), 0);
}
// additional invalidate page status.
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -1616,7 +1611,7 @@ void SwPagePreView::DocSzChgd( const Size &rSz )
if( aVisArea.GetWidth() )
{
- ChgPage( SwPagePreViewWin::MV_CALC, TRUE );
+ ChgPage( SwPagePreViewWin::MV_CALC, sal_True );
ScrollDocSzChg();
aViewWin.Invalidate();
@@ -1633,7 +1628,7 @@ void SwPagePreView::ScrollViewSzChg()
{
//vertical scrolling by row
// adjust to new preview functionality
- USHORT nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
+ sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
pVScrollbar->SetVisibleSize( nVisPages );
// set selected page as scroll bar position,
// if it is visible.
@@ -1698,12 +1693,12 @@ void SwPagePreView::ScrollDocSzChg()
}
// alles zum Thema Drucken
-SfxPrinter* SwPagePreView::GetPrinter( BOOL bCreate )
+SfxPrinter* SwPagePreView::GetPrinter( sal_Bool bCreate )
{
return aViewWin.GetViewShell()->getIDocumentDeviceAccess()->getPrinter( 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 );
@@ -1718,15 +1713,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 ) );
@@ -1737,14 +1732,14 @@ USHORT SwPagePreView::SetPrinter( SfxPrinter *pNew, USHORT nDiffFlags, bool )
rESh.SetModified();
rESh.EndAllAction();
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
SID_ATTR_LONG_ULSPACE, SID_ATTR_LONG_LRSPACE,
SID_RULER_BORDERS, SID_RULER_PAGE_POS, 0
};
#if OSL_DEBUG_LEVEL > 1
{
- const USHORT* pPtr = aInval + 1;
+ const sal_uInt16* pPtr = aInval + 1;
do {
OSL_ENSURE( *(pPtr - 1) < *pPtr, "wrong sorting!" );
} while( *++pPtr );
@@ -1763,14 +1758,6 @@ SfxTabPage* SwPagePreView::CreatePrintOptionsPage( Window *pParent,
return ::CreatePrintOptionsPage( pParent, rOptions, !bNormalPrint );
}
-PrintDialog* SwPagePreView::CreatePrintDialog( Window *pParent )
-{
- PrintDialog *pDlg = ::CreatePrintDialog( pParent, 1, 0 );
- pDlg->DisableRange( PRINTDIALOG_SELECTION );
- return pDlg;
-}
-
-// no longer needed ??
Size SwPagePreView::GetOptimalSizePixel() const
{
OSL_ENSURE( false, "overloaded virtual method <SwPagePreView::GetOptimalSizePixel()> needed ??" );
@@ -1843,7 +1830,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(),
@@ -1852,16 +1839,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;
@@ -1876,7 +1863,7 @@ BOOL SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
}
SetZoom(SVX_ZOOM_PERCENT, nFactor);
}
- bOk = TRUE;
+ bOk = sal_True;
}
else
bOk = aViewWin.HandleScrollCommand( rCEvt, pHScrollbar, pVScrollbar );
@@ -1909,7 +1896,7 @@ void SwPagePreView::ShowVScrollbar(sal_Bool bShow)
InvalidateBorder();
}
-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/pview.src b/sw/source/ui/uiview/pview.src
index 4b97c83c43..0cfd2b1ec0 100644
--- a/sw/source/ui/uiview/pview.src
+++ b/sw/source/ui/uiview/pview.src
@@ -29,7 +29,6 @@
#include "pview.hrc"
#include "helpid.h"
#include "cmdid.h"
-
ModalDialog DLG_PAGEPREVIEW_ZOOM
{
HelpID = HID_PPREV_ZOOM ;
@@ -54,6 +53,7 @@ ModalDialog DLG_PAGEPREVIEW_ZOOM
};
NumericField ED_COL
{
+ HelpID = "sw:NumericField:DLG_PAGEPREVIEW_ZOOM:ED_COL";
Border = TRUE ;
Size = MAP_APPFONT ( 28 , 12 ) ;
Pos = MAP_APPFONT ( 48 , 34 ) ;
@@ -69,6 +69,7 @@ ModalDialog DLG_PAGEPREVIEW_ZOOM
};
NumericField ED_ROW
{
+ HelpID = "sw:NumericField:DLG_PAGEPREVIEW_ZOOM:ED_ROW";
Border = TRUE ;
Pos = MAP_APPFONT ( 48 , 13 ) ;
Size = MAP_APPFONT ( 28 , 12 ) ;
@@ -106,92 +107,4 @@ String RID_PVIEW_TOOLBOX
{
Text [ en-US ] = "Page Preview" ;
};
-ToolBox RID_PVIEW_TOOLBOX
-{
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- HelpID = HID_PVIEW_TOOLBOX ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = FN_PAGEUP ;
- HelpID = FN_PAGEUP ;
- };
- ToolBoxItem
- {
- Identifier = FN_PAGEDOWN ;
- HelpID = FN_PAGEDOWN ;
- };
- ToolBoxItem
- {
- Identifier = FN_START_OF_DOCUMENT ;
- HelpID = FN_START_OF_DOCUMENT ;
- };
- ToolBoxItem
- {
- Identifier = FN_END_OF_DOCUMENT ;
- HelpID = FN_END_OF_DOCUMENT ;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = FN_SHOW_TWO_PAGES ;
- HelpID = FN_SHOW_TWO_PAGES ;
- };
- ToolBoxItem
- {
- Identifier = FN_SHOW_MULTIPLE_PAGES ;
- HelpID = FN_SHOW_MULTIPLE_PAGES ;
- DropDown = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_SHOW_BOOKVIEW ;
- HelpID = FN_SHOW_BOOKVIEW ;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_ZOOM_OUT;
- HelpID = SID_ZOOM_OUT ;
- };
- ToolBoxItem
- {
- Identifier = SID_ZOOM_IN;
- HelpID = SID_ZOOM_IN ;
- };
- ToolBoxItem
- {
- Identifier = FN_PREVIEW_ZOOM;
- HelpID = HID_PREVIEW_ZOOM ;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_WIN_FULLSCREEN ;
- HelpID = SID_WIN_FULLSCREEN ;
- };
- ToolBoxItem
- {
- Identifier = FN_PRINT_PAGEPREVIEW ;
- HelpID = FN_PRINT_PAGEPREVIEW ;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = FN_CLOSE_PAGEPREVIEW;
- HelpID = SID_PRINTPREVIEW;
- };
- };
- Scroll = TRUE ;
-};
diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx
index e8b6f4f33e..2589dc09d4 100644
--- a/sw/source/ui/uiview/scroll.cxx
+++ b/sw/source/ui/uiview/scroll.cxx
@@ -36,18 +36,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 );
}
@@ -62,7 +62,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 );
SetPageSize( nVisSize * 77 / 100 );
}
@@ -95,7 +95,7 @@ void SwScrollbar::ViewPortChgd( const Rectangle &rRect )
AutoShow();
}
-void SwScrollbar::ExtendedShow( BOOL bSet )
+void SwScrollbar::ExtendedShow( sal_Bool bSet )
{
bVisible = bSet;
if( (!bSet || !bAuto) && IsUpdateMode() && bSizeSet)
@@ -105,13 +105,13 @@ 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();
}
-void SwScrollbar::SetAuto(BOOL bSet)
+void SwScrollbar::SetAuto(sal_Bool bSet)
{
if(bAuto != bSet)
{
@@ -119,7 +119,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
}
@@ -132,14 +132,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 7e4adbd64d..5ac3120a30 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -50,6 +50,8 @@
#include <svl/whiter.hxx>
#include <unotools/saveopt.hxx>
#include <svtools/transfer.hxx>
+#include <svtools/svtools.hrc>
+#include <svtools/svtdata.hxx>
#include <svx/svxids.hrc>
#include <svtools/htmlcfg.hxx>
#include <sfx2/app.hxx>
@@ -89,10 +91,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>
@@ -140,7 +138,7 @@ SFX_IMPL_INTERFACE( SwSrcView, SfxViewShell, SW_RES(0) )
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();
@@ -211,8 +209,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' )
@@ -233,7 +231,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();
@@ -244,7 +242,7 @@ SwSrcView::~SwSrcView()
SwDocShell* pDocShell = GetDocShell();
OSL_ENSURE(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);
@@ -277,10 +275,10 @@ void SwSrcView::Init()
Load(pDocShell);
else
{
- aEditWin.SetReadonly(TRUE);
+ aEditWin.SetReadonly(sal_True);
}
- StartListening(*pDocShell,TRUE);
+ StartListening(*pDocShell,sal_True);
}
SwDocShell* SwSrcView::GetDocShell()
@@ -291,7 +289,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);
@@ -300,7 +298,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 )
{
@@ -339,7 +337,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 );
@@ -378,11 +376,11 @@ void SwSrcView::Execute(SfxRequest& rReq)
{
const SfxItemSet* pTmpArgs = rReq.GetArgs();
- USHORT nWhich = pTmpArgs->GetWhichByPos( 0 );
+ sal_uInt16 nWhich = pTmpArgs->GetWhichByPos( 0 );
OSL_ENSURE( 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();
}
@@ -392,7 +390,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();
}
@@ -406,11 +404,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;
@@ -435,7 +433,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)
@@ -469,7 +467,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);
@@ -502,14 +500,14 @@ void SwSrcView::GetState(SfxItemSet& rSet)
case SID_UNDO:
case SID_REDO:
{
- SfxUndoManager& rMgr = pTextView->GetTextEngine()->GetUndoManager();
- USHORT nCount = 0;
+ ::svl::IUndoManager& rMgr = pTextView->GetTextEngine()->GetUndoManager();
+ sal_uInt16 nCount = 0;
if(nWhich == SID_UNDO)
{
nCount = rMgr.GetUndoActionCount();
if(nCount)
{
- String aStr(ResId( STR_UNDO, *SFX_APP()->GetSfxResManager() ));;
+ String aStr(SvtResId( STR_UNDO));;
aStr += rMgr.GetUndoActionComment(--nCount);
rSet.Put(SfxStringItem(nWhich, aStr));
}
@@ -521,7 +519,7 @@ void SwSrcView::GetState(SfxItemSet& rSet)
nCount = rMgr.GetRedoActionCount();
if(nCount)
{
- String aStr(ResId( STR_REDO, *SFX_APP()->GetSfxResManager() ));;
+ String aStr(SvtResId( STR_REDO));;
aStr += rMgr.GetRedoActionComment(--nCount);
rSet.Put(SfxStringItem(nWhich,aStr));
}
@@ -550,7 +548,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);
@@ -576,20 +574,20 @@ void SwSrcView::SetSearchItem( const SvxSearchItem& rItem )
pSearchItem = (SvxSearchItem*)rItem.Clone();
}
-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 )
{
@@ -601,8 +599,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:
@@ -610,7 +608,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;
@@ -621,7 +619,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
if( !nFound )
{
- BOOL bNotFoundMessage = FALSE;
+ sal_Bool bNotFoundMessage = sal_False;
if(!bRecursive)
{
if(!bFromStart)
@@ -630,13 +628,13 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
}
else
{
- bNotFoundMessage = TRUE;
+ bNotFoundMessage = sal_True;
pTextView->SetSelection( aSel );
}
}
else if(bAtStart)
{
- bNotFoundMessage = TRUE;
+ bNotFoundMessage = sal_True;
}
@@ -651,14 +649,14 @@ 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 );
}
}
}
return nFound;
}
-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 )
@@ -668,10 +666,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();
@@ -679,7 +677,7 @@ USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
return 0;
}
-SfxPrinter* SwSrcView::GetPrinter( BOOL bCreate )
+SfxPrinter* SwSrcView::GetPrinter( sal_Bool bCreate )
{
return GetDocShell()->GetDoc()->getPrinter( bCreate );
}
@@ -710,32 +708,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;
@@ -772,7 +770,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);
@@ -790,8 +788,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();
@@ -815,9 +813,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);
- pTextEngine->EnableUndo(TRUE);
+ pTextEngine->EnableUndo(sal_True);
}
else
{
@@ -833,18 +831,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();
@@ -862,9 +860,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);
OSL_ENSURE(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 aea6565fc1..344c9bb680 100644
--- a/sw/source/ui/uiview/swcli.cxx
+++ b/sw/source/ui/uiview/swcli.cxx
@@ -28,20 +28,23 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
+#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
#include <wrtsh.hxx>
+#include <doc.hxx>
#include <swtypes.hxx>
#include <view.hxx>
#include <edtwin.hxx>
#include <swcli.hxx>
+#include <cmdid.h>
+#include <cfgitems.hxx>
#include <toolkit/helper/vclunohelper.hxx>
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() );
@@ -155,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()
@@ -168,4 +171,16 @@ void SwOleClient::MakeVisible()
rSh.MakeObjVisible( GetObject() );
}
+void SwOleClient::FormatChanged()
+{
+ const uno::Reference < embed::XEmbeddedObject >& xObj( GetObject() );
+ SwView * pView = dynamic_cast< SwView * >( GetViewShell() );
+ if ( pView && xObj.is() && SotExchange::IsMath( xObj->getClassID() ) )
+ {
+ SwWrtShell & rWrtSh = pView->GetWrtShell();
+ if (rWrtSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ))
+ rWrtSh.AlignFormulaToBaseline( xObj );
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx
index 80f3758d81..0563c27af6 100644
--- a/sw/source/ui/uiview/uivwimp.cxx
+++ b/sw/source/ui/uiview/uivwimp.cxx
@@ -98,7 +98,7 @@ SwView_Impl::~SwView_Impl()
pScanEvtLstnr->ViewDestroyed();
if( xClipEvtLstnr.is() )
{
- pClipEvtLstnr->AddRemoveListener( FALSE );
+ pClipEvtLstnr->AddRemoveListener( sal_False );
pClipEvtLstnr->ViewDestroyed();
}
delete pConfigItem;
@@ -125,12 +125,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() )
@@ -162,7 +162,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() )
@@ -175,7 +175,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
{
Reference< XEventListener > xLstner = &rListener;
xScanMgr->startScan( aContexts.getConstArray()[ 0 ], xLstner );
- bDone = TRUE;
+ bDone = sal_True;
}
}
catch(...)
@@ -212,7 +212,7 @@ void SwView_Impl::AddClipboardListener()
if(!xClipEvtLstnr.is())
{
xClipEvtLstnr = pClipEvtLstnr = new SwClipboardChangeListener( *pView );
- pClipEvtLstnr->AddRemoveListener( TRUE );
+ pClipEvtLstnr->AddRemoveListener( sal_True );
}
}
@@ -265,7 +265,7 @@ SwScannerEventListener::~SwScannerEventListener()
void SAL_CALL SwScannerEventListener::disposing( const EventObject& rEventObject) throw(uno::RuntimeException)
{
-#if defined WIN || defined WNT || defined UNX
+#if defined WNT || defined UNX
SolarMutexGuard aGuard;
if( pView )
pView->ScannerEventHdl( rEventObject );
@@ -307,7 +307,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 49e48d9c97..36c1d96082 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -39,7 +39,6 @@
#include <svl/eitem.hxx>
#include <unotools/undoopt.hxx>
#include <unotools/lingucfg.hxx>
-#include <svtools/printdlg.hxx>
#include <unotools/useroptions.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
@@ -81,6 +80,7 @@
#include <usrpref.hxx>
#include <srcview.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <drawdoc.hxx>
#include <wdocsh.hxx>
#include <wview.hxx>
@@ -94,7 +94,6 @@
#include <frmui.hrc>
#include <cfgitems.hxx>
#include <prtopt.hxx>
-#include <swprtopt.hxx>
#include <linguistic/lngprops.hxx>
#include <editeng/unolingu.hxx>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
@@ -174,7 +173,7 @@ void SwView::ImpSetVerb( int nSelType )
}
if ( bResetVerbs )
{
- SetVerbs( 0 );
+ SetVerbs( Sequence< embed::VerbDescriptor >() );
bVerbsActive = sal_False;
}
}
@@ -278,7 +277,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 );
@@ -304,7 +303,7 @@ void SwView::SelectShell()
}
}
- BOOL bInitFormShell = sal_False;
+ sal_Bool bInitFormShell = sal_False;
if (!pFormShell)
{
bInitFormShell = sal_True;
@@ -313,7 +312,7 @@ void SwView::SelectShell()
StartListening(*pFormShell);
}
- BOOL bSetExtInpCntxt = sal_False;
+ sal_Bool bSetExtInpCntxt = sal_False;
nSelectionType = nNewSelectionType;
ShellModes eShellMode;
@@ -553,8 +552,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;
@@ -749,9 +748,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)
{
// According to discussion with MBA and further
// investigations, no old SfxViewShell will be set as parameter <pOldSh>,
@@ -769,8 +768,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"));
@@ -779,7 +778,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 );
OSL_ENSURE( pDocSh, "view without DocShell." );
@@ -795,7 +794,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
aUsrPref.SetOnlineSpell( aLinguOpt.bIsSpellAuto );
- sal_Bool bOldShellWasSrcView = FALSE;
+ sal_Bool bOldShellWasSrcView = sal_False;
// determine if there is an existing view for
// document
@@ -818,11 +817,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))
@@ -908,8 +907,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 );
// Set Zoom-factor from HLineal
Fraction aZoomFract( aUsrPref.GetZoom(), 100 );
@@ -946,11 +945,9 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
!pDocSh->GetVisArea(ASPECT_CONTENT).IsEmpty() )
SetVisArea( pDocSh->GetVisArea(ASPECT_CONTENT),sal_False);
- SwEditShell::SetUndoActionCount(
- static_cast< USHORT >( SW_MOD()->GetUndoOptions().GetUndoCount() ) );
- pWrtShell->DoUndo( 0 != SwEditShell::GetUndoActionCount() );
+ 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());
@@ -981,7 +978,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
@@ -993,7 +990,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
// so setze das Modified NICHT zurueck.
// no reset of modified state, if document
// was already modified.
- if ( !pWrtShell->GetDoc()->IsUndoNoResetModified() &&
+ if (!pWrtShell->GetDoc()->GetIDocumentUndoRedo().IsUndoNoResetModified() &&
( !pFirst || pFirst == pVFrame ) &&
!bIsDocModified )
{
@@ -1034,10 +1031,10 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
pDocSh->EnableSetModified( sal_True );
InvalidateBorder();
- if( !pHScrollbar->IsVisible( TRUE ) )
- ShowHScrollbar( FALSE );
- if( !pVScrollbar->IsVisible( TRUE ) )
- ShowVScrollbar( FALSE );
+ if( !pHScrollbar->IsVisible( sal_True ) )
+ ShowHScrollbar( sal_False );
+ if( !pVScrollbar->IsVisible( sal_True ) )
+ ShowVScrollbar( sal_False );
GetViewFrame()->GetWindow().AddChildEventListener( LINK( this, SwView, WindowChildEventListener ) );
}
@@ -1048,7 +1045,7 @@ SwView::~SwView()
delete mpPostItMgr;
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();
@@ -1234,7 +1231,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 );
@@ -1245,7 +1242,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;
}
@@ -1535,8 +1532,8 @@ void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSe
void SwView::ShowCursor( bool bOn )
{
//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();
@@ -1544,7 +1541,7 @@ void SwView::ShowCursor( bool bOn )
pWrtShell->ShowCrsr();
if( bUnlockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
}
ErrCode SwView::DoVerb( long nVerb )
@@ -1594,7 +1591,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();
@@ -1682,7 +1679,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SfxViewShell::Notify(rBC, rHint);
}
-#if defined WIN || defined WNT || defined UNX
+#if defined WNT || defined UNX
void SwView::ScannerEventHdl( const EventObject& /*rEventObject*/ )
{
@@ -1748,9 +1745,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(
@@ -1763,7 +1760,7 @@ BOOL SwView::IsPasteAllowed()
*pWrtShell, aDataHelper );
}
else
- bPasteState = bPasteSpecialState = FALSE;
+ bPasteState = bPasteSpecialState = sal_False;
if( 0xFFFF == nLastPasteDestination ) // the init value
pViewImpl->AddClipboardListener();
@@ -1772,12 +1769,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(
@@ -1790,7 +1787,7 @@ BOOL SwView::IsPasteSpecialAllowed()
*pWrtShell, aDataHelper );
}
else
- bPasteState = bPasteSpecialState = FALSE;
+ bPasteState = bPasteSpecialState = sal_False;
if( 0xFFFF == nLastPasteDestination ) // the init value
pViewImpl->AddClipboardListener();
@@ -1806,19 +1803,18 @@ void SwView::NotifyDBChanged()
/*--------------------------------------------------------------------
Beschreibung: Drucken
--------------------------------------------------------------------*/
-SfxObjectShellRef & SwView::GetTmpSelectionDoc()
+SfxObjectShellLock & SwView::GetTmpSelectionDoc()
{
return GetViewImpl()->GetTmpSelectionDoc();
}
-SfxObjectShellRef & SwView::GetOrCreateTmpSelectionDoc()
+SfxObjectShellLock & SwView::GetOrCreateTmpSelectionDoc()
{
- SfxObjectShellRef &rxTmpDoc = GetViewImpl()->GetTmpSelectionDoc();
+ SfxObjectShellLock &rxTmpDoc = GetViewImpl()->GetTmpSelectionDoc();
if (!rxTmpDoc.Is())
{
SwXTextView *pImpl = GetViewImpl()->GetUNOObject_Impl();
- rxTmpDoc = pImpl->BuildTmpSelectionDoc(
- GetViewImpl()->GetEmbeddedObjRef() );
+ rxTmpDoc = pImpl->BuildTmpSelectionDoc();
}
return rxTmpDoc;
}
@@ -1828,18 +1824,13 @@ void SwView::AddTransferable(SwTransferable& rTransferable)
GetViewImpl()->AddTransferable(rTransferable);
}
-void SwPrtOptions::MakeOptions( BOOL bWeb )
-{
- *this = *SW_MOD()->GetPrtOptions(bWeb);
-
- nCopyCount = 1;
- bCollate = FALSE;
- bPrintSelection = FALSE;
- bJobStartet = FALSE;
+namespace sw {
- aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
- aMulti.SelectAll();
- aMulti.Select( 0, FALSE );
+void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb)
+{
+ o_rData = *SW_MOD()->GetPrtOptions(bWeb);
}
+} // namespace sw
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/view.hrc b/sw/source/ui/uiview/view.hrc
index e05b61e751..e05b61e751 100644..100755
--- a/sw/source/ui/uiview/view.hrc
+++ b/sw/source/ui/uiview/view.hrc
diff --git a/sw/source/ui/uiview/view.src b/sw/source/ui/uiview/view.src
index 233664b509..e006ee71ae 100644
--- a/sw/source/ui/uiview/view.src
+++ b/sw/source/ui/uiview/view.src
@@ -196,160 +196,6 @@ String MN_SRCVIEW_POPUPMENU
Text [ en-US ] = "HTML source" ;
};
-ToolBox RID_TOOLS_TOOLBOX
-{
- HelpID = HID_TOOLS_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Scroll = TRUE ;
- Align = BOXALIGN_LEFT ;
- Hide = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = FN_INSERT_CTRL ;
- HelpID = HID_INSERT_CTRL ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_FIELD_CTRL ;
- HelpID = HID_INSERT_FIELD_CTRL ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_OBJ_CTRL ;
- HelpID = HID_INSERT_OBJ_CTRL ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_INSERT_DRAW
- };
- ToolBoxItem
- {
- ITEM_FORM_CONFIG
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_GLOSSARY_DLG ;
- HelpID = FN_GLOSSARY_DLG ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_CAPTION;
- HelpID = FN_INSERT_CAPTION ;
- Hide = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_IDX_ENTRY_DLG;
- HelpId = FN_INSERT_IDX_ENTRY_DLG;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_REF_FIELD;
- HelpID = FN_INSERT_REF_FIELD ;
- Hide = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = FN_SHADOWCURSOR ;
- HelpID = FN_SHADOWCURSOR ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_SPELL_GRAMMAR_DIALOG;
- HelpID = FN_SPELL_GRAMMAR_DIALOG;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_AUTOSPELL_CHECK
- };
- ToolBoxItem
- {
- Identifier = FN_HYPHENATE_OPT_DLG;
- HelpID = FN_HYPHENATE_OPT_DLG;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_THESAURUS;
- HelpID = SID_THESAURUS;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_SEARCH_DLG ;
- HelpID = SID_SEARCH_DLG ;
- };
- ToolBoxItem
- {
- Identifier = SID_VIEW_DATA_SOURCE_BROWSER ;
- HelpID = SID_VIEW_DATA_SOURCE_BROWSER ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_ZOOM;
- HelpID = SID_ATTR_ZOOM ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_VIEW_META_CHARS ;
- HelpID = FN_VIEW_META_CHARS ;
- };
- ToolBoxItem
- {
- Identifier = FN_VIEW_FIELDNAME ;
- HelpID = FN_VIEW_FIELDNAME ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_VIEW_GRAPHIC ;
- HelpID = FN_VIEW_GRAPHIC ;
- };
- ToolBoxItem
- {
- Identifier = SID_BROWSER_MODE ;
- HelpID = SID_BROWSER_MODE ;
- };
- };
-};
Menu MN_SRCVIEW_POPUPMENU
{
ItemList =
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index 6c7674934a..641aa159bb 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -65,11 +65,6 @@
#define OLEObjects
#define SwView
-#define SearchAttributes
-#define ReplaceAttributes
-#define SearchSettings
-#define _ExecSearch ExecSearch
-#define _StateSearch StateSearch
#define Frames
#define Graphics
#define Tables
@@ -89,7 +84,6 @@
#define WebListInTable
#define TextPage
#include <sfx2/msg.hxx>
-#include <svx/svxslots.hxx>
#include "swslots.hxx"
#include <PostItMgr.hxx>
@@ -184,7 +178,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)
@@ -228,7 +222,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;
@@ -330,7 +324,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 )
@@ -345,13 +339,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:
@@ -431,7 +425,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:
@@ -520,15 +514,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 7e94e764d7..d1fdb5f32b 100644
--- a/sw/source/ui/uiview/view1.cxx
+++ b/sw/source/ui/uiview/view1.cxx
@@ -53,7 +53,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
@@ -75,23 +75,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)
@@ -123,9 +123,9 @@ void SwView::Activate(BOOL bMDIActivate)
SfxViewShell::Activate(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();
@@ -134,8 +134,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 470f8a3fd1..aace13c3c8 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <com/sun/star/util/SearchOptions.hpp>
#include <com/sun/star/util/SearchFlags.hpp>
#include <com/sun/star/i18n/TransliterationModules.hpp>
@@ -44,7 +45,7 @@
#include <docary.hxx>
#include <hintids.hxx>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
+#include <numrule.hxx>
#include <swundo.hxx>
#include <caption.hxx>
#include <svl/PasswordHelper.hxx>
@@ -89,6 +90,7 @@
#include <uivwimp.hxx>
#include <docsh.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <wrtsh.hxx>
#include <viewopt.hxx>
#include <basesh.hxx>
@@ -159,14 +161,14 @@ using namespace ::com::sun::star::beans;
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 +180,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();
}
}
@@ -187,7 +189,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 );
@@ -208,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;
@@ -226,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();
@@ -252,15 +254,15 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter,
return nRes;
}
-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 ));
@@ -277,8 +279,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 ];
@@ -325,7 +327,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() )
{
@@ -429,7 +431,7 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
if(!pFmt)
pFmt = pDoc->MakeFrmFmt(sGraphicFormat,
pDocShell->GetDoc()->GetDfltFrmFmt(),
- TRUE, FALSE);
+ sal_True, sal_False);
rSh.SetFrmFmt( pFmt );
}
@@ -470,12 +472,12 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
else
{
// set the specific graphic attrbutes to the graphic
- bReturn = TRUE;
+ bReturn = sal_True;
AutoCaption( GRAPHIC_CAP );
rReq.Done();
}
- rSh.EndUndo(UNDO_INSERT); // wegen moegl. Shellwechsel
+ rSh.EndUndo(); // due to possible change of Shell
}
delete pFileDlg;
@@ -485,10 +487,10 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
void 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:
@@ -532,7 +534,7 @@ void 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();
@@ -542,7 +544,7 @@ void 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();
@@ -561,8 +563,8 @@ void 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);
}
}
@@ -571,7 +573,7 @@ void 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;
@@ -579,7 +581,7 @@ void 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();
@@ -589,7 +591,7 @@ void 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();
@@ -603,20 +605,20 @@ void 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;
@@ -635,8 +637,8 @@ void 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 )
@@ -655,20 +657,20 @@ void 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 );
@@ -688,7 +690,7 @@ void 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)
@@ -696,12 +698,12 @@ void 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:
{
@@ -748,7 +750,7 @@ void SwView::Execute(SfxRequest &rReq)
}
else if ( GetEditWin().IsChainMode() )
{
- GetEditWin().SetChainMode( FALSE );
+ GetEditWin().SetChainMode( sal_False );
}
else if( pWrtShell->GetFlyFrmFmt() )
{
@@ -761,9 +763,9 @@ void 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;
@@ -783,7 +785,7 @@ void 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.
@@ -827,12 +829,12 @@ void 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;
@@ -848,13 +850,13 @@ void 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;
}
// das pBase wird nur fuer die Schnittstelle
// benoetigt. Muss mal umgetstellt werden!!!
@@ -872,9 +874,9 @@ void 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);
@@ -895,14 +897,14 @@ void 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
@@ -916,7 +918,7 @@ void SwView::Execute(SfxRequest &rReq)
GetViewFrame()->GetBindings().Invalidate( nSlot );
}
break;
-#if defined WIN || defined WNT || defined UNX
+#if defined WNT || defined UNX
case SID_TWAIN_SELECT:
case SID_TWAIN_TRANSFER:
GetViewImpl()->ExecuteScan( rReq );
@@ -925,17 +927,17 @@ void 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 );
@@ -943,21 +945,21 @@ void 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() );
@@ -966,7 +968,7 @@ void 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 :
@@ -982,15 +984,15 @@ void 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();
if((bShow && bInMailMerge) != GetViewFrame()->HasChildWindow(nSlot))
GetViewFrame()->ToggleChildWindow(nSlot);
@@ -1017,7 +1019,7 @@ void 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 +1028,8 @@ void 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 +1090,7 @@ void 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 )
@@ -1161,7 +1163,7 @@ void 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 );
@@ -1178,7 +1180,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
SwWrtShell& rShell = GetWrtShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
OSL_ENSURE( nWhich, "empty set");
while( nWhich )
@@ -1187,24 +1189,24 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
{
case FN_STAT_PAGE: {
// 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;
@@ -1235,7 +1237,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 );
@@ -1249,13 +1251,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();
@@ -1374,7 +1376,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if (pNumRule && !bOutlineNum ) // Cursor in Numerierung
{
- BYTE nNumLevel = rShell.GetNumLevel();
+ sal_uInt8 nNumLevel = rShell.GetNumLevel();
if ( nNumLevel < MAXLEVEL )
{
if(!pNumRule->IsAutoRule())
@@ -1383,7 +1385,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
RES_PARATR_NUMRULE, RES_PARATR_NUMRULE);
rShell.GetCurAttr(aSet);
if(SFX_ITEM_AVAILABLE <=
- aSet.GetItemState(RES_PARATR_NUMRULE, TRUE ))
+ aSet.GetItemState(RES_PARATR_NUMRULE, sal_True))
{
const String& rNumStyle =
((const SfxStringItem &)
@@ -1463,8 +1465,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:
@@ -1477,7 +1479,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();
@@ -1549,19 +1551,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();
@@ -1577,9 +1579,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();
@@ -1587,7 +1589,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
SetViewLayout( nColumns, bBookMode );
}
- bUp = TRUE;
+ bUp = sal_True;
rReq.Done();
InvalidateRulerPos();
@@ -1600,13 +1602,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();
}
}
@@ -1614,7 +1616,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() )
@@ -1641,7 +1643,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;
@@ -1649,7 +1651,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() )
{
@@ -1678,23 +1680,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();
@@ -1704,7 +1706,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
else
rSh.ToggleInsMode();
- bUp = TRUE;
+ bUp = sal_True;
break;
}
@@ -1716,11 +1718,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();
@@ -1745,7 +1747,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 )
@@ -1755,21 +1757,21 @@ 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 );
// 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,
@@ -1825,15 +1827,15 @@ 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 ) )) {
pWrtShell->addCurrentPosition();
bRet = pWrtShell->GotoINetAttr( *pINet->GetTxtINetFmt() );
@@ -1842,7 +1844,7 @@ BOOL SwView::JumpToSwMark( const String& rMark )
// 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
@@ -1857,7 +1859,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() );
@@ -1887,9 +1889,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;
}
@@ -1903,7 +1905,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 )
{
@@ -1914,7 +1916,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 );
@@ -1928,7 +1930,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();
@@ -1939,17 +1941,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
{
@@ -1964,21 +1966,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;
+ sal_Bool bInsert = sal_False, bCompare = sal_False;
long nFound = 0;
SwDocShell* pDocSh = GetDocShell();
switch( nSlotId )
{
case SID_DOCUMENT_MERGE: break;
- case SID_DOCUMENT_COMPARE: bCompare = TRUE; break;
- case SID_INSERTDOC: bInsert = TRUE; break;
+ case SID_DOCUMENT_COMPARE: bCompare = sal_True; break;
+ case SID_INSERTDOC: bInsert = sal_True; break;
default:
OSL_ENSURE( !this, "unknown SlotId!" );
- bInsert = TRUE;
+ bInsert = sal_True;
nSlotId = SID_INSERTDOC;
break;
}
@@ -2018,10 +2020,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
@@ -2032,10 +2034,8 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
}
else
{
- sal_Bool bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( sal_False );
+ ::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo());
nErrno = pDocSh->InsertFrom( *pMedium ) ? 0 : ERR_SWG_READ_ERROR;
- pDoc->DoUndo( bUndo );
}
}
@@ -2045,14 +2045,16 @@ 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 )
{ // Disable Undo for .sdw or
// if the number of page styles with header/footer has changed
if( !pRead || nUndoCheck != lcl_PageDescWithHeader( *pDoc ) )
- pDoc->DelAllUndoObj();
+ {
+ pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
+ }
}
pWrtShell->EndAllAction();
@@ -2069,18 +2071,19 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
else
{
SfxObjectShellRef xDocSh;
+ SfxObjectShellLock xLockRef;
-extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
+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;
- int nRet = lcl_FindDocShell( xDocSh, pMedium->GetName(), aEmptyStr,
+ int nRet = lcl_FindDocShell( xDocSh, xLockRef, pMedium->GetName(), aEmptyStr,
sFltNm, nVersion, pDocSh );
if( nRet )
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
pWrtShell->EnterStdMode(); // Selektionen loeschen
@@ -2106,7 +2109,7 @@ extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
return nFound;
}
-void SwView::EnableMailMerge(BOOL bEnable )
+void SwView::EnableMailMerge(sal_Bool bEnable )
{
bInMailMerge = bEnable;
SfxBindings& rBind = GetViewFrame()->GetBindings();
@@ -2174,7 +2177,7 @@ class SwMergeSourceWarningBox_Impl : public ModalDialog
void SetMessText( const String& rText ) { aMessageFI.SetText( rText ); }
};
-void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
+void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument)
{
if(bUseCurrentDocument)
{
@@ -2191,7 +2194,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
@@ -2201,7 +2204,7 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
// no cancel allowed
if ( RET_OK != aWarning.Execute() )
return;
- bCallAddressPilot = TRUE;
+ bCallAddressPilot = sal_True;
}
else
{
@@ -2231,12 +2234,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;
@@ -2294,7 +2297,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
@@ -2332,7 +2335,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 )
@@ -2358,7 +2361,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 87c20e40c6..ae81629926 100644
--- a/sw/source/ui/uiview/viewcoll.cxx
+++ b/sw/source/ui/uiview/viewcoll.cxx
@@ -45,7 +45,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:
@@ -58,10 +58,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());
diff --git a/sw/source/ui/uiview/viewdlg.cxx b/sw/source/ui/uiview/viewdlg.cxx
index e769766bec..4dcb2911cc 100644
--- a/sw/source/ui/uiview/viewdlg.cxx
+++ b/sw/source/ui/uiview/viewdlg.cxx
@@ -53,9 +53,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 )
{
@@ -63,11 +63,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 5aca43a02b..1712cd0565 100644
--- a/sw/source/ui/uiview/viewdlg2.cxx
+++ b/sw/source/ui/uiview/viewdlg2.cxx
@@ -31,7 +31,7 @@
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
-
+#include <sfx2/objface.hxx>
#include <fldmgr.hxx>
#include <expfld.hxx>
#include <modcfg.hxx>
@@ -84,10 +84,10 @@ void SwView::ExecDlgExt(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE,
- pMDI, *pWrtShell, TRUE );
+ pMDI, *pWrtShell, sal_True );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- pDlg->SetHelpId(FN_EDIT_FOOTNOTE);
+ pDlg->SetHelpId(GetStaticInterface()->GetSlot(FN_EDIT_FOOTNOTE)->GetCommand());
pDlg->SetText( SW_RESSTR(STR_EDIT_FOOTNOTE) );
pDlg->Execute();
delete pDlg;
@@ -96,15 +96,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);
}
}
@@ -120,7 +120,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?
@@ -159,16 +159,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() );
@@ -193,7 +193,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 0e46771f5d..4219857b89 100644
--- a/sw/source/ui/uiview/viewdraw.cxx
+++ b/sw/source/ui/uiview/viewdraw.cxx
@@ -353,7 +353,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
};
GetViewFrame()->GetBindings().Invalidate(aInval);
- BOOL bEndTextEdit = TRUE;
+ sal_Bool bEndTextEdit = sal_True;
if (pFuncPtr)
{
if (GetDrawFuncPtr())
@@ -371,7 +371,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
{
if(SID_OBJECT_SELECT == nDrawSfxId )
{
- pWrtShell->GotoObj(TRUE);
+ pWrtShell->GotoObj(sal_True);
}
else
{
@@ -388,7 +388,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
BeginTextEdit(pObj);
- bEndTextEdit = FALSE;
+ bEndTextEdit = sal_False;
}
}
}
@@ -416,7 +416,7 @@ void SwView::ExitDraw()
{
// 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 64d597a477..630e2b9170 100644
--- a/sw/source/ui/uiview/viewfunc.hxx
+++ b/sw/source/ui/uiview/viewfunc.hxx
@@ -31,7 +31,6 @@
class ImageButton;
class Point;
-class PrintDialog;
class SfxItemSet;
class SfxPrinter;
class SfxTabPage;
@@ -43,17 +42,16 @@ class Window;
class SwWrtShell;
// folgende Funktionen stehen im viewprt.cxx
-PrintDialog* CreatePrintDialog( Window* , USHORT, SwWrtShell* );
-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,
@@ -62,8 +60,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 40e196b294..2b1d3060ec 100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -539,7 +539,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();
@@ -747,7 +747,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 )
{
@@ -912,7 +912,7 @@ IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox )
(*pFieldmark->GetParameters())[ sKey ] = makeAny(selection);
pFieldmark->Invalidate();
SwView& rView = ( ( SwEditWin* )GetParent() )->GetView();
- rView.GetDocShell()->SetModified( TRUE );
+ rView.GetDocShell()->SetModified( sal_True );
}
EndPopupMode();
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 28af9cae32..b321f32431 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -64,7 +64,7 @@
#include <IDocumentSettingAccess.hxx>
#include <PostItMgr.hxx>
-USHORT SwView::nMoveType = NID_PGE;
+sal_uInt16 SwView::nMoveType = NID_PGE;
sal_Int32 SwView::nActMark = 0;
@@ -73,16 +73,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();
{
@@ -90,7 +90,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() );
@@ -157,19 +157,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 );
}
@@ -198,9 +198,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 );
}
@@ -213,13 +213,13 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
}
pWrtShell->UnlockPaint();
if( bUnLockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
}
-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();
{
@@ -228,7 +228,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
@@ -263,7 +263,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 );
@@ -286,15 +286,15 @@ IMPL_LINK( SwView, WindowChildEventListener, VclSimpleEvent*, pEvent )
{
case VCLEVENT_WINDOW_HIDE:
if( pChildWin == pHScrollbar )
- ShowHScrollbar( FALSE );
+ ShowHScrollbar( sal_False );
else if( pChildWin == pVScrollbar )
- ShowVScrollbar( FALSE );
+ ShowVScrollbar( sal_False );
break;
case VCLEVENT_WINDOW_SHOW:
if( pChildWin == pHScrollbar )
- ShowHScrollbar( TRUE );
+ ShowHScrollbar( sal_True );
else if( pChildWin == pVScrollbar )
- ShowVScrollbar( TRUE );
+ ShowVScrollbar( sal_True );
break;
}
}
@@ -302,7 +302,7 @@ IMPL_LINK( SwView, WindowChildEventListener, VclSimpleEvent*, pEvent )
return 0;
}
-int SwView::_CreateScrollbar( BOOL bHori )
+int SwView::_CreateScrollbar( sal_Bool bHori )
{
Window *pMDI = &GetViewFrame()->GetWindow();
SwScrollbar** ppScrollbar = bHori ? &pHScrollbar : &pVScrollbar;
@@ -320,9 +320,9 @@ int SwView::_CreateScrollbar( BOOL bHori )
(*ppScrollbar)->SetScrollHdl( LINK( this, SwView, ScrollHdl ));
(*ppScrollbar)->SetEndScrollHdl( LINK( this, SwView, EndScrollHdl ));
- (*ppScrollbar)->EnableDrag( TRUE );
+ (*ppScrollbar)->EnableDrag( sal_True );
- (*ppScrollbar)->SetAuto( TRUE );
+ (*ppScrollbar)->SetAuto( sal_True );
if(GetWindow())
InvalidateBorder();
@@ -335,12 +335,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 );
@@ -395,12 +395,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)
@@ -496,7 +496,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);
@@ -514,7 +514,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();
@@ -586,7 +586,7 @@ int SwView::KillVLineal()
IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler )
{
- USHORT nDefPage = 0;
+ sal_uInt16 nDefPage = 0;
switch( pRuler->GetClickType() )
{
case RULER_TYPE_DONTKNOW:
@@ -608,16 +608,16 @@ IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler )
return 0;
}
-USHORT SwView::GetMoveType()
+sal_uInt16 SwView::GetMoveType()
{
return nMoveType;
}
-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);
@@ -654,7 +654,7 @@ void SwView::ShowHScrollbar(sal_Bool bShow)
sal_Bool SwView::IsHScrollbarVisible()const
{
OSL_ENSURE(pHScrollbar, "Scrollbar invalid");
- return pHScrollbar->IsVisible( FALSE ) || pHScrollbar->IsAuto();
+ return pHScrollbar->IsVisible( sal_False ) || pHScrollbar->IsAuto();
}
void SwView::ShowVScrollbar(sal_Bool bShow)
@@ -669,7 +669,7 @@ void SwView::ShowVScrollbar(sal_Bool bShow)
sal_Bool SwView::IsVScrollbarVisible()const
{
OSL_ENSURE(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 c80018abce..1d1c376593 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -60,11 +60,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) ||
@@ -83,13 +83,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;
@@ -116,7 +116,7 @@ void lcl_GetPos(SwView* pView,
--------------------------------------------------------------------*/
void SwView::InvalidateRulerPos()
{
- static USHORT const aInval[] =
+ static sal_uInt16 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,
@@ -174,14 +174,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;
@@ -190,7 +190,7 @@ aDocSz = rSz;
lTmp = aNewVisArea.Right() - lTmp;
aNewVisArea.Right() -= lTmp;
aNewVisArea.Left() -= lTmp;
- bModified = TRUE;
+ bModified = sal_True;
}
lTmp = aDocSz.Height() + lGreenOffset;
@@ -199,11 +199,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())
@@ -214,7 +214,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() );
@@ -261,7 +261,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
aVisArea = aLR;
- const BOOL bOuterResize = bUpdateScrollbar && UpdateScrollbars();
+ const sal_Bool bOuterResize = bUpdateScrollbar && UpdateScrollbars();
if ( pWrtShell )
{
@@ -269,7 +269,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 )
@@ -307,7 +307,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.
@@ -346,7 +346,7 @@ void SwView::CheckVisArea()
Rectangle aNewVisArea( aVisArea );
aNewVisArea.Move( DOCUMENTBORDER - aVisArea.Left(),
DOCUMENTBORDER - aVisArea.Top() );
- SetVisArea( aNewVisArea, TRUE );
+ SetVisArea( aNewVisArea, sal_True );
}
}
}
@@ -358,11 +358,11 @@ 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;
@@ -408,12 +408,12 @@ 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;
@@ -477,8 +477,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 )
{
@@ -539,10 +539,10 @@ void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY )
Beschreibung: Seitenweises Scrollen
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
@@ -550,14 +550,14 @@ 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
@@ -596,7 +596,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 )
{
@@ -616,7 +616,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 )
{
@@ -632,16 +632,16 @@ long SwView::PhyPageDown()
return 1;
}
-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;
}
}
@@ -653,12 +653,12 @@ 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 ) &&
@@ -667,9 +667,9 @@ long SwView::PageDownCrsr(BOOL bSelect)
PageDown() )
{
pWrtShell->ResetCursorStack();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*------------------------------------------------------------------------
@@ -681,7 +681,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)
@@ -694,11 +694,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 ))
{
//QuickHelp:
@@ -737,7 +737,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
EndScrollHdl(pScrollbar);
if ( pScrollbar->GetType() == SCROLL_DRAG )
- pWrtShell->EnableSmooth( TRUE );
+ pWrtShell->EnableSmooth( sal_True );
return 0;
}
@@ -755,12 +755,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);
}
@@ -815,9 +815,9 @@ void SwView::CalcVisArea( const Size &rOutPixel )
/*--------------------------------------------------------------------
Beschreibung: Bedienelemente neu anordnen
--------------------------------------------------------------------*/
-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();
@@ -833,7 +833,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;
@@ -852,7 +852,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,
@@ -861,23 +861,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)
@@ -946,10 +946,10 @@ void ViewResizePixel( const Window &rRef,
// 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
@@ -971,7 +971,7 @@ void ViewResizePixel( const Window &rRef,
pPageDownBtn->SetPosSizePixel( aPos, aImgSz );
- if( rHScrollbar.IsVisible( FALSE ) )
+ if( rHScrollbar.IsVisible( sal_False ) )
{
aScrollFillPos.X() = aPos.X();
@@ -983,7 +983,7 @@ void ViewResizePixel( const Window &rRef,
void SwView::ShowAtResize()
{
- bShowAtResize = FALSE;
+ bShowAtResize = sal_False;
if ( pWrtShell->GetViewOptions()->IsViewHRuler() )
pHRuler->Show();
}
@@ -1002,15 +1002,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 );
@@ -1028,7 +1028,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,
@@ -1040,9 +1040,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 );
@@ -1056,18 +1056,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;
}
void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
@@ -1075,13 +1075,13 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
// #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() )
{
@@ -1092,51 +1092,51 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
{
bShowH = pVOpt->IsViewHScrollBar();
bShowV = pVOpt->IsViewVScrollBar();
- bAuto = bHAuto = TRUE;
+ bAuto = bHAuto = sal_True;
break;
}
}
/* 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 && !bHAuto)
+ if(pHScrollbar->IsVisible(sal_False) != bShowH && !bHAuto)
ShowHScrollbar(bShowH);
pHScrollbar->SetAuto( bHAuto );
- if(pVScrollbar->IsVisible(FALSE) != bShowV && !bAuto)
+ if(pVScrollbar->IsVisible(sal_False) != bShowV && !bAuto)
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,
@@ -1173,12 +1173,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.
@@ -1186,14 +1186,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);
@@ -1206,9 +1206,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 )
{
@@ -1248,12 +1248,12 @@ Size SwView::GetOptimalSizePixel() const
return GetEditWin().LogicToPixel( aPgSize );
}
-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 )
{
@@ -1267,11 +1267,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);
@@ -1281,16 +1281,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;
@@ -1303,30 +1303,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 32e8dce2b5..58efdb46f5 100644
--- a/sw/source/ui/uiview/viewprt.cxx
+++ b/sw/source/ui/uiview/viewprt.cxx
@@ -45,7 +45,6 @@
#include <sfx2/app.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/oldprintadaptor.hxx>
-#include <svtools/printdlg.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/prnmon.hxx>
#include <editeng/paperinf.hxx>
@@ -66,7 +65,6 @@
#include <docsh.hxx>
#include <viewopt.hxx>
#include <prtopt.hxx>
-#include <swprtopt.hxx>
#include <fontcfg.hxx>
#include <cfgitems.hxx>
#include <dbmgr.hxx>
@@ -91,14 +89,14 @@ using namespace ::com::sun::star;
/*--------------------------------------------------------------------
Beschreibung: Drucker an Sfx uebergeben
--------------------------------------------------------------------*/
-SfxPrinter* SwView::GetPrinter( BOOL bCreate )
+SfxPrinter* 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;
@@ -107,7 +105,7 @@ SfxPrinter* 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)
@@ -117,7 +115,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 )
@@ -127,7 +125,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, BOOL bWeb )
}
}
-USHORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
+sal_uInt16 SwView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool )
{
SwWrtShell &rSh = GetWrtShell();
SfxPrinter* pOld = rSh.getIDocumentDeviceAccess()->getPrinter( false );
@@ -140,17 +138,17 @@ USHORT 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 ) );
@@ -169,35 +167,7 @@ USHORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
SfxTabPage* SwView::CreatePrintOptionsPage(Window* pParent,
const SfxItemSet& rSet)
{
- return ::CreatePrintOptionsPage( pParent, rSet, FALSE );
-}
-
-/*--------------------------------------------------------------------
- Beschreibung: Druckerdialog
- --------------------------------------------------------------------*/
-PrintDialog* CreatePrintDialog( Window* pParent, USHORT nPg, SwWrtShell* pSh )
-{
- PrintDialog *pDlg = new PrintDialog( pParent, false );
-
- if ( !nPg )
- nPg = 1;
- pDlg->EnableRange( PRINTDIALOG_FROMTO );
-
- if (pSh && (pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected()))
- pDlg->EnableRange( PRINTDIALOG_SELECTION );
-
- pDlg->SetRangeText( String::CreateFromInt32(nPg) );
- pDlg->EnableRange( PRINTDIALOG_RANGE );
- pDlg->EnableCollate();
- return pDlg;
-}
-
-PrintDialog* SwView::CreatePrintDialog( Window* pParent )
-{
- // AMA: Hier sollte vielleicht die virtuelle Seitennummer angezeigt werden,
- // aber nur, wenn das Drucken virtuelle Seitennummern und nicht wie
- // bisher (auch beim SWG 2.0) physikalische beachtet werden.
- return ::CreatePrintDialog( pParent, GetWrtShell().GetPhyPageNum(), &GetWrtShell() );
+ return ::CreatePrintOptionsPage( pParent, rSet, sal_False );
}
/*--------------------------------------------------------------------
@@ -205,7 +175,7 @@ PrintDialog* SwView::CreatePrintDialog( Window* pParent )
--------------------------------------------------------------------*/
void 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())
{
@@ -216,7 +186,7 @@ void 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 );
@@ -225,7 +195,7 @@ void 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();
@@ -240,12 +210,12 @@ void 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 &&
@@ -255,7 +225,7 @@ void 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();
@@ -297,7 +267,7 @@ void SwView::ExecutePrint(SfxRequest& rReq)
SwPagePreview
--------------------------------------------------------------------*/
SfxTabPage* CreatePrintOptionsPage( Window *pParent,
- const SfxItemSet &rOptions, BOOL bPreview )
+ const SfxItemSet &rOptions, sal_Bool bPreview )
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "No Print Dialog");
@@ -321,14 +291,10 @@ SfxTabPage* CreatePrintOptionsPage( Window *pParent,
return pPage;
}
-void SetAppPrintOptions( ViewShell* pSh, BOOL bWeb )
+void SetAppPrintOptions( ViewShell* pSh, sal_Bool bWeb )
{
- SwPrintData aPrtData = *SW_MOD()->GetPrtOptions(bWeb);
const IDocumentDeviceAccess* pIDDA = pSh->getIDocumentDeviceAccess();
- SwPrintData* pShellPrintData = pIDDA->getPrintData();
-
- if(pShellPrintData)
- aPrtData = *pShellPrintData;
+ SwPrintData aPrtData = pIDDA->getPrintData();
if( pIDDA->getPrinter( false ) )
{
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index 54b05ab4d3..5a21b7aafb 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -60,7 +60,6 @@
#include <view.hrc>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
#include <comcore.hrc>
#include "PostItMgr.hxx"
@@ -82,9 +81,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 );
};
@@ -98,24 +97,24 @@ inline Window* GetParentWindow( SvxSearchDialog* pSrchDlg )
return pWin;
}
-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;
}
}
@@ -132,7 +131,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;
@@ -209,7 +208,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));
@@ -217,7 +216,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 )
@@ -225,7 +224,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));
}
@@ -238,7 +237,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 )
{
@@ -246,7 +245,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() );
@@ -271,9 +270,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 );
@@ -290,18 +289,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 );
// #i8288# Now that everything has been replaced, restore the original cursor position.
@@ -317,7 +316,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;
}
@@ -346,7 +345,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,
@@ -364,13 +363,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
};
@@ -390,7 +389,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 )
{
@@ -425,7 +424,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() );
@@ -437,12 +436,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();
@@ -451,30 +450,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;
@@ -487,9 +486,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?
@@ -500,15 +499,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;
@@ -532,13 +531,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() );
@@ -547,15 +546,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;
@@ -567,7 +566,7 @@ BOOL SwView::SearchAll(USHORT* pFound)
void SwView::Replace()
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
@@ -584,7 +583,7 @@ void SwView::Replace()
pSrchItem->GetReplaceString(),
SwWrtShell::GETSTYLE_CREATESOME ));
- pWrtShell->EndUndo(UNDO_UI_REPLACE_STYLE);
+ pWrtShell->EndUndo();
}
else
{
@@ -610,7 +609,7 @@ void SwView::Replace()
-SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, BOOL bBackward )
+SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, sal_Bool bBackward )
{
eStart = DOCPOS_CURR;
if( bBackward )
@@ -625,9 +624,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() ?
@@ -638,7 +637,7 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
pWrtShell->SttSelect();
- static USHORT const aSearchAttrRange[] = {
+ static sal_uInt16 aSearchAttrRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -672,11 +671,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(
@@ -713,7 +712,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 ();
@@ -725,7 +724,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)
{
@@ -733,7 +732,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 );
@@ -756,13 +755,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;
diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx
index 20812fb809..3e7406867d 100644
--- a/sw/source/ui/uiview/viewstat.cxx
+++ b/sw/source/ui/uiview/viewstat.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <com/sun/star/linguistic2/XThesaurus.hpp>
#include <com/sun/star/uno/Sequence.hxx>
@@ -152,7 +153,7 @@ void SwView::GetState(SfxItemSet &rSet)
break;
case SID_CLEARHISTORY:
{
- rSet.Put(SfxBoolItem(nWhich, pWrtShell->GetUndoIds() != UNDO_EMPTY));
+ rSet.Put(SfxBoolItem(nWhich, pWrtShell->GetLastUndoInfo(0, 0)));
}
break;
case SID_UNDO:
@@ -179,7 +180,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);
}
@@ -197,7 +198,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);
}
@@ -217,7 +218,7 @@ void SwView::GetState(SfxItemSet &rSet)
break;
case SID_TWAIN_SELECT:
case SID_TWAIN_TRANSFER:
-#if defined WIN || defined WNT || defined UNX
+#if defined WNT || defined UNX
{
if(!SW_MOD()->GetScannerManager().is())
rSet.DisableItem(nWhich);
@@ -350,7 +351,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;
@@ -378,7 +379,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 02fede0369..4504e55c6d 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -79,19 +79,19 @@ using namespace ::com::sun::star;
Beschreibung: Columns eintueten
--------------------------------------------------------------------*/
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();
@@ -101,17 +101,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);
}
}
@@ -120,7 +120,7 @@ void lcl_FillSvxColumn(const SwFmtCol& rCol,
Beschreibung: ColumnItem in ColumnInfo ueberfuehren
--------------------------------------------------------------------*/
void lcl_ConvertToCols(const SvxColumnItem& rColItem,
- USHORT nTotalWidth,
+ sal_uInt16 nTotalWidth,
SwFmtCol& rCols)
{
OSL_ENSURE( rCols.GetNumCols() == rColItem.Count(), "Column count mismatch" );
@@ -129,27 +129,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 )
{
OSL_ENSURE(rColItem[i+1].nStart >= rColItem[i].nEnd,"overlapping columns" );
- 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 );
@@ -161,9 +161,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 );
}
/*--------------------------------------------------------------------
@@ -172,7 +172,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() ||
@@ -190,7 +190,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 )
@@ -224,30 +224,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 );
}
/*--------------------------------------------------------------------
@@ -257,18 +257,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();
@@ -281,9 +281,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 )
{
@@ -297,8 +297,14 @@ 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 bVerticalFrame(sal_False);
+ {
+ sal_Bool bRTL;
+ sal_Bool bVertL2R;
+ bVerticalFrame = ( bFrmSelection &&
+ rSh.IsFrmVertical(sal_True, bRTL, bVertL2R) ) ||
+ ( !bFrmSelection && bVerticalWriting);
+ }
long nDeltaX = bVerticalFrame ?
rRect.Right() - rPageRect.Right() + aLongLR.GetRight() :
rPageRect.Left() + aLongLR.GetLeft() - rRect.Left();
@@ -330,7 +336,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 -
@@ -365,9 +371,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 );
@@ -411,8 +417,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 );
@@ -435,8 +441,11 @@ 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;
+ sal_Bool bVertL2R;
+ if ( ( bFrmSelection &&
+ rSh.IsFrmVertical(sal_True, bRTL, bVertL2R ) ) ||
+ ( !bFrmSelection && bVerticalWriting ) )
{
SwFmtHoriOrient aHoriOrient(pFmt->GetHoriOrient());
aHoriOrient.SetHoriOrient(text::HoriOrientation::NONE);
@@ -456,7 +465,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 );
@@ -505,15 +514,15 @@ 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 ))
+ if( (bHead && pHeaderFmt) || (!bHead && pFooterFmt) )
{
SwFmtFrmSize aSz( bHead ? pHeaderFmt->GetFrmSize() :
pFooterFmt->GetFrmSize() );
@@ -529,8 +538,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);
}
@@ -541,7 +550,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);
@@ -560,7 +569,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();
@@ -622,7 +631,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 )
@@ -641,7 +650,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())
@@ -662,11 +671,11 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SvxColumnItem aColItem((const SvxColumnItem&)rReq.
GetArgs()->Get(nSlot));
- if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()))
+ if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) )
{
OSL_ENSURE(aColItem.Count(), "ColDesc is empty!!");
- const BOOL bSingleLine = ((const SfxBoolItem&)rReq.
+ const sal_Bool bSingleLine = ((const SfxBoolItem&)rReq.
GetArgs()->Get(SID_RULER_ACT_LINE_ONLY)).GetValue();
SwTabCols aTabCols;
@@ -687,14 +696,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 < aTabCols.Count(); ++i )
+ sal_uInt16 nColCount = aColItem.Count() - 1;
+ for ( sal_uInt16 i = 0; i < nColCount && i < aTabCols.Count(); ++i )
{
const SvxColumnDescription& rCol = aColItem[nColCount - i];
aTabCols[i] = aTabCols.GetRight() - rCol.nStart;
@@ -703,7 +712,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
else
{
- for ( USHORT i = 0; i < aColItem.Count()-1 && i < aTabCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aColItem.Count()-1 && i < aTabCols.Count(); ++i )
{
const SvxColumnDescription& rCol = aColItem[i];
aTabCols[i] = rCol.nEnd + aTabCols.GetLeft();
@@ -715,8 +724,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 );
@@ -744,10 +753,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 );
@@ -771,7 +780,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 );
@@ -810,7 +819,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 ;
@@ -820,23 +829,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 );
}
@@ -852,9 +861,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);
}
@@ -868,13 +877,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 );
@@ -886,7 +895,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;
@@ -909,7 +918,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 )
@@ -989,15 +998,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)
{
@@ -1014,8 +1023,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);
}
@@ -1078,7 +1087,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
short nOffset = static_cast< short >(aLR.GetTxtLeft() +
// #i42922# Mouse move of numbering label
// has to consider the left indent of the paragraph
- pNumRuleNodeFromDoc->GetLeftMarginWithNum( TRUE ) );
+ pNumRuleNodeFromDoc->GetLeftMarginWithNum( sal_True ) );
// <--
short nFLOffset;
@@ -1121,8 +1130,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(),
@@ -1130,12 +1139,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 &&
@@ -1145,13 +1154,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(),
@@ -1159,19 +1168,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)
@@ -1191,8 +1200,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
@@ -1201,11 +1210,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());
}
}
}
@@ -1219,7 +1228,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
rSet.DisableItem(nWhich);
else
{
- BOOL bFlag = rSh.IsInRightToLeftText();
+ sal_Bool bFlag = rSh.IsInRightToLeftText();
rSet.Put(SfxBoolItem(nWhich, bFlag));
}
}
@@ -1227,13 +1236,18 @@ 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 bFrameHasVerticalColumns(sal_False);
+ {
+ sal_Bool bFrameRTL;
+ sal_Bool bFrameVertL2R;
+ bFrameHasVerticalColumns = rSh.IsFrmVertical(sal_False, bFrameRTL, bFrameVertL2R) &&
+ 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) ||
@@ -1246,7 +1260,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else if ( bHasTable )
{
SwTabCols aTabCols;
- USHORT nNum;
+ sal_uInt16 nNum;
if ( 0 != ( bSetTabColFromDoc = IsTabColFromDoc() ) )
{
rSh.GetMouseTabCols( aTabCols, aTabColFromDocPos );
@@ -1262,47 +1276,47 @@ void SwView::StateTabWin(SfxItemSet& rSet)
OSL_ENSURE(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) );
@@ -1311,7 +1325,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);
@@ -1319,7 +1333,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();
@@ -1334,7 +1348,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);
OSL_ENSURE( pSect, "Which section?");
if( pSect )
{
@@ -1348,14 +1362,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
{
@@ -1363,8 +1377,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());
@@ -1386,24 +1400,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());
@@ -1427,13 +1441,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
{
@@ -1452,8 +1466,13 @@ 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 bFrameHasVerticalColumns(sal_False);
+ {
+ sal_Bool bFrameRTL;
+ sal_Bool bFrameVertL2R;
+ bFrameHasVerticalColumns = rSh.IsFrmVertical(sal_False, bFrameRTL, bFrameVertL2R) &&
+ bFrmSelection;
+ }
if(((SID_RULER_ROWS == nWhich) &&
((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns))) ||
@@ -1466,7 +1485,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 );
@@ -1477,24 +1496,24 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
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) );
@@ -1502,18 +1521,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())
@@ -1521,7 +1540,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxColumnDescription aColDesc( nStart, nEnd,
aTabCols.GetRight(), aTabCols.GetRight(),
- FALSE );
+ sal_False );
aColItem.Append(aColDesc);
rSet.Put(aColItem, nWhich);
@@ -1547,15 +1566,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)
@@ -1576,8 +1595,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 ));
@@ -1586,14 +1605,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;
@@ -1635,13 +1654,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() )
@@ -1667,16 +1686,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;
@@ -1697,7 +1716,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
@@ -1709,7 +1728,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,
@@ -1721,7 +1740,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;
@@ -1767,7 +1786,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);
@@ -1780,8 +1799,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);
}
@@ -1793,7 +1812,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
if(bPutContentProtection)
{
SvxProtectItem aProtect(SID_RULER_PROTECT);
- aProtect.SetCntntProtect(TRUE);
+ aProtect.SetCntntProtect(sal_True);
rSet.Put(aProtect);
}
}