summaryrefslogtreecommitdiff
path: root/sfx2/source/view
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/view')
-rw-r--r--sfx2/source/view/frame.cxx34
-rw-r--r--sfx2/source/view/frame2.cxx26
-rw-r--r--sfx2/source/view/frmload.cxx12
-rw-r--r--sfx2/source/view/impviewframe.hxx4
-rw-r--r--sfx2/source/view/ipclient.cxx28
-rw-r--r--sfx2/source/view/orgmgr.cxx216
-rw-r--r--sfx2/source/view/printer.cxx16
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx36
-rw-r--r--sfx2/source/view/userinputinterception.cxx2
-rw-r--r--sfx2/source/view/viewfac.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx178
-rw-r--r--sfx2/source/view/viewfrm2.cxx22
-rw-r--r--sfx2/source/view/viewimp.hxx6
-rw-r--r--sfx2/source/view/viewprn.cxx72
-rw-r--r--sfx2/source/view/viewsh.cxx196
15 files changed, 418 insertions, 432 deletions
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 49deab951843..1b9260474938 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -145,14 +145,14 @@ SfxFrame::~SfxFrame()
sal_Bool SfxFrame::DoClose()
{
// Eigentlich wird noch ein PrepareClose gebraucht !!!
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !pImp->bClosing )
{
pImp->bClosing = sal_True;
CancelTransfers();
// now close frame; it will be deleted if this call is successful, so don't use any members after that!
- bRet = TRUE;
+ bRet = sal_True;
try
{
Reference< XCloseable > xCloseable ( pImp->xFrame, UNO_QUERY );
@@ -170,7 +170,7 @@ sal_Bool SfxFrame::DoClose()
catch( ::com::sun::star::util::CloseVetoException& )
{
pImp->bClosing = sal_False;
- bRet = FALSE;
+ bRet = sal_False;
}
catch( ::com::sun::star::lang::DisposedException& )
{
@@ -247,7 +247,7 @@ sal_uInt16 SfxFrame::PrepareClose_Impl( sal_Bool bUI, sal_Bool bForBrowsing )
if ( nRet == RET_OK )
{
// if this frame has child frames, ask them too
- for( USHORT nPos = GetChildFrameCount(); nRet == RET_OK && nPos--; )
+ for( sal_uInt16 nPos = GetChildFrameCount(); nRet == RET_OK && nPos--; )
nRet = pChildArr->GetObject( nPos )->PrepareClose_Impl( bUI, bForBrowsing );
}
@@ -296,7 +296,7 @@ sal_Bool SfxFrame::IsClosing_Impl() const
void SfxFrame::SetIsClosing_Impl()
{
- pImp->bClosing = TRUE;
+ pImp->bClosing = sal_True;
}
sal_uInt16 SfxFrame::GetChildFrameCount() const
@@ -592,18 +592,18 @@ SfxPoolItem* SfxFrameItem::Clone( SfxItemPool *) const
return pNew;
}
-sal_Bool SfxFrameItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const
+sal_Bool SfxFrameItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 ) const
{
if ( wFrame )
{
rVal <<= wFrame->GetFrameInterface();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-sal_Bool SfxFrameItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
+sal_Bool SfxFrameItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 )
{
Reference < XFrame > xFrame;
if ( (rVal >>= xFrame) && xFrame.is() )
@@ -614,15 +614,15 @@ sal_Bool SfxFrameItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
if ( pFr->GetFrameInterface() == xFrame )
{
wFrame = pFrame = pFr;
- return TRUE;
+ return sal_True;
}
pFr = SfxFrame::GetNext( *pFr );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -643,13 +643,13 @@ SfxPoolItem* SfxUsrAnyItem::Clone( SfxItemPool *) const
return new SfxUsrAnyItem( Which(), aValue );
}
-sal_Bool SfxUsrAnyItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
+sal_Bool SfxUsrAnyItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
rVal = aValue;
return sal_True;
}
-sal_Bool SfxUsrAnyItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ )
+sal_Bool SfxUsrAnyItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
aValue = rVal;
return sal_True;
@@ -677,13 +677,13 @@ SfxPoolItem* SfxUnoFrameItem::Clone( SfxItemPool* ) const
return new SfxUnoFrameItem( Which(), m_xFrame );
}
-sal_Bool SfxUnoFrameItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const
+sal_Bool SfxUnoFrameItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
rVal <<= m_xFrame;
return sal_True;
}
-sal_Bool SfxUnoFrameItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ )
+sal_Bool SfxUnoFrameItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
return ( rVal >>= m_xFrame );
}
@@ -978,7 +978,7 @@ SfxFrame* SfxFrame::GetFirst()
SfxFrame* SfxFrame::GetNext( SfxFrame& rFrame )
{
- USHORT nPos = pFramesArr_Impl->GetPos( &rFrame );
+ sal_uInt16 nPos = pFramesArr_Impl->GetPos( &rFrame );
if ( nPos+1 < pFramesArr_Impl->Count() )
return pFramesArr_Impl->GetObject(nPos+1);
else
diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx
index ef963b36d7bb..ea6ab3abfb74 100644
--- a/sfx2/source/view/frame2.cxx
+++ b/sfx2/source/view/frame2.cxx
@@ -122,7 +122,7 @@ long SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt )
if ( pView->GetViewShell() && !pView->GetViewShell()->GetUIActiveIPClient_Impl() && !pFrame->IsInPlace() )
{
DBG_TRACE("SfxFrame: GotFocus");
- pView->MakeActive_Impl( FALSE );
+ pView->MakeActive_Impl( sal_False );
}
// TODO/LATER: do we still need this code?
@@ -145,7 +145,7 @@ long SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt )
else if( rNEvt.GetType() == EVENT_KEYINPUT )
{
if ( pView->GetViewShell()->KeyInput( *rNEvt.GetKeyEvent() ) )
- return TRUE;
+ return sal_True;
}
else if ( rNEvt.GetType() == EVENT_EXECUTEDIALOG /*|| rNEvt.GetType() == EVENT_INPUTDISABLE*/ )
{
@@ -164,7 +164,7 @@ long SfxFrameWindow_Impl::Notify( NotifyEvent& rNEvt )
long SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt )
{
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
if ( nType == EVENT_KEYINPUT || nType == EVENT_KEYUP )
{
SfxViewFrame* pView = pFrame->GetCurrentViewFrame();
@@ -199,7 +199,7 @@ long SfxFrameWindow_Impl::PreNotify( NotifyEvent& rNEvt )
void SfxFrameWindow_Impl::GetFocus()
{
if ( pFrame && !pFrame->IsClosing_Impl() && pFrame->GetCurrentViewFrame() && pFrame->GetFrameInterface().is() )
- pFrame->GetCurrentViewFrame()->MakeActive_Impl( TRUE );
+ pFrame->GetCurrentViewFrame()->MakeActive_Impl( sal_True );
}
void SfxFrameWindow_Impl::Resize()
@@ -212,7 +212,7 @@ void SfxFrameWindow_Impl::StateChanged( StateChangedType nStateChange )
{
if ( nStateChange == STATE_CHANGE_INITSHOW )
{
- pFrame->pImp->bHidden = FALSE;
+ pFrame->pImp->bHidden = sal_False;
if ( pFrame->IsInPlace() )
// TODO/MBA: workaround for bug in LayoutManager: the final resize does not get through because the
// LayoutManager works asynchronously and between resize and time execution the DockingAcceptor was exchanged so that
@@ -250,7 +250,7 @@ Reference < XFrame > SfxFrame::CreateBlankFrame()
return xFrame;
}
-SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, Window& rWindow, USHORT nViewId, bool bHidden )
+SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, Window& rWindow, sal_uInt16 nViewId, bool bHidden )
{
SfxFrame* pFrame = NULL;
try
@@ -341,7 +341,7 @@ SfxFrame::SfxFrame( Window& i_rContainerWindow, bool i_bHidden )
pWindow->Show();
}
-void SfxFrame::SetPresentationMode( BOOL bSet )
+void SfxFrame::SetPresentationMode( sal_Bool bSet )
{
if ( GetCurrentViewFrame() )
GetCurrentViewFrame()->GetWindow().SetBorderStyle( bSet ? WINDOW_BORDER_NOBORDER : WINDOW_BORDER_NORMAL );
@@ -362,7 +362,7 @@ void SfxFrame::SetPresentationMode( BOOL bSet )
if ( GetWorkWindow_Impl() )
GetWorkWindow_Impl()->SetDockingAllowed( !bSet );
if ( GetCurrentViewFrame() )
- GetCurrentViewFrame()->GetDispatcher()->Update_Impl( TRUE );
+ GetCurrentViewFrame()->GetDispatcher()->Update_Impl( sal_True );
}
SystemWindow* SfxFrame::GetSystemWindow() const
@@ -389,14 +389,14 @@ sal_Bool SfxFrame::Close()
return sal_True;
}
-void SfxFrame::LockResize_Impl( BOOL bLock )
+void SfxFrame::LockResize_Impl( sal_Bool bLock )
{
pImp->bLockResize = bLock;
}
IMPL_LINK( SfxFrameWindow_Impl, CloserHdl, void*, EMPTYARG )
{
- if ( pFrame && !pFrame->PrepareClose_Impl( TRUE ) )
+ if ( pFrame && !pFrame->PrepareClose_Impl( sal_True ) )
return 0L;
if ( pFrame )
@@ -404,7 +404,7 @@ IMPL_LINK( SfxFrameWindow_Impl, CloserHdl, void*, EMPTYARG )
return 0L;
}
-void SfxFrame::SetMenuBarOn_Impl( BOOL bOn )
+void SfxFrame::SetMenuBarOn_Impl( sal_Bool bOn )
{
pImp->bMenuBarOn = bOn;
@@ -428,7 +428,7 @@ void SfxFrame::SetMenuBarOn_Impl( BOOL bOn )
}
}
-BOOL SfxFrame::IsMenuBarOn_Impl() const
+sal_Bool SfxFrame::IsMenuBarOn_Impl() const
{
return pImp->bMenuBarOn;
}
@@ -472,7 +472,7 @@ void SfxFrame::PrepareForDoc_Impl( SfxObjectShell& i_rDoc )
// plugin mode
sal_Int16 nPluginMode = aDocumentArgs.getOrDefault( "PluginMode", sal_Int16( 0 ) );
if ( nPluginMode && ( nPluginMode != 2 ) )
- SetInPlace_Impl( TRUE );
+ SetInPlace_Impl( sal_True );
}
bool SfxFrame::IsMarkedHidden_Impl() const
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index 4dbb8a3c640e..958f37f12916 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -252,13 +252,13 @@ namespace
}
// --------------------------------------------------------------------------------------------------------------------
-sal_Bool SfxFrameLoader_Impl::impl_createNewDocWithSlotParam( const USHORT _nSlotID, const Reference< XFrame >& i_rxFrame,
+sal_Bool SfxFrameLoader_Impl::impl_createNewDocWithSlotParam( const sal_uInt16 _nSlotID, const Reference< XFrame >& i_rxFrame,
const bool i_bHidden )
{
SfxRequest aRequest( _nSlotID, SFX_CALLMODE_SYNCHRON, SFX_APP()->GetPool() );
aRequest.AppendItem( SfxUnoFrameItem( SID_FILLFRAME, i_rxFrame ) );
if ( i_bHidden )
- aRequest.AppendItem( SfxBoolItem( SID_HIDDEN, TRUE ) );
+ aRequest.AppendItem( SfxBoolItem( SID_HIDDEN, sal_True ) );
return lcl_getDispatchResult( SFX_APP()->ExecuteSlot( aRequest ) );
}
@@ -314,7 +314,7 @@ void SfxFrameLoader_Impl::impl_determineFilter( ::comphelper::NamedValueCollecti
// --------------------------------------------------------------------------------------------------------------------
SfxObjectShellRef SfxFrameLoader_Impl::impl_findObjectShell( const Reference< XModel2 >& i_rxDocument ) const
{
- for ( SfxObjectShell* pDoc = SfxObjectShell::GetFirst( NULL, FALSE ); pDoc; pDoc = SfxObjectShell::GetNext( *pDoc, NULL, FALSE ) )
+ for ( SfxObjectShell* pDoc = SfxObjectShell::GetFirst( NULL, sal_False ); pDoc; pDoc = SfxObjectShell::GetNext( *pDoc, NULL, sal_False ) )
{
if ( i_rxDocument == pDoc->GetModel() )
{
@@ -372,7 +372,7 @@ bool SfxFrameLoader_Impl::impl_determineTemplateDocument( ::comphelper::NamedVal
}
// --------------------------------------------------------------------------------------------------------------------
-USHORT SfxFrameLoader_Impl::impl_findSlotParam( const ::rtl::OUString& i_rFactoryURL ) const
+sal_uInt16 SfxFrameLoader_Impl::impl_findSlotParam( const ::rtl::OUString& i_rFactoryURL ) const
{
::rtl::OUString sSlotParam;
const sal_Int32 nParamPos = i_rFactoryURL.indexOf( '?' );
@@ -385,7 +385,7 @@ USHORT SfxFrameLoader_Impl::impl_findSlotParam( const ::rtl::OUString& i_rFactor
}
if ( sSlotParam.getLength() )
- return USHORT( sSlotParam.toInt32() );
+ return sal_uInt16( sSlotParam.toInt32() );
return 0;
}
@@ -552,7 +552,7 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA
{
const ::rtl::OUString sFactory = sURL.copy( sizeof( "private:factory/" ) -1 );
// special handling for some weird factory URLs a la private:factory/swriter?slot=21053
- const USHORT nSlotParam = impl_findSlotParam( sFactory );
+ const sal_uInt16 nSlotParam = impl_findSlotParam( sFactory );
if ( nSlotParam != 0 )
{
return impl_createNewDocWithSlotParam( nSlotParam, _rTargetFrame, aDescriptor.getOrDefault( "Hidden", false ) );
diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx
index abe4cb6852d9..8fea153aed52 100644
--- a/sfx2/source/view/impviewframe.hxx
+++ b/sfx2/source/view/impviewframe.hxx
@@ -78,13 +78,13 @@ struct SfxViewFrame_Impl
class SfxFrameViewWindow_Impl : public Window
{
- BOOL bActive;
+ sal_Bool bActive;
SfxViewFrame* pFrame;
public:
SfxFrameViewWindow_Impl( SfxViewFrame* p, Window& rParent, WinBits nBits=0 ) :
Window( &rParent, nBits | WB_BORDER | WB_CLIPCHILDREN ),
- bActive( FALSE ),
+ bActive( sal_False ),
pFrame( p )
{
p->GetFrame().GetWindow().SetBorderStyle( WINDOW_BORDER_NOBORDER );
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 997cb584f83d..30f2d568a3a8 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -399,7 +399,7 @@ void SAL_CALL SfxInPlaceClient_Impl::activatingUI()
throw uno::RuntimeException();
m_pClient->GetViewShell()->ResetAllClients_Impl(m_pClient);
- m_bUIActive = TRUE;
+ m_bUIActive = sal_True;
m_pClient->GetViewShell()->UIActivating( m_pClient );
}
@@ -423,7 +423,7 @@ void SAL_CALL SfxInPlaceClient_Impl::deactivatedUI()
throw uno::RuntimeException();
m_pClient->GetViewShell()->UIDeactivated( m_pClient );
- m_bUIActive = FALSE;
+ m_bUIActive = sal_False;
}
//--------------------------------------------------------------------
@@ -771,7 +771,7 @@ void SfxInPlaceClient::SetObject( const uno::Reference < embed::XEmbeddedObject
}
//--------------------------------------------------------------------
-BOOL SfxInPlaceClient::SetObjArea( const Rectangle& rArea )
+sal_Bool SfxInPlaceClient::SetObjArea( const Rectangle& rArea )
{
if( rArea != m_pImp->m_aObjArea )
{
@@ -779,10 +779,10 @@ BOOL SfxInPlaceClient::SetObjArea( const Rectangle& rArea )
m_pImp->SizeHasChanged();
Invalidate();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
@@ -992,7 +992,7 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb )
{
if ( m_pViewSh )
- m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(TRUE);
+ m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(sal_True);
try
{
m_pImp->m_xObject->setClientSite( m_pImp->m_xClient );
@@ -1042,7 +1042,7 @@ ErrCode SfxInPlaceClient::DoVerb( long nVerb )
if ( m_pViewSh )
{
SfxViewFrame* pFrame = m_pViewSh->GetViewFrame();
- pFrame->GetTopFrame().LockResize_Impl(FALSE);
+ pFrame->GetTopFrame().LockResize_Impl(sal_False);
pFrame->GetTopFrame().Resize();
}
}
@@ -1094,8 +1094,8 @@ void SfxInPlaceClient::DeactivateObject()
{
try
{
- m_pImp->m_bUIActive = FALSE;
- BOOL bHasFocus = FALSE;
+ m_pImp->m_bUIActive = sal_False;
+ sal_Bool bHasFocus = sal_False;
uno::Reference< frame::XModel > xModel( m_pImp->m_xObject->getComponent(), uno::UNO_QUERY );
if ( xModel.is() )
{
@@ -1103,12 +1103,12 @@ void SfxInPlaceClient::DeactivateObject()
if ( xController.is() )
{
Window* pWindow = VCLUnoHelper::GetWindow( xController->getFrame()->getContainerWindow() );
- bHasFocus = pWindow->HasChildPathFocus( TRUE );
+ bHasFocus = pWindow->HasChildPathFocus( sal_True );
}
}
if ( m_pViewSh )
- m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(TRUE);
+ m_pViewSh->GetViewFrame()->GetTopFrame().LockResize_Impl(sal_True);
if ( m_pImp->m_xObject->getStatus( m_pImp->m_nAspect ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE )
{
@@ -1130,7 +1130,7 @@ void SfxInPlaceClient::DeactivateObject()
{
SfxViewFrame* pFrame = m_pViewSh->GetViewFrame();
SfxViewFrame::SetViewFrame( pFrame );
- pFrame->GetTopFrame().LockResize_Impl(FALSE);
+ pFrame->GetTopFrame().LockResize_Impl(sal_False);
pFrame->GetTopFrame().Resize();
}
}
@@ -1145,7 +1145,7 @@ void SfxInPlaceClient::ResetObject()
{
try
{
- m_pImp->m_bUIActive = FALSE;
+ m_pImp->m_bUIActive = sal_False;
if ( m_pImp->m_xObject->getStatus( m_pImp->m_nAspect ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE )
m_pImp->m_xObject->changeState( embed::EmbedStates::INPLACE_ACTIVE );
else
@@ -1163,7 +1163,7 @@ void SfxInPlaceClient::ResetObject()
}
}
-BOOL SfxInPlaceClient::IsUIActive()
+sal_Bool SfxInPlaceClient::IsUIActive()
{
return m_pImp->m_bUIActive;
}
diff --git a/sfx2/source/view/orgmgr.cxx b/sfx2/source/view/orgmgr.cxx
index 6c92cd448adf..21bc74affd70 100644
--- a/sfx2/source/view/orgmgr.cxx
+++ b/sfx2/source/view/orgmgr.cxx
@@ -78,12 +78,12 @@ struct _FileListEntry
//REMOVE SvStorageRef aStor; // Referenz auf Storage, wenn wir diesen geoeffnet haben
//uno::Reference< embed::XStorage > xStorage;
- BOOL bFile; // als Datei auf Platte
+ sal_Bool bFile; // als Datei auf Platte
// (!= unbenannt1, nicht als Dok. geladen;
// diese werden nicht gespeichert!)
- BOOL bOwner; // selbst erzeugt
- BOOL bNoName;
- BOOL bOwnFormat;
+ sal_Bool bOwner; // selbst erzeugt
+ sal_Bool bNoName;
+ sal_Bool bOwnFormat;
_FileListEntry( const String& rFileName,
const CollatorWrapper* pColl, const String* pTitle = NULL );
@@ -91,7 +91,7 @@ struct _FileListEntry
int operator==( const _FileListEntry &rCmp) const;
int operator< ( const _FileListEntry &rCmp) const;
- BOOL DeleteObjectShell();
+ sal_Bool DeleteObjectShell();
};
//-------------------------------------------------------------------------
@@ -117,10 +117,10 @@ _FileListEntry::_FileListEntry( const String& rFileName,
aFileName ( rFileName ),
pCollator ( pColl ),
- bFile ( FALSE ),
- bOwner ( FALSE ),
- bNoName ( TRUE ),
- bOwnFormat ( TRUE )
+ bFile ( sal_False ),
+ bOwner ( sal_False ),
+ bNoName ( sal_True ),
+ bOwnFormat ( sal_True )
{
if ( pTitle )
aBaseName = *pTitle;
@@ -145,20 +145,20 @@ SV_IMPL_OP_PTRARR_SORT(_SfxObjectList, _FileListEntry*)
//=========================================================================
-BOOL _FileListEntry::DeleteObjectShell()
+sal_Bool _FileListEntry::DeleteObjectShell()
/* [Beschreibung]
Freigabe der DokumentShell
- [Returnwert] TRUE: alles Ok
- FALSE: es ist ein Fehler aufgetreten (das
+ [Returnwert] sal_True: alles Ok
+ sal_False: es ist ein Fehler aufgetreten (das
Dokument konnte nicht gesichert werden)
*/
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
//Falls wir die Shell angelegt haben und sie veraendert wurde
if(bOwner && aDocShell.Is() && aDocShell->IsModified())
{
@@ -166,7 +166,7 @@ BOOL _FileListEntry::DeleteObjectShell()
if( bOwnFormat )
{
if(!aDocShell->Save() )
- bRet = FALSE;
+ bRet = sal_False;
else
{
try {
@@ -218,14 +218,14 @@ SfxObjectList::~SfxObjectList()
//-------------------------------------------------------------------------
-const String &SfxObjectList::GetBaseName(USHORT i) const
+const String &SfxObjectList::GetBaseName(sal_uInt16 i) const
{
return (*this)[i]->aBaseName;
}
//-------------------------------------------------------------------------
-const String& SfxObjectList::GetFileName( USHORT i ) const
+const String& SfxObjectList::GetFileName( sal_uInt16 i ) const
{
return (*this)[i]->aFileName;
}
@@ -281,7 +281,7 @@ SfxOrganizeMgr::~SfxOrganizeMgr()
//-------------------------------------------------------------------------
-SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
+SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( sal_uInt16 nIdx )
/* [Beschreibung]
@@ -298,17 +298,17 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
{
//(mba)/task SfxWaitCursor aWaitCursor;
INetURLObject aFileObj( pEntry->aFileName );
- BOOL bDum = FALSE;
+ sal_Bool bDum = sal_False;
SfxApplication* pSfxApp = SFX_APP();
String aFilePath = aFileObj.GetMainURL( INetURLObject::NO_DECODE );
- pEntry->aDocShell = pSfxApp->DocAlreadyLoaded( aFilePath, FALSE, bDum );
+ pEntry->aDocShell = pSfxApp->DocAlreadyLoaded( aFilePath, sal_False, bDum );
if ( !pEntry->aDocShell.Is() )
{
- pEntry->bOwner = TRUE;
+ pEntry->bOwner = sal_True;
SfxMedium* pMed = new SfxMedium(
- aFilePath, ( STREAM_READ | STREAM_SHARE_DENYWRITE ), FALSE, 0 );
+ aFilePath, ( STREAM_READ | STREAM_SHARE_DENYWRITE ), sal_False, 0 );
const SfxFilter* pFilter = NULL;
- pMed->UseInteractionHandler(TRUE);
+ pMed->UseInteractionHandler(sal_True);
if (
pSfxApp->GetFilterMatcher().GuessFilter(*pMed, &pFilter, SFX_FILTER_TEMPLATE, 0) ||
(pFilter && !pFilter->IsOwnFormat()) ||
@@ -316,7 +316,7 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
)
{
pSfxApp->LoadTemplate( pEntry->aDocShell, aFilePath );
- pEntry->bOwnFormat = FALSE;
+ pEntry->bOwnFormat = sal_False;
delete pMed;
if ( pEntry->aDocShell.Is() )
return (SfxObjectShellRef)(SfxObjectShell*)(pEntry->aDocShell);
@@ -325,7 +325,7 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
{
if ( pFilter )
{
- pEntry->bOwnFormat = TRUE;
+ pEntry->bOwnFormat = sal_True;
pEntry->aDocShell = SfxObjectShell::CreateObject( pFilter->GetServiceName(), SFX_CREATE_MODE_ORGANIZER );
if ( pEntry->aDocShell.Is() )
{
@@ -343,14 +343,14 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nIdx)
+sal_Bool SfxOrganizeMgr::DeleteObjectShell(sal_uInt16 nIdx)
/* [Beschreibung]
Freigabe der DokumentShell an der Position nIdx
- [Returnwert] TRUE: alles Ok
- FALSE: es ist ein Fehler aufgetreten (das
+ [Returnwert] sal_True: alles Ok
+ sal_False: es ist ein Fehler aufgetreten (das
Dokument konnte nicht gesichert werden)
*/
@@ -360,8 +360,8 @@ BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nIdx)
//-------------------------------------------------------------------------
-SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(USHORT nRegion,
- USHORT nIdx)
+SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(sal_uInt16 nRegion,
+ sal_uInt16 nIdx)
/* [Beschreibung]
Zugriff auf die DokumentShell an der Position nIdx im Bereich
@@ -377,15 +377,15 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(USHORT nRegion,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nRegion, USHORT nIdx)
+sal_Bool SfxOrganizeMgr::DeleteObjectShell(sal_uInt16 nRegion, sal_uInt16 nIdx)
/* [Beschreibung]
Freigabe der DokumentShell an der Position nIdx im Bereich
nRegion (Dokumentvorlage)
- [Returnwert] TRUE: alles Ok
- FALSE: es ist ein Fehler aufgetreten (das
+ [Returnwert] sal_True: alles Ok
+ sal_False: es ist ein Fehler aufgetreten (das
Dokument konnte nicht gesichert werden)
*/
@@ -396,10 +396,10 @@ BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nRegion, USHORT nIdx)
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion,
- USHORT nTargetIdx,
- USHORT nSourceRegion,
- USHORT nSourceIdx)
+sal_Bool SfxOrganizeMgr::Copy(sal_uInt16 nTargetRegion,
+ sal_uInt16 nTargetIdx,
+ sal_uInt16 nSourceRegion,
+ sal_uInt16 nSourceIdx)
/* [Beschreibung]
@@ -407,10 +407,10 @@ BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion,
[Parameter]
- USHORT nTargetRegion Index des Zielbereiches
- USHORT nTargetIdx Index Zielposition
- USHORT nSourceRegion Index des Quellbereiches
- USHORT nSourceIdx Index der zu kopierenden / z uverschiebenden
+ sal_uInt16 nTargetRegion Index des Zielbereiches
+ sal_uInt16 nTargetIdx Index Zielposition
+ sal_uInt16 nSourceRegion Index des Quellbereiches
+ sal_uInt16 nSourceIdx Index der zu kopierenden / z uverschiebenden
Dokumentvorlage
[R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
@@ -418,17 +418,17 @@ BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion,
[Querverweise]
- <SfxDocumentTemplates::Copy(USHORT nTargetRegion,
- USHORT nTargetIdx,
- USHORT nSourceRegion,
- USHORT nSourceIdx)>
+ <SfxDocumentTemplates::Copy(sal_uInt16 nTargetRegion,
+ sal_uInt16 nTargetIdx,
+ sal_uInt16 nSourceRegion,
+ sal_uInt16 nSourceIdx)>
*/
{
if(nSourceIdx == USHRT_MAX) // keine Verzeichnisse kopieren
- return FALSE ;
- const BOOL bOk = pTemplates->Copy(nTargetRegion, nTargetIdx,
+ return sal_False ;
+ const sal_Bool bOk = pTemplates->Copy(nTargetRegion, nTargetIdx,
nSourceRegion, nSourceIdx);
if(bOk)
bModified = 1;
@@ -437,10 +437,10 @@ BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::Move(USHORT nTargetRegion,
- USHORT nTargetIdx,
- USHORT nSourceRegion,
- USHORT nSourceIdx)
+sal_Bool SfxOrganizeMgr::Move(sal_uInt16 nTargetRegion,
+ sal_uInt16 nTargetIdx,
+ sal_uInt16 nSourceRegion,
+ sal_uInt16 nSourceIdx)
/* [Beschreibung]
@@ -448,10 +448,10 @@ BOOL SfxOrganizeMgr::Move(USHORT nTargetRegion,
[Parameter]
- USHORT nTargetRegion Index des Zielbereiches
- USHORT nTargetIdx Index Zielposition
- USHORT nSourceRegion Index des Quellbereiches
- USHORT nSourceIdx Index der zu kopierenden / z uverschiebenden
+ sal_uInt16 nTargetRegion Index des Zielbereiches
+ sal_uInt16 nTargetIdx Index Zielposition
+ sal_uInt16 nSourceRegion Index des Quellbereiches
+ sal_uInt16 nSourceIdx Index der zu kopierenden / z uverschiebenden
Dokumentvorlage
[R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
@@ -459,17 +459,17 @@ BOOL SfxOrganizeMgr::Move(USHORT nTargetRegion,
[Querverweise]
- <SfxDocumentTemplates::Move(USHORT nTargetRegion,
- USHORT nTargetIdx,
- USHORT nSourceRegion,
- USHORT nSourceIdx)>
+ <SfxDocumentTemplates::Move(sal_uInt16 nTargetRegion,
+ sal_uInt16 nTargetIdx,
+ sal_uInt16 nSourceRegion,
+ sal_uInt16 nSourceIdx)>
*/
{
if(nSourceIdx == USHRT_MAX) // keine Verzeichnisse verschieben
- return FALSE ;
- const BOOL bOk = pTemplates->Move(nTargetRegion, nTargetIdx,
+ return sal_False ;
+ const sal_Bool bOk = pTemplates->Move(nTargetRegion, nTargetIdx,
nSourceRegion, nSourceIdx);
if(bOk)
bModified = 1;
@@ -478,8 +478,8 @@ BOOL SfxOrganizeMgr::Move(USHORT nTargetRegion,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
- USHORT nRegion, USHORT nIdx)
+sal_Bool SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
+ sal_uInt16 nRegion, sal_uInt16 nIdx)
/* [Beschreibung]
@@ -492,20 +492,20 @@ BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
durch das Keyboard angetriggert wird,
mu"s das Model der ListBox anschlie"send
aktualisiert werden.
- USHORT nRegion Index des Bereiches
- USHORT nIdx Index der Dokumentvorlage
+ sal_uInt16 nRegion Index des Bereiches
+ sal_uInt16 nIdx Index der Dokumentvorlage
[R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
[Querverweise]
- <SfxDocumentTemplates::Delete(USHORT nRegion, USHORT nIdx)>
+ <SfxDocumentTemplates::Delete(sal_uInt16 nRegion, sal_uInt16 nIdx)>
*/
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
if ( USHRT_MAX == nIdx )
{
@@ -514,11 +514,11 @@ BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
SvLBoxEntry *pGroupToDelete = pCaller->SvLBox::GetEntry(nRegion);
if ( pGroupToDelete )
{
- USHORT nItemNum = (USHORT)( pCaller->GetModel()->GetChildCount( pGroupToDelete ) );
- USHORT nToDeleteNum = 0;
+ sal_uInt16 nItemNum = (sal_uInt16)( pCaller->GetModel()->GetChildCount( pGroupToDelete ) );
+ sal_uInt16 nToDeleteNum = 0;
SvLBoxEntry **pEntriesToDelete = new SvLBoxEntry*[nItemNum];
- USHORT nInd = 0;
+ sal_uInt16 nInd = 0;
for ( nInd = 0; nInd < nItemNum; nInd++ )
pEntriesToDelete[nInd] = NULL;
@@ -563,7 +563,7 @@ BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::InsertDir
+sal_Bool SfxOrganizeMgr::InsertDir
(
SfxOrganizeListBox_Impl* pCaller,/* rufende ListBox; da dieses Event
durch das Men"u oder durch das
@@ -571,7 +571,7 @@ BOOL SfxOrganizeMgr::InsertDir
mu\s das Model der ListBox
anschlie\send aktualisiert werden */
const String& rText, // logischer Name des Bereiches
- USHORT nRegion // Index des Bereiches
+ sal_uInt16 nRegion // Index des Bereiches
)
/* [Beschreibung]
@@ -581,23 +581,23 @@ BOOL SfxOrganizeMgr::InsertDir
[R"uckgabewert]
- Erfolg (TRUE) oder Mi\serfolg (FALSE)
+ Erfolg (sal_True) oder Mi\serfolg (sal_False)
[Querverweise]
- <SfxDocumentTemplates::InsertDir(const String &, USHORT nRegion)>
+ <SfxDocumentTemplates::InsertDir(const String &, sal_uInt16 nRegion)>
*/
{
- const BOOL bOk = pTemplates->InsertDir(rText, nRegion);
+ const sal_Bool bOk = pTemplates->InsertDir(rText, nRegion);
if(bOk)
{
bModified = 1;
SvLBoxEntry *pEntry = pCaller->InsertEntry(rText,
pCaller->GetOpenedBmp(0),
pCaller->GetClosedBmp(0),
- 0, TRUE, nRegion);
+ 0, sal_True, nRegion);
pCaller->Update();
pCaller->EditEntry(pEntry);
}
@@ -606,8 +606,8 @@ BOOL SfxOrganizeMgr::InsertDir
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::SetName(const String &rName,
- USHORT nRegion, USHORT nIdx)
+sal_Bool SfxOrganizeMgr::SetName(const String &rName,
+ sal_uInt16 nRegion, sal_uInt16 nIdx)
/* [Beschreibung]
@@ -616,20 +616,20 @@ BOOL SfxOrganizeMgr::SetName(const String &rName,
[Parameter]
const String &rName der neue Name
- USHORT nRegion Index des Bereiches
- USHORT nIdx Index der Dokumentvorlage
+ sal_uInt16 nRegion Index des Bereiches
+ sal_uInt16 nIdx Index der Dokumentvorlage
[R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
[Querverweise]
- <SfxDocumentTemplates::SetName(const String &, USHORT nRegion, USHORT nIdx)>
+ <SfxDocumentTemplates::SetName(const String &, sal_uInt16 nRegion, sal_uInt16 nIdx)>
*/
{
- const BOOL bOk = pTemplates->SetName(rName, nRegion, nIdx);
+ const sal_Bool bOk = pTemplates->SetName(rName, nRegion, nIdx);
if(bOk)
bModified = 1;
return bOk;
@@ -637,7 +637,7 @@ BOOL SfxOrganizeMgr::SetName(const String &rName,
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) const
+sal_Bool SfxOrganizeMgr::CopyTo(sal_uInt16 nRegion, sal_uInt16 nIdx, const String &rName) const
/* [Beschreibung]
@@ -645,8 +645,8 @@ BOOL SfxOrganizeMgr::CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) co
[Parameter]
- USHORT nRegion Index des Bereiches
- USHORT nIdx Index der Dokumentvorlage
+ sal_uInt16 nRegion Index des Bereiches
+ sal_uInt16 nIdx Index der Dokumentvorlage
const String &rName Dateiname
[R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
@@ -654,7 +654,7 @@ BOOL SfxOrganizeMgr::CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) co
[Querverweise]
- <SfxDocumentTemplates::CopyTo( USHORT nRegion, USHORT nIdx, const String &)>
+ <SfxDocumentTemplates::CopyTo( sal_uInt16 nRegion, sal_uInt16 nIdx, const String &)>
*/
@@ -664,8 +664,8 @@ BOOL SfxOrganizeMgr::CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) co
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
- USHORT nRegion, USHORT nIdx, String &rName)
+sal_Bool SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
+ sal_uInt16 nRegion, sal_uInt16 nIdx, String &rName)
/* [Beschreibung]
@@ -677,8 +677,8 @@ BOOL SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
Event durch das Men"u angetriggert wird,
mu"s das Model der ListBox anschlie"send
aktualisiert werden.
- USHORT nRegion Index des Bereiches
- USHORT nIdx Index der Dokumentvorlage
+ sal_uInt16 nRegion Index des Bereiches
+ sal_uInt16 nIdx Index der Dokumentvorlage
String &rName Dateiname
[R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
@@ -686,7 +686,7 @@ BOOL SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
[Querverweise]
- <SfxDocumentTemplates::CopyFrom( USHORT nRegion, USHORT nIdx, const String &)>
+ <SfxDocumentTemplates::CopyFrom( sal_uInt16 nRegion, sal_uInt16 nIdx, const String &)>
*/
@@ -705,20 +705,20 @@ BOOL SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
pCaller->GetOpenedBmp(1),
pCaller->GetClosedBmp(1),
pParent,
- TRUE,
+ sal_True,
nIdx);
pCaller->Update();
// pCaller->EditEntry( pEntry );
pCaller->Expand( pParent );
- bModified = TRUE;
- return TRUE;
+ bModified = sal_True;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& rFileName )
+sal_Bool SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& rFileName )
/* [Beschreibung]
@@ -741,18 +741,18 @@ BOOL SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const String&
_FileListEntry* pEntry = new _FileListEntry( rFileName, pCollator );
if ( pImpl->pDocList->C40_PTR_INSERT( _FileListEntry, pEntry ) )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
pImpl->pDocList->Seek_Entry( pEntry, &nPos );
pCaller->InsertEntry( pEntry->aBaseName, pCaller->GetOpenedBmp(1),
- pCaller->GetClosedBmp(1), 0, TRUE, nPos );
- return TRUE;
+ pCaller->GetClosedBmp(1), 0, sal_True, nPos );
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
-BOOL SfxOrganizeMgr::Rescan()
+sal_Bool SfxOrganizeMgr::Rescan()
/* [Beschreibung]
@@ -760,7 +760,7 @@ BOOL SfxOrganizeMgr::Rescan()
[R"uckgabewert]
- TRUE es bestanden Unterschiede
+ sal_True es bestanden Unterschiede
FALSE keine "Anderung
[Querverweise]
@@ -771,10 +771,10 @@ BOOL SfxOrganizeMgr::Rescan()
{
if(pTemplates->Rescan())
{
- bModified = TRUE;
- return TRUE;
+ bModified = sal_True;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
@@ -792,14 +792,14 @@ void SfxOrganizeMgr::SaveAll(Window *pParent)
*/
{
- USHORT nRangeCount = pTemplates->GetRegionCount();
- USHORT i;
+ sal_uInt16 nRangeCount = pTemplates->GetRegionCount();
+ sal_uInt16 i;
for(i = 0; i < nRangeCount; ++i)
{
if( pTemplates->IsRegionLoaded( i ))
{
- const USHORT nCount = pTemplates->GetCount(i);
- for(USHORT j = 0; j < nCount; ++j)
+ const sal_uInt16 nCount = pTemplates->GetCount(i);
+ for(sal_uInt16 j = 0; j < nCount; ++j)
{
if(!pTemplates->DeleteObjectShell(i, j))
{
diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx
index 64bebccd60fd..470b96106184 100644
--- a/sfx2/source/view/printer.cxx
+++ b/sfx2/source/view/printer.cxx
@@ -50,16 +50,16 @@
struct SfxPrinter_Impl
{
- BOOL mbAll;
- BOOL mbSelection;
- BOOL mbFromTo;
- BOOL mbRange;
+ sal_Bool mbAll;
+ sal_Bool mbSelection;
+ sal_Bool mbFromTo;
+ sal_Bool mbRange;
SfxPrinter_Impl() :
- mbAll ( TRUE ),
- mbSelection ( TRUE ),
- mbFromTo ( TRUE ),
- mbRange ( TRUE ) {}
+ mbAll ( sal_True ),
+ mbSelection ( sal_True ),
+ mbFromTo ( sal_True ),
+ mbRange ( sal_True ) {}
~SfxPrinter_Impl() {}
};
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 8fd223279372..b3a7bea50946 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -424,7 +424,7 @@ void SAL_CALL IMPL_SfxBaseController_CloseListenerHelper::queryClosing( const EV
SfxViewShell* pShell = m_pController->GetViewShell_Impl();
if ( m_pController != NULL && pShell )
{
- BOOL bCanClose = (BOOL) pShell->PrepareClose( FALSE );
+ sal_Bool bCanClose = (sal_Bool) pShell->PrepareClose( sal_False );
if ( !bCanClose )
{
if ( bDeliverOwnership && ( !pShell->GetWindow() || !pShell->GetWindow()->IsReallyVisible() ) )
@@ -514,7 +514,7 @@ void SAL_CALL IMPL_SfxBaseController_ListenerHelper::frameAction( const FRAMEACT
if ( aEvent.Action == ::com::sun::star::frame::FrameAction_FRAME_UI_ACTIVATED )
{
if ( !m_pController->GetViewShell_Impl()->GetUIActiveIPClient_Impl() )
- m_pController->GetViewShell_Impl()->GetViewFrame()->MakeActive_Impl( FALSE );
+ m_pController->GetViewShell_Impl()->GetViewFrame()->MakeActive_Impl( sal_False );
}
else if ( aEvent.Action == ::com::sun::star::frame::FrameAction_CONTEXT_CHANGED )
{
@@ -698,7 +698,7 @@ sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( ::com::
for ( const SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocShell ); !bOther && pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell ) )
bOther = (pFrame != pActFrame);
- BOOL bRet = bOther || pDocShell->PrepareClose();
+ sal_Bool bRet = bOther || pDocShell->PrepareClose();
if ( bRet )
{
ConnectSfxFrame_Impl( E_DISCONNECT );
@@ -795,7 +795,7 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
{
SfxViewFrame *pFrame = m_pData->m_pViewShell->GetViewFrame();
if ( eSearchFlags & ( ::com::sun::star::frame::FrameSearchFlag::CREATE ))
- pFrame->SetChildWindow( SID_BROWSER, TRUE );
+ pFrame->SetChildWindow( SID_BROWSER, sal_True );
SfxChildWindow* pChildWin = pFrame->GetChildWindow( SID_BROWSER );
REFERENCE < XFRAME > xFrame;
if ( pChildWin )
@@ -866,7 +866,7 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
}
else if ( aURL.Protocol.compareToAscii( "slot:" ) == COMPARE_EQUAL )
{
- USHORT nId = (USHORT) aURL.Path.toInt32();
+ sal_uInt16 nId = (sal_uInt16) aURL.Path.toInt32();
pAct = m_pData->m_pViewShell->GetViewFrame() ;
if (nId >= SID_VERB_START && nId <= SID_VERB_END)
@@ -1206,10 +1206,10 @@ throw (::com::sun::star::uno::RuntimeException)
SfxSlotPool* pPool = &SfxSlotPool::GetSlotPool( pViewFrame );
SfxSlotPool* pSlotPool = pPool ? pPool : &SFX_SLOTPOOL();
- const ULONG nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
+ const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
// Gruppe anw"ahlen ( Gruppe 0 ist intern )
- for ( USHORT i=0; i<pSlotPool->GetGroupCount(); i++ )
+ for ( sal_uInt16 i=0; i<pSlotPool->GetGroupCount(); i++ )
{
String aName = pSlotPool->SeekGroup( i );
const SfxSlot* pSfxSlot = pSlotPool->FirstSlot();
@@ -1238,14 +1238,14 @@ throw (::com::sun::star::uno::RuntimeException)
::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( m_pData->m_pViewShell )
{
- const ULONG nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
+ const sal_uIntPtr nMode( SFX_SLOT_TOOLBOXCONFIG|SFX_SLOT_ACCELCONFIG|SFX_SLOT_MENUCONFIG );
SfxViewFrame* pViewFrame( m_pData->m_pViewShell->GetFrame() );
SfxSlotPool* pPool( &SfxSlotPool::GetSlotPool( pViewFrame ));
rtl::OUString aCmdPrefix( RTL_CONSTASCII_USTRINGPARAM( ".uno:" ));
SfxSlotPool* pSlotPool = pPool ? pPool : &SFX_SLOTPOOL();
- for ( USHORT i=0; i<pSlotPool->GetGroupCount(); i++ )
+ for ( sal_uInt16 i=0; i<pSlotPool->GetGroupCount(); i++ )
{
String aName = pSlotPool->SeekGroup( i );
const SfxSlot* pSfxSlot = pSlotPool->FirstSlot();
@@ -1278,17 +1278,17 @@ throw (::com::sun::star::uno::RuntimeException)
return aSeq;
}
-BOOL SfxBaseController::HandleEvent_Impl( NotifyEvent& rEvent )
+sal_Bool SfxBaseController::HandleEvent_Impl( NotifyEvent& rEvent )
{
return m_pData->m_aUserInputInterception.handleNotifyEvent( rEvent );
}
-BOOL SfxBaseController::HasKeyListeners_Impl()
+sal_Bool SfxBaseController::HasKeyListeners_Impl()
{
return m_pData->m_aUserInputInterception.hasKeyHandlers();
}
-BOOL SfxBaseController::HasMouseClickListeners_Impl()
+sal_Bool SfxBaseController::HasMouseClickListeners_Impl()
{
return m_pData->m_aUserInputInterception.hasMouseClickListeners();
}
@@ -1367,15 +1367,15 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
if ( !rFrame.IsMarkedHidden_Impl() )
{
if ( rDoc.IsHelpDocument() || ( nPluginMode == 2 ) )
- pViewFrame->GetDispatcher()->HideUI( TRUE );
+ pViewFrame->GetDispatcher()->HideUI( sal_True );
else
- pViewFrame->GetDispatcher()->HideUI( FALSE );
+ pViewFrame->GetDispatcher()->HideUI( sal_False );
if ( rFrame.IsInPlace() )
pViewFrame->LockAdjustPosSizePixel();
if ( nPluginMode == 3 )
- rFrame.GetWorkWindow_Impl()->SetInternalDockingAllowed( FALSE );
+ rFrame.GetWorkWindow_Impl()->SetInternalDockingAllowed( sal_False );
if ( !rFrame.IsInPlace() )
pViewFrame->GetDispatcher()->Update_Impl();
@@ -1390,7 +1390,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
// force resize for OLE server to fix layout problems of writer and math
// see i53651
if ( nPluginMode == 3 )
- pViewFrame->Resize( TRUE );
+ pViewFrame->Resize( sal_True );
}
}
else
@@ -1403,7 +1403,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
pViewFrame->UpdateTitle();
if ( !rFrame.IsInPlace() )
- pViewFrame->Resize( TRUE );
+ pViewFrame->Resize( sal_True );
// if there's a JumpMark given, then, well, jump to it
::comphelper::NamedValueCollection aViewArgs( getCreationArguments() );
@@ -1466,7 +1466,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
Sequence< PropertyValue > aViewData;
OSL_VERIFY( xViewData->getByIndex( nViewDataIndex ) >>= aViewData );
if ( aViewData.getLength() > 0 )
- m_pData->m_pViewShell->ReadUserDataSequence( aViewData, TRUE );
+ m_pData->m_pViewShell->ReadUserDataSequence( aViewData, sal_True );
}
}
catch( const Exception& )
diff --git a/sfx2/source/view/userinputinterception.cxx b/sfx2/source/view/userinputinterception.cxx
index ad910a944e0f..97c9e7926e39 100644
--- a/sfx2/source/view/userinputinterception.cxx
+++ b/sfx2/source/view/userinputinterception.cxx
@@ -184,7 +184,7 @@ namespace sfx2
{
Reference < XInterface > xHoldAlive( m_pData->m_rControllerImpl );
- USHORT nType = _rEvent.GetType();
+ sal_uInt16 nType = _rEvent.GetType();
bool bHandled = false;
switch ( nType )
diff --git a/sfx2/source/view/viewfac.cxx b/sfx2/source/view/viewfac.cxx
index 3eed678420dd..1b48d716ff79 100644
--- a/sfx2/source/view/viewfac.cxx
+++ b/sfx2/source/view/viewfac.cxx
@@ -71,7 +71,7 @@ String SfxViewFactory::GetAPIViewName() const
// CTOR / DTOR -----------------------------------------------------------
SfxViewFactory::SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI,
- USHORT nOrdinal, const sal_Char* asciiViewName ):
+ sal_uInt16 nOrdinal, const sal_Char* asciiViewName ):
fnCreate(fnC),
fnInit(fnI),
nOrd(nOrdinal),
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index dbadbc54ebd4..eb8fb8cf6125 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -606,7 +606,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
bForEdit = !bForEdit;
// ggf. beim User nachfragen
- sal_Bool bDo = ( GetViewShell()->PrepareClose() != FALSE );
+ sal_Bool bDo = ( GetViewShell()->PrepareClose() != sal_False );
SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, sal_False);
if ( bDo && GetFrame().DocIsModified_Impl() &&
!rReq.IsAPI() && ( !pSilentItem || !pSilentItem->GetValue() ) )
@@ -633,7 +633,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
// collect the views of the document
// TODO: when UNO ViewFactories are available for SFX-based documents, the below code should
// be UNOized, too
- typedef ::std::pair< Reference< XFrame >, USHORT > ViewDescriptor;
+ typedef ::std::pair< Reference< XFrame >, sal_uInt16 > ViewDescriptor;
::std::list< ViewDescriptor > aViewFrames;
SfxViewFrame *pView = GetFirst( xOldObj );
while ( pView )
@@ -710,9 +710,9 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
if ( pSilentItem && pSilentItem->GetValue() )
pNewSet->Put( SfxBoolItem( SID_SILENT, sal_True ) );
- SFX_ITEMSET_ARG(pNewSet, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, FALSE);
- SFX_ITEMSET_ARG(pNewSet, pMacroExecItem , SfxUInt16Item, SID_MACROEXECMODE , FALSE);
- SFX_ITEMSET_ARG(pNewSet, pDocTemplateItem, SfxUInt16Item, SID_UPDATEDOCMODE , FALSE);
+ SFX_ITEMSET_ARG(pNewSet, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER, sal_False);
+ SFX_ITEMSET_ARG(pNewSet, pMacroExecItem , SfxUInt16Item, SID_MACROEXECMODE , sal_False);
+ SFX_ITEMSET_ARG(pNewSet, pDocTemplateItem, SfxUInt16Item, SID_UPDATEDOCMODE , sal_False);
if (!pInteractionItem)
{
@@ -953,7 +953,7 @@ void SfxViewFrame::ExecHistory_Impl( SfxRequest &rReq )
{
// gibt es an der obersten Shell einen Undo-Manager?
SfxShell *pSh = GetDispatcher()->GetShell(0);
- SfxUndoManager* pShUndoMgr = pSh->GetUndoManager();
+ ::svl::IUndoManager* pShUndoMgr = pSh->GetUndoManager();
sal_Bool bOK = sal_False;
if ( pShUndoMgr )
{
@@ -965,20 +965,20 @@ void SfxViewFrame::ExecHistory_Impl( SfxRequest &rReq )
break;
case SID_UNDO:
- pShUndoMgr->Undo(0);
+ pShUndoMgr->Undo();
GetBindings().InvalidateAll(sal_False);
bOK = sal_True;
break;
case SID_REDO:
- pShUndoMgr->Redo(0);
+ pShUndoMgr->Redo();
GetBindings().InvalidateAll(sal_False);
bOK = sal_True;
break;
case SID_REPEAT:
if ( pSh->GetRepeatTarget() )
- pShUndoMgr->Repeat( *pSh->GetRepeatTarget(), 0);
+ pShUndoMgr->Repeat( *pSh->GetRepeatTarget() );
bOK = sal_True;
break;
}
@@ -1004,7 +1004,7 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet )
// Ich bin gerade am Reloaden und Yielde so vor mich hin ...
return;
- SfxUndoManager *pShUndoMgr = pSh->GetUndoManager();
+ ::svl::IUndoManager *pShUndoMgr = pSh->GetUndoManager();
if ( !pShUndoMgr )
{
// der SW hat eigenes Undo an der View
@@ -1040,10 +1040,10 @@ void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet )
rSet.DisableItem( SID_REDO );
SfxRepeatTarget *pTarget = pSh->GetRepeatTarget();
if ( pShUndoMgr && pTarget && pShUndoMgr->GetRepeatActionCount() &&
- pShUndoMgr->CanRepeat(*pTarget, 0) )
+ pShUndoMgr->CanRepeat(*pTarget) )
{
String aTmp( SvtResId(STR_REPEAT) );
- aTmp += pShUndoMgr->GetRepeatActionComment(*pTarget, 0);
+ aTmp += pShUndoMgr->GetRepeatActionComment(*pTarget);
rSet.Put( SfxStringItem( SID_REPEAT, aTmp ) );
}
else
@@ -1861,7 +1861,7 @@ void SfxViewFrame::Enable( sal_Bool bEnable )
if ( !bEnable )
pImp->bWindowWasEnabled = pWindow->IsInputEnabled();
if ( !bEnable || pImp->bWindowWasEnabled )
- pWindow->EnableInput( bEnable, TRUE );
+ pWindow->EnableInput( bEnable, sal_True );
}
// cursor and focus
@@ -1927,11 +1927,11 @@ void SfxViewFrame::Show()
pCurrent != this &&
( !pCurrent || pCurrent->GetParentViewFrame_Impl() != this ) &&
!GetActiveChildFrame_Impl() )
- MakeActive_Impl( FALSE );*/
+ MakeActive_Impl( sal_False );*/
if ( xObjSh.Is() && xObjSh->Get_Impl()->bHiddenLockedByAPI )
{
- xObjSh->Get_Impl()->bHiddenLockedByAPI = FALSE;
- xObjSh->OwnerLock(FALSE);
+ xObjSh->Get_Impl()->bHiddenLockedByAPI = sal_False;
+ xObjSh->OwnerLock(sal_False);
}
}
@@ -1960,7 +1960,7 @@ void SfxViewFrame::LockObjectShell_Impl( sal_Bool bLock )
}
//--------------------------------------------------------------------
-void SfxViewFrame::MakeActive_Impl( BOOL bGrabFocus )
+void SfxViewFrame::MakeActive_Impl( sal_Bool bGrabFocus )
{
if ( GetViewShell() && !GetFrame().IsClosing_Impl() )
{
@@ -1968,10 +1968,10 @@ void SfxViewFrame::MakeActive_Impl( BOOL bGrabFocus )
{
if ( GetViewShell() )
{
- BOOL bPreview = FALSE;
+ sal_Bool bPreview = sal_False;
if ( GetObjectShell()->IsPreview() )
{
- bPreview = TRUE;
+ bPreview = sal_True;
}
else
{
@@ -2004,7 +2004,7 @@ void SfxViewFrame::MakeActive_Impl( BOOL bGrabFocus )
{
GetBindings().SetDispatcher( GetDispatcher() );
GetBindings().SetActiveFrame( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > () );
- GetDispatcher()->Update_Impl( FALSE );
+ GetDispatcher()->Update_Impl( sal_False );
}
}
}
@@ -2072,7 +2072,7 @@ SfxViewFrame* SfxViewFrame::GetActiveChildFrame_Impl() const
//--------------------------------------------------------------------
SfxViewFrame* SfxViewFrame::LoadViewIntoFrame_Impl_NoThrow( const SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rFrame,
- const USHORT i_nViewId, const bool i_bHidden )
+ const sal_uInt16 i_nViewId, const bool i_bHidden )
{
Reference< XFrame > xFrame( i_rFrame );
bool bOwnFrame = false;
@@ -2145,7 +2145,7 @@ SfxViewFrame* SfxViewFrame::LoadViewIntoFrame_Impl_NoThrow( const SfxObjectShell
//--------------------------------------------------------------------
SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rFrame,
- const Sequence< PropertyValue >& i_rLoadArgs, const USHORT i_nViewId,
+ const Sequence< PropertyValue >& i_rLoadArgs, const sal_uInt16 i_nViewId,
const bool i_bHidden )
{
Reference< XModel > xDocument( i_rDoc.GetModel(), UNO_SET_THROW );
@@ -2175,37 +2175,37 @@ SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc
//--------------------------------------------------------------------
-SfxViewFrame* SfxViewFrame::LoadHiddenDocument( SfxObjectShell& i_rDoc, const USHORT i_nViewId )
+SfxViewFrame* SfxViewFrame::LoadHiddenDocument( SfxObjectShell& i_rDoc, const sal_uInt16 i_nViewId )
{
return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, Reference< XFrame >(), i_nViewId, true );
}
//--------------------------------------------------------------------
-SfxViewFrame* SfxViewFrame::LoadDocument( SfxObjectShell& i_rDoc, const USHORT i_nViewId )
+SfxViewFrame* SfxViewFrame::LoadDocument( SfxObjectShell& i_rDoc, const sal_uInt16 i_nViewId )
{
return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, Reference< XFrame >(), i_nViewId, false );
}
//--------------------------------------------------------------------
-SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rTargetFrame, const USHORT i_nViewId )
+SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rTargetFrame, const sal_uInt16 i_nViewId )
{
return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_rTargetFrame, i_nViewId, false );
}
//--------------------------------------------------------------------
-SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, const USHORT i_nViewId )
+SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, const sal_uInt16 i_nViewId )
{
return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_pFrameItem && i_pFrameItem->GetFrame() ? i_pFrameItem->GetFrame()->GetFrameInterface() : NULL, i_nViewId, false );
}
//--------------------------------------------------------------------
-SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest, const USHORT i_nViewId )
+SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest, const sal_uInt16 i_nViewId )
{
- SFX_REQUEST_ARG( i_rCreateDocRequest, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE );
- SFX_REQUEST_ARG( i_rCreateDocRequest, pHiddenItem, SfxBoolItem, SID_HIDDEN, FALSE );
+ SFX_REQUEST_ARG( i_rCreateDocRequest, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME, sal_False );
+ SFX_REQUEST_ARG( i_rCreateDocRequest, pHiddenItem, SfxBoolItem, SID_HIDDEN, sal_False );
return LoadViewIntoFrame_Impl_NoThrow(
i_rDoc,
@@ -2237,9 +2237,9 @@ SfxViewFrame* SfxViewFrame::Get( const Reference< XController>& i_rController, c
}
SfxViewFrame* pViewFrame = NULL;
- for ( pViewFrame = SfxViewFrame::GetFirst( pDoc, FALSE );
+ for ( pViewFrame = SfxViewFrame::GetFirst( pDoc, sal_False );
pViewFrame;
- pViewFrame = SfxViewFrame::GetNext( *pViewFrame, pDoc, FALSE )
+ pViewFrame = SfxViewFrame::GetNext( *pViewFrame, pDoc, sal_False )
)
{
if ( pViewFrame->GetViewShell()->GetController() == i_rController )
@@ -2251,7 +2251,7 @@ SfxViewFrame* SfxViewFrame::Get( const Reference< XController>& i_rController, c
//--------------------------------------------------------------------
-void SfxViewFrame::SaveCurrentViewData_Impl( const USHORT i_nNewViewId )
+void SfxViewFrame::SaveCurrentViewData_Impl( const sal_uInt16 i_nNewViewId )
{
SfxViewShell* pCurrentShell = GetViewShell();
ENSURE_OR_RETURN_VOID( pCurrentShell != NULL, "SfxViewFrame::SaveCurrentViewData_Impl: no current view shell -> no current view data!" );
@@ -2365,7 +2365,7 @@ sal_Bool SfxViewFrame::SwitchToViewShell_Impl
if ( pOldSh )
{
// ask wether it can be closed
- if ( !pOldSh->PrepareClose( TRUE ) )
+ if ( !pOldSh->PrepareClose( sal_True ) )
return sal_False;
// remove sub shells from Dispatcher before switching to new ViewShell
@@ -2377,7 +2377,7 @@ sal_Bool SfxViewFrame::SwitchToViewShell_Impl
// ID of the new view
SfxObjectFactory& rDocFact = GetObjectShell()->GetFactory();
- const USHORT nViewId = ( bIsIndex || !nViewIdOrNo ) ? rDocFact.GetViewFactory( nViewIdOrNo ).GetOrdinal() : nViewIdOrNo;
+ const sal_uInt16 nViewId = ( bIsIndex || !nViewIdOrNo ) ? rDocFact.GetViewFactory( nViewIdOrNo ).GetOrdinal() : nViewIdOrNo;
// save the view data of the old view, so it can be restored later on (when needed)
SaveCurrentViewData_Impl( nViewId );
@@ -2413,7 +2413,7 @@ sal_Bool SfxViewFrame::SwitchToViewShell_Impl
}
//-------------------------------------------------------------------------
-void SfxViewFrame::SetCurViewId_Impl( const USHORT i_nID )
+void SfxViewFrame::SetCurViewId_Impl( const sal_uInt16 i_nID )
{
pImp->nCurViewId = i_nID;
}
@@ -2461,7 +2461,7 @@ void SfxViewFrame::ExecView_Impl
)
{
const sal_uInt16 nViewId = static_cast< const SfxUInt16Item* >( pItem )->GetValue();
- BOOL bSuccess = SwitchToViewShell_Impl( nViewId );
+ sal_Bool bSuccess = SwitchToViewShell_Impl( nViewId );
rReq.SetReturnValue( SfxBoolItem( 0, bSuccess ) );
}
break;
@@ -2474,7 +2474,7 @@ void SfxViewFrame::ExecView_Impl
case SID_VIEWSHELL4:
{
const sal_uInt16 nViewNo = rReq.GetSlot() - SID_VIEWSHELL0;
- BOOL bSuccess = SwitchToViewShell_Impl( nViewNo, sal_True );
+ sal_Bool bSuccess = SwitchToViewShell_Impl( nViewNo, sal_True );
rReq.SetReturnValue( SfxBoolItem( 0, bSuccess ) );
break;
}
@@ -2497,7 +2497,7 @@ void SfxViewFrame::ExecView_Impl
// the view ID (optional arg. TODO: this is currently not supported in the slot definition ...)
SFX_REQUEST_ARG( rReq, pViewIdItem, SfxUInt16Item, SID_VIEW_ID, sal_False );
- const USHORT nViewId = pViewIdItem ? pViewIdItem->GetValue() : GetCurViewId();
+ const sal_uInt16 nViewId = pViewIdItem ? pViewIdItem->GetValue() : GetCurViewId();
Reference < XFrame > xFrame;
// the frame (optional arg. TODO: this is currently not supported in the slot definition ...)
@@ -2743,12 +2743,12 @@ void SfxViewFrame::SetModalMode( sal_Bool bModal )
}
}
-BOOL SfxViewFrame::IsInModalMode() const
+sal_Bool SfxViewFrame::IsInModalMode() const
{
return pImp->bModal || GetFrame().GetWindow().IsInModalMode();
}
-void SfxViewFrame::Resize( BOOL bForce )
+void SfxViewFrame::Resize( sal_Bool bForce )
{
Size aSize = GetWindow().GetOutputSizePixel();
if ( bForce || aSize != pImp->aSize )
@@ -2772,7 +2772,7 @@ void SfxViewFrame::Resize( BOOL bForce )
#define LINE_SEP 0x0A
-void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, BOOL bEraseTrailingEmptyLines )
+void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, sal_Bool bEraseTrailingEmptyLines )
{
sal_Int32 nStartPos = 0;
sal_Int32 nEndPos = 0;
@@ -2839,7 +2839,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
SfxApplication* pSfxApp = SFX_APP();
SfxRequest aReq( SID_BASICCHOOSER, SFX_CALLMODE_SYNCHRON, pSfxApp->GetPool() );
- aReq.AppendItem( SfxBoolItem(SID_RECORDMACRO,TRUE) );
+ aReq.AppendItem( SfxBoolItem(SID_RECORDMACRO,sal_True) );
const SfxPoolItem* pRet = SFX_APP()->ExecuteSlot( aReq );
String aScriptURL;
if ( pRet )
@@ -2876,8 +2876,6 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
}
}
- pSfxApp->EnterBasicCall();
-
BasicManager* pBasMgr = 0;
if ( aLocation.EqualsIgnoreCaseAscii( "application" ) )
{
@@ -2900,11 +2898,11 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
{
SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD );
aOUSource = pModule->GetSource32();
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
pMethod->GetLineRange( nStart, nEnd );
- ULONG nlStart = nStart;
- ULONG nlEnd = nEnd;
- CutLines( aOUSource, nlStart-1, nlEnd-nlStart+1, TRUE );
+ sal_uIntPtr nlStart = nStart;
+ sal_uIntPtr nlEnd = nEnd;
+ CutLines( aOUSource, nlStart-1, nlEnd-nlStart+1, sal_True );
}
}
}
@@ -2952,7 +2950,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
::rtl::OUString sCode;
::rtl::OUStringBuffer sRoutine(10000);
::rtl::OUString sMacroName( aMacroName );
- BOOL bReplace = FALSE;
+ sal_Bool bReplace = sal_False;
// get module
::rtl::OUString sModule( aModuleName );
@@ -2969,7 +2967,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
sRoutine.append( sCode );
}
- bReplace = TRUE;
+ bReplace = sal_True;
}
// append new method
@@ -3010,25 +3008,16 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
}
}
}
-
- pSfxApp->LeaveBasicCall();
}
else
{
// add code for "session only" macro
}
-
- /*
- FILE* pFile = fopen( "macro.bas", "a" );
- fprintf( pFile, "%s", ::rtl::OUStringToOString(sBuffer.makeStringAndClear(),RTL_TEXTENCODING_UTF8).getStr() );
- fclose ( pFile );
- */
}
void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
{
DBG_MEMTEST();
- FASTBOOL bDone = FALSE;
switch ( rReq.GetSlot() )
{
case SID_STOP_RECORDING :
@@ -3048,7 +3037,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
if (xSupplier.is())
xRecorder = xSupplier->getDispatchRecorder();
- BOOL bIsRecording = xRecorder.is();
+ sal_Bool bIsRecording = xRecorder.is();
SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_RECORDMACRO, sal_False);
if ( pItem && pItem->GetValue() == bIsRecording )
return;
@@ -3068,7 +3057,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
xRecorder = NULL;
GetBindings().SetRecorder_Impl( xRecorder );
- SetChildWindow( SID_RECORDING_FLOATWINDOW, FALSE );
+ SetChildWindow( SID_RECORDING_FLOATWINDOW, sal_False );
if ( rReq.GetSlot() != SID_RECORDMACRO )
GetBindings().Invalidate( SID_RECORDMACRO );
}
@@ -3092,7 +3081,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
aProp <<= xSupplier;
xSet->setPropertyValue(sProperty,aProp);
GetBindings().SetRecorder_Impl( xRecorder );
- SetChildWindow( SID_RECORDING_FLOATWINDOW, TRUE );
+ SetChildWindow( SID_RECORDING_FLOATWINDOW, sal_True );
}
rReq.Done();
@@ -3123,8 +3112,8 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
{
rtl::OUString aStatusbarResString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" ));
// Parameter auswerten
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, rReq.GetSlot(), FALSE);
- BOOL bShow( TRUE );
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, rReq.GetSlot(), sal_False);
+ sal_Bool bShow( sal_True );
if ( !pShowItem )
bShow = xLayoutManager->isElementVisible( aStatusbarResString );
else
@@ -3148,7 +3137,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_WIN_FULLSCREEN:
{
- SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, rReq.GetSlot(), FALSE);
+ SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, rReq.GetSlot(), sal_False);
SfxViewFrame *pTop = GetTopViewFrame();
if ( pTop )
{
@@ -3173,7 +3162,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
}
}
- BOOL bNewFullScreenMode = pItem ? pItem->GetValue() : !pWork->IsFullScreenMode();
+ sal_Bool bNewFullScreenMode = pItem ? pItem->GetValue() : !pWork->IsFullScreenMode();
if ( bNewFullScreenMode != pWork->IsFullScreenMode() )
{
Reference< ::com::sun::star::beans::XPropertySet > xLMPropSet( xLayoutManager, UNO_QUERY );
@@ -3203,24 +3192,21 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
else
rReq.Ignore();
- GetDispatcher()->Update_Impl( TRUE );
+ GetDispatcher()->Update_Impl( sal_True );
break;
}
}
-
- if ( bDone )
- rReq.Done();
}
void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
{
DBG_MEMTEST();
- const USHORT *pRanges = rSet.GetRanges();
+ const sal_uInt16 *pRanges = rSet.GetRanges();
DBG_ASSERT(pRanges && *pRanges, "Set ohne Bereich");
while ( *pRanges )
{
- for(USHORT nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
+ for(sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
{
switch(nWhich)
{
@@ -3288,11 +3274,11 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )) );
if ( !( aProp >>= xLayoutManager ))
- rSet.Put( SfxBoolItem( nWhich, FALSE ));
+ rSet.Put( SfxBoolItem( nWhich, sal_False ));
else
{
rtl::OUString aStatusbarResString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/statusbar/statusbar" ));
- BOOL bShow = xLayoutManager->isElementVisible( aStatusbarResString );
+ sal_Bool bShow = xLayoutManager->isElementVisible( aStatusbarResString );
rSet.Put( SfxBoolItem( nWhich, bShow ));
}
break;
@@ -3345,17 +3331,17 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
{
// Parameter auswerten
- USHORT nSID = rReq.GetSlot();
+ sal_uInt16 nSID = rReq.GetSlot();
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSID, FALSE);
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSID, sal_False);
if ( nSID == SID_VIEW_DATA_SOURCE_BROWSER )
{
if (!SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SDATABASE))
return;
Reference < XFrame > xFrame = GetFrame().GetTopFrame().GetFrameInterface();
Reference < XFrame > xBeamer( xFrame->findFrame( DEFINE_CONST_UNICODE("_beamer"), FrameSearchFlag::CHILDREN ) );
- BOOL bShow = FALSE;
- BOOL bHasChild = xBeamer.is();
+ sal_Bool bShow = sal_False;
+ sal_Bool bHasChild = xBeamer.is();
bShow = pShowItem ? pShowItem->GetValue() : !bHasChild;
if ( pShowItem )
{
@@ -3367,7 +3353,7 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
if ( !bShow )
{
- SetChildWindow( SID_BROWSER, FALSE );
+ SetChildWindow( SID_BROWSER, sal_False );
}
else
{
@@ -3394,8 +3380,8 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
return;
}
- BOOL bShow = FALSE;
- BOOL bHasChild = HasChildWindow(nSID);
+ sal_Bool bShow = sal_False;
+ sal_Bool bHasChild = HasChildWindow(nSID);
bShow = pShowItem ? pShowItem->GetValue() : !bHasChild;
// ausf"uhren
@@ -3403,7 +3389,7 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
ToggleChildWindow( nSID );
GetBindings().Invalidate( nSID );
- GetDispatcher()->Update_Impl( TRUE );
+ GetDispatcher()->Update_Impl( sal_True );
// ggf. recorden
if ( nSID == SID_HYPERLINK_DIALOG || nSID == SID_SEARCH_DLG )
@@ -3431,7 +3417,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
{
SfxWhichIter aIter( rState );
- for ( USHORT nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
+ for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
{
if ( nSID == SID_VIEW_DATA_SOURCE_BROWSER )
{
@@ -3484,7 +3470,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
}
//--------------------------------------------------------------------
-SfxWorkWindow* SfxViewFrame::GetWorkWindow_Impl( USHORT /*nId*/ )
+SfxWorkWindow* SfxViewFrame::GetWorkWindow_Impl( sal_uInt16 /*nId*/ )
{
SfxWorkWindow* pWork = 0;
pWork = GetFrame().GetWorkWindow_Impl();
@@ -3492,12 +3478,12 @@ SfxWorkWindow* SfxViewFrame::GetWorkWindow_Impl( USHORT /*nId*/ )
}
/*
-void SfxViewFrame::SetChildWindow(USHORT nId, BOOL bOn)
+void SfxViewFrame::SetChildWindow(sal_uInt16 nId, sal_Bool bOn)
{
- SetChildWindow( nId, bOn, TRUE );
+ SetChildWindow( nId, bOn, sal_True );
}*/
-void SfxViewFrame::SetChildWindow(USHORT nId, BOOL bOn, BOOL bSetFocus )
+void SfxViewFrame::SetChildWindow(sal_uInt16 nId, sal_Bool bOn, sal_Bool bSetFocus )
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
if ( pWork )
@@ -3506,44 +3492,44 @@ void SfxViewFrame::SetChildWindow(USHORT nId, BOOL bOn, BOOL bSetFocus )
//--------------------------------------------------------------------
-void SfxViewFrame::ToggleChildWindow(USHORT nId)
+void SfxViewFrame::ToggleChildWindow(sal_uInt16 nId)
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
if ( pWork )
- pWork->ToggleChildWindow_Impl( nId, TRUE );
+ pWork->ToggleChildWindow_Impl( nId, sal_True );
}
//--------------------------------------------------------------------
-BOOL SfxViewFrame::HasChildWindow( USHORT nId )
+sal_Bool SfxViewFrame::HasChildWindow( sal_uInt16 nId )
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
- return pWork ? pWork->HasChildWindow_Impl(nId) : FALSE;
+ return pWork ? pWork->HasChildWindow_Impl(nId) : sal_False;
}
//--------------------------------------------------------------------
-BOOL SfxViewFrame::KnowsChildWindow( USHORT nId )
+sal_Bool SfxViewFrame::KnowsChildWindow( sal_uInt16 nId )
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
- return pWork ? pWork->KnowsChildWindow_Impl(nId) : FALSE;
+ return pWork ? pWork->KnowsChildWindow_Impl(nId) : sal_False;
}
//--------------------------------------------------------------------
-void SfxViewFrame::ShowChildWindow( USHORT nId, BOOL bVisible )
+void SfxViewFrame::ShowChildWindow( sal_uInt16 nId, sal_Bool bVisible )
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
if ( pWork )
{
GetDispatcher()->Update_Impl(sal_True);
- pWork->ShowChildWindow_Impl(nId, bVisible, TRUE );
+ pWork->ShowChildWindow_Impl(nId, bVisible, sal_True );
}
}
//--------------------------------------------------------------------
-SfxChildWindow* SfxViewFrame::GetChildWindow(USHORT nId)
+SfxChildWindow* SfxViewFrame::GetChildWindow(sal_uInt16 nId)
{
SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
return pWork ? pWork->GetChildWindow_Impl(nId) : NULL;
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index 05ce981a51b6..6352adfb53e4 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -278,10 +278,10 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
{
case SID_SHOWPOPUPS :
{
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, SID_SHOWPOPUPS, FALSE);
- BOOL bShow = pShowItem ? pShowItem->GetValue() : TRUE;
- SFX_REQUEST_ARG(rReq, pIdItem, SfxUInt16Item, SID_CONFIGITEMID, FALSE);
- USHORT nId = pIdItem ? pIdItem->GetValue() : 0;
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, SID_SHOWPOPUPS, sal_False);
+ sal_Bool bShow = pShowItem ? pShowItem->GetValue() : sal_True;
+ SFX_REQUEST_ARG(rReq, pIdItem, SfxUInt16Item, SID_CONFIGITEMID, sal_False);
+ sal_uInt16 nId = pIdItem ? pIdItem->GetValue() : 0;
// ausfuehren
SfxWorkWindow *pWorkWin = GetFrame().GetWorkWindow_Impl();
@@ -289,7 +289,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
{
// Zuerst die Floats auch anzeigbar machen
pWorkWin->MakeChildsVisible_Impl( bShow );
- GetDispatcher()->Update_Impl( TRUE );
+ GetDispatcher()->Update_Impl( sal_True );
// Dann anzeigen
GetBindings().HidePopups( !bShow );
@@ -304,7 +304,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
pBind = pBind->GetSubBindings_Impl();
}
- pWorkWin->HidePopups_Impl( !bShow, TRUE, nId );
+ pWorkWin->HidePopups_Impl( !bShow, sal_True, nId );
pWorkWin->MakeChildsVisible_Impl( bShow );
}
@@ -315,14 +315,14 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
case SID_ACTIVATE:
{
- MakeActive_Impl( TRUE );
+ MakeActive_Impl( sal_True );
rReq.SetReturnValue( SfxObjectItem( 0, this ) );
break;
}
case SID_NEWDOCDIRECT :
{
- SFX_REQUEST_ARG( rReq, pFactoryItem, SfxStringItem, SID_NEWDOCDIRECT, FALSE);
+ SFX_REQUEST_ARG( rReq, pFactoryItem, SfxStringItem, SID_NEWDOCDIRECT, sal_False);
String aFactName;
if ( pFactoryItem )
aFactName = pFactoryItem->GetValue();
@@ -366,11 +366,11 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
// Doc braucht nur gefragt zu werden, wenn keine weitere View
sal_Bool bClosed = sal_False;
- sal_Bool bUI = TRUE;
+ sal_Bool bUI = sal_True;
if ( ( bOther || pDocSh->PrepareClose( bUI ) ) )
{
if ( !bOther )
- pDocSh->SetModified( FALSE );
+ pDocSh->SetModified( sal_False );
rReq.Done(); // unbedingt vor Close() rufen!
bClosed = sal_False;
try
@@ -440,7 +440,7 @@ void SfxViewFrame::GetState_Impl( SfxItemSet &rSet )
{
uno::Any aAny;
aAny <<= GetViewShell()->GetVerbs();
- rSet.Put( SfxUnoAnyItem( USHORT( SID_OBJECT ), aAny ) );
+ rSet.Put( SfxUnoAnyItem( sal_uInt16( SID_OBJECT ), aAny ) );
}
else
rSet.DisableItem( SID_OBJECT );
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index 0826e78870bb..83c916d3071e 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -61,7 +61,7 @@ struct SfxViewShell_Impl
SvBorder aBorder;
Size aOptimalSize;
Size aMargin;
- USHORT m_nPrinterLocks;
+ sal_uInt16 m_nPrinterLocks;
bool m_bCanPrint;
bool m_bHasPrintOptions;
bool m_bPlugInsActive;
@@ -71,14 +71,14 @@ struct SfxViewShell_Impl
bool m_bGotOwnership;
bool m_bGotFrameOwnership;
SfxScrollingMode m_eScroll;
- USHORT m_nFamily;
+ sal_uInt16 m_nFamily;
::rtl::Reference<SfxBaseController> m_pController;
::std::auto_ptr< ::svt::AcceleratorExecute > m_pAccExec;
com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aPrintOpts;
::rtl::Reference< SfxClipboardChangeListener > xClipboardListener;
::boost::shared_ptr< vcl::PrinterController > m_pPrinterController;
- SfxViewShell_Impl(USHORT const nFlags);
+ SfxViewShell_Impl(sal_uInt16 const nFlags);
};
#endif
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 24ed85556466..515149c5a2d3 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -426,16 +426,16 @@ IMPL_LINK( SfxDialogExecutor_Impl, Execute, void *, EMPTYARG )
//-------------------------------------------------------------------------
-BOOL UseStandardPrinter_Impl( Window* /*pParent*/, SfxPrinter* pDocPrinter )
+sal_Bool UseStandardPrinter_Impl( Window* /*pParent*/, SfxPrinter* pDocPrinter )
{
// Optionen abfragen, ob gewarnt werden soll (Doc uebersteuert App)
- BOOL bWarn = FALSE;
+ sal_Bool bWarn = sal_False;
const SfxItemSet *pDocOptions = &pDocPrinter->GetOptions();
if ( pDocOptions )
{
- USHORT nWhich = pDocOptions->GetPool()->GetWhich(SID_PRINTER_NOTFOUND_WARN);
+ sal_uInt16 nWhich = pDocOptions->GetPool()->GetWhich(SID_PRINTER_NOTFOUND_WARN);
const SfxBoolItem* pBoolItem = NULL;
- pDocPrinter->GetOptions().GetItemState( nWhich, FALSE, (const SfxPoolItem**) &pBoolItem );
+ pDocPrinter->GetOptions().GetItemState( nWhich, sal_False, (const SfxPoolItem**) &pBoolItem );
if ( pBoolItem )
bWarn = pBoolItem->GetValue();
}
@@ -450,7 +450,7 @@ BOOL UseStandardPrinter_Impl( Window* /*pParent*/, SfxPrinter* pDocPrinter )
}
*/
// nicht gewarnt => einfach so den StandardDrucker nehmen
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -465,15 +465,15 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
SfxPrinter *pDocPrinter = GetPrinter();
// Printer-Options auswerten
- FASTBOOL bOriToDoc = FALSE;
- FASTBOOL bSizeToDoc = FALSE;
+ bool bOriToDoc = false;
+ bool bSizeToDoc = false;
if ( &pDocPrinter->GetOptions() )
{
- USHORT nWhich = GetPool().GetWhich(SID_PRINTER_CHANGESTODOC);
+ sal_uInt16 nWhich = GetPool().GetWhich(SID_PRINTER_CHANGESTODOC);
const SfxFlagItem *pFlagItem = 0;
- pDocPrinter->GetOptions().GetItemState( nWhich, FALSE, (const SfxPoolItem**) &pFlagItem );
- bOriToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_ORIENTATION) : FALSE;
- bSizeToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_SIZE) : FALSE;
+ pDocPrinter->GetOptions().GetItemState( nWhich, sal_False, (const SfxPoolItem**) &pFlagItem );
+ bOriToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_ORIENTATION) : sal_False;
+ bSizeToDoc = pFlagItem ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_SIZE) : sal_False;
}
// vorheriges Format und Size feststellen
@@ -485,8 +485,8 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
Size aNewPgSz = pNewPrinter->GetPaperSizePixel();
// "Anderungen am Seitenformat feststellen
- BOOL bOriChg = (eOldOri != eNewOri) && bOriToDoc;
- BOOL bPgSzChg = ( aOldPgSz.Height() !=
+ sal_Bool bOriChg = (eOldOri != eNewOri) && bOriToDoc;
+ sal_Bool bPgSzChg = ( aOldPgSz.Height() !=
( bOriChg ? aNewPgSz.Width() : aNewPgSz.Height() ) ||
aOldPgSz.Width() !=
( bOriChg ? aNewPgSz.Height() : aNewPgSz.Width() ) ) &&
@@ -494,7 +494,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
// Message und Flags f"ur Seitenformat-"Anderung zusammenstellen
String aMsg;
- USHORT nNewOpt=0;
+ sal_uInt16 nNewOpt=0;
if( bOriChg && bPgSzChg )
{
aMsg = String(SfxResId(STR_PRINT_NEWORISIZE));
@@ -512,7 +512,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
}
// in dieser Variable sammeln, was sich so ge"aendert hat
- USHORT nChangedFlags = 0;
+ sal_uInt16 nChangedFlags = 0;
// ggf. Nachfrage, ob Seitenformat vom Drucker "ubernommen werden soll
if ( ( bOriChg || bPgSzChg ) &&
@@ -603,7 +603,7 @@ void SfxViewShell::ExecPrint( const uno::Sequence < beans::PropertyValue >& rPro
makeAny( rtl::OUString( pObjShell->GetTitle(0) ) ) );
// FIXME: job setup
- SfxPrinter* pDocPrt = GetPrinter(FALSE);
+ SfxPrinter* pDocPrt = GetPrinter(sal_False);
JobSetup aJobSetup = pDocPrt ? pDocPrt->GetJobSetup() : GetJobSetup();
if( bIsDirect )
aJobSetup.SetValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) ),
@@ -620,16 +620,16 @@ Printer* SfxViewShell::GetActivePrinter() const
void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
{
- // USHORT nCopies=1;
- USHORT nDialogRet = RET_CANCEL;
- // BOOL bCollate=FALSE;
+ // sal_uInt16 nCopies=1;
+ sal_uInt16 nDialogRet = RET_CANCEL;
+ // sal_Bool bCollate=sal_False;
SfxPrinter* pPrinter = 0;
SfxDialogExecutor_Impl* pExecutor = 0;
bool bSilent = false;
- BOOL bIsAPI = rReq.GetArgs() && rReq.GetArgs()->Count();
+ sal_Bool bIsAPI = rReq.GetArgs() && rReq.GetArgs()->Count();
if ( bIsAPI )
{
- SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, FALSE);
+ SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, sal_False);
bSilent = pSilentItem && pSilentItem->GetValue();
}
@@ -642,7 +642,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
const SfxFilter* pFilter = pMedium ? pMedium->GetFilter() : NULL;
sal_Bool bPrintOnHelp = ( pFilter && pFilter->GetFilterName() == aHelpFilterName );
- const USHORT nId = rReq.GetSlot();
+ const sal_uInt16 nId = rReq.GetSlot();
switch( nId )
{
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -654,7 +654,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// derived class may decide to abort this
if( !pDoc->QuerySlotExecutable( nId ) )
{
- rReq.SetReturnValue( SfxBoolItem( 0, FALSE ) );
+ rReq.SetReturnValue( SfxBoolItem( 0, sal_False ) );
return;
}
@@ -662,10 +662,10 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
if ( bDetectHidden && pDoc->QueryHiddenInformation( WhenPrinting, NULL ) != RET_YES )
break;
- SFX_REQUEST_ARG(rReq, pSelectItem, SfxBoolItem, SID_SELECTION, FALSE);
+ SFX_REQUEST_ARG(rReq, pSelectItem, SfxBoolItem, SID_SELECTION, sal_False);
sal_Bool bSelection = pSelectItem && pSelectItem->GetValue();
if( pSelectItem && rReq.GetArgs()->Count() == 1 )
- bIsAPI = FALSE;
+ bIsAPI = sal_False;
uno::Sequence < beans::PropertyValue > aProps;
if ( bIsAPI )
@@ -720,10 +720,10 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
case SID_PRINTER_NAME : // only for recorded macros
{
// get printer and printer settings from the document
- SfxPrinter *pDocPrinter = GetPrinter(TRUE);
+ SfxPrinter *pDocPrinter = GetPrinter(sal_True);
// look for printer in parameters
- SFX_REQUEST_ARG( rReq, pPrinterItem, SfxStringItem, SID_PRINTER_NAME, FALSE );
+ SFX_REQUEST_ARG( rReq, pPrinterItem, SfxStringItem, SID_PRINTER_NAME, sal_False );
if ( pPrinterItem )
{
// use PrinterName parameter to create a printer
@@ -752,7 +752,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// no valid printer either in ItemSet or at the document
if ( bSilent )
{
- rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ rReq.SetReturnValue(SfxBoolItem(0,sal_False));
break;
}
else
@@ -762,7 +762,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
if ( !pPrinter->IsOriginal() && rReq.GetArgs() && !UseStandardPrinter_Impl( NULL, pPrinter ) )
{
// printer is not available, but standard printer should not be used
- rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ rReq.SetReturnValue(SfxBoolItem(0,sal_False));
break;
}
@@ -772,7 +772,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// if printer is busy, abort printing
if ( !bSilent )
InfoBox( NULL, String( SfxResId( STR_ERROR_PRINTER_BUSY ) ) ).Execute();
- rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ rReq.SetReturnValue(SfxBoolItem(0,sal_False));
break;
}
@@ -839,7 +839,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
DELETEZ( pDlgPrinter );
rReq.Ignore();
if ( SID_PRINTDOC == nId )
- rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ rReq.SetReturnValue(SfxBoolItem(0,sal_False));
}
}
}
@@ -855,16 +855,16 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
//--------------------------------------------------------------------
-BOOL SfxViewShell::IsPrinterLocked() const
+sal_Bool SfxViewShell::IsPrinterLocked() const
{
return pImp->m_nPrinterLocks > 0;
}
//--------------------------------------------------------------------
-void SfxViewShell::LockPrinter( BOOL bLock)
+void SfxViewShell::LockPrinter( sal_Bool bLock)
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
if ( bLock )
{
bChanged = 1 == ++pImp->m_nPrinterLocks;
@@ -884,14 +884,14 @@ void SfxViewShell::LockPrinter( BOOL bLock)
//--------------------------------------------------------------------
-SfxPrinter* SfxViewShell::GetPrinter( BOOL /*bCreate*/ )
+SfxPrinter* SfxViewShell::GetPrinter( sal_Bool /*bCreate*/ )
{
return 0;
}
//--------------------------------------------------------------------
-USHORT SfxViewShell::SetPrinter( SfxPrinter* /*pNewPrinter*/, USHORT /*nDiffFlags*/, bool )
+sal_uInt16 SfxViewShell::SetPrinter( SfxPrinter* /*pNewPrinter*/, sal_uInt16 /*nDiffFlags*/, bool )
{
return 0;
}
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index ca3452e24168..88b185482abb 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -300,7 +300,7 @@ static ::rtl::OUString RetrieveLabelFromCommand(
}
//=========================================================================
-SfxViewShell_Impl::SfxViewShell_Impl(USHORT const nFlags)
+SfxViewShell_Impl::SfxViewShell_Impl(sal_uInt16 const nFlags)
: aInterceptorContainer( aMutex )
, m_bControllerSet(false)
, m_nPrinterLocks(0)
@@ -439,12 +439,12 @@ enum ETypeFamily
void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
{
- const USHORT nId = rReq.GetSlot();
+ const sal_uInt16 nId = rReq.GetSlot();
switch( nId )
{
case SID_STYLE_FAMILY :
{
- SFX_REQUEST_ARG(rReq, pItem, SfxUInt16Item, nId, FALSE);
+ SFX_REQUEST_ARG(rReq, pItem, SfxUInt16Item, nId, sal_False);
if (pItem)
{
pImp->m_nFamily = pItem->GetValue();
@@ -495,10 +495,10 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
ToolBox* pTextToolbox = dynamic_cast< ToolBox* >( pWin );
if( pTextToolbox )
{
- USHORT nItemCount = pTextToolbox->GetItemCount();
- for( USHORT nItem = 0; nItem < nItemCount; ++nItem )
+ sal_uInt16 nItemCount = pTextToolbox->GetItemCount();
+ for( sal_uInt16 nItem = 0; nItem < nItemCount; ++nItem )
{
- USHORT nItemId = pTextToolbox->GetItemId( nItem );
+ sal_uInt16 nItemId = pTextToolbox->GetItemId( nItem );
const XubString& rCommand = pTextToolbox->GetItemCommand( nItemId );
if( rCommand.EqualsAscii( ".uno:StyleApply" ) )
{
@@ -534,18 +534,18 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
if ( SvtInternalOptions().MailUIEnabled() )
{
- GetViewFrame()->SetChildWindow( SID_MAIL_CHILDWIN, TRUE );
+ GetViewFrame()->SetChildWindow( SID_MAIL_CHILDWIN, sal_True );
}
else
{
SfxMailModel aModel;
rtl::OUString aDocType;
- SFX_REQUEST_ARG(rReq, pMailSubject, SfxStringItem, SID_MAIL_SUBJECT, FALSE );
+ SFX_REQUEST_ARG(rReq, pMailSubject, SfxStringItem, SID_MAIL_SUBJECT, sal_False );
if ( pMailSubject )
aModel.SetSubject( pMailSubject->GetValue() );
- SFX_REQUEST_ARG(rReq, pMailRecipient, SfxStringItem, SID_MAIL_RECIPIENT, FALSE );
+ SFX_REQUEST_ARG(rReq, pMailRecipient, SfxStringItem, SID_MAIL_RECIPIENT, sal_False );
if ( pMailRecipient )
{
String aRecipient( pMailRecipient->GetValue() );
@@ -555,7 +555,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
aRecipient = aRecipient.Erase( 0, aMailToStr.Len() );
aModel.AddAddress( aRecipient, SfxMailModel::ROLE_TO );
}
- SFX_REQUEST_ARG(rReq, pMailDocType, SfxStringItem, SID_TYPE_NAME, FALSE );
+ SFX_REQUEST_ARG(rReq, pMailDocType, SfxStringItem, SID_TYPE_NAME, sal_False );
if ( pMailDocType )
aDocType = pMailDocType->GetValue();
@@ -610,7 +610,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
css::uno::Reference< css::frame::XModuleManager > xModuleManager( xSMGR->createInstance( aModuleManager ), css::uno::UNO_QUERY_THROW );
if ( !xModuleManager.is() )
{
- rReq.Done(FALSE);
+ rReq.Done(sal_False);
return;
}
@@ -668,7 +668,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
// No type and no location => error
if (( aFilterName.getLength() == 0 ) || ( aTypeName.getLength() == 0 ))
{
- rReq.Done(FALSE);
+ rReq.Done(sal_False);
return;
}
@@ -709,7 +709,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
}
catch ( com::sun::star::io::IOException& )
{
- rReq.Done(FALSE);
+ rReq.Done(sal_False);
return;
}
@@ -717,7 +717,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
::rtl::OUString::createFromAscii( "com.sun.star.system.SystemShellExecute" )),
css::uno::UNO_QUERY );
- BOOL bRet( TRUE );
+ sal_Bool bRet( sal_True );
if ( xSystemShellExecute.is() )
{
try
@@ -730,7 +730,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
vos::OGuard aGuard( Application::GetSolarMutex() );
Window *pParent = SFX_APP()->GetTopWindow();
ErrorBox( pParent, SfxResId( MSG_ERROR_NO_WEBBROWSER_FOUND )).Execute();
- bRet = FALSE;
+ bRet = sal_False;
}
}
@@ -739,7 +739,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
}
else
{
- rReq.Done(FALSE);
+ rReq.Done(sal_False);
return;
}
}
@@ -747,7 +747,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_PLUGINS_ACTIVE:
{
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nId, FALSE);
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nId, sal_False);
bool const bActive = (pShowItem)
? pShowItem->GetValue()
: !pImp->m_bPlugInsActive;
@@ -757,7 +757,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
// Jetzt schon DONE aufrufen, da die Argumente evtl. einen Pool
// benutzen, der demn"achst weg ist
- rReq.Done(TRUE);
+ rReq.Done(sal_True);
// ausfuehren
if (!pShowItem || (bActive != pImp->m_bPlugInsActive))
@@ -785,10 +785,10 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
VisAreaChanged(aVisArea);
// the plugins might need change in their state
- SfxInPlaceClientList *pClients = pView->GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = pView->GetIPClientList_Impl(sal_False);
if ( pClients )
{
- for (USHORT n=0; n < pClients->Count(); n++)
+ for (sal_uInt16 n=0; n < pClients->Count(); n++)
{
SfxInPlaceClient* pIPClient = pClients->GetObject(n);
if ( pIPClient )
@@ -817,7 +817,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
DBG_CHKTHIS(SfxViewShell, 0);
SfxWhichIter aIter( rSet );
- for ( USHORT nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
+ for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
{
switch ( nSID )
{
@@ -838,7 +838,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting();
if ( bEnabled )
{
- SfxPrinter *pPrinter = GetPrinter(FALSE);
+ SfxPrinter *pPrinter = GetPrinter(sal_False);
if ( SID_PRINTDOCDIRECT == nSID )
{
@@ -879,7 +879,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
case SID_MAIL_SENDDOC:
case SID_MAIL_SENDDOCASFORMAT:
{
- BOOL bEnable = !GetViewFrame()->HasChildWindow( SID_MAIL_CHILDWIN );
+ sal_Bool bEnable = !GetViewFrame()->HasChildWindow( SID_MAIL_CHILDWIN );
if ( !bEnable )
rSet.DisableItem( nSID );
break;
@@ -903,7 +903,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
// SelectionTextExt
case SID_SELECTION_TEXT_EXT:
{
- rSet.Put( SfxStringItem( SID_SELECTION_TEXT_EXT, GetSelectionText(TRUE) ) );
+ rSet.Put( SfxStringItem( SID_SELECTION_TEXT_EXT, GetSelectionText(sal_True) ) );
break;
}
*/
@@ -975,8 +975,8 @@ void SfxViewShell::UIActivating( SfxInPlaceClient* /*pClient*/ )
if ( xParentFrame.is() )
xParentFrame->setActiveFrame( xOwnFrame );
- pFrame->GetBindings().HidePopups(TRUE);
- pFrame->GetDispatcher()->Update_Impl( TRUE );
+ pFrame->GetBindings().HidePopups(sal_True);
+ pFrame->GetDispatcher()->Update_Impl( sal_True );
}
//--------------------------------------------------------------------
@@ -985,8 +985,8 @@ void SfxViewShell::UIDeactivated( SfxInPlaceClient* /*pClient*/ )
{
if ( !pFrame->GetFrame().IsClosing_Impl() ||
SfxViewFrame::Current() != pFrame )
- pFrame->GetDispatcher()->Update_Impl( TRUE );
- pFrame->GetBindings().HidePopups(FALSE);
+ pFrame->GetDispatcher()->Update_Impl( sal_True );
+ pFrame->GetBindings().HidePopups(sal_False);
// uno::Reference < frame::XFrame > xOwnFrame( pFrame->GetFrame().GetFrameInterface() );
// uno::Reference < frame::XFramesSupplier > xParentFrame( xOwnFrame->getCreator(), uno::UNO_QUERY );
@@ -1002,13 +1002,13 @@ SfxInPlaceClient* SfxViewShell::FindIPClient
Window* pObjParentWin
) const
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return 0;
if( !pObjParentWin )
pObjParentWin = GetWindow();
- for (USHORT n=0; n < pClients->Count(); n++)
+ for (sal_uInt16 n=0; n < pClients->Count(); n++)
{
SfxInPlaceClient *pIPClient = (SfxInPlaceClient*) pClients->GetObject(n);
if ( pIPClient->GetObject() == xObj && pIPClient->GetEditWin() == pObjParentWin )
@@ -1030,11 +1030,11 @@ SfxInPlaceClient* SfxViewShell::GetIPClient() const
SfxInPlaceClient* SfxViewShell::GetUIActiveIPClient_Impl() const
{
// this method is needed as long as SFX still manages the border space for ChildWindows (see SfxFrame::Resize)
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return 0;
- for (USHORT n=0; n < pClients->Count(); n++)
+ for (sal_uInt16 n=0; n < pClients->Count(); n++)
{
SfxInPlaceClient* pIPClient = pClients->GetObject(n);
if ( pIPClient->IsUIActive() )
@@ -1046,11 +1046,11 @@ SfxInPlaceClient* SfxViewShell::GetUIActiveIPClient_Impl() const
SfxInPlaceClient* SfxViewShell::GetUIActiveClient() const
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return 0;
- for (USHORT n=0; n < pClients->Count(); n++)
+ for (sal_uInt16 n=0; n < pClients->Count(); n++)
{
SfxInPlaceClient* pIPClient = pClients->GetObject(n);
if ( pIPClient->IsObjectUIActive() )
@@ -1062,7 +1062,7 @@ SfxInPlaceClient* SfxViewShell::GetUIActiveClient() const
//--------------------------------------------------------------------
-void SfxViewShell::Activate( BOOL bMDI )
+void SfxViewShell::Activate( sal_Bool bMDI )
{
DBG_CHKTHIS(SfxViewShell, 0);
if ( bMDI )
@@ -1077,7 +1077,7 @@ void SfxViewShell::Activate( BOOL bMDI )
//--------------------------------------------------------------------
-void SfxViewShell::Deactivate(BOOL /*bMDI*/)
+void SfxViewShell::Deactivate(sal_Bool /*bMDI*/)
{
DBG_CHKTHIS(SfxViewShell, 0);
}
@@ -1294,13 +1294,13 @@ void SfxViewShell::SetWindow
DiscardClients_Impl();
// View-Port austauschen
- BOOL bHadFocus = pWindow ? pWindow->HasChildPathFocus( TRUE ) : FALSE;
+ sal_Bool bHadFocus = pWindow ? pWindow->HasChildPathFocus( sal_True ) : sal_False;
pWindow = pViewPort;
if( pWindow )
{
// Disable automatic GUI mirroring (right-to-left) for document windows
- pWindow->EnableRTL( FALSE );
+ pWindow->EnableRTL( sal_False );
}
if ( bHadFocus && pWindow )
@@ -1323,7 +1323,7 @@ Size SfxViewShell::GetOptimalSizePixel() const
SfxViewShell::SfxViewShell
(
SfxViewFrame* pViewFrame, /* <SfxViewFrame>, in dem diese View dargestellt wird */
- USHORT nFlags /* siehe <SfxViewShell-Flags> */
+ sal_uInt16 nFlags /* siehe <SfxViewShell-Flags> */
)
: SfxShell(this)
@@ -1384,10 +1384,10 @@ SfxViewShell::~SfxViewShell()
//--------------------------------------------------------------------
-USHORT SfxViewShell::PrepareClose
+sal_uInt16 SfxViewShell::PrepareClose
(
- BOOL bUI, // TRUE: Dialoge etc. erlaubt, FALSE: silent-mode
- BOOL /*bForBrowsing*/
+ sal_Bool bUI, // sal_True: Dialoge etc. erlaubt, sal_False: silent-mode
+ sal_Bool /*bForBrowsing*/
)
{
SfxPrinter *pPrinter = GetPrinter();
@@ -1399,16 +1399,16 @@ USHORT SfxViewShell::PrepareClose
aInfoBox.Execute();
}
- return FALSE;
+ return sal_False;
}
if( GetViewFrame()->IsInModalMode() )
- return FALSE;
+ return sal_False;
if( bUI && GetViewFrame()->GetDispatcher()->IsLocked() )
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
@@ -1426,9 +1426,9 @@ SfxViewShell* SfxViewShell::Get( const Reference< XController>& i_rController )
if ( !i_rController.is() )
return NULL;
- for ( SfxViewShell* pViewShell = SfxViewShell::GetFirst( NULL, FALSE );
+ for ( SfxViewShell* pViewShell = SfxViewShell::GetFirst( NULL, sal_False );
pViewShell;
- pViewShell = SfxViewShell::GetNext( *pViewShell, NULL, FALSE )
+ pViewShell = SfxViewShell::GetNext( *pViewShell, NULL, sal_False )
)
{
if ( pViewShell->GetController() == i_rController )
@@ -1457,7 +1457,7 @@ SdrView* SfxViewShell::GetDrawView() const
String SfxViewShell::GetSelectionText
(
- BOOL /*bCompleteWords*/ /* FALSE (default)
+ sal_Bool /*bCompleteWords*/ /* sal_False (default)
Nur der tats"achlich selektierte Text wird
zur"uckgegeben.
@@ -1486,17 +1486,17 @@ String SfxViewShell::GetSelectionText
//--------------------------------------------------------------------
-BOOL SfxViewShell::HasSelection( BOOL ) const
+sal_Bool SfxViewShell::HasSelection( sal_Bool ) const
/* [Beschreibung]
Mit dieser virtuellen Methode kann z.B. ein Dialog abfragen, ob in der
- aktuellen View etwas selektiert ist. Wenn der Parameter <BOOL> TRUE ist,
+ aktuellen View etwas selektiert ist. Wenn der Parameter <sal_Bool> sal_True ist,
wird abgefragt, ob Text selektiert ist.
*/
{
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
@@ -1549,10 +1549,10 @@ void SfxViewShell::RemoveSubShell( SfxShell* pShell )
SfxDispatcher *pDisp = pFrame->GetDispatcher();
if ( !pShell )
{
- USHORT nCount = pImp->aArr.Count();
+ sal_uInt16 nCount = pImp->aArr.Count();
if ( pDisp->IsActive(*this) )
{
- for ( USHORT n=nCount; n>0; n-- )
+ for ( sal_uInt16 n=nCount; n>0; n-- )
pDisp->Pop( *pImp->aArr[n-1] );
pDisp->Flush();
}
@@ -1561,7 +1561,7 @@ void SfxViewShell::RemoveSubShell( SfxShell* pShell )
}
else
{
- USHORT nPos = pImp->aArr.GetPos( pShell );
+ sal_uInt16 nPos = pImp->aArr.GetPos( pShell );
if ( nPos != 0xFFFF )
{
pImp->aArr.Remove( nPos );
@@ -1574,21 +1574,21 @@ void SfxViewShell::RemoveSubShell( SfxShell* pShell )
}
}
-SfxShell* SfxViewShell::GetSubShell( USHORT nNo )
+SfxShell* SfxViewShell::GetSubShell( sal_uInt16 nNo )
{
- USHORT nCount = pImp->aArr.Count();
+ sal_uInt16 nCount = pImp->aArr.Count();
if ( nNo<nCount )
return pImp->aArr[nCount-nNo-1];
return NULL;
}
-void SfxViewShell::PushSubShells_Impl( BOOL bPush )
+void SfxViewShell::PushSubShells_Impl( sal_Bool bPush )
{
- USHORT nCount = pImp->aArr.Count();
+ sal_uInt16 nCount = pImp->aArr.Count();
SfxDispatcher *pDisp = pFrame->GetDispatcher();
if ( bPush )
{
- for ( USHORT n=0; n<nCount; n++ )
+ for ( sal_uInt16 n=0; n<nCount; n++ )
pDisp->Push( *pImp->aArr[n] );
}
else if ( nCount )
@@ -1603,13 +1603,13 @@ void SfxViewShell::PushSubShells_Impl( BOOL bPush )
//--------------------------------------------------------------------
-void SfxViewShell::WriteUserData( String&, BOOL )
+void SfxViewShell::WriteUserData( String&, sal_Bool )
{
}
//--------------------------------------------------------------------
-void SfxViewShell::ReadUserData(const String&, BOOL )
+void SfxViewShell::ReadUserData(const String&, sal_Bool )
{
}
@@ -1628,13 +1628,13 @@ void SfxViewShell::WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::c
SfxViewShell* SfxViewShell::GetFirst
(
const TypeId* pType,
- BOOL bOnlyVisible
+ sal_Bool bOnlyVisible
)
{
// search for a SfxViewShell of the specified type
SfxViewShellArr_Impl &rShells = SFX_APP()->GetViewShells_Impl();
SfxViewFrameArr_Impl &rFrames = SFX_APP()->GetViewFrames_Impl();
- for ( USHORT nPos = 0; nPos < rShells.Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < rShells.Count(); ++nPos )
{
SfxViewShell *pShell = rShells.GetObject(nPos);
if ( pShell )
@@ -1666,12 +1666,12 @@ SfxViewShell* SfxViewShell::GetNext
(
const SfxViewShell& rPrev,
const TypeId* pType,
- BOOL bOnlyVisible
+ sal_Bool bOnlyVisible
)
{
SfxViewShellArr_Impl &rShells = SFX_APP()->GetViewShells_Impl();
SfxViewFrameArr_Impl &rFrames = SFX_APP()->GetViewFrames_Impl();
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < rShells.Count(); ++nPos )
if ( rShells.GetObject(nPos) == &rPrev )
break;
@@ -1743,7 +1743,7 @@ void SfxViewShell::Notify( SfxBroadcaster& rBC,
//--------------------------------------------------------------------
-BOOL SfxViewShell::ExecKey_Impl(const KeyEvent& aKey)
+sal_Bool SfxViewShell::ExecKey_Impl(const KeyEvent& aKey)
{
if (!pImp->m_pAccExec.get())
{
@@ -1769,7 +1769,7 @@ FASTBOOL SfxViewShell::KeyInput( const KeyEvent &rKeyEvent )
[R"uckgabewert]
- FASTBOOL TRUE
+ FASTBOOL sal_True
die Taste ist konfiguriert, der betreffende
Handler wurde gerufen
@@ -1785,7 +1785,7 @@ FASTBOOL SfxViewShell::KeyInput( const KeyEvent &rKeyEvent )
return ExecKey_Impl(rKeyEvent);
}
-FASTBOOL SfxViewShell::GlobalKeyInput_Impl( const KeyEvent &rKeyEvent )
+bool SfxViewShell::GlobalKeyInput_Impl( const KeyEvent &rKeyEvent )
{
return ExecKey_Impl(rKeyEvent);
}
@@ -1828,11 +1828,11 @@ void SfxViewShell::GotFocus() const
void SfxViewShell::ResetAllClients_Impl( SfxInPlaceClient *pIP )
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return;
- for ( USHORT n=0; n < pClients->Count(); n++ )
+ for ( sal_uInt16 n=0; n < pClients->Count(); n++ )
{
SfxInPlaceClient* pIPClient = pClients->GetObject(n);
if( pIPClient != pIP )
@@ -1844,11 +1844,11 @@ void SfxViewShell::ResetAllClients_Impl( SfxInPlaceClient *pIP )
void SfxViewShell::DisconnectAllClients()
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return;
- for ( USHORT n=0; n<pClients->Count(); )
+ for ( sal_uInt16 n=0; n<pClients->Count(); )
// clients will remove themselves from the list
delete pClients->GetObject(n);
}
@@ -1871,11 +1871,11 @@ void SfxViewShell::AdjustVisArea(const Rectangle& rRect)
void SfxViewShell::VisAreaChanged(const Rectangle& /*rVisArea*/)
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return;
- for (USHORT n=0; n < pClients->Count(); n++)
+ for (sal_uInt16 n=0; n < pClients->Count(); n++)
{
SfxInPlaceClient* pIPClient = pClients->GetObject(n);
if ( pIPClient->IsObjectInPlaceActive() )
@@ -1924,7 +1924,7 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan
//--------------------------------------------------------------------
-BOOL SfxViewShell::PlugInsActive() const
+sal_Bool SfxViewShell::PlugInsActive() const
{
return pImp->m_bPlugInsActive;
}
@@ -1940,11 +1940,11 @@ void SfxViewShell::DiscardClients_Impl()
*/
{
- SfxInPlaceClientList *pClients = GetIPClientList_Impl(FALSE);
+ SfxInPlaceClientList *pClients = GetIPClientList_Impl(sal_False);
if ( !pClients )
return;
- for (USHORT n=0; n < pClients->Count(); )
+ for (sal_uInt16 n=0; n < pClients->Count(); )
delete pClients->GetObject(n);
}
@@ -2024,7 +2024,7 @@ void SfxViewShell::MarginChanged()
//--------------------------------------------------------------------
-BOOL SfxViewShell::IsShowView_Impl() const
+sal_Bool SfxViewShell::IsShowView_Impl() const
{
return pImp->m_bIsShowView;
}
@@ -2049,7 +2049,7 @@ void SfxViewShell::JumpToMark( const String& rMark )
//------------------------------------------------------------------------
-SfxInPlaceClientList* SfxViewShell::GetIPClientList_Impl( BOOL bCreate ) const
+SfxInPlaceClientList* SfxViewShell::GetIPClientList_Impl( sal_Bool bCreate ) const
{
if ( !pIPClientList && bCreate )
( (SfxViewShell*) this )->pIPClientList = new SfxInPlaceClientList;
@@ -2096,10 +2096,10 @@ void SfxViewShell::RemoveContextMenuInterceptor_Impl( const REFERENCE< XCONTEXTM
void Change( Menu* pMenu, SfxViewShell* pView )
{
SfxDispatcher *pDisp = pView->GetViewFrame()->GetDispatcher();
- USHORT nCount = pMenu->GetItemCount();
- for ( USHORT nPos=0; nPos<nCount; ++nPos )
+ sal_uInt16 nCount = pMenu->GetItemCount();
+ for ( sal_uInt16 nPos=0; nPos<nCount; ++nPos )
{
- USHORT nId = pMenu->GetItemId(nPos);
+ sal_uInt16 nId = pMenu->GetItemId(nPos);
String aCmd = pMenu->GetItemCommand(nId);
PopupMenu* pPopup = pMenu->GetPopupMenu(nId);
if ( pPopup )
@@ -2110,7 +2110,7 @@ void Change( Menu* pMenu, SfxViewShell* pView )
{
if ( aCmd.CompareToAscii(".uno:", 5) == 0 )
{
- for (USHORT nIdx=0;;)
+ for (sal_uInt16 nIdx=0;;)
{
SfxShell *pShell=pDisp->GetShell(nIdx++);
if (pShell == NULL)
@@ -2131,10 +2131,10 @@ void Change( Menu* pMenu, SfxViewShell* pView )
}
-BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& rMenuIdentifier, Menu*& rpOut, ui::ContextMenuExecuteEvent aEvent )
+sal_Bool SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString& rMenuIdentifier, Menu*& rpOut, ui::ContextMenuExecuteEvent aEvent )
{
rpOut = NULL;
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
// create container from menu
// #110897#
@@ -2157,14 +2157,14 @@ BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString&
{
case ui::ContextMenuInterceptorAction_CANCELLED :
// interceptor does not want execution
- return FALSE;
+ return sal_False;
case ui::ContextMenuInterceptorAction_EXECUTE_MODIFIED :
// interceptor wants his modified menu to be executed
- bModified = TRUE;
+ bModified = sal_True;
break;
case ui::ContextMenuInterceptorAction_CONTINUE_MODIFIED :
// interceptor has modified menu, but allows for calling other interceptors
- bModified = TRUE;
+ bModified = sal_True;
continue;
case ui::ContextMenuInterceptorAction_IGNORED :
// interceptor is indifferent
@@ -2191,7 +2191,7 @@ BOOL SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUString&
Change( rpOut, this );
}
- return TRUE;
+ return sal_True;
}
void SfxViewShell::TakeOwnerShip_Impl()
@@ -2210,7 +2210,7 @@ void SfxViewShell::TakeFrameOwnerShip_Impl()
void SfxViewShell::CheckOwnerShip_Impl()
{
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = sal_False;
if (pImp->m_bGotOwnership)
{
uno::Reference < util::XCloseable > xModel(
@@ -2221,7 +2221,7 @@ void SfxViewShell::CheckOwnerShip_Impl()
{
// this call will destroy this object in case of success!
xModel->close( sal_True );
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
catch ( util::CloseVetoException& )
{
@@ -2254,16 +2254,16 @@ long SfxViewShell::HandleNotifyEvent_Impl( NotifyEvent& rEvent )
return 0;
}
-BOOL SfxViewShell::HasKeyListeners_Impl()
+sal_Bool SfxViewShell::HasKeyListeners_Impl()
{
return (pImp->m_pController.is())
- ? pImp->m_pController->HasKeyListeners_Impl() : FALSE;
+ ? pImp->m_pController->HasKeyListeners_Impl() : sal_False;
}
-BOOL SfxViewShell::HasMouseClickListeners_Impl()
+sal_Bool SfxViewShell::HasMouseClickListeners_Impl()
{
return (pImp->m_pController.is())
- ? pImp->m_pController->HasMouseClickListeners_Impl() : FALSE;
+ ? pImp->m_pController->HasMouseClickListeners_Impl() : sal_False;
}
void SfxViewShell::SetAdditionalPrintOptions( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& rOpts )
@@ -2272,7 +2272,7 @@ void SfxViewShell::SetAdditionalPrintOptions( const com::sun::star::uno::Sequenc
// GetObjectShell()->Broadcast( SfxPrintingHint( -3, NULL, NULL, rOpts ) );
}
-BOOL SfxViewShell::Escape()
+sal_Bool SfxViewShell::Escape()
{
return GetViewFrame()->GetBindings().Execute( SID_TERMINATE_INPLACEACTIVATION );
}
@@ -2299,7 +2299,7 @@ uno::Reference< datatransfer::clipboard::XClipboardNotifier > SfxViewShell::GetC
return xClipboardNotifier;
}
-void SfxViewShell::AddRemoveClipboardListener( const uno::Reference < datatransfer::clipboard::XClipboardListener >& rClp, BOOL bAdd )
+void SfxViewShell::AddRemoveClipboardListener( const uno::Reference < datatransfer::clipboard::XClipboardListener >& rClp, sal_Bool bAdd )
{
try
{