diff options
-rw-r--r-- | fpicker/source/office/OfficeControlAccess.cxx | 30 | ||||
-rw-r--r-- | fpicker/source/office/OfficeControlAccess.hxx | 12 | ||||
-rw-r--r-- | fpicker/source/office/OfficeFilePicker.cxx | 66 | ||||
-rw-r--r-- | fpicker/source/office/OfficeFilePicker.hxx | 18 | ||||
-rw-r--r-- | fpicker/source/office/OfficeFolderPicker.cxx | 4 | ||||
-rw-r--r-- | fpicker/source/office/commonpicker.cxx | 26 | ||||
-rw-r--r-- | fpicker/source/office/commonpicker.hxx | 6 | ||||
-rw-r--r-- | fpicker/source/office/fpinteraction.cxx | 14 | ||||
-rw-r--r-- | fpicker/source/office/fpinteraction.hxx | 6 | ||||
-rw-r--r-- | fpicker/source/office/fpsmartcontent.cxx | 20 | ||||
-rw-r--r-- | fpicker/source/office/fpsmartcontent.hxx | 24 | ||||
-rw-r--r-- | fpicker/source/office/iodlg.cxx | 130 | ||||
-rw-r--r-- | fpicker/source/office/iodlg.hxx | 34 | ||||
-rw-r--r-- | fpicker/source/office/iodlgimp.cxx | 8 | ||||
-rw-r--r-- | fpicker/source/office/iodlgimp.hxx | 18 |
15 files changed, 208 insertions, 208 deletions
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx index f546c8f103f7..27a9925ffc29 100644 --- a/fpicker/source/office/OfficeControlAccess.cxx +++ b/fpicker/source/office/OfficeControlAccess.cxx @@ -155,7 +155,7 @@ namespace svt OUString m_sLookup; ControlPropertyLookup( const OUString& _rLookup ) : m_sLookup( _rLookup ) { } - sal_Bool operator()( const ControlProperty& _rProp ) + bool operator()( const ControlProperty& _rProp ) { return m_sLookup.equalsAscii( _rProp.pPropertyName ); } @@ -178,7 +178,7 @@ namespace svt } - void OControlAccess::setHelpURL( Window* _pControl, const OUString& sHelpURL, sal_Bool _bFileView ) + void OControlAccess::setHelpURL( Window* _pControl, const OUString& sHelpURL, bool _bFileView ) { OUString sHelpID( sHelpURL ); INetURLObject aHID( sHelpURL ); @@ -195,7 +195,7 @@ namespace svt } - OUString OControlAccess::getHelpURL( Window* _pControl, sal_Bool _bFileView ) + OUString OControlAccess::getHelpURL( Window* _pControl, bool _bFileView ) { OString aHelpId = _pControl->GetHelpId(); if ( _bFileView ) @@ -275,7 +275,7 @@ namespace svt lcl_throwIllegalArgumentException(); // set the property - implSetControlProperty( nControlId, pControl, aPropDesc->nPropertyId, _rValue, sal_False ); + implSetControlProperty( nControlId, pControl, aPropDesc->nPropertyId, _rValue, false ); } @@ -316,7 +316,7 @@ namespace svt } - sal_Bool OControlAccess::isControlSupported( const OUString& _rControlName ) + bool OControlAccess::isControlSupported( const OUString& _rControlName ) { ControlDescription tmpDesc; tmpDesc.pControlName = OUStringToOString(_rControlName, RTL_TEXTENCODING_UTF8).getStr(); @@ -324,7 +324,7 @@ namespace svt } - sal_Bool OControlAccess::isControlPropertySupported( const OUString& _rControlName, const OUString& _rControlProperty ) + bool OControlAccess::isControlPropertySupported( const OUString& _rControlName, const OUString& _rControlProperty ) { // look up the control sal_Int16 nControlId = -1; @@ -336,7 +336,7 @@ namespace svt ControlPropertyIterator aPropDesc = ::std::find_if( s_pProperties, s_pPropertiesEnd, ControlPropertyLookup( _rControlProperty ) ); if ( aPropDesc == s_pPropertiesEnd ) // it's a property which is completely unknown - return sal_False; + return false; return 0 != ( aPropDesc->nPropertyId & nPropertyMask ); } @@ -483,7 +483,7 @@ namespace svt } - void OControlAccess::enableControl( sal_Int16 _nId, sal_Bool _bEnable ) + void OControlAccess::enableControl( sal_Int16 _nId, bool _bEnable ) { m_pFilePickerController->enableControl( _nId, _bEnable ); } @@ -533,7 +533,7 @@ namespace svt } - void OControlAccess::implSetControlProperty( sal_Int16 _nControlId, Control* _pControl, sal_Int16 _nProperty, const Any& _rValue, sal_Bool _bIgnoreIllegalArgument ) + void OControlAccess::implSetControlProperty( sal_Int16 _nControlId, Control* _pControl, sal_Int16 _nProperty, const Any& _rValue, bool _bIgnoreIllegalArgument ) { if ( !_pControl ) _pControl = m_pFilePickerController->getControl( _nControlId ); @@ -562,7 +562,7 @@ namespace svt case PROPERTY_FLAG_ENDBALED: { - sal_Bool bEnabled = sal_False; + bool bEnabled = false; if ( _rValue >>= bEnabled ) { m_pFilePickerController->enableControl( _nControlId, bEnabled ); @@ -576,7 +576,7 @@ namespace svt case PROPERTY_FLAG_VISIBLE: { - sal_Bool bVisible = sal_False; + bool bVisible = false; if ( _rValue >>= bVisible ) { _pControl->Show( bVisible ); @@ -671,7 +671,7 @@ namespace svt DBG_ASSERT( WINDOW_CHECKBOX == _pControl->GetType(), "OControlAccess::implSetControlProperty: invalid control/property combination!" ); - sal_Bool bChecked = sal_False; + bool bChecked = false; if ( _rValue >>= bChecked ) { static_cast< CheckBox* >( _pControl )->Check( bChecked ); @@ -701,11 +701,11 @@ namespace svt break; case PROPERTY_FLAG_ENDBALED: - aReturn <<= (sal_Bool)_pControl->IsEnabled(); + aReturn <<= _pControl->IsEnabled(); break; case PROPERTY_FLAG_VISIBLE: - aReturn <<= (sal_Bool)_pControl->IsVisible(); + aReturn <<= _pControl->IsVisible(); break; case PROPERTY_FLAG_HELPURL: @@ -756,7 +756,7 @@ namespace svt DBG_ASSERT( WINDOW_CHECKBOX == _pControl->GetType(), "OControlAccess::implGetControlProperty: invalid control/property combination!" ); - aReturn <<= (sal_Bool)static_cast< CheckBox* >( _pControl )->IsChecked( ); + aReturn <<= static_cast< CheckBox* >( _pControl )->IsChecked( ); break; default: diff --git a/fpicker/source/office/OfficeControlAccess.hxx b/fpicker/source/office/OfficeControlAccess.hxx index c5b03d436266..e629463032f6 100644 --- a/fpicker/source/office/OfficeControlAccess.hxx +++ b/fpicker/source/office/OfficeControlAccess.hxx @@ -58,18 +58,18 @@ namespace svt // XControlInformation implementation ::com::sun::star::uno::Sequence< OUString > getSupportedControls( ); ::com::sun::star::uno::Sequence< OUString > getSupportedControlProperties( const OUString& _rControlName ); - sal_Bool isControlSupported( const OUString& _rControlName ); - sal_Bool isControlPropertySupported( const OUString& _rControlName, const OUString& _rControlProperty ); + bool isControlSupported( const OUString& _rControlName ); + bool isControlPropertySupported( const OUString& _rControlName, const OUString& _rControlProperty ); // XFilePickerControlAccess void setValue( sal_Int16 _nId, sal_Int16 _nCtrlAction, const ::com::sun::star::uno::Any& _rValue ); ::com::sun::star::uno::Any getValue( sal_Int16 _nId, sal_Int16 _nCtrlAction ) const; void setLabel( sal_Int16 _nId, const OUString& _rValue ); OUString getLabel( sal_Int16 _nId ) const; - void enableControl( sal_Int16 _nId, sal_Bool _bEnable ); + void enableControl( sal_Int16 _nId, bool _bEnable ); - static void setHelpURL( Window* _pControl, const OUString& _rURL, sal_Bool _bFileView ); - static OUString getHelpURL( Window* _pControl, sal_Bool _bFileView ); + static void setHelpURL( Window* _pControl, const OUString& _rURL, bool _bFileView ); + static OUString getHelpURL( Window* _pControl, bool _bFileView ); private: /** implements the various methods for setting properties on controls @@ -89,7 +89,7 @@ namespace svt void implSetControlProperty( sal_Int16 _nControlId, Control* _pControl, sal_Int16 _nProperty, const ::com::sun::star::uno::Any& _rValue, - sal_Bool _bIgnoreIllegalArgument = sal_True ); + bool _bIgnoreIllegalArgument = true ); Control* implGetControl( const OUString& _rControlName, sal_Int16* _pId = NULL, sal_Int32* _pPropertyMask = NULL ) const SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx index 82ff53c013e0..77add1dec9ac 100644 --- a/fpicker/source/office/OfficeFilePicker.cxx +++ b/fpicker/source/office/OfficeFilePicker.cxx @@ -78,7 +78,7 @@ public: OUString getFilter() const { return m_sFilter; } /// determines if the filter has sub filter (i.e., the filter is a filter group in real) - sal_Bool hasSubFilters( ) const; + bool hasSubFilters( ) const; /** retrieves the filters belonging to the entry @return @@ -101,7 +101,7 @@ FilterEntry::FilterEntry( const OUString& _rTitle, const UnoFilterList& _rSubFil } -sal_Bool FilterEntry::hasSubFilters( ) const +bool FilterEntry::hasSubFilters( ) const { return ( 0 < m_aSubFilters.getLength() ); } @@ -121,27 +121,27 @@ struct ElementEntry_Impl sal_Int16 m_nControlAction; Any m_aValue; OUString m_aLabel; - sal_Bool m_bEnabled : 1; + bool m_bEnabled : 1; - sal_Bool m_bHasValue : 1; - sal_Bool m_bHasLabel : 1; - sal_Bool m_bHasEnabled : 1; + bool m_bHasValue : 1; + bool m_bHasLabel : 1; + bool m_bHasEnabled : 1; ElementEntry_Impl( sal_Int16 nId ); - void setValue( const Any& rVal ) { m_aValue = rVal; m_bHasValue = sal_True; } + void setValue( const Any& rVal ) { m_aValue = rVal; m_bHasValue = true; } void setAction( sal_Int16 nAction ) { m_nControlAction = nAction; } - void setLabel( const OUString& rVal ) { m_aLabel = rVal; m_bHasLabel = sal_True; } - void setEnabled( sal_Bool bEnabled ) { m_bEnabled = bEnabled; m_bHasEnabled = sal_True; } + void setLabel( const OUString& rVal ) { m_aLabel = rVal; m_bHasLabel = true; } + void setEnabled( bool bEnabled ) { m_bEnabled = bEnabled; m_bHasEnabled = true; } }; ElementEntry_Impl::ElementEntry_Impl( sal_Int16 nId ) : m_nElementID( nId ) , m_nControlAction( 0 ) - , m_bEnabled( sal_False ) - , m_bHasValue( sal_False ) - , m_bHasLabel( sal_False ) - , m_bHasEnabled( sal_False ) + , m_bEnabled( false ) + , m_bHasValue( false ) + , m_bHasLabel( false ) + , m_bHasEnabled( false ) {} @@ -352,7 +352,7 @@ namespace { bool operator () ( const FilterEntry& _rEntry ) { - sal_Bool bMatch; + bool bMatch; if ( !_rEntry.hasSubFilters() ) // a real filter bMatch = ( _rEntry.getTitle() == rTitle ); @@ -375,9 +375,9 @@ namespace { } -sal_Bool SvtFilePicker::FilterNameExists( const OUString& rTitle ) +bool SvtFilePicker::FilterNameExists( const OUString& rTitle ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( m_pFilterList ) bRet = @@ -391,9 +391,9 @@ sal_Bool SvtFilePicker::FilterNameExists( const OUString& rTitle ) } -sal_Bool SvtFilePicker::FilterNameExists( const UnoFilterList& _rGroupedFilters ) +bool SvtFilePicker::FilterNameExists( const UnoFilterList& _rGroupedFilters ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( m_pFilterList ) { @@ -429,7 +429,7 @@ SvtFilePicker::SvtFilePicker( const Reference < XMultiServiceFactory >& xFactory :OCommonPicker( xFactory ) ,m_pFilterList ( NULL ) ,m_pElemList ( NULL ) - ,m_bMultiSelection ( sal_False ) + ,m_bMultiSelection ( false ) ,m_nServiceType ( TemplateDescription::FILEOPEN_SIMPLE ) { } @@ -452,7 +452,7 @@ sal_Int16 SvtFilePicker::implExecutePicker( ) prepareExecute(); - getDialog()->EnableAutocompletion( sal_True ); + getDialog()->EnableAutocompletion( true ); // now we are ready to execute the dialog sal_Int16 nRet = getDialog()->Execute(); @@ -526,7 +526,7 @@ void SAL_CALL SvtFilePicker::startExecuteModal( const Reference< ::com::sun::sta m_xDlgClosedListener = xListener; prepareDialog(); prepareExecute(); - getDialog()->EnableAutocompletion( sal_True ); + getDialog()->EnableAutocompletion( true ); getDialog()->StartExecuteModal( LINK( this, SvtFilePicker, DialogClosedHdl ) ); } @@ -647,7 +647,7 @@ void SAL_CALL SvtFilePicker::setValue( sal_Int16 nElementID, if ( !m_pElemList ) m_pElemList = new ElementList; - sal_Bool bFound = sal_False; + bool bFound = false; ElementList::iterator aListIter; for ( aListIter = m_pElemList->begin(); @@ -659,7 +659,7 @@ void SAL_CALL SvtFilePicker::setValue( sal_Int16 nElementID, { rEntry.setAction( nControlAction ); rEntry.setValue( rValue ); - bFound = sal_True; + bFound = true; } } @@ -727,7 +727,7 @@ void SAL_CALL SvtFilePicker::setLabel( sal_Int16 nLabelID, const OUString& rValu if ( !m_pElemList ) m_pElemList = new ElementList; - sal_Bool bFound = sal_False; + bool bFound = false; ElementList::iterator aListIter; for ( aListIter = m_pElemList->begin(); @@ -737,7 +737,7 @@ void SAL_CALL SvtFilePicker::setLabel( sal_Int16 nLabelID, const OUString& rValu if ( rEntry.m_nElementID == nLabelID ) { rEntry.setLabel( rValue ); - bFound = sal_True; + bFound = true; } } @@ -800,7 +800,7 @@ void SAL_CALL SvtFilePicker::enableControl( sal_Int16 nElementID, sal_Bool bEnab if ( !m_pElemList ) m_pElemList = new ElementList; - sal_Bool bFound = sal_False; + bool bFound = false; ElementList::iterator aListIter; for ( aListIter = m_pElemList->begin(); @@ -810,7 +810,7 @@ void SAL_CALL SvtFilePicker::enableControl( sal_Int16 nElementID, sal_Bool bEnab if ( rEntry.m_nElementID == nElementID ) { rEntry.setEnabled( bEnable ); - bFound = sal_True; + bFound = true; } } @@ -921,7 +921,7 @@ sal_Bool SAL_CALL SvtFilePicker::setShowState( sal_Bool bShowState ) checkAlive(); SolarMutexGuard aGuard; - sal_Bool bRet = sal_False; + bool bRet = false; if ( getDialog() ) bRet = getDialog()->setShowState( bShowState ); @@ -935,7 +935,7 @@ sal_Bool SAL_CALL SvtFilePicker::getShowState() throw ( RuntimeException, std::e checkAlive(); SolarMutexGuard aGuard; - sal_Bool bRet = sal_False; + bool bRet = false; if ( getDialog() ) bRet = getDialog()->getShowState(); @@ -1082,24 +1082,24 @@ void SAL_CALL SvtFilePicker::initialize( const Sequence< Any >& _rArguments ) } -sal_Bool SvtFilePicker::implHandleInitializationArgument( const OUString& _rName, const Any& _rValue ) SAL_THROW( ( Exception, RuntimeException ) ) +bool SvtFilePicker::implHandleInitializationArgument( const OUString& _rName, const Any& _rValue ) SAL_THROW( ( Exception, RuntimeException ) ) { if ( _rName == "TemplateDescription" ) { m_nServiceType = TemplateDescription::FILEOPEN_SIMPLE; OSL_VERIFY( _rValue >>= m_nServiceType ); - return sal_True; + return true; } if ( _rName == "StandardDir" ) { OSL_VERIFY( _rValue >>= m_aStandardDir ); - return sal_True; + return true; } if ( _rName == "BlackList" ) { OSL_VERIFY( _rValue >>= m_aBlackList ); - return sal_True; + return true; } diff --git a/fpicker/source/office/OfficeFilePicker.hxx b/fpicker/source/office/OfficeFilePicker.hxx index bc4950c3a9eb..e539fa2f339c 100644 --- a/fpicker/source/office/OfficeFilePicker.hxx +++ b/fpicker/source/office/OfficeFilePicker.hxx @@ -65,16 +65,16 @@ private: FilterList* m_pFilterList; ElementList* m_pElemList; - sal_Bool m_bMultiSelection; + bool m_bMultiSelection; sal_Int16 m_nServiceType; - OUString m_aDefaultName; - OUString m_aCurrentFilter; + OUString m_aDefaultName; + OUString m_aCurrentFilter; // #97148# -------------- - OUString m_aOldDisplayDirectory; - OUString m_aOldHideDirectory; + OUString m_aOldDisplayDirectory; + OUString m_aOldHideDirectory; - OUString m_aStandardDir; + OUString m_aStandardDir; OUStringList m_aBlackList; ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener > @@ -207,7 +207,7 @@ protected: virtual SvtFileDialog* implCreateDialog( Window* _pParent ) SAL_OVERRIDE; virtual sal_Int16 implExecutePicker( ) SAL_OVERRIDE; - virtual sal_Bool implHandleInitializationArgument( + virtual bool implHandleInitializationArgument( const OUString& _rName, const ::com::sun::star::uno::Any& _rValue ) @@ -217,8 +217,8 @@ private: WinBits getWinBits( WinBits& rExtraBits ); virtual void notify( sal_Int16 _nEventId, sal_Int16 _nControlId ) SAL_OVERRIDE; - sal_Bool FilterNameExists( const OUString& rTitle ); - sal_Bool FilterNameExists( const UnoFilterList& _rGroupedFilters ); + bool FilterNameExists( const OUString& rTitle ); + bool FilterNameExists( const UnoFilterList& _rGroupedFilters ); void ensureFilterList( const OUString& _rInitialCurrentFilter ); diff --git a/fpicker/source/office/OfficeFolderPicker.cxx b/fpicker/source/office/OfficeFolderPicker.cxx index 5f54ec2cfb5c..700985011a13 100644 --- a/fpicker/source/office/OfficeFolderPicker.cxx +++ b/fpicker/source/office/OfficeFolderPicker.cxx @@ -65,7 +65,7 @@ void SAL_CALL SvtFolderPicker::startExecuteModal( const Reference< ::com::sun::s m_xListener = xListener; prepareDialog(); prepareExecute(); - getDialog()->EnableAutocompletion( sal_True ); + getDialog()->EnableAutocompletion( true ); getDialog()->StartExecuteModal( LINK( this, SvtFolderPicker, DialogClosedHdl ) ); } @@ -79,7 +79,7 @@ sal_Int16 SvtFolderPicker::implExecutePicker( ) prepareExecute(); // now we are ready to execute the dialog - getDialog()->EnableAutocompletion( sal_False ); + getDialog()->EnableAutocompletion( false ); sal_Int16 nRet = getDialog()->Execute(); return nRet; diff --git a/fpicker/source/office/commonpicker.cxx b/fpicker/source/office/commonpicker.cxx index 51ea2909b790..41b11916276b 100644 --- a/fpicker/source/office/commonpicker.cxx +++ b/fpicker/source/office/commonpicker.cxx @@ -52,7 +52,7 @@ namespace svt ,m_xORB( _rxFactory ) ,m_pDlg( NULL ) ,m_nCancelEvent( 0 ) - ,m_bExecuting( sal_False ) + ,m_bExecuting( false ) { // the two properties we have registerProperty( @@ -142,8 +142,8 @@ namespace svt void SAL_CALL OCommonPicker::disposing( const EventObject& _rSource ) throw (RuntimeException, std::exception) { SolarMutexGuard aGuard; - sal_Bool bDialogDying = _rSource.Source == m_xWindow; - sal_Bool bParentDying = _rSource.Source == m_xDialogParent; + bool bDialogDying = _rSource.Source == m_xWindow; + bool bParentDying = _rSource.Source == m_xDialogParent; if ( bDialogDying || bParentDying ) { @@ -192,12 +192,12 @@ namespace svt // if the HelpURL changed, forward this to the dialog if ( PROPERTY_ID_HELPURL == _nHandle ) if ( m_pDlg ) - OControlAccess::setHelpURL( m_pDlg, m_sHelpURL, sal_False ); + OControlAccess::setHelpURL( m_pDlg, m_sHelpURL, false ); } - sal_Bool OCommonPicker::createPicker() + bool OCommonPicker::createPicker() { SolarMutexGuard aGuard; @@ -211,11 +211,11 @@ namespace svt // synchronize the help id of the dialog with out help URL property if ( !m_sHelpURL.isEmpty() ) { // somebody already set the help URL while we had no dialog yet - OControlAccess::setHelpURL( m_pDlg, m_sHelpURL, sal_False ); + OControlAccess::setHelpURL( m_pDlg, m_sHelpURL, false ); } else { - m_sHelpURL = OControlAccess::getHelpURL( m_pDlg, sal_False ); + m_sHelpURL = OControlAccess::getHelpURL( m_pDlg, false ); } m_xWindow = VCLUnoHelper::GetInterface( m_pDlg ); @@ -355,12 +355,12 @@ namespace svt { ::osl::MutexGuard aOwnGuard( m_aMutex ); - m_bExecuting = sal_True; + m_bExecuting = true; } sal_Int16 nResult = implExecutePicker(); { ::osl::MutexGuard aOwnGuard( m_aMutex ); - m_bExecuting = sal_False; + m_bExecuting = false; } return nResult; @@ -463,7 +463,7 @@ namespace svt } #ifdef DBG_UTIL - sal_Bool bKnownSetting = + bool bKnownSetting = #endif implHandleInitializationArgument( sSettingName, aSettingValue ); DBG_ASSERT( bKnownSetting, @@ -476,9 +476,9 @@ namespace svt } - sal_Bool OCommonPicker::implHandleInitializationArgument( const OUString& _rName, const Any& _rValue ) SAL_THROW( ( Exception, RuntimeException ) ) + bool OCommonPicker::implHandleInitializationArgument( const OUString& _rName, const Any& _rValue ) SAL_THROW( ( Exception, RuntimeException ) ) { - sal_Bool bKnown = sal_True; + bool bKnown = true; if ( _rName == "ParentWindow" ) { m_xDialogParent.clear(); @@ -486,7 +486,7 @@ namespace svt OSL_ENSURE( VCLUnoHelper::GetWindow( m_xDialogParent ), "OCommonPicker::implHandleInitializationArgument: invalid parent window given!" ); } else - bKnown = sal_False; + bKnown = false; return bKnown; } diff --git a/fpicker/source/office/commonpicker.hxx b/fpicker/source/office/commonpicker.hxx index d5dbbec1149a..9df6be2d33a4 100644 --- a/fpicker/source/office/commonpicker.hxx +++ b/fpicker/source/office/commonpicker.hxx @@ -66,7 +66,7 @@ namespace svt SvtFileDialog* m_pDlg; sal_uInt32 m_nCancelEvent; - sal_Bool m_bExecuting; + bool m_bExecuting; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xDialogParent; @@ -171,13 +171,13 @@ namespace svt void prepareDialog(); protected: - sal_Bool createPicker(); + bool createPicker(); /** handle a single argument from the XInitialization::initialize method @return <TRUE/> if the argument could be handled */ - virtual sal_Bool implHandleInitializationArgument( + virtual bool implHandleInitializationArgument( const OUString& _rName, const ::com::sun::star::uno::Any& _rValue ) diff --git a/fpicker/source/office/fpinteraction.cxx b/fpicker/source/office/fpinteraction.cxx index e2d614f5b444..50e92260c27f 100644 --- a/fpicker/source/office/fpinteraction.cxx +++ b/fpicker/source/office/fpinteraction.cxx @@ -35,7 +35,7 @@ namespace svt OFilePickerInteractionHandler::OFilePickerInteractionHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxMaster ) :m_xMaster( _rxMaster ) - ,m_bUsed( sal_False ) + ,m_bUsed( false ) ,m_eInterceptions( OFilePickerInteractionHandler::E_NOINTERCEPTION ) { DBG_ASSERT( m_xMaster.is(), "OFilePickerInteractionHandler::OFilePickerInteractionHandler: invalid master handler!" ); @@ -52,7 +52,7 @@ namespace svt if (!_rxRequest.is()) return; - m_bUsed = sal_True; + m_bUsed = true; // extract some generic continuations ... might we need it later // if something goes wrong. @@ -115,7 +115,7 @@ namespace svt } - sal_Bool OFilePickerInteractionHandler::wasUsed() const + bool OFilePickerInteractionHandler::wasUsed() const { return m_bUsed; } @@ -123,7 +123,7 @@ namespace svt void OFilePickerInteractionHandler::resetUseState() { - m_bUsed = sal_False; + m_bUsed = false; } @@ -133,7 +133,7 @@ namespace svt } - sal_Bool OFilePickerInteractionHandler::wasAccessDenied() const + bool OFilePickerInteractionHandler::wasAccessDenied() const { InteractiveIOException aIoException; if ( @@ -141,9 +141,9 @@ namespace svt (IOErrorCode_ACCESS_DENIED == aIoException.Code) ) { - return sal_True; + return true; } - return sal_False; + return false; } diff --git a/fpicker/source/office/fpinteraction.hxx b/fpicker/source/office/fpinteraction.hxx index 8d0b9f43e372..7de39150cedc 100644 --- a/fpicker/source/office/fpinteraction.hxx +++ b/fpicker/source/office/fpinteraction.hxx @@ -53,7 +53,7 @@ namespace svt protected: ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > m_xMaster ; // our master handler ::com::sun::star::uno::Any m_aException ; // the last handled request - sal_Bool m_bUsed ; // indicates using of this interaction handler instance + bool m_bUsed ; // indicates using of this interaction handler instance EInterceptedInteractions m_eInterceptions ; // enable/disable interception of some special interactions public: @@ -61,12 +61,12 @@ namespace svt // some generic functions void enableInterceptions( EInterceptedInteractions eInterceptions ); - sal_Bool wasUsed () const; + bool wasUsed () const; void resetUseState (); void forgetRequest (); // functions to analyze last cached request - sal_Bool wasAccessDenied() const; + bool wasAccessDenied() const; protected: // XInteractionHandler diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx index 33a8f99c83a9..c5372825e4ed 100644 --- a/fpicker/source/office/fpsmartcontent.cxx +++ b/fpicker/source/office/fpsmartcontent.cxx @@ -183,20 +183,20 @@ namespace svt } - sal_Bool SmartContent::implIs( const OUString& _rURL, Type _eType ) + bool SmartContent::implIs( const OUString& _rURL, Type _eType ) { // bind to this content bindTo( _rURL ); // did we survive this? if ( isInvalid() || !isBound() ) - return sal_False; + return false; DBG_ASSERT( m_pContent, "SmartContent::implIs: inconsistence!" ); // if, after an bindTo, we don't have a content, then we should be INVALID, or at least // NOT_BOUND (the latter happens, for example, if somebody tries to ask for an empty URL) - sal_Bool bIs = sal_False; + bool bIs = false; try { if ( Folder == _eType ) @@ -238,12 +238,12 @@ namespace svt } - sal_Bool SmartContent::hasParentFolder( ) + bool SmartContent::hasParentFolder( ) { if ( !isBound() || isInvalid() ) - return sal_False; + return false; - sal_Bool bRet = sal_False; + bool bRet = false; try { Reference< XChild > xChild( m_pContent->get(), UNO_QUERY ); @@ -269,12 +269,12 @@ namespace svt } - sal_Bool SmartContent::canCreateFolder( ) + bool SmartContent::canCreateFolder( ) { if ( !isBound() || isInvalid() ) - return sal_False; + return false; - sal_Bool bRet = sal_False; + bool bRet = false; try { Sequence< ContentInfo > aInfo = m_pContent->queryCreatableContentsInfo(); @@ -285,7 +285,7 @@ namespace svt // Simply look for the first KIND_FOLDER... if ( pInfo->Attributes & ContentInfoAttribute::KIND_FOLDER ) { - bRet = sal_True; + bRet = true; break; } } diff --git a/fpicker/source/office/fpsmartcontent.hxx b/fpicker/source/office/fpsmartcontent.hxx index 6952f03b8c83..3f16e539be88 100644 --- a/fpicker/source/office/fpsmartcontent.hxx +++ b/fpicker/source/office/fpsmartcontent.hxx @@ -59,7 +59,7 @@ namespace svt private: enum Type { Folder, Document }; /// checks if the currently bound content is a folder or document - sal_Bool implIs( const OUString& _rURL, Type _eType ); + bool implIs( const OUString& _rURL, Type _eType ); SmartContent( const SmartContent& _rSource ); // never implemented SmartContent& operator=( const SmartContent& _rSource ); // never implemented @@ -118,16 +118,16 @@ namespace svt /** checks if the content is valid <p>Note that "not (is valid)" is not the same as "is invalid"</p> */ - inline sal_Bool isValid( ) const { return VALID == getState(); } + inline bool isValid( ) const { return VALID == getState(); } /** checks if the content is valid <p>Note that "not (is invalid)" is not the same as "is valid"</p> */ - inline sal_Bool isInvalid( ) const { return INVALID == getState(); } + inline bool isInvalid( ) const { return INVALID == getState(); } /** checks if the content is bound */ - inline sal_Bool isBound( ) const { return NOT_BOUND != getState(); } + inline bool isBound( ) const { return NOT_BOUND != getState(); } /** returns the URL of the content */ @@ -155,13 +155,13 @@ namespace svt @precond the content is bound and not invalid */ - sal_Bool hasParentFolder( ); + bool hasParentFolder( ); /** checks if sub folders below the content can be created @precond the content is bound and not invalid */ - sal_Bool canCreateFolder( ); + bool canCreateFolder( ); /** creates a new folder with the given title and return the corresponding URL. @@ -175,7 +175,7 @@ namespace svt @postcond the content is not in the state UNKNOWN */ - inline sal_Bool isFolder( const OUString& _rURL ) + inline bool isFolder( const OUString& _rURL ) { return implIs( _rURL, Folder ); } @@ -185,21 +185,21 @@ namespace svt @postcond the content is not in the state UNKNOWN */ - inline sal_Bool isDocument( const OUString& _rURL ) + inline bool isDocument( const OUString& _rURL ) { return implIs( _rURL, Document ); } /** checks if the content is existent (it is if and only if it is a document or a folder) */ - inline sal_Bool is( const OUString& _rURL ) + inline bool is( const OUString& _rURL ) { return implIs( _rURL, Folder ) || implIs( _rURL, Document ); } - inline sal_Bool isFolder( ) { return isFolder( getURL() ); } - inline sal_Bool isDocument( ) { return isDocument( getURL() ); } - inline sal_Bool is( ) { return is( getURL() ); } + inline bool isFolder( ) { return isFolder( getURL() ); } + inline bool isDocument( ) { return isDocument( getURL() ); } + inline bool is( ) { return is( getURL() ); } }; diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index dbd0e6a80c98..32facae77a07 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -140,7 +140,7 @@ namespace } - sal_Bool restoreCurrentFilter( SvtExpFileDlg_Impl* _pImpl ) + bool restoreCurrentFilter( SvtExpFileDlg_Impl* _pImpl ) { DBG_ASSERT( _pImpl->GetCurFilter(), "restoreCurrentFilter: no current filter!" ); DBG_ASSERT( !_pImpl->GetCurFilterDisplayName().isEmpty(), "restoreCurrentFilter: no current filter (no display name)!" ); @@ -224,11 +224,11 @@ namespace { // check if it is a real file extension, and not only the "post-dot" part in // a directory name - sal_Bool bRealExtensions = sal_True; + bool bRealExtensions = true; if ( -1 != aExt.indexOf( '/' ) ) - bRealExtensions = sal_False; + bRealExtensions = false; else if ( -1 != aExt.indexOf( '\\' ) ) - bRealExtensions = sal_False; + bRealExtensions = false; else { // no easy way to tell, because the part containing the dot already is the last @@ -265,7 +265,7 @@ namespace } - sal_Bool lcl_getHomeDirectory( const OUString& _rForURL, OUString& /* [out] */ _rHomeDir ) + bool lcl_getHomeDirectory( const OUString& _rForURL, OUString& /* [out] */ _rHomeDir ) { _rHomeDir = ""; @@ -329,7 +329,7 @@ struct ControlChain_Impl { Window* _pControl; ControlChain_Impl* _pNext; - sal_Bool _bHasOwnership; + bool _bHasOwnership; ControlChain_Impl( Window* pControl, ControlChain_Impl* pNext ); ~ControlChain_Impl(); @@ -344,7 +344,7 @@ ControlChain_Impl::ControlChain_Impl ) : _pControl( pControl ), _pNext( pNext ), - _bHasOwnership( sal_True ) + _bHasOwnership( true ) { } @@ -382,7 +382,7 @@ SvtFileDialog::SvtFileDialog ,_pFileNotifier( NULL ) ,_pImp( new SvtExpFileDlg_Impl( nBits ) ) ,_nExtraBits( nExtraBits ) - ,_bIsInExecute( sal_False ) + ,_bIsInExecute( false ) ,m_bInExecuteAsync( false ) ,m_bHasFilename( false ) ,m_context(comphelper::getProcessComponentContext()) @@ -406,7 +406,7 @@ SvtFileDialog::SvtFileDialog ( Window* _pParent, WinBits nBits ) ,_pFileNotifier( NULL ) ,_pImp( new SvtExpFileDlg_Impl( nBits ) ) ,_nExtraBits( 0L ) - ,_bIsInExecute( sal_False ) + ,_bIsInExecute( false ) ,m_bHasFilename( false ) { Init_Impl( nBits ); @@ -547,7 +547,7 @@ void SvtFileDialog::Init_Impl _pImp->_pBtnNewFolder->SetAccessibleName( _pImp->_pBtnNewFolder->GetQuickHelpText() ); if ( ( nStyle & SFXWB_MULTISELECTION ) == SFXWB_MULTISELECTION ) - _pImp->_bMultiSelection = sal_True; + _pImp->_bMultiSelection = true; _pFileView = new SvtFileView( this, SvtResId( CTL_EXPLORERFILE_FILELIST ), FILEDLG_TYPE_PATHDLG == _pImp->_eDlgType, @@ -775,7 +775,7 @@ IMPL_STATIC_LINK( SvtFileDialog, NewFolderHdl_Impl, PushButton*, EMPTYARG ) OUString aTitle; aContent.getTitle( aTitle ); QueryFolderNameDialog aDlg( pThis, aTitle, SVT_RESSTR(STR_SVT_NEW_FOLDER) ); - sal_Bool bHandled = sal_False; + bool bHandled = false; while ( !bHandled ) { @@ -785,11 +785,11 @@ IMPL_STATIC_LINK( SvtFileDialog, NewFolderHdl_Impl, PushButton*, EMPTYARG ) if ( !aUrl.isEmpty( ) ) { pThis->_pFileView->CreatedFolder( aUrl, aDlg.GetName() ); - bHandled = sal_True; + bHandled = true; } } else - bHandled = sal_True; + bHandled = true; } return 0; @@ -803,14 +803,14 @@ IMPL_STATIC_LINK_NOINSTANCE( SvtFileDialog, ViewHdl_Impl, ImageButton*, EMPTYARG } -sal_Bool SvtFileDialog::createNewUserFilter( const OUString& _rNewFilter, sal_Bool _bAllowUserDefExt ) +bool SvtFileDialog::createNewUserFilter( const OUString& _rNewFilter, bool _bAllowUserDefExt ) { // delete the old user filter and create a new one DELETEZ( _pImp->_pUserFilter ); _pImp->_pUserFilter = new SvtFileDialogFilter_Impl( _rNewFilter, _rNewFilter ); // remember the extension - sal_Bool bIsAllFiles = _rNewFilter == FILEDIALOG_FILTER_ALL; + bool bIsAllFiles = _rNewFilter == FILEDIALOG_FILTER_ALL; if ( bIsAllFiles ) EraseDefaultExt(); else @@ -821,7 +821,7 @@ sal_Bool SvtFileDialog::createNewUserFilter( const OUString& _rNewFilter, sal_Bo // now, the default extension is set to the one of the user filter (or empty) // if the former is not allowed (_bAllowUserDefExt = <FALSE/>), we have to use the ext of the current filter // (if possible) - sal_Bool bUseCurFilterExt = sal_True; + bool bUseCurFilterExt = true; OUString sUserFilter = _pImp->_pUserFilter->GetType(); sal_Int32 nSepPos = sUserFilter.lastIndexOf( '.' ); if ( nSepPos != -1 ) @@ -830,7 +830,7 @@ sal_Bool SvtFileDialog::createNewUserFilter( const OUString& _rNewFilter, sal_Bo if ( ( -1 == sUserExt.indexOf( '*' ) ) && ( -1 == sUserExt.indexOf( '?' ) ) ) - bUseCurFilterExt = sal_False; + bUseCurFilterExt = false; } if ( !_bAllowUserDefExt || bUseCurFilterExt ) @@ -856,15 +856,15 @@ sal_uInt16 SvtFileDialog::adjustFilter( const OUString& _rFilter ) { sal_uInt16 nReturn = 0; - const sal_Bool bNonEmpty = !_rFilter.isEmpty(); + const bool bNonEmpty = !_rFilter.isEmpty(); if ( bNonEmpty ) { nReturn |= FLT_NONEMPTY; - sal_Bool bFilterChanged = sal_True; + bool bFilterChanged = true; // search for a corresponding filter - SvtFileDialogFilter_Impl* pFilter = FindFilter_Impl( _rFilter, sal_False, bFilterChanged ); + SvtFileDialogFilter_Impl* pFilter = FindFilter_Impl( _rFilter, false, bFilterChanged ); #ifdef AUTOSELECT_USERFILTER // if we found a filter which without allowing multi-extensions -> select it @@ -877,7 +877,7 @@ sal_uInt16 SvtFileDialog::adjustFilter( const OUString& _rFilter ) // look for multi-ext filters if necessary if ( !pFilter ) - pFilter = FindFilter_Impl( _rFilter, sal_True, bFilterChanged ); + pFilter = FindFilter_Impl( _rFilter, true, bFilterChanged ); if ( bFilterChanged ) nReturn |= FLT_CHANGED; @@ -889,7 +889,7 @@ sal_uInt16 SvtFileDialog::adjustFilter( const OUString& _rFilter ) #ifdef AUTOSELECT_USERFILTER if ( createNewUserFilter( _rFilter, sal_True ) ) #else - if ( createNewUserFilter( _rFilter, sal_False ) ) + if ( createNewUserFilter( _rFilter, false ) ) #endif { // it's the "all files" filter nReturn |= FLT_ALLFILESFILTER; @@ -1045,7 +1045,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) } // check if it is a folder - sal_Bool bIsFolder = sal_False; + bool bIsFolder = false; // first thing before doing anyhing with the content: Reset it. When the user presses "open" (or "save" or "export", // for that matter), s/he wants the complete handling, including all possible error messages, even if s/he @@ -1112,7 +1112,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) pThis->_pImp->GetCurFilter()->GetType()); } - sal_Bool bOpenFolder = ( FILEDLG_TYPE_PATHDLG == pThis->_pImp->_eDlgType ) && + bool bOpenFolder = ( FILEDLG_TYPE_PATHDLG == pThis->_pImp->_eDlgType ) && !pThis->_pImp->_bDoubleClick && pVoid != pThis->_pImp->_pEdFileName; if ( bIsFolder ) { @@ -1178,7 +1178,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) // if content does not exist: at least its path must exist INetURLObject aPathObj = aFileObj; aPathObj.removeSegment(); - sal_Bool bFolder = pThis->m_aContent.isFolder( aPathObj.GetMainURL( INetURLObject::NO_DECODE ) ); + bool bFolder = pThis->m_aContent.isFolder( aPathObj.GetMainURL( INetURLObject::NO_DECODE ) ); if ( !bFolder ) { ErrorHandler::HandleError( ERRCODE_IO_NOTEXISTSPATH ); @@ -1195,7 +1195,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) if ( INET_PROT_FILE == aFileObj.GetProtocol( ) ) { - sal_Bool bExists = sal_False; + bool bExists = false; bExists = pThis->m_aContent.is( aFileObj.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -1243,7 +1243,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) -void SvtFileDialog::EnableAutocompletion( sal_Bool _bEnable ) +void SvtFileDialog::EnableAutocompletion( bool _bEnable ) { _pImp->_pEdFileName->EnableAutocompletion( _bEnable ); } @@ -1282,7 +1282,7 @@ IMPL_STATIC_LINK( SvtFileDialog, FilterSelectHdl_Impl, ListBox*, pBox ) // stop the timer for executing the filter if ( pThis->_pImp->_aFilterTimer.IsActive() ) - pThis->_pImp->m_bNeedDelayedFilterExecute = sal_True; + pThis->_pImp->m_bNeedDelayedFilterExecute = true; pThis->_pImp->_aFilterTimer.Stop(); } else @@ -1413,10 +1413,10 @@ IMPL_LINK_NOARG ( SvtFileDialog, RemovePlacePressed_Hdl ) SvtFileDialogFilter_Impl* SvtFileDialog::FindFilter_Impl ( const OUString& _rFilter, - sal_Bool _bMultiExt,/* TRUE - regard filter with several extensions + bool _bMultiExt,/* TRUE - regard filter with several extensions FALSE - do not ... */ - sal_Bool& _rFilterChanged + bool& _rFilterChanged ) /* [Description] @@ -1461,7 +1461,7 @@ SvtFileDialogFilter_Impl* SvtFileDialog::FindFilter_Impl // activate filter _rFilterChanged = _pImp->_pUserFilter || ( _pImp->GetCurFilter() != pFilter ); - createNewUserFilter( _rFilter, sal_False ); + createNewUserFilter( _rFilter, false ); break; } @@ -1473,7 +1473,7 @@ SvtFileDialogFilter_Impl* SvtFileDialog::FindFilter_Impl void SvtFileDialog::ExecuteFilter() { - _pImp->m_bNeedDelayedFilterExecute = sal_False; + _pImp->m_bNeedDelayedFilterExecute = false; executeAsync( AsyncPickerAction::eExecuteFilter, OUString(), getMostCurrentFilter( _pImp ) ); } @@ -1616,9 +1616,9 @@ IMPL_LINK( SvtFileDialog, SelectHdl_Impl, SvTabListBox*, pBox ) IMPL_LINK_NOARG(SvtFileDialog, DblClickHdl_Impl) { - _pImp->_bDoubleClick = sal_True; + _pImp->_bDoubleClick = true; OpenHdl_Impl( this, NULL ); - _pImp->_bDoubleClick = sal_False; + _pImp->_bDoubleClick = false; return 0; } @@ -1828,8 +1828,8 @@ OUString SvtFileDialog::implGetInitialURL( const OUString& _rPath, const OUStrin // is it a valid folder? m_aContent.bindTo( aURLParser.GetMainURL( INetURLObject::NO_DECODE ) ); - sal_Bool bIsFolder = m_aContent.isFolder( ); // do this _before_ asking isInvalid! - sal_Bool bIsInvalid = m_aContent.isInvalid(); + bool bIsFolder = m_aContent.isFolder( ); // do this _before_ asking isInvalid! + bool bIsInvalid = m_aContent.isInvalid(); if ( bIsInvalid && m_bHasFilename && !aURLParser.hasFinalSlash() ) { // check if the parent folder exists @@ -1875,9 +1875,9 @@ short SvtFileDialog::Execute() return 0; // start the dialog - _bIsInExecute = sal_True; + _bIsInExecute = true; short nResult = ModalDialog::Execute(); - _bIsInExecute = sal_False; + _bIsInExecute = false; DBG_ASSERT( !m_pCurrentAsyncAction.is(), "SvtFilePicker::Execute: still running an async action!" ); // the dialog should not be cancellable while an async action is running - first, the action @@ -1891,7 +1891,7 @@ short SvtFileDialog::Execute() { // remember the selected directory only for file URLs not for virtual folders sal_Int32 nLevel = aURL.getSegmentCount(); - sal_Bool bDir = m_aContent.isFolder( aURL.GetMainURL( INetURLObject::NO_DECODE ) ); + bool bDir = m_aContent.isFolder( aURL.GetMainURL( INetURLObject::NO_DECODE ) ); if ( nLevel > 1 && ( FILEDLG_TYPE_FILEDLG == _pImp->_eDlgType || !bDir ) ) aURL.removeSegment(); } @@ -1912,7 +1912,7 @@ void SvtFileDialog::StartExecuteModal( const Link& rEndDialogHdl ) void SvtFileDialog::onAsyncOperationStarted() { - EnableUI( sal_False ); + EnableUI( false ); // the cancel button must be always enabled _pImp->_pBtnCancel->Enable( true ); _pImp->_pBtnCancel->GrabFocus(); @@ -1921,7 +1921,7 @@ void SvtFileDialog::onAsyncOperationStarted() void SvtFileDialog::onAsyncOperationFinished() { - EnableUI( sal_True ); + EnableUI( true ); m_pCurrentAsyncAction = NULL; if ( !m_bInExecuteAsync ) _pImp->_pEdFileName->GrabFocus(); @@ -1974,7 +1974,7 @@ void SvtFileDialog::displayIOException( const OUString& _rURL, IOErrorCode _eCod } -void SvtFileDialog::EnableUI( sal_Bool _bEnable ) +void SvtFileDialog::EnableUI( bool _bEnable ) { Enable( _bEnable ); @@ -1991,7 +1991,7 @@ void SvtFileDialog::EnableUI( sal_Bool _bEnable ) } -void SvtFileDialog::EnableControl( Control* _pControl, sal_Bool _bEnable ) +void SvtFileDialog::EnableControl( Control* _pControl, bool _bEnable ) { if ( !_pControl ) { @@ -2105,7 +2105,7 @@ short SvtFileDialog::PrepareExecute() // set up initial filter sal_uInt16 nFilterCount = GetFilterCount(); OUString aAll = SvtResId( STR_FILTERNAME_ALL ).toString(); - sal_Bool bHasAll = _pImp->HasFilterListEntry( aAll ); + bool bHasAll = _pImp->HasFilterListEntry( aAll ); if ( _pImp->GetCurFilter() || nFilterCount == 1 || ( nFilterCount == 2 && bHasAll ) ) { // if applicable set the only filter or the only filter that @@ -2485,7 +2485,7 @@ void SvtFileDialog::implArrangeControls() -sal_Bool SvtFileDialog::IsolateFilterFromPath_Impl( OUString& rPath, OUString& rFilter ) +bool SvtFileDialog::IsolateFilterFromPath_Impl( OUString& rPath, OUString& rFilter ) { OUString aEmpty; OUString aReversePath = comphelper::string::reverseString(rPath); @@ -2534,7 +2534,7 @@ sal_Bool SvtFileDialog::IsolateFilterFromPath_Impl( OUString& rPath, OUString& r if ( nPathTokenPos < (rPath.getLength() - nWildCardPos - 1) ) { ErrorHandler::HandleError( ERRCODE_SFX_INVALIDSYNTAX ); - return sal_False; + return false; } // cut off filter @@ -2554,7 +2554,7 @@ sal_Bool SvtFileDialog::IsolateFilterFromPath_Impl( OUString& rPath, OUString& r } } - return sal_True; + return true; } @@ -3024,7 +3024,7 @@ void SvtFileDialog::setImage( sal_Int16 /*aImageFormat*/, const Any& rImage ) } -sal_Bool SvtFileDialog::setShowState( sal_Bool /*bShowState*/ ) +bool SvtFileDialog::setShowState( bool /*bShowState*/ ) { // #97633 for the system filedialog it's // useful to make the preview switchable @@ -3038,7 +3038,7 @@ sal_Bool SvtFileDialog::setShowState( sal_Bool /*bShowState*/ ) // support for set/getShowState is opionally // see com::sun::star::ui::dialogs::XFilePreview - return sal_False; + return false; } @@ -3062,18 +3062,18 @@ void SvtFileDialog::setCurrentFileText( const OUString& _rText, bool _bSelectAll } -sal_Bool SvtFileDialog::isAutoExtensionEnabled() +bool SvtFileDialog::isAutoExtensionEnabled() { return _pImp->_pCbAutoExtension && _pImp->_pCbAutoExtension->IsChecked(); } -sal_Bool SvtFileDialog::getShowState() +bool SvtFileDialog::getShowState() { if ( _pPrevBmp ) return _pPrevBmp->IsVisible(); else - return sal_False; + return false; } @@ -3091,7 +3091,7 @@ void SvtFileDialog::ReleaseOwnership( Window* pUserControl ) { if ( pElement->_pControl == pUserControl ) { - pElement->_bHasOwnership = sal_False; + pElement->_bHasOwnership = false; break; } pElement = pElement->_pNext; @@ -3100,14 +3100,14 @@ void SvtFileDialog::ReleaseOwnership( Window* pUserControl ) -sal_Bool SvtFileDialog::AddControl( Window* pControl, sal_Bool bNewLine ) +bool SvtFileDialog::AddControl( Window* pControl, sal_Bool bNewLine ) { // control already exists ControlChain_Impl* pElement = _pUserControls; while ( pElement ) { if ( pElement->_pControl == pControl ) - return sal_False; + return false; pElement = pElement->_pNext; } @@ -3149,7 +3149,7 @@ sal_Bool SvtFileDialog::AddControl( Window* pControl, sal_Bool bNewLine ) } Point aNewControlPos; Size* pNewDlgSize = NULL; - sal_Bool bNewRow = bNewLine; + bool bNewRow = bNewLine; if ( nType == WINDOW_WINDOW ) { @@ -3176,12 +3176,12 @@ sal_Bool SvtFileDialog::AddControl( Window* pControl, sal_Bool bNewLine ) // Check if a new row has to be created. if ( aNewControlRange.X() > aDlgSize.Width() ) - bNewRow = sal_True; + bNewRow = true; } else { // Create a new row if there was no usercontrol before. - bNewRow = sal_True; + bNewRow = true; } // Check if a new row has to be created. @@ -3221,35 +3221,35 @@ sal_Bool SvtFileDialog::AddControl( Window* pControl, sal_Bool bNewLine ) pControl->Show(); _pUserControls = new ControlChain_Impl( pControl, _pUserControls ); - return sal_True; + return true; } -sal_Bool SvtFileDialog::ContentHasParentFolder( const OUString& rURL ) +bool SvtFileDialog::ContentHasParentFolder( const OUString& rURL ) { m_aContent.bindTo( rURL ); if ( m_aContent.isInvalid() ) - return sal_False; + return false; return m_aContent.hasParentFolder( ) && m_aContent.isValid(); } -sal_Bool SvtFileDialog::ContentCanMakeFolder( const OUString& rURL ) +bool SvtFileDialog::ContentCanMakeFolder( const OUString& rURL ) { m_aContent.bindTo( rURL ); if ( m_aContent.isInvalid() ) - return sal_False; + return false; return m_aContent.canCreateFolder( ) && m_aContent.isValid(); } -sal_Bool SvtFileDialog::ContentGetTitle( const OUString& rURL, OUString& rTitle ) +bool SvtFileDialog::ContentGetTitle( const OUString& rURL, OUString& rTitle ) { m_aContent.bindTo( rURL ); if ( m_aContent.isInvalid() ) - return sal_False; + return false; OUString sTitle; m_aContent.getTitle( sTitle ); diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx index e859309c0091..da6dcc14364a 100644 --- a/fpicker/source/office/iodlg.hxx +++ b/fpicker/source/office/iodlg.hxx @@ -98,7 +98,7 @@ private: ::svt::IFilePickerListener* _pFileNotifier; SvtExpFileDlg_Impl* _pImp; WinBits _nExtraBits; - sal_Bool _bIsInExecute : 1; + bool _bIsInExecute : 1; ImageList m_aImages; ::svt::SmartContent m_aContent; @@ -142,8 +142,8 @@ private: the filter which has been found */ SvtFileDialogFilter_Impl* FindFilter_Impl( const OUString& _rFilter, - sal_Bool _bMultiExt, - sal_Bool& _rFilterChanged + bool _bMultiExt, + bool& _rFilterChanged ); void ExecuteFilter(); void OpenMultiSelection_Impl(); @@ -159,14 +159,14 @@ private: // removes a filter with wildcards from the path and returns it - sal_Bool IsolateFilterFromPath_Impl( OUString& rPath, OUString& rFilter ); + bool IsolateFilterFromPath_Impl( OUString& rPath, OUString& rFilter ); void implArrangeControls(); void implUpdateImages( ); protected: virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE; - void EnableInternet( sal_Bool bInternet ); + void EnableInternet( bool bInternet ); // originally from VclFileDialog Link _aOKHdl; @@ -187,14 +187,14 @@ protected: This is under the assumption that you'll use EnableControl. Direct access to the control (such as pControl->Enable()) will break this. */ - void EnableUI( sal_Bool _bEnable ); + void EnableUI( bool _bEnable ); /** enables or disables a control You are strongly encouraged to prefer this method over pControl->Enable( _bEnable ). See <member>EnableUI</member> for details. */ - void EnableControl( Control* _pControl, sal_Bool _bEnable ); + void EnableControl( Control* _pControl, bool _bEnable ); short PrepareExecute(); public: @@ -238,7 +238,7 @@ public: void DisableSaveLastDirectory(); void InitSize(); void UpdateControls( const OUString& rURL ); - void EnableAutocompletion( sal_Bool _bEnable = sal_True ); + void EnableAutocompletion( bool _bEnable = true ); void SetFileCallback( ::svt::IFilePickerListener *pNotifier ) { _pFileNotifier = pNotifier; } @@ -246,9 +246,9 @@ public: sal_Int32 getAvailableWidth(); sal_Int32 getAvailableHeight(); void setImage( sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& rImage ); - sal_Bool setShowState( sal_Bool bShowState ); - sal_Bool getShowState(); - sal_Bool isAutoExtensionEnabled(); + bool setShowState( bool bShowState ); + bool getShowState(); + bool isAutoExtensionEnabled(); OUString getCurrentFileText( ) const; void setCurrentFileText( const OUString& _rText, bool _bSelectAll = false ); @@ -261,7 +261,7 @@ public: void displayIOException( const OUString& _rURL, ::com::sun::star::ucb::IOErrorCode _eCode ); // originally from VclFileDialog - virtual sal_Bool AddControl( Window* pControl, sal_Bool bNewLine = sal_False ); + virtual bool AddControl( Window* pControl, sal_Bool bNewLine = sal_False ); // inline inline void SetPath( const OUString& rNewURL ); @@ -279,10 +279,10 @@ public: inline Image GetButtonImage( sal_uInt16 _nButtonId ) const { return m_aImages.GetImage( _nButtonId ); } - sal_Bool ContentIsFolder( const OUString& rURL ) { return m_aContent.isFolder( rURL ) && m_aContent.isValid(); } - sal_Bool ContentHasParentFolder( const OUString& rURL ); - sal_Bool ContentCanMakeFolder( const OUString& rURL ); - sal_Bool ContentGetTitle( const OUString& rURL, OUString& rTitle ); + bool ContentIsFolder( const OUString& rURL ) { return m_aContent.isFolder( rURL ) && m_aContent.isValid(); } + bool ContentHasParentFolder( const OUString& rURL ); + bool ContentCanMakeFolder( const OUString& rURL ); + bool ContentGetTitle( const OUString& rURL, OUString& rTitle ); /** updates the sizes of the listboxes in the bottom area of the dialog, and of their labels, according to the space occupied by the current label texts @@ -308,7 +308,7 @@ private: </p> @return <TRUE/> if the new filter is "*.*" */ - sal_Bool createNewUserFilter( const OUString& _rNewFilter, sal_Bool _bAllowUserDefExt ); + bool createNewUserFilter( const OUString& _rNewFilter, bool _bAllowUserDefExt ); sal_uInt16 adjustFilter( const OUString& _rFilter ); diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx index 7543ef886b72..db54a6d07b5d 100644 --- a/fpicker/source/office/iodlgimp.cxx +++ b/fpicker/source/office/iodlgimp.cxx @@ -230,12 +230,12 @@ SvtExpFileDlg_Impl::SvtExpFileDlg_Impl( WinBits ) : _eDlgType ( FILEDLG_TYPE_FILEDLG ), _nState ( FILEDLG_STATE_REMOTE ), _nStyle ( 0 ), - _bDoubleClick ( sal_False ), - m_bNeedDelayedFilterExecute ( sal_False ), + _bDoubleClick ( false ), + m_bNeedDelayedFilterExecute ( false ), _pDefaultFilter ( NULL ), - _bMultiSelection ( sal_False ), + _bMultiSelection ( false ), _nFixDeltaHeight ( 0 ), - _bFolderHasOpened ( sal_False ) + _bFolderHasOpened ( false ) { } diff --git a/fpicker/source/office/iodlgimp.hxx b/fpicker/source/office/iodlgimp.hxx index 7a7f871d4b0b..fb6a3fc11143 100644 --- a/fpicker/source/office/iodlgimp.hxx +++ b/fpicker/source/office/iodlgimp.hxx @@ -59,7 +59,7 @@ public: const OUString& GetType() const { return m_aType; } const OUString GetExtension() const { return m_aType.copy( 2 ); } - sal_Bool isGroupSeparator() const { return m_aType.isEmpty(); } + bool isGroupSeparator() const { return m_aType.isEmpty(); } }; typedef boost::ptr_deque<SvtFileDialogFilter_Impl> SvtFileDialogFilterList_Impl; @@ -171,15 +171,15 @@ public: Timer _aFilterTimer; // shows OpenHdl_Imp() if the open was triggered by a double click - sal_Bool _bDoubleClick; - sal_Bool m_bNeedDelayedFilterExecute; + bool _bDoubleClick; + bool m_bNeedDelayedFilterExecute; // list of the 5 most recently used filters // Defaultfilter for <All> oder <All ...> const SvtFileDialogFilter_Impl* _pDefaultFilter; // MultiSelection? - sal_Bool _bMultiSelection; + bool _bMultiSelection; // remember fixsizes for resize long _nFixDeltaHeight; @@ -187,7 +187,7 @@ public: Size _aDlgSize; OUString _aIniKey; - sal_Bool _bFolderHasOpened; + bool _bFolderHasOpened; SvtExpFileDlg_Impl( WinBits nBits ); ~SvtExpFileDlg_Impl(); @@ -209,13 +209,13 @@ public: // inits the listbox for the filters from the filter list (_pFilter) void ClearFilterList( ); void InitFilterList( ); - inline sal_Bool HasFilterListEntry( const OUString& _rFilterName ); + inline bool HasFilterListEntry( const OUString& _rFilterName ); inline void SelectFilterListEntry( const OUString& _rFilterName ); inline void SetNoFilterListSelection( ); void InsertFilterListEntry( const SvtFileDialogFilter_Impl* _pFilterDesc ); // _pFilterDesc must already have been added to _pFilter inline SvtFileDialogFilter_Impl* GetSelectedFilterEntry( OUString& /* [out] */ _rDisplayName ) const; - inline sal_Bool IsFilterListTravelSelect() const; + inline bool IsFilterListTravelSelect() const; // access to the current filter via methods only - need to care for consistency between _pCurFilter and m_sCurrentFilterDisplayName @@ -230,7 +230,7 @@ inline void SvtExpFileDlg_Impl::SetFilterListSelectHdl( const Link& _rHandler ) _pLbFilter->SetSelectHdl( _rHandler ); } -inline sal_Bool SvtExpFileDlg_Impl::HasFilterListEntry( const OUString& _rFilterName ) +inline bool SvtExpFileDlg_Impl::HasFilterListEntry( const OUString& _rFilterName ) { return ( LISTBOX_ENTRY_NOTFOUND != _pLbFilter->GetEntryPos( _rFilterName ) ); } @@ -251,7 +251,7 @@ inline SvtFileDialogFilter_Impl* SvtExpFileDlg_Impl::GetSelectedFilterEntry( OUS return static_cast< SvtFileDialogFilter_Impl* >( _pLbFilter->GetEntryData ( _pLbFilter->GetSelectEntryPos() ) ); } -inline sal_Bool SvtExpFileDlg_Impl::IsFilterListTravelSelect() const +inline bool SvtExpFileDlg_Impl::IsFilterListTravelSelect() const { return _pLbFilter->IsTravelSelect(); } |