diff options
author | Noel Grandin <noel@peralex.com> | 2014-03-25 14:20:18 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-03-25 14:32:57 +0200 |
commit | 80ef0dfedcbba5a0c2cb8de409cc24200191fab8 (patch) | |
tree | 4799ef80c36dabd4adb50da98d5a9baeff237b8a /svtools | |
parent | b5e11641a7cec634c603213869a3475b1e01084e (diff) |
svtools: sal_Bool->bool
Change-Id: I42a341b5805e0b2a7d619ba552700db35815afd5
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/dialogs/wizardmachine.cxx | 76 | ||||
-rw-r--r-- | svtools/source/dialogs/wizdlg.cxx | 20 | ||||
-rw-r--r-- | svtools/source/misc/unitconv.cxx | 4 | ||||
-rw-r--r-- | svtools/source/uno/unoimap.cxx | 4 | ||||
-rw-r--r-- | svtools/source/uno/wizard/wizardpagecontroller.cxx | 6 | ||||
-rw-r--r-- | svtools/source/uno/wizard/wizardpagecontroller.hxx | 2 | ||||
-rw-r--r-- | svtools/source/uno/wizard/wizardshell.cxx | 12 | ||||
-rw-r--r-- | svtools/source/uno/wizard/wizardshell.hxx | 4 |
8 files changed, 64 insertions, 64 deletions
diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index 27d47a14591f..0c92cb6750d8 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -89,9 +89,9 @@ namespace svt } - sal_Bool OWizardPage::commitPage( WizardTypes::CommitPageReason ) + bool OWizardPage::commitPage( WizardTypes::CommitPageReason ) { - return sal_True; + return true; } @@ -106,13 +106,13 @@ namespace svt // the WizardDialog does not allow non-linear transitions (e.g. it's // not possible to add pages in a non-linear order), so we need some own maintainance data - sal_Bool m_bAutoNextButtonState; + bool m_bAutoNextButtonState; bool m_bTravelingSuspended; WizardMachineImplData() :nFirstUnknownPage( 0 ) - ,m_bAutoNextButtonState( sal_False ) + ,m_bAutoNextButtonState( false ) ,m_bTravelingSuspended( false ) { } @@ -366,7 +366,7 @@ namespace svt } - void OWizardMachine::enableButtons(sal_uInt32 _nWizardButtonFlags, sal_Bool _bEnable) + void OWizardMachine::enableButtons(sal_uInt32 _nWizardButtonFlags, bool _bEnable) { if (m_pFinish && (_nWizardButtonFlags & WZB_FINISH)) m_pFinish->Enable(_bEnable); @@ -399,19 +399,19 @@ namespace svt } - sal_Bool OWizardMachine::leaveState(WizardState) + bool OWizardMachine::leaveState(WizardState) { // no need to ask the page here. // If we reach this point, we already gave the current page the chance to commit it's data, // and it was allowed to commit it's data - return sal_True; + return true; } - sal_Bool OWizardMachine::onFinish() + bool OWizardMachine::onFinish() { - return Finnish( RET_OK ); + return Finish( RET_OK ); } @@ -434,19 +434,19 @@ namespace svt } - sal_Bool OWizardMachine::prepareLeaveCurrentState( CommitPageReason _eReason ) + bool OWizardMachine::prepareLeaveCurrentState( CommitPageReason _eReason ) { IWizardPageController* pController = getPageController( GetPage( getCurrentState() ) ); - ENSURE_OR_RETURN( pController != NULL, "OWizardMachine::prepareLeaveCurrentState: no controller for the current page!", sal_True ); + ENSURE_OR_RETURN( pController != NULL, "OWizardMachine::prepareLeaveCurrentState: no controller for the current page!", true ); return pController->commitPage( _eReason ); } - sal_Bool OWizardMachine::skipBackwardUntil( WizardState _nTargetState ) + bool OWizardMachine::skipBackwardUntil( WizardState _nTargetState ) { // allowed to leave the current page? if ( !prepareLeaveCurrentState( eTravelBackward ) ) - return sal_False; + return false; // don't travel directly on m_pImpl->aStateHistory, in case something goes wrong ::std::stack< WizardState > aTravelVirtually = m_pImpl->aStateHistory; @@ -463,19 +463,19 @@ namespace svt if ( !ShowPage( _nTargetState ) ) { m_pImpl->aStateHistory = aOldStateHistory; - return sal_False; + return false; } - return sal_True; + return true; } - sal_Bool OWizardMachine::skipUntil( WizardState _nTargetState ) + bool OWizardMachine::skipUntil( WizardState _nTargetState ) { WizardState nCurrentState = getCurrentState(); // allowed to leave the current page? if ( !prepareLeaveCurrentState( nCurrentState < _nTargetState ? eTravelForward : eTravelBackward ) ) - return sal_False; + return false; // don't travel directly on m_pImpl->aStateHistory, in case something goes wrong ::std::stack< WizardState > aTravelVirtually = m_pImpl->aStateHistory; @@ -486,7 +486,7 @@ namespace svt if ( WZS_INVALID_STATE == nNextState ) { OSL_FAIL( "OWizardMachine::skipUntil: the given target state does not exist!" ); - return sal_False; + return false; } // remember the skipped state in the history @@ -503,18 +503,18 @@ namespace svt // but ShowPage doesn't? Somebody behaves very strange here .... OSL_FAIL( "OWizardMachine::skipUntil: very unpolite ...." ); m_pImpl->aStateHistory = aOldStateHistory; - return sal_False; + return false; } - return sal_True; + return true; } - sal_Bool OWizardMachine::skip(sal_Int32 _nSteps) + bool OWizardMachine::skip(sal_Int32 _nSteps) { DBG_ASSERT(_nSteps > 0, "OWizardMachine::skip: invalid number of steps!"); // allowed to leave the current page? if ( !prepareLeaveCurrentState( eTravelForward ) ) - return sal_False; + return false; WizardState nCurrentState = getCurrentState(); WizardState nNextState = determineNextState(nCurrentState); @@ -522,7 +522,7 @@ namespace svt while (_nSteps-- > 0) { if (WZS_INVALID_STATE == nNextState) - return sal_False; + return false; // remember the skipped state in the history m_pImpl->aStateHistory.push(nCurrentState); @@ -541,25 +541,25 @@ namespace svt // if somebody does a skip and then does not allow to leave ... // (can't be a commit error, as we've already committed the current page. So if ShowPage fails here, // somebody behaves really strange ...) - return sal_False; + return false; } // all fine - return sal_True; + return true; } - sal_Bool OWizardMachine::travelNext() + bool OWizardMachine::travelNext() { // allowed to leave the current page? if ( !prepareLeaveCurrentState( eTravelForward ) ) - return sal_False; + return false; // determine the next state to travel to WizardState nCurrentState = getCurrentState(); WizardState nNextState = determineNextState(nCurrentState); if (WZS_INVALID_STATE == nNextState) - return sal_False; + return false; // the state history is used by the enterState method // all fine @@ -567,20 +567,20 @@ namespace svt if (!ShowPage(nNextState)) { m_pImpl->aStateHistory.pop(); - return sal_False; + return false; } - return sal_True; + return true; } - sal_Bool OWizardMachine::travelPrevious() + bool OWizardMachine::travelPrevious() { DBG_ASSERT(m_pImpl->aStateHistory.size() > 0, "OWizardMachine::travelPrevious: have no previous page!"); // allowed to leave the current page? if ( !prepareLeaveCurrentState( eTravelBackward ) ) - return sal_False; + return false; // the next state to switch to WizardState nPreviousState = m_pImpl->aStateHistory.top(); @@ -591,11 +591,11 @@ namespace svt if (!ShowPage(nPreviousState)) { m_pImpl->aStateHistory.push(nPreviousState); - return sal_False; + return false; } // all fine - return sal_True; + return true; } @@ -637,8 +637,8 @@ namespace svt if ( isTravelingSuspended() ) return 0; WizardTravelSuspension aTravelGuard( *this ); - sal_Int32 nRet = travelPrevious(); - return nRet; + bool nRet = travelPrevious(); + return nRet ? 1 : 0; } @@ -647,8 +647,8 @@ namespace svt if ( isTravelingSuspended() ) return 0; WizardTravelSuspension aTravelGuard( *this ); - sal_Int32 nRet = travelNext(); - return nRet; + bool nRet = travelNext(); + return nRet ? 1 : 0; } diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index 332787efcd6b..7ef7a7a342fa 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -508,38 +508,38 @@ long WizardDialog::DeactivatePage() -sal_Bool WizardDialog::ShowNextPage() +bool WizardDialog::ShowNextPage() { return ShowPage( mnCurLevel+1 ); } -sal_Bool WizardDialog::ShowPrevPage() +bool WizardDialog::ShowPrevPage() { if ( !mnCurLevel ) - return sal_False; + return false; return ShowPage( mnCurLevel-1 ); } -sal_Bool WizardDialog::ShowPage( sal_uInt16 nLevel ) +bool WizardDialog::ShowPage( sal_uInt16 nLevel ) { if ( DeactivatePage() ) { mnCurLevel = nLevel; ActivatePage(); ImplShowTabPage( ImplGetPage( mnCurLevel ) ); - return sal_True; + return true; } else - return sal_False; + return false; } -sal_Bool WizardDialog::Finnish( long nResult ) +bool WizardDialog::Finish( long nResult ) { if ( DeactivatePage() ) { @@ -550,10 +550,10 @@ sal_Bool WizardDialog::Finnish( long nResult ) EndDialog( nResult ); else if ( GetStyle() & WB_CLOSEABLE ) Close(); - return sal_True; + return true; } else - return sal_False; + return false; } @@ -690,7 +690,7 @@ void WizardDialog::RemoveButton( Button* pButton ) -void WizardDialog::ShowButtonFixedLine( sal_Bool bVisible ) +void WizardDialog::ShowButtonFixedLine( bool bVisible ) { if ( !mpFixedLine ) { diff --git a/svtools/source/misc/unitconv.cxx b/svtools/source/misc/unitconv.cxx index af3c2375cfa1..f9b3a884663f 100644 --- a/svtools/source/misc/unitconv.cxx +++ b/svtools/source/misc/unitconv.cxx @@ -21,7 +21,7 @@ -void SetFieldUnit( MetricField& rField, FieldUnit eUnit, sal_Bool bAll ) +void SetFieldUnit( MetricField& rField, FieldUnit eUnit, bool bAll ) { sal_Int64 nFirst = rField.Denormalize( rField.GetFirst( FUNIT_TWIP ) ); sal_Int64 nLast = rField.Denormalize( rField.GetLast( FUNIT_TWIP ) ); @@ -81,7 +81,7 @@ void SetFieldUnit( MetricField& rField, FieldUnit eUnit, sal_Bool bAll ) -void SetFieldUnit( MetricBox& rBox, FieldUnit eUnit, sal_Bool bAll ) +void SetFieldUnit( MetricBox& rBox, FieldUnit eUnit, bool bAll ) { sal_Int64 nMin = rBox.Denormalize( rBox.GetMin( FUNIT_TWIP ) ); sal_Int64 nMax = rBox.Denormalize( rBox.GetMax( FUNIT_TWIP ) ); diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx index e0a26d61fbcf..ca7b153439e3 100644 --- a/svtools/source/uno/unoimap.cxx +++ b/svtools/source/uno/unoimap.cxx @@ -761,11 +761,11 @@ Reference< XInterface > SvUnoImageMap_createInstance( const ImageMap& rMap, cons return (XWeak*)new SvUnoImageMap( rMap, pSupportedMacroItems ); } -sal_Bool SvUnoImageMap_fillImageMap( Reference< XInterface > xImageMap, ImageMap& rMap ) +bool SvUnoImageMap_fillImageMap( Reference< XInterface > xImageMap, ImageMap& rMap ) { SvUnoImageMap* pUnoImageMap = SvUnoImageMap::getImplementation( xImageMap ); if( NULL == pUnoImageMap ) - return sal_False; + return false; return pUnoImageMap->fillImageMap( rMap ); } diff --git a/svtools/source/uno/wizard/wizardpagecontroller.cxx b/svtools/source/uno/wizard/wizardpagecontroller.cxx index acecba65ace1..992caa55bdf6 100644 --- a/svtools/source/uno/wizard/wizardpagecontroller.cxx +++ b/svtools/source/uno/wizard/wizardpagecontroller.cxx @@ -139,10 +139,10 @@ namespace svt { namespace uno } - sal_Bool WizardPageController::commitPage( WizardTypes::CommitPageReason i_eReason ) + bool WizardPageController::commitPage( WizardTypes::CommitPageReason i_eReason ) { if ( !m_xWizardPage.is() ) - return sal_True; + return true; try { @@ -153,7 +153,7 @@ namespace svt { namespace uno DBG_UNHANDLED_EXCEPTION(); } - return sal_True; + return true; } diff --git a/svtools/source/uno/wizard/wizardpagecontroller.hxx b/svtools/source/uno/wizard/wizardpagecontroller.hxx index bcd224f96ae7..2e1d1b2bdcf2 100644 --- a/svtools/source/uno/wizard/wizardpagecontroller.hxx +++ b/svtools/source/uno/wizard/wizardpagecontroller.hxx @@ -46,7 +46,7 @@ namespace svt { namespace uno // IWizardPageController overridables virtual void initializePage(); - virtual sal_Bool commitPage( WizardTypes::CommitPageReason _eReason ); + virtual bool commitPage( WizardTypes::CommitPageReason _eReason ); virtual bool canAdvance() const; const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage >& diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx index 7534f84303ff..e25f27fe2e37 100644 --- a/svtools/source/uno/wizard/wizardshell.cxx +++ b/svtools/source/uno/wizard/wizardshell.cxx @@ -145,13 +145,13 @@ namespace svt { namespace uno } - sal_Bool WizardShell::leaveState( WizardState i_nState ) + bool WizardShell::leaveState( WizardState i_nState ) { if ( !WizardShell_Base::leaveState( i_nState ) ) - return sal_False; + return false; if ( !m_xController.is() ) - return sal_True; + return true; try { @@ -162,7 +162,7 @@ namespace svt { namespace uno DBG_UNHANDLED_EXCEPTION(); } - return sal_True; + return true; } @@ -248,12 +248,12 @@ namespace svt { namespace uno } - sal_Bool WizardShell::onFinish() + bool WizardShell::onFinish() { try { if ( m_xController.is() && !m_xController->confirmFinish() ) - return sal_False; + return false; } catch( const Exception& ) { diff --git a/svtools/source/uno/wizard/wizardshell.hxx b/svtools/source/uno/wizard/wizardshell.hxx index c62cb77f3d72..5eeb4e6bb147 100644 --- a/svtools/source/uno/wizard/wizardshell.hxx +++ b/svtools/source/uno/wizard/wizardshell.hxx @@ -57,10 +57,10 @@ namespace svt { namespace uno // OWizardMachine overridables virtual TabPage* createPage( WizardState i_nState ); virtual void enterState( WizardState i_nState ); - virtual sal_Bool leaveState( WizardState i_nState ); + virtual bool leaveState( WizardState i_nState ); virtual OUString getStateDisplayName( WizardState i_nState ) const; virtual bool canAdvance() const; - virtual sal_Bool onFinish(); + virtual bool onFinish(); virtual IWizardPageController* getPageController( TabPage* _pCurrentPage ) const; |