diff options
author | Noel Grandin <noel@peralex.com> | 2014-03-18 14:54:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-03-19 09:21:24 +0200 |
commit | 16752a8a773cf8096e28628237238a562016c4e5 (patch) | |
tree | d871056db97706bdb66dfca046aeb68500c5e565 /sfx2 | |
parent | be878d7cc54cbe3dc1de410e9ff760fe353ce56a (diff) |
sfx2: sal_Bool->bool
Change-Id: Ief810c49b821e2e60ee2c8b14187dd8d7d81c461
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/unoctitm.cxx | 17 | ||||
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 68 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 44 |
3 files changed, 63 insertions, 66 deletions
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 5961757dcde9..15f09b423bc7 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -398,19 +398,16 @@ void SfxOfficeDispatch::SetFrame(const ::com::sun::star::uno::Reference< ::com:: pControllerItem->SetFrame( xFrame ); } -void SfxOfficeDispatch::SetMasterUnoCommand( sal_Bool bSet ) +void SfxOfficeDispatch::SetMasterUnoCommand( bool bSet ) { if ( pControllerItem ) pControllerItem->setMasterSlaveCommand( bSet ); } // Determine if URL contains a master/slave command which must be handled a little bit different -sal_Bool SfxOfficeDispatch::IsMasterUnoCommand( const ::com::sun::star::util::URL& aURL ) +bool SfxOfficeDispatch::IsMasterUnoCommand( const ::com::sun::star::util::URL& aURL ) { - if ( aURL.Protocol == ".uno:" && ( aURL.Path.indexOf( '.' ) > 0 )) - return sal_True; - - return sal_False; + return aURL.Protocol == ".uno:" && ( aURL.Path.indexOf( '.' ) > 0 ); } OUString SfxOfficeDispatch::GetMasterUnoCommand( const ::com::sun::star::util::URL& aURL ) @@ -438,8 +435,8 @@ SfxDispatchController_Impl::SfxDispatchController_Impl( , pLastState( 0 ) , nSlot( pSlot->GetSlotId() ) , pDispatch( pDisp ) - , bMasterSlave( sal_False ) - , bVisible( sal_True ) + , bMasterSlave( false ) + , bVisible( true ) , pUnoName( pSlot->pUnoName ) { if ( aDispatchURL.Protocol == "slot:" && pUnoName ) @@ -484,7 +481,7 @@ void SfxDispatchController_Impl::SetFrame(const ::com::sun::star::uno::Reference xFrame = _xFrame; } -void SfxDispatchController_Impl::setMasterSlaveCommand( sal_Bool bSet ) +void SfxDispatchController_Impl::setMasterSlaveCommand( bool bSet ) { bMasterSlave = bSet; } @@ -862,7 +859,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt if ( pLastState && !IsInvalidItem( pLastState ) ) delete pLastState; pLastState = !IsInvalidItem(pState) ? pState->Clone() : pState; - bVisible = sal_True; + bVisible = true; } else bVisible = ((SfxVisibilityItem *)pState)->GetValue(); diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 65a146743555..b06a65b5fec7 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -49,11 +49,11 @@ TYPEINIT1(SfxTabDialogItem,SfxSetItem); struct TabPageImpl { - sal_Bool mbStandard; + bool mbStandard; sfx::ItemConnectionArray maItemConn; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; - TabPageImpl() : mbStandard( sal_False ) {} + TabPageImpl() : mbStandard( false ) {} }; struct Data_Impl @@ -62,19 +62,19 @@ struct Data_Impl CreateTabPage fnCreatePage; // Pointer to Factory GetTabPageRanges fnGetRanges; // Pointer to Ranges-Function SfxTabPage* pTabPage; // The TabPage itself - sal_Bool bOnDemand; // Flag: ItemSet onDemand - sal_Bool bRefresh; // Flag: Page must be re-initialized + bool bOnDemand; // Flag: ItemSet onDemand + bool bRefresh; // Flag: Page must be re-initialized // Constructor Data_Impl( sal_uInt16 Id, CreateTabPage fnPage, - GetTabPageRanges fnRanges, sal_Bool bDemand ) : + GetTabPageRanges fnRanges, bool bDemand ) : nId ( Id ), fnCreatePage( fnPage ), fnGetRanges ( fnRanges ), pTabPage ( 0 ), bOnDemand ( bDemand ), - bRefresh ( sal_False ) + bRefresh ( false ) { if ( !fnCreatePage ) { @@ -136,7 +136,7 @@ void SfxTabDialogController::StateChanged( sal_uInt16 /*nSID*/, SfxItemState /*e if ( pSetItem ) { pSet = pDialog->pSet = pSetItem->GetItemSet().Clone(); - sal_Bool bDialogStarted = sal_False; + bool bDialogStarted = false; for ( sal_uInt16 n=0; n<pDialog->m_pTabCtrl->GetPageCount(); n++ ) { sal_uInt16 nPageId = pDialog->m_pTabCtrl->GetPageId( n ); @@ -144,7 +144,7 @@ void SfxTabDialogController::StateChanged( sal_uInt16 /*nSID*/, SfxItemState /*e if ( pTabPage ) { pTabPage->Reset( pSetItem->GetItemSet() ); - bDialogStarted = sal_True; + bDialogStarted = true; } } @@ -159,7 +159,7 @@ typedef std::vector<Data_Impl*> SfxTabDlgData_Impl; struct TabDlg_Impl { - sal_Bool bModified : 1, + bool bModified : 1, bModal : 1, bHideResetBtn : 1; SfxTabDlgData_Impl aData; @@ -168,9 +168,9 @@ struct TabDlg_Impl TabDlg_Impl( sal_uInt8 nCnt ) : - bModified ( sal_False ), - bModal ( sal_True ), - bHideResetBtn ( sal_False ), + bModified ( false ), + bModal ( true ), + bHideResetBtn ( false ), pController ( NULL ) { aData.reserve( nCnt ); @@ -224,7 +224,7 @@ SfxTabPage::SfxTabPage( Window *pParent, TabPage( pParent, rResId ), pSet ( &rAttrSet ), - bHasExchangeSupport ( sal_False ), + bHasExchangeSupport ( false ), pImpl ( new TabPageImpl ) { @@ -234,7 +234,7 @@ SfxTabPage::SfxTabPage( Window *pParent, SfxTabPage::SfxTabPage(Window *pParent, const OString& rID, const OUString& rUIXMLDescription, const SfxItemSet &rAttrSet) : TabPage(pParent, rID, rUIXMLDescription) , pSet ( &rAttrSet ) - , bHasExchangeSupport ( sal_False ) + , bHasExchangeSupport ( false ) , pImpl ( new TabPageImpl ) { } @@ -320,14 +320,14 @@ void SfxTabPage::FillUserData() -sal_Bool SfxTabPage::IsReadOnly() const +bool SfxTabPage::IsReadOnly() const { - return sal_False; + return false; } -const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, sal_uInt16 nSlot, sal_Bool bDeep ) +const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, sal_uInt16 nSlot, bool bDeep ) /* [Description] @@ -349,7 +349,7 @@ const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, sal_uInt16 nSlot const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet, - sal_uInt16 nSlot, sal_Bool bDeep ) + sal_uInt16 nSlot, bool bDeep ) /* [Description] @@ -407,7 +407,7 @@ SfxTabDialog::SfxTabDialog , pRanges(0) , nResId(0) , nAppPageId(USHRT_MAX) - , bItemsReset(sal_False) + , bItemsReset(false) , bFmt(bEditFmt) , pExampleSet(0) { @@ -438,7 +438,7 @@ SfxTabDialog::SfxTabDialog , pRanges(0) , nResId(0) , nAppPageId(USHRT_MAX) - , bItemsReset(sal_False) + , bItemsReset(false) , bFmt(bEditFmt) , pExampleSet(0) { @@ -631,7 +631,7 @@ void SfxTabDialog::Init_Impl( sal_Bool bFmtFlag, const OUString* pUserButtonText void SfxTabDialog::RemoveResetButton() { m_pResetBtn->Hide(); - pImpl->bHideResetBtn = sal_True; + pImpl->bHideResetBtn = true; } @@ -656,9 +656,9 @@ void SfxTabDialog::StartExecuteModal( const Link& rEndDialogHdl ) -void SfxTabDialog::Start( sal_Bool bShow ) +void SfxTabDialog::Start( bool bShow ) { - pImpl->bModal = sal_False; + pImpl->bModal = false; Start_Impl(); if ( bShow ) @@ -712,7 +712,7 @@ void SfxTabDialog::Start_Impl() ActivatePageHdl( m_pTabCtrl ); } -void SfxTabDialog::AddTabPage( sal_uInt16 nId, const OUString &rRiderText, sal_Bool bItemsOnDemand, sal_uInt16 nPos ) +void SfxTabDialog::AddTabPage( sal_uInt16 nId, const OUString &rRiderText, bool bItemsOnDemand, sal_uInt16 nPos ) { AddTabPage( nId, rRiderText, 0, 0, bItemsOnDemand, nPos ); } @@ -727,7 +727,7 @@ sal_uInt16 SfxTabDialog::AddTabPage CreateTabPage pCreateFunc, // Pointer to the Factory Method GetTabPageRanges pRangesFunc, // Pointer to the Method for quering // Ranges onDemand - sal_Bool bItemsOnDemand // indicates whether the set of this page is + bool bItemsOnDemand // indicates whether the set of this page is // requested when created ) { @@ -772,7 +772,7 @@ void SfxTabDialog::AddTabPage const OUString& rRiderText, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc, - sal_Bool bItemsOnDemand, + bool bItemsOnDemand, sal_uInt16 nPos ) { @@ -1190,7 +1190,7 @@ IMPL_LINK_NOARG(SfxTabDialog, BaseFmtHdl) // Set all Items as new -> the call the current Page Reset() DBG_ASSERT( pDataObject->pTabPage, "the Page is gone" ); pDataObject->pTabPage->Reset( aTmpSet ); - pDataObject->pTabPage->pImpl->mbStandard = sal_True; + pDataObject->pTabPage->pImpl->mbStandard = true; } return 1; } @@ -1268,11 +1268,11 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl ) } else if ( pDataObject->bRefresh ) pTabPage->Reset( *pSet ); - pDataObject->bRefresh = sal_False; + pDataObject->bRefresh = false; if ( pExampleSet ) pTabPage->ActivatePage( *pExampleSet ); - sal_Bool bReadOnly = pTabPage->IsReadOnly(); + bool bReadOnly = pTabPage->IsReadOnly(); ( bReadOnly || pImpl->bHideResetBtn ) ? m_pResetBtn->Hide() : m_pResetBtn->Show(); return 0; } @@ -1353,9 +1353,9 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl ) Data_Impl* pObj = *it; if ( pObj->pTabPage != pPage ) // Do not refresh own Page anymore - pObj->bRefresh = sal_True; + pObj->bRefresh = true; else - pObj->bRefresh = sal_False; + pObj->bRefresh = false; } } if ( nRet & SfxTabPage::LEAVE_PAGE ) @@ -1395,9 +1395,9 @@ const sal_uInt16* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool ) [Cross-reference] - <SfxTabDialog::AddTabPage(sal_uInt16, CreateTabPage, GetTabPageRanges, sal_Bool)> - <SfxTabDialog::AddTabPage(sal_uInt16, const String &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)> - <SfxTabDialog::AddTabPage(sal_uInt16, const Bitmap &, CreateTabPage, GetTabPageRanges, sal_Bool, sal_uInt16)> + <SfxTabDialog::AddTabPage(sal_uInt16, CreateTabPage, GetTabPageRanges, bool)> + <SfxTabDialog::AddTabPage(sal_uInt16, const String &, CreateTabPage, GetTabPageRanges, bool, sal_uInt16)> + <SfxTabDialog::AddTabPage(sal_uInt16, const Bitmap &, CreateTabPage, GetTabPageRanges, bool, sal_uInt16)> */ { diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index ae65f986cadf..9e30206ee03f 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -105,7 +105,7 @@ using namespace ::com::sun::star::ui; -SFX_IMPL_TOOLBOX_CONTROL_ARG(SfxToolBoxControl, SfxStringItem, sal_True); +SFX_IMPL_TOOLBOX_CONTROL_ARG(SfxToolBoxControl, SfxStringItem, true); SFX_IMPL_TOOLBOX_CONTROL(SfxRecentFilesToolBoxControl, SfxStringItem); static Window* GetTopMostParentSystemWindow( Window* pWindow ) @@ -187,11 +187,11 @@ svt::ToolboxController* SAL_CALL SfxToolBoxControllerFactory( const Reference< X struct SfxToolBoxControl_Impl { ToolBox* pBox; - sal_Bool bShowString; - sal_uInt16 nSelectModifier; + bool bShowString; + sal_uInt16 nSelectModifier; SfxTbxCtrlFactory* pFact; - sal_uInt16 nTbxId; - sal_uInt16 nSlotId; + sal_uInt16 nTbxId; + sal_uInt16 nSlotId; SfxPopupWindow* mpFloatingWindow; SfxPopupWindow* mpPopupWindow; Reference< XUIElement > mxUIElement; @@ -221,10 +221,10 @@ IMPL_LINK( SfxToolBoxControl_Impl, WindowEventListener, VclSimpleEvent*, pEvent SfxToolBoxControl::SfxToolBoxControl( - sal_uInt16 nSlotID, - sal_uInt16 nID, + sal_uInt16 nSlotID, + sal_uInt16 nID, ToolBox& rBox, - sal_Bool bShowStringItems ) + bool bShowStringItems ) : svt::ToolboxController() { pImpl = new SfxToolBoxControl_Impl; @@ -970,12 +970,12 @@ void SfxToolBoxControl::StateChanged void SfxToolBoxControl::Select( sal_uInt16 nModifier ) { pImpl->nSelectModifier = nModifier; - Select( sal_Bool((nModifier & KEY_MOD1)!=0) ); + Select( (nModifier & KEY_MOD1) != 0 ); } -void SfxToolBoxControl::Select( sal_Bool /*bMod1*/ ) +void SfxToolBoxControl::Select( bool /*bMod1*/ ) { svt::ToolboxController::execute( pImpl->nSelectModifier ); } @@ -1159,8 +1159,8 @@ SfxPopupWindow::SfxPopupWindow( const Reference< XFrame >& rFrame, WinBits nBits ) : FloatingWindow( SFX_APP()->GetTopWindow(), nBits ) - , m_bFloating(sal_False) - , m_bCascading( sal_False ) + , m_bFloating( false ) + , m_bCascading( false ) , m_nId( nId ) , m_xFrame( rFrame ) , m_pStatusListener( 0 ) @@ -1177,8 +1177,8 @@ SfxPopupWindow::SfxPopupWindow( const Reference< XFrame >& rFrame, const ResId &rId ) : FloatingWindow( SFX_APP()->GetTopWindow(), rId ) - , m_bFloating(sal_False) - , m_bCascading( sal_False ) + , m_bFloating( false ) + , m_bCascading( false ) , m_nId( nId ) , m_xFrame( rFrame ) , m_pStatusListener( 0 ) @@ -1196,8 +1196,8 @@ SfxPopupWindow::SfxPopupWindow( Window* pParentWindow, WinBits nBits ) : FloatingWindow( pParentWindow, nBits ) - , m_bFloating(sal_False) - , m_bCascading( sal_False ) + , m_bFloating( false ) + , m_bCascading( false ) , m_nId( nId ) , m_xFrame( rFrame ) , m_pStatusListener( 0 ) @@ -1213,8 +1213,8 @@ SfxPopupWindow::SfxPopupWindow( Window* pParentWindow, const ResId &rId ) : FloatingWindow( pParentWindow, rId ) - , m_bFloating(sal_False) - , m_bCascading( sal_False ) + , m_bFloating( false ) + , m_bCascading( false ) , m_nId( nId ) , m_xFrame( rFrame ) , m_pStatusListener( 0 ) @@ -1287,7 +1287,7 @@ void SfxPopupWindow::AddStatusListener( const OUString& rCommandURL ) bool SfxPopupWindow::Close() { - m_bFloating = sal_False; + m_bFloating = false; FloatingWindow::Close(); Delete(); @@ -1305,7 +1305,7 @@ void SfxPopupWindow::PopupModeEnd() { // was teared-off DeleteFloatingWindow(); - m_bFloating = sal_True; + m_bFloating = true; } else Close(); @@ -1326,7 +1326,7 @@ void SfxPopupWindow::DeleteFloatingWindow() void SfxPopupWindow::MouseMove( const ::MouseEvent& rMEvt ) { - if ( m_bCascading == sal_False ) + if ( !m_bCascading ) FloatingWindow::MouseMove( rMEvt ); else { @@ -1352,7 +1352,7 @@ void SfxPopupWindow::MouseMove( const ::MouseEvent& rMEvt ) void SfxPopupWindow::StartCascading() { - m_bCascading= sal_True; + m_bCascading = true; } |