diff options
author | Noel Grandin <noel@peralex.com> | 2014-04-30 11:46:15 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-02 08:49:22 +0200 |
commit | 7ae4102f171c5f0d452fa78c5c17722bc9649fc5 (patch) | |
tree | 40ff03aeaabe4adfdd90bdb82cb6ef6b80381795 /extensions | |
parent | 7d2cf383667106efe3e2ea6099fe52206b685c5d (diff) |
extensions: sal_Bool->bool
Change-Id: I1730f99c08690138e9aa7aba54304fd7bc51491d
Diffstat (limited to 'extensions')
103 files changed, 624 insertions, 628 deletions
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx index 871f4be90a81..8fd56ab149d3 100644 --- a/extensions/source/abpilot/abpfinalpage.cxx +++ b/extensions/source/abpilot/abpfinalpage.cxx @@ -66,19 +66,19 @@ namespace abp } - sal_Bool FinalPage::isValidName() const + bool FinalPage::isValidName() const { OUString sCurrentName(m_aName.GetText()); if (sCurrentName.isEmpty()) // the name must not be empty - return sal_False; + return false; if ( m_aInvalidDataSourceNames.find( sCurrentName ) != m_aInvalidDataSourceNames.end() ) // there already is a data source with this name - return sal_False; + return false; - return sal_True; + return true; } @@ -180,9 +180,9 @@ namespace abp void FinalPage::implCheckName() { - sal_Bool bValidName = isValidName(); - sal_Bool bEmptyName = m_aName.GetText().isEmpty(); - sal_Bool bEmptyLocation = m_aLocation.GetText().isEmpty(); + bool bValidName = isValidName(); + bool bEmptyName = m_aName.GetText().isEmpty(); + bool bEmptyLocation = m_aLocation.GetText().isEmpty(); // enable or disable the finish button getDialog()->enableButtons( WZB_FINISH, !bEmptyLocation && (!m_aRegisterName.IsChecked() || bValidName) ); @@ -201,7 +201,7 @@ namespace abp IMPL_LINK_NOARG(FinalPage, OnRegister) { - sal_Bool bEnable = m_aRegisterName.IsChecked(); + bool bEnable = m_aRegisterName.IsChecked(); m_aNameLabel.Enable(bEnable); m_aName.Enable(bEnable); implCheckName(); diff --git a/extensions/source/abpilot/abpfinalpage.hxx b/extensions/source/abpilot/abpfinalpage.hxx index eb77393ae17f..d972c46ef628 100644 --- a/extensions/source/abpilot/abpfinalpage.hxx +++ b/extensions/source/abpilot/abpfinalpage.hxx @@ -71,7 +71,7 @@ namespace abp DECL_LINK( OnNameModified, Edit* ); DECL_LINK(OnRegister, void *); - sal_Bool isValidName() const; + bool isValidName() const; void implCheckName(); void setFields(); }; diff --git a/extensions/source/abpilot/abpservices.cxx b/extensions/source/abpilot/abpservices.cxx index efa0867c4441..06e9ffdf6eee 100644 --- a/extensions/source/abpilot/abpservices.cxx +++ b/extensions/source/abpilot/abpservices.cxx @@ -27,12 +27,12 @@ using namespace ::com::sun::star::registry; extern "C" void SAL_CALL abp_initializeModule() { - static sal_Bool s_bInit = sal_False; + static bool s_bInit = false; if (!s_bInit) { createRegistryInfo_OABSPilotUno(); ::abp::OModule::setResourceFilePrefix("abp"); - s_bInit = sal_True; + s_bInit = true; } } diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx index cfad994c9d7a..d4445b0da1de 100644 --- a/extensions/source/abpilot/abspilot.cxx +++ b/extensions/source/abpilot/abspilot.cxx @@ -263,7 +263,7 @@ namespace abp // no break here case STATE_INVOKE_ADMIN_DIALOG: - if ( !connectToDataSource( sal_False ) ) + if ( !connectToDataSource( false ) ) { // connecting did not succeed -> do not allow proceeding bAllow = false; @@ -401,7 +401,7 @@ namespace abp } - sal_Bool OAddessBookSourcePilot::connectToDataSource( sal_Bool _bForceReConnect ) + bool OAddessBookSourcePilot::connectToDataSource( bool _bForceReConnect ) { DBG_ASSERT( m_aNewDataSource.isValid(), "OAddessBookSourcePilot::implConnect: invalid current data source!" ); diff --git a/extensions/source/abpilot/abspilot.hxx b/extensions/source/abpilot/abspilot.hxx index 3ffa3b19b74f..9a83389b193e 100644 --- a/extensions/source/abpilot/abspilot.hxx +++ b/extensions/source/abpilot/abspilot.hxx @@ -60,7 +60,7 @@ namespace abp const ODataSource& getDataSource() const { return m_aNewDataSource; } - sal_Bool connectToDataSource( sal_Bool _bForceReConnect ); + bool connectToDataSource( bool _bForceReConnect ); void travelNext( ) { OAddessBookSourcePilot_Base::travelNext(); } @@ -93,26 +93,26 @@ namespace abp /// guesses a default for the table name, if no valid table is selected void implDefaultTableName(); - inline sal_Bool needAdminInvokationPage( AddressSourceType _eType ) const + inline bool needAdminInvokationPage( AddressSourceType _eType ) const { return ( ( AST_LDAP == _eType ) || ( AST_OTHER == _eType ) ); } /// check if with the current settings, we would need to invoke he administration dialog for more details about the data source - inline sal_Bool needAdminInvokationPage() const + inline bool needAdminInvokationPage() const { return needAdminInvokationPage( m_aSettings.eType ); } - inline sal_Bool needManualFieldMapping( AddressSourceType _eType ) const + inline bool needManualFieldMapping( AddressSourceType _eType ) const { return ( AST_OTHER == _eType ) || ( AST_KAB == _eType ) || ( AST_EVOLUTION == _eType ) || ( AST_EVOLUTION_GROUPWISE == _eType ) || ( AST_EVOLUTION_LDAP == _eType ); } /// checks if we need a manual (user-guided) field mapping - inline sal_Bool needManualFieldMapping() const + inline bool needManualFieldMapping() const { return needManualFieldMapping( m_aSettings.eType ); } diff --git a/extensions/source/abpilot/admininvokationimpl.cxx b/extensions/source/abpilot/admininvokationimpl.cxx index 6ad36a948437..955c10952e17 100644 --- a/extensions/source/abpilot/admininvokationimpl.cxx +++ b/extensions/source/abpilot/admininvokationimpl.cxx @@ -59,10 +59,10 @@ namespace abp } - sal_Bool OAdminDialogInvokation::invokeAdministration( sal_Bool _bFixedType ) + bool OAdminDialogInvokation::invokeAdministration( bool _bFixedType ) { if (!m_xContext.is()) - return sal_False; + return false; try { @@ -107,7 +107,7 @@ namespace abp if (xDialog.is()) { // execute it if (xDialog->execute()) - return sal_True; + return true; } else ShowServiceNotAvailableError(m_pMessageParent, s_sAdministrationServiceName, true); @@ -116,7 +116,7 @@ namespace abp { OSL_FAIL("OAdminDialogInvokation::invokeAdministration: caught an exception while executing the dialog!"); } - return sal_False; + return false; } diff --git a/extensions/source/abpilot/admininvokationimpl.hxx b/extensions/source/abpilot/admininvokationimpl.hxx index c24487d2d372..32d895e0a367 100644 --- a/extensions/source/abpilot/admininvokationimpl.hxx +++ b/extensions/source/abpilot/admininvokationimpl.hxx @@ -45,7 +45,7 @@ namespace abp Window* _pMessageParent ); - sal_Bool invokeAdministration( sal_Bool _bFixedType ); + bool invokeAdministration( bool _bFixedType ); }; } diff --git a/extensions/source/abpilot/admininvokationpage.cxx b/extensions/source/abpilot/admininvokationpage.cxx index a237eb365f88..b1e6a8f608b6 100644 --- a/extensions/source/abpilot/admininvokationpage.cxx +++ b/extensions/source/abpilot/admininvokationpage.cxx @@ -35,7 +35,7 @@ namespace abp ,m_aExplanation (this, ModuleRes(FT_ADMINEXPLANATION)) ,m_aInvokeAdminDialog (this, ModuleRes(PB_INVOKE_ADMIN_DIALOG)) ,m_aErrorMessage (this, ModuleRes(FT_ERROR)) - ,m_bSuccessfullyExecutedDialog(sal_False) + ,m_bSuccessfullyExecutedDialog(false) { FreeResource(); @@ -52,7 +52,7 @@ namespace abp void AdminDialogInvokationPage::implUpdateErrorMessage() { - const sal_Bool bIsConnected = getDialog()->getDataSource().isConnected(); + const bool bIsConnected = getDialog()->getDataSource().isConnected(); m_aErrorMessage.Show( !bIsConnected ); } @@ -67,7 +67,7 @@ namespace abp void AdminDialogInvokationPage::implTryConnect() { - getDialog()->connectToDataSource( sal_True ); + getDialog()->connectToDataSource( true ); // show our error message if and only if we could not connect implUpdateErrorMessage(); diff --git a/extensions/source/abpilot/admininvokationpage.hxx b/extensions/source/abpilot/admininvokationpage.hxx index 69517bbe71d6..8de6e52e3478 100644 --- a/extensions/source/abpilot/admininvokationpage.hxx +++ b/extensions/source/abpilot/admininvokationpage.hxx @@ -37,7 +37,7 @@ namespace abp PushButton m_aInvokeAdminDialog; FixedText m_aErrorMessage; - sal_Bool m_bSuccessfullyExecutedDialog; + bool m_bSuccessfullyExecutedDialog; public: AdminDialogInvokationPage( OAddessBookSourcePilot* _pParent ); diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index c8372da0895e..c9e71eaaea2c 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -306,11 +306,11 @@ namespace abp xConnection; StringBag aTables; // the cached table names OUString sName; - sal_Bool bTablesUpToDate; // table name cache up-to-date? + bool bTablesUpToDate; // table name cache up-to-date? ODataSourceImpl( const Reference< XComponentContext >& _rxORB ) :xORB( _rxORB ) - ,bTablesUpToDate( sal_False ) + ,bTablesUpToDate( false ) { } @@ -433,14 +433,14 @@ namespace abp } - sal_Bool ODataSource::rename( const OUString& _rName ) SAL_THROW (( )) + bool ODataSource::rename( const OUString& _rName ) SAL_THROW (( )) { if (!isValid()) // nothing to do - return sal_False; + return false; m_pImpl->sName = _rName; - return sal_True; + return true; } @@ -497,16 +497,16 @@ namespace abp } // now the table cache is up-to-date - m_pImpl->bTablesUpToDate = sal_True; + m_pImpl->bTablesUpToDate = true; return m_pImpl->aTables; } - sal_Bool ODataSource::connect( Window* _pMessageParent ) SAL_THROW (( )) + bool ODataSource::connect( Window* _pMessageParent ) SAL_THROW (( )) { if ( isConnected( ) ) // nothing to do - return sal_True; + return true; // create the interaction handler (needed for authentication and error handling) @@ -528,7 +528,7 @@ namespace abp OUString s_sInteractionHandlerServiceName("com.sun.star.task.InteractionHandler"); if ( _pMessageParent ) ShowServiceNotAvailableError( _pMessageParent, s_sInteractionHandlerServiceName, true ); - return sal_False; + return false; } @@ -581,15 +581,15 @@ namespace abp } if ( !xConnection.is() ) - return sal_False; + return false; // success m_pImpl->xConnection.reset( xConnection ); m_pImpl->aTables.clear(); - m_pImpl->bTablesUpToDate = sal_False; + m_pImpl->bTablesUpToDate = false; - return sal_True; + return true; } @@ -597,17 +597,17 @@ namespace abp { m_pImpl->xConnection.clear(); m_pImpl->aTables.clear(); - m_pImpl->bTablesUpToDate = sal_False; + m_pImpl->bTablesUpToDate = false; } - sal_Bool ODataSource::isConnected( ) const SAL_THROW (( )) + bool ODataSource::isConnected( ) const SAL_THROW (( )) { return m_pImpl->xConnection.is(); } - sal_Bool ODataSource::isValid() const SAL_THROW (( )) + bool ODataSource::isValid() const SAL_THROW (( )) { return m_pImpl && m_pImpl->xDataSource.is(); } diff --git a/extensions/source/abpilot/datasourcehandling.hxx b/extensions/source/abpilot/datasourcehandling.hxx index b4d71ffa4ab0..1991d291b5d0 100644 --- a/extensions/source/abpilot/datasourcehandling.hxx +++ b/extensions/source/abpilot/datasourcehandling.hxx @@ -133,7 +133,7 @@ namespace abp /// checks whether or not the object represents a valid data source - sal_Bool isValid() const SAL_THROW (( )); + bool isValid() const SAL_THROW (( )); /// removes the data source represented by the object from the data source context @@ -145,7 +145,7 @@ namespace abp getName() const SAL_THROW (( )); /// renames the data source - sal_Bool rename( const OUString& _rName ) SAL_THROW (( )); + bool rename( const OUString& _rName ) SAL_THROW (( )); // TODO: put this into the context class @@ -157,10 +157,10 @@ namespace abp at all. @see isConnected */ - sal_Bool connect( Window* _pMessageParent ) SAL_THROW (( )); + bool connect( Window* _pMessageParent ) SAL_THROW (( )); /// returns <TRUE/> if the object has a valid connection, obtained from it's data source - sal_Bool isConnected( ) const SAL_THROW (( )); + bool isConnected( ) const SAL_THROW (( )); /// disconnects from the data source (i.e. disposes the UNO connection hold internally) void disconnect( ) SAL_THROW (( )); diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx index 0104374b2a05..1f72151daf05 100644 --- a/extensions/source/abpilot/fieldmappingimpl.cxx +++ b/extensions/source/abpilot/fieldmappingimpl.cxx @@ -69,7 +69,7 @@ namespace abp - sal_Bool invokeDialog( const Reference< XComponentContext >& _rxORB, class Window* _pParent, + bool invokeDialog( const Reference< XComponentContext >& _rxORB, class Window* _pParent, const Reference< XPropertySet >& _rxDataSource, AddressSettings& _rSettings ) SAL_THROW ( ( ) ) { _rSettings.aFieldMapping.clear(); @@ -77,7 +77,7 @@ namespace abp DBG_ASSERT( _rxORB.is(), "fieldmapping::invokeDialog: invalid service factory!" ); DBG_ASSERT( _rxDataSource.is(), "fieldmapping::invokeDialog: invalid data source!" ); if ( !_rxORB.is() || !_rxDataSource.is() ) - return sal_False; + return false; try { @@ -102,7 +102,7 @@ namespace abp Sequence< AliasProgrammaticPair > aMapping; #ifdef DBG_UTIL - sal_Bool bSuccess = + bool bSuccess = #endif xDialogProps->getPropertyValue("FieldMapping") >>= aMapping; DBG_ASSERT( bSuccess, "fieldmapping::invokeDialog: invalid property type for FieldMapping!" ); @@ -113,7 +113,7 @@ namespace abp for (;pMapping != pMappingEnd; ++pMapping) _rSettings.aFieldMapping[ pMapping->ProgrammaticName ] = pMapping->Alias; - return sal_True; + return true; } } @@ -121,7 +121,7 @@ namespace abp { OSL_FAIL("fieldmapping::invokeDialog: caught an exception while executing the dialog!"); } - return sal_False; + return false; } @@ -326,7 +326,7 @@ namespace abp _rxContext, sAddressBookNodeName, -1, OConfigurationTreeRoot::CM_UPDATABLE); // set the flag - aAddressBookSettings.setNodeValue( OUString( "AutoPilotCompleted" ), makeAny( (sal_Bool)sal_True ) ); + aAddressBookSettings.setNodeValue( OUString( "AutoPilotCompleted" ), makeAny( true ) ); // commit the changes done aAddressBookSettings.commit(); diff --git a/extensions/source/abpilot/fieldmappingimpl.hxx b/extensions/source/abpilot/fieldmappingimpl.hxx index 4e56ca3d422c..2fca1952dd1d 100644 --- a/extensions/source/abpilot/fieldmappingimpl.hxx +++ b/extensions/source/abpilot/fieldmappingimpl.hxx @@ -59,7 +59,7 @@ namespace abp structure will be filled with the settings the user did in the field mapping dialog. */ - sal_Bool invokeDialog( + bool invokeDialog( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB, class Window* _pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDataSource, diff --git a/extensions/source/bibliography/bibbeam.cxx b/extensions/source/bibliography/bibbeam.cxx index 7503b7ab5e7a..c48327763351 100644 --- a/extensions/source/bibliography/bibbeam.cxx +++ b/extensions/source/bibliography/bibbeam.cxx @@ -47,7 +47,7 @@ namespace bib using namespace ::com::sun::star::uno; - void HandleTaskPaneList( Window* pWindow, sal_Bool bAddToList ) + void HandleTaskPaneList( Window* pWindow, bool bAddToList ) { Window* pParent = pWindow->GetParent(); diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx index 590cc5107641..c9d0af0c9d65 100644 --- a/extensions/source/bibliography/bibconfig.cxx +++ b/extensions/source/bibliography/bibconfig.cxx @@ -298,7 +298,7 @@ const Mapping* BibConfig::GetMapping(const BibDBDescriptor& rDesc) const for(sal_uInt16 i = 0; i < pMappingsArr->size(); i++) { Mapping& rMapping = (*pMappingsArr)[i]; - sal_Bool bURLEqual = rDesc.sDataSource.equals(rMapping.sURL); + bool bURLEqual = rDesc.sDataSource.equals(rMapping.sURL); if(rDesc.sTableOrQuery == rMapping.sTableName && bURLEqual) return &rMapping; } @@ -310,7 +310,7 @@ void BibConfig::SetMapping(const BibDBDescriptor& rDesc, const Mapping* pSetMapp for(sal_uInt16 i = 0; i < pMappingsArr->size(); i++) { Mapping& rMapping = (*pMappingsArr)[i]; - sal_Bool bURLEqual = rDesc.sDataSource.equals(rMapping.sURL); + bool bURLEqual = rDesc.sDataSource.equals(rMapping.sURL); if(rDesc.sTableOrQuery == rMapping.sTableName && bURLEqual) { pMappingsArr->erase(pMappingsArr->begin()+i); diff --git a/extensions/source/bibliography/bibconfig.hxx b/extensions/source/bibliography/bibconfig.hxx index 3c8cbb0f6874..4bca1a9208f5 100644 --- a/extensions/source/bibliography/bibconfig.hxx +++ b/extensions/source/bibliography/bibconfig.hxx @@ -97,7 +97,7 @@ class BibConfig : public utl::ConfigItem MappingArray* pMappingsArr; long nBeamerSize; long nViewSize; - sal_Bool bShowColumnAssignmentWarning; + bool bShowColumnAssignmentWarning; OUString aColumnDefaults[COLUMN_COUNT]; @@ -130,9 +130,9 @@ public: const OUString& getQueryText() const {return sQueryText;} void setQueryText(const OUString& rSet) {SetModified(); sQueryText = rSet;} - sal_Bool IsShowColumnAssignmentWarning() const + bool IsShowColumnAssignmentWarning() const { return bShowColumnAssignmentWarning;} - void SetShowColumnAssignmentWarning(sal_Bool bSet) + void SetShowColumnAssignmentWarning(bool bSet) { bShowColumnAssignmentWarning = bSet;} }; diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx index 21be478b5d48..3dfd6bf1cb9c 100644 --- a/extensions/source/bibliography/bibcont.cxx +++ b/extensions/source/bibliography/bibcont.cxx @@ -37,9 +37,9 @@ BibShortCutHandler::~BibShortCutHandler() { } -sal_Bool BibShortCutHandler::HandleShortCutKey( const KeyEvent& ) +bool BibShortCutHandler::HandleShortCutKey( const KeyEvent& ) { - return sal_False; + return false; } @@ -115,9 +115,9 @@ void BibWindowContainer::GetFocus() GetChild()->GrabFocus(); } -sal_Bool BibWindowContainer::HandleShortCutKey( const KeyEvent& rKeyEvent ) +bool BibWindowContainer::HandleShortCutKey( const KeyEvent& rKeyEvent ) { - return pChild? pChild->HandleShortCutKey( rKeyEvent ) : sal_False; + return pChild && pChild->HandleShortCutKey( rKeyEvent ); } @@ -245,9 +245,9 @@ bool BibBookContainer::PreNotify( NotifyEvent& rNEvt ) return nHandled; } -sal_Bool BibBookContainer::HandleShortCutKey( const KeyEvent& rKeyEvent ) +bool BibBookContainer::HandleShortCutKey( const KeyEvent& rKeyEvent ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( pTopWin ) bRet = pTopWin->HandleShortCutKey( rKeyEvent ); diff --git a/extensions/source/bibliography/bibcont.hxx b/extensions/source/bibliography/bibcont.hxx index 3d4d4d6040c2..67f7241973fe 100644 --- a/extensions/source/bibliography/bibcont.hxx +++ b/extensions/source/bibliography/bibcont.hxx @@ -47,7 +47,7 @@ class BibWindowContainer : public BibWindow //Window virtual void GetFocus() SAL_OVERRIDE; - virtual sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent ) SAL_OVERRIDE; // returns true, if key was handled + virtual bool HandleShortCutKey( const KeyEvent& rKeyEvent ) SAL_OVERRIDE; // returns true, if key was handled using Window::GetChild; }; @@ -96,7 +96,7 @@ class BibBookContainer: public BibSplitWindow virtual void GetFocus() SAL_OVERRIDE; - virtual sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent ) SAL_OVERRIDE; // returns true, if key was handled + virtual bool HandleShortCutKey( const KeyEvent& rKeyEvent ) SAL_OVERRIDE; // returns true, if key was handled }; #endif diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index 9854f533304e..f6876cb29368 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -358,11 +358,11 @@ Reference< XNameAccess > BibliographyLoader::GetDataColumns() const Any aResultSetCurrency; aResultSetCurrency <<= (sal_Int32)(ResultSetConcurrency::UPDATABLE); xResultSetProps->setPropertyValue("ResultSetConcurrency", aResultSetCurrency); - sal_Bool bSuccess = sal_False; + bool bSuccess = false; try { xRowSet->execute(); - bSuccess = sal_True; + bSuccess = true; } catch(const SQLException&) { @@ -371,7 +371,7 @@ Reference< XNameAccess > BibliographyLoader::GetDataColumns() const catch(const Exception& ) { DBG_UNHANDLED_EXCEPTION(); - bSuccess = sal_False; + bSuccess = false; } if (!bSuccess) @@ -533,7 +533,7 @@ Sequence< OUString > BibliographyLoader::getElementNames(void) throw ( RuntimeEx sal_Bool BibliographyLoader::hasByName(const OUString& rName) throw ( RuntimeException, std::exception ) { - sal_Bool bRet = sal_False; + bool bRet = false; try { Reference< XResultSet > xCursor = GetDataCursor(); @@ -546,7 +546,7 @@ sal_Bool BibliographyLoader::hasByName(const OUString& rName) throw ( RuntimeExc OUString sCurrentId = xIdColumn->getString(); if (!xIdColumn->wasNull() && rName.startsWith(sCurrentId)) { - bRet = sal_True; + bRet = true; break; } } diff --git a/extensions/source/bibliography/bibshortcuthandler.hxx b/extensions/source/bibliography/bibshortcuthandler.hxx index 1f17d20037ea..890054479871 100644 --- a/extensions/source/bibliography/bibshortcuthandler.hxx +++ b/extensions/source/bibliography/bibshortcuthandler.hxx @@ -38,7 +38,7 @@ protected: public: virtual ~BibShortCutHandler(); - virtual sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled + virtual bool HandleShortCutKey( const KeyEvent& rKeyEvent ); // returns true, if key was handled inline Window* GetWindow( void ); }; diff --git a/extensions/source/bibliography/bibtools.hxx b/extensions/source/bibliography/bibtools.hxx index cb784656445c..276d99db4947 100644 --- a/extensions/source/bibliography/bibtools.hxx +++ b/extensions/source/bibliography/bibtools.hxx @@ -25,17 +25,17 @@ namespace bib { // source in bibbeam.cxx - void HandleTaskPaneList( Window* pWindow, sal_Bool bAddToList ); + void HandleTaskPaneList( Window* pWindow, bool bAddToList ); // pWindow: just an system window or something which is child of a system window inline void AddToTaskPaneList( Window* pWindowToBeHandled ) { - HandleTaskPaneList( pWindowToBeHandled, sal_True ); + HandleTaskPaneList( pWindowToBeHandled, true ); } inline void RemoveFromTaskPaneList( Window* pWindowToBeHandled ) { - HandleTaskPaneList( pWindowToBeHandled, sal_False ); + HandleTaskPaneList( pWindowToBeHandled, false ); } } diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx index 9ecf8807b84d..b13740b74e9c 100644 --- a/extensions/source/bibliography/bibview.cxx +++ b/extensions/source/bibliography/bibview.cxx @@ -73,7 +73,7 @@ namespace bib if ( xResUpd.is() ) { Any aModified = xProps->getPropertyValue( "IsModified" ); - sal_Bool bFlag = sal_False; + bool bFlag = false; if ( ( aModified >>= bFlag ) && bFlag ) { @@ -124,12 +124,12 @@ namespace bib OUString sErrorString( m_pGeneralPage->GetErrorString() ); if ( !sErrorString.isEmpty() ) { - sal_Bool bExecute = BibModul::GetConfig()->IsShowColumnAssignmentWarning(); + bool bExecute = BibModul::GetConfig()->IsShowColumnAssignmentWarning(); if(!m_pDatMan->HasActiveConnection()) { //no connection is available -> the data base has to be assigned m_pDatMan->DispatchDBChangeDialog(); - bExecute = sal_False; + bExecute = false; } else if(bExecute) { @@ -142,7 +142,7 @@ namespace bib !aQuery.GetCheckBoxState()); if( RET_YES != nResult ) { - bExecute = sal_False; + bExecute = false; } } if(bExecute) @@ -194,9 +194,9 @@ namespace bib m_pGeneralPage->GrabFocus(); } - sal_Bool BibView::HandleShortCutKey( const KeyEvent& rKeyEvent ) + bool BibView::HandleShortCutKey( const KeyEvent& rKeyEvent ) { - return m_pGeneralPage? m_pGeneralPage->HandleShortCutKey( rKeyEvent ) : sal_False; + return m_pGeneralPage && m_pGeneralPage->HandleShortCutKey( rKeyEvent ); } diff --git a/extensions/source/bibliography/bibview.hxx b/extensions/source/bibliography/bibview.hxx index 1ba445eaa46f..a8d73ad7408a 100644 --- a/extensions/source/bibliography/bibview.hxx +++ b/extensions/source/bibliography/bibview.hxx @@ -66,7 +66,7 @@ namespace bib virtual void GetFocus() SAL_OVERRIDE; - virtual sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent ) SAL_OVERRIDE; // returns true, if key was handled + virtual bool HandleShortCutKey( const KeyEvent& rKeyEvent ) SAL_OVERRIDE; // returns true, if key was handled }; diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index 446b895efab2..28bbd27208df 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -263,7 +263,7 @@ class MappingDialog_Impl : public ModalDialog ListBox* aListBoxes[COLUMN_COUNT]; OUString sNone; - sal_Bool bModified; + bool bModified; @@ -274,7 +274,7 @@ public: MappingDialog_Impl(Window* pParent, BibDataManager* pDatMan); virtual ~MappingDialog_Impl(); - void SetModified() {bModified = sal_True;} + void SetModified() {bModified = true;} }; @@ -361,7 +361,7 @@ MappingDialog_Impl::MappingDialog_Impl(Window* pParent, BibDataManager* pMan) : aCustom5FT(this, BibResId( FT_CUSTOM5 )), aCustom5LB(this, BibResId( LB_CUSTOM5 )), sNone(BIB_RESSTR(ST_NONE)), - bModified(sal_False) + bModified(false) { FreeResource(); @@ -742,7 +742,7 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid) OUString sCurrentModelType; const OUString sType("Type"); sal_Int32 nType = 0; - sal_Bool bIsFormatted = sal_False; + bool bIsFormatted = false; sal_Bool bFormattedIsNumeric = sal_True; xField->getPropertyValue(sType) >>= nType; switch(nType) @@ -767,7 +767,7 @@ void BibDataManager::InsertFields(const Reference< XFormComponent > & _rxGrid) // _NO_ break ! default: sCurrentModelType = "FormattedField"; - bIsFormatted = sal_True; + bIsFormatted = true; break; } @@ -1239,7 +1239,7 @@ sal_Bool SAL_CALL BibDataManager::isLoaded( ) throw (RuntimeException, std::exc Reference< XLoadable >xFormAsLoadable( m_xForm, UNO_QUERY ); DBG_ASSERT( xFormAsLoadable.is() || !m_xForm.is(), "BibDataManager::isLoaded: invalid form!"); - sal_Bool bLoaded = sal_False; + bool bLoaded = false; if ( xFormAsLoadable.is() ) bLoaded = xFormAsLoadable->isLoaded(); return bLoaded; @@ -1336,7 +1336,7 @@ OUString BibDataManager::getControlName(sal_Int32 nFormatKey ) } Reference< awt::XControlModel > BibDataManager::loadControlModel( - const OUString& rName, sal_Bool bForceListBox) + const OUString& rName, bool bForceListBox) { Reference< awt::XControlModel > xModel; OUString aName("View_"); @@ -1376,7 +1376,7 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel( xPropSet->setPropertyValue( FM_PROP_NAME,aFieldName); xPropSet->setPropertyValue( FM_PROP_CONTROLSOURCE, makeAny( rName ) ); - xPropSet->setPropertyValue("NativeWidgetLook", makeAny( (sal_Bool)sal_True ) ); + xPropSet->setPropertyValue("NativeWidgetLook", makeAny( true ) ); Reference< XFormComponent > aFormComp(xModel,UNO_QUERY ); @@ -1627,9 +1627,9 @@ void BibDataManager::RegisterInterceptor( ::bib::BibBeamer* pBibBeamer) } -sal_Bool BibDataManager::HasActiveConnection()const +bool BibDataManager::HasActiveConnection()const { - sal_Bool bRet = sal_False; + bool bRet = false; Reference< XPropertySet > xPrSet( m_xForm, UNO_QUERY ); if( xPrSet.is() ) { @@ -1640,7 +1640,7 @@ sal_Bool BibDataManager::HasActiveConnection()const return bRet; } -sal_Bool BibDataManager::HasActiveConnection() +bool BibDataManager::HasActiveConnection() { return getConnection( m_xForm ).is(); } diff --git a/extensions/source/bibliography/datman.hxx b/extensions/source/bibliography/datman.hxx index 9e7fa2ff5528..23580fe8901b 100644 --- a/extensions/source/bibliography/datman.hxx +++ b/extensions/source/bibliography/datman.hxx @@ -145,46 +145,46 @@ public: ::com::sun::star::uno::Sequence< OUString> getDataSources(); - OUString getActiveDataSource() {return aDataSourceURL;} + OUString getActiveDataSource() {return aDataSourceURL;} void setActiveDataSource(const OUString& rURL); - OUString getActiveDataTable(); + OUString getActiveDataTable(); void setActiveDataTable(const OUString& rTable); void setFilter(const OUString& rQuery); - OUString getFilter(); + OUString getFilter(); ::com::sun::star::uno::Sequence< OUString> getQueryFields(); - OUString getQueryField(); + OUString getQueryField(); void startQueryWith(const OUString& rQuery); const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer >& getParser() { return m_xParser; } const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& getForm() { return m_xForm; } - OUString getControlName(sal_Int32 nFormatKey ); + OUString getControlName(sal_Int32 nFormatKey ); ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > loadControlModel(const OUString& rName, - sal_Bool bForceListBox = sal_False); + bool bForceListBox = false); void CreateMappingDialog(Window* pParent); - OUString CreateDBChangeDialog(Window* pParent); + OUString CreateDBChangeDialog(Window* pParent); void DispatchDBChangeDialog(); - sal_Bool HasActiveConnection() const; + bool HasActiveConnection() const; void SetView( ::bib::BibView* pView ) { pBibView = pView; } void SetToolbar(BibToolBar* pSet); - const OUString& GetIdentifierMapping(); + const OUString& GetIdentifierMapping(); void ResetIdentifierMapping() {sIdentifierMapping = OUString();} ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > GetFormController(); // #100312# ---------- - void RegisterInterceptor( ::bib::BibBeamer* pBibBeamer); + void RegisterInterceptor( ::bib::BibBeamer* pBibBeamer); - sal_Bool HasActiveConnection(); + bool HasActiveConnection(); }; diff --git a/extensions/source/bibliography/formcontrolcontainer.cxx b/extensions/source/bibliography/formcontrolcontainer.cxx index 7081523beff9..8a4f8b328769 100644 --- a/extensions/source/bibliography/formcontrolcontainer.cxx +++ b/extensions/source/bibliography/formcontrolcontainer.cxx @@ -81,8 +81,8 @@ namespace bib struct ControlModeSwitch : public ::std::unary_function< Reference< XControl >, void > { - sal_Bool bDesign; - ControlModeSwitch( sal_Bool _bDesign ) : bDesign( _bDesign ) { } + bool bDesign; + ControlModeSwitch( bool _bDesign ) : bDesign( _bDesign ) { } void operator() ( const Reference< XControl >& _rxControl ) const { @@ -91,7 +91,7 @@ namespace bib } }; - void FormControlContainer::implSetDesignMode( sal_Bool _bDesign ) + void FormControlContainer::implSetDesignMode( bool _bDesign ) { try { @@ -120,12 +120,12 @@ namespace bib void FormControlContainer::_loaded( const ::com::sun::star::lang::EventObject& /*_rEvent*/ ) { - implSetDesignMode( sal_False ); + implSetDesignMode( false ); } void FormControlContainer::_unloading( const ::com::sun::star::lang::EventObject& /*_rEvent*/ ) { - implSetDesignMode( sal_True ); + implSetDesignMode( true ); } void FormControlContainer::_unloaded( const ::com::sun::star::lang::EventObject& /*_rEvent*/ ) @@ -134,12 +134,12 @@ namespace bib void FormControlContainer::_reloading( const ::com::sun::star::lang::EventObject& /*_rEvent*/ ) { - implSetDesignMode( sal_True ); + implSetDesignMode( true ); } void FormControlContainer::_reloaded( const ::com::sun::star::lang::EventObject& /*_rEvent*/ ) { - implSetDesignMode( sal_False ); + implSetDesignMode( false ); } diff --git a/extensions/source/bibliography/formcontrolcontainer.hxx b/extensions/source/bibliography/formcontrolcontainer.hxx index 18c30af5f3df..c7628f8d4cff 100644 --- a/extensions/source/bibliography/formcontrolcontainer.hxx +++ b/extensions/source/bibliography/formcontrolcontainer.hxx @@ -41,13 +41,13 @@ namespace bib ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > m_xForm; private: - void implSetDesignMode( sal_Bool _bDesign ); + void implSetDesignMode( bool _bDesign ); protected: FormControlContainer( ); virtual ~FormControlContainer( ); - sal_Bool isFormConnected() const { return NULL != m_pFormAdapter; } + bool isFormConnected() const { return NULL != m_pFormAdapter; } void connectForm( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable >& _rxForm ); void disconnectForm(); diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index 26200d123070..b569eb1c1543 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -66,44 +66,44 @@ struct DispatchInfo { const char* pCommand; sal_Int16 nGroupId; - sal_Bool bActiveConnection; + bool bActiveConnection; }; struct CacheDispatchInfo { sal_Int16 nGroupId; - sal_Bool bActiveConnection; + bool bActiveConnection; }; // Attention: commands must be sorted by command groups. Implementation is dependent // on this!! static const DispatchInfo SupportedCommandsArray[] = { - { ".uno:Undo" , frame::CommandGroup::EDIT , sal_False }, - { ".uno:Cut" , frame::CommandGroup::EDIT , sal_False }, - { ".uno:Copy" , frame::CommandGroup::EDIT , sal_False }, - { ".uno:Paste" , frame::CommandGroup::EDIT , sal_False }, - { ".uno:SelectAll" , frame::CommandGroup::EDIT , sal_False }, - { ".uno:CloseDoc" , frame::CommandGroup::DOCUMENT , sal_False }, - { ".uno:StatusBarVisible" , frame::CommandGroup::VIEW , sal_False }, - { ".uno:AvailableToolbars" , frame::CommandGroup::VIEW , sal_False }, - { ".uno:Bib/standardFilter" , frame::CommandGroup::DATA , sal_True }, - { ".uno:Bib/DeleteRecord" , frame::CommandGroup::DATA , sal_True }, - { ".uno:Bib/InsertRecord" , frame::CommandGroup::DATA , sal_True }, - { ".uno:Bib/query" , frame::CommandGroup::DATA , sal_True }, - { ".uno:Bib/autoFilter" , frame::CommandGroup::DATA , sal_True }, - { ".uno:Bib/source" , frame::CommandGroup::DATA , sal_True }, - { ".uno:Bib/removeFilter" , frame::CommandGroup::DATA , sal_True }, - { ".uno:Bib/sdbsource" , frame::CommandGroup::DATA , sal_True }, - { ".uno:Bib/Mapping" , frame::CommandGroup::DATA , sal_True }, - { 0 , 0 , sal_False } + { ".uno:Undo" , frame::CommandGroup::EDIT , false }, + { ".uno:Cut" , frame::CommandGroup::EDIT , false }, + { ".uno:Copy" , frame::CommandGroup::EDIT , false }, + { ".uno:Paste" , frame::CommandGroup::EDIT , false }, + { ".uno:SelectAll" , frame::CommandGroup::EDIT , false }, + { ".uno:CloseDoc" , frame::CommandGroup::DOCUMENT , false }, + { ".uno:StatusBarVisible" , frame::CommandGroup::VIEW , false }, + { ".uno:AvailableToolbars" , frame::CommandGroup::VIEW , false }, + { ".uno:Bib/standardFilter" , frame::CommandGroup::DATA , true }, + { ".uno:Bib/DeleteRecord" , frame::CommandGroup::DATA , true }, + { ".uno:Bib/InsertRecord" , frame::CommandGroup::DATA , true }, + { ".uno:Bib/query" , frame::CommandGroup::DATA , true }, + { ".uno:Bib/autoFilter" , frame::CommandGroup::DATA , true }, + { ".uno:Bib/source" , frame::CommandGroup::DATA , true }, + { ".uno:Bib/removeFilter" , frame::CommandGroup::DATA , true }, + { ".uno:Bib/sdbsource" , frame::CommandGroup::DATA , true }, + { ".uno:Bib/Mapping" , frame::CommandGroup::DATA , true }, + { 0 , 0 , false } }; typedef ::boost::unordered_map< OUString, CacheDispatchInfo, OUStringHash, ::std::equal_to< OUString > > CmdToInfoCache; const CmdToInfoCache& GetCommandToInfoCache() { - static sal_Bool bCacheInitialized = sal_False; + static bool bCacheInitialized = false; static CmdToInfoCache aCmdToInfoCache; if ( !bCacheInitialized ) @@ -122,7 +122,7 @@ const CmdToInfoCache& GetCommandToInfoCache() aCmdToInfoCache.insert( CmdToInfoCache::value_type( aCommand, aDispatchInfo )); ++i; } - bCacheInitialized = sal_True; + bCacheInitialized = true; } } @@ -186,8 +186,8 @@ BibFrameController_Impl::BibFrameController_Impl( const uno::Reference< awt::XWi { Window* pParent = VCLUnoHelper::GetWindow( xWindow ); pParent->SetUniqueId(UID_BIB_FRAME_WINDOW); - bDisposing=sal_False; - bHierarchical=sal_True; + bDisposing=false; + bHierarchical=true; pImp = new BibFrameCtrl_Impl; pImp->pController = this; pImp->acquire(); @@ -262,7 +262,7 @@ uno::Reference< XModel > BibFrameController_Impl::getModel() throw (::com::sun: void BibFrameController_Impl::dispose() throw (::com::sun::star::uno::RuntimeException, std::exception) { - bDisposing = sal_True; + bDisposing = true; lang::EventObject aObject; aObject.Source = (XController*)this; pImp->aLC.disposeAndClear(aObject); @@ -324,7 +324,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) { const CmdToInfoCache& rCmdCache = GetCommandToInfoCache(); - sal_Bool bGroupFound( sal_False ); + bool bGroupFound( false ); frame::DispatchInformation aDispatchInfo; std::list< frame::DispatchInformation > aDispatchInfoList; @@ -338,7 +338,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) { if ( pIter->second.nGroupId == nCommandGroup ) { - bGroupFound = sal_True; + bGroupFound = true; aDispatchInfo.Command = pIter->first; aDispatchInfo.GroupId = pIter->second.nGroupId; aDispatchInfoList.push_back( aDispatchInfo ); @@ -356,31 +356,31 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) return aSeq; } -sal_Bool canInsertRecords(const Reference< beans::XPropertySet>& _rxCursorSet) +bool canInsertRecords(const Reference< beans::XPropertySet>& _rxCursorSet) { sal_Int32 nPriv = 0; _rxCursorSet->getPropertyValue("Privileges") >>= nPriv; return ((_rxCursorSet.is() && (nPriv & sdbcx::Privilege::INSERT) != 0)); } -sal_Bool BibFrameController_Impl::SaveModified(const Reference< form::runtime::XFormController>& xController) +bool BibFrameController_Impl::SaveModified(const Reference< form::runtime::XFormController>& xController) { if (!xController.is()) - return sal_False; + return false; Reference< XResultSetUpdate> _xCursor = Reference< XResultSetUpdate>(xController->getModel(), UNO_QUERY); if (!_xCursor.is()) - return sal_False; + return false; Reference< beans::XPropertySet> _xSet = Reference< beans::XPropertySet>(_xCursor, UNO_QUERY); if (!_xSet.is()) - return sal_False; + return false; // need to save? - sal_Bool bIsNew = ::comphelper::getBOOL(_xSet->getPropertyValue("IsNew")); - sal_Bool bIsModified = ::comphelper::getBOOL(_xSet->getPropertyValue("IsModified")); - sal_Bool bResult = !bIsModified; + bool bIsNew = ::comphelper::getBOOL(_xSet->getPropertyValue("IsNew")); + bool bIsModified = ::comphelper::getBOOL(_xSet->getPropertyValue("IsModified")); + bool bResult = !bIsModified; if (bIsModified) { try @@ -389,7 +389,7 @@ sal_Bool BibFrameController_Impl::SaveModified(const Reference< form::runtime::X _xCursor->insertRow(); else _xCursor->updateRow(); - bResult = sal_True; + bResult = true; } catch(const Exception&) { @@ -555,15 +555,15 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen Reference< ::com::sun::star::sdbc::XResultSet > xCursor(pDatMan->getForm(), UNO_QUERY); Reference< XResultSetUpdate > xUpdateCursor(xCursor, UNO_QUERY); Reference< beans::XPropertySet > xSet(pDatMan->getForm(), UNO_QUERY); - sal_Bool bIsNew = ::comphelper::getBOOL(xSet->getPropertyValue("IsNew")); + bool bIsNew = ::comphelper::getBOOL(xSet->getPropertyValue("IsNew")); if(!bIsNew) { sal_uInt32 nCount = 0; xSet->getPropertyValue("RowCount") >>= nCount; // determine next position - sal_Bool bSuccess = sal_False; - sal_Bool bLeft = sal_False; - sal_Bool bRight = sal_False; + bool bSuccess = false; + bool bLeft = false; + bool bRight = false; try { bLeft = xCursor->isLast() && nCount > 1; @@ -586,7 +586,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen } catch(const Exception&) { - bSuccess = sal_False; + bSuccess = false; } if (bSuccess) { @@ -594,7 +594,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen xCursor->relative(bRight ? 1 : -1); else { - sal_Bool bCanInsert = canInsertRecords(xSet); + bool bCanInsert = canInsertRecords(xSet); // can another entry be inserted? try { @@ -665,7 +665,7 @@ void BibFrameController_Impl::addStatusListener( if ( aURL.Path == "StatusBarVisible" ) { aEvent.IsEnabled = sal_False; - aEvent.State <<= sal_Bool( sal_False ); + aEvent.State <<= false; } else if ( aURL.Path == "Bib/hierarchical" ) { @@ -765,7 +765,7 @@ void BibFrameController_Impl::addStatusListener( Reference< ::com::sun::star::sdbc::XResultSet > xCursor(pDatMan->getForm(), UNO_QUERY); Reference< XResultSetUpdate > xUpdateCursor(xCursor, UNO_QUERY); Reference< beans::XPropertySet > xSet(pDatMan->getForm(), UNO_QUERY); - sal_Bool bIsNew = ::comphelper::getBOOL(xSet->getPropertyValue("IsNew")); + bool bIsNew = ::comphelper::getBOOL(xSet->getPropertyValue("IsNew")); if(!bIsNew) { sal_uInt32 nCount = 0; @@ -793,7 +793,7 @@ void BibFrameController_Impl::removeStatusListener( for ( sal_uInt16 n=0; n<nCount; n++ ) { BibStatusDispatch *pObj = &aStatusListeners[n]; - sal_Bool bFlag=pObj->xListener.is(); + bool bFlag=pObj->xListener.is(); if (!bFlag || (pObj->xListener == aObject && ( aURL.Complete.isEmpty() || pObj->aURL.Path == aURL.Path ))) { @@ -811,8 +811,8 @@ void BibFrameController_Impl::RemoveFilter() sal_uInt16 nCount = aStatusListeners.size(); - sal_Bool bRemoveFilter=sal_False; - sal_Bool bQueryText=sal_False; + bool bRemoveFilter=false; + bool bQueryText=false; for ( sal_uInt16 n=0; n<nCount; n++ ) { @@ -825,7 +825,7 @@ void BibFrameController_Impl::RemoveFilter() aEvent.Requery = sal_False; aEvent.Source = (XDispatch *) this; pObj->xListener->statusChanged( aEvent ); - bRemoveFilter=sal_True; + bRemoveFilter=true; } else if(pObj->aURL.Path == "Bib/query") { @@ -836,7 +836,7 @@ void BibFrameController_Impl::RemoveFilter() aEvent.Source = (XDispatch *) this; aEvent.State <<= aQuery; pObj->xListener->statusChanged( aEvent ); - bQueryText=sal_True; + bQueryText=true; } if(bRemoveFilter && bQueryText) @@ -872,8 +872,8 @@ void BibFrameController_Impl::ChangeDataSource(const uno::Sequence< beans::Prope sal_uInt16 nCount = aStatusListeners.size(); - sal_Bool bMenuFilter=sal_False; - sal_Bool bQueryText=sal_False; + bool bMenuFilter=false; + bool bQueryText=false; for ( sal_uInt16 n=0; n<nCount; n++ ) { BibStatusDispatch *pObj = &aStatusListeners[n]; @@ -890,7 +890,7 @@ void BibFrameController_Impl::ChangeDataSource(const uno::Sequence< beans::Prope aEvent.State = makeAny( aStringSeq ); pObj->xListener->statusChanged( aEvent ); - bMenuFilter=sal_True; + bMenuFilter=true; } else if (pObj->aURL.Path == "Bib/query") { @@ -902,7 +902,7 @@ void BibFrameController_Impl::ChangeDataSource(const uno::Sequence< beans::Prope BibConfig* pConfig = BibModul::GetConfig(); aEvent.State <<= pConfig->getQueryText(); pObj->xListener->statusChanged( aEvent ); - bQueryText=sal_True; + bQueryText=true; } if (bMenuFilter && bQueryText) diff --git a/extensions/source/bibliography/framectr.hxx b/extensions/source/bibliography/framectr.hxx index ef234ad2a57d..3457d5987a67 100644 --- a/extensions/source/bibliography/framectr.hxx +++ b/extensions/source/bibliography/framectr.hxx @@ -63,15 +63,15 @@ friend class BibFrameCtrl_Impl; BibStatusDispatchArr aStatusListeners; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xWindow; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame; - sal_Bool bDisposing; - sal_Bool bHierarchical; + bool bDisposing; + bool bHierarchical; ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable > m_xDatMan; BibDataManager* pDatMan; HdlBibModul pBibMod; DECL_STATIC_LINK( BibFrameController_Impl, DisposeHdl, void* ); - sal_Bool SaveModified(const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController>& xController); + bool SaveModified(const ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController>& xController); public: BibFrameController_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > & xComponent, BibDataManager* pDatMan); diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx index 649c74ab62df..bd27749e7dcb 100644 --- a/extensions/source/bibliography/general.cxx +++ b/extensions/source/bibliography/general.cxx @@ -461,7 +461,7 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl( uno::Reference< awt::XControlModel > xCtrModel; try { - sal_Bool bTypeListBox = sTypeColumnName == rName; + bool bTypeListBox = sTypeColumnName == rName; xCtrModel = pDatMan->loadControlModel(rName, bTypeListBox); if ( xCtrModel.is() ) { @@ -563,8 +563,8 @@ void BibGeneralPage::AdjustScrollbars() long nVertScrollWidth = aVertScroll.GetSizePixel().Width(); long nHoriScrollHeight = aHoriScroll.GetSizePixel().Height(); ::Size aOutSize(GetOutputSizePixel()); - sal_Bool bHoriVisible = aOutSize.Width() <= aStdSize.Width(); - sal_Bool bVertVisible = (aOutSize.Height()-(bHoriVisible ? nHoriScrollHeight : 0)) <= (aStdSize.Height()); + bool bHoriVisible = aOutSize.Width() <= aStdSize.Width(); + bool bVertVisible = (aOutSize.Height()-(bHoriVisible ? nHoriScrollHeight : 0)) <= (aStdSize.Height()); aHoriScroll.Show(bHoriVisible); aVertScroll.Show(bVertVisible); @@ -700,7 +700,7 @@ void BibGeneralPage::InitFixedTexts( void ) IMPL_LINK(BibGeneralPage, ScrollHdl, ScrollBar*, pScroll) { - sal_Bool bVertical = &aVertScroll == pScroll; + bool bVertical = &aVertScroll == pScroll; long nOffset = 0; long nCurrentOffset = 0; if(bVertical) @@ -794,13 +794,13 @@ void BibGeneralPage::GetFocus() aControlParentWin.GrabFocus(); } -sal_Bool BibGeneralPage::HandleShortCutKey( const KeyEvent& rKeyEvent ) +bool BibGeneralPage::HandleShortCutKey( const KeyEvent& rKeyEvent ) { DBG_ASSERT( KEY_MOD2 == rKeyEvent.GetKeyCode().GetModifier(), "+BibGeneralPage::HandleShortCutKey(): this is not for me!" ); const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); const sal_Unicode c = rKeyEvent.GetCharCode(); - sal_Bool bHandled = sal_False; + bool bHandled = false; sal_Int16 i; @@ -815,7 +815,7 @@ sal_Bool BibGeneralPage::HandleShortCutKey( const KeyEvent& rKeyEvent ) { if( rI18nHelper.MatchMnemonic( aFixedTexts[ i ]->GetText(), c ) ) { - bHandled = sal_True; + bHandled = true; sal_Int16 nCtrlIndex = nFT2CtrlMap[ i ]; if( nCtrlIndex >= 0 ) diff --git a/extensions/source/bibliography/general.hxx b/extensions/source/bibliography/general.hxx index be416699e584..526319f009fb 100644 --- a/extensions/source/bibliography/general.hxx +++ b/extensions/source/bibliography/general.hxx @@ -163,7 +163,7 @@ public: virtual void GetFocus() SAL_OVERRIDE; - virtual sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent ) SAL_OVERRIDE; // returns true, if key was handled + virtual bool HandleShortCutKey( const KeyEvent& rKeyEvent ) SAL_OVERRIDE; // returns true, if key was handled }; diff --git a/extensions/source/bibliography/loadlisteneradapter.cxx b/extensions/source/bibliography/loadlisteneradapter.cxx index 27b278ced0d1..be720a080d1e 100644 --- a/extensions/source/bibliography/loadlisteneradapter.cxx +++ b/extensions/source/bibliography/loadlisteneradapter.cxx @@ -73,11 +73,11 @@ namespace bib //= OComponentAdapterBase - OComponentAdapterBase::OComponentAdapterBase( const Reference< XComponent >& _rxComp, sal_Bool _bAutoRelease ) + OComponentAdapterBase::OComponentAdapterBase( const Reference< XComponent >& _rxComp, bool _bAutoRelease ) :m_xComponent( _rxComp ) ,m_pListener( NULL ) ,m_nLockCount( 0 ) - ,m_bListening( sal_False ) + ,m_bListening( false ) ,m_bAutoRelease( _bAutoRelease ) { OSL_ENSURE( m_xComponent.is(), "OComponentAdapterBase::OComponentAdapterBase: invalid component!" ); @@ -94,7 +94,7 @@ namespace bib m_pListener->setAdapter( this ); startComponentListening( ); - m_bListening = sal_True; + m_bListening = true; } @@ -114,7 +114,7 @@ namespace bib m_pListener->setAdapter(NULL); m_pListener = NULL; - m_bListening = sal_False; + m_bListening = false; if (m_bAutoRelease) m_xComponent = NULL; @@ -138,7 +138,7 @@ namespace bib } m_pListener = NULL; - m_bListening = sal_False; + m_bListening = false; if ( m_bAutoRelease ) m_xComponent = NULL; @@ -148,7 +148,7 @@ namespace bib //= OLoadListenerAdapter - OLoadListenerAdapter::OLoadListenerAdapter( const Reference< XLoadable >& _rxLoadable, sal_Bool _bAutoRelease ) + OLoadListenerAdapter::OLoadListenerAdapter( const Reference< XLoadable >& _rxLoadable, bool _bAutoRelease ) :OComponentAdapterBase( Reference< XComponent >( _rxLoadable, UNO_QUERY ), _bAutoRelease ) { } diff --git a/extensions/source/bibliography/loadlisteneradapter.hxx b/extensions/source/bibliography/loadlisteneradapter.hxx index bedae9738759..cc7c876c42e1 100644 --- a/extensions/source/bibliography/loadlisteneradapter.hxx +++ b/extensions/source/bibliography/loadlisteneradapter.hxx @@ -70,8 +70,8 @@ namespace bib m_xComponent; OComponentListener* m_pListener; sal_Int32 m_nLockCount; - sal_Bool m_bListening : 1; - sal_Bool m_bAutoRelease : 1; + bool m_bListening : 1; + bool m_bAutoRelease : 1; // impl method for dispose - virtual, 'cause you at least need to remove the listener from the broadcaster virtual void disposing() = 0; @@ -90,7 +90,7 @@ namespace bib public: OComponentAdapterBase( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _rxComp, - sal_Bool _bAutoRelease = sal_True + bool _bAutoRelease = true ); // late construction @@ -150,7 +150,7 @@ namespace bib public: OLoadListenerAdapter( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable >& _rxLoadable, - sal_Bool _bAutoRelease = sal_True + bool _bAutoRelease = true ); diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index 0e30a7a86c5f..53174e41b947 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -67,7 +67,7 @@ void BibToolBarListener::statusChanged(const ::com::sun::star::frame::FeatureSta ::com::sun::star::uno::Any aState=rEvt.State; if(aState.getValueType()==::getBooleanCppuType()) { - sal_Bool bChecked= *(sal_Bool*)aState.getValue(); + bool bChecked= *(sal_Bool*)aState.getValue(); pToolBar->CheckItem(nIndex, bChecked); } @@ -98,7 +98,7 @@ void BibTBListBoxListener::statusChanged(const ::com::sun::star::frame::FeatureS Any aState = rEvt.State; if(aState.getValueType() == ::getCppuType((Sequence<OUString>*)0)) { - pToolBar->UpdateSourceList(sal_False); + pToolBar->UpdateSourceList(false); pToolBar->ClearSourceList(); Sequence<OUString>* pStringSeq = (Sequence<OUString>*)aState.getValue(); @@ -111,7 +111,7 @@ void BibTBListBoxListener::statusChanged(const ::com::sun::star::frame::FeatureS aEntry = pStringArray[i]; pToolBar->InsertSourceEntry(aEntry); } - pToolBar->UpdateSourceList(sal_True); + pToolBar->UpdateSourceList(true); } pToolBar->SelectSourceEntry(rEvt.FeatureDescriptor); @@ -391,7 +391,7 @@ void BibToolBar::SelectFilterItem(sal_uInt16 nId) aQueryField = MnemonicGenerator::EraseAllMnemonicChars( aPopupMenu.GetItemText(nId) ); } -void BibToolBar::EnableSourceList(sal_Bool bFlag) +void BibToolBar::EnableSourceList(bool bFlag) { aFtSource.Enable(bFlag); aLBSource.Enable(bFlag); @@ -402,7 +402,7 @@ void BibToolBar::ClearSourceList() aLBSource.Clear(); } -void BibToolBar::UpdateSourceList(sal_Bool bFlag) +void BibToolBar::UpdateSourceList(bool bFlag) { aLBSource.SetUpdateMode(bFlag); } @@ -417,7 +417,7 @@ void BibToolBar::SelectSourceEntry(const OUString& aStr) aLBSource.SelectEntry(aStr); } -void BibToolBar::EnableQuery(sal_Bool bFlag) +void BibToolBar::EnableQuery(bool bFlag) { aFtQuery.Enable(bFlag); aEdQuery.Enable(bFlag); @@ -534,18 +534,18 @@ void BibToolBar::DataChanged( const DataChangedEvent& rDCEvt ) IMPL_LINK( BibToolBar, OptionsChanged_Impl, void*, /*pVoid*/ ) { - sal_Bool bRebuildToolBar = sal_False; + bool bRebuildToolBar = false; sal_Int16 eSymbolsSize = SvtMiscOptions().GetCurrentSymbolsSize(); if ( nSymbolsSize != eSymbolsSize ) { nSymbolsSize = eSymbolsSize; - bRebuildToolBar = sal_True; + bRebuildToolBar = true; } else if ( nOutStyle != SvtMiscOptions().GetToolboxStyle() ) { nOutStyle = SvtMiscOptions().GetToolboxStyle(); SetOutStyle( nOutStyle ); - bRebuildToolBar = sal_True; + bRebuildToolBar = true; } if ( bRebuildToolBar ) diff --git a/extensions/source/bibliography/toolbar.hxx b/extensions/source/bibliography/toolbar.hxx index e89899ded45d..08a0517860e8 100644 --- a/extensions/source/bibliography/toolbar.hxx +++ b/extensions/source/bibliography/toolbar.hxx @@ -154,12 +154,12 @@ class BibToolBar: public ToolBox void SetXController(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > &); void ClearSourceList(); - void UpdateSourceList(sal_Bool bFlag=sal_True); - void EnableSourceList(sal_Bool bFlag=sal_True); + void UpdateSourceList(bool bFlag=true); + void EnableSourceList(bool bFlag=true); void InsertSourceEntry(const OUString&,sal_Int32 nPos=LISTBOX_APPEND ); void SelectSourceEntry(const OUString& ); - void EnableQuery(sal_Bool bFlag=sal_True); + void EnableQuery(bool bFlag=true); void SetQueryString(const OUString& ); void AdjustToolBox(); diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index ba38dac81f99..ee6dd8119221 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -176,7 +176,7 @@ namespace dbp rContext.xForm->setPropertyValue("CommandType", makeAny( nCommandType ) ); if ( !rContext.bEmbedded ) - setFormConnection( xOldConn, sal_False ); + setFormConnection( xOldConn, false ); if (!updateContext()) return false; @@ -419,7 +419,7 @@ namespace dbp void OMaybeListSelectionPage::implInitialize(const OUString& _rSelection) { DBG_ASSERT(m_pYes, "OMaybeListSelectionPage::implInitialize: no controls announced!"); - sal_Bool bIsSelection = ! _rSelection.isEmpty(); + bool bIsSelection = ! _rSelection.isEmpty(); m_pYes->Check(bIsSelection); m_pNo->Check(!bIsSelection); m_pList->Enable(bIsSelection); diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index 997a070a2570..530ef32a65e8 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -119,7 +119,7 @@ namespace dbp } - sal_Bool OControlWizardPage::updateContext() + bool OControlWizardPage::updateContext() { return getDialog()->updateContext(OAccessRegulator()); } @@ -131,7 +131,7 @@ namespace dbp } - void OControlWizardPage::setFormConnection( const Reference< XConnection >& _rxConn, sal_Bool _bAutoDispose ) + void OControlWizardPage::setFormConnection( const Reference< XConnection >& _rxConn, bool _bAutoDispose ) { getDialog()->setFormConnection( OAccessRegulator(), _rxConn, _bAutoDispose ); } @@ -143,7 +143,7 @@ namespace dbp } - void OControlWizardPage::fillListBox(ListBox& _rList, const Sequence< OUString >& _rItems, sal_Bool _bClear) + void OControlWizardPage::fillListBox(ListBox& _rList, const Sequence< OUString >& _rItems, bool _bClear) { if (_bClear) _rList.Clear(); @@ -159,7 +159,7 @@ namespace dbp } - void OControlWizardPage::fillListBox(ComboBox& _rList, const Sequence< OUString >& _rItems, sal_Bool _bClear) + void OControlWizardPage::fillListBox(ComboBox& _rList, const Sequence< OUString >& _rItems, bool _bClear) { if (_bClear) _rList.Clear(); @@ -205,7 +205,7 @@ namespace dbp } - void OControlWizardPage::adjustControlForNoDSDisplay(Control* _pControl, sal_Bool _bConstLowerDistance) + void OControlWizardPage::adjustControlForNoDSDisplay(Control* _pControl, bool _bConstLowerDistance) { ::Size aDistanceToMove = LogicToPixel( ::Size( 0, 37 ), MAP_APPFONT ); @@ -467,7 +467,7 @@ namespace dbp } - void OControlWizard::setFormConnection( const OAccessRegulator& _rAccess, const Reference< XConnection >& _rxConn, sal_Bool _bAutoDispose ) + void OControlWizard::setFormConnection( const OAccessRegulator& _rAccess, const Reference< XConnection >& _rxConn, bool _bAutoDispose ) { try { @@ -497,7 +497,7 @@ namespace dbp } - sal_Bool OControlWizard::updateContext(const OAccessRegulator&) + bool OControlWizard::updateContext(const OAccessRegulator&) { return initContext(); } @@ -518,11 +518,11 @@ namespace dbp return xHandler; } - sal_Bool OControlWizard::initContext() + bool OControlWizard::initContext() { DBG_ASSERT(m_aContext.xObjectModel.is(), "OGroupBoxWizard::initContext: have no control model to work with!"); if (!m_aContext.xObjectModel.is()) - return sal_False; + return false; // reset the context m_aContext.xForm.clear(); @@ -534,7 +534,7 @@ namespace dbp m_aContext.xObjectContainer.clear(); m_aContext.aTypes.clear(); - m_aContext.bEmbedded = sal_False; + m_aContext.bEmbedded = false; Any aSQLException; Reference< XPreparedStatement > xStatement; @@ -659,7 +659,7 @@ namespace dbp // create an interaction handler to display this exception Reference< XInteractionHandler > xHandler = getInteractionHandler(this); if ( !xHandler.is() ) - return sal_False; + return false; Reference< XInteractionRequest > xRequest = new OInteractionRequest(makeAny(aContext)); try @@ -667,7 +667,7 @@ namespace dbp xHandler->handle(xRequest); } catch(const Exception&) { } - return sal_False; + return false; } return 0 != m_aContext.aFieldNames.getLength(); @@ -726,7 +726,7 @@ namespace dbp } - sal_Bool OControlWizard::needDatasourceSelection() + bool OControlWizard::needDatasourceSelection() { // lemme see ... return (0 == getContext().aFieldNames.getLength()); diff --git a/extensions/source/dbpilots/controlwizard.hxx b/extensions/source/dbpilots/controlwizard.hxx index d2388d3b75b8..8a048a21e69e 100644 --- a/extensions/source/dbpilots/controlwizard.hxx +++ b/extensions/source/dbpilots/controlwizard.hxx @@ -69,8 +69,8 @@ namespace dbp OControlWizard* getDialog(); const OControlWizard* getDialog() const; const OControlWizardContext& getContext(); - sal_Bool updateContext(); - void setFormConnection(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn, sal_Bool _bAutoDispose = sal_True ); + bool updateContext(); + void setFormConnection(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn, bool _bAutoDispose = true ); ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getFormConnection() const; @@ -82,15 +82,15 @@ namespace dbp void fillListBox( ListBox& _rList, const ::com::sun::star::uno::Sequence< OUString >& _rItems, - sal_Bool _bClear = sal_True); + bool _bClear = true); void fillListBox( ComboBox& _rList, const ::com::sun::star::uno::Sequence< OUString >& _rItems, - sal_Bool _bClear = sal_True); + bool _bClear = true); protected: void enableFormDatasourceDisplay(); - void adjustControlForNoDSDisplay(Control* _pControl, sal_Bool bConstLowerDistance = sal_False); + void adjustControlForNoDSDisplay(Control* _pControl, bool bConstLowerDistance = false); protected: // OWizardPage overridables @@ -119,15 +119,15 @@ namespace dbp virtual ~OControlWizard(); // make the some base class methods public - sal_Bool travelNext() { return OControlWizard_Base::travelNext(); } + bool travelNext() { return OControlWizard_Base::travelNext(); } public: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getComponentContext() const { return m_xContext; } const OControlWizardContext& getContext() const { return m_aContext; } - sal_Bool updateContext(const OAccessRegulator&); - void setFormConnection(const OAccessRegulator&, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn, sal_Bool _bAutoDispose = sal_True ); + bool updateContext(const OAccessRegulator&); + void setFormConnection(const OAccessRegulator&, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn, bool _bAutoDispose = true ); ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getFormConnection(const OAccessRegulator&) const; @@ -143,18 +143,18 @@ namespace dbp // commit the control-relevant settings void commitControlSettings(OControlWizardSettings* _pSettings); - sal_Bool needDatasourceSelection(); + bool needDatasourceSelection(); ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getFormConnection() const; - virtual sal_Bool approveControl(sal_Int16 _nClassId) = 0; + virtual bool approveControl(sal_Int16 _nClassId) = 0; // ModalDialog overridables virtual short Execute() SAL_OVERRIDE; private: - sal_Bool initContext(); + bool initContext(); void implGetDSContext(); void implDetermineForm(); diff --git a/extensions/source/dbpilots/dbpservices.cxx b/extensions/source/dbpilots/dbpservices.cxx index ede2523fecf9..da9d8dcba1c0 100644 --- a/extensions/source/dbpilots/dbpservices.cxx +++ b/extensions/source/dbpilots/dbpservices.cxx @@ -27,14 +27,14 @@ using namespace ::com::sun::star::registry; extern "C" void SAL_CALL dbp_initializeModule() { - static sal_Bool s_bInit = sal_False; + static bool s_bInit = false; if (!s_bInit) { createRegistryInfo_OGroupBoxWizard(); createRegistryInfo_OListComboWizard(); createRegistryInfo_OGridWizard(); ::dbp::OModule::setResourceFilePrefix("dbp"); - s_bInit = sal_True; + s_bInit = true; } } diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index 0f3d457697ef..a9ed641dd518 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -55,7 +55,7 @@ namespace dbp OGridWizard::OGridWizard( Window* _pParent, const Reference< XPropertySet >& _rxObjectModel, const Reference< XComponentContext >& _rxContext ) :OControlWizard(_pParent, ModuleRes(RID_DLG_GRIDWIZARD), _rxObjectModel, _rxContext) - ,m_bHadDataSelection(sal_True) + ,m_bHadDataSelection(true) { initControlSettings(&m_aSettings); @@ -68,21 +68,21 @@ namespace dbp if (!needDatasourceSelection()) { // ... skip it! skip(1); - m_bHadDataSelection = sal_False; + m_bHadDataSelection = false; } } - sal_Bool OGridWizard::approveControl(sal_Int16 _nClassId) + bool OGridWizard::approveControl(sal_Int16 _nClassId) { if (FormComponentType::GRIDCONTROL != _nClassId) - return sal_False; + return false; Reference< XGridColumnFactory > xColumnFactory(getContext().xObjectModel, UNO_QUERY); if (!xColumnFactory.is()) - return sal_False; + return false; - return sal_True; + return true; } @@ -406,7 +406,7 @@ namespace dbp IMPL_LINK(OGridFieldsSelection, OnMoveOneEntry, PushButton*, _pButton) { - sal_Bool bMoveRight = (&m_aSelectOne == _pButton); + bool bMoveRight = (&m_aSelectOne == _pButton); ListBox& rMoveTo = bMoveRight ? m_aSelFields : m_aExistFields; // the index of the selected entry @@ -461,7 +461,7 @@ namespace dbp IMPL_LINK(OGridFieldsSelection, OnMoveAllEntries, PushButton*, _pButton) { - sal_Bool bMoveRight = (&m_aSelectAll == _pButton); + bool bMoveRight = (&m_aSelectAll == _pButton); m_aExistFields.Clear(); m_aSelFields.Clear(); fillListBox(bMoveRight ? m_aSelFields : m_aExistFields, getContext().aFieldNames); diff --git a/extensions/source/dbpilots/gridwizard.hxx b/extensions/source/dbpilots/gridwizard.hxx index 128d1e68b6e9..cd89e7a298e5 100644 --- a/extensions/source/dbpilots/gridwizard.hxx +++ b/extensions/source/dbpilots/gridwizard.hxx @@ -43,7 +43,7 @@ namespace dbp { protected: OGridSettings m_aSettings; - sal_Bool m_bHadDataSelection : 1; + bool m_bHadDataSelection : 1; public: OGridWizard( @@ -62,7 +62,7 @@ namespace dbp virtual bool leaveState( WizardState _nState ) SAL_OVERRIDE; virtual bool onFinish() SAL_OVERRIDE; - virtual sal_Bool approveControl(sal_Int16 _nClassId) SAL_OVERRIDE; + virtual bool approveControl(sal_Int16 _nClassId) SAL_OVERRIDE; protected: void implApplySettings(); @@ -117,7 +117,7 @@ namespace dbp void implCheckButtons(); void implApplySettings(); - ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > implGetColumns(sal_Bool _bShowError = sal_True); + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > implGetColumns(bool _bShowError = true); }; diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index 08d90dafd593..ed7c53d3a917 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -50,8 +50,8 @@ namespace dbp OGroupBoxWizard::OGroupBoxWizard( Window* _pParent, const Reference< XPropertySet >& _rxObjectModel, const Reference< XComponentContext >& _rxContext ) :OControlWizard(_pParent, ModuleRes(RID_DLG_GROUPBOXWIZARD), _rxObjectModel, _rxContext) - ,m_bVisitedDefault(sal_False) - ,m_bVisitedDB(sal_False) + ,m_bVisitedDefault(false) + ,m_bVisitedDB(false) { initControlSettings(&m_aSettings); @@ -62,7 +62,7 @@ namespace dbp } - sal_Bool OGroupBoxWizard::approveControl(sal_Int16 _nClassId) + bool OGroupBoxWizard::approveControl(sal_Int16 _nClassId) { return FormComponentType::GROUPBOX == _nClassId; } @@ -127,7 +127,7 @@ namespace dbp DBG_ASSERT(m_aSettings.aLabels.size(), "OGroupBoxWizard::enterState: should never have reached this state!"); m_aSettings.sDefaultField = m_aSettings.aLabels[0]; } - m_bVisitedDefault = sal_True; + m_bVisitedDefault = true; break; case GBW_STATE_DBFIELD: @@ -137,7 +137,7 @@ namespace dbp if (getContext().aFieldNames.getLength()) m_aSettings.sDBField = getContext().aFieldNames[0]; } - m_bVisitedDB = sal_True; + m_bVisitedDB = true; break; } @@ -209,7 +209,7 @@ namespace dbp adjustControlForNoDSDisplay(&m_aMoveRight); adjustControlForNoDSDisplay(&m_aMoveLeft); adjustControlForNoDSDisplay(&m_aExistingRadiosLabel); - adjustControlForNoDSDisplay(&m_aExistingRadios, sal_True); + adjustControlForNoDSDisplay(&m_aExistingRadios, true); } m_aMoveLeft.SetClickHdl(LINK(this, ORadioSelectionPage, OnMoveEntry)); @@ -272,7 +272,7 @@ namespace dbp IMPL_LINK( ORadioSelectionPage, OnMoveEntry, PushButton*, _pButton ) { - sal_Bool bMoveLeft = (&m_aMoveLeft == _pButton); + bool bMoveLeft = (&m_aMoveLeft == _pButton); if (bMoveLeft) { while (m_aExistingRadios.GetSelectEntryCount()) @@ -317,9 +317,9 @@ namespace dbp void ORadioSelectionPage::implCheckMoveButtons() { - sal_Bool bHaveSome = (0 != m_aExistingRadios.GetEntryCount()); - sal_Bool bSelectedSome = (0 != m_aExistingRadios.GetSelectEntryCount()); - sal_Bool bUnfinishedInput = (!m_aRadioName.GetText().isEmpty()); + bool bHaveSome = (0 != m_aExistingRadios.GetEntryCount()); + bool bSelectedSome = (0 != m_aExistingRadios.GetSelectEntryCount()); + bool bUnfinishedInput = (!m_aRadioName.GetText().isEmpty()); m_aMoveLeft.Enable(bSelectedSome); m_aMoveRight.Enable(bUnfinishedInput); diff --git a/extensions/source/dbpilots/groupboxwiz.hxx b/extensions/source/dbpilots/groupboxwiz.hxx index ee250cb47506..ccdad61e48b0 100644 --- a/extensions/source/dbpilots/groupboxwiz.hxx +++ b/extensions/source/dbpilots/groupboxwiz.hxx @@ -48,8 +48,8 @@ namespace dbp protected: OOptionGroupSettings m_aSettings; - sal_Bool m_bVisitedDefault : 1; - sal_Bool m_bVisitedDB : 1; + bool m_bVisitedDefault : 1; + bool m_bVisitedDB : 1; public: OGroupBoxWizard( @@ -67,7 +67,7 @@ namespace dbp virtual void enterState( WizardState _nState ) SAL_OVERRIDE; virtual bool onFinish() SAL_OVERRIDE; - virtual sal_Bool approveControl(sal_Int16 _nClassId) SAL_OVERRIDE; + virtual bool approveControl(sal_Int16 _nClassId) SAL_OVERRIDE; protected: void createRadios(); diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index dd98d9452897..0c7337248772 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -52,8 +52,8 @@ namespace dbp OListComboWizard::OListComboWizard( Window* _pParent, const Reference< XPropertySet >& _rxObjectModel, const Reference< XComponentContext >& _rxContext ) :OControlWizard(_pParent, ModuleRes(RID_DLG_LISTCOMBOWIZARD), _rxObjectModel, _rxContext) - ,m_bListBox(sal_False) - ,m_bHadDataSelection(sal_True) + ,m_bListBox(false) + ,m_bHadDataSelection(true) { initControlSettings(&m_aSettings); @@ -66,25 +66,25 @@ namespace dbp if (!needDatasourceSelection()) { // ... skip it! skip(1); - m_bHadDataSelection = sal_False; + m_bHadDataSelection = false; } } - sal_Bool OListComboWizard::approveControl(sal_Int16 _nClassId) + bool OListComboWizard::approveControl(sal_Int16 _nClassId) { switch (_nClassId) { case FormComponentType::LISTBOX: - m_bListBox = sal_True; + m_bListBox = true; setTitleBase(ModuleRes(RID_STR_LISTWIZARD_TITLE).toString()); - return sal_True; + return true; case FormComponentType::COMBOBOX: - m_bListBox = sal_False; + m_bListBox = false; setTitleBase(ModuleRes(RID_STR_COMBOWIZARD_TITLE).toString()); - return sal_True; + return true; } - return sal_False; + return false; } @@ -223,7 +223,7 @@ namespace dbp //= OLCPage - Reference< XNameAccess > OLCPage::getTables(sal_Bool _bNeedIt) + Reference< XNameAccess > OLCPage::getTables(bool _bNeedIt) { Reference< XConnection > xConn = getFormConnection(); DBG_ASSERT(!_bNeedIt || xConn.is(), "OLCPage::getTables: should have an active connection when reaching this page!"); @@ -240,7 +240,7 @@ namespace dbp } - Sequence< OUString > OLCPage::getTableFields(sal_Bool _bNeedIt) + Sequence< OUString > OLCPage::getTableFields(bool _bNeedIt) { Reference< XNameAccess > xTables = getTables(_bNeedIt); Sequence< OUString > aColumnNames; @@ -328,7 +328,7 @@ namespace dbp m_aSelectTable.Clear(); try { - Reference< XNameAccess > xTables = getTables(sal_True); + Reference< XNameAccess > xTables = getTables(true); Sequence< OUString > aTableNames; if (xTables.is()) aTableNames = xTables->getElementNames(); @@ -389,7 +389,7 @@ namespace dbp OLCPage::initializePage(); // fill the list of fields - fillListBox(m_aSelectTableField, getTableFields(sal_True)); + fillListBox(m_aSelectTableField, getTableFields(true)); m_aSelectTableField.SelectEntry(getSettings().sListContentField); m_aDisplayedField.SetText(getSettings().sListContentField); @@ -467,7 +467,7 @@ namespace dbp // fill the value list fillListBox(m_aValueListField, getContext().aFieldNames); // fill the table field list - fillListBox(m_aTableField, getTableFields(sal_True)); + fillListBox(m_aTableField, getTableFields(true)); // the initial selections m_aValueListField.SetText(getSettings().sLinkedFormField); diff --git a/extensions/source/dbpilots/listcombowizard.hxx b/extensions/source/dbpilots/listcombowizard.hxx index e1d86cd6e26b..d0550303c82f 100644 --- a/extensions/source/dbpilots/listcombowizard.hxx +++ b/extensions/source/dbpilots/listcombowizard.hxx @@ -52,8 +52,8 @@ namespace dbp { protected: OListComboSettings m_aSettings; - sal_Bool m_bListBox : 1; - sal_Bool m_bHadDataSelection : 1; + bool m_bListBox : 1; + bool m_bHadDataSelection : 1; public: OListComboWizard( @@ -64,7 +64,7 @@ namespace dbp OListComboSettings& getSettings() { return m_aSettings; } - sal_Bool isListBox() const { return m_bListBox; } + bool isListBox() const { return m_bListBox; } protected: // OWizardMachine overridables @@ -74,7 +74,7 @@ namespace dbp virtual bool leaveState( WizardState _nState ) SAL_OVERRIDE; virtual bool onFinish() SAL_OVERRIDE; - virtual sal_Bool approveControl(sal_Int16 _nClassId) SAL_OVERRIDE; + virtual bool approveControl(sal_Int16 _nClassId) SAL_OVERRIDE; WizardState getFinalState() const { return isListBox() ? LCW_STATE_FIELDLINK : LCW_STATE_COMBODBFIELD; } @@ -92,13 +92,13 @@ namespace dbp protected: OListComboSettings& getSettings() { return static_cast<OListComboWizard*>(getDialog())->getSettings(); } - sal_Bool isListBox() { return static_cast<OListComboWizard*>(getDialog())->isListBox(); } + bool isListBox() { return static_cast<OListComboWizard*>(getDialog())->isListBox(); } protected: ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > - getTables(sal_Bool _bNeedIt); + getTables(bool _bNeedIt); ::com::sun::star::uno::Sequence< OUString > - getTableFields(sal_Bool _bNeedIt); + getTableFields(bool _bNeedIt); }; diff --git a/extensions/source/dbpilots/wizardcontext.hxx b/extensions/source/dbpilots/wizardcontext.hxx index 523e09f053c1..4869ccd143ad 100644 --- a/extensions/source/dbpilots/wizardcontext.hxx +++ b/extensions/source/dbpilots/wizardcontext.hxx @@ -77,7 +77,7 @@ namespace dbp ::com::sun::star::uno::Sequence< OUString > aFieldNames; - sal_Bool bEmbedded; + bool bEmbedded; }; diff --git a/extensions/source/inc/componentmodule.cxx b/extensions/source/inc/componentmodule.cxx index 9fdcf972a783..cc69d33882da 100644 --- a/extensions/source/inc/componentmodule.cxx +++ b/extensions/source/inc/componentmodule.cxx @@ -47,7 +47,7 @@ namespace COMPMOD_NAMESPACE class OModuleImpl { ResMgr* m_pResources; - sal_Bool m_bInitialized; + bool m_bInitialized; OString m_sFilePrefix; public: @@ -63,7 +63,7 @@ namespace COMPMOD_NAMESPACE OModuleImpl::OModuleImpl() :m_pResources(NULL) - ,m_bInitialized(sal_False) + ,m_bInitialized(false) { } @@ -88,7 +88,7 @@ namespace COMPMOD_NAMESPACE .append(m_sFilePrefix) .append(")!").getStr()); - m_bInitialized = sal_True; + m_bInitialized = true; } return m_pResources; } diff --git a/extensions/source/logging/csvformatter.cxx b/extensions/source/logging/csvformatter.cxx index da152f8667af..77ddfe4299c6 100644 --- a/extensions/source/logging/csvformatter.cxx +++ b/extensions/source/logging/csvformatter.cxx @@ -92,11 +92,11 @@ namespace logging virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException, std::exception) SAL_OVERRIDE; private: - sal_Bool m_LogEventNo; - sal_Bool m_LogThread; - sal_Bool m_LogTimestamp; - sal_Bool m_LogSource; - sal_Bool m_MultiColumn; + bool m_LogEventNo; + bool m_LogThread; + bool m_LogTimestamp; + bool m_LogSource; + bool m_MultiColumn; ::com::sun::star::uno::Sequence< OUString > m_Columnnames; }; } // namespace logging diff --git a/extensions/source/nsplugin/source/so_closelistener.hxx b/extensions/source/nsplugin/source/so_closelistener.hxx index af38c243b8ab..ff5fabdfa731 100644 --- a/extensions/source/nsplugin/source/so_closelistener.hxx +++ b/extensions/source/nsplugin/source/so_closelistener.hxx @@ -34,14 +34,14 @@ class PluginDocumentClosePreventer : public ::cppu::WeakImplHelper1< ::com::sun::star::util::XCloseListener > { - sal_Bool m_bPreventClose; + bool m_bPreventClose; public: PluginDocumentClosePreventer() - : m_bPreventClose( sal_True ) + : m_bPreventClose( true ) {} - void StopPreventClose() { m_bPreventClose = sal_False; } + void StopPreventClose() { m_bPreventClose = false; } virtual void SAL_CALL queryClosing( const ::com::sun::star::lang::EventObject& aEvent, sal_Bool bDeliverOwnership ) throw ( ::com::sun::star::uno::RuntimeException, ::com::sun::star::util::CloseVetoException, std::exception ) SAL_OVERRIDE; diff --git a/extensions/source/nsplugin/source/so_instance.cxx b/extensions/source/nsplugin/source/so_instance.cxx index 1ffe18e8f497..1a338aa51992 100644 --- a/extensions/source/nsplugin/source/so_instance.cxx +++ b/extensions/source/nsplugin/source/so_instance.cxx @@ -82,7 +82,7 @@ SoPluginInstance::SoPluginInstance(long pParent, Reference< XMultiServiceFactory m_nX = 0; m_nY = 0; m_nFlag = 15; - m_bInit = sal_False; + m_bInit = false; m_hParent = 0; m_pParent = pParent; m_dParentStyl = 0; @@ -93,7 +93,7 @@ SoPluginInstance::~SoPluginInstance() { } -sal_Bool SoPluginInstance::SetURL(char* aURL) +bool SoPluginInstance::SetURL(char* aURL) { debug_fprintf(NSP_LOG_APPEND, "SoPluginInstance::SetURL %s\n", aURL); @@ -104,11 +104,11 @@ sal_Bool SoPluginInstance::SetURL(char* aURL) m_sURL = OUString(aURL, strlen(aURL), encoding); debug_fprintf(NSP_LOG_APPEND, "SetURL %s\nencoding is: %d\n", OUStringToOString(m_sURL, RTL_TEXTENCODING_GB_18030).getStr(), m_sURL.getLength(), encoding); - return sal_True; + return true; } // plugin window UI part: create window, load document -sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) +bool SoPluginInstance::LoadDocument(NSP_HWND hParent) { // If doc has been loaded, we just resize the window and return if(m_bInit) @@ -117,14 +117,14 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) m_xUnoWin->setPosSize( m_nX, m_nY, m_nWidth, m_nHeight, m_nFlag ); debug_fprintf(NSP_LOG_APPEND, "set windows to x:%d y:%d w:%d h%d falg:%d\n", m_nX, m_nY, m_nWidth, m_nHeight, m_nFlag); - return sal_True; + return true; } // If mxRemoteMSF is not initialized, we assert and return sal_False if(!mxRemoteMSF.is()) { debug_fprintf(NSP_LOG_APPEND, "Remote StarOfiice ServiceManager is not initilzed correctly!\n"); - return sal_False; + return false; } try @@ -153,7 +153,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) if ( !xNewWinPeer.is() ) { debug_fprintf(NSP_LOG_APPEND, "can not create first window\n", hParent); - return sal_False; + return false; } // get interface of first window @@ -161,7 +161,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) if( !m_xUnoWin.is() ) { debug_fprintf(NSP_LOG_APPEND, "can not get interface of first window\n", hParent); - return sal_False; + return false; } // initialize window @@ -184,7 +184,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) uno::Reference< beans::XPropertySet > xLMProps; xFrameProps->getPropertyValue("LayoutManager") >>= xLMProps; if ( xLMProps.is() ) - xLMProps->setPropertyValue("AutomaticToolbars", uno::makeAny( (sal_Bool)sal_False ) ); + xLMProps->setPropertyValue("AutomaticToolbars", uno::makeAny( false ) ); } catch( const uno::Exception& ) {} @@ -197,7 +197,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) if ( !m_xFrames.is() ) { debug_fprintf(NSP_LOG_APPEND, "can not get frames from FramesSupplier\n"); - return sal_False; + return false; } // append m_xFrame to m_xFrames @@ -208,7 +208,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) if ( !xLoader.is() ) { debug_fprintf(NSP_LOG_APPEND, "can not get ComponentLoader to load URL\n"); - return sal_False; + return false; } //create stream for the document @@ -218,7 +218,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) if(!xInputStream.is()) { debug_fprintf(NSP_LOG_APPEND, "can not create XInputStream for URL\n"); - return sal_False; + return false; } // prepare to load document @@ -253,7 +253,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) if ( !m_xComponent.is() ) { debug_fprintf(NSP_LOG_APPEND, "print by Nsplugin, Load Componment error\n"); - return sal_False; + return false; } // register the closelistener that will prevent closing of the component @@ -276,7 +276,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) if(!m_xDispatchProvider.is()) { debug_fprintf(NSP_LOG_APPEND, "m_xDispatchProvider can not be getten\n"); - return sal_False; + return false; } //try to enable toolbar and tool windows @@ -292,7 +292,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) #ifdef WNT m_dParentStyl = ::NSP_ResetWinStyl (m_hParent); #endif - m_bInit = sal_True; + m_bInit = true; try { @@ -311,14 +311,14 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) debug_fprintf(NSP_LOG_APPEND, "Unknown exception while loading document in netscape plugin windows\n"); OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ); debug_fprintf(NSP_LOG_APPEND, "error: %s \n", o.pData->buffer ); - return sal_False; + return false; } - return sal_True; + return true; } -sal_Bool SoPluginInstance::SetWindow(NSP_HWND hParent, int x, int y, int w, int h) +bool SoPluginInstance::SetWindow(NSP_HWND hParent, int x, int y, int w, int h) { - sal_Bool bRetval(sal_True); + bool bRetval(true); if ( m_hParent && !hParent ) { @@ -340,12 +340,12 @@ sal_Bool SoPluginInstance::SetWindow(NSP_HWND hParent, int x, int y, int w, int m_nY = y; if ( m_sURL.isEmpty() ) - return sal_True; + return true; if(!mxRemoteMSF.is()) { debug_fprintf(NSP_LOG_APPEND, "Remote StarOfiice ServiceManager is not initilzed correctly!\n"); - return sal_False; + return false; } debug_fprintf(NSP_LOG_APPEND, "in SoPluginInstance::SetWindow, begin LoadDocument(hParent)\n"); bRetval = LoadDocument(hParent); // Load document into current window @@ -353,16 +353,16 @@ sal_Bool SoPluginInstance::SetWindow(NSP_HWND hParent, int x, int y, int w, int // try to reload document again debug_fprintf(NSP_LOG_APPEND, "load document error, try to reload it once again\n"); mxRemoteMSF.clear(); - m_bInit = sal_False; + m_bInit = false; bRetval = LoadDocument(hParent); - debug_fprintf(NSP_LOG_APPEND, "load document again, return %d\n", bRetval); + debug_fprintf(NSP_LOG_APPEND, "load document again, return %d\n", bRetval ? 1 : 0); } } return bRetval; } -sal_Bool SoPluginInstance::Destroy(void) +bool SoPluginInstance::Destroy(void) { #ifdef WNT if(m_dParentStyl != 0) @@ -422,20 +422,20 @@ sal_Bool SoPluginInstance::Destroy(void) m_xFrames.clear(); m_xDispatcher.clear(); m_xDispatchProvider.clear(); - return sal_True; + return true; } -sal_Bool SoPluginInstance::Print(void) +bool SoPluginInstance::Print(void) { if(!m_xDispatcher.is()) - return sal_False; + return false; Sequence< ::com::sun::star::beans::PropertyValue > propertyValue(1); m_xDispatcher->executeDispatch(m_xDispatchProvider, OUString(".uno:PrintDefault"), m_xFrame->getName(), 0, propertyValue ); - return sal_True; + return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/nsplugin/source/so_instance.hxx b/extensions/source/nsplugin/source/so_instance.hxx index 7e959b936ad1..3111b27d62d1 100644 --- a/extensions/source/nsplugin/source/so_instance.hxx +++ b/extensions/source/nsplugin/source/so_instance.hxx @@ -70,7 +70,7 @@ private: int m_nY; sal_Int16 m_nFlag; // Set to 12 during initialization OUString m_sURL; // URL of the document to be loaded - sal_Bool m_bInit; // If the Plugin instance is initilaized. + bool m_bInit; // If the Plugin instance is initilaized. NSP_HWND m_hParent; // Windows handle of parent window long m_pParent; // ID of this instance - get from NPP // StarOffice window @@ -90,7 +90,7 @@ private: PluginDocumentClosePreventer* m_pCloseListener; ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseListener > m_xCloseListener; - sal_Bool LoadDocument(NSP_HWND hParent); + bool LoadDocument(NSP_HWND hParent); long m_dParentStyl; // Old Windows style of parent window @@ -98,13 +98,13 @@ private: public: SoPluginInstance(long iInstance, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF); virtual ~SoPluginInstance(void); - virtual sal_Bool SetURL(char* aURL); - virtual sal_Bool IsInit(void){return m_bInit;}; - virtual sal_Bool SetWindow(NSP_HWND hParent, int x, int y, int w, int h) ; - virtual sal_Bool Destroy(void) ; - virtual sal_Bool Print(void) ; + virtual bool SetURL(char* aURL); + virtual bool IsInit(void){return m_bInit;}; + virtual bool SetWindow(NSP_HWND hParent, int x, int y, int w, int h) ; + virtual bool Destroy(void) ; + virtual bool Print(void) ; - static sal_Bool ShutDown(void); + static bool ShutDown(void); static char* GetSODir(void) {return sSO_Dir;}; long GetParent(void) {return m_pParent;}; }; diff --git a/extensions/source/nsplugin/source/so_main.cxx b/extensions/source/nsplugin/source/so_main.cxx index b90405b8c6b7..80a009c70f5d 100644 --- a/extensions/source/nsplugin/source/so_main.cxx +++ b/extensions/source/nsplugin/source/so_main.cxx @@ -136,14 +136,14 @@ int find_cur_node(long cur_id) return -1; } -sal_Bool dump_plugin_message(PLUGIN_MSG* pMsg) +bool dump_plugin_message(PLUGIN_MSG* pMsg) { if (!pMsg) - return sal_False; + return false; debug_fprintf(NSP_LOG_APPEND, "NSPlugin Message: msg_id:%d; instance_id:%d;wnd_id:%d;wnd_x:%d;wnd_y:%d;wnd_w:%d;wnd_h:%d; url:%s\n", pMsg->msg_id, pMsg->instance_id, pMsg->wnd_id, pMsg->wnd_x, pMsg->wnd_y, pMsg->wnd_w, pMsg->wnd_h, pMsg->url); - return sal_True; + return true; } int Set_Window(PLUGIN_MSG* pMsg) diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx index f85f7bd5f650..606b4bcd0b88 100644 --- a/extensions/source/plugin/base/xplugin.cxx +++ b/extensions/source/plugin/base/xplugin.cxx @@ -124,7 +124,7 @@ XPlugin_Impl::XPlugin_Impl( const uno::Reference< com::sun::star::lang::XMultiSe m_nProvidingState( PROVIDING_NONE ), m_nCalledFromPlugin( 0 ), m_pDisposer( NULL ), - m_bIsDisposed( sal_False ) + m_bIsDisposed( false ) { memset( &m_aInstance, 0, sizeof( m_aInstance ) ); memset( &m_aNPWindow, 0, sizeof( m_aNPWindow ) ); @@ -237,7 +237,7 @@ void XPlugin_Impl::dispose() throw(std::exception) if (m_bIsDisposed || !getPluginComm()) return; - m_bIsDisposed = sal_True; + m_bIsDisposed = true; if( isDisposable() ) secondLevelDispose( this ); @@ -649,7 +649,7 @@ sal_Bool XPlugin_Impl::provideNewStream(const OUString& mimetype, { Guard< Mutex > aGuard( m_aMutex ); - sal_Bool bRet = sal_False; + bool bRet = false; if( m_nProvidingState != PROVIDING_NONE ) { @@ -825,7 +825,7 @@ sal_Bool XPlugin_Impl::provideNewStream(const OUString& mimetype, xController->start(); } } - bRet = sal_True; + bRet = true; } m_nProvidingState = PROVIDING_NONE; diff --git a/extensions/source/plugin/inc/plugin/impl.hxx b/extensions/source/plugin/inc/plugin/impl.hxx index 2a1639093db0..6ade5f26ecbe 100644 --- a/extensions/source/plugin/inc/plugin/impl.hxx +++ b/extensions/source/plugin/inc/plugin/impl.hxx @@ -153,7 +153,7 @@ private: ::std::list<PluginEventListener*> m_aPEventListeners; OUString m_aURL; - sal_Bool m_bIsDisposed; + bool m_bIsDisposed; #ifdef MACOSX void SetSysPlugDataParentView(SystemEnvData const& rEnvData); @@ -202,7 +202,7 @@ public: void enterPluginCallback() { m_nCalledFromPlugin++; } void leavePluginCallback() { m_nCalledFromPlugin--; } - sal_Bool isDisposable() { return m_nCalledFromPlugin < 1 ? sal_True : sal_False; } + bool isDisposable() { return m_nCalledFromPlugin < 1 ? sal_True : sal_False; } DECL_LINK( secondLevelDispose, XPlugin_Impl* ); void addPluginEventListener( PluginEventListener* pListener ) diff --git a/extensions/source/plugin/inc/plugin/plctrl.hxx b/extensions/source/plugin/inc/plugin/plctrl.hxx index 77972c1e4a52..bab35813b453 100644 --- a/extensions/source/plugin/inc/plugin/plctrl.hxx +++ b/extensions/source/plugin/inc/plugin/plctrl.hxx @@ -162,9 +162,9 @@ protected: sal_Int32 _nHeight; sal_Int16 _nFlags; - sal_Bool _bVisible; - sal_Bool _bInDesignMode; - sal_Bool _bEnable; + bool _bVisible; + bool _bInDesignMode; + bool _bEnable; SystemChildWindow* _pSysChild; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > _xPeer; diff --git a/extensions/source/plugin/inc/plugin/unx/mediator.hxx b/extensions/source/plugin/inc/plugin/unx/mediator.hxx index 0f69bd5861f5..3b287e69491e 100644 --- a/extensions/source/plugin/inc/plugin/unx/mediator.hxx +++ b/extensions/source/plugin/inc/plugin/unx/mediator.hxx @@ -114,7 +114,7 @@ public: return SendMessage( rMessage.getLength(), rMessage.getStr(), nMessageID ); } - sal_Bool WaitForMessage( sal_uLong nTimeOut = 5000 ); + bool WaitForMessage( sal_uLong nTimeOut = 5000 ); // timeout in ms // TRUE: Message came in // FALSE: timed out @@ -128,7 +128,7 @@ public: MediatorMessage* TransactMessage( sal_uLong nBytes, char* pBytes ); // sends a message and waits for an answer - MediatorMessage* GetNextMessage( sal_Bool bWait = sal_False ); + MediatorMessage* GetNextMessage( bool bWait = false ); Link SetConnectionLostHdl( const Link& rLink ) diff --git a/extensions/source/plugin/unx/mediator.cxx b/extensions/source/plugin/unx/mediator.cxx index 347f5e2a94d0..824880039e31 100644 --- a/extensions/source/plugin/unx/mediator.cxx +++ b/extensions/source/plugin/unx/mediator.cxx @@ -106,15 +106,15 @@ sal_uLong Mediator::SendMessage( sal_uLong nBytes, const char* pBytes, sal_uLong return nMessageID; } -sal_Bool Mediator::WaitForMessage( sal_uLong nTimeOut ) +bool Mediator::WaitForMessage( sal_uLong nTimeOut ) { if( ! m_pListener ) - return sal_False; + return false; size_t nItems = m_aMessageQueue.size(); if( ! nTimeOut && nItems > 0 ) - return sal_True; + return true; TimeValue aValue; aValue.Seconds = nTimeOut/1000; @@ -125,9 +125,9 @@ sal_Bool Mediator::WaitForMessage( sal_uLong nTimeOut ) m_aNewMessageCdtn.wait( & aValue ); m_aNewMessageCdtn.reset(); if( nTimeOut && m_aMessageQueue.size() == nItems ) - return sal_False; + return false; } - return sal_True; + return true; } MediatorMessage* Mediator::WaitForAnswer( sal_uLong nMessageID ) @@ -154,7 +154,7 @@ MediatorMessage* Mediator::WaitForAnswer( sal_uLong nMessageID ) return NULL; } -MediatorMessage* Mediator::GetNextMessage( sal_Bool bWait ) +MediatorMessage* Mediator::GetNextMessage( bool bWait ) { while( m_pListener ) { diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx index 3345acda1a20..8567b56cf0c3 100644 --- a/extensions/source/plugin/unx/npnapi.cxx +++ b/extensions/source/plugin/unx/npnapi.cxx @@ -523,7 +523,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) { MediatorMessage* pMessage; CommandAtoms nCommand; - while( (pMessage = GetNextMessage( sal_False )) ) + while( (pMessage = GetNextMessage( false )) ) { nCommand = (CommandAtoms)pMessage->GetUINT32(); SAL_INFO( diff --git a/extensions/source/plugin/unx/nppapi.cxx b/extensions/source/plugin/unx/nppapi.cxx index ff4733f12a15..4fc245be9fef 100644 --- a/extensions/source/plugin/unx/nppapi.cxx +++ b/extensions/source/plugin/unx/nppapi.cxx @@ -93,7 +93,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) MediatorMessage* pMessage; CommandAtoms nCommand; - while( (pMessage = GetNextMessage( sal_False )) ) + while( (pMessage = GetNextMessage( false )) ) { nCommand = (CommandAtoms)pMessage->GetUINT32(); SAL_INFO("extensions.plugin", GetCommandName(nCommand)); diff --git a/extensions/source/plugin/unx/sysplug.cxx b/extensions/source/plugin/unx/sysplug.cxx index b08c3da37641..6289ff8a795e 100644 --- a/extensions/source/plugin/unx/sysplug.cxx +++ b/extensions/source/plugin/unx/sysplug.cxx @@ -112,7 +112,7 @@ UnxPluginComm::UnxPluginComm( } else { - MediatorMessage* pMessage = GetNextMessage( sal_True ); + MediatorMessage* pMessage = GetNextMessage( true ); Respond( pMessage->m_nID, const_cast<char*>("init ack"),8, NULL ); diff --git a/extensions/source/plugin/unx/unxmgr.cxx b/extensions/source/plugin/unx/unxmgr.cxx index 101e235a337c..b1aae92f8e31 100644 --- a/extensions/source/plugin/unx/unxmgr.cxx +++ b/extensions/source/plugin/unx/unxmgr.cxx @@ -237,7 +237,7 @@ static void CheckPluginRegistryFiles( const OString& rPath, list< PluginDescript Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() throw() { static Sequence<PluginDescription> aDescriptions; - static sal_Bool bHavePlugins = sal_False; + static bool bHavePlugins = false; if( ! bHavePlugins ) { rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); @@ -311,7 +311,7 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th delete *iter; } aPlugins.clear(); - bHavePlugins = sal_True; + bHavePlugins = true; } return aDescriptions; } diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx index 712372391161..ab72d013db29 100644 --- a/extensions/source/propctrlr/browserline.cxx +++ b/extensions/source/propctrlr/browserline.cxx @@ -151,24 +151,24 @@ namespace pcr } - sal_Bool OBrowserLine::GrabFocus() + bool OBrowserLine::GrabFocus() { - sal_Bool bRes=sal_False; + bool bRes=false; if ( m_pControlWindow && m_pControlWindow->IsEnabled() ) { m_pControlWindow->GrabFocus(); - bRes = sal_True; + bRes = true; } else if ( m_pAdditionalBrowseButton && m_pAdditionalBrowseButton->IsEnabled() ) { m_pAdditionalBrowseButton->GrabFocus(); - bRes = sal_True; + bRes = true; } else if ( m_pBrowseButton && m_pBrowseButton->IsEnabled() ) { m_pBrowseButton->GrabFocus(); - bRes = sal_True; + bRes = true; } return bRes; } @@ -183,7 +183,7 @@ namespace pcr } - void OBrowserLine::Show(sal_Bool bFlag) + void OBrowserLine::Show(bool bFlag) { m_aFtTitle.Show(bFlag); if ( m_pControlWindow ) @@ -197,11 +197,11 @@ namespace pcr void OBrowserLine::Hide() { - Show(sal_False); + Show(false); } - sal_Bool OBrowserLine::IsVisible() + bool OBrowserLine::IsVisible() { return m_aFtTitle.IsVisible(); } @@ -415,7 +415,7 @@ namespace pcr } - void OBrowserLine::ShowBrowseButton( const OUString& _rImageURL, sal_Bool _bPrimary ) + void OBrowserLine::ShowBrowseButton( const OUString& _rImageURL, bool _bPrimary ) { PushButton& rButton( impl_ensureButton( _bPrimary ) ); @@ -427,7 +427,7 @@ namespace pcr } - void OBrowserLine::ShowBrowseButton( const Image& _rImage, sal_Bool _bPrimary ) + void OBrowserLine::ShowBrowseButton( const Image& _rImage, bool _bPrimary ) { PushButton& rButton( impl_ensureButton( _bPrimary ) ); if ( !!_rImage ) @@ -435,13 +435,13 @@ namespace pcr } - void OBrowserLine::ShowBrowseButton( sal_Bool _bPrimary ) + void OBrowserLine::ShowBrowseButton( bool _bPrimary ) { impl_ensureButton( _bPrimary ); } - void OBrowserLine::implHideBrowseButton( sal_Bool _bPrimary, bool _bReLayout ) + void OBrowserLine::implHideBrowseButton( bool _bPrimary, bool _bReLayout ) { PushButton*& rpButton = _bPrimary ? m_pBrowseButton : m_pAdditionalBrowseButton; @@ -457,7 +457,7 @@ namespace pcr } - void OBrowserLine::HideBrowseButton( sal_Bool _bPrimary ) + void OBrowserLine::HideBrowseButton( bool _bPrimary ) { implHideBrowseButton( _bPrimary, true ); } diff --git a/extensions/source/propctrlr/browserline.hxx b/extensions/source/propctrlr/browserline.hxx index 4a1edf8e1a6a..09856e4b9334 100644 --- a/extensions/source/propctrlr/browserline.hxx +++ b/extensions/source/propctrlr/browserline.hxx @@ -91,18 +91,18 @@ namespace pcr void SetTitleWidth(sal_uInt16); void SetPosSizePixel(Point aPos,Size aSize); - void Show(sal_Bool bFlag=sal_True); + void Show(bool bFlag=true); void Hide(); - sal_Bool IsVisible(); + bool IsVisible(); Window* GetRefWindow(); void SetTabOrder(Window* pRefWindow, sal_uInt16 nFlags ); - sal_Bool GrabFocus(); - void ShowBrowseButton( const OUString& _rImageURL, sal_Bool _bPrimary ); - void ShowBrowseButton( const Image& _rImage, sal_Bool _bPrimary ); - void ShowBrowseButton( sal_Bool _bPrimary ); - void HideBrowseButton( sal_Bool _bPrimary ); + bool GrabFocus(); + void ShowBrowseButton( const OUString& _rImageURL, bool _bPrimary ); + void ShowBrowseButton( const Image& _rImage, bool _bPrimary ); + void ShowBrowseButton( bool _bPrimary ); + void HideBrowseButton( bool _bPrimary ); void EnablePropertyControls( sal_Int16 _nControls, bool _bEnable ); void EnablePropertyLine( bool _bEnable ); @@ -117,7 +117,7 @@ namespace pcr DECL_LINK( OnButtonClicked, PushButton* ); DECL_LINK( OnButtonFocus, PushButton* ); - void implHideBrowseButton( sal_Bool _bPrimary, bool _bReLayout ); + void implHideBrowseButton( bool _bPrimary, bool _bReLayout ); void implUpdateEnabledDisabled(); void impl_layoutComponents(); diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 5f77e069610a..8083f8ee2076 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -353,8 +353,8 @@ namespace pcr ,m_nYOffset(0) ,m_nCurrentPreferredHelpHeight(0) ,m_nTheNameSize(0) - ,m_bIsActive(sal_False) - ,m_bUpdate(sal_True) + ,m_bIsActive(false) + ,m_bUpdate(true) ,m_pControlContextImpl( new PropertyControlContext_Impl( *this ) ) { @@ -388,9 +388,9 @@ namespace pcr } - sal_Bool OBrowserListBox::IsModified( ) const + bool OBrowserListBox::IsModified( ) const { - sal_Bool bModified = sal_False; + bool bModified = false; if ( m_bIsActive && m_xActiveControl.is() ) bModified = m_xActiveControl->isModified(); @@ -419,7 +419,7 @@ namespace pcr } - void OBrowserListBox::ActivateListBox(sal_Bool _bActive) + void OBrowserListBox::ActivateListBox(bool _bActive) { m_bIsActive = _bActive; if (m_bIsActive) @@ -456,7 +456,7 @@ namespace pcr UpdateVScroll(); - sal_Bool bNeedScrollbar = m_aLines.size() > (sal_uInt32)CalcVisibleLines(); + bool bNeedScrollbar = m_aLines.size() > (sal_uInt32)CalcVisibleLines(); if ( !bNeedScrollbar ) { if ( m_aVScroll.IsVisible() ) @@ -636,13 +636,13 @@ namespace pcr void OBrowserListBox::DisableUpdate() { - m_bUpdate = sal_False; + m_bUpdate = false; } void OBrowserListBox::EnableUpdate() { - m_bUpdate = sal_True; + m_bUpdate = true; UpdateAll(); } @@ -1063,7 +1063,7 @@ namespace pcr } - sal_Bool OBrowserListBox::RemoveEntry( const OUString& _rName ) + bool OBrowserListBox::RemoveEntry( const OUString& _rName ) { sal_uInt16 nPos = 0; ListBoxLines::iterator it = m_aLines.begin(); @@ -1071,7 +1071,7 @@ namespace pcr ; if ( it == m_aLines.end() ) - return sal_False; + return false; m_aLines.erase( it ); m_aOutOfDateLines.erase( (sal_uInt16)m_aLines.size() ); @@ -1081,7 +1081,7 @@ namespace pcr m_aOutOfDateLines.insert( nPos++ ); UpdatePosNSize( ); - return sal_True; + return true; } diff --git a/extensions/source/propctrlr/browserlistbox.hxx b/extensions/source/propctrlr/browserlistbox.hxx index adac46c12828..1652e07c660a 100644 --- a/extensions/source/propctrlr/browserlistbox.hxx +++ b/extensions/source/propctrlr/browserlistbox.hxx @@ -107,8 +107,8 @@ namespace pcr sal_uInt16 m_nTheNameSize; sal_uInt16 m_nRowHeight; ::std::set< sal_uInt16 > m_aOutOfDateLines; - sal_Bool m_bIsActive : 1; - sal_Bool m_bUpdate : 1; + bool m_bIsActive : 1; + bool m_bUpdate : 1; ::rtl::Reference< PropertyControlContext_Impl > m_pControlContextImpl; @@ -128,7 +128,7 @@ namespace pcr void UpdateAll(); - void ActivateListBox( sal_Bool _bActive ); + void ActivateListBox( bool _bActive ); sal_uInt16 CalcVisibleLines(); void EnableUpdate(); @@ -147,7 +147,7 @@ namespace pcr void Clear(); sal_uInt16 InsertEntry( const OLineDescriptor&, sal_uInt16 nPos = EDITOR_LIST_APPEND ); - sal_Bool RemoveEntry( const OUString& _rName ); + bool RemoveEntry( const OUString& _rName ); void ChangeEntry( const OLineDescriptor&, sal_uInt16 nPos ); void SetPropertyValue( const OUString& rEntryName, const ::com::sun::star::uno::Any& rValue, bool _bUnknownValue ); @@ -161,7 +161,7 @@ namespace pcr sal_Int32 GetMinimumHeight(); - sal_Bool IsModified( ) const; + bool IsModified( ) const; void CommitModified( ); protected: diff --git a/extensions/source/propctrlr/cellbindinghandler.cxx b/extensions/source/propctrlr/cellbindinghandler.cxx index 5ce737887f49..3b72cd1db250 100644 --- a/extensions/source/propctrlr/cellbindinghandler.cxx +++ b/extensions/source/propctrlr/cellbindinghandler.cxx @@ -312,7 +312,7 @@ namespace pcr Reference< XValueBinding > xBinding = m_pHelper->getCurrentBinding( ); if ( xBinding.is() ) { - sal_Bool bNeedIntegerBinding = ( nExchangeType == 1 ); + bool bNeedIntegerBinding = ( nExchangeType == 1 ); if ( (bool)bNeedIntegerBinding != m_pHelper->isCellIntegerBinding( xBinding ) ) { CellAddress aAddress; @@ -412,7 +412,7 @@ namespace pcr { Reference< XValueBinding > xBinding; #if OSL_DEBUG_LEVEL > 0 - sal_Bool bSuccess = + bool bSuccess = #endif _rPropertyValue >>= xBinding; OSL_ENSURE( bSuccess, "CellBindingPropertyHandler::convertToControlValue: invalid value (1)!" ); @@ -426,7 +426,7 @@ namespace pcr { Reference< XListEntrySource > xSource; #if OSL_DEBUG_LEVEL > 0 - sal_Bool bSuccess = + bool bSuccess = #endif _rPropertyValue >>= xSource; OSL_ENSURE( bSuccess, "CellBindingPropertyHandler::convertToControlValue: invalid value (2)!" ); diff --git a/extensions/source/propctrlr/cellbindinghelper.cxx b/extensions/source/propctrlr/cellbindinghelper.cxx index 5af2c6e2a6ed..41fbf95a2ce5 100644 --- a/extensions/source/propctrlr/cellbindinghelper.cxx +++ b/extensions/source/propctrlr/cellbindinghelper.cxx @@ -92,7 +92,7 @@ namespace pcr } - sal_Bool CellBindingHelper::isSpreadsheetDocument( const Reference< XModel >& _rxContextDocument ) + bool CellBindingHelper::isSpreadsheetDocument( const Reference< XModel >& _rxContextDocument ) { return Reference< XSpreadsheetDocument >::query( _rxContextDocument ).is(); } diff --git a/extensions/source/propctrlr/cellbindinghelper.hxx b/extensions/source/propctrlr/cellbindinghelper.hxx index f271e9889cad..9ea91f4756cc 100644 --- a/extensions/source/propctrlr/cellbindinghelper.hxx +++ b/extensions/source/propctrlr/cellbindinghelper.hxx @@ -64,7 +64,7 @@ namespace pcr <p>If this method returns <FALSE/>, you cannot instantiate a CellBindingHelper with the document, since then no of it's functionality will be available.</p> */ - static sal_Bool isSpreadsheetDocument( + static bool isSpreadsheetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxContextDocument ); diff --git a/extensions/source/propctrlr/commoncontrol.cxx b/extensions/source/propctrlr/commoncontrol.cxx index e367d997bf7b..4af9c7f4e95d 100644 --- a/extensions/source/propctrlr/commoncontrol.cxx +++ b/extensions/source/propctrlr/commoncontrol.cxx @@ -45,7 +45,7 @@ namespace pcr ,m_nControlType( _nControlType ) ,m_rAntiImpl( _rAntiImpl ) ,m_pModifyListener( _pModifyListener ) - ,m_bModified( sal_False ) + ,m_bModified( false ) { DBG_ASSERT( m_pControlWindow != NULL, "ControlHelper::ControlHelper: invalid window!" ); } @@ -80,7 +80,7 @@ namespace pcr } - sal_Bool SAL_CALL ControlHelper::isModified( ) throw (RuntimeException) + bool SAL_CALL ControlHelper::isModified( ) throw (RuntimeException) { return m_bModified; } @@ -93,7 +93,7 @@ namespace pcr try { m_xContext->valueChanged( &m_rAntiImpl ); - m_bModified = sal_False; + m_bModified = false; } catch( const Exception& ) { diff --git a/extensions/source/propctrlr/commoncontrol.hxx b/extensions/source/propctrlr/commoncontrol.hxx index f880a01b0721..9be15b7f15a9 100644 --- a/extensions/source/propctrlr/commoncontrol.hxx +++ b/extensions/source/propctrlr/commoncontrol.hxx @@ -93,7 +93,7 @@ namespace pcr ::com::sun::star::inspection::XPropertyControl& m_rAntiImpl; IModifyListener* m_pModifyListener; - sal_Bool m_bModified; + bool m_bModified; public: /** creates the instance @@ -125,7 +125,7 @@ namespace pcr /** sets our "modified" flag to <TRUE/> */ - inline void setModified() { m_bModified = sal_True; } + inline void setModified() { m_bModified = true; } inline Window* getVclControlWindow() { return m_pControlWindow; } inline const Window* getVclControlWindow() const { return m_pControlWindow; } @@ -135,7 +135,7 @@ namespace pcr ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlContext > SAL_CALL getControlContext() throw (::com::sun::star::uno::RuntimeException); void SAL_CALL setControlContext( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlContext >& _controlcontext ) throw (::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getControlWindow() throw (::com::sun::star::uno::RuntimeException); - sal_Bool SAL_CALL isModified( ) throw (::com::sun::star::uno::RuntimeException); + bool SAL_CALL isModified( ) throw (::com::sun::star::uno::RuntimeException); void SAL_CALL notifyModifiedValue( ) throw (::com::sun::star::uno::RuntimeException); // XComponent diff --git a/extensions/source/propctrlr/composeduiupdate.cxx b/extensions/source/propctrlr/composeduiupdate.cxx index bc15bcc438d4..c4cf96a69b96 100644 --- a/extensions/source/propctrlr/composeduiupdate.cxx +++ b/extensions/source/propctrlr/composeduiupdate.cxx @@ -165,7 +165,7 @@ namespace pcr void checkDisposed() const; private: - void impl_markElementEnabledOrDisabled( const OUString& _rPropertyName, sal_Int16 _nElementIdOrZero, sal_Bool _bEnable ); + void impl_markElementEnabledOrDisabled( const OUString& _rPropertyName, sal_Int16 _nElementIdOrZero, bool _bEnable ); /** calls <member>m_pUIChangeNotification</member> at <member>m_rMaster</member> */ @@ -240,7 +240,7 @@ namespace pcr namespace { - void lcl_markStringKeyPositiveOrNegative( const OUString& _rKeyName, StringBag& _rPositives, StringBag& _rNegatives, sal_Bool _bMarkPositive ) + void lcl_markStringKeyPositiveOrNegative( const OUString& _rKeyName, StringBag& _rPositives, StringBag& _rNegatives, bool _bMarkPositive ) { if ( _bMarkPositive ) { @@ -265,7 +265,7 @@ namespace pcr } - void CachedInspectorUI::impl_markElementEnabledOrDisabled( const OUString& _rPropertyName, sal_Int16 _nElementIdOrZero, sal_Bool _bEnable ) + void CachedInspectorUI::impl_markElementEnabledOrDisabled( const OUString& _rPropertyName, sal_Int16 _nElementIdOrZero, bool _bEnable ) { if ( _nElementIdOrZero == 0 ) return; @@ -603,10 +603,10 @@ namespace pcr { private: const IStringKeyBooleanUIUpdate& m_rUpdater; - sal_Bool m_bFlag; + bool m_bFlag; public: - BooleanUIAspectUpdate( const IStringKeyBooleanUIUpdate& _rUpdater, sal_Bool _bFlag ) + BooleanUIAspectUpdate( const IStringKeyBooleanUIUpdate& _rUpdater, bool _bFlag ) :m_rUpdater( _rUpdater ) ,m_bFlag( _bFlag ) { @@ -617,7 +617,7 @@ namespace pcr m_rUpdater.updateUIForKey( _rPropertyName, m_bFlag ); } - static void forEach( const StringBag& _rProperties, const IStringKeyBooleanUIUpdate& _rUpdater, sal_Bool _bFlag ) + static void forEach( const StringBag& _rProperties, const IStringKeyBooleanUIUpdate& _rUpdater, bool _bFlag ) { ::std::for_each( _rProperties.begin(), _rProperties.end(), BooleanUIAspectUpdate( _rUpdater, _bFlag ) ); } @@ -666,12 +666,12 @@ namespace pcr StringBagCollector::collectAll( aAllNegatives, _rHandlerUIs, _pGetNegatives ); // propagate the "negative" flags to the delegator UI - BooleanUIAspectUpdate::forEach( aAllNegatives, _rUIUpdate, sal_False ); + BooleanUIAspectUpdate::forEach( aAllNegatives, _rUIUpdate, false ); // propagate the "positive" flags to the delegator UI, for all elements where _no_ // "negative" flag exists StringBagComplement::subtract( aAllPositives, aAllNegatives ); - BooleanUIAspectUpdate::forEach( aAllPositives, _rUIUpdate, sal_True ); + BooleanUIAspectUpdate::forEach( aAllPositives, _rUIUpdate, true ); // the "positive" request can be cleared no, only negative requests // (such as "disable a property" or "hide a category") need to be preserved for the next round diff --git a/extensions/source/propctrlr/editpropertyhandler.cxx b/extensions/source/propctrlr/editpropertyhandler.cxx index 27b1366b0584..207c7f13c2e4 100644 --- a/extensions/source/propctrlr/editpropertyhandler.cxx +++ b/extensions/source/propctrlr/editpropertyhandler.cxx @@ -88,9 +88,9 @@ namespace pcr { case PROPERTY_ID_SHOW_SCROLLBARS: { - sal_Bool bHasVScroll = sal_False; + bool bHasVScroll = false; m_xComponent->getPropertyValue( PROPERTY_VSCROLL ) >>= bHasVScroll; - sal_Bool bHasHScroll = sal_False; + bool bHasHScroll = false; m_xComponent->getPropertyValue( PROPERTY_HSCROLL ) >>= bHasHScroll; aReturn <<= (sal_Int32)( ( bHasVScroll ? 2 : 0 ) + ( bHasHScroll ? 1 : 0 ) ); @@ -100,13 +100,13 @@ namespace pcr case PROPERTY_ID_TEXTTYPE: { sal_Int32 nTextType = TEXTTYPE_SINGLELINE; - sal_Bool bRichText = sal_False; + bool bRichText = false; OSL_VERIFY( m_xComponent->getPropertyValue( PROPERTY_RICHTEXT ) >>= bRichText ); if ( bRichText ) nTextType = TEXTTYPE_RICHTEXT; else { - sal_Bool bMultiLine = sal_False; + bool bMultiLine = false; OSL_VERIFY( m_xComponent->getPropertyValue( PROPERTY_MULTILINE ) >>= bMultiLine ); if ( bMultiLine ) nTextType = TEXTTYPE_MULTILINE; @@ -146,25 +146,25 @@ namespace pcr sal_Int32 nScrollbars = 0; _rValue >>= nScrollbars; - sal_Bool bHasVScroll = 0 != ( nScrollbars & 2 ); - sal_Bool bHasHScroll = 0 != ( nScrollbars & 1 ); + bool bHasVScroll = 0 != ( nScrollbars & 2 ); + bool bHasHScroll = 0 != ( nScrollbars & 1 ); - m_xComponent->setPropertyValue( PROPERTY_VSCROLL, makeAny( (sal_Bool)bHasVScroll ) ); - m_xComponent->setPropertyValue( PROPERTY_HSCROLL, makeAny( (sal_Bool)bHasHScroll ) ); + m_xComponent->setPropertyValue( PROPERTY_VSCROLL, makeAny( bHasVScroll ) ); + m_xComponent->setPropertyValue( PROPERTY_HSCROLL, makeAny( bHasHScroll ) ); } break; case PROPERTY_ID_TEXTTYPE: { - sal_Bool bMultiLine = sal_False; - sal_Bool bRichText = sal_False; + bool bMultiLine = false; + bool bRichText = false; sal_Int32 nTextType = TEXTTYPE_SINGLELINE; OSL_VERIFY( _rValue >>= nTextType ); switch ( nTextType ) { - case TEXTTYPE_SINGLELINE: bMultiLine = bRichText = sal_False; break; - case TEXTTYPE_MULTILINE: bMultiLine = sal_True; bRichText = sal_False; break; - case TEXTTYPE_RICHTEXT: bMultiLine = sal_True; bRichText = sal_True; break; + case TEXTTYPE_SINGLELINE: bMultiLine = bRichText = false; break; + case TEXTTYPE_MULTILINE: bMultiLine = true; bRichText = false; break; + case TEXTTYPE_RICHTEXT: bMultiLine = true; bRichText = true; break; default: OSL_FAIL( "EditPropertyHandler::setPropertyValue: invalid text type!" ); } @@ -289,7 +289,7 @@ namespace pcr case PROPERTY_ID_MULTILINE: { - sal_Bool bIsMultiline = sal_False; + bool bIsMultiline = false; _rNewValue >>= bIsMultiline; _rxInspectorUI->enablePropertyUI( PROPERTY_SHOW_SCROLLBARS, bIsMultiline ); diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx index abe9139d9720..e51ae8a48078 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.cxx +++ b/extensions/source/propctrlr/eformspropertyhandler.cxx @@ -455,10 +455,10 @@ namespace pcr switch ( nControlType ) { case PropertyControlType::ListBox: - aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, aListEntries, sal_False, sal_True ); + aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, aListEntries, false, true ); break; case PropertyControlType::ComboBox: - aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, aListEntries, sal_False, sal_True ); + aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, aListEntries, false, true ); break; default: aDescriptor.Control = _rxControlFactory->createPropertyControl( nControlType, sal_False ); @@ -571,7 +571,7 @@ namespace pcr break; OUString sDataModelName; OSL_VERIFY( _rNewValue >>= sDataModelName ); - sal_Bool bBoundToSomeModel = !sDataModelName.isEmpty(); + bool bBoundToSomeModel = !sDataModelName.isEmpty(); _rxInspectorUI->rebuildPropertyUI( PROPERTY_BINDING_NAME ); _rxInspectorUI->enablePropertyUI( PROPERTY_BINDING_NAME, bBoundToSomeModel ); } @@ -579,7 +579,7 @@ namespace pcr case PROPERTY_ID_BINDING_NAME: { - sal_Bool bHaveABinding = !m_pHelper->getCurrentBindingName().isEmpty(); + bool bHaveABinding = !m_pHelper->getCurrentBindingName().isEmpty(); _rxInspectorUI->enablePropertyUI( PROPERTY_BIND_EXPRESSION, bHaveABinding ); _rxInspectorUI->enablePropertyUI( PROPERTY_XSD_REQUIRED, bHaveABinding ); _rxInspectorUI->enablePropertyUI( PROPERTY_XSD_RELEVANT, bHaveABinding ); diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index 5d01e16f2847..e904dfadff45 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -81,7 +81,7 @@ namespace pcr _rxProps ); public: - sal_Bool getCheckFontProperty(const OUString& _rPropName, ::com::sun::star::uno::Any& _rValue); + bool getCheckFontProperty(const OUString& _rPropName, ::com::sun::star::uno::Any& _rValue); OUString getStringFontProperty(const OUString& _rPropName, const OUString& _rDefault); sal_Int16 getInt16FontProperty(const OUString& _rPropName, const sal_Int16 _nDefault); sal_Int32 getInt32FontProperty(const OUString& _rPropName, const sal_Int32 _nDefault); @@ -91,7 +91,7 @@ namespace pcr const OUString& _rPropName, sal_uInt16 _nItemId, SfxItemSet& _rSet, - sal_Bool _bForceInvalidation = sal_False); + bool _bForceInvalidation = false); }; @@ -103,13 +103,13 @@ namespace pcr } - sal_Bool OFontPropertyExtractor::getCheckFontProperty(const OUString& _rPropName, Any& _rValue) + bool OFontPropertyExtractor::getCheckFontProperty(const OUString& _rPropName, Any& _rValue) { _rValue = m_xPropValueAccess->getPropertyValue(_rPropName); if (m_xPropStateAccess.is()) return PropertyState_DEFAULT_VALUE == m_xPropStateAccess->getPropertyState(_rPropName); - return sal_False; + return false; } @@ -157,7 +157,7 @@ namespace pcr } - void OFontPropertyExtractor::invalidateItem(const OUString& _rPropName, sal_uInt16 _nItemId, SfxItemSet& _rSet, sal_Bool _bForceInvalidation) + void OFontPropertyExtractor::invalidateItem(const OUString& _rPropName, sal_uInt16 _nItemId, SfxItemSet& _rSet, bool _bForceInvalidation) { if ( _bForceInvalidation || ( m_xPropStateAccess.is() @@ -218,7 +218,7 @@ namespace pcr sal_Int16 nFontEmphasisMark = aPropExtractor.getInt16FontProperty(PROPERTY_FONT_EMPHASIS_MARK, aDefaultVCLFont.GetEmphasisMark()); Any aValue; - sal_Bool bWordLineMode = aPropExtractor.getCheckFontProperty(PROPERTY_WORDLINEMODE, aValue) ? aDefaultFont.WordLineMode : ::cppu::any2bool(aValue); + bool bWordLineMode = aPropExtractor.getCheckFontProperty(PROPERTY_WORDLINEMODE, aValue) ? aDefaultFont.WordLineMode : ::cppu::any2bool(aValue); sal_Int32 nColor32 = aPropExtractor.getInt32FontProperty(PROPERTY_TEXTCOLOR, 0); // build SfxItems with the values diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index c631e9d2f510..0f37e16ceef7 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -1226,7 +1226,7 @@ namespace pcr Optional< double > aValueNotPresent( sal_False, 0 ); aDescriptor.Control = PropertyHandlerHelper::createNumericControl( - _rxControlFactory, nDigits, aValueNotPresent, aValueNotPresent, sal_False ); + _rxControlFactory, nDigits, aValueNotPresent, aValueNotPresent, false ); Reference< XNumericControl > xNumericControl( aDescriptor.Control, UNO_QUERY_THROW ); if ( nValueUnit != -1 ) @@ -1255,7 +1255,7 @@ namespace pcr ::std::vector< OUString > aListEntries; tools::StringListResource aRes(PcrRes(nResId),aListEntries); - aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, aListEntries, sal_False, sal_False ); + aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, aListEntries, false, false ); bNeedDefaultStringIfVoidAllowed = true; } @@ -1297,10 +1297,10 @@ namespace pcr // create the control if ( PROPERTY_ID_TARGET_FRAME == nPropId ) - aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, aListEntries, sal_False, sal_False ); + aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, aListEntries, false, false ); else { - aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, aListEntries, sal_False, sal_False ); + aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, aListEntries, false, false ); bNeedDefaultStringIfVoidAllowed = true; } } @@ -1337,7 +1337,7 @@ namespace pcr aMinValue.Value = 0; aDescriptor.Control = PropertyHandlerHelper::createNumericControl( - _rxControlFactory, 0, aMinValue, aMaxValue, sal_False ); + _rxControlFactory, 0, aMinValue, aMaxValue, false ); } break; @@ -1347,7 +1347,7 @@ namespace pcr Optional< double > aMaxValue( sal_True, 20 ); aDescriptor.Control = PropertyHandlerHelper::createNumericControl( - _rxControlFactory, 0, aMinValue, aMaxValue, sal_False ); + _rxControlFactory, 0, aMinValue, aMaxValue, false ); } break; @@ -1365,7 +1365,7 @@ namespace pcr ::std::copy( aDatasources.getConstArray(), aDatasources.getConstArray() + aDatasources.getLength(), aListEntries.begin() ); aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( - _rxControlFactory, aListEntries, sal_False, sal_True ); + _rxControlFactory, aListEntries, false, true ); } break; @@ -1374,7 +1374,7 @@ namespace pcr ::std::vector< OUString > aFieldNames; impl_initFieldList_nothrow( aFieldNames ); aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( - _rxControlFactory, aFieldNames, sal_False, sal_False ); + _rxControlFactory, aFieldNames, false, false ); } break; @@ -2472,7 +2472,7 @@ namespace pcr else impl_fillQueryNames_throw( aNames ); } - _out_rProperty.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, aNames, sal_False, sal_True ); + _out_rProperty.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, aNames, false, true ); } break; @@ -2588,7 +2588,7 @@ namespace pcr else impl_fillTableNames_throw( aListEntries ); } - _out_rDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, aListEntries, sal_False, sal_False ); + _out_rDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, aListEntries, false, false ); } break; case ListSourceType_SQL: diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx index 5fc3a9d40dfc..bf4650c55949 100644 --- a/extensions/source/propctrlr/formgeometryhandler.cxx +++ b/extensions/source/propctrlr/formgeometryhandler.cxx @@ -465,7 +465,7 @@ namespace pcr Optional< double > aZero( sal_True, 0 ); Optional< double > aValueNotPresent( sal_False, 0 ); aLineDesc.Control = PropertyHandlerHelper::createNumericControl( - _rxControlFactory, 2, bIsSize ? aZero : aValueNotPresent, aValueNotPresent, sal_False ); + _rxControlFactory, 2, bIsSize ? aZero : aValueNotPresent, aValueNotPresent, false ); Reference< XNumericControl > xNumericControl( aLineDesc.Control, UNO_QUERY_THROW ); xNumericControl->setValueUnit( MeasureUnit::MM_100TH ); @@ -630,7 +630,7 @@ namespace pcr { Reference< XPropertySet > xRowOrColumn( _rxRowsOrColumns->getByIndex( currentPos ), UNO_QUERY_THROW ); - sal_Bool bIsVisible = sal_True; + bool bIsVisible = true; OSL_VERIFY( xRowOrColumn->getPropertyValue( PROPERTY_IS_VISIBLE ) >>= bIsVisible ); if ( !bIsVisible ) continue; diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index ac27c97ed313..4b63a9102475 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -340,7 +340,7 @@ namespace pcr // in all rows, there must be either two valid selections, or none at all // If there is at least one row with exactly one valid selection, then the // OKButton needs to be disabled - sal_Bool bEnable = sal_True; + bool bEnable = true; const FieldLinkRow* aRows[] = { m_aRow1.get(), m_aRow2.get(), m_aRow3.get(), m_aRow4.get() @@ -352,7 +352,7 @@ namespace pcr if ( aRows[ i ]->GetFieldName( FieldLinkRow::eDetailField, sNotInterestedInRightNow ) != aRows[ i ]->GetFieldName( FieldLinkRow::eMasterField, sNotInterestedInRightNow ) ) - bEnable = sal_False; + bEnable = false; } m_aOK.Enable( bEnable ); @@ -491,7 +491,7 @@ namespace pcr } - sal_Bool FormLinkDialog::getExistingRelation( const Reference< XPropertySet >& _rxLHS, const Reference< XPropertySet >& /*_rxRHS*/, + bool FormLinkDialog::getExistingRelation( const Reference< XPropertySet >& _rxLHS, const Reference< XPropertySet >& /*_rxRHS*/, // TODO: fix the usage of _rxRHS. This is issue #i81956#. Sequence< OUString >& _rLeftFields, Sequence< OUString >& _rRightFields ) const { @@ -566,7 +566,7 @@ namespace pcr try { - sal_Bool bEnable = sal_True; + bool bEnable = true; // only show the button when both forms are based on the same data source if ( bEnable ) @@ -589,7 +589,7 @@ namespace pcr } catch(const Exception&) { - bEnable = sal_False; + bEnable = false; } } diff --git a/extensions/source/propctrlr/formlinkdialog.hxx b/extensions/source/propctrlr/formlinkdialog.hxx index fe5e70e972c6..d5a0f9cf08cf 100644 --- a/extensions/source/propctrlr/formlinkdialog.hxx +++ b/extensions/source/propctrlr/formlinkdialog.hxx @@ -126,7 +126,7 @@ namespace pcr ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getCanonicUnderlyingTable( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxFormProps ) const; - sal_Bool getExistingRelation( + bool getExistingRelation( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxLHS, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxRHS, ::com::sun::star::uno::Sequence< OUString >& /* [out] */ _rLeftFields, diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx index 3d50429e7589..f7278830f034 100644 --- a/extensions/source/propctrlr/formmetadata.cxx +++ b/extensions/source/propctrlr/formmetadata.cxx @@ -529,11 +529,11 @@ namespace pcr } - sal_Bool OPropertyInfoService::isComposeable( const OUString& _rPropertyName ) const + bool OPropertyInfoService::isComposeable( const OUString& _rPropertyName ) const { sal_Int32 nId = getPropertyId( _rPropertyName ); if ( nId == -1 ) - return sal_False; + return false; sal_uInt32 nFlags = getPropertyUIFlags( nId ); return ( nFlags & PROP_FLAG_COMPOSEABLE ) != 0; diff --git a/extensions/source/propctrlr/formmetadata.hxx b/extensions/source/propctrlr/formmetadata.hxx index 17f918665c1e..3aed7fa86418 100644 --- a/extensions/source/propctrlr/formmetadata.hxx +++ b/extensions/source/propctrlr/formmetadata.hxx @@ -53,7 +53,7 @@ namespace pcr virtual ::std::vector< OUString > getPropertyEnumRepresentations(sal_Int32 _nId) const SAL_OVERRIDE; virtual OUString getPropertyName( sal_Int32 _nPropId ) SAL_OVERRIDE; - virtual sal_Bool isComposeable( const OUString& _rPropertyName ) const; + virtual bool isComposeable( const OUString& _rPropertyName ) const; protected: static const OPropertyInfoImpl* getPropertyInfo(); diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx index f2c614bd4c00..c87caaecc3cc 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.cxx +++ b/extensions/source/propctrlr/genericpropertyhandler.cxx @@ -591,7 +591,7 @@ namespace pcr aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, impl_getEnumConverter( pos->second.Type )->getDescriptions(), PropertyHandlerHelper::requiresReadOnlyControl( pos->second.Attributes ), - sal_False ); + false ); break; case TypeClass_STRING: { diff --git a/extensions/source/propctrlr/handlerhelper.cxx b/extensions/source/propctrlr/handlerhelper.cxx index c154d0195a94..2451b31dd2a8 100644 --- a/extensions/source/propctrlr/handlerhelper.cxx +++ b/extensions/source/propctrlr/handlerhelper.cxx @@ -68,14 +68,14 @@ namespace pcr if ( !_rxControlFactory.is() ) return; - sal_Bool bReadOnlyControl = requiresReadOnlyControl( _rProperty.Attributes ); + bool bReadOnlyControl = requiresReadOnlyControl( _rProperty.Attributes ); // special handling for booleans (this will become a list) if ( _rProperty.Type.getTypeClass() == TypeClass_BOOLEAN ) { ::std::vector< OUString > aListEntries; tools::StringListResource aRes(PcrRes(RID_RSC_ENUM_YESNO),aListEntries); - _out_rDescriptor.Control = createListBoxControl( _rxControlFactory, aListEntries, bReadOnlyControl, sal_False ); + _out_rDescriptor.Control = createListBoxControl( _rxControlFactory, aListEntries, bReadOnlyControl, false ); return; } @@ -117,9 +117,9 @@ namespace pcr Reference< XPropertyControl > lcl_implCreateListLikeControl( const Reference< XPropertyControlFactory >& _rxControlFactory, const ::std::vector< OUString >& _rInitialListEntries, - sal_Bool _bReadOnlyControl, - sal_Bool _bSorted, - sal_Bool _bTrueIfListBoxFalseIfComboBox + bool _bReadOnlyControl, + bool _bSorted, + bool _bTrueIfListBoxFalseIfComboBox ) { Reference< XStringListControl > xListControl( @@ -144,21 +144,21 @@ namespace pcr Reference< XPropertyControl > PropertyHandlerHelper::createListBoxControl( const Reference< XPropertyControlFactory >& _rxControlFactory, - const ::std::vector< OUString >& _rInitialListEntries, sal_Bool _bReadOnlyControl, sal_Bool _bSorted ) + const ::std::vector< OUString >& _rInitialListEntries, bool _bReadOnlyControl, bool _bSorted ) { - return lcl_implCreateListLikeControl( _rxControlFactory, _rInitialListEntries, _bReadOnlyControl, _bSorted, sal_True ); + return lcl_implCreateListLikeControl( _rxControlFactory, _rInitialListEntries, _bReadOnlyControl, _bSorted, true ); } Reference< XPropertyControl > PropertyHandlerHelper::createComboBoxControl( const Reference< XPropertyControlFactory >& _rxControlFactory, - const ::std::vector< OUString >& _rInitialListEntries, sal_Bool _bReadOnlyControl, sal_Bool _bSorted ) + const ::std::vector< OUString >& _rInitialListEntries, bool _bReadOnlyControl, bool _bSorted ) { - return lcl_implCreateListLikeControl( _rxControlFactory, _rInitialListEntries, _bReadOnlyControl, _bSorted, sal_False ); + return lcl_implCreateListLikeControl( _rxControlFactory, _rInitialListEntries, _bReadOnlyControl, _bSorted, false ); } Reference< XPropertyControl > PropertyHandlerHelper::createNumericControl( const Reference< XPropertyControlFactory >& _rxControlFactory, - sal_Int16 _nDigits, const Optional< double >& _rMinValue, const Optional< double >& _rMaxValue, sal_Bool _bReadOnlyControl ) + sal_Int16 _nDigits, const Optional< double >& _rMinValue, const Optional< double >& _rMaxValue, bool _bReadOnlyControl ) { Reference< XNumericControl > xNumericControl( _rxControlFactory->createPropertyControl( PropertyControlType::NumericField, _bReadOnlyControl ), diff --git a/extensions/source/propctrlr/handlerhelper.hxx b/extensions/source/propctrlr/handlerhelper.hxx index db813b820b9d..f3482aafeb65 100644 --- a/extensions/source/propctrlr/handlerhelper.hxx +++ b/extensions/source/propctrlr/handlerhelper.hxx @@ -94,8 +94,8 @@ namespace pcr createListBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlFactory >& _rxControlFactory, const ::std::vector< OUString >& _rInitialListEntries, - sal_Bool _bReadOnlyControl, - sal_Bool _bSorted + bool _bReadOnlyControl, + bool _bSorted ); /** creates an <member scope="com::sun::star::inspection">PropertyControlType::ComboBox</member>-type control @@ -120,8 +120,8 @@ namespace pcr createComboBoxControl( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlFactory >& _rxControlFactory, const ::std::vector< OUString >& _rInitialListEntries, - sal_Bool _bReadOnlyControl, - sal_Bool _bSorted + bool _bReadOnlyControl, + bool _bSorted ); /** creates an <member scope="com::sun::star::inspection">PropertyControlType::NumericField</member>-type control @@ -150,7 +150,7 @@ namespace pcr sal_Int16 _nDigits, const ::com::sun::star::beans::Optional< double >& _rMinValue, const ::com::sun::star::beans::Optional< double >& _rMaxValue, - sal_Bool _bReadOnlyControl + bool _bReadOnlyControl ); /** marks the document passed in our UNO context as modified @@ -190,7 +190,7 @@ namespace pcr the attributes of the property which should be reflected by a to-be-created <type scope="com::sun::star::inspection">XPropertyControl</type> */ - inline static sal_Bool requiresReadOnlyControl( sal_Int16 _nPropertyAttributes ) + inline static bool requiresReadOnlyControl( sal_Int16 _nPropertyAttributes ) { return ( _nPropertyAttributes & ::com::sun::star::beans::PropertyAttribute::READONLY ) != 0; } diff --git a/extensions/source/propctrlr/inspectormodelbase.cxx b/extensions/source/propctrlr/inspectormodelbase.cxx index 6626365294d5..9a2f3368729b 100644 --- a/extensions/source/propctrlr/inspectormodelbase.cxx +++ b/extensions/source/propctrlr/inspectormodelbase.cxx @@ -59,10 +59,10 @@ namespace pcr { private: ::osl::Mutex& m_rMutex; - sal_Bool m_bHasHelpSection; + bool m_bHasHelpSection; sal_Int32 m_nMinHelpTextLines; sal_Int32 m_nMaxHelpTextLines; - sal_Bool m_bIsReadOnly; + bool m_bIsReadOnly; ::std::auto_ptr< ::cppu::IPropertyArrayHelper > m_pPropertyInfo; @@ -74,8 +74,8 @@ namespace pcr using ::comphelper::OPropertyContainerHelper::getFastPropertyValue; public: - inline sal_Bool hasHelpSection() const { return m_bHasHelpSection; } - inline sal_Bool isReadOnly() const { return m_bIsReadOnly; } + inline bool hasHelpSection() const { return m_bHasHelpSection; } + inline bool isReadOnly() const { return m_bIsReadOnly; } inline sal_Int32 getMinHelpTextLines() const { return m_nMinHelpTextLines; } inline sal_Int32 getMaxHelpTextLines() const { return m_nMaxHelpTextLines; } @@ -93,10 +93,10 @@ namespace pcr InspectorModelProperties::InspectorModelProperties( ::osl::Mutex& _rMutex ) :m_rMutex( _rMutex ) - ,m_bHasHelpSection( sal_False ) + ,m_bHasHelpSection( false ) ,m_nMinHelpTextLines( 3 ) ,m_nMaxHelpTextLines( 8 ) - ,m_bIsReadOnly( sal_False ) + ,m_bIsReadOnly( false ) { registerProperty( OUString( "HasHelpSection" ), @@ -127,7 +127,7 @@ namespace pcr void InspectorModelProperties::constructWithHelpSection( sal_Int32 _nMinHelpTextLines, sal_Int32 _nMaxHelpTextLines ) { - m_bHasHelpSection = sal_True; + m_bHasHelpSection = true; m_nMinHelpTextLines = _nMinHelpTextLines; m_nMaxHelpTextLines = _nMaxHelpTextLines; // no need to notify this, those properties are not bound. Also, the method should diff --git a/extensions/source/propctrlr/listselectiondlg.cxx b/extensions/source/propctrlr/listselectiondlg.cxx index cbc73ed04e63..4c9d4305ff53 100644 --- a/extensions/source/propctrlr/listselectiondlg.cxx +++ b/extensions/source/propctrlr/listselectiondlg.cxx @@ -80,7 +80,7 @@ namespace pcr try { // initialize the multi-selection flag - sal_Bool bMultiSelection = sal_False; + bool bMultiSelection = false; OSL_VERIFY( m_xListBox->getPropertyValue( PROPERTY_MULTISELECTION ) >>= bMultiSelection ); m_aEntries.EnableMultiSelection( bMultiSelection ); diff --git a/extensions/source/propctrlr/pcrservices.cxx b/extensions/source/propctrlr/pcrservices.cxx index 964b114dbb45..be5304945306 100644 --- a/extensions/source/propctrlr/pcrservices.cxx +++ b/extensions/source/propctrlr/pcrservices.cxx @@ -28,7 +28,7 @@ using namespace ::com::sun::star::registry; extern "C" void SAL_CALL pcr_initializeModule() { - static sal_Bool s_bInit = sal_False; + static bool s_bInit = false; if (!s_bInit) { createRegistryInfo_OPropertyBrowserController(); @@ -50,7 +50,7 @@ extern "C" void SAL_CALL pcr_initializeModule() createRegistryInfo_StringRepresentation(); createRegistryInfo_MasterDetailLinkDialog(); createRegistryInfo_FormGeometryHandler(); - s_bInit = sal_True; + s_bInit = true; } } diff --git a/extensions/source/propctrlr/propertyhandler.cxx b/extensions/source/propctrlr/propertyhandler.cxx index 11a9f7ecdcca..2f1d3ce8e95d 100644 --- a/extensions/source/propctrlr/propertyhandler.cxx +++ b/extensions/source/propctrlr/propertyhandler.cxx @@ -193,7 +193,7 @@ namespace pcr { aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, m_pInfoService->getPropertyEnumRepresentations( nPropId ), - PropertyHandlerHelper::requiresReadOnlyControl( rProperty.Attributes ), sal_False ); + PropertyHandlerHelper::requiresReadOnlyControl( rProperty.Attributes ), false ); } else PropertyHandlerHelper::describePropertyLine( rProperty, aDescriptor, _rxControlFactory ); diff --git a/extensions/source/propctrlr/pushbuttonnavigation.cxx b/extensions/source/propctrlr/pushbuttonnavigation.cxx index c0fb41346510..69eff473e02f 100644 --- a/extensions/source/propctrlr/pushbuttonnavigation.cxx +++ b/extensions/source/propctrlr/pushbuttonnavigation.cxx @@ -82,7 +82,7 @@ namespace pcr PushButtonNavigation::PushButtonNavigation( const Reference< XPropertySet >& _rxControlModel ) :m_xControlModel( _rxControlModel ) - ,m_bIsPushButton( sal_False ) + ,m_bIsPushButton( false ) { OSL_ENSURE( m_xControlModel.is(), "PushButtonNavigation::PushButtonNavigation: invalid control model!" ); diff --git a/extensions/source/propctrlr/pushbuttonnavigation.hxx b/extensions/source/propctrlr/pushbuttonnavigation.hxx index ed5e5ebc549d..c6c206a4ec03 100644 --- a/extensions/source/propctrlr/pushbuttonnavigation.hxx +++ b/extensions/source/propctrlr/pushbuttonnavigation.hxx @@ -36,7 +36,7 @@ namespace pcr protected: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xControlModel; - sal_Bool m_bIsPushButton; + bool m_bIsPushButton; public: /** ctor diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx b/extensions/source/propctrlr/selectlabeldialog.cxx index d9a1a2685279..03ad59042780 100644 --- a/extensions/source/propctrlr/selectlabeldialog.cxx +++ b/extensions/source/propctrlr/selectlabeldialog.cxx @@ -59,7 +59,7 @@ namespace pcr ,m_xControlModel(_xControlModel) ,m_pInitialSelection(NULL) ,m_pLastSelected(NULL) - ,m_bHaveAssignableControl(sal_False) + ,m_bHaveAssignableControl(false) { // initialize the TreeListBox m_aControlTree.SetSelectionMode( SINGLE_SELECTION ); @@ -117,7 +117,7 @@ namespace pcr // build the tree m_pInitialSelection = NULL; - m_bHaveAssignableControl = sal_False; + m_bHaveAssignableControl = false; InsertEntries(xSearch, pRoot); m_aControlTree.Expand(pRoot); } @@ -231,7 +231,7 @@ namespace pcr if (m_xInitialLabelControl == xAsSet) m_pInitialSelection = pCurrent; - m_bHaveAssignableControl = sal_True; + m_bHaveAssignableControl = true; } return nChildren; diff --git a/extensions/source/propctrlr/selectlabeldialog.hxx b/extensions/source/propctrlr/selectlabeldialog.hxx index cac315a98195..7479b103bd3d 100644 --- a/extensions/source/propctrlr/selectlabeldialog.hxx +++ b/extensions/source/propctrlr/selectlabeldialog.hxx @@ -56,7 +56,7 @@ namespace pcr ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xSelectedControl; SvTreeListEntry* m_pLastSelected; - sal_Bool m_bHaveAssignableControl; + bool m_bHaveAssignableControl; public: OSelectLabelDialog(Window* pParent, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > _xControlModel); diff --git a/extensions/source/propctrlr/sqlcommanddesign.cxx b/extensions/source/propctrlr/sqlcommanddesign.cxx index 091963466aee..8656bda08503 100644 --- a/extensions/source/propctrlr/sqlcommanddesign.cxx +++ b/extensions/source/propctrlr/sqlcommanddesign.cxx @@ -136,7 +136,7 @@ namespace pcr } else if ( PROPERTY_ESCAPE_PROCESSING == Event.PropertyName ) { - sal_Bool bEscapeProcessing( sal_False ); + bool bEscapeProcessing( false ); OSL_VERIFY( Event.NewValue >>= bEscapeProcessing ); m_xObjectAdapter->setEscapeProcessing( bEscapeProcessing ); } @@ -359,7 +359,7 @@ namespace pcr bool SQLCommandDesigner::impl_trySuspendDesigner_nothrow() const { OSL_PRECOND( isActive(), "SQLCommandDesigner::impl_trySuspendDesigner_nothrow: no active designer, this will crash!" ); - sal_Bool bAllow = sal_True; + bool bAllow = true; try { bAllow = m_xDesigner->suspend( sal_True ); diff --git a/extensions/source/propctrlr/sqlcommanddesign.hxx b/extensions/source/propctrlr/sqlcommanddesign.hxx index 1dfc2067a9e0..8f3208ac7e88 100644 --- a/extensions/source/propctrlr/sqlcommanddesign.hxx +++ b/extensions/source/propctrlr/sqlcommanddesign.hxx @@ -195,12 +195,12 @@ namespace pcr /// retrieves the current SQL command of the component virtual OUString getSQLCommand() const = 0; /// retrieves the current value of the EscapeProcessing property of the component - virtual sal_Bool getEscapeProcessing() const = 0; + virtual sal_Bool getEscapeProcessing() const = 0; /// sets a new SQL command - virtual void setSQLCommand( const OUString& _rCommand ) const = 0; + virtual void setSQLCommand( const OUString& _rCommand ) const = 0; /// sets a new EscapeProcessing property value - virtual void setEscapeProcessing( const sal_Bool _bEscapeProcessing ) const = 0; + virtual void setEscapeProcessing( const sal_Bool _bEscapeProcessing ) const = 0; virtual ~ISQLCommandAdapter(); }; diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx index 20573c0dc4bc..10d20fd34165 100644 --- a/extensions/source/propctrlr/stringrepresentation.cxx +++ b/extensions/source/propctrlr/stringrepresentation.cxx @@ -381,7 +381,7 @@ bool StringRepresentation::convertGenericValueToString( const uno::Any& _rValue, { ::std::vector< OUString > aListEntries; tools::StringListResource aRes(PcrRes(RID_RSC_ENUM_YESNO),aListEntries); - sal_Bool bValue = sal_False; + bool bValue = false; _rValue >>= bValue; _rStringRep = bValue ? aListEntries[1] : aListEntries[0]; } @@ -520,10 +520,7 @@ bool StringRepresentation::convertStringToGenericValue( const OUString& _rString { ::std::vector< OUString > aListEntries; tools::StringListResource aRes(PcrRes(RID_RSC_ENUM_YESNO),aListEntries); - if ( aListEntries[0] == _rStringRep ) - _rValue <<= (sal_Bool)sal_False; - else - _rValue <<= (sal_Bool)sal_True; + _rValue <<= aListEntries[0] != _rStringRep; } break; diff --git a/extensions/source/propctrlr/submissionhandler.cxx b/extensions/source/propctrlr/submissionhandler.cxx index 6a1f491bacf0..f53037a2f8c9 100644 --- a/extensions/source/propctrlr/submissionhandler.cxx +++ b/extensions/source/propctrlr/submissionhandler.cxx @@ -310,7 +310,7 @@ namespace pcr } LineDescriptor aDescriptor; - aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, aListEntries, sal_False, sal_True ); + aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, aListEntries, false, true ); aDescriptor.DisplayName = m_pInfoService->getPropertyTranslation( nPropId ); aDescriptor.Category = "General"; aDescriptor.HelpURL = HelpIdUrl::getHelpURL( m_pInfoService->getPropertyHelpId( nPropId ) ); diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx index f0baf0969c48..2e7a62cfd9f6 100644 --- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx +++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx @@ -408,10 +408,10 @@ namespace pcr switch ( nControlType ) { case PropertyControlType::ListBox: - aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, aListEntries, sal_False, sal_False ); + aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, aListEntries, false, false ); break; case PropertyControlType::NumericField: - aDescriptor.Control = PropertyHandlerHelper::createNumericControl( _rxControlFactory, 0, aMinValue, aMaxValue, sal_False ); + aDescriptor.Control = PropertyHandlerHelper::createNumericControl( _rxControlFactory, 0, aMinValue, aMaxValue, false ); break; default: aDescriptor.Control = _rxControlFactory->createPropertyControl( nControlType, sal_False ); @@ -581,7 +581,7 @@ namespace pcr ::rtl::Reference< XSDDataType > xDataType( m_pHelper->getValidatingDataType() ); // is removal of this type possible? - sal_Bool bIsBasicType = xDataType.is() && xDataType->isBasicType(); + bool bIsBasicType = xDataType.is() && xDataType->isBasicType(); _rxInspectorUI->enablePropertyUIElements( PROPERTY_XSD_DATA_TYPE, PropertyLineElement::PrimaryButton, xDataType.is() ); _rxInspectorUI->enablePropertyUIElements( PROPERTY_XSD_DATA_TYPE, PropertyLineElement::SecondaryButton, xDataType.is() && !bIsBasicType ); diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index 34e1f5e360c1..20ec7947b600 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -40,7 +40,7 @@ ResId SaneResId( sal_uInt32 ); -GridWindow::GridWindow(double* pXValues, double* pYValues, int nValues, Window* pParent, sal_Bool bCutValues ) +GridWindow::GridWindow(double* pXValues, double* pYValues, int nValues, Window* pParent, bool bCutValues ) : ModalDialog( pParent, SaneResId( GRID_DIALOG ) ), m_aGridArea( 50, 15, 100, 100 ), m_pXValues( pXValues ), diff --git a/extensions/source/scanner/grid.hxx b/extensions/source/scanner/grid.hxx index 888ca3b3b99a..5f738f0f5298 100644 --- a/extensions/source/scanner/grid.hxx +++ b/extensions/source/scanner/grid.hxx @@ -77,7 +77,7 @@ class GridWindow : public ModalDialog sal_uInt16 m_BmOffX; sal_uInt16 m_BmOffY; - sal_Bool m_bCutValues; + bool m_bCutValues; // stuff for handles std::vector< impHandle > m_aHandles; @@ -117,7 +117,7 @@ class GridWindow : public ModalDialog virtual void MouseButtonUp( const MouseEvent& ) SAL_OVERRIDE; public: GridWindow( double* pXValues, double* pYValues, int nValues, - Window* pParent, sal_Bool bCutValues = sal_True ); + Window* pParent, bool bCutValues = true ); virtual ~GridWindow(); void setBoundings( double fMinX, double fMinY, double fMaxX, double fMaxY ); diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index f89895c93d7d..9762d838492b 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -101,7 +101,7 @@ SANE_Status (*Sane::p_set_io_mode)( SANE_Handle, SANE_Bool ) = 0; SANE_Status (*Sane::p_get_select_fd)( SANE_Handle, SANE_Int* ) = 0; SANE_String_Const (*Sane::p_strstatus)( SANE_Status ) = 0; -static sal_Bool bSaneSymbolLoadFailed = sal_False; +static bool bSaneSymbolLoadFailed = false; inline oslGenericFunction Sane::LoadSymbol( const char* pSymbolname ) { @@ -110,7 +110,7 @@ inline oslGenericFunction Sane::LoadSymbol( const char* pSymbolname ) { fprintf( stderr, "Could not load symbol %s\n", pSymbolname ); - bSaneSymbolLoadFailed = sal_True; + bSaneSymbolLoadFailed = true; } return pFunction; } @@ -185,7 +185,7 @@ void Sane::Init() if( pSaneLib ) { - bSaneSymbolLoadFailed = sal_False; + bSaneSymbolLoadFailed = false; p_init = (SANE_Status(*)(SANE_Int*, SANE_Auth_Callback )) LoadSymbol( "sane_init" ); p_exit = (void(*)()) @@ -278,15 +278,15 @@ void Sane::ReloadOptions() mppOptions[ i ] = (SANE_Option_Descriptor*) p_get_option_descriptor( maHandle, i ); - CheckConsistency( NULL, sal_True ); + CheckConsistency( NULL, true ); maReloadOptionsLink.Call( this ); } -sal_Bool Sane::Open( const char* name ) +bool Sane::Open( const char* name ) { SANE_Status nStatus = p_open( (SANE_String_Const)name, &maHandle ); - FAIL_STATE( nStatus, "sane_open", sal_False ); + FAIL_STATE( nStatus, "sane_open", false ); ReloadOptions(); @@ -303,17 +303,17 @@ sal_Bool Sane::Open( const char* name ) } } - return sal_True; + return true; } -sal_Bool Sane::Open( int n ) +bool Sane::Open( int n ) { if( n >= 0 && n < nDevices ) { mnDevice = n; return Open( (char*)ppDevices[n]->name ); } - return sal_False; + return false; } void Sane::Close() @@ -340,47 +340,47 @@ int Sane::GetOptionByName( const char* rName ) return -1; } -sal_Bool Sane::GetOptionValue( int n, sal_Bool& rRet ) +bool Sane::GetOptionValue( int n, bool& rRet ) { if( ! maHandle || mppOptions[n]->type != SANE_TYPE_BOOL ) - return sal_False; + return false; SANE_Word nRet; SANE_Status nStatus = ControlOption( n, SANE_ACTION_GET_VALUE, &nRet ); if( nStatus != SANE_STATUS_GOOD ) - return sal_False; + return false; rRet = nRet; - return sal_True; + return true; } -sal_Bool Sane::GetOptionValue( int n, OString& rRet ) +bool Sane::GetOptionValue( int n, OString& rRet ) { - sal_Bool bSuccess = sal_False; + bool bSuccess = false; if( ! maHandle || mppOptions[n]->type != SANE_TYPE_STRING ) - return sal_False; + return false; boost::scoped_array<char> pRet(new char[mppOptions[n]->size+1]); SANE_Status nStatus = ControlOption( n, SANE_ACTION_GET_VALUE, pRet.get() ); if( nStatus == SANE_STATUS_GOOD ) { - bSuccess = sal_True; + bSuccess = true; rRet = pRet.get(); } return bSuccess; } -sal_Bool Sane::GetOptionValue( int n, double& rRet, int nElement ) +bool Sane::GetOptionValue( int n, double& rRet, int nElement ) { - sal_Bool bSuccess = sal_False; + bool bSuccess = false; if( ! maHandle || ( mppOptions[n]->type != SANE_TYPE_INT && mppOptions[n]->type != SANE_TYPE_FIXED ) ) - return sal_False; + return false; boost::scoped_array<SANE_Word> pRet(new SANE_Word[mppOptions[n]->size/sizeof(SANE_Word)]); SANE_Status nStatus = ControlOption( n, SANE_ACTION_GET_VALUE, pRet.get() ); if( nStatus == SANE_STATUS_GOOD ) { - bSuccess = sal_True; + bSuccess = true; if( mppOptions[n]->type == SANE_TYPE_INT ) rRet = (double)pRet[ nElement ]; else @@ -389,16 +389,16 @@ sal_Bool Sane::GetOptionValue( int n, double& rRet, int nElement ) return bSuccess; } -sal_Bool Sane::GetOptionValue( int n, double* pSet ) +bool Sane::GetOptionValue( int n, double* pSet ) { if( ! maHandle || ! ( mppOptions[n]->type == SANE_TYPE_FIXED || mppOptions[n]->type == SANE_TYPE_INT ) ) - return sal_False; + return false; boost::scoped_array<SANE_Word> pFixedSet(new SANE_Word[mppOptions[n]->size/sizeof(SANE_Word)]); SANE_Status nStatus = ControlOption( n, SANE_ACTION_GET_VALUE, pFixedSet.get() ); if( nStatus != SANE_STATUS_GOOD ) - return sal_False; + return false; for( size_t i = 0; i <mppOptions[n]->size/sizeof(SANE_Word); i++ ) { if( mppOptions[n]->type == SANE_TYPE_FIXED ) @@ -406,38 +406,38 @@ sal_Bool Sane::GetOptionValue( int n, double* pSet ) else pSet[i] = (double) pFixedSet[i]; } - return sal_True; + return true; } -sal_Bool Sane::SetOptionValue( int n, sal_Bool bSet ) +bool Sane::SetOptionValue( int n, bool bSet ) { if( ! maHandle || mppOptions[n]->type != SANE_TYPE_BOOL ) - return sal_False; + return false; SANE_Word nRet = bSet ? SANE_TRUE : SANE_FALSE; SANE_Status nStatus = ControlOption( n, SANE_ACTION_SET_VALUE, &nRet ); if( nStatus != SANE_STATUS_GOOD ) - return sal_False; - return sal_True; + return false; + return true; } -sal_Bool Sane::SetOptionValue( int n, const OUString& rSet ) +bool Sane::SetOptionValue( int n, const OUString& rSet ) { if( ! maHandle || mppOptions[n]->type != SANE_TYPE_STRING ) - return sal_False; + return false; OString aSet(OUStringToOString(rSet, osl_getThreadTextEncoding())); SANE_Status nStatus = ControlOption( n, SANE_ACTION_SET_VALUE, (void*)aSet.getStr() ); if( nStatus != SANE_STATUS_GOOD ) - return sal_False; - return sal_True; + return false; + return true; } -sal_Bool Sane::SetOptionValue( int n, double fSet, int nElement ) +bool Sane::SetOptionValue( int n, double fSet, int nElement ) { - sal_Bool bSuccess = sal_False; + bool bSuccess = false; if( ! maHandle || ( mppOptions[n]->type != SANE_TYPE_INT && mppOptions[n]->type != SANE_TYPE_FIXED ) ) - return sal_False; + return false; SANE_Status nStatus; if( mppOptions[n]->size/sizeof(SANE_Word) > 1 ) @@ -459,16 +459,16 @@ sal_Bool Sane::SetOptionValue( int n, double fSet, int nElement ) nStatus = ControlOption( n, SANE_ACTION_SET_VALUE, &nSetTo ); if( nStatus == SANE_STATUS_GOOD ) - bSuccess = sal_True; + bSuccess = true; } return bSuccess; } -sal_Bool Sane::SetOptionValue( int n, double* pSet ) +bool Sane::SetOptionValue( int n, double* pSet ) { if( ! maHandle || ( mppOptions[n]->type != SANE_TYPE_INT && mppOptions[n]->type != SANE_TYPE_FIXED ) ) - return sal_False; + return false; boost::scoped_array<SANE_Word> pFixedSet(new SANE_Word[mppOptions[n]->size/sizeof(SANE_Word)]); for( size_t i = 0; i < mppOptions[n]->size/sizeof(SANE_Word); i++ ) { @@ -479,8 +479,8 @@ sal_Bool Sane::SetOptionValue( int n, double* pSet ) } SANE_Status nStatus = ControlOption( n, SANE_ACTION_SET_VALUE, pFixedSet.get() ); if( nStatus != SANE_STATUS_GOOD ) - return sal_False; - return sal_True; + return false; + return true; } enum FrameStyleType { @@ -519,7 +519,7 @@ static inline sal_uInt8 _ReadValue( FILE* fp, int depth ) return nByte; } -sal_Bool Sane::CheckConsistency( const char* pMes, sal_Bool bInit ) +bool Sane::CheckConsistency( const char* pMes, bool bInit ) { static const SANE_Option_Descriptor** pDescArray = NULL; static const SANE_Option_Descriptor* pZero = NULL; @@ -529,15 +529,15 @@ sal_Bool Sane::CheckConsistency( const char* pMes, sal_Bool bInit ) pDescArray = mppOptions; if( mppOptions ) pZero = mppOptions[0]; - return sal_True; + return true; } - sal_Bool bConsistent = sal_True; + bool bConsistent = true; if( pDescArray != mppOptions ) - bConsistent = sal_False; + bConsistent = false; if( pZero != mppOptions[0] ) - bConsistent = sal_False; + bConsistent = false; if( ! bConsistent ) dbg_msg( "Sane is not consistent. (%s)\n", pMes ); @@ -545,16 +545,16 @@ sal_Bool Sane::CheckConsistency( const char* pMes, sal_Bool bInit ) return bConsistent; } -sal_Bool Sane::Start( BitmapTransporter& rBitmap ) +bool Sane::Start( BitmapTransporter& rBitmap ) { int nStream = 0, nLine = 0, i = 0; SANE_Parameters aParams; FrameStyleType eType = FrameStyle_Gray; - sal_Bool bSuccess = sal_True; - sal_Bool bWidthSet = sal_False; + bool bSuccess = true; + bool bWidthSet = false; if( ! maHandle ) - return sal_False; + return false; int nWidthMM = 0; int nHeightMM = 0; @@ -627,7 +627,7 @@ sal_Bool Sane::Start( BitmapTransporter& rBitmap ) CheckConsistency( "sane_get_parameters" ); if (nStatus != SANE_STATUS_GOOD || aParams.bytes_per_line == 0) { - bSuccess = sal_False; + bSuccess = false; break; } #if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL @@ -670,14 +670,14 @@ sal_Bool Sane::Start( BitmapTransporter& rBitmap ) fprintf( stderr, "Warning: unknown frame style !!!\n" ); } - sal_Bool bSynchronousRead = sal_True; + bool bSynchronousRead = true; // should be fail safe, but ... ?? nStatus = p_set_io_mode( maHandle, SANE_FALSE ); CheckConsistency( "sane_set_io_mode" ); if( nStatus != SANE_STATUS_GOOD ) { - bSynchronousRead = sal_False; + bSynchronousRead = false; nStatus = p_set_io_mode( maHandle, SANE_TRUE ); CheckConsistency( "sane_set_io_mode" ); #if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL @@ -696,12 +696,12 @@ sal_Bool Sane::Start( BitmapTransporter& rBitmap ) DUMP_STATE( nStatus, "sane_get_select_fd" ); CheckConsistency( "sane_get_select_fd" ); if( nStatus != SANE_STATUS_GOOD ) - bSynchronousRead = sal_True; + bSynchronousRead = true; } FILE* pFrame = tmpfile(); if( ! pFrame ) { - bSuccess = sal_False; + bSuccess = false; break; } do { @@ -733,7 +733,7 @@ sal_Bool Sane::Start( BitmapTransporter& rBitmap ) if (nStatus != SANE_STATUS_EOF || !bSuccess) { fclose( pFrame ); - bSuccess = sal_False; + bSuccess = false; break; } @@ -759,7 +759,7 @@ sal_Bool Sane::Start( BitmapTransporter& rBitmap ) aConverter.Seek( 38 ); aConverter.WriteUInt32( (sal_uInt32)(1000*nWidth/nWidthMM) ); aConverter.WriteUInt32( (sal_uInt32)(1000*nHeight/nHeightMM) ); - bWidthSet = sal_True; + bWidthSet = true; } aConverter.Seek(60); @@ -866,7 +866,7 @@ sal_Bool Sane::Start( BitmapTransporter& rBitmap ) break; } else - bSuccess = sal_False; + bSuccess = false; } // get stream length aConverter.Seek( STREAM_SEEK_TO_END ); @@ -906,7 +906,7 @@ int Sane::GetRange( int n, double*& rpDouble ) rpDouble = 0; int nItems, i; - sal_Bool bIsFixed = mppOptions[n]->type == SANE_TYPE_FIXED ? sal_True : sal_False; + bool bIsFixed = mppOptions[n]->type == SANE_TYPE_FIXED ? sal_True : sal_False; dbg_msg( "Sane::GetRange of option %s ", mppOptions[n]->name ); if(mppOptions[n]->constraint_type == SANE_CONSTRAINT_RANGE ) @@ -984,12 +984,12 @@ OUString Sane::GetOptionUnitName( int n ) return aText; } -sal_Bool Sane::ActivateButtonOption( int n ) +bool Sane::ActivateButtonOption( int n ) { SANE_Status nStatus = ControlOption( n, SANE_ACTION_SET_VALUE, NULL ); if( nStatus != SANE_STATUS_GOOD ) - return sal_False; - return sal_True; + return false; + return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/scanner/sane.hxx b/extensions/source/scanner/sane.hxx index 475bceefcf1f..ba7cf2c47bef 100644 --- a/extensions/source/scanner/sane.hxx +++ b/extensions/source/scanner/sane.hxx @@ -105,15 +105,15 @@ private: SANE_Status ControlOption( int, SANE_Action, void* ); - sal_Bool CheckConsistency( const char*, sal_Bool bInit = sal_False ); + bool CheckConsistency( const char*, bool bInit = false ); public: Sane(); ~Sane(); - static sal_Bool IsSane() + static bool IsSane() { return pSaneLib ? sal_True : sal_False; } - sal_Bool IsOpen() + bool IsOpen() { return maHandle ? sal_True : sal_False; } static int CountDevices() { return nDevices; } @@ -145,28 +145,28 @@ public: inline int GetOptionElements( int n ); int GetOptionByName( const char* ); - sal_Bool GetOptionValue( int, sal_Bool& ); - sal_Bool GetOptionValue( int, OString& ); - sal_Bool GetOptionValue( int, double&, int nElement = 0 ); - sal_Bool GetOptionValue( int, double* ); + bool GetOptionValue( int, bool& ); + bool GetOptionValue( int, OString& ); + bool GetOptionValue( int, double&, int nElement = 0 ); + bool GetOptionValue( int, double* ); - sal_Bool SetOptionValue( int, sal_Bool ); - sal_Bool SetOptionValue( int, const OUString& ); - sal_Bool SetOptionValue( int, double, int nElement = 0 ); - sal_Bool SetOptionValue( int, double* ); + bool SetOptionValue( int, bool ); + bool SetOptionValue( int, const OUString& ); + bool SetOptionValue( int, double, int nElement = 0 ); + bool SetOptionValue( int, double* ); - sal_Bool ActivateButtonOption( int ); + bool ActivateButtonOption( int ); int CountOptions() { return mnOptions; } int GetDeviceNumber() { return mnDevice; } - sal_Bool Open( const char* ); - sal_Bool Open( int ); + bool Open( const char* ); + bool Open( int ); void Close(); void ReloadDevices(); void ReloadOptions(); - sal_Bool Start( BitmapTransporter& ); + bool Start( BitmapTransporter& ); inline Link SetReloadOptionsHdl( const Link& rLink ); }; diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 49608c43af8a..84e085685dbb 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -39,9 +39,9 @@ ResId SaneResId( sal_uInt32 nID ) SaneDlg::SaneDlg( Window* pParent, Sane& rSane, bool bScanEnabled ) : ModalDialog( pParent, SaneResId( RID_SANE_DIALOG ) ), mrSane( rSane ), - mbIsDragging( sal_False ), + mbIsDragging( false ), mbScanEnabled( bScanEnabled ), - mbDragDrawn( sal_False ), + mbDragDrawn( false ), meDragDirection( TopLeft ), maMapMode( MAP_APPFONT ), maOKButton( this, SaneResId( RID_SCAN_OK ) ), @@ -172,7 +172,7 @@ void SaneDlg::InitFields() int nOption, i, nValue; double fValue; - sal_Bool bSuccess = sal_False; + bool bSuccess = false; const char *ppSpecialOptions[] = { "resolution", "tl-x", @@ -182,7 +182,7 @@ void SaneDlg::InitFields() "preview" }; - mbDragEnable = sal_True; + mbDragEnable = true; maReslBox.Clear(); maMinTopLeft = Point( 0, 0 ); maMaxBottomRight = Point( PREVIEW_WIDTH, PREVIEW_HEIGHT ); @@ -270,7 +270,7 @@ void SaneDlg::InitFields() pField = &maBottomField; } nOption = pOptionName ? mrSane.GetOptionByName( pOptionName ) : -1; - bSuccess = sal_False; + bSuccess = false; if( nOption != -1 ) { bSuccess = mrSane.GetOptionValue( nOption, fValue, 0 ); @@ -326,7 +326,7 @@ void SaneDlg::InitFields() } else { - mbDragEnable = sal_False; + mbDragEnable = false; pField->SetMin( 0 ); switch( i ) { case 0: @@ -366,11 +366,11 @@ void SaneDlg::InitFields() // fill OptionBox maOptionBox.Clear(); SvTreeListEntry* pParentEntry = 0; - sal_Bool bGroupRejected = sal_False; + bool bGroupRejected = false; for( i = 1; i < mrSane.CountOptions(); i++ ) { OUString aOption=mrSane.GetOptionName( i ); - sal_Bool bInsertAdvanced = + bool bInsertAdvanced = mrSane.GetOptionCap( i ) & SANE_CAP_ADVANCED && ! maAdvancedBox.IsChecked() ? sal_False : sal_True; if( mrSane.GetOptionType( i ) == SANE_TYPE_GROUP ) @@ -379,10 +379,10 @@ void SaneDlg::InitFields() { aOption = mrSane.GetOptionTitle( i ); pParentEntry = maOptionBox.InsertEntry( aOption ); - bGroupRejected = sal_False; + bGroupRejected = false; } else - bGroupRejected = sal_True; + bGroupRejected = true; } else if( !aOption.isEmpty() && ! ( mrSane.GetOptionCap( i ) & @@ -392,12 +392,12 @@ void SaneDlg::InitFields() ) ) && bInsertAdvanced && ! bGroupRejected ) { - sal_Bool bIsSpecial = sal_False; + bool bIsSpecial = false; for( size_t n = 0; !bIsSpecial && n < SAL_N_ELEMENTS(ppSpecialOptions); n++ ) { if( aOption == OUString::createFromAscii(ppSpecialOptions[n]) ) - bIsSpecial=sal_True; + bIsSpecial=true; } if( ! bIsSpecial ) { @@ -429,8 +429,7 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, Button*, pButton ) else if( pButton == &maBoolCheckBox ) { mrSane.SetOptionValue( mnCurrentOption, - maBoolCheckBox.IsChecked() ? - (sal_Bool)sal_True : (sal_Bool)sal_False ); + maBoolCheckBox.IsChecked() ); } else if( pButton == &maButtonOption ) { @@ -473,7 +472,7 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, Button*, pButton ) { double fRes = (double)maReslBox.GetValue(); SetAdjustedNumericalValue( "resolution", fRes ); - UpdateScanArea( sal_True ); + UpdateScanArea( true ); SaveState(); EndDialog( mrSane.IsOpen() ? 1 : 0 ); doScan = (pButton == &maScanButton); @@ -704,7 +703,7 @@ void SaneDlg::AcquirePreview() if( ! mrSane.IsOpen() ) return; - UpdateScanArea( sal_True ); + UpdateScanArea( true ); // set small resolution for preview double fResl = (double)maReslBox.GetValue(); SetAdjustedNumericalValue( "resolution", 30.0 ); @@ -718,7 +717,7 @@ void SaneDlg::AcquirePreview() return; } else - mrSane.SetOptionValue( nOption, (sal_Bool)sal_True ); + mrSane.SetOptionValue( nOption, true ); BitmapTransporter aTransporter; if( ! mrSane.Start( aTransporter ) ) @@ -781,7 +780,7 @@ void SaneDlg::Paint( const Rectangle& rRect ) DrawBitmap( maPreviewRect.TopLeft(), maPreviewRect.GetSize(), maPreviewBitmap ); - mbDragDrawn = sal_False; + mbDragDrawn = false; DrawDrag(); ModalDialog::Paint( rRect ); @@ -802,7 +801,7 @@ void SaneDlg::DisableOption() void SaneDlg::EstablishBoolOption() { - sal_Bool bSuccess, bValue; + bool bSuccess, bValue; bSuccess = mrSane.GetOptionValue( mnCurrentOption, bValue ); if( bSuccess ) @@ -816,7 +815,7 @@ void SaneDlg::EstablishBoolOption() void SaneDlg::EstablishStringOption() { - sal_Bool bSuccess; + bool bSuccess; OString aValue; bSuccess = mrSane.GetOptionValue( mnCurrentOption, aValue ); @@ -887,7 +886,7 @@ void SaneDlg::EstablishQuantumRange() void SaneDlg::EstablishNumericOption() { - sal_Bool bSuccess; + bool bSuccess; double fValue; bSuccess = mrSane.GetOptionValue( mnCurrentOption, fValue ); @@ -959,7 +958,7 @@ void SaneDlg::MouseMove( const MouseEvent& rMEvt ) maBottomRight.Y() = nSwap; } DrawDrag(); - UpdateScanArea( sal_False ); + UpdateScanArea( false ); } ModalDialog::MouseMove( rMEvt ); } @@ -980,21 +979,21 @@ void SaneDlg::MouseButtonDown( const MouseEvent& rMEvt ) { meDragDirection = TopLeft; aMousePixel = maTopLeft; - mbIsDragging = sal_True; + mbIsDragging = true; } else if( aMousePixel.X() >= nMiddleX && aMousePixel.X() < nMiddleX + RECT_SIZE_PIX ) { meDragDirection = Top; aMousePixel.Y() = maTopLeft.Y(); - mbIsDragging = sal_True; + mbIsDragging = true; } else if( aMousePixel.X() > maBottomRight.X() - RECT_SIZE_PIX && aMousePixel.X() <= maBottomRight.X() ) { meDragDirection = TopRight; aMousePixel = Point( maBottomRight.X(), maTopLeft.Y() ); - mbIsDragging = sal_True; + mbIsDragging = true; } } else if( aMousePixel.Y() >= nMiddleY && @@ -1005,14 +1004,14 @@ void SaneDlg::MouseButtonDown( const MouseEvent& rMEvt ) { meDragDirection = Left; aMousePixel.X() = maTopLeft.X(); - mbIsDragging = sal_True; + mbIsDragging = true; } else if( aMousePixel.X() > maBottomRight.X() - RECT_SIZE_PIX && aMousePixel.X() <= maBottomRight.X() ) { meDragDirection = Right; aMousePixel.X() = maBottomRight.X(); - mbIsDragging = sal_True; + mbIsDragging = true; } } else if( aMousePixel.Y() <= maBottomRight.Y() && @@ -1023,21 +1022,21 @@ void SaneDlg::MouseButtonDown( const MouseEvent& rMEvt ) { meDragDirection = BottomLeft; aMousePixel = Point( maTopLeft.X(), maBottomRight.Y() ); - mbIsDragging = sal_True; + mbIsDragging = true; } else if( aMousePixel.X() >= nMiddleX && aMousePixel.X() < nMiddleX + RECT_SIZE_PIX ) { meDragDirection = Bottom; aMousePixel.Y() = maBottomRight.Y(); - mbIsDragging = sal_True; + mbIsDragging = true; } else if( aMousePixel.X() > maBottomRight.X() - RECT_SIZE_PIX && aMousePixel.X() <= maBottomRight.X() ) { meDragDirection = BottomRight; aMousePixel = maBottomRight; - mbIsDragging = sal_True; + mbIsDragging = true; } } } @@ -1053,9 +1052,9 @@ void SaneDlg::MouseButtonUp( const MouseEvent& rMEvt ) { if( mbIsDragging ) { - UpdateScanArea( sal_True ); + UpdateScanArea( true ); } - mbIsDragging = sal_False; + mbIsDragging = false; ModalDialog::MouseButtonUp( rMEvt ); } @@ -1102,7 +1101,7 @@ void SaneDlg::DrawDrag() aLastBR = maBottomRight; DrawRectangles( maTopLeft, maBottomRight ); - mbDragDrawn = sal_True; + mbDragDrawn = true; SetRasterOp( eROP ); SetMapMode( maMapMode ); } @@ -1141,7 +1140,7 @@ Point SaneDlg::GetLogicPos( const Point& rIn ) return aConvert; } -void SaneDlg::UpdateScanArea( sal_Bool bSend ) +void SaneDlg::UpdateScanArea( bool bSend ) { if( ! mbDragEnable ) return; @@ -1166,25 +1165,25 @@ void SaneDlg::UpdateScanArea( sal_Bool bSend ) } } -sal_Bool SaneDlg::LoadState() +bool SaneDlg::LoadState() { int i; if( ! Sane::IsSane() ) - return sal_False; + return false; const char* pEnv = getenv("HOME"); OUString aFileName = pEnv ? OUString(pEnv, strlen(pEnv), osl_getThreadTextEncoding() ) : OUString(); aFileName += "/.so_sane_state"; Config aConfig( aFileName ); if( ! aConfig.HasGroup( "SANE" ) ) - return sal_False; + return false; aConfig.SetGroup( "SANE" ); OString aString = aConfig.ReadKey( "SO_LastSaneDevice" ); for( i = 0; i < Sane::CountDevices() && !aString.equals(OUStringToOString(Sane::GetName(i), osl_getThreadTextEncoding())); i++ ) ; if( i == Sane::CountDevices() ) - return sal_False; + return false; mrSane.Close(); mrSane.Open( aString.getStr() ); @@ -1206,7 +1205,7 @@ sal_Bool SaneDlg::LoadState() if (aValue.startsWith("BOOL=")) { aValue = aValue.copy(RTL_CONSTASCII_LENGTH("BOOL=")); - sal_Bool aBOOL = (sal_Bool)aValue.toInt32(); + bool aBOOL = aValue.toInt32() != 0; mrSane.SetOptionValue( nOption, aBOOL ); } else if (aValue.startsWith("STRING=")) @@ -1235,7 +1234,7 @@ sal_Bool SaneDlg::LoadState() DisableOption(); InitFields(); - return sal_True; + return true; } void SaneDlg::SaveState() @@ -1275,7 +1274,7 @@ void SaneDlg::SaveState() { case SANE_TYPE_BOOL: { - sal_Bool bValue; + bool bValue; if( mrSane.GetOptionValue( nOption, bValue ) ) { OStringBuffer aString("BOOL="); @@ -1323,24 +1322,24 @@ void SaneDlg::SaveState() } } -sal_Bool SaneDlg::SetAdjustedNumericalValue( +bool SaneDlg::SetAdjustedNumericalValue( const char* pOption, double fValue, int nElement ) { int nOption; if( ! Sane::IsSane() || ! mrSane.IsOpen() || ( nOption = mrSane.GetOptionByName( pOption ) ) == -1 ) - return sal_False; + return false; if( nElement < 0 || nElement >= mrSane.GetOptionElements( nOption ) ) - return sal_False; + return false; double* pValues = NULL; int nValues; if( ( nValues = mrSane.GetRange( nOption, pValues ) ) < 0 ) { delete [] pValues; - return sal_False; + return false; } #if OSL_DEBUG_LEVEL > 1 @@ -1376,7 +1375,7 @@ sal_Bool SaneDlg::SetAdjustedNumericalValue( #endif - return sal_True; + return true; } bool SaneDlg::getDoScan() diff --git a/extensions/source/scanner/sanedlg.hxx b/extensions/source/scanner/sanedlg.hxx index 4f2715364028..f91a260f1273 100644 --- a/extensions/source/scanner/sanedlg.hxx +++ b/extensions/source/scanner/sanedlg.hxx @@ -41,10 +41,10 @@ private: Rectangle maPreviewRect; Point maTopLeft, maBottomRight; Point maMinTopLeft, maMaxBottomRight; - sal_Bool mbDragEnable; - sal_Bool mbIsDragging; + bool mbDragEnable; + bool mbIsDragging; bool mbScanEnabled; - sal_Bool mbDragDrawn; + bool mbDragDrawn; DragDirection meDragDirection; MapMode maMapMode; @@ -107,7 +107,7 @@ private: DECL_LINK( OptionsBoxSelectHdl, SvTreeListBox* ); void SaveState(); - sal_Bool LoadState(); + bool LoadState(); void InitDevices(); void InitFields(); @@ -124,10 +124,10 @@ private: void DrawDrag(); Point GetPixelPos( const Point& ); Point GetLogicPos( const Point& ); - void UpdateScanArea( sal_Bool ); + void UpdateScanArea( bool ); // helper - sal_Bool SetAdjustedNumericalValue( const char* pOption, double fValue, int nElement = 0 ); + bool SetAdjustedNumericalValue( const char* pOption, double fValue, int nElement = 0 ); virtual void Paint( const Rectangle& ) SAL_OVERRIDE; virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx index d8d421411bc0..d7b0d6ad138e 100644 --- a/extensions/source/scanner/scanunx.cxx +++ b/extensions/source/scanner/scanunx.cxx @@ -192,7 +192,7 @@ void ScannerThread::run() { int nOption = m_pHolder->m_aSane.GetOptionByName( "preview" ); if( nOption != -1 ) - m_pHolder->m_aSane.SetOptionValue( nOption, (sal_Bool)sal_False ); + m_pHolder->m_aSane.SetOptionValue( nOption, false ); m_pHolder->m_nError = m_pHolder->m_aSane.Start( *pTransporter ) ? |