diff options
author | Noel Grandin <noel@peralex.com> | 2014-03-13 10:22:49 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-03-14 07:50:34 +0200 |
commit | 5fe7ecc04f35ef785510e3ef404f46eb6f05a123 (patch) | |
tree | 4c141983d092ef097c09187abb634f2e4a717452 /sfx2 | |
parent | c2324940d384186ff02581e49a24ea8235cd584c (diff) |
sfx2: sal_Bool->bool
Change-Id: I56a50ee4a169c8f82c830ebf498f7ead1335f0b5
Diffstat (limited to 'sfx2')
31 files changed, 348 insertions, 348 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index 92d1c7c7ed64..45165c558e4c 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -363,7 +363,7 @@ void SfxApplication::SetViewFrame_Impl( SfxViewFrame *pFrame ) { SfxDispatcher* pDisp = pAppData_Impl->pViewFrame->GetDispatcher(); pDisp->Flush(); - pDisp->Update_Impl(sal_True); + pDisp->Update_Impl(true); } } } diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 821f91c1f0ae..ced0510a84f4 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -527,7 +527,7 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) { // update all "final" dispatchers if ( !pCurrViewFrame->GetActiveChildFrame_Impl() ) - pCurrViewFrame->GetDispatcher()->Update_Impl(sal_True); + pCurrViewFrame->GetDispatcher()->Update_Impl(true); pCurrViewFrame = SfxViewFrame::GetNext(*pCurrViewFrame); } } diff --git a/sfx2/source/appl/appdispatchprovider.cxx b/sfx2/source/appl/appdispatchprovider.cxx index 4c912d7a233d..8fe8bf8371a4 100644 --- a/sfx2/source/appl/appdispatchprovider.cxx +++ b/sfx2/source/appl/appdispatchprovider.cxx @@ -141,7 +141,7 @@ Reference < XDispatch > SAL_CALL SfxAppDispatchProvider::queryDispatch( { nId = (sal_uInt16) aURL.Path.toInt32(); SfxShell* pShell; - pAppDisp->GetShellAndSlot_Impl( nId, &pShell, &pSlot, sal_True, sal_True ); + pAppDisp->GetShellAndSlot_Impl( nId, &pShell, &pSlot, true, true ); } else if ( aURL.Protocol == ".uno:" ) { diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index 610a1e119ff2..171e3bebc407 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -273,7 +273,7 @@ bool SfxApplication::Initialize_Impl() // App-Dispatcher aufbauen pAppData_Impl->pAppDispat->Push(*this); pAppData_Impl->pAppDispat->Flush(); - pAppData_Impl->pAppDispat->DoActivate_Impl( sal_True, NULL ); + pAppData_Impl->pAppDispat->DoActivate_Impl( true, NULL ); { SolarMutexGuard aGuard; diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 80cf5a892bdf..095bd5e698bf 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -228,7 +228,7 @@ sal_uInt32 CheckPasswd_Impl if( ( !pFile->GetFilter() || pFile->IsStorage() ) ) { - uno::Reference< embed::XStorage > xStorage = pFile->GetStorage( sal_True ); + uno::Reference< embed::XStorage > xStorage = pFile->GetStorage( true ); if( xStorage.is() ) { uno::Reference< beans::XPropertySet > xStorageProps( xStorage, uno::UNO_QUERY ); @@ -320,7 +320,7 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUStri const SfxFilter* pFilter = NULL; SfxMedium aMedium( rFileName, ( STREAM_READ | STREAM_SHARE_DENYNONE ) ); - if ( !aMedium.GetStorage( sal_False ).is() ) + if ( !aMedium.GetStorage( false ).is() ) aMedium.GetInStream(); if ( aMedium.GetError() ) @@ -329,7 +329,7 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUStri return aMedium.GetErrorCode(); } - aMedium.UseInteractionHandler( sal_True ); + aMedium.UseInteractionHandler( true ); sal_uIntPtr nErr = GetFilterMatcher().GuessFilter( aMedium,&pFilter,SFX_FILTER_TEMPLATE, 0 ); if ( 0 != nErr) { diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx index ca7a1bab371f..26a8b2d78e07 100644 --- a/sfx2/source/appl/appquit.cxx +++ b/sfx2/source/appl/appquit.cxx @@ -103,7 +103,7 @@ void SfxApplication::Deinitialize() pAppData_Impl->pAppDispat->Pop( *this, SFX_SHELL_POP_UNTIL ); pAppData_Impl->pAppDispat->Flush(); pAppData_Impl->bDowning = sal_True; - pAppData_Impl->pAppDispat->DoDeactivate_Impl( sal_True, NULL ); + pAppData_Impl->pAppDispat->DoDeactivate_Impl( true, NULL ); // call derived application-exit Exit(); diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 4c6619d90c17..95417712f5c2 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -131,22 +131,22 @@ struct SfxDispatcher_Impl SfxViewFrame* pFrame; // NULL or associated Frame SfxDispatcher* pParent; // AppDispatcher, NULL if possible SfxHintPosterRef xPoster; // Execute asynchronous - sal_Bool bFlushing; // sal_True during Flush //? - sal_Bool bUpdated; // Update_Impl has run - sal_Bool bLocked; // No Execute - sal_Bool bInvalidateOnUnlock; // because someone asked - sal_Bool bActive; // not to be confused with set! - sal_Bool* pInCallAliveFlag; // view the Destructor Stack + bool bFlushing; // sal_True during Flush //? + bool bUpdated; // Update_Impl has run + bool bLocked; // No Execute + bool bInvalidateOnUnlock; // because someone asked + bool bActive; // not to be confused with set! + bool* pInCallAliveFlag; // view the Destructor Stack SfxObjectBars_Impl aObjBars[SFX_OBJECTBAR_MAX]; SfxObjectBars_Impl aFixedObjBars[SFX_OBJECTBAR_MAX]; std::vector<sal_uInt32> aChildWins; sal_uInt32 nEventId; // EventId UserEvent - sal_Bool bNoUI; // UI only from Parent Dispatcher - sal_Bool bReadOnly; // Document is ReadOnly - sal_Bool bQuiet; // Only use parent dispatcher - sal_Bool bModal; // Only slots from parent dispatcher + bool bNoUI; // UI only from Parent Dispatcher + bool bReadOnly; // Document is ReadOnly + bool bQuiet; // Only use parent dispatcher + bool bModal; // Only slots from parent dispatcher - sal_Bool bFilterEnabling; // sal_True=filter enabled slots, + sal_Bool bFilterEnabling; // sal_True=filter enabled slots, // 2==ReadOnlyDoc overturned sal_uInt16 nFilterCount; // Number of SIDs in pFilterSIDs const sal_uInt16* pFilterSIDs; // sorted Array of SIDs @@ -170,9 +170,9 @@ bool SfxDispatcher::IsFlushed() const } /** This method performs outstanding push- and pop- commands. For <SfxShell>s, - which are new on the stack, the <SfxShell::Activate(sal_Bool)> is invoked + which are new on the stack, the <SfxShell::Activate(bool)> is invoked with bMDI == sal_True, for SfxShells that are removed from the stack, the - <SfxShell::Deactivate(sal_Bool)> is invoked with bMDI == sal_True + <SfxShell::Deactivate(bool)> is invoked with bMDI == sal_True */ void SfxDispatcher::Flush() { @@ -199,13 +199,13 @@ void SfxDispatcher::Push(SfxShell& rShell) @returns sal_True The SfxShell instance is on the SfxDispatcher. sal_False The SfxShell instance is not on the SfxDispatcher. */ -sal_Bool SfxDispatcher::IsActive(const SfxShell& rShell) +bool SfxDispatcher::IsActive(const SfxShell& rShell) { - return CheckVirtualStack(rShell, sal_True); + return CheckVirtualStack(rShell, true); } -sal_Bool SfxDispatcher::IsLocked( sal_uInt16 ) const +bool SfxDispatcher::IsLocked( sal_uInt16 ) const /* [Description] @@ -225,7 +225,7 @@ sal_Bool SfxDispatcher::IsLocked( sal_uInt16 ) const } -sal_Bool SfxDispatcher::IsAppDispatcher() const +bool SfxDispatcher::IsAppDispatcher() const /* [Description] @@ -234,8 +234,8 @@ sal_Bool SfxDispatcher::IsAppDispatcher() const [Return value] - sal_Bool sal_True it is the application dispatcher. - sal_Fals it is a SfxViewFrame dispatcher. + bool true it is the application dispatcher. + false it is a SfxViewFrame dispatcher. */ { @@ -243,7 +243,7 @@ sal_Bool SfxDispatcher::IsAppDispatcher() const } -int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest &rReq, sal_Bool bRecord ) +int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest &rReq, bool bRecord ) /* [Description] @@ -283,13 +283,13 @@ int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest } // Get all that is needed, because the slot may not have survived the // Execute if it is a 'pseudo slot' for macros or verbs. - sal_Bool bAutoUpdate = rSlot.IsMode(SFX_SLOT_AUTOUPDATE); + bool bAutoUpdate = rSlot.IsMode(SFX_SLOT_AUTOUPDATE); // API-call parentheses and document-lock during the calls { // 'this' must respond in the Destructor - sal_Bool bThisDispatcherAlive = sal_True; - sal_Bool *pOldInCallAliveFlag = pImp->pInCallAliveFlag; + bool bThisDispatcherAlive = true; + bool *pOldInCallAliveFlag = pImp->pInCallAliveFlag; pImp->pInCallAliveFlag = &bThisDispatcherAlive; SfxExecFunc pFunc = rSlot.GetExecFnc(); @@ -303,7 +303,7 @@ int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest if ( pOldInCallAliveFlag ) { // also protect nested stack frames - *pOldInCallAliveFlag = sal_False; + *pOldInCallAliveFlag = false; } // do nothing after this object is dead @@ -350,15 +350,15 @@ void SfxDispatcher::Construct_Impl( SfxDispatcher* pParent ) pImp->pCachedServ1 = 0; pImp->pCachedServ2 = 0; - pImp->bFlushing = sal_False; - pImp->bUpdated = sal_False; - pImp->bLocked = sal_False; - pImp->bActive = sal_False; + pImp->bFlushing = false; + pImp->bUpdated = false; + pImp->bLocked = false; + pImp->bActive = false; pImp->pParent = NULL; - pImp->bNoUI = sal_False; - pImp->bReadOnly = sal_False; - pImp->bQuiet = sal_False; - pImp->bModal = sal_False; + pImp->bNoUI = false; + pImp->bReadOnly = false; + pImp->bQuiet = false; + pImp->bModal = false; pImp->pInCallAliveFlag = 0; pImp->bFilterEnabling = sal_False; pImp->nFilterCount = 0; @@ -367,7 +367,7 @@ void SfxDispatcher::Construct_Impl( SfxDispatcher* pParent ) pImp->pParent = pParent; - pImp->bInvalidateOnUnlock = sal_False; + pImp->bInvalidateOnUnlock = false; for (sal_uInt16 n=0; n<SFX_OBJECTBAR_MAX; n++) pImp->aObjBars[n].nResId = 0; @@ -432,7 +432,7 @@ SfxDispatcher::~SfxDispatcher() // Notify the stack varialbles in Call_Impl if ( pImp->pInCallAliveFlag ) - *pImp->pInCallAliveFlag = sal_False; + *pImp->pInCallAliveFlag = false; // Get bindings and application SfxApplication *pSfxApp = SFX_APP(); @@ -515,7 +515,7 @@ void SfxDispatcher::Pop { OSL_TRACE("Unflushed dispatcher!"); pImp->bFlushed = false; - pImp->bUpdated = sal_False; + pImp->bUpdated = false; // Put bindings to sleep SfxBindings* pBindings = GetBindings(); @@ -572,7 +572,7 @@ IMPL_LINK_INLINE_START( SfxDispatcher, EventHdl_Impl, void *, pvoid ) IMPL_LINK_INLINE_END( SfxDispatcher, EventHdl_Impl, void *, pvoid ) -sal_Bool SfxDispatcher::CheckVirtualStack( const SfxShell& rShell, sal_Bool bDeep ) +bool SfxDispatcher::CheckVirtualStack( const SfxShell& rShell, bool bDeep ) /* [Description] @@ -606,7 +606,7 @@ sal_Bool SfxDispatcher::CheckVirtualStack( const SfxShell& rShell, sal_Bool bDee } } - sal_Bool bReturn; + bool bReturn; if ( bDeep ) bReturn = std::find(aStack.begin(), aStack.end(), &rShell) != aStack.end(); else @@ -708,7 +708,7 @@ SfxViewFrame* SfxDispatcher::GetFrame() const } -void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ ) +void SfxDispatcher::DoActivate_Impl( bool bMDI, SfxViewFrame* /* pOld */ ) /* [Description] @@ -720,7 +720,7 @@ void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ ) <SfxDispatcher::Push(SfxShell&)>. When activating a SfxDispatcher all of the SfxShells located on its stack - are called with the handler <SfxShell::Activate(sal_Bool)>, starting with + are called with the handler <SfxShell::Activate(bool)>, starting with the lowest. */ @@ -734,8 +734,8 @@ void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ ) OSL_TRACE("%s", sTemp.getStr()); DBG_ASSERT( !pImp->bActive, "Activation error" ); #endif - pImp->bActive = sal_True; - pImp->bUpdated = sal_False; + pImp->bActive = true; + pImp->bUpdated = false; SfxBindings* pBindings = GetBindings(); if ( pBindings ) { @@ -786,7 +786,7 @@ void SfxDispatcher::DoParentActivate_Impl() } -void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew ) +void SfxDispatcher::DoDeactivate_Impl( bool bMDI, SfxViewFrame* pNew ) /* [Description] @@ -798,7 +798,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew ) <SfxDispatcher::Pop(SfxShell&)>. When deactivating a SfxDispatcher all of the SfxShells located on its stack - are called with the handler <SfxShell::Deactivate(sal_Bool)>, starting with + are called with the handler <SfxShell::Deactivate(bool)>, starting with the lowest. */ @@ -811,7 +811,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew ) { OSL_TRACE(OStringBuffer("Deactivate Dispatcher").append(reinterpret_cast<sal_Int64>(this)).getStr()); DBG_ASSERT( pImp->bActive, "Deactivate error" ); - pImp->bActive = sal_False; + pImp->bActive = false; if ( pImp->pFrame && !(pImp->pFrame->GetObjectShell()->IsInPlaceActive() ) ) { @@ -839,7 +839,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew ) for ( sal_uInt16 i = 0; i < pImp->aStack.size(); ++i ) (*(pImp->aStack.rbegin() + i))->DoDeactivate_Impl(pImp->pFrame, bMDI); - sal_Bool bHidePopups = bMDI && pImp->pFrame; + bool bHidePopups = bMDI && pImp->pFrame; if ( pNew && pImp->pFrame ) { com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xOldFrame( @@ -849,7 +849,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew ) GetFrame()->GetFrame().GetFrameInterface(), com::sun::star::uno::UNO_QUERY ); if ( xOldFrame == xMyFrame ) - bHidePopups = sal_False; + bHidePopups = false; } if ( bHidePopups ) @@ -881,9 +881,9 @@ int SfxDispatcher::GetShellAndSlot_Impl // the nSlot const SfxSlot** ppSlot, // the SfxSlot, which are currently handled // the nSlot - sal_Bool bOwnShellsOnly, - sal_Bool bModal, // ModalMode - sal_Bool bRealSlot + bool bOwnShellsOnly, + bool bModal, // ModalMode + bool bRealSlot ) /* [Description] @@ -1035,7 +1035,7 @@ const SfxPoolItem* SfxDispatcher::Execute( SfxShell *pShell = 0; const SfxSlot *pSlot = 0; - if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, sal_False, + if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, false, SFX_CALLMODE_MODAL==(nCall&SFX_CALLMODE_MODAL) ) ) { SfxAllItemSet aSet( pShell->GetPool() ); @@ -1089,7 +1089,7 @@ const SfxPoolItem* SfxDispatcher::Execute SfxShell *pShell = 0; const SfxSlot *pSlot = 0; - if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, sal_False, + if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, false, SFX_CALLMODE_MODAL==(eCall&SFX_CALLMODE_MODAL) ) ) { SfxRequest* pReq; @@ -1157,7 +1157,7 @@ const SfxPoolItem* SfxDispatcher::Execute SfxShell *pShell = 0; const SfxSlot *pSlot = 0; - if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, sal_False, + if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, false, SFX_CALLMODE_MODAL==(eCall&SFX_CALLMODE_MODAL) ) ) { SfxAllItemSet aSet( pShell->GetPool() ); @@ -1217,7 +1217,7 @@ const SfxPoolItem* SfxDispatcher::Execute SfxShell *pShell = 0; const SfxSlot *pSlot = 0; - if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, sal_False, + if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, false, SFX_CALLMODE_MODAL==(eCall&SFX_CALLMODE_MODAL) ) ) { SfxAllItemSet aSet( pShell->GetPool() ); @@ -1257,7 +1257,7 @@ IMPL_LINK( SfxDispatcher, PostMsgHandler, SfxRequest*, pReq ) { Flush(); SfxSlotServer aSvr; - if ( _FindServer(pReq->GetSlot(), aSvr, sal_True ) ) // HACK(x), whatever that was supposed to mean + if ( _FindServer(pReq->GetSlot(), aSvr, true ) ) // HACK(x), whatever that was supposed to mean { const SfxSlot *pSlot = aSvr.GetSlot(); SfxShell *pSh = GetShell(aSvr.GetShellLevel()); @@ -1316,7 +1316,7 @@ void SfxDispatcher::SetMenu_Impl() } -void SfxDispatcher::Update_Impl( sal_Bool bForce ) +void SfxDispatcher::Update_Impl( bool bForce ) { SFX_STACK(SfxDispatcher::Update_Impl); @@ -1327,7 +1327,7 @@ void SfxDispatcher::Update_Impl( sal_Bool bForce ) SFX_APP(); // -Wall is this required??? SfxDispatcher *pDisp = this; - sal_Bool bUpdate = bForce; + bool bUpdate = bForce; while ( pDisp && pDisp->pImp->pFrame ) { SfxWorkWindow *pWork = pDisp->pImp->pFrame->GetFrame().GetWorkWindow_Impl(); @@ -1336,7 +1336,7 @@ void SfxDispatcher::Update_Impl( sal_Bool bForce ) { if ( !bUpdate ) bUpdate = !pDisp->pImp->bUpdated; - pDisp->pImp->bUpdated = sal_True; + pDisp->pImp->bUpdated = true; } else break; @@ -1348,11 +1348,11 @@ void SfxDispatcher::Update_Impl( sal_Bool bForce ) return; SfxViewFrame* pTop = pImp->pFrame ? pImp->pFrame->GetTopViewFrame() : NULL; - sal_Bool bUIActive = pTop && pTop->GetBindings().GetDispatcher() == this; + bool bUIActive = pTop && pTop->GetBindings().GetDispatcher() == this; if ( !bUIActive && pTop && GetBindings() == &pTop->GetBindings() ) // keep own tools internally for collecting - GetBindings()->GetDispatcher()->pImp->bUpdated = sal_False; + GetBindings()->GetDispatcher()->pImp->bUpdated = false; com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame; SfxBindings* pBindings = GetBindings(); @@ -1378,7 +1378,7 @@ void SfxDispatcher::Update_Impl( sal_Bool bForce ) if ( xLayoutManager.is() ) xLayoutManager->lock(); - sal_Bool bIsIPActive = pImp->pFrame && pImp->pFrame->GetObjectShell()->IsInPlaceActive(); + bool bIsIPActive = pImp->pFrame && pImp->pFrame->GetObjectShell()->IsInPlaceActive(); SfxInPlaceClient *pClient = pImp->pFrame ? pImp->pFrame->GetViewShell()->GetUIActiveClient() : NULL; if ( bUIActive && /* !bIsIPActive && */ ( !pClient || !pClient->IsObjectUIActive() ) ) SetMenu_Impl(); @@ -1401,13 +1401,13 @@ void SfxDispatcher::Update_Impl( sal_Bool bForce ) pDispat = pDispat->pImp->pParent; } - sal_Bool bIsActive = sal_False; + bool bIsActive = false; SfxDispatcher *pActDispat = pWorkWin->GetBindings().GetDispatcher_Impl(); pDispat = this; while ( pActDispat && !bIsActive ) { if ( pDispat == pActDispat ) - bIsActive = sal_True; + bIsActive = true; pActDispat = pActDispat->pImp->pParent; } @@ -1424,18 +1424,18 @@ void SfxDispatcher::Update_Impl( sal_Bool bForce ) return; } -void SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp, sal_Bool bIsIPOwner, SfxWorkWindow *pTaskWin ) +void SfxDispatcher::_Update_Impl( bool bUIActive, bool bIsMDIApp, bool bIsIPOwner, SfxWorkWindow *pTaskWin ) { SFX_APP(); SfxWorkWindow *pWorkWin = pImp->pFrame->GetFrame().GetWorkWindow_Impl(); - sal_Bool bIsActive = sal_False; - sal_Bool bIsTaskActive = sal_False; + bool bIsActive = false; + bool bIsTaskActive = false; SfxDispatcher *pActDispat = pWorkWin->GetBindings().GetDispatcher_Impl(); SfxDispatcher *pDispat = this; while ( pActDispat && !bIsActive ) { if ( pDispat == pActDispat ) - bIsActive = sal_True; + bIsActive = true; pActDispat = pActDispat->pImp->pParent; } @@ -1462,7 +1462,7 @@ void SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp, sal_Bo SfxInterface *pIFace = pShell->GetInterface(); // don't consider shells if "Hidden" oder "Quiet" - sal_Bool bReadOnlyShell = IsReadOnlyShell_Impl( nShell-1 ); + bool bReadOnlyShell = IsReadOnlyShell_Impl( nShell-1 ); sal_uInt16 nNo; for ( nNo = 0; pIFace && nNo<pIFace->GetObjectBarCount(); ++nNo ) { @@ -1478,16 +1478,16 @@ void SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp, sal_Bo // check for toolboxes that are exclusively for a viewer if ( pImp->pFrame) { - sal_Bool bViewerTbx = SFX_VISIBILITY_VIEWER == ( nPos & SFX_VISIBILITY_VIEWER ); + bool bViewerTbx = SFX_VISIBILITY_VIEWER == ( nPos & SFX_VISIBILITY_VIEWER ); SfxObjectShell* pSh = pImp->pFrame->GetObjectShell(); SFX_ITEMSET_ARG( pSh->GetMedium()->GetItemSet(), pItem, SfxBoolItem, SID_VIEWONLY, false ); - sal_Bool bIsViewer = pItem && pItem->GetValue(); + bool bIsViewer = pItem && pItem->GetValue(); if ( bIsViewer != bViewerTbx ) continue; } // always register toolbars, allows to switch them on - sal_Bool bVisible = pIFace->IsObjectBarVisible(nNo); + bool bVisible = pIFace->IsObjectBarVisible(nNo); if ( !bVisible ) nPos &= SFX_POSITION_MASK; @@ -1579,7 +1579,7 @@ void SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp, sal_Bo while ( pActDispatcher && !bIsTaskActive ) { if ( pDispatcher == pActDispatcher ) - bIsTaskActive = sal_True; + bIsTaskActive = true; pActDispatcher = pActDispatcher->pImp->pParent; } @@ -1614,7 +1614,7 @@ void SfxDispatcher::FlushImpl() pImp->bFlushing = !pImp->bFlushing; if ( !pImp->bFlushing ) { - pImp->bFlushing = sal_True; + pImp->bFlushing = true; DBG_PROFSTOP(SfxDispatcherFlush); return; } @@ -1623,10 +1623,10 @@ void SfxDispatcher::FlushImpl() // Re-build the true stack in the first round std::deque<SfxToDo_Impl> aToDoCopy; - sal_Bool bModify = sal_False; + bool bModify = false; for(std::deque<SfxToDo_Impl>::reverse_iterator i = pImp->aToDoStack.rbegin(); i != pImp->aToDoStack.rend(); ++i) { - bModify = sal_True; + bModify = true; if(i->bPush) { @@ -1673,8 +1673,8 @@ void SfxDispatcher::FlushImpl() InvalidateBindings_Impl( bModify ); } - pImp->bFlushing = sal_False; - pImp->bUpdated = sal_False; // not only when bModify, if Doc/Template-Config + pImp->bFlushing = false; + pImp->bUpdated = false; // not only when bModify, if Doc/Template-Config pImp->bFlushed = true; OSL_TRACE("Successfully flushed dispatcher!"); @@ -1722,7 +1722,7 @@ void SfxDispatcher::FlushImpl() delete i->pCluster; } } - sal_Bool bAwakeBindings = !aToDoCopy.empty(); + bool bAwakeBindings = !aToDoCopy.empty(); if( bAwakeBindings ) aToDoCopy.clear(); @@ -1849,11 +1849,11 @@ sal_Bool SfxDispatcher::IsSlotEnabledByFilter_Impl( sal_uInt16 nSID ) const } -sal_Bool SfxDispatcher::_TryIntercept_Impl +bool SfxDispatcher::_TryIntercept_Impl ( sal_uInt16 nSlot, // Slot-Id to search for SfxSlotServer& rServer, // <SfxSlotServer>-Instance to fill - sal_Bool bSelf + bool bSelf ) { // Maybe the parent is also belongs to a component @@ -1864,11 +1864,11 @@ sal_Bool SfxDispatcher::_TryIntercept_Impl if ( pParent->pImp->pFrame->GetFrame().HasComponent() ) { // Components may be intercepted - if ( pParent->_TryIntercept_Impl( nSlot, rServer, sal_True ) ) + if ( pParent->_TryIntercept_Impl( nSlot, rServer, true ) ) { // The own shells are added to the Shell Level rServer.SetShellLevel( rServer.GetShellLevel() + nLevels ); - return sal_True; + return true; } else // No further Interception @@ -1892,18 +1892,18 @@ sal_Bool SfxDispatcher::_TryIntercept_Impl { rServer.SetSlot(pSlot); rServer.SetShellLevel(0); - return sal_True; + return true; } } - return sal_False; + return false; } -sal_Bool SfxDispatcher::_FindServer +bool SfxDispatcher::_FindServer ( sal_uInt16 nSlot, // Slot-Id to search for SfxSlotServer& rServer, // <SfxSlotServer>-Instance to fill - sal_Bool bModal // Dispite ModalMode + bool bModal // Dispite ModalMode ) /* [Description] @@ -1919,11 +1919,11 @@ sal_Bool SfxDispatcher::_FindServer [Return value] - sal_Bool sal_True - The Slot was found, rServer is valid. + bool true + The Slot was found, rServer is valid. - sal_False - The Slot is currently not served, rServer is invalid. + false + The Slot is currently not served, rServer is invalid. */ { @@ -1932,8 +1932,8 @@ sal_Bool SfxDispatcher::_FindServer // Dispatcher locked? (nevertheless let SID_HELP_PI through) if ( IsLocked(nSlot) ) { - pImp->bInvalidateOnUnlock = sal_True; - return sal_False; + pImp->bInvalidateOnUnlock = true; + return false; } // Count the number of Shells in the linked dispatchers. @@ -1976,7 +1976,7 @@ sal_Bool SfxDispatcher::_FindServer { nSlotEnableMode = IsSlotEnabledByFilter_Impl( nSlot ); if ( 0 == nSlotEnableMode ) - return sal_False; + return false; } // In Quiet-Mode only Parent-Dispatcher @@ -1984,16 +1984,16 @@ sal_Bool SfxDispatcher::_FindServer { if ( pImp->pParent ) { - sal_Bool bRet = pImp->pParent->_FindServer( nSlot, rServer, bModal ); + bool bRet = pImp->pParent->_FindServer( nSlot, rServer, bModal ); rServer.SetShellLevel ( rServer.GetShellLevel() + pImp->aStack.size() ); return bRet; } else - return sal_False; + return false; } - sal_Bool bReadOnly = ( 2 != nSlotEnableMode && pImp->bReadOnly ); + bool bReadOnly = ( 2 != nSlotEnableMode && pImp->bReadOnly ); // search through all the shells of the chained dispatchers // from top to bottom @@ -2005,10 +2005,10 @@ sal_Bool SfxDispatcher::_FindServer const SfxSlot *pSlot = pIFace->GetSlot(nSlot); if ( pSlot && pSlot->nDisableFlags && ( pSlot->nDisableFlags & pObjShell->GetDisableFlags() ) != 0 ) - return sal_False; + return false; if ( pSlot && !( pSlot->nFlags & SFX_SLOT_READONLYDOC ) && bReadOnly ) - return sal_False; + return false; if ( pSlot ) { @@ -2041,15 +2041,15 @@ sal_Bool SfxDispatcher::_FindServer { rServer.SetSlot(pSlot); rServer.SetShellLevel(i); - return sal_True; + return true; } } - return sal_False; + return false; } -sal_Bool SfxDispatcher::_FillState +bool SfxDispatcher::_FillState ( const SfxSlotServer& rSvr, // <Slot-Server> to query SfxItemSet& rState, // <SfxItemSet> to be filled @@ -2073,9 +2073,9 @@ sal_Bool SfxDispatcher::_FillState const SfxSlot *pSlot = rSvr.GetSlot(); if ( pSlot && IsLocked( pSlot->GetSlotId() ) ) { - pImp->bInvalidateOnUnlock = sal_True; + pImp->bInvalidateOnUnlock = true; DBG_PROFSTOP(SfxDispatcherFillState); - return sal_False; + return false; } if ( pSlot ) @@ -2083,7 +2083,7 @@ sal_Bool SfxDispatcher::_FillState DBG_ASSERT(pImp->bFlushed, "Dispatcher not flushed after retrieving slot servers!"); if (!pImp->bFlushed) - return sal_False; + return false; // Determine the object and call the Message of this object SfxShell *pSh = GetShell(rSvr.GetShellLevel()); @@ -2125,11 +2125,11 @@ sal_Bool SfxDispatcher::_FillState #endif DBG_PROFSTOP(SfxDispatcherFillState); - return sal_True; + return true; } DBG_PROFSTOP(SfxDispatcherFillState); - return sal_False; + return false; } SfxPopupMenuManager* SfxDispatcher::Popup( sal_uInt16 nConfigId,Window *pWin, const Point *pPos ) @@ -2190,7 +2190,7 @@ void SfxDispatcher::ExecutePopup( const ResId &rId, Window *pWin, const Point *p } -void SfxDispatcher::Lock( sal_Bool bLock ) +void SfxDispatcher::Lock( bool bLock ) /* [Description] @@ -2205,7 +2205,7 @@ void SfxDispatcher::Lock( sal_Bool bLock ) { if ( pBindings ) pBindings->InvalidateAll(true); - pImp->bInvalidateOnUnlock = sal_False; + pImp->bInvalidateOnUnlock = false; } else if ( pBindings ) pBindings->InvalidateAll(false); @@ -2224,9 +2224,9 @@ sal_uInt32 SfxDispatcher::GetObjectBarId( sal_uInt16 nPos ) const } -void SfxDispatcher::HideUI( sal_Bool bHide ) +void SfxDispatcher::HideUI( bool bHide ) { - sal_Bool bWasHidden = pImp->bNoUI; + bool bWasHidden = pImp->bNoUI; pImp->bNoUI = bHide; if ( pImp->pFrame ) { @@ -2250,21 +2250,21 @@ void SfxDispatcher::HideUI( sal_Bool bHide ) } if ( bHide != bWasHidden ) - Update_Impl( sal_True ); + Update_Impl( true ); } -void SfxDispatcher::SetReadOnly_Impl( sal_Bool bOn ) +void SfxDispatcher::SetReadOnly_Impl( bool bOn ) { pImp->bReadOnly = bOn; } -sal_Bool SfxDispatcher::GetReadOnly_Impl() const +bool SfxDispatcher::GetReadOnly_Impl() const { return pImp->bReadOnly; } -void SfxDispatcher::SetQuietMode_Impl( sal_Bool bOn ) +void SfxDispatcher::SetQuietMode_Impl( bool bOn ) /* [Description] @@ -2283,7 +2283,7 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSlot, const SfxPoolItem* &rp { SfxShell *pShell = 0; const SfxSlot *pSlot = 0; - if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, sal_False, sal_False ) ) + if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, false, false ) ) { rpState = pShell->GetSlotState(nSlot); if ( !rpState ) @@ -2299,7 +2299,7 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, ::com::sun::star::uno:: { SfxShell *pShell = 0; const SfxSlot *pSlot = 0; - if ( GetShellAndSlot_Impl( nSID, &pShell, &pSlot, sal_False, sal_False ) ) + if ( GetShellAndSlot_Impl( nSID, &pShell, &pSlot, false, false ) ) { const SfxPoolItem* pItem( 0 ); @@ -2327,20 +2327,20 @@ SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSID, ::com::sun::star::uno:: return SFX_ITEM_DISABLED; } -sal_Bool SfxDispatcher::IsReadOnlyShell_Impl( sal_uInt16 nShell ) const +bool SfxDispatcher::IsReadOnlyShell_Impl( sal_uInt16 nShell ) const { sal_uInt16 nShellCount = pImp->aStack.size(); if ( nShell < nShellCount ) { SfxShell* pShell = *( pImp->aStack.rbegin() + nShell ); if( pShell->ISA( SfxModule ) || pShell->ISA( SfxApplication ) || pShell->ISA( SfxViewFrame ) ) - return sal_False; + return false; else return pImp->bReadOnly; } else if ( pImp->pParent ) return pImp->pParent->IsReadOnlyShell_Impl( nShell - nShellCount ); - return sal_True; + return true; } void SfxDispatcher::RemoveShell_Impl( SfxShell& rShell ) @@ -2361,14 +2361,14 @@ void SfxDispatcher::RemoveShell_Impl( SfxShell& rShell ) if ( !SFX_APP()->IsDowning() ) { - pImp->bUpdated = sal_False; + pImp->bUpdated = false; pImp->pCachedServ1 = 0; pImp->pCachedServ2 = 0; - InvalidateBindings_Impl(sal_True); + InvalidateBindings_Impl(true); } } -void SfxDispatcher::InvalidateBindings_Impl( sal_Bool bModify ) +void SfxDispatcher::InvalidateBindings_Impl( bool bModify ) { // App-Dispatcher? if ( IsAppDispatcher() ) @@ -2394,7 +2394,7 @@ void SfxDispatcher::InvalidateBindings_Impl( sal_Bool bModify ) } } -sal_Bool SfxDispatcher::IsUpdated_Impl() const +bool SfxDispatcher::IsUpdated_Impl() const { return pImp->bUpdated; } diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index f60ded1c27c4..9aea0123d8d3 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -194,7 +194,7 @@ SfxRequest::SfxRequest pImp->nCallMode = SFX_CALLMODE_SYNCHRON; pImp->bUseTarget = sal_False; pImp->pViewFrame = pViewFrame; - if( pImp->pViewFrame->GetDispatcher()->GetShellAndSlot_Impl( nSlotId, &pImp->pShell, &pImp->pSlot, sal_True, sal_True ) ) + if( pImp->pViewFrame->GetDispatcher()->GetShellAndSlot_Impl( nSlotId, &pImp->pShell, &pImp->pSlot, true, true ) ) { pImp->SetPool( &pImp->pShell->GetPool() ); pImp->xRecorder = SfxRequest::GetMacroRecorder( pViewFrame ); diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index 215d3d1861dc..c10a49676818 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -1125,7 +1125,7 @@ sal_Bool SfxShell::HasUIFeature( sal_uInt32 ) long DispatcherUpdate_Impl( void*, void* pArg ) { - ((SfxDispatcher*) pArg)->Update_Impl( sal_True ); + ((SfxDispatcher*) pArg)->Update_Impl( true ); ((SfxDispatcher*) pArg)->GetBindings()->InvalidateAll(false); return 0; } diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx index 129e94f7373f..82203b286a29 100644 --- a/sfx2/source/control/statcach.cxx +++ b/sfx2/source/control/statcach.cxx @@ -242,7 +242,7 @@ const SfxSlotServer* SfxStateCache::GetSlotServer( SfxDispatcher &rDispat , cons if ( bSlotDirty ) { // get the SlotServer; we need it for internal controllers anyway, but also in most cases - rDispat._FindServer( nId, aSlotServ, sal_False ); + rDispat._FindServer( nId, aSlotServ, false ); DBG_ASSERT( !pDispatch, "Old Dispatch not removed!" ); diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index afd5cafa51f0..5961757dcde9 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -699,8 +699,8 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util if ( !pDispatcher->IsLocked( GetId() ) ) { const SfxSlot *pSlot = 0; - if ( pDispatcher->GetShellAndSlot_Impl( GetId(), &pShell, &pSlot, sal_False, - SFX_CALLMODE_MODAL==(nCall&SFX_CALLMODE_MODAL), sal_False ) ) + if ( pDispatcher->GetShellAndSlot_Impl( GetId(), &pShell, &pSlot, false, + SFX_CALLMODE_MODAL==(nCall&SFX_CALLMODE_MODAL), false ) ) { if ( bMasterSlave ) { diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index a92eb648523e..121534edafb7 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -199,7 +199,7 @@ SfxDocumentInfoItem::SfxDocumentInfoItem() : SfxStringItem() , m_AutoloadDelay(0) , m_AutoloadURL() - , m_isAutoloadEnabled(sal_False) + , m_isAutoloadEnabled(false) , m_DefaultTarget() , m_TemplateName() , m_Author() @@ -214,9 +214,9 @@ SfxDocumentInfoItem::SfxDocumentInfoItem() , m_Keywords() , m_Subject() , m_Title() - , m_bHasTemplate( sal_True ) - , m_bDeleteUserData( sal_False ) - , m_bUseUserData( sal_True ) + , m_bHasTemplate( true ) + , m_bDeleteUserData( false ) + , m_bUseUserData( true ) { } @@ -225,7 +225,7 @@ SfxDocumentInfoItem::SfxDocumentInfoItem() SfxDocumentInfoItem::SfxDocumentInfoItem( const OUString& rFile, const uno::Reference<document::XDocumentProperties>& i_xDocProps, const uno::Sequence<document::CmisProperty>& i_cmisProps, - sal_Bool bIs ) + bool bIs ) : SfxStringItem( SID_DOCINFO, rFile ) , m_AutoloadDelay( i_xDocProps->getAutoloadSecs() ) , m_AutoloadURL( i_xDocProps->getAutoloadURL() ) @@ -245,8 +245,8 @@ SfxDocumentInfoItem::SfxDocumentInfoItem( const OUString& rFile, i_xDocProps->getKeywords()) ) , m_Subject( i_xDocProps->getSubject() ) , m_Title( i_xDocProps->getTitle() ) - , m_bHasTemplate( sal_True ) - , m_bDeleteUserData( sal_False ) + , m_bHasTemplate( true ) + , m_bDeleteUserData( false ) , m_bUseUserData( bIs ) { try @@ -446,22 +446,22 @@ void SfxDocumentInfoItem::UpdateDocumentInfo( } -sal_Bool SfxDocumentInfoItem::IsDeleteUserData() const +bool SfxDocumentInfoItem::IsDeleteUserData() const { return m_bDeleteUserData; } -void SfxDocumentInfoItem::SetDeleteUserData( sal_Bool bSet ) +void SfxDocumentInfoItem::SetDeleteUserData( bool bSet ) { m_bDeleteUserData = bSet; } -sal_Bool SfxDocumentInfoItem::IsUseUserData() const +bool SfxDocumentInfoItem::IsUseUserData() const { return m_bUseUserData; } -void SfxDocumentInfoItem::SetUseUserData( sal_Bool bSet ) +void SfxDocumentInfoItem::SetUseUserData( bool bSet ) { m_bUseUserData = bSet; } @@ -764,8 +764,8 @@ namespace SfxDocumentPage::SfxDocumentPage(Window* pParent, const SfxItemSet& rItemSet) : SfxTabPage(pParent, "DocumentInfoPage", "sfx/ui/documentinfopage.ui", rItemSet) - , bEnableUseUserData( sal_False ) - , bHandleDelete( sal_False ) + , bEnableUseUserData( false ) + , bHandleDelete( false ) { get(m_pBmp, "icon"); get(m_pNameED, "nameed"); @@ -828,7 +828,7 @@ IMPL_LINK_NOARG(SfxDocumentPage, DeleteHdl) const Time aTime( 0 ); m_pTimeLogValFt->SetText( rLocaleWrapper.getDuration( aTime ) ); m_pDocNoValFt->SetText(OUString('1')); - bHandleDelete = sal_True; + bHandleDelete = true; return 0; } @@ -934,7 +934,7 @@ SfxTabPage* SfxDocumentPage::Create( Window* pParent, const SfxItemSet& rItemSet void SfxDocumentPage::EnableUseUserData() { - bEnableUseUserData = sal_True; + bEnableUseUserData = true; m_pUseUserDataCB->Show(); m_pDeleteBtn->Show(); } @@ -977,7 +977,7 @@ sal_Bool SfxDocumentPage::FillItemSet( SfxItemSet& rSet ) m_pInfoItem->SetUseUserData( TRISTATE_TRUE == m_pUseUserDataCB->GetState() ); newItem.SetUseUserData( TRISTATE_TRUE == m_pUseUserDataCB->GetState() ); - newItem.SetDeleteUserData( sal_True ); + newItem.SetDeleteUserData( true ); rSet.Put( newItem ); bRet = sal_True; } @@ -1123,7 +1123,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet ) m_pUseUserDataCB->SetState( eState ); m_pUseUserDataCB->SaveValue(); m_pUseUserDataCB->Enable( bEnableUseUserData ); - bHandleDelete = sal_False; + bHandleDelete = false; m_pDeleteBtn->Enable( bEnableUseUserData ); } diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 122401419b19..a75af8c22a3a 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -1840,20 +1840,20 @@ void SfxDockingWindow::Reappear_Impl() } } -sal_Bool SfxDockingWindow::IsAutoHide_Impl() const +bool SfxDockingWindow::IsAutoHide_Impl() const { if ( pImp->pSplitWin ) return !pImp->pSplitWin->IsFadeIn(); else - return sal_False; + return false; } -void SfxDockingWindow::AutoShow( sal_Bool bShow ) +void SfxDockingWindow::AutoShow( bool bShow ) { AutoShow_Impl(bShow); } -void SfxDockingWindow::AutoShow_Impl( sal_Bool bShow ) +void SfxDockingWindow::AutoShow_Impl( bool bShow ) { if ( pImp->pSplitWin ) { @@ -1864,7 +1864,7 @@ void SfxDockingWindow::AutoShow_Impl( sal_Bool bShow ) } } -void SfxDockingWindow::FadeIn( sal_Bool /*bFadeIn*/ ) +void SfxDockingWindow::FadeIn( bool /*bFadeIn*/ ) { } diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index d88990951097..6a275ddd8d30 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -88,7 +88,7 @@ struct SfxObjectFactory_Impl -SfxFilterContainer* SfxObjectFactory::GetFilterContainer( sal_Bool /*bForceLoad*/ ) const +SfxFilterContainer* SfxObjectFactory::GetFilterContainer( bool /*bForceLoad*/ ) const { return pImpl->pFilterContainer; } diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 786ed55b6b70..fc4e07ebb8a1 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -424,13 +424,13 @@ void SfxMedium::CheckFileDate( const util::DateTime& aInitDate ) } -sal_Bool SfxMedium::DocNeedsFileDateCheck() +bool SfxMedium::DocNeedsFileDateCheck() { return ( !IsReadOnly() && ::utl::LocalFileHelper::IsLocalFile( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) ); } -util::DateTime SfxMedium::GetInitFileDate( sal_Bool bIgnoreOldValue ) +util::DateTime SfxMedium::GetInitFileDate( bool bIgnoreOldValue ) { if ( ( bIgnoreOldValue || !pImp->m_bGotDateTime ) && !pImp->m_aLogicName.isEmpty() ) { @@ -631,13 +631,13 @@ SvStream* SfxMedium::GetOutStream() } -sal_Bool SfxMedium::CloseOutStream() +bool SfxMedium::CloseOutStream() { CloseOutStream_Impl(); return true; } -sal_Bool SfxMedium::CloseOutStream_Impl() +bool SfxMedium::CloseOutStream_Impl() { if ( pImp->m_pOutStream ) { @@ -691,7 +691,7 @@ void SfxMedium::CreateFileStream() } -sal_Bool SfxMedium::Commit() +bool SfxMedium::Commit() { if( pImp->xStorage.is() ) StorageCommit_Impl(); @@ -717,7 +717,7 @@ sal_Bool SfxMedium::Commit() } -sal_Bool SfxMedium::IsStorage() +bool SfxMedium::IsStorage() { if ( pImp->xStorage.is() ) return true; @@ -747,7 +747,7 @@ sal_Bool SfxMedium::IsStorage() } -sal_Bool SfxMedium::IsPreview_Impl() +bool SfxMedium::IsPreview_Impl() { bool bPreview = false; SFX_ITEMSET_ARG( GetItemSet(), pPreview, SfxBoolItem, SID_PREVIEW, false); @@ -867,7 +867,7 @@ void SfxMedium::SetEncryptionDataToStorage_Impl() // not for some URL scheme belongs in UCB, not here. -sal_Int8 SfxMedium::ShowLockedDocumentDialog( const uno::Sequence< OUString >& aData, sal_Bool bIsLoading, sal_Bool bOwnLock ) +sal_Int8 SfxMedium::ShowLockedDocumentDialog( const uno::Sequence< OUString >& aData, bool bIsLoading, bool bOwnLock ) { sal_Int8 nResult = LOCK_UI_NOLOCK; @@ -993,7 +993,7 @@ namespace // sets SID_DOC_READONLY if the document cannot be opened for editing // if user cancel the loading the ERROR_ABORT is set -void SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI ) +void SfxMedium::LockOrigFileOnDemand( bool bLoading, bool bNoUI ) { #if !HAVE_FEATURE_MULTIUSER_ENVIRONMENT (void) bLoading; @@ -1237,7 +1237,7 @@ void SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI ) } -uno::Reference < embed::XStorage > SfxMedium::GetStorage( sal_Bool bCreateTempIfNo ) +uno::Reference < embed::XStorage > SfxMedium::GetStorage( bool bCreateTempIfNo ) { if ( pImp->xStorage.is() || pImp->m_bTriedStorage ) return pImp->xStorage; @@ -1404,7 +1404,7 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( sal_Bool bCreateTempIf } -uno::Reference< embed::XStorage > SfxMedium::GetZipStorageToSign_Impl( sal_Bool bReadOnly ) +uno::Reference< embed::XStorage > SfxMedium::GetZipStorageToSign_Impl( bool bReadOnly ) { if ( !GetError() && !pImp->m_xZipStorage.is() ) { @@ -1473,12 +1473,12 @@ void SfxMedium::CloseStorage() pImp->bIsStorage = false; } -void SfxMedium::CanDisposeStorage_Impl( sal_Bool bDisposeStorage ) +void SfxMedium::CanDisposeStorage_Impl( bool bDisposeStorage ) { pImp->bDisposeStorage = bDisposeStorage; } -sal_Bool SfxMedium::WillDisposeStorageOnClose_Impl() +bool SfxMedium::WillDisposeStorageOnClose_Impl() { return pImp->bDisposeStorage; } @@ -1489,7 +1489,7 @@ StreamMode SfxMedium::GetOpenMode() const } void SfxMedium::SetOpenMode( StreamMode nStorOpen, - sal_Bool bDontClose ) + bool bDontClose ) { if ( pImp->m_nStorOpenMode != nStorOpen ) { @@ -1506,7 +1506,7 @@ void SfxMedium::SetOpenMode( StreamMode nStorOpen, } -sal_Bool SfxMedium::UseBackupToRestore_Impl( ::ucbhelper::Content& aOriginalContent, +bool SfxMedium::UseBackupToRestore_Impl( ::ucbhelper::Content& aOriginalContent, const Reference< ::com::sun::star::ucb::XCommandEnvironment >& xComEnv ) { try @@ -1530,7 +1530,7 @@ sal_Bool SfxMedium::UseBackupToRestore_Impl( ::ucbhelper::Content& aOriginalCont } -sal_Bool SfxMedium::StorageCommit_Impl() +bool SfxMedium::StorageCommit_Impl() { bool bResult = false; Reference< ::com::sun::star::ucb::XCommandEnvironment > xDummyEnv; @@ -1589,7 +1589,7 @@ sal_Bool SfxMedium::StorageCommit_Impl() } -sal_Bool SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource, +bool SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource, const INetURLObject& aDest, const Reference< ::com::sun::star::ucb::XCommandEnvironment >& xComEnv ) { @@ -1715,7 +1715,7 @@ sal_Bool SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource, } -sal_Bool SfxMedium::TryDirectTransfer( const OUString& aURL, SfxItemSet& aTargetSet ) +bool SfxMedium::TryDirectTransfer( const OUString& aURL, SfxItemSet& aTargetSet ) { if ( GetError() ) return false; @@ -2410,20 +2410,20 @@ void SfxMedium::GetMedium_Impl() } -sal_Bool SfxMedium::IsRemote() +bool SfxMedium::IsRemote() { return pImp->m_bRemote; } -void SfxMedium::SetUpdatePickList(sal_Bool bVal) +void SfxMedium::SetUpdatePickList(bool bVal) { pImp->bUpdatePickList = bVal; } -sal_Bool SfxMedium::IsUpdatePickList() const +bool SfxMedium::IsUpdatePickList() const { return pImp->bUpdatePickList; } @@ -2544,7 +2544,7 @@ SfxMedium::SfxMedium() : pImp(new SfxMedium_Impl(this)) -void SfxMedium::UseInteractionHandler( sal_Bool bUse ) +void SfxMedium::UseInteractionHandler( bool bUse ) { pImp->bAllowDefaultIntHdl = bUse; } @@ -2584,7 +2584,7 @@ SfxMedium::GetInteractionHandler() -void SfxMedium::SetFilter( const SfxFilter* pFilterP, sal_Bool /*bResetOrig*/ ) +void SfxMedium::SetFilter( const SfxFilter* pFilterP, bool /*bResetOrig*/ ) { pImp->m_pFilter = pFilterP; } @@ -2596,14 +2596,14 @@ const SfxFilter* SfxMedium::GetFilter() const -const SfxFilter* SfxMedium::GetOrigFilter( sal_Bool bNotCurrent ) const +const SfxFilter* SfxMedium::GetOrigFilter( bool bNotCurrent ) const { return ( pImp->pOrigFilter || bNotCurrent ) ? pImp->pOrigFilter : pImp->m_pFilter; } -sal_uInt32 SfxMedium::CreatePasswordToModifyHash( const OUString& aPasswd, sal_Bool bWriter ) +sal_uInt32 SfxMedium::CreatePasswordToModifyHash( const OUString& aPasswd, bool bWriter ) { sal_uInt32 nHash = 0; @@ -2649,7 +2649,7 @@ void SfxMedium::CloseAndRelease() UnlockFile( true ); } -void SfxMedium::UnlockFile( sal_Bool bReleaseLockStream ) +void SfxMedium::UnlockFile( bool bReleaseLockStream ) { #if !HAVE_FEATURE_MULTIUSER_ENVIRONMENT (void) bReleaseLockStream; @@ -2764,7 +2764,7 @@ void SfxMedium::SetIsRemote_Impl() -void SfxMedium::SetName( const OUString& aNameP, sal_Bool bSetOrigURL ) +void SfxMedium::SetName( const OUString& aNameP, bool bSetOrigURL ) { if (pImp->aOrigURL.isEmpty()) pImp->aOrigURL = pImp->m_aLogicName; @@ -3028,13 +3028,13 @@ void SfxMedium::SetExpired_Impl( const DateTime& rDateTime ) } -sal_Bool SfxMedium::IsExpired() const +bool SfxMedium::IsExpired() const { return pImp->aExpireTime.IsValidAndGregorian() && pImp->aExpireTime < DateTime( DateTime::SYSTEM ); } -void SfxMedium::ForceSynchronStream_Impl( sal_Bool bForce ) +void SfxMedium::ForceSynchronStream_Impl( bool bForce ) { if( pImp->m_pInStream ) { @@ -3050,7 +3050,7 @@ SfxFrame* SfxMedium::GetLoadTargetFrame() const return pImp->wLoadTargetFrame; } -void SfxMedium::setStreamToLoadFrom(const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream,sal_Bool bIsReadOnly ) +void SfxMedium::setStreamToLoadFrom(const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xInputStream, bool bIsReadOnly ) { pImp->m_xInputStreamToLoadFrom = xInputStream; pImp->m_bInputStreamIsReadOnly = bIsReadOnly; @@ -3180,7 +3180,7 @@ sal_uInt16 SfxMedium::AddVersion_Impl( util::RevisionTag& rRevision ) return 0; } -sal_Bool SfxMedium::RemoveVersion_Impl( const OUString& rName ) +bool SfxMedium::RemoveVersion_Impl( const OUString& rName ) { if ( !pImp->aVersions.getLength() ) return false; @@ -3200,7 +3200,7 @@ sal_Bool SfxMedium::RemoveVersion_Impl( const OUString& rName ) return false; } -sal_Bool SfxMedium::TransferVersionList_Impl( SfxMedium& rMedium ) +bool SfxMedium::TransferVersionList_Impl( SfxMedium& rMedium ) { if ( rMedium.pImp->aVersions.getLength() ) { @@ -3211,7 +3211,7 @@ sal_Bool SfxMedium::TransferVersionList_Impl( SfxMedium& rMedium ) return false; } -sal_Bool SfxMedium::SaveVersionList_Impl( sal_Bool /*bUseXML*/ ) +bool SfxMedium::SaveVersionList_Impl( bool /*bUseXML*/ ) { if ( GetStorage().is() ) { @@ -3234,7 +3234,7 @@ sal_Bool SfxMedium::SaveVersionList_Impl( sal_Bool /*bUseXML*/ ) } -sal_Bool SfxMedium::IsReadOnly() +bool SfxMedium::IsReadOnly() { // a) ReadOnly filter cant produce read/write contents! bool bReadOnly = ( @@ -3263,7 +3263,7 @@ bool SfxMedium::IsOriginallyReadOnly() const } -sal_Bool SfxMedium::SetWritableForUserOnly( const OUString& aURL ) +bool SfxMedium::SetWritableForUserOnly( const OUString& aURL ) { // UCB does not allow to allow write access only for the user, // use osl API @@ -3293,7 +3293,7 @@ sal_Bool SfxMedium::SetWritableForUserOnly( const OUString& aURL ) } -void SfxMedium::CreateTempFile( sal_Bool bReplace ) +void SfxMedium::CreateTempFile( bool bReplace ) { if ( pImp->pTempFile ) { @@ -3416,7 +3416,7 @@ void SfxMedium::CreateTempFileNoCopy() CloseStorage(); } -sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const OUString& aODFVersion, sal_Bool bHasValidDocumentSignature ) +bool SfxMedium::SignContents_Impl( bool bScriptingContent, const OUString& aODFVersion, bool bHasValidDocumentSignature ) { bool bChanges = false; @@ -3537,12 +3537,12 @@ void SfxMedium::SetCachedSignatureState_Impl( sal_uInt16 nState ) pImp->m_nSignatureState = nState; } -sal_Bool SfxMedium::HasStorage_Impl() const +bool SfxMedium::HasStorage_Impl() const { return pImp->xStorage.is(); } -sal_Bool SfxMedium::IsOpen() const +bool SfxMedium::IsOpen() const { return pImp->m_pInStream || pImp->m_pOutStream || pImp->xStorage.is(); } @@ -3589,7 +3589,7 @@ OUString SfxMedium::CreateTempCopyWithExt( const OUString& aURL ) return aResult; } -sal_Bool SfxMedium::CallApproveHandler( const uno::Reference< task::XInteractionHandler >& xHandler, uno::Any aRequest, sal_Bool bAllowAbort ) +bool SfxMedium::CallApproveHandler( const uno::Reference< task::XInteractionHandler >& xHandler, uno::Any aRequest, bool bAllowAbort ) { bool bResult = false; @@ -3694,7 +3694,7 @@ OUString SfxMedium::SwitchDocumentToTempFile() return aResult; } -sal_Bool SfxMedium::SwitchDocumentToFile( const OUString& aURL ) +bool SfxMedium::SwitchDocumentToFile( const OUString& aURL ) { // the method is only for storage based documents bool bResult = false; diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index 0b226d33ac56..6c57bd3882f0 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -90,7 +90,7 @@ SfxMedium* DocumentInserter::CreateMedium() pMedium = new SfxMedium( sURL, SFX_STREAM_READONLY, SFX_APP()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_pItemSet ); - pMedium->UseInteractionHandler( sal_True ); + pMedium->UseInteractionHandler( true ); SfxFilterMatcher* pMatcher = NULL; if ( !m_sDocFactory.isEmpty() ) pMatcher = new SfxFilterMatcher( m_sDocFactory ); @@ -124,7 +124,7 @@ SfxMediumList* DocumentInserter::CreateMediumList() *i, SFX_STREAM_READONLY, SFX_APP()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_pItemSet ); - pMedium->UseInteractionHandler( sal_True ); + pMedium->UseInteractionHandler( true ); SfxFilterMatcher aMatcher( m_sDocFactory ); const SfxFilter* pFilter = NULL; diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx index 5752b6cb1d0a..01044c276ff9 100644 --- a/sfx2/source/doc/docmacromode.cxx +++ b/sfx2/source/doc/docmacromode.cxx @@ -98,7 +98,7 @@ namespace sfx2 ErrorCodeRequest aErrorCodeRequest; aErrorCodeRequest.ErrCode = nSfxErrorCode; - SfxMedium::CallApproveHandler( rxHandler, makeAny( aErrorCodeRequest ), sal_False ); + SfxMedium::CallApproveHandler( rxHandler, makeAny( aErrorCodeRequest ), false ); rbAlreadyShown = sal_True; } @@ -124,7 +124,7 @@ namespace sfx2 { DocumentMacroConfirmationRequest aRequest; aRequest.DocumentURL = rDocumentLocation; - return SfxMedium::CallApproveHandler( rxHandler, makeAny( aRequest ), sal_True ); + return SfxMedium::CallApproveHandler( rxHandler, makeAny( aRequest ), true ); } } @@ -143,21 +143,21 @@ namespace sfx2 } - sal_Bool DocumentMacroMode::allowMacroExecution() + bool DocumentMacroMode::allowMacroExecution() { m_pData->m_rDocumentAccess.setCurrentMacroExecMode( MacroExecMode::ALWAYS_EXECUTE_NO_WARN ); - return sal_True; + return true; } - sal_Bool DocumentMacroMode::disallowMacroExecution() + bool DocumentMacroMode::disallowMacroExecution() { m_pData->m_rDocumentAccess.setCurrentMacroExecMode( MacroExecMode::NEVER_EXECUTE ); - return sal_False; + return false; } - sal_Bool DocumentMacroMode::adjustMacroMode( const Reference< XInteractionHandler >& rxInteraction ) + bool DocumentMacroMode::adjustMacroMode( const Reference< XInteractionHandler >& rxInteraction ) { sal_uInt16 nMacroExecutionMode = m_pData->m_rDocumentAccess.getCurrentMacroExecMode(); @@ -209,10 +209,10 @@ namespace sfx2 } if ( nMacroExecutionMode == MacroExecMode::NEVER_EXECUTE ) - return sal_False; + return false; if ( nMacroExecutionMode == MacroExecMode::ALWAYS_EXECUTE_NO_WARN ) - return sal_True; + return true; try { @@ -309,15 +309,15 @@ namespace sfx2 } - sal_Bool DocumentMacroMode::isMacroExecutionDisallowed() const + bool DocumentMacroMode::isMacroExecutionDisallowed() const { return m_pData->m_rDocumentAccess.getCurrentMacroExecMode() == MacroExecMode::NEVER_EXECUTE; } - sal_Bool DocumentMacroMode::containerHasBasicMacros( const Reference< XLibraryContainer >& xContainer ) + bool DocumentMacroMode::containerHasBasicMacros( const Reference< XLibraryContainer >& xContainer ) { - sal_Bool bHasMacroLib = sal_False; + bool bHasMacroLib = false; try { if ( xContainer.is() ) @@ -327,7 +327,7 @@ namespace sfx2 // if there are libraries except the "Standard" library // we assume that they are not empty (because they have been created by the user) if ( !xContainer->hasElements() ) - bHasMacroLib = sal_False; + bHasMacroLib = false; else { OUString aStdLibName( "Standard" ); @@ -345,10 +345,10 @@ namespace sfx2 Any aAny = xContainer->getByName( aStdLibName ); aAny >>= xLib; if ( xLib.is() && xLib->hasElements() ) - return sal_True; + return true; } else - return sal_True; + return true; } } } @@ -362,9 +362,9 @@ namespace sfx2 } - sal_Bool DocumentMacroMode::hasMacroLibrary() const + bool DocumentMacroMode::hasMacroLibrary() const { - sal_Bool bHasMacroLib = sal_False; + bool bHasMacroLib = false; #ifndef DISABLE_SCRIPTING try { @@ -384,9 +384,9 @@ namespace sfx2 } - sal_Bool DocumentMacroMode::storageHasMacros( const Reference< XStorage >& rxStorage ) + bool DocumentMacroMode::storageHasMacros( const Reference< XStorage >& rxStorage ) { - sal_Bool bHasMacros = sal_False; + bool bHasMacros = false; if ( rxStorage.is() ) { try @@ -411,9 +411,9 @@ namespace sfx2 } - sal_Bool DocumentMacroMode::checkMacrosOnLoading( const Reference< XInteractionHandler >& rxInteraction ) + bool DocumentMacroMode::checkMacrosOnLoading( const Reference< XInteractionHandler >& rxInteraction ) { - sal_Bool bAllow = sal_False; + bool bAllow = false; if ( SvtSecurityOptions().IsMacroDisabled() ) { // no macro should be executed at all diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index 2ad4321e7432..832faee8dd6d 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -538,13 +538,13 @@ OUString SfxDocumentTemplates::ConvertResourceString ( -sal_Bool SfxDocumentTemplates::CopyOrMove +bool SfxDocumentTemplates::CopyOrMove ( sal_uInt16 nTargetRegion, // Target Region Index sal_uInt16 nTargetIdx, // Target position Index sal_uInt16 nSourceRegion, // Source Region Index sal_uInt16 nSourceIdx, /* Index to be copied / to moved template */ - sal_Bool bMove // Copy / Move + bool bMove // Copy / Move ) /* [Description] @@ -575,29 +575,29 @@ sal_Bool SfxDocumentTemplates::CopyOrMove DocTemplLocker_Impl aLocker( *pImp ); if ( !pImp->Construct() ) - return sal_False; + return false; // Don't copy or move any folders if( nSourceIdx == USHRT_MAX ) - return sal_False ; + return false ; if ( nSourceRegion == nTargetRegion ) { SAL_WARN( "sfx.doc", "Don't know, what to do!" ); - return sal_False; + return false; } RegionData_Impl *pSourceRgn = pImp->GetRegion( nSourceRegion ); if ( !pSourceRgn ) - return sal_False; + return false; DocTempl_EntryData_Impl *pSource = pSourceRgn->GetEntry( nSourceIdx ); if ( !pSource ) - return sal_False; + return false; RegionData_Impl *pTargetRgn = pImp->GetRegion( nTargetRegion ); if ( !pTargetRgn ) - return sal_False; + return false; OUString aTitle = pSource->GetTitle(); @@ -609,7 +609,7 @@ sal_Bool SfxDocumentTemplates::CopyOrMove { OUString aNewTargetURL = GetTemplateTargetURLFromComponent( pTargetRgn->GetTitle(), aTitle ); if ( aNewTargetURL.isEmpty() ) - return sal_False; + return false; if ( bMove ) { @@ -621,7 +621,7 @@ sal_Bool SfxDocumentTemplates::CopyOrMove else { if ( xTemplates->removeTemplate( pTargetRgn->GetTitle(), aTitle ) ) - return sal_False; // will trigger tetry with copy instead of move + return false; // will trigger tetry with copy instead of move // if it is not possible to remove just created template ( must be possible! ) // it is better to report success here, since at least the copy has succeeded @@ -633,18 +633,18 @@ sal_Bool SfxDocumentTemplates::CopyOrMove size_t temp_nTargetIdx = nTargetIdx; pTargetRgn->AddEntry( aTitle, aNewTargetURL, &temp_nTargetIdx ); - return sal_True; + return true; } // --**-- if the current file is opened, // it must be re-opened afterwards. - return sal_False; + return false; } -sal_Bool SfxDocumentTemplates::Move +bool SfxDocumentTemplates::Move ( sal_uInt16 nTargetRegion, // Target Region Index sal_uInt16 nTargetIdx, // Target position Index @@ -669,12 +669,12 @@ sal_Bool SfxDocumentTemplates::Move DocTemplLocker_Impl aLocker( *pImp ); return CopyOrMove( nTargetRegion, nTargetIdx, - nSourceRegion, nSourceIdx, sal_True ); + nSourceRegion, nSourceIdx, true ); } -sal_Bool SfxDocumentTemplates::Copy +bool SfxDocumentTemplates::Copy ( sal_uInt16 nTargetRegion, // Target Region Index sal_uInt16 nTargetIdx, // Target position Index @@ -700,12 +700,12 @@ sal_Bool SfxDocumentTemplates::Copy DocTemplLocker_Impl aLocker( *pImp ); return CopyOrMove( nTargetRegion, nTargetIdx, - nSourceRegion, nSourceIdx, sal_False ); + nSourceRegion, nSourceIdx, false ); } -sal_Bool SfxDocumentTemplates::CopyTo +bool SfxDocumentTemplates::CopyTo ( sal_uInt16 nRegion, // Region of the template to be exported sal_uInt16 nIdx, // Index of the template to be exported @@ -731,15 +731,15 @@ sal_Bool SfxDocumentTemplates::CopyTo DocTemplLocker_Impl aLocker( *pImp ); if ( ! pImp->Construct() ) - return sal_False; + return false; RegionData_Impl *pSourceRgn = pImp->GetRegion( nRegion ); if ( !pSourceRgn ) - return sal_False; + return false; DocTempl_EntryData_Impl *pSource = pSourceRgn->GetEntry( nIdx ); if ( !pSource ) - return sal_False; + return false; INetURLObject aTargetURL( rName ); @@ -768,16 +768,16 @@ sal_Bool SfxDocumentTemplates::CopyTo aTarget.executeCommand( aCmd, aArg ); } catch ( ContentCreationException& ) - { return sal_False; } + { return false; } catch ( Exception& ) - { return sal_False; } + { return false; } - return sal_True; + return true; } -sal_Bool SfxDocumentTemplates::CopyFrom +bool SfxDocumentTemplates::CopyFrom ( sal_uInt16 nRegion, /* Region in which the template is to be imported */ @@ -806,19 +806,19 @@ sal_Bool SfxDocumentTemplates::CopyFrom DocTemplLocker_Impl aLocker( *pImp ); if ( ! pImp->Construct() ) - return sal_False; + return false; RegionData_Impl *pTargetRgn = pImp->GetRegion( nRegion ); if ( !pTargetRgn ) - return sal_False; + return false; uno::Reference< XDocumentTemplates > xTemplates = pImp->getDocTemplates(); if ( !xTemplates.is() ) - return sal_False; + return false; OUString aTitle; - sal_Bool bTemplateAdded = sal_False; + bool bTemplateAdded = false; if( pImp->GetTitleFromURL( rName, aTitle ) ) { @@ -904,7 +904,7 @@ sal_Bool SfxDocumentTemplates::CopyFrom size_t temp_nIdx = nIdx; pTargetRgn->AddEntry( aTitle, aTemplName, &temp_nIdx ); rName = aTitle; - return sal_True; + return true; } else { @@ -917,12 +917,12 @@ sal_Bool SfxDocumentTemplates::CopyFrom } } - return sal_False; + return false; } -sal_Bool SfxDocumentTemplates::Delete +bool SfxDocumentTemplates::Delete ( sal_uInt16 nRegion, // Region Index sal_uInt16 nIdx /* Index of the entry or USHRT_MAX, @@ -952,12 +952,12 @@ sal_Bool SfxDocumentTemplates::Delete Then remove the data from the lists */ if ( ! pImp->Construct() ) - return sal_False; + return false; RegionData_Impl *pRegion = pImp->GetRegion( nRegion ); if ( !pRegion ) - return sal_False; + return false; sal_Bool bRet; uno::Reference< XDocumentTemplates > xTemplates = pImp->getDocTemplates(); @@ -973,7 +973,7 @@ sal_Bool SfxDocumentTemplates::Delete DocTempl_EntryData_Impl *pEntry = pRegion->GetEntry( nIdx ); if ( !pEntry ) - return sal_False; + return false; bRet = xTemplates->removeTemplate( pRegion->GetTitle(), pEntry->GetTitle() ); @@ -986,7 +986,7 @@ sal_Bool SfxDocumentTemplates::Delete -sal_Bool SfxDocumentTemplates::InsertDir +bool SfxDocumentTemplates::InsertDir ( const OUString& rText, // the logical name of the new Region sal_uInt16 nRegion // Region Index @@ -1009,12 +1009,12 @@ sal_Bool SfxDocumentTemplates::InsertDir DocTemplLocker_Impl aLocker( *pImp ); if ( ! pImp->Construct() ) - return sal_False; + return false; RegionData_Impl *pRegion = pImp->GetRegion( rText ); if ( pRegion ) - return sal_False; + return false; uno::Reference< XDocumentTemplates > xTemplates = pImp->getDocTemplates(); @@ -1025,44 +1025,44 @@ sal_Bool SfxDocumentTemplates::InsertDir if ( ! pImp->InsertRegion( pNewRegion, nRegion ) ) { delete pNewRegion; - return sal_False; + return false; } - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool SfxDocumentTemplates::InsertTemplate(sal_uInt16 nSourceRegion, sal_uInt16 nIdx, const OUString &rName, const OUString &rPath) +bool SfxDocumentTemplates::InsertTemplate(sal_uInt16 nSourceRegion, sal_uInt16 nIdx, const OUString &rName, const OUString &rPath) { DocTemplLocker_Impl aLocker( *pImp ); if ( ! pImp->Construct() ) - return sal_False; + return false; RegionData_Impl *pRegion = pImp->GetRegion( nSourceRegion ); if ( !pRegion ) - return sal_False; + return false; size_t pos = nIdx; pRegion->AddEntry( rName, rPath, &pos ); - return sal_True; + return true; } -sal_Bool SfxDocumentTemplates::SetName( const OUString& rName, sal_uInt16 nRegion, sal_uInt16 nIdx ) +bool SfxDocumentTemplates::SetName( const OUString& rName, sal_uInt16 nRegion, sal_uInt16 nIdx ) { DocTemplLocker_Impl aLocker( *pImp ); if ( ! pImp->Construct() ) - return sal_False; + return false; RegionData_Impl *pRegion = pImp->GetRegion( nRegion ); if ( !pRegion ) - return sal_False; + return false; uno::Reference< XDocumentTemplates > xTemplates = pImp->getDocTemplates(); OUString aEmpty; @@ -1070,7 +1070,7 @@ sal_Bool SfxDocumentTemplates::SetName( const OUString& rName, sal_uInt16 nRegio if ( nIdx == USHRT_MAX ) { if ( pRegion->GetTitle() == rName ) - return sal_True; + return true; // we have to rename a region if ( xTemplates->renameGroup( pRegion->GetTitle(), rName ) ) @@ -1078,7 +1078,7 @@ sal_Bool SfxDocumentTemplates::SetName( const OUString& rName, sal_uInt16 nRegio pRegion->SetTitle( rName ); pRegion->SetTargetURL( aEmpty ); pRegion->SetHierarchyURL( aEmpty ); - return sal_True; + return true; } } else @@ -1086,10 +1086,10 @@ sal_Bool SfxDocumentTemplates::SetName( const OUString& rName, sal_uInt16 nRegio DocTempl_EntryData_Impl *pEntry = pRegion->GetEntry( nIdx ); if ( !pEntry ) - return sal_False; + return false; if ( pEntry->GetTitle() == rName ) - return sal_True; + return true; if ( xTemplates->renameTemplate( pRegion->GetTitle(), pEntry->GetTitle(), @@ -1098,16 +1098,16 @@ sal_Bool SfxDocumentTemplates::SetName( const OUString& rName, sal_uInt16 nRegio pEntry->SetTitle( rName ); pEntry->SetTargetURL( aEmpty ); pEntry->SetHierarchyURL( aEmpty ); - return sal_True; + return true; } } - return sal_False; + return false; } -sal_Bool SfxDocumentTemplates::GetFull +bool SfxDocumentTemplates::GetFull ( const OUString &rRegion, // Region Name const OUString &rName, // Template Name @@ -1133,10 +1133,10 @@ sal_Bool SfxDocumentTemplates::GetFull // We don't search for empty names! if ( rName.isEmpty() ) - return sal_False; + return false; if ( ! pImp->Construct() ) - return sal_False; + return false; DocTempl_EntryData_Impl* pEntry = NULL; const sal_uInt16 nCount = GetRegionCount(); @@ -1163,7 +1163,7 @@ sal_Bool SfxDocumentTemplates::GetFull -sal_Bool SfxDocumentTemplates::GetLogicNames +bool SfxDocumentTemplates::GetLogicNames ( const OUString &rPath, // Full Path to the template OUString &rRegion, // Out: Region name @@ -1188,7 +1188,7 @@ sal_Bool SfxDocumentTemplates::GetLogicNames DocTemplLocker_Impl aLocker( *pImp ); if ( ! pImp->Construct() ) - return sal_False; + return false; INetURLObject aFullPath; @@ -1267,7 +1267,7 @@ SfxDocumentTemplates::~SfxDocumentTemplates() pImp = NULL; } -void SfxDocumentTemplates::Update( sal_Bool _bSmart ) +void SfxDocumentTemplates::Update( bool _bSmart ) { if ( !_bSmart // don't be smart || ::svt::TemplateFolderCache( sal_True ).needsUpdate() // update is really necessary @@ -1678,7 +1678,7 @@ sal_Bool SfxDocTemplate_Impl::Construct( ) ::osl::MutexGuard aGuard( maMutex ); if ( mbConstructed ) - return sal_True; + return true; uno::Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); @@ -1695,7 +1695,7 @@ sal_Bool SfxDocTemplate_Impl::Construct( ) uno::Reference < XCommandEnvironment > aCmdEnv; if ( ! aRootContent.is() ) - return sal_False; + return false; mbConstructed = sal_True; maRootURL = aRootContent->getIdentifier()->getContentIdentifier(); @@ -1708,7 +1708,7 @@ sal_Bool SfxDocTemplate_Impl::Construct( ) Content aTemplRoot( aRootContent, aCmdEnv, xContext ); CreateFromHierarchy( aTemplRoot ); - return sal_True; + return true; } @@ -1733,7 +1733,7 @@ sal_Bool SfxDocTemplate_Impl::InsertRegion( RegionData_Impl *pNew, size_t nPos ) // return false (not inserted) if the entry already exists for ( size_t i = 0, n = maRegions.size(); i < n; ++i ) if ( maRegions[ i ]->Compare( pNew ) == 0 ) - return sal_False; + return false; size_t newPos = nPos; if ( pNew->GetTitle() == maStandardGroup ) @@ -1748,7 +1748,7 @@ sal_Bool SfxDocTemplate_Impl::InsertRegion( RegionData_Impl *pNew, size_t nPos ) else maRegions.push_back( pNew ); - return sal_True; + return true; } @@ -1790,7 +1790,7 @@ sal_Bool SfxDocTemplate_Impl::GetTitleFromURL( const OUString& rURL, catch ( Exception& ) { // the document is not a StarOffice document - return sal_False; + return false; } @@ -1817,7 +1817,7 @@ sal_Bool SfxDocTemplate_Impl::GetTitleFromURL( const OUString& rURL, INetURLObject::DECODE_WITH_CHARSET ); } - return sal_True; + return true; } @@ -1848,7 +1848,7 @@ sal_Bool getTextProperty_Impl( Content& rContent, // check, whether or not the property exists if ( !aPropInfo.is() || !aPropInfo->hasPropertyByName( rPropName ) ) { - return sal_False; + return false; } // now get the property diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index ae62b8f82d75..c97caebc8087 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -421,7 +421,7 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl( // update the template configuration if necessary { WaitObject aWaitCursor( pAntiImplP->GetParent() ); - aTemplates.Update( sal_True /* be smart */ ); + aTemplates.Update( true /* be smart */ ); } // fill the list boxes const sal_uInt16 nCount = aTemplates.GetRegionCount(); diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index f520802c1e8b..025f13873937 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -430,14 +430,14 @@ void SfxObjectShell::SetReadOnly() { sal_Bool bWasROUI = IsReadOnly(); - pMedium->UnlockFile( sal_False ); + pMedium->UnlockFile( false ); // the storage-based mediums are already based on the temporary file // so UnlockFile has already closed the locking stream if ( !pMedium->HasStorage_Impl() && IsLoadingFinished() ) pMedium->CloseInStream(); - pMedium->SetOpenMode( SFX_STREAM_READONLY, sal_True ); + pMedium->SetOpenMode( SFX_STREAM_READONLY, true ); pMedium->GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, true ) ); if ( !bWasROUI ) @@ -1105,7 +1105,7 @@ void SfxObjectShell::CheckEncryption_Impl( const uno::Reference< task::XInteract ::com::sun::star::task::ErrorCodeRequest aErrorCode; aErrorCode.ErrCode = ERRCODE_SFX_INCOMPLETE_ENCRYPTION; - SfxMedium::CallApproveHandler( xHandler, uno::makeAny( aErrorCode ), sal_False ); + SfxMedium::CallApproveHandler( xHandler, uno::makeAny( aErrorCode ), false ); pImp->m_bIncomplEncrWarnShown = sal_True; } @@ -1308,7 +1308,7 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad() } // set medium to noname - pTmpMedium->SetName( OUString(), sal_True ); + pTmpMedium->SetName( OUString(), true ); pTmpMedium->Init_Impl(); // drop resource @@ -1325,7 +1325,7 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad() // the medium should disconnect from the original location // the storage should not be disposed since the document is still // based on it, but in DoSaveCompleted it will be disposed - pTmpMedium->CanDisposeStorage_Impl( sal_False ); + pTmpMedium->CanDisposeStorage_Impl( false ); pTmpMedium->Close(); // setting the new storage the medium will be based on @@ -1346,7 +1346,7 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad() } // the medium should not dispose the storage, DoSaveCompleted() has let it to do so - pTmpMedium->CanDisposeStorage_Impl( sal_False ); + pTmpMedium->CanDisposeStorage_Impl( false ); } else { @@ -1357,12 +1357,12 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad() { // some further initializations for templates SetTemplate_Impl( aName, aTemplateName, this ); - pTmpMedium->CreateTempFile( sal_True ); + pTmpMedium->CreateTempFile( true ); } // templates are never readonly pTmpMedium->GetItemSet()->ClearItem( SID_DOC_READONLY ); - pTmpMedium->SetOpenMode( SFX_STREAM_READWRITE, sal_True ); + pTmpMedium->SetOpenMode( SFX_STREAM_READWRITE, true ); // notifications about possible changes in readonly state and document info Broadcast( SfxSimpleHint(SFX_HINT_MODECHANGED) ); @@ -1872,17 +1872,17 @@ sal_Int16 SfxObjectShell_Impl::getCurrentMacroExecMode() const return nImposedExecMode; } -sal_Bool SfxObjectShell_Impl::setCurrentMacroExecMode( sal_uInt16 nMacroMode ) +bool SfxObjectShell_Impl::setCurrentMacroExecMode( sal_uInt16 nMacroMode ) { const SfxMedium* pMedium( rDocShell.GetMedium() ); OSL_PRECOND( pMedium, "SfxObjectShell_Impl::getCurrentMacroExecMode: no medium!" ); if ( pMedium ) { pMedium->GetItemSet()->Put( SfxUInt16Item( SID_MACROEXECMODE, nMacroMode ) ); - return sal_True; + return true; } - return sal_False; + return false; } OUString SfxObjectShell_Impl::getDocumentLocation() const @@ -1915,7 +1915,7 @@ uno::Reference< embed::XStorage > SfxObjectShell_Impl::getZipStorageToSign() return xStore; } -sal_Bool SfxObjectShell_Impl::documentStorageHasMacros() const +bool SfxObjectShell_Impl::documentStorageHasMacros() const { return ::sfx2::DocumentMacroMode::storageHasMacros( m_xDocStorage ); } @@ -1938,9 +1938,9 @@ sal_Int16 SfxObjectShell_Impl::getScriptingSignatureState() return nSignatureState; } -sal_Bool SfxObjectShell_Impl::hasTrustedScriptingSignature( sal_Bool bAllowUIToAddAuthor ) +bool SfxObjectShell_Impl::hasTrustedScriptingSignature( bool bAllowUIToAddAuthor ) { - sal_Bool bResult = sal_False; + bool bResult = false; try { @@ -1989,7 +1989,7 @@ sal_Bool SfxObjectShell_Impl::hasTrustedScriptingSignature( sal_Bool bAllowUIToA aRequest.DocumentSignatureInformation = aInfo; aRequest.DocumentVersion = aVersion; aRequest.Classification = task::InteractionClassification_QUERY; - bResult = SfxMedium::CallApproveHandler( xInteraction, uno::makeAny( aRequest ), sal_True ); + bResult = SfxMedium::CallApproveHandler( xInteraction, uno::makeAny( aRequest ), true ); } } } diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 8ab06d0ad4c9..99795f63dd91 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -512,7 +512,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) IsUseUserData() ); if ( !GetSlotState( SID_DOCTEMPLATE ) ) // templates not supported - aDocInfoItem.SetTemplate(sal_False); + aDocInfoItem.SetTemplate(false); SfxItemSet aSet(GetPool(), SID_DOCINFO, SID_DOCINFO, SID_DOC_READONLY, SID_DOC_READONLY, SID_EXPLORER_PROPS_START, SID_EXPLORER_PROPS_START, SID_BASEURL, SID_BASEURL, @@ -706,7 +706,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) // the StoreAsURL/StoreToURL method have called this method with false // so it has to be restored to true here since it is a call from GUI - GetMedium()->SetUpdatePickList( sal_True ); + GetMedium()->SetUpdatePickList( true ); // TODO: in future it must be done in followind way // if document is opened from GUI it is immediatelly appears in the picklist @@ -912,7 +912,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) // Prevent entry in the Pick-lists if ( rReq.IsAPI() ) - GetMedium()->SetUpdatePickList( sal_False ); + GetMedium()->SetUpdatePickList( false ); else if ( rReq.GetArgs() ) { SFX_ITEMSET_GET( *rReq.GetArgs(), pPicklistItem, SfxBoolItem, SID_PICKLIST, false ); diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index e64e1ec2a3d1..3d7fb6ff6806 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -516,7 +516,7 @@ sal_Bool SfxObjectShell::DoInitNew( SfxMedium* pMed ) pMedium = new SfxMedium; } - pMedium->CanDisposeStorage_Impl( sal_True ); + pMedium->CanDisposeStorage_Impl( true ); if ( InitNew( pMed ? pMed->GetStorage() : uno::Reference < embed::XStorage >() ) ) { @@ -576,7 +576,7 @@ sal_Bool SfxObjectShell::ImportFromGeneratedStream_Impl( SfxAllItemSet aSet( SFX_APP()->GetPool() ); TransformParameters( SID_OPENDOC, rMediaDescr, aSet ); pMedium->GetItemSet()->Put( aSet ); - pMedium->CanDisposeStorage_Impl( sal_False ); + pMedium->CanDisposeStorage_Impl( false ); uno::Reference<text::XTextRange> xInsertTextRange; for (sal_Int32 i = 0; i < rMediaDescr.getLength(); ++i) { @@ -626,7 +626,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed ) ModifyBlocker_Impl aBlock( this ); pMedium = pMed; - pMedium->CanDisposeStorage_Impl( sal_True ); + pMedium->CanDisposeStorage_Impl( true ); sal_Bool bOk = sal_False; const SfxFilter* pFilter = pMed->GetFilter(); @@ -678,7 +678,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed ) EnableSetModified( sal_False ); - pMedium->LockOrigFileOnDemand( sal_True, sal_False ); + pMedium->LockOrigFileOnDemand( true, false ); if ( GetError() == ERRCODE_NONE && bOwnStorageFormat && ( !pFilter || !( pFilter->GetFilterFlags() & SFX_FILTER_STARONEFILTER ) ) ) { uno::Reference< embed::XStorage > xStorage; @@ -1211,7 +1211,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl AddLog( OUString( OSL_LOG_PREFIX "Save" ) ); if ( pMedium->DocNeedsFileDateCheck() ) - rMedium.CheckFileDate( pMedium->GetInitFileDate( sal_False ) ); + rMedium.CheckFileDate( pMedium->GetInitFileDate( false ) ); if ( bCopyTo && GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) { @@ -1338,7 +1338,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl AddLog( OUString( OSL_LOG_PREFIX "Locking" ) ); - rMedium.LockOrigFileOnDemand( sal_False, sal_False ); + rMedium.LockOrigFileOnDemand( false, false ); if ( bStorageBasedTarget ) { @@ -1538,13 +1538,13 @@ sal_Bool SfxObjectShell::SaveTo_Impl // add new version information into the versionlist and save the versionlist // the version list must have been transferred from the "old" medium before rMedium.AddVersion_Impl( aInfo ); - rMedium.SaveVersionList_Impl( sal_True ); + rMedium.SaveVersionList_Impl( true ); bOk = PutURLContentsToVersionStream_Impl( aTmpVersionURL, xMedStorage, aInfo.Identifier ); } } else if ( bOk && ( pImp->bIsSaving || pImp->bPreserveVersions ) ) { - rMedium.SaveVersionList_Impl( sal_True ); + rMedium.SaveVersionList_Impl( true ); } } @@ -1620,7 +1620,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl OUString( "META-INF" ), embed::ElementModes::READ ); - uno::Reference< embed::XStorage > xTarget = rMedium.GetZipStorageToSign_Impl( sal_False ); + uno::Reference< embed::XStorage > xTarget = rMedium.GetZipStorageToSign_Impl( false ); if ( !xTarget.is() ) throw uno::RuntimeException(); uno::Reference< embed::XStorage > xTargetMetaInf = xTarget->openStorageElement( @@ -1787,7 +1787,7 @@ sal_Bool SfxObjectShell::DisconnectStorage_Impl( SfxMedium& rSrcMedium, SfxMediu // in this case the optimization is not possible, connect storage to a temporary file rTargetMedium.ResetError(); xOptStorage->writeAndAttachToStream( uno::Reference< io::XStream >() ); - rSrcMedium.CanDisposeStorage_Impl( sal_False ); + rSrcMedium.CanDisposeStorage_Impl( false ); rSrcMedium.Close(); // now try to create the backup @@ -1801,7 +1801,7 @@ sal_Bool SfxObjectShell::DisconnectStorage_Impl( SfxMedium& rSrcMedium, SfxMediu xOptStorage->attachToURL( aBackupURL, sal_True ); // the storage is successfully attached to backup, thus it it owned by the document not by the medium - rSrcMedium.CanDisposeStorage_Impl( sal_False ); + rSrcMedium.CanDisposeStorage_Impl( false ); bResult = sal_True; } } @@ -1840,7 +1840,7 @@ sal_Bool SfxObjectShell::ConnectTmpStorage_Impl( // the storage is successfully disconnected from the original sources, thus the medium must not dispose it if ( pMediumArg ) - pMediumArg->CanDisposeStorage_Impl( sal_False ); + pMediumArg->CanDisposeStorage_Impl( false ); bResult = sal_True; } @@ -1974,7 +1974,7 @@ sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed ) if ( bMedChanged ) { pMedium = pNewMed; - pMedium->CanDisposeStorage_Impl( sal_True ); + pMedium->CanDisposeStorage_Impl( true ); } const SfxFilter *pFilter = pMedium ? pMedium->GetFilter() : 0; @@ -2097,12 +2097,12 @@ sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed ) // between medium commit and this step (attributes change and so on) // so get the file date again if ( pNewMed->DocNeedsFileDateCheck() ) - pNewMed->GetInitFileDate( sal_True ); + pNewMed->GetInitFileDate( true ); } } pMedium->ClearBackup_Impl(); - pMedium->LockOrigFileOnDemand( sal_True, sal_False ); + pMedium->LockOrigFileOnDemand( true, false ); AddToRecentlyUsedList(); diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 4b2a7ad765d9..ed1f93a47587 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -373,8 +373,8 @@ SfxObjectShell::~SfxObjectShell() pImp->pBaseModel.set( NULL ); // don't call GetStorage() here, in case of Load Failure it's possible that a storage was never assigned! - if ( pMedium && pMedium->HasStorage_Impl() && pMedium->GetStorage( sal_False ) == pImp->m_xDocStorage ) - pMedium->CanDisposeStorage_Impl( sal_False ); + if ( pMedium && pMedium->HasStorage_Impl() && pMedium->GetStorage( false ) == pImp->m_xDocStorage ) + pMedium->CanDisposeStorage_Impl( false ); if ( pImp->mpObjectContainer ) { diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 26dc24dae2c6..dd8da00f4e4d 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -3100,7 +3100,7 @@ void SfxBaseModel::impl_store( const OUString& sURL task::ErrorCodeRequest aErrorCode; aErrorCode.ErrCode = nErrCode; - SfxMedium::CallApproveHandler( xHandler, makeAny( aErrorCode ), sal_False ); + SfxMedium::CallApproveHandler( xHandler, makeAny( aErrorCode ), false ); } } @@ -3747,7 +3747,7 @@ void SAL_CALL SfxBaseModel::loadFromStorage( const Reference< embed::XStorage >& pMedium->GetItemSet()->Put( aSet ); // allow to use an interactionhandler (if there is one) - pMedium->UseInteractionHandler( sal_True ); + pMedium->UseInteractionHandler( true ); SFX_ITEMSET_ARG( &aSet, pTemplateItem, SfxBoolItem, SID_TEMPLATE, false); sal_Bool bTemplate = pTemplateItem && pTemplateItem->GetValue(); @@ -3807,7 +3807,7 @@ void SAL_CALL SfxBaseModel::storeToStorage( const Reference< embed::XStorage >& // BaseURL is part of the ItemSet SfxMedium aMedium( xStorage, OUString(), &aSet ); - aMedium.CanDisposeStorage_Impl( sal_False ); + aMedium.CanDisposeStorage_Impl( false ); if ( aMedium.GetFilter() ) { // storing without a valid filter will often crash diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx index 02f473ba1679..22f9de356d77 100644 --- a/sfx2/source/inc/objshimp.hxx +++ b/sfx2/source/inc/objshimp.hxx @@ -145,14 +145,14 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess // IMacroDocumentAccess overridables virtual sal_Int16 getCurrentMacroExecMode() const; - virtual sal_Bool setCurrentMacroExecMode( sal_uInt16 nMacroMode ); + virtual bool setCurrentMacroExecMode( sal_uInt16 nMacroMode ); virtual OUString getDocumentLocation() const; virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > getZipStorageToSign(); - virtual sal_Bool documentStorageHasMacros() const; + virtual bool documentStorageHasMacros() const; virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedScripts > getEmbeddedDocumentScripts() const; virtual sal_Int16 getScriptingSignatureState(); - virtual sal_Bool hasTrustedScriptingSignature( sal_Bool bAllowUIToAddAuthor ); + virtual bool hasTrustedScriptingSignature( bool bAllowUIToAddAuthor ); virtual void showBrokenSignatureWarning( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxInteraction ) const; }; diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index 099e0907caa6..dc794e56f258 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -752,7 +752,7 @@ void SfxFrame::AppearWithUpdate() { Appear(); if ( GetCurrentViewFrame() ) - GetCurrentViewFrame()->GetDispatcher()->Update_Impl( sal_True ); + GetCurrentViewFrame()->GetDispatcher()->Update_Impl( true ); } void SfxFrame::SetOwnsBindings_Impl( sal_Bool bSet ) diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index 9bcba34d75c5..8f3e89c43f42 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -337,7 +337,7 @@ void SfxFrame::SetPresentationMode( sal_Bool bSet ) if ( GetWorkWindow_Impl() ) GetWorkWindow_Impl()->SetDockingAllowed( !bSet ); if ( GetCurrentViewFrame() ) - GetCurrentViewFrame()->GetDispatcher()->Update_Impl( sal_True ); + GetCurrentViewFrame()->GetDispatcher()->Update_Impl( true ); } SystemWindow* SfxFrame::GetSystemWindow() const diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index be5ac571a965..38404fe297ad 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -1281,7 +1281,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect ) pEditWin->Show(); if ( SfxViewFrame::Current() == pViewFrame ) - pViewFrame->GetDispatcher()->Update_Impl( sal_True ); + pViewFrame->GetDispatcher()->Update_Impl( true ); Window* pFrameWin = &pViewFrame->GetWindow(); if ( pFrameWin != &pViewFrame->GetFrame().GetWindow() ) @@ -1299,9 +1299,9 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect ) if ( !rFrame.IsMarkedHidden_Impl() ) { if ( rDoc.IsHelpDocument() || ( nPluginMode == 2 ) ) - pViewFrame->GetDispatcher()->HideUI( sal_True ); + pViewFrame->GetDispatcher()->HideUI( true ); else - pViewFrame->GetDispatcher()->HideUI( sal_False ); + pViewFrame->GetDispatcher()->HideUI( false ); if ( rFrame.IsInPlace() ) pViewFrame->LockAdjustPosSizePixel(); diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 521c66932b40..3aaddc823709 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -481,7 +481,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) pMed->CompleteReOpen(); if ( nOpenMode & STREAM_WRITE ) - pMed->LockOrigFileOnDemand( sal_False, sal_True ); + pMed->LockOrigFileOnDemand( false, true ); // LockOrigFileOnDemand might set the readonly flag itself, it should be set back pMed->GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, !( nOpenMode & STREAM_WRITE ) ) ); @@ -762,7 +762,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) { // back to old medium pMedium->ReOpen(); - pMedium->LockOrigFileOnDemand( sal_False, sal_True ); + pMedium->LockOrigFileOnDemand( false, true ); xOldObj->DoSaveCompleted( pMedium ); } @@ -1143,7 +1143,7 @@ sal_Bool SfxViewFrame::Close() // Since the Dispatcher is emptied, it can not be used in any reasnable // manner, thus it is better to let the dispatcher be. - GetDispatcher()->Lock(sal_True); + GetDispatcher()->Lock(true); delete this; return sal_True; @@ -1305,7 +1305,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) // result! if ( pDispat->IsUpdated_Impl() ) - pDispat->Update_Impl(sal_True); + pDispat->Update_Impl(true); } Enable( !xObjSh->IsInModalMode() ); @@ -1382,7 +1382,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) case SFX_EVENT_TOGGLEFULLSCREENMODE: { if ( GetFrame().OwnsBindings_Impl() ) - GetBindings().GetDispatcher_Impl()->Update_Impl( sal_True ); + GetBindings().GetDispatcher_Impl()->Update_Impl( true ); break; } } @@ -1816,7 +1816,7 @@ void SfxViewFrame::MakeActive_Impl( sal_Bool bGrabFocus ) { GetBindings().SetDispatcher( GetDispatcher() ); GetBindings().SetActiveFrame( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > () ); - GetDispatcher()->Update_Impl( sal_False ); + GetDispatcher()->Update_Impl( false ); } } } @@ -2935,7 +2935,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq ) else rReq.Ignore(); - GetDispatcher()->Update_Impl( sal_True ); + GetDispatcher()->Update_Impl( true ); break; } } @@ -3127,7 +3127,7 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq ) sal_Bool bHasChild = HasChildWindow(nSID); sal_Bool bShow = pShowItem ? pShowItem->GetValue() : !bHasChild; - GetDispatcher()->Update_Impl( sal_True ); + GetDispatcher()->Update_Impl( true ); // Perform action. if ( !pShowItem || bShow != bHasChild ) @@ -3272,7 +3272,7 @@ void SfxViewFrame::ShowChildWindow( sal_uInt16 nId, sal_Bool bVisible ) SfxWorkWindow* pWork = GetWorkWindow_Impl( nId ); if ( pWork ) { - GetDispatcher()->Update_Impl(sal_True); + GetDispatcher()->Update_Impl(true); pWork->ShowChildWindow_Impl(nId, bVisible, sal_True ); } } diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx index b77cb7cf4ec2..b48b76ed0026 100644 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -173,7 +173,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq ) { // First, make the floats viewable pWorkWin->MakeChildrenVisible_Impl( bShow ); - GetDispatcher()->Update_Impl( sal_True ); + GetDispatcher()->Update_Impl( true ); // Then view it GetBindings().HidePopups( !bShow ); diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 8708688ee738..51122c081362 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -901,7 +901,7 @@ void SfxViewShell::UIActivating( SfxInPlaceClient* /*pClient*/ ) xParentFrame->setActiveFrame( xOwnFrame ); pFrame->GetBindings().HidePopups(true); - pFrame->GetDispatcher()->Update_Impl( sal_True ); + pFrame->GetDispatcher()->Update_Impl( true ); } @@ -909,7 +909,7 @@ void SfxViewShell::UIActivating( SfxInPlaceClient* /*pClient*/ ) void SfxViewShell::UIDeactivated( SfxInPlaceClient* /*pClient*/ ) { if ( !pFrame->GetFrame().IsClosing_Impl() || SfxViewFrame::Current() != pFrame ) - pFrame->GetDispatcher()->Update_Impl( sal_True ); + pFrame->GetDispatcher()->Update_Impl( true ); pFrame->GetBindings().HidePopups(false); pFrame->GetBindings().InvalidateAll(true); |