diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-06 12:37:38 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-06 12:38:16 +0200 |
commit | c0d037a6ecbd4389abe3ca9e958d8a4ac9e0287e (patch) | |
tree | 617f52ca3be4d2c2f6b5b21fc4ed9a3a8dd1fe77 /forms/source/component | |
parent | ae92e6e6d5dec81c2e22a51a89f463cae1ac1edb (diff) |
forms: sal_Bool->bool
Change-Id: Ifa15f4ed3107b1075b504f09d2cae69ee38d347a
Diffstat (limited to 'forms/source/component')
60 files changed, 452 insertions, 452 deletions
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index 5ca763ae40fb..550db56c32e3 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -286,7 +286,7 @@ void SAL_CALL OButtonModel::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle sal_Bool SAL_CALL OButtonModel::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw (IllegalArgumentException) { - sal_Bool bModified = sal_False; + bool bModified = false; switch ( _nHandle ) { case PROPERTY_ID_DEFAULT_STATE: @@ -366,7 +366,7 @@ OButtonControl::OButtonControl(const Reference<XComponentContext>& _rxFactory) ,OFormNavigationHelper( _rxFactory ) ,m_nClickEvent( 0 ) ,m_nTargetUrlFeatureId( -1 ) - ,m_bEnabledByPropertyValue( sal_False ) + ,m_bEnabledByPropertyValue( false ) { increment(m_refCount); { @@ -603,10 +603,10 @@ void OButtonControl::startOrStopModelPropertyListening( bool _bStart ) sal_Bool SAL_CALL OButtonControl::setModel( const Reference< XControlModel >& _rxModel ) throw ( RuntimeException, std::exception ) { startOrStopModelPropertyListening( false ); - sal_Bool bResult = OClickableImageBaseControl::setModel( _rxModel ); + bool bResult = OClickableImageBaseControl::setModel( _rxModel ); startOrStopModelPropertyListening( true ); - m_bEnabledByPropertyValue = sal_True; + m_bEnabledByPropertyValue = true; Reference< XPropertySet > xModelProps( _rxModel, UNO_QUERY ); if ( xModelProps.is() ) xModelProps->getPropertyValue( PROPERTY_ENABLED ) >>= m_bEnabledByPropertyValue; diff --git a/forms/source/component/Button.hxx b/forms/source/component/Button.hxx index c28b5165c7f8..f07dbb548a57 100644 --- a/forms/source/component/Button.hxx +++ b/forms/source/component/Button.hxx @@ -122,7 +122,7 @@ private: sal_uLong m_nClickEvent; sal_Int16 m_nTargetUrlFeatureId; /// caches the value of the "Enabled" property of our model - sal_Bool m_bEnabledByPropertyValue; + bool m_bEnabledByPropertyValue; protected: diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx index ccbfed465778..8d92bbf5ccb3 100644 --- a/forms/source/component/CheckBox.cxx +++ b/forms/source/component/CheckBox.cxx @@ -81,7 +81,7 @@ InterfaceRef SAL_CALL OCheckBoxModel_CreateInstance(const Reference<XMultiServic OCheckBoxModel::OCheckBoxModel(const Reference<XComponentContext>& _rxFactory) - :OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_CHECKBOX, FRM_SUN_CONTROL_CHECKBOX, sal_True ) + :OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_CHECKBOX, FRM_SUN_CONTROL_CHECKBOX, true ) // use the old control name for compytibility reasons { @@ -230,7 +230,7 @@ Any OCheckBoxModel::translateDbColumnToControlValue() } if ( m_xColumn->wasNull() ) { - sal_Bool bTriState = sal_True; + bool bTriState = true; if ( m_xAggregateSet.is() ) m_xAggregateSet->getPropertyValue( PROPERTY_TRISTATE ) >>= bTriState; aValue <<= (sal_Int16)( bTriState ? TRISTATE_INDET : getDefaultChecked() ); @@ -248,7 +248,7 @@ Any OCheckBoxModel::translateDbColumnToControlValue() } -sal_Bool OCheckBoxModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) +bool OCheckBoxModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) { OSL_PRECOND( m_xColumnUpdate.is(), "OCheckBoxModel::commitControlValueToDbColumn: not bound!" ); if ( m_xColumnUpdate.is() ) @@ -284,7 +284,7 @@ sal_Bool OCheckBoxModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) OSL_FAIL("OCheckBoxModel::commitControlValueToDbColumn: could not commit !"); } } - return sal_True; + return true; } diff --git a/forms/source/component/CheckBox.hxx b/forms/source/component/CheckBox.hxx index 8295929194f7..3b81af0ae48f 100644 --- a/forms/source/component/CheckBox.hxx +++ b/forms/source/component/CheckBox.hxx @@ -60,7 +60,7 @@ protected: // OBoundControlModel overridables virtual ::com::sun::star::uno::Any translateDbColumnToControlValue( ) SAL_OVERRIDE; - virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; + virtual bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; }; diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index bc5c53af6e5d..241476c57ca8 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -294,7 +294,7 @@ void OGridColumn::disposing() } -void OGridColumn::clearAggregateProperties( Sequence< Property >& _rProps, sal_Bool bAllowDropDown ) +void OGridColumn::clearAggregateProperties( Sequence< Property >& _rProps, bool bAllowDropDown ) { // some properties are not to be exposed to the outer world ::std::set< OUString > aForbiddenProperties; @@ -395,7 +395,7 @@ void OGridColumn::getFastPropertyValue(Any& rValue, sal_Int32 nHandle ) const sal_Bool OGridColumn::convertFastPropertyValue( Any& rConvertedValue, Any& rOldValue, sal_Int32 nHandle, const Any& rValue )throw( IllegalArgumentException ) { - sal_Bool bModified(sal_False); + bool bModified(false); switch (nHandle) { case PROPERTY_ID_LABEL: @@ -454,7 +454,7 @@ Any OGridColumn::getPropertyDefaultByHandle( sal_Int32 nHandle ) const case PROPERTY_ID_ALIGN: return Any(); case PROPERTY_ID_HIDDEN: - return makeAny((sal_Bool)sal_False); + return makeAny(false); default: return OPropertySetAggregationHelper::getPropertyDefaultByHandle(nHandle); } @@ -552,8 +552,8 @@ void SAL_CALL OGridColumn::read(const Reference<XObjectInputStream>& _rxInStream } if (nAnyMask & OLD_HIDDEN) { - sal_Bool bValue = _rxInStream->readBoolean(); - m_aHidden <<= (sal_Bool)bValue; + bool bValue = _rxInStream->readBoolean(); + m_aHidden <<= bValue; } // Name @@ -561,22 +561,22 @@ void SAL_CALL OGridColumn::read(const Reference<XObjectInputStream>& _rxInStream if (nAnyMask & COMPATIBLE_HIDDEN) { - sal_Bool bValue = _rxInStream->readBoolean(); - m_aHidden <<= (sal_Bool)bValue; + bool bValue = _rxInStream->readBoolean(); + m_aHidden <<= bValue; } } -IMPL_COLUMN(TextFieldColumn, FRM_SUN_COMPONENT_TEXTFIELD, sal_False); -IMPL_COLUMN(PatternFieldColumn, FRM_SUN_COMPONENT_PATTERNFIELD, sal_False); -IMPL_COLUMN(DateFieldColumn, FRM_SUN_COMPONENT_DATEFIELD, sal_True); -IMPL_COLUMN(TimeFieldColumn, FRM_SUN_COMPONENT_TIMEFIELD, sal_False); -IMPL_COLUMN(NumericFieldColumn, FRM_SUN_COMPONENT_NUMERICFIELD, sal_False); -IMPL_COLUMN(CurrencyFieldColumn, FRM_SUN_COMPONENT_CURRENCYFIELD, sal_False); -IMPL_COLUMN(CheckBoxColumn, FRM_SUN_COMPONENT_CHECKBOX, sal_False); -IMPL_COLUMN(ComboBoxColumn, FRM_SUN_COMPONENT_COMBOBOX, sal_False); -IMPL_COLUMN(ListBoxColumn, FRM_SUN_COMPONENT_LISTBOX, sal_False); -IMPL_COLUMN(FormattedFieldColumn, FRM_SUN_COMPONENT_FORMATTEDFIELD, sal_False); +IMPL_COLUMN(TextFieldColumn, FRM_SUN_COMPONENT_TEXTFIELD, false); +IMPL_COLUMN(PatternFieldColumn, FRM_SUN_COMPONENT_PATTERNFIELD, false); +IMPL_COLUMN(DateFieldColumn, FRM_SUN_COMPONENT_DATEFIELD, true); +IMPL_COLUMN(TimeFieldColumn, FRM_SUN_COMPONENT_TIMEFIELD, false); +IMPL_COLUMN(NumericFieldColumn, FRM_SUN_COMPONENT_NUMERICFIELD, false); +IMPL_COLUMN(CurrencyFieldColumn, FRM_SUN_COMPONENT_CURRENCYFIELD, false); +IMPL_COLUMN(CheckBoxColumn, FRM_SUN_COMPONENT_CHECKBOX, false); +IMPL_COLUMN(ComboBoxColumn, FRM_SUN_COMPONENT_COMBOBOX, false); +IMPL_COLUMN(ListBoxColumn, FRM_SUN_COMPONENT_LISTBOX, false); +IMPL_COLUMN(FormattedFieldColumn, FRM_SUN_COMPONENT_FORMATTEDFIELD, false); } // namespace frm diff --git a/forms/source/component/Columns.hxx b/forms/source/component/Columns.hxx index 58f22b18d093..8c59e8df3ad3 100644 --- a/forms/source/component/Columns.hxx +++ b/forms/source/component/Columns.hxx @@ -111,7 +111,7 @@ public: const OUString& getModelName() const { return m_aModelName; } protected: - static void clearAggregateProperties(::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property>& seqProps, sal_Bool bAllowDropDown); + static void clearAggregateProperties(::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property>& seqProps, bool bAllowDropDown); static void setOwnProperties(::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property>& seqProps); virtual OGridColumn* createCloneColumn() const = 0; diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index ceb3a987d4a8..c49abf27d251 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -126,7 +126,7 @@ Any SAL_CALL OComboBoxModel::queryAggregation(const Type& _rType) throw (Runtime OComboBoxModel::OComboBoxModel(const Reference<XComponentContext>& _rxFactory) - :OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_COMBOBOX, FRM_SUN_CONTROL_COMBOBOX, sal_True, sal_True, sal_True ) + :OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_COMBOBOX, FRM_SUN_CONTROL_COMBOBOX, true, true, true ) // use the old control name for compytibility reasons ,OEntryListHelper( (OControlModel&)*this ) ,OErrorBroadcaster( OComponentHelper::rBHelper ) @@ -265,7 +265,7 @@ sal_Bool OComboBoxModel::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue) throw (IllegalArgumentException) { - sal_Bool bModified(sal_False); + bool bModified(false); switch (_nHandle) { case PROPERTY_ID_LISTSOURCETYPE : @@ -550,7 +550,7 @@ void OComboBoxModel::loadData( bool _bForce ) aStatement.appendAscii( " FROM " ); aStatement.append ( composeTableNameForSelect( xConnection, sCatalog, sSchema, sTable ) ); - m_aListRowSet.setEscapeProcessing( sal_False ); + m_aListRowSet.setEscapeProcessing( false ); m_aListRowSet.setCommand( aStatement.makeStringAndClear() ); bExecuteRowSet = true; } @@ -718,7 +718,7 @@ void OComboBoxModel::resetNoBroadcast() } -sal_Bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset ) +bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset ) { Any aNewValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) ); @@ -744,14 +744,14 @@ sal_Bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset ) if ( m_pValueFormatter.get() ) { if ( !m_pValueFormatter->setFormattedValue( sNewValue ) ) - return sal_False; + return false; } else m_xColumnUpdate->updateString( sNewValue ); } catch ( const Exception& ) { - return sal_False; + return false; } } @@ -759,7 +759,7 @@ sal_Bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset ) } // add the new value to the list - sal_Bool bAddToList = bModified && !_bPostReset; + bool bAddToList = bModified && !_bPostReset; // (only if this is not the "commit" triggered by a "reset") if ( bAddToList ) @@ -787,7 +787,7 @@ sal_Bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset ) } } - return sal_True; + return true; } // XPropertiesChangeListener diff --git a/forms/source/component/ComboBox.hxx b/forms/source/component/ComboBox.hxx index 89073373fe1b..a2b32f70ad7e 100644 --- a/forms/source/component/ComboBox.hxx +++ b/forms/source/component/ComboBox.hxx @@ -122,7 +122,7 @@ protected: // OBoundControlModel overridables virtual ::com::sun::star::uno::Any translateDbColumnToControlValue( ) SAL_OVERRIDE; - virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; + virtual bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; virtual void onConnectedDbColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxForm ) SAL_OVERRIDE; virtual void onDisconnectedDbColumn() SAL_OVERRIDE; diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx index 54871d1ac191..c116afc86e98 100644 --- a/forms/source/component/Currency.cxx +++ b/forms/source/component/Currency.cxx @@ -100,24 +100,24 @@ void OCurrencyModel::implConstruct() const LocaleDataWrapper& aLocaleInfo = aSysLocale.GetLocaleData(); OUString sCurrencySymbol; - sal_Bool bPrependCurrencySymbol; + bool bPrependCurrencySymbol; switch ( aLocaleInfo.getCurrPositiveFormat() ) { case 0: // $1 sCurrencySymbol = aLocaleInfo.getCurrSymbol(); - bPrependCurrencySymbol = sal_True; + bPrependCurrencySymbol = true; break; case 1: // 1$ sCurrencySymbol = aLocaleInfo.getCurrSymbol(); - bPrependCurrencySymbol = sal_False; + bPrependCurrencySymbol = false; break; case 2: // $ 1 sCurrencySymbol = aLocaleInfo.getCurrSymbol() + " "; - bPrependCurrencySymbol = sal_True; + bPrependCurrencySymbol = true; break; case 3: // 1 $ sCurrencySymbol = " " + aLocaleInfo.getCurrSymbol(); - bPrependCurrencySymbol = sal_False; + bPrependCurrencySymbol = false; break; } if (!sCurrencySymbol.isEmpty()) @@ -136,7 +136,7 @@ void OCurrencyModel::implConstruct() OCurrencyModel::OCurrencyModel(const Reference<XComponentContext>& _rxFactory) - :OEditBaseModel( _rxFactory, VCL_CONTROLMODEL_CURRENCYFIELD, FRM_SUN_CONTROL_CURRENCYFIELD, sal_False, sal_True ) + :OEditBaseModel( _rxFactory, VCL_CONTROLMODEL_CURRENCYFIELD, FRM_SUN_CONTROL_CURRENCYFIELD, false, true ) // use the old control name for compytibility reasons { @@ -200,7 +200,7 @@ OUString SAL_CALL OCurrencyModel::getServiceName() throw ( ::com::sun::star::uno } -sal_Bool OCurrencyModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) +bool OCurrencyModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) { Any aControlValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) ); if ( !compare( aControlValue, m_aSaveValue ) ) @@ -215,12 +215,12 @@ sal_Bool OCurrencyModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) } catch(const Exception&) { - return sal_False; + return false; } } m_aSaveValue = aControlValue; } - return sal_True; + return true; } diff --git a/forms/source/component/Currency.hxx b/forms/source/component/Currency.hxx index dcaf3323ecd7..b9ba6b8a5de7 100644 --- a/forms/source/component/Currency.hxx +++ b/forms/source/component/Currency.hxx @@ -57,7 +57,7 @@ protected: // OBoundControlModel overridables virtual ::com::sun::star::uno::Any translateDbColumnToControlValue( ) SAL_OVERRIDE; - virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; + virtual bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Any getDefaultForReset() const SAL_OVERRIDE; diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 3994979f63b8..64caa172e4bd 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -296,17 +296,17 @@ ODatabaseForm::ODatabaseForm(const Reference<XComponentContext>& _rxContext) ,m_pThread(NULL) ,m_nResetsPending(0) ,m_nPrivileges(0) - ,m_bInsertOnly( sal_False ) + ,m_bInsertOnly( false ) ,m_eSubmitMethod(FormSubmitMethod_GET) ,m_eSubmitEncoding(FormSubmitEncoding_URL) ,m_eNavigation(NavigationBarMode_CURRENT) - ,m_bAllowInsert(sal_True) - ,m_bAllowUpdate(sal_True) - ,m_bAllowDelete(sal_True) - ,m_bLoaded(sal_False) - ,m_bSubForm(sal_False) - ,m_bForwardingConnection(sal_False) - ,m_bSharingConnection( sal_False ) + ,m_bAllowInsert(true) + ,m_bAllowUpdate(true) + ,m_bAllowDelete(true) + ,m_bLoaded(false) + ,m_bSubForm(false) + ,m_bForwardingConnection(false) + ,m_bSharingConnection( false ) { impl_construct(); } @@ -349,10 +349,10 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource ) ,m_bAllowInsert( _cloneSource.m_bAllowInsert ) ,m_bAllowUpdate( _cloneSource.m_bAllowUpdate ) ,m_bAllowDelete( _cloneSource.m_bAllowDelete ) - ,m_bLoaded( sal_False ) - ,m_bSubForm( sal_False ) - ,m_bForwardingConnection( sal_False ) - ,m_bSharingConnection( sal_False ) + ,m_bLoaded( false ) + ,m_bSubForm( false ) + ,m_bForwardingConnection( false ) + ,m_bSharingConnection( false ) { impl_construct(); @@ -705,7 +705,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc // MIB: Special treatment for multiline edit only if we have a control for it Any aTmp = xComponentSet->getPropertyValue( PROPERTY_MULTILINE ); - sal_Bool bMulti = rxSubmitButton.is() + bool bMulti = rxSubmitButton.is() && (aTmp.getValueType().getTypeClass() == TypeClass_BOOLEAN) && getBOOL(aTmp); OUString sText; @@ -1037,7 +1037,7 @@ void ODatabaseForm::InsertTextPart( INetMIMEMessage& rParent, const OUString& rN } -sal_Bool ODatabaseForm::InsertFilePart( INetMIMEMessage& rParent, const OUString& rName, +bool ODatabaseForm::InsertFilePart( INetMIMEMessage& rParent, const OUString& rName, const OUString& rFileName ) { OUString aFileName(rFileName); @@ -1093,7 +1093,7 @@ sal_Bool ODatabaseForm::InsertFilePart( INetMIMEMessage& rParent, const OUString pChild->SetDocumentLB( new SvLockBytes(pStream, true) ); rParent.AttachChild( *pChild ); - return sal_True; + return true; } @@ -1193,13 +1193,13 @@ void ODatabaseForm::restoreInsertOnlyState( ) } -sal_Bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNotifies, sal_Bool bMoveToFirst, const Reference< XInteractionHandler >& _rxCompletionHandler) +bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNotifies, bool bMoveToFirst, const Reference< XInteractionHandler >& _rxCompletionHandler) { if (!m_xAggregateAsRowSet.is()) - return sal_False; + return false; if (!fillParameters(_rClearForNotifies, _rxCompletionHandler)) - return sal_False; + return false; restoreInsertOnlyState( ); @@ -1227,11 +1227,11 @@ sal_Bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNot m_xAggregateSet->setPropertyValue( PROPERTY_RESULTSET_CONCURRENCY, makeAny( (sal_Int32)nConcurrency ) ); m_xAggregateSet->setPropertyValue( PROPERTY_RESULTSET_TYPE, makeAny( (sal_Int32)ResultSetType::SCROLL_SENSITIVE ) ); - sal_Bool bSuccess = sal_False; + bool bSuccess = false; try { m_xAggregateAsRowSet->execute(); - bSuccess = sal_True; + bSuccess = true; } catch(const RowSetVetoException&) { @@ -1286,7 +1286,7 @@ sal_Bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNot else onError(eDB, FRM_RES_STRING(RID_STR_READERROR)); _rClearForNotifies.reset(); - bSuccess = sal_False; + bSuccess = false; } } } @@ -1469,7 +1469,7 @@ Reference< XCloneable > SAL_CALL ODatabaseForm::createClone( ) throw (RuntimeEx } -void ODatabaseForm::fire( sal_Int32* pnHandles, const Any* pNewValues, const Any* pOldValues, sal_Int32 nCount, sal_Bool bVetoable ) +void ODatabaseForm::fire( sal_Int32* pnHandles, const Any* pNewValues, const Any* pOldValues, sal_Int32 nCount, bool bVetoable ) { // same as in getFastPropertyValue(sal_Int32) : if we're resetting currently don't fire any changes of the // IsModified property from sal_False to sal_True, as this is only temporary 'til the reset is done @@ -1566,13 +1566,13 @@ void ODatabaseForm::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const rValue <<= m_eNavigation; break; case PROPERTY_ID_ALLOWADDITIONS: - rValue <<= (sal_Bool)m_bAllowInsert; + rValue <<= m_bAllowInsert; break; case PROPERTY_ID_ALLOWEDITS: - rValue <<= (sal_Bool)m_bAllowUpdate; + rValue <<= m_bAllowUpdate; break; case PROPERTY_ID_ALLOWDELETIONS: - rValue <<= (sal_Bool)m_bAllowDelete; + rValue <<= m_bAllowDelete; break; case PROPERTY_ID_PRIVILEGES: rValue <<= (sal_Int32)m_nPrivileges; @@ -1602,7 +1602,7 @@ void ODatabaseForm::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const sal_Bool ODatabaseForm::convertFastPropertyValue( Any& rConvertedValue, Any& rOldValue, sal_Int32 nHandle, const Any& rValue ) throw( IllegalArgumentException ) { - sal_Bool bModified(sal_False); + bool bModified(false); switch (nHandle) { case PROPERTY_ID_INSERTONLY: @@ -1705,7 +1705,7 @@ void ODatabaseForm::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const A case PROPERTY_ID_APPLYFILTER: { - sal_Bool bApply = sal_True; + bool bApply = true; rValue >>= bApply; m_aFilterManager.setApplyPublicFilter( bApply ); } @@ -1808,7 +1808,7 @@ void ODatabaseForm::forwardingPropertyValue( sal_Int32 _nHandle ) { if ( m_bSharingConnection ) stopSharingConnection( ); - m_bForwardingConnection = sal_True; + m_bForwardingConnection = true; } } @@ -1818,7 +1818,7 @@ void ODatabaseForm::forwardedPropertyValue( sal_Int32 _nHandle ) OSL_ENSURE( _nHandle == PROPERTY_ID_ACTIVE_CONNECTION, "ODatabaseForm::forwardedPropertyValue: unexpected property!" ); if ( _nHandle == PROPERTY_ID_ACTIVE_CONNECTION ) { - m_bForwardingConnection = sal_False; + m_bForwardingConnection = false; } } @@ -1963,7 +1963,7 @@ void SAL_CALL ODatabaseForm::reset() throw( RuntimeException, std::exception ) m_pThread->create(); } EventObject aEvt; - m_pThread->addEvent(&aEvt, sal_False); + m_pThread->addEvent(&aEvt, false); } else { @@ -1985,7 +1985,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners) ::osl::ResettableMutexGuard aResetGuard(m_aResetSafety); // do we have a database connected form and stay on the insert row - sal_Bool bInsertRow = sal_False; + bool bInsertRow = false; if (m_xAggregateSet.is()) bInsertRow = getBOOL(m_xAggregateSet->getPropertyValue(PROPERTY_ISNEW)); if (bInsertRow) @@ -2013,7 +2013,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners) { Any aDefault = xColProps->getPropertyValue( PROPERTY_CONTROLDEFAULT ); - sal_Bool bReadOnly = sal_False; + bool bReadOnly = false; if ( xPSI->hasPropertyByName( PROPERTY_ISREADONLY ) ) xColProps->getPropertyValue( PROPERTY_ISREADONLY ) >>= bReadOnly; @@ -2133,7 +2133,7 @@ void SAL_CALL ODatabaseForm::submit( const Reference<XControl>& Control, m_pThread->acquire(); m_pThread->create(); } - m_pThread->addEvent(&MouseEvt, Control, sal_True); + m_pThread->addEvent(&MouseEvt, Control, true); } else { @@ -2180,11 +2180,11 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const ::com: { ::cppu::OInterfaceIteratorHelper aIter(m_aSubmitListeners); EventObject aEvt(static_cast<XWeak*>(this)); - sal_Bool bCanceled = sal_False; + bool bCanceled = false; while (aIter.hasMoreElements() && !bCanceled) { if (!((XSubmitListener*)aIter.next())->approveSubmit(aEvt)) - bCanceled = sal_True; + bCanceled = true; } if (bCanceled) @@ -2358,7 +2358,7 @@ void ODatabaseForm::_propertyChanged(const PropertyChangeEvent& evt) throw( Runt // the rowset changed its active connection itself (without interaction from our side), so // we need to fire this event, too sal_Int32 nHandle = PROPERTY_ID_ACTIVE_CONNECTION; - fire(&nHandle, &evt.NewValue, &evt.OldValue, 1, sal_False); + fire(&nHandle, &evt.NewValue, &evt.OldValue, 1, false); } else // it was one of the statement relevant props { @@ -2422,7 +2422,7 @@ void SAL_CALL ODatabaseForm::setParent(const InterfaceRef& Parent) throw ( ::com // <----- SYNCHRONIZED Reference< XConnection > xOuterConnection; - sal_Bool bIsEmbedded = ::dbtools::isEmbeddedInDatabase( Parent, xOuterConnection ); + bool bIsEmbedded = ::dbtools::isEmbeddedInDatabase( Parent, xOuterConnection ); if ( bIsEmbedded ) xAggregateProperties->setPropertyValue( PROPERTY_DATASOURCE, makeAny( OUString() ) ); @@ -2603,7 +2603,7 @@ void SAL_CALL ODatabaseForm::loaded(const EventObject& /*aEvent*/) throw( Runtim impl_createLoadTimer(); } - load_impl( sal_True ); + load_impl( true ); } @@ -2646,7 +2646,7 @@ void SAL_CALL ODatabaseForm::reloading(const EventObject& /*aEvent*/) throw( Run void SAL_CALL ODatabaseForm::reloaded(const EventObject& /*aEvent*/) throw( RuntimeException, std::exception ) { - reload_impl(sal_True); + reload_impl(true); { ::osl::MutexGuard aGuard(m_aMutex); Reference<XRowSet> xParentRowSet(m_xParent, UNO_QUERY); @@ -2658,7 +2658,7 @@ void SAL_CALL ODatabaseForm::reloaded(const EventObject& /*aEvent*/) throw( Runt IMPL_LINK_NOARG(ODatabaseForm, OnTimeout) { - reload_impl(sal_True); + reload_impl(true); return 1; } @@ -2667,11 +2667,11 @@ IMPL_LINK_NOARG(ODatabaseForm, OnTimeout) void SAL_CALL ODatabaseForm::load() throw( RuntimeException, std::exception ) { - load_impl(sal_False); + load_impl(false); } -sal_Bool ODatabaseForm::canShareConnection( const Reference< XPropertySet >& _rxParentProps ) +bool ODatabaseForm::canShareConnection( const Reference< XPropertySet >& _rxParentProps ) { // our own data source OUString sOwnDatasource; @@ -2684,14 +2684,14 @@ sal_Bool ODatabaseForm::canShareConnection( const Reference< XPropertySet >& _rx if ( _rxParentProps.is() ) _rxParentProps->getPropertyValue( PROPERTY_DATASOURCE ) >>= sParentDataSource; - sal_Bool bCanShareConnection = sal_False; + bool bCanShareConnection = false; // both rowsets share are connected to the same data source if ( sParentDataSource == sOwnDatasource ) { if ( !sParentDataSource.isEmpty() ) // and it's really a data source name (not empty) - bCanShareConnection = sal_True; + bCanShareConnection = true; else { // the data source name is empty // -> ook for the URL @@ -2741,14 +2741,14 @@ void ODatabaseForm::doShareConnection( const Reference< XPropertySet >& _rxParen xParentConnComp->addEventListener( static_cast< XLoadListener* >( this ) ); // forward the connection to our own aggregate - m_bForwardingConnection = sal_True; + m_bForwardingConnection = true; m_xAggregateSet->setPropertyValue( PROPERTY_ACTIVE_CONNECTION, makeAny( xParentConn ) ); - m_bForwardingConnection = sal_False; + m_bForwardingConnection = false; - m_bSharingConnection = sal_True; + m_bSharingConnection = true; } else - m_bSharingConnection = sal_False; + m_bSharingConnection = false; } @@ -2782,23 +2782,23 @@ void ODatabaseForm::stopSharingConnection( ) // reset the property xSharedConn.clear(); - m_bForwardingConnection = sal_True; + m_bForwardingConnection = true; m_xAggregateSet->setPropertyValue( PROPERTY_ACTIVE_CONNECTION, makeAny( xSharedConn ) ); - m_bForwardingConnection = sal_False; + m_bForwardingConnection = false; // reset the flag - m_bSharingConnection = sal_False; + m_bSharingConnection = false; } } -sal_Bool ODatabaseForm::implEnsureConnection() +bool ODatabaseForm::implEnsureConnection() { try { if ( getConnection( ).is() ) // if our aggregate already has a connection, nothing needs to be done about it - return sal_True; + return true; // see whether we're an embedded form Reference< XConnection > xOuterConnection; @@ -2808,7 +2808,7 @@ sal_Bool ODatabaseForm::implEnsureConnection() return xOuterConnection.is(); } - m_bSharingConnection = sal_False; + m_bSharingConnection = false; // if we're a sub form, we try to re-use the connection of our parent if (m_bSubForm) @@ -2826,7 +2826,7 @@ sal_Bool ODatabaseForm::implEnsureConnection() // success? if ( m_bSharingConnection ) // yes -> outta here - return sal_True; + return true; } } @@ -2849,11 +2849,11 @@ sal_Bool ODatabaseForm::implEnsureConnection() DBG_UNHANDLED_EXCEPTION(); } - return sal_False; + return false; } -void ODatabaseForm::load_impl(sal_Bool bCausedByParentForm, sal_Bool bMoveToFirst, const Reference< XInteractionHandler >& _rxCompletionHandler ) throw( RuntimeException ) +void ODatabaseForm::load_impl(bool bCausedByParentForm, bool bMoveToFirst, const Reference< XInteractionHandler >& _rxCompletionHandler ) throw( RuntimeException ) { ::osl::ResettableMutexGuard aGuard(m_aMutex); @@ -2865,10 +2865,10 @@ void ODatabaseForm::load_impl(sal_Bool bCausedByParentForm, sal_Bool bMoveToFirs // if we don't have a connection, we are not intended to be a database form or the aggregate was not able // to establish a connection - sal_Bool bConnected = implEnsureConnection(); + bool bConnected = implEnsureConnection(); // we don't have to execute if we do not have a command to execute - sal_Bool bExecute = bConnected && m_xAggregateSet.is() && !getString(m_xAggregateSet->getPropertyValue(PROPERTY_COMMAND)).isEmpty(); + bool bExecute = bConnected && m_xAggregateSet.is() && !getString(m_xAggregateSet->getPropertyValue(PROPERTY_COMMAND)).isEmpty(); // a database form always uses caching // we use starting fetchsize with at least 10 rows @@ -2880,7 +2880,7 @@ void ODatabaseForm::load_impl(sal_Bool bCausedByParentForm, sal_Bool bMoveToFirs // (and there were no relevant changes between these two listener calls, the "load" of a form is quite an // atomic operation.) - sal_Bool bSuccess = sal_False; + bool bSuccess = false; if (bExecute) { m_sCurrentErrorContext = FRM_RES_STRING(RID_ERR_LOADING_FORM); @@ -2889,7 +2889,7 @@ void ODatabaseForm::load_impl(sal_Bool bCausedByParentForm, sal_Bool bMoveToFirs if (bSuccess) { - m_bLoaded = sal_True; + m_bLoaded = true; aGuard.clear(); EventObject aEvt(static_cast<XWeak*>(this)); m_aLoadListeners.notifyEach( &XLoadListener::loaded, aEvt ); @@ -2937,7 +2937,7 @@ void SAL_CALL ODatabaseForm::unload() throw( RuntimeException, std::exception ) aGuard.reset(); } - m_bLoaded = sal_False; + m_bLoaded = false; // if the connection we used while we were loaded is only shared with our parent, we // reset it @@ -2951,11 +2951,11 @@ void SAL_CALL ODatabaseForm::unload() throw( RuntimeException, std::exception ) void SAL_CALL ODatabaseForm::reload() throw( RuntimeException, std::exception ) { - reload_impl(sal_True); + reload_impl(true); } -void ODatabaseForm::reload_impl(sal_Bool bMoveToFirst, const Reference< XInteractionHandler >& _rxCompletionHandler ) throw( RuntimeException ) +void ODatabaseForm::reload_impl(bool bMoveToFirst, const Reference< XInteractionHandler >& _rxCompletionHandler ) throw( RuntimeException ) { ::osl::ResettableMutexGuard aGuard(m_aMutex); if (!isLoaded()) @@ -2982,7 +2982,7 @@ void ODatabaseForm::reload_impl(sal_Bool bMoveToFirst, const Reference< XInterac } } - sal_Bool bSuccess = sal_True; + bool bSuccess = true; try { m_sCurrentErrorContext = FRM_RES_STRING(RID_ERR_REFRESHING_FORM); @@ -3006,7 +3006,7 @@ void ODatabaseForm::reload_impl(sal_Bool bMoveToFirst, const Reference< XInterac reset(); } else - m_bLoaded = sal_False; + m_bLoaded = false; } @@ -3300,7 +3300,7 @@ void SAL_CALL ODatabaseForm::executeWithCompletion( const Reference< XInteractio if (!isLoaded()) { aGuard.clear(); - load_impl(sal_False, sal_False, _rxHandler); + load_impl(false, false, _rxHandler); } else { @@ -3309,7 +3309,7 @@ void SAL_CALL ODatabaseForm::executeWithCompletion( const Reference< XInteractio return; // we're loaded and somebody want's to execute ourself -> this means a reload - reload_impl(sal_False, _rxHandler); + reload_impl(false, _rxHandler); } } @@ -3326,7 +3326,7 @@ void SAL_CALL ODatabaseForm::execute() throw( SQLException, RuntimeException, st if (!isLoaded()) { aGuard.clear(); - load_impl(sal_False, sal_False); + load_impl(false, false); } else { @@ -3335,7 +3335,7 @@ void SAL_CALL ODatabaseForm::execute() throw( SQLException, RuntimeException, st return; // we're loaded and somebody want's to execute ourself -> this means a reload - reload_impl(sal_False); + reload_impl(false); } } @@ -3757,10 +3757,10 @@ void SAL_CALL ODatabaseForm::propertyChange( const PropertyChangeEvent& evt ) th { if ( evt.PropertyName == PROPERTY_ISNEW ) { - sal_Bool bCurrentIsNew( sal_False ); + bool bCurrentIsNew( false ); OSL_VERIFY( evt.NewValue >>= bCurrentIsNew ); if ( !bCurrentIsNew ) - reload_impl( sal_True ); + reload_impl( true ); } return; } @@ -3890,7 +3890,7 @@ void SAL_CALL ODatabaseForm::write(const Reference<XObjectOutputStream>& _rxOutS case CommandType::QUERY : eTranslated = DataSelectionType_QUERY; break; case CommandType::COMMAND: { - sal_Bool bEscapeProcessing = getBOOL(m_xAggregateSet->getPropertyValue(PROPERTY_ESCAPE_PROCESSING)); + bool bEscapeProcessing = getBOOL(m_xAggregateSet->getPropertyValue(PROPERTY_ESCAPE_PROCESSING)); eTranslated = bEscapeProcessing ? DataSelectionType_SQL : DataSelectionType_SQLPASSTHROUGH; } break; @@ -3996,8 +3996,8 @@ void SAL_CALL ODatabaseForm::read(const Reference<XObjectInputStream>& _rxInStre case DataSelectionType_SQLPASSTHROUGH: { nCommandType = CommandType::COMMAND; - sal_Bool bEscapeProcessing = ((DataSelectionType)nCursorSourceType) != DataSelectionType_SQLPASSTHROUGH; - m_xAggregateSet->setPropertyValue(PROPERTY_ESCAPE_PROCESSING, makeAny((sal_Bool)bEscapeProcessing)); + bool bEscapeProcessing = ((DataSelectionType)nCursorSourceType) != DataSelectionType_SQLPASSTHROUGH; + m_xAggregateSet->setPropertyValue(PROPERTY_ESCAPE_PROCESSING, makeAny(bEscapeProcessing)); } break; default : OSL_FAIL("ODatabaseForm::read : wrong CommandType !"); @@ -4010,11 +4010,11 @@ void SAL_CALL ODatabaseForm::read(const Reference<XObjectInputStream>& _rxInStre // navigation mode was a boolean in version 1 // was a sal_Bool in version 1 - sal_Bool bNavigation = _rxInStream->readBoolean(); + bool bNavigation = _rxInStream->readBoolean(); if (nVersion == 1) m_eNavigation = bNavigation ? NavigationBarMode_CURRENT : NavigationBarMode_NONE; - sal_Bool bInsertOnly = _rxInStream->readBoolean(); + bool bInsertOnly = _rxInStream->readBoolean(); if (m_xAggregateSet.is()) m_xAggregateSet->setPropertyValue(PROPERTY_INSERTONLY, makeAny(bInsertOnly)); @@ -4057,7 +4057,7 @@ void SAL_CALL ODatabaseForm::read(const Reference<XObjectInputStream>& _rxInStre m_aCycle.clear(); } if (m_xAggregateSet.is()) - m_xAggregateSet->setPropertyValue(PROPERTY_APPLYFILTER, makeAny((sal_Bool)((nAnyMask & DONTAPPLYFILTER) == 0))); + m_xAggregateSet->setPropertyValue(PROPERTY_APPLYFILTER, makeAny((nAnyMask & DONTAPPLYFILTER) == 0)); } diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx index 80e2cbe6083d..fe2ed433fed7 100644 --- a/forms/source/component/DatabaseForm.hxx +++ b/forms/source/component/DatabaseForm.hxx @@ -194,7 +194,7 @@ class ODatabaseForm :public OFormComponents sal_Int32 m_nResetsPending; // <overwritten_properties> sal_Int32 m_nPrivileges; - sal_Bool m_bInsertOnly; + bool m_bInsertOnly; // </overwritten_properties> // <properties> @@ -208,14 +208,14 @@ class ODatabaseForm :public OFormComponents ::com::sun::star::form::FormSubmitMethod m_eSubmitMethod; ::com::sun::star::form::FormSubmitEncoding m_eSubmitEncoding; ::com::sun::star::form::NavigationBarMode m_eNavigation; - sal_Bool m_bAllowInsert : 1; - sal_Bool m_bAllowUpdate : 1; - sal_Bool m_bAllowDelete : 1; + bool m_bAllowInsert : 1; + bool m_bAllowUpdate : 1; + bool m_bAllowDelete : 1; // </properties> - sal_Bool m_bLoaded : 1; - sal_Bool m_bSubForm : 1; - sal_Bool m_bForwardingConnection : 1; // sal_True if we're setting the ActiveConnection on the aggregate - sal_Bool m_bSharingConnection : 1; // sal_True if the connection we're using is shared with out parent + bool m_bLoaded : 1; + bool m_bSubForm : 1; + bool m_bForwardingConnection : 1; // sal_True if we're setting the ActiveConnection on the aggregate + bool m_bSharingConnection : 1; // sal_True if the connection we're using is shared with out parent public: ODatabaseForm(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory); @@ -242,7 +242,7 @@ public: ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue( sal_Int32 nHandle ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - void fire( sal_Int32 * pnHandles, const ::com::sun::star::uno::Any * pNewValues, const ::com::sun::star::uno::Any * pOldValues, sal_Int32 nCount, sal_Bool bVetoable ); + void fire( sal_Int32 * pnHandles, const ::com::sun::star::uno::Any * pNewValues, const ::com::sun::star::uno::Any * pOldValues, sal_Int32 nCount, bool bVetoable ); // IPropertyBagHelperContext virtual ::osl::Mutex& getMutex() SAL_OVERRIDE; @@ -454,7 +454,7 @@ protected: virtual void _propertyChanged( const ::com::sun::star::beans::PropertyChangeEvent& ) throw(::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; private: - sal_Bool executeRowSet(::osl::ResettableMutexGuard& _rClearForNotifies, sal_Bool bMoveToFirst = sal_True, + bool executeRowSet(::osl::ResettableMutexGuard& _rClearForNotifies, bool bMoveToFirst = true, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxCompletionHandler = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >()); bool fillParameters(::osl::ResettableMutexGuard& _rClearForNotifies, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxCompletionHandler = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >()); @@ -462,21 +462,21 @@ private: bool hasValidParent() const; // impl methods - void load_impl(sal_Bool bCausedByParentForm, sal_Bool bMoveToFirst = sal_True, + void load_impl(bool bCausedByParentForm, bool bMoveToFirst = true, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxCompletionHandler = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >()) throw(::com::sun::star::uno::RuntimeException); - void reload_impl(sal_Bool bMoveToFirst, + void reload_impl(bool bMoveToFirst, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxCompletionHandler = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >()) throw(::com::sun::star::uno::RuntimeException); void submit_impl(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& Control, const ::com::sun::star::awt::MouseEvent& MouseEvt, bool _bAproveByListeners); void reset_impl(bool _bAproveByListeners); - sal_Bool implEnsureConnection(); + bool implEnsureConnection(); // connection sharing /// checks if we can re-use (aka share) the connection of the given parent - sal_Bool canShareConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxParentProps ); + bool canShareConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxParentProps ); /// starts sharing the connection with the parent void doShareConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxParentProps ); @@ -488,7 +488,7 @@ private: void disposingSharedConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn ); /// checks if we currently share our connection with our parent - sal_Bool isSharingConnection( ) const { return m_bSharingConnection; } + bool isSharingConnection( ) const { return m_bSharingConnection; } /** calls our row set approval listeners @@ -531,7 +531,7 @@ private: void FillSuccessfulList(HtmlSuccessfulObjList& rList, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& rxSubmitButton, const ::com::sun::star::awt::MouseEvent& MouseEvt); void InsertTextPart(INetMIMEMessage& rParent, const OUString& rName, const OUString& rData); - sal_Bool InsertFilePart(INetMIMEMessage& rParent, const OUString& rName, const OUString& rFileName); + bool InsertFilePart(INetMIMEMessage& rParent, const OUString& rName, const OUString& rFileName); void Encode(OUString& rString) const; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection(); diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx index 1da2c574f2ce..187cd30c22e5 100644 --- a/forms/source/component/Date.cxx +++ b/forms/source/component/Date.cxx @@ -90,7 +90,7 @@ Sequence<Type> ODateModel::_getTypes() ODateModel::ODateModel(const Reference<XComponentContext>& _rxFactory) : OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_DATEFIELD, - FRM_SUN_CONTROL_DATEFIELD, sal_True, sal_True) + FRM_SUN_CONTROL_DATEFIELD, true, true) // use the old control name for compytibility reasons , OLimitedFormats(_rxFactory, FormComponentType::DATEFIELD) , m_bDateTimeField(false) @@ -218,7 +218,7 @@ void ODateModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm ) Reference<XPropertySet> xField = getField(); if (xField.is()) { - m_bDateTimeField = sal_False; + m_bDateTimeField = false; try { sal_Int32 nFieldType = 0; @@ -232,7 +232,7 @@ void ODateModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm ) } -sal_Bool ODateModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) +bool ODateModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) { Any aControlValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) ); if ( !compare( aControlValue, m_aSaveValue ) ) @@ -264,12 +264,12 @@ sal_Bool ODateModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) } catch(const Exception&) { - return sal_False; + return false; } } m_aSaveValue = aControlValue; } - return sal_True; + return true; } diff --git a/forms/source/component/Date.hxx b/forms/source/component/Date.hxx index 82fb195860a7..153172618170 100644 --- a/forms/source/component/Date.hxx +++ b/forms/source/component/Date.hxx @@ -36,7 +36,7 @@ class ODateModel ,public OLimitedFormats { ::com::sun::star::uno::Any m_aSaveValue; - sal_Bool m_bDateTimeField; + bool m_bDateTimeField; protected: virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes() SAL_OVERRIDE; @@ -70,7 +70,7 @@ protected: // OBoundControlModel overridables virtual ::com::sun::star::uno::Any translateDbColumnToControlValue( ) SAL_OVERRIDE; - virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; + virtual bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Any translateControlValueToExternalValue( ) const SAL_OVERRIDE; diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index 52d237bc8af0..e4f3219ab3d1 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -287,9 +287,9 @@ Sequence<Type> OEditModel::_getTypes() OEditModel::OEditModel(const Reference<XComponentContext>& _rxFactory) - :OEditBaseModel( _rxFactory, FRM_SUN_COMPONENT_RICHTEXTCONTROL, FRM_SUN_CONTROL_TEXTFIELD, sal_True, sal_True ) - ,m_bMaxTextLenModified(sal_False) - ,m_bWritingFormattedFake(sal_False) + :OEditBaseModel( _rxFactory, FRM_SUN_COMPONENT_RICHTEXTCONTROL, FRM_SUN_CONTROL_TEXTFIELD, true, true ) + ,m_bMaxTextLenModified(false) + ,m_bWritingFormattedFake(false) { m_nClassId = FormComponentType::TEXTFIELD; @@ -299,8 +299,8 @@ OEditModel::OEditModel(const Reference<XComponentContext>& _rxFactory) OEditModel::OEditModel( const OEditModel* _pOriginal, const Reference<XComponentContext>& _rxFactory ) :OEditBaseModel( _pOriginal, _rxFactory ) - ,m_bMaxTextLenModified(sal_False) - ,m_bWritingFormattedFake(sal_False) + ,m_bMaxTextLenModified(false) + ,m_bWritingFormattedFake(false) { // Note that most of the properties are not clone from the original object: @@ -408,7 +408,7 @@ void OEditModel::describeAggregateProperties( Sequence< Property >& _rAggregateP bool OEditModel::implActsAsRichText( ) const { - sal_Bool bActAsRichText = sal_False; + bool bActAsRichText = false; if ( m_xAggregateSet.is() ) { OSL_VERIFY( m_xAggregateSet->getPropertyValue( PROPERTY_RICH_TEXT ) >>= bActAsRichText ); @@ -622,11 +622,11 @@ void OEditModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm ) aVal <<= (sal_Int16)nFieldLen; m_xAggregateSet->setPropertyValue(PROPERTY_MAXTEXTLEN, aVal); - m_bMaxTextLenModified = sal_True; + m_bMaxTextLenModified = true; } } else - m_bMaxTextLenModified = sal_False; // to get sure that the text len won't be set in unloaded + m_bMaxTextLenModified = false; // to get sure that the text len won't be set in unloaded } } } @@ -643,16 +643,16 @@ void OEditModel::onDisconnectedDbColumn() Any aVal; aVal <<= (sal_Int16)0; // Only if it was 0, I switched it in onConnectedDbColumn m_xAggregateSet->setPropertyValue(PROPERTY_MAXTEXTLEN, aVal); - m_bMaxTextLenModified = sal_False; + m_bMaxTextLenModified = false; } } -sal_Bool OEditModel::approveDbColumnType( sal_Int32 _nColumnType ) +bool OEditModel::approveDbColumnType( sal_Int32 _nColumnType ) { // if we act as rich text currently, we do not allow binding to a database column if ( implActsAsRichText() ) - return sal_False; + return false; return OEditBaseModel::approveDbColumnType( _nColumnType ); } @@ -664,7 +664,7 @@ void OEditModel::resetNoBroadcast() } -sal_Bool OEditModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) +bool OEditModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) { Any aNewValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) ); @@ -687,18 +687,18 @@ sal_Bool OEditModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) if ( m_pValueFormatter.get() ) { if ( !m_pValueFormatter->setFormattedValue( sNewValue ) ) - return sal_False; + return false; } else m_xColumnUpdate->updateString( sNewValue ); } catch ( const Exception& ) { - return sal_False; + return false; } } - return sal_True; + return true; } diff --git a/forms/source/component/Edit.hxx b/forms/source/component/Edit.hxx index 8a1cdcf72f04..8e806ffab561 100644 --- a/forms/source/component/Edit.hxx +++ b/forms/source/component/Edit.hxx @@ -39,9 +39,9 @@ class OEditModel { ::std::auto_ptr< ::dbtools::FormattedColumnValue > m_pValueFormatter; - sal_Bool m_bMaxTextLenModified : 1; // set to <TRUE/> when we change the MaxTextLen of the aggregate + bool m_bMaxTextLenModified : 1; // set to <TRUE/> when we change the MaxTextLen of the aggregate - sal_Bool m_bWritingFormattedFake : 1; + bool m_bWritingFormattedFake : 1; // are we writing something which should be interpreted as formatted upon reading? protected: @@ -49,9 +49,9 @@ protected: DECLARE_DEFAULT_LEAF_XTOR( OEditModel ); - void enableFormattedWriteFake() { m_bWritingFormattedFake = sal_True; } - void disableFormattedWriteFake() { m_bWritingFormattedFake = sal_False; } - sal_Bool lastReadWasFormattedFake() const { return (getLastReadVersion() & PF_FAKE_FORMATTED_FIELD) != 0; } + void enableFormattedWriteFake() { m_bWritingFormattedFake = true; } + void disableFormattedWriteFake() { m_bWritingFormattedFake = false; } + bool lastReadWasFormattedFake() const { return (getLastReadVersion() & PF_FAKE_FORMATTED_FIELD) != 0; } friend InterfaceRef SAL_CALL OEditModel_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory); friend class OFormattedFieldWrapper; @@ -97,7 +97,7 @@ protected: // OBoundControlModel overridables virtual ::com::sun::star::uno::Any translateDbColumnToControlValue( ) SAL_OVERRIDE; - virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; + virtual bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Any getDefaultForReset() const SAL_OVERRIDE; @@ -105,7 +105,7 @@ protected: virtual void onConnectedDbColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxForm ) SAL_OVERRIDE; virtual void onDisconnectedDbColumn() SAL_OVERRIDE; - virtual sal_Bool approveDbColumnType( sal_Int32 _nColumnType ) SAL_OVERRIDE; + virtual bool approveDbColumnType( sal_Int32 _nColumnType ) SAL_OVERRIDE; virtual void resetNoBroadcast() SAL_OVERRIDE; diff --git a/forms/source/component/EditBase.cxx b/forms/source/component/EditBase.cxx index d6af51106559..55714e10a9f3 100644 --- a/forms/source/component/EditBase.cxx +++ b/forms/source/component/EditBase.cxx @@ -58,11 +58,11 @@ namespace OEditBaseModel::OEditBaseModel( const Reference< XComponentContext >& _rxFactory, const OUString& rUnoControlModelName, - const OUString& rDefault, const sal_Bool _bSupportExternalBinding, const sal_Bool _bSupportsValidation ) - :OBoundControlModel( _rxFactory, rUnoControlModelName, rDefault, sal_True, _bSupportExternalBinding, _bSupportsValidation ) + const OUString& rDefault, const bool _bSupportExternalBinding, const bool _bSupportsValidation ) + :OBoundControlModel( _rxFactory, rUnoControlModelName, rDefault, true, _bSupportExternalBinding, _bSupportsValidation ) ,m_nLastReadVersion(0) - ,m_bEmptyIsNull(sal_True) - ,m_bFilterProposal(sal_False) + ,m_bEmptyIsNull(true) + ,m_bFilterProposal(false) { } @@ -168,7 +168,7 @@ void OEditBaseModel::read(const Reference<XObjectInputStream>& _rxInStream) thro sal_uInt16 nVersion = _rxInStream->readShort(); m_nLastReadVersion = nVersion; - sal_Bool bHandleCommonProps = (nVersion & PF_HANDLE_COMMON_PROPS) != 0; + bool bHandleCommonProps = (nVersion & PF_HANDLE_COMMON_PROPS) != 0; nVersion = nVersion & ~PF_SPECIAL_FLAGS; // obsolete @@ -201,7 +201,7 @@ void OEditBaseModel::read(const Reference<XObjectInputStream>& _rxInStream) thro } if ((nAnyMask & FILTERPROPOSAL) == FILTERPROPOSAL) - m_bFilterProposal = sal_True; + m_bFilterProposal = true; } if (nVersion > 4) @@ -273,10 +273,10 @@ void OEditBaseModel::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons switch (nHandle) { case PROPERTY_ID_EMPTY_IS_NULL: - rValue <<= (sal_Bool)m_bEmptyIsNull; + rValue <<= m_bEmptyIsNull; break; case PROPERTY_ID_FILTERPROPOSAL: - rValue <<= (sal_Bool)m_bFilterProposal; + rValue <<= m_bFilterProposal; break; case PROPERTY_ID_DEFAULT_TEXT: rValue <<= m_aDefaultText; @@ -295,7 +295,7 @@ void OEditBaseModel::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons sal_Bool OEditBaseModel::convertFastPropertyValue( Any& rConvertedValue, Any& rOldValue, sal_Int32 nHandle, const Any& rValue ) throw( IllegalArgumentException ) { - sal_Bool bModified(sal_False); + bool bModified(false); switch (nHandle) { case PROPERTY_ID_EMPTY_IS_NULL: @@ -365,7 +365,7 @@ Any OEditBaseModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const case PROPERTY_ID_DEFAULT_TEXT: return makeAny(OUString()); case PROPERTY_ID_FILTERPROPOSAL: - return Any(makeAny((sal_Bool)sal_False)); + return makeAny(false); case PROPERTY_ID_DEFAULT_VALUE: case PROPERTY_ID_DEFAULT_DATE: case PROPERTY_ID_DEFAULT_TIME: diff --git a/forms/source/component/EditBase.hxx b/forms/source/component/EditBase.hxx index cc60516d2273..7fdfcfc3b451 100644 --- a/forms/source/component/EditBase.hxx +++ b/forms/source/component/EditBase.hxx @@ -60,8 +60,8 @@ protected: // [properties] for all EditingFields ::com::sun::star::uno::Any m_aDefault; OUString m_aDefaultText; // default value - sal_Bool m_bEmptyIsNull : 1; // empty string will be interepreted as NULL when committing - sal_Bool m_bFilterProposal : 1; // use a list of possible value in filtermode + bool m_bEmptyIsNull : 1; // empty string will be interepreted as NULL when committing + bool m_bFilterProposal : 1; // use a list of possible value in filtermode // [properties] sal_Int16 getLastReadVersion() const { return m_nLastReadVersion; } diff --git a/forms/source/component/EventThread.cxx b/forms/source/component/EventThread.cxx index d385ee893b43..8901e8eb2def 100644 --- a/forms/source/component/EventThread.cxx +++ b/forms/source/component/EventThread.cxx @@ -108,7 +108,7 @@ void OComponentEventThread::disposing( const EventObject& evt ) throw ( ::com::s } } -void OComponentEventThread::addEvent( const EventObject* _pEvt, sal_Bool bFlag ) +void OComponentEventThread::addEvent( const EventObject* _pEvt, bool bFlag ) { Reference<XControl> xTmp; addEvent( _pEvt, xTmp, bFlag ); @@ -116,7 +116,7 @@ void OComponentEventThread::addEvent( const EventObject* _pEvt, sal_Bool bFlag ) void OComponentEventThread::addEvent( const EventObject* _pEvt, const Reference<XControl>& rControl, - sal_Bool bFlag ) + bool bFlag ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -184,7 +184,7 @@ void OComponentEventThread::run() m_aControls.erase( firstControl ); ThreadBools::iterator firstFlag( m_aFlags.begin() ); - sal_Bool bFlag = *firstFlag; + bool bFlag = *firstFlag; m_aFlags.erase( firstFlag ); { diff --git a/forms/source/component/EventThread.hxx b/forms/source/component/EventThread.hxx index 1f56f3b99ea3..a9d98a7184d9 100644 --- a/forms/source/component/EventThread.hxx +++ b/forms/source/component/EventThread.hxx @@ -93,9 +93,9 @@ public: OComponentEventThread(::cppu::OComponentHelper* pCompImpl); virtual ~OComponentEventThread(); - void addEvent( const ::com::sun::star::lang::EventObject* _pEvt, sal_Bool bFlag = sal_False ); + void addEvent( const ::com::sun::star::lang::EventObject* _pEvt, bool bFlag = false ); void addEvent( const ::com::sun::star::lang::EventObject* _pEvt, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& rControl, - sal_Bool bFlag = sal_False ); + bool bFlag = false ); // ::com::sun::star::lang::XEventListener virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& _rSource ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx index b3ec3105bcb2..ddd194fe5aa5 100644 --- a/forms/source/component/File.cxx +++ b/forms/source/component/File.cxx @@ -244,7 +244,7 @@ void SAL_CALL OFileControlModel::reset() throw ( ::com::sun::star::uno::RuntimeE { ::cppu::OInterfaceIteratorHelper aIter(m_aResetListeners); EventObject aEvt(static_cast<XWeak*>(this)); - sal_Bool bContinue = sal_True; + bool bContinue = true; while (aIter.hasMoreElements() && bContinue) bContinue =((XResetListener*)aIter.next())->approveReset(aEvt); diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index 603178f8bd53..7612a19296e4 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -102,26 +102,26 @@ namespace frm ,m_aParser( _rxORB ) #endif ,m_nControlClass( FormComponentType::TEXTFIELD ) - ,m_bFilterList( sal_False ) - ,m_bMultiLine( sal_False ) - ,m_bFilterListFilled( sal_False ) + ,m_bFilterList( false ) + ,m_bMultiLine( false ) + ,m_bFilterListFilled( false ) { } - sal_Bool OFilterControl::ensureInitialized( ) + bool OFilterControl::ensureInitialized( ) { #if HAVE_FEATURE_DBCONNECTIVITY if ( !m_xField.is() ) { OSL_FAIL( "OFilterControl::ensureInitialized: improperly initialized: no field!" ); - return sal_False; + return false; } if ( !m_xConnection.is() ) { OSL_FAIL( "OFilterControl::ensureInitialized: improperly initialized: no connection!" ); - return sal_False; + return false; } if ( !m_xFormatter.is() ) @@ -140,10 +140,10 @@ namespace frm { OSL_FAIL( "OFilterControl::ensureInitialized: no number formatter!" ); // no fallback anymore - return sal_False; + return false; } #endif - return sal_True; + return true; } @@ -205,7 +205,7 @@ namespace frm case FormComponentType::CHECKBOX: { // checkboxes always have a tristate-mode - xVclWindow->setProperty( PROPERTY_TRISTATE, makeAny( sal_Bool( sal_True ) ) ); + xVclWindow->setProperty( PROPERTY_TRISTATE, makeAny( true ) ); xVclWindow->setProperty( PROPERTY_STATE, makeAny( sal_Int32( TRISTATE_INDET ) ) ); Reference< XCheckBox > xBox( getPeer(), UNO_QUERY_THROW ); @@ -232,7 +232,7 @@ namespace frm case FormComponentType::COMBOBOX: { - xVclWindow->setProperty(PROPERTY_AUTOCOMPLETE, makeAny( sal_Bool( sal_True ) ) ); + xVclWindow->setProperty(PROPERTY_AUTOCOMPLETE, makeAny( true ) ); } // no break @@ -254,7 +254,7 @@ namespace frm Reference< XPropertySet > xModel( getModel(), UNO_QUERY_THROW ); Reference< XPropertySetInfo > xModelPSI( xModel->getPropertySetInfo(), UNO_SET_THROW ); if ( xModelPSI->hasPropertyByName( PROPERTY_READONLY ) ) - xVclWindow->setProperty( PROPERTY_READONLY, makeAny( sal_Bool( sal_False ) ) ); + xVclWindow->setProperty( PROPERTY_READONLY, makeAny( false ) ); } catch( const Exception& ) { @@ -262,7 +262,7 @@ namespace frm } if (m_bFilterList) - m_bFilterListFilled = sal_False; + m_bFilterListFilled = false; } @@ -400,7 +400,7 @@ namespace frm try { - m_bFilterListFilled = sal_True; + m_bFilterListFilled = true; if ( !m_xField.is() ) return; diff --git a/forms/source/component/Filter.hxx b/forms/source/component/Filter.hxx index 51cfd651b470..4ea3502077de 100644 --- a/forms/source/component/Filter.hxx +++ b/forms/source/component/Filter.hxx @@ -76,9 +76,9 @@ namespace frm ::connectivity::OSQLParser m_aParser; #endif sal_Int16 m_nControlClass; // which kind of control do we use? - sal_Bool m_bFilterList : 1; - sal_Bool m_bMultiLine : 1; - sal_Bool m_bFilterListFilled : 1; + bool m_bFilterList : 1; + bool m_bMultiLine : 1; + bool m_bFilterListFilled : 1; private: void implInitFilterList(); @@ -142,7 +142,7 @@ namespace frm virtual void PrepareWindowDescriptor( ::com::sun::star::awt::WindowDescriptor& rDesc ) SAL_OVERRIDE; virtual void ImplSetPeerProperty( const OUString& rPropName, const ::com::sun::star::uno::Any& rVal ) SAL_OVERRIDE; - sal_Bool ensureInitialized( ); + bool ensureInitialized( ); void displayException( const ::com::sun::star::sdb::SQLContext& _rExcept ); }; diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 84804cb64690..951a37ffb4fe 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -114,7 +114,7 @@ private: }; // base class for form layer controls -OControl::OControl( const Reference< XComponentContext >& _rxContext, const OUString& _rAggregateService, const sal_Bool _bSetDelegator ) +OControl::OControl( const Reference< XComponentContext >& _rxContext, const OUString& _rAggregateService, const bool _bSetDelegator ) :OComponentHelper(m_aMutex) ,m_xContext( _rxContext ) { @@ -303,7 +303,7 @@ sal_Bool SAL_CALL OControl::setModel(const Reference<XControlModel>& Model) thro if ( !m_xControl.is() ) return sal_False; - sal_Bool bSuccess = m_xControl->setModel( Model ); + bool bSuccess = m_xControl->setModel( Model ); impl_resetStateGuard_nothrow(); return bSuccess; } @@ -336,9 +336,9 @@ sal_Bool SAL_CALL OControl::isTransparent() throw ( RuntimeException, std::excep // OBoundControl OBoundControl::OBoundControl( const Reference< XComponentContext >& _rxContext, - const OUString& _rAggregateService, const sal_Bool _bSetDelegator ) + const OUString& _rAggregateService, const bool _bSetDelegator ) :OControl( _rxContext, _rAggregateService, _bSetDelegator ) - ,m_bLocked(sal_False) + ,m_bLocked(false) ,m_aOriginalFont( EmptyFontDescriptor() ) ,m_nOriginalTextLineColor( 0 ) { @@ -380,7 +380,7 @@ sal_Bool SAL_CALL OBoundControl::getLock() throw(RuntimeException, std::exceptio void SAL_CALL OBoundControl::setLock(sal_Bool _bLock) throw(RuntimeException, std::exception) { - if (m_bLocked == _bLock) + if ((m_bLocked ? 1 : 0) == _bLock) return; osl::MutexGuard aGuard(m_aMutex); @@ -504,7 +504,7 @@ void OControlModel::writeHelpTextCompatibly(const staruno::Reference< stario::XO OControlModel::OControlModel( const Reference<XComponentContext>& _rxContext, const OUString& _rUnoControlModelTypeName, - const OUString& rDefault, const sal_Bool _bSetDelegator) + const OUString& rDefault, const bool _bSetDelegator) :OComponentHelper(m_aMutex) ,OPropertySetAggregationHelper(OComponentHelper::rBHelper) ,m_xContext( _rxContext ) @@ -512,8 +512,8 @@ OControlModel::OControlModel( ,m_aPropertyBagHelper( *this ) ,m_nTabIndex(FRM_DEFAULT_TABINDEX) ,m_nClassId(FormComponentType::CONTROL) - ,m_bNativeLook( sal_False ) - ,m_bGenerateVbEvents( sal_False ) + ,m_bNativeLook( false ) + ,m_bGenerateVbEvents( false ) ,m_nControlTypeinMSO(0) // 0 : default value is create from AOO ,m_nObjIDinMSO(INVALID_OBJ_ID_IN_MSO) // form controls are usually embedded into documents, not dialogs, and in documents @@ -549,7 +549,7 @@ OControlModel::OControlModel( } } -OControlModel::OControlModel( const OControlModel* _pOriginal, const Reference< XComponentContext>& _rxFactory, const sal_Bool _bCloneAggregate, const sal_Bool _bSetDelegator ) +OControlModel::OControlModel( const OControlModel* _pOriginal, const Reference< XComponentContext>& _rxFactory, const bool _bCloneAggregate, const bool _bSetDelegator ) :OComponentHelper( m_aMutex ) ,OPropertySetAggregationHelper( OComponentHelper::rBHelper ) ,m_xContext( _rxFactory ) @@ -835,7 +835,7 @@ PropertyState OControlModel::getPropertyStateByHandle( sal_Int32 _nHandle ) Any aCurrentValue = getPropertyDefaultByHandle( _nHandle ); Any aDefaultValue; getFastPropertyValue( aDefaultValue, _nHandle ); - sal_Bool bEqual = uno_type_equalData( + bool bEqual = uno_type_equalData( const_cast< void* >( aCurrentValue.getValue() ), aCurrentValue.getValueType().getTypeLibType(), const_cast< void* >( aDefaultValue.getValue() ), aDefaultValue.getValueType().getTypeLibType(), reinterpret_cast< uno_QueryInterfaceFunc >(cpp_queryInterface), @@ -872,10 +872,10 @@ Any OControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const aReturn <<= (sal_Int16)FRM_DEFAULT_TABINDEX; break; case PROPERTY_ID_NATIVE_LOOK: - aReturn <<= (sal_Bool)sal_True; + aReturn <<= true; break; case PROPERTY_ID_GENERATEVBAEVENTS: - aReturn <<= (sal_Bool)sal_False; + aReturn <<= false; break; // added for exporting OCX control case PROPERTY_ID_CONTROL_TYPE_IN_MSO: @@ -910,10 +910,10 @@ void OControlModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) con _rValue <<= m_nTabIndex; break; case PROPERTY_ID_NATIVE_LOOK: - _rValue <<= (sal_Bool)m_bNativeLook; + _rValue <<= m_bNativeLook; break; case PROPERTY_ID_GENERATEVBAEVENTS: - _rValue <<= (sal_Bool)m_bGenerateVbEvents; + _rValue <<= m_bGenerateVbEvents; // added for exporting OCX control case PROPERTY_ID_CONTROL_TYPE_IN_MSO: _rValue <<= (sal_Int16)m_nControlTypeinMSO; @@ -934,7 +934,7 @@ sal_Bool OControlModel::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue) throw (com::sun::star::lang::IllegalArgumentException) { - sal_Bool bModified(sal_False); + bool bModified(false); switch (_nHandle) { case PROPERTY_ID_NAME: @@ -1129,8 +1129,8 @@ Any SAL_CALL OBoundControlModel::queryAggregation( const Type& _rType ) throw (R OBoundControlModel::OBoundControlModel( const Reference< XComponentContext>& _rxFactory, const OUString& _rUnoControlModelTypeName, const OUString& _rDefault, - const sal_Bool _bCommitable, const sal_Bool _bSupportExternalBinding, const sal_Bool _bSupportsValidation ) - :OControlModel( _rxFactory, _rUnoControlModelTypeName, _rDefault, sal_False ) + const bool _bCommitable, const bool _bSupportExternalBinding, const bool _bSupportsValidation ) + :OControlModel( _rxFactory, _rUnoControlModelTypeName, _rDefault, false ) ,OPropertyChangeListener( m_aMutex ) ,m_xField() ,m_xAmbientForm() @@ -1140,19 +1140,19 @@ OBoundControlModel::OBoundControlModel( ,m_aResetHelper( *this, m_aMutex ) ,m_aUpdateListeners(m_aMutex) ,m_aFormComponentListeners( m_aMutex ) - ,m_bInputRequired( sal_True ) + ,m_bInputRequired( true ) ,m_pAggPropMultiplexer( NULL ) ,m_bFormListening( false ) - ,m_bLoaded(sal_False) - ,m_bRequired(sal_False) + ,m_bLoaded(false) + ,m_bRequired(false) ,m_bCommitable(_bCommitable) ,m_bSupportsExternalBinding( _bSupportExternalBinding ) ,m_bSupportsValidation( _bSupportsValidation ) - ,m_bForwardValueChanges(sal_True) - ,m_bTransferingValue( sal_False ) - ,m_bIsCurrentValueValid( sal_True ) - ,m_bBindingControlsRO( sal_False ) - ,m_bBindingControlsEnable( sal_False ) + ,m_bForwardValueChanges(true) + ,m_bTransferingValue( false ) + ,m_bIsCurrentValueValid( true ) + ,m_bBindingControlsRO( false ) + ,m_bBindingControlsEnable( false ) ,m_eControlValueChangeInstigator( eOther ) ,m_aLabelServiceName(FRM_SUN_COMPONENT_FIXEDTEXT) { @@ -1162,7 +1162,7 @@ OBoundControlModel::OBoundControlModel( OBoundControlModel::OBoundControlModel( const OBoundControlModel* _pOriginal, const Reference< XComponentContext>& _rxFactory ) - :OControlModel( _pOriginal, _rxFactory, sal_True, sal_False ) + :OControlModel( _pOriginal, _rxFactory, true, false ) ,OPropertyChangeListener( m_aMutex ) ,m_xField() ,m_xAmbientForm() @@ -1173,19 +1173,19 @@ OBoundControlModel::OBoundControlModel( ,m_aUpdateListeners( m_aMutex ) ,m_aFormComponentListeners( m_aMutex ) ,m_xValidator( _pOriginal->m_xValidator ) - ,m_bInputRequired( sal_True ) + ,m_bInputRequired( true ) ,m_pAggPropMultiplexer( NULL ) ,m_bFormListening( false ) - ,m_bLoaded( sal_False ) - ,m_bRequired( sal_False ) + ,m_bLoaded( false ) + ,m_bRequired( false ) ,m_bCommitable( _pOriginal->m_bCommitable ) ,m_bSupportsExternalBinding( _pOriginal->m_bSupportsExternalBinding ) ,m_bSupportsValidation( _pOriginal->m_bSupportsValidation ) - ,m_bForwardValueChanges( sal_True ) - ,m_bTransferingValue( sal_False ) + ,m_bForwardValueChanges( true ) + ,m_bTransferingValue( false ) ,m_bIsCurrentValueValid( _pOriginal->m_bIsCurrentValueValid ) - ,m_bBindingControlsRO( sal_False ) - ,m_bBindingControlsEnable( sal_False ) + ,m_bBindingControlsRO( false ) + ,m_bBindingControlsEnable( false ) ,m_eControlValueChangeInstigator( eOther ) { // start property listening at the aggregate @@ -1640,7 +1640,7 @@ sal_Bool OBoundControlModel::convertFastPropertyValue( const Any& _rValue) throw (com::sun::star::lang::IllegalArgumentException) { - sal_Bool bModified(sal_False); + bool bModified(false); switch (_nHandle) { case PROPERTY_ID_INPUT_REQUIRED: @@ -1681,7 +1681,7 @@ Any OBoundControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const switch ( _nHandle ) { case PROPERTY_ID_INPUT_REQUIRED: - aDefault <<= sal_Bool( sal_True ); + aDefault <<= true; break; case PROPERTY_ID_CONTROLSOURCE: aDefault <<= OUString(); @@ -1871,7 +1871,7 @@ sal_Bool SAL_CALL OBoundControlModel::commit() throw(RuntimeException, std::exce ::cppu::OInterfaceIteratorHelper aIter( m_aUpdateListeners ); EventObject aEvent; aEvent.Source = static_cast< XWeak* >( this ); - sal_Bool bSuccess = sal_True; + bool bSuccess = true; aLock.release(); // UNSAFE > while (aIter.hasMoreElements() && bSuccess) @@ -1888,7 +1888,7 @@ sal_Bool SAL_CALL OBoundControlModel::commit() throw(RuntimeException, std::exce catch(const Exception&) { - bSuccess = sal_False; + bSuccess = false; } } @@ -1909,7 +1909,7 @@ void OBoundControlModel::resetField() m_nFieldType = DataType::OTHER; } -sal_Bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm) +bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm) { OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::connectToField: invalid call (have an external binding)!" ); // if there's a connection to the database @@ -1995,7 +1995,7 @@ void OBoundControlModel::initFromField( const Reference< XRowSet >& _rxRowSet ) } } -sal_Bool OBoundControlModel::approveDbColumnType(sal_Int32 _nColumnType) +bool OBoundControlModel::approveDbColumnType(sal_Int32 _nColumnType) { OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::approveDbColumnType: invalid call (have an external binding)!" ); if ((_nColumnType == DataType::BINARY) || (_nColumnType == DataType::VARBINARY) @@ -2004,8 +2004,8 @@ sal_Bool OBoundControlModel::approveDbColumnType(sal_Int32 _nColumnType) || (_nColumnType == DataType::STRUCT) || (_nColumnType == DataType::ARRAY) || (_nColumnType == DataType::BLOB) /*|| (_nColumnType == DataType::CLOB)*/ || (_nColumnType == DataType::REF) || (_nColumnType == DataType::SQLNULL)) - return sal_False; - return sal_True; + return false; + return true; } void OBoundControlModel::impl_determineAmbientForm_nothrow() @@ -2039,9 +2039,9 @@ void OBoundControlModel::impl_connectDatabaseColumn_noNotify( bool _bFromReload // now that we're connected (more or less, even if we did not find a column), // we definitely want to forward any potentially occurring value changes - m_bForwardValueChanges = sal_True; + m_bForwardValueChanges = true; // let derived classes react on this new connection - m_bLoaded = sal_True; + m_bLoaded = true; onConnectedDbColumn( xRowSet ); // initially transfer the db column value to the control, if we successfully connected to a database column if ( hasField() ) @@ -2060,7 +2060,7 @@ void OBoundControlModel::impl_disconnectDatabaseColumn_noNotify() } m_xCursor = NULL; - m_bLoaded = sal_False; + m_bLoaded = false; } // XLoadListener @@ -2087,7 +2087,7 @@ void SAL_CALL OBoundControlModel::reloading( const com::sun::star::lang::EventOb if ( hasExternalValueBinding() ) return; osl::MutexGuard aGuard(m_aMutex); - m_bForwardValueChanges = sal_False; + m_bForwardValueChanges = false; } void SAL_CALL OBoundControlModel::unloading(const com::sun::star::lang::EventObject& /*aEvent*/) throw(RuntimeException, std::exception) @@ -2161,7 +2161,7 @@ void OBoundControlModel::onConnectedValidator( ) if ( m_xAggregateSet.is() ) xAggregatePropertyInfo = m_xAggregateSet->getPropertySetInfo(); if ( xAggregatePropertyInfo.is() && xAggregatePropertyInfo->hasPropertyByName( PROPERTY_ENFORCE_FORMAT ) ) - m_xAggregateSet->setPropertyValue( PROPERTY_ENFORCE_FORMAT, makeAny( (sal_Bool)sal_False ) ); + m_xAggregateSet->setPropertyValue( PROPERTY_ENFORCE_FORMAT, makeAny( false ) ); } catch( const Exception& ) @@ -2181,7 +2181,7 @@ void OBoundControlModel::onDisconnectedValidator( ) if ( m_xAggregateSet.is() ) xAggregatePropertyInfo = m_xAggregateSet->getPropertySetInfo(); if ( xAggregatePropertyInfo.is() && xAggregatePropertyInfo->hasPropertyByName( PROPERTY_ENFORCE_FORMAT ) ) - m_xAggregateSet->setPropertyValue( PROPERTY_ENFORCE_FORMAT, makeAny( (sal_Bool)sal_True ) ); + m_xAggregateSet->setPropertyValue( PROPERTY_ENFORCE_FORMAT, makeAny( true ) ); } catch( const Exception& ) @@ -2239,7 +2239,7 @@ void OBoundControlModel::reset() throw (RuntimeException, std::exception) return; ControlModelLock aLock( *this ); // on a new record? - sal_Bool bIsNewRecord = sal_False; + bool bIsNewRecord = false; Reference<XPropertySet> xSet( m_xCursor, UNO_QUERY ); if ( xSet.is() ) { @@ -2256,7 +2256,7 @@ void OBoundControlModel::reset() throw (RuntimeException, std::exception) } // cursor on an invalid row? - sal_Bool bInvalidCursorPosition = sal_True; + bool bInvalidCursorPosition = true; try { bInvalidCursorPosition = m_xCursor.is() @@ -2273,7 +2273,7 @@ void OBoundControlModel::reset() throw (RuntimeException, std::exception) } // #i24495# - don't count the insert row as "invalid" - sal_Bool bSimpleReset = + bool bSimpleReset = ( !m_xColumn.is() // no connection to a database column || ( m_xCursor.is() // OR we have an improperly positioned cursor && bInvalidCursorPosition @@ -2287,7 +2287,7 @@ void OBoundControlModel::reset() throw (RuntimeException, std::exception) // Else, the current field value should be refreshed // This behaviour is not completely ... "matured": What should happen if the field as well as the // control have a default value? - sal_Bool bIsNull = sal_True; + bool bIsNull = true; // we have to access the field content at least once to get a reliable result by XColumn::wasNull try { @@ -2317,7 +2317,7 @@ void OBoundControlModel::reset() throw (RuntimeException, std::exception) DBG_UNHANDLED_EXCEPTION(); } - sal_Bool bNeedValueTransfer = sal_True; + bool bNeedValueTransfer = true; if ( bIsNull ) { if ( bIsNewRecord ) @@ -2326,7 +2326,7 @@ void OBoundControlModel::reset() throw (RuntimeException, std::exception) resetNoBroadcast(); // and immediately commit the changes to the DB column, to keep consistency commitControlValueToDbColumn( true ); - bNeedValueTransfer = sal_False; + bNeedValueTransfer = false; } } @@ -2356,10 +2356,10 @@ void OBoundControlModel::impl_setField_noNotify( const Reference< XPropertySet>& m_xField = _rxField; } -sal_Bool OBoundControlModel::impl_approveValueBinding_nolock( const Reference< XValueBinding >& _rxBinding ) +bool OBoundControlModel::impl_approveValueBinding_nolock( const Reference< XValueBinding >& _rxBinding ) { if ( !_rxBinding.is() ) - return sal_False; + return false; Sequence< Type > aTypeCandidates; { // SYNCHRONIZED > @@ -2374,9 +2374,9 @@ sal_Bool OBoundControlModel::impl_approveValueBinding_nolock( const Reference< X ) { if ( _rxBinding->supportsType( *pType ) ) - return sal_True; + return true; } - return sal_False; + return false; } void OBoundControlModel::connectExternalValueBinding( @@ -2410,13 +2410,13 @@ void OBoundControlModel::connectExternalValueBinding( if ( xBindingPropsInfo->hasPropertyByName( PROPERTY_READONLY ) ) { xBindingProps->addPropertyChangeListener( PROPERTY_READONLY, this ); - m_bBindingControlsRO = sal_True; + m_bBindingControlsRO = true; } if ( xBindingPropsInfo->hasPropertyByName( PROPERTY_RELEVANT ) ) { xBindingProps->addPropertyChangeListener( PROPERTY_RELEVANT, this ); - m_bBindingControlsEnable = sal_True; + m_bBindingControlsEnable = true; } } @@ -2572,7 +2572,7 @@ void OBoundControlModel::transferControlValueToExternal( ControlModelLock& _rIns if ( m_xExternalBinding.is() ) { Any aExternalValue( translateControlValueToExternalValue() ); - m_bTransferingValue = sal_True; + m_bTransferingValue = true; _rInstanceLock.release(); // UNSAFE > try @@ -2587,7 +2587,7 @@ void OBoundControlModel::transferControlValueToExternal( ControlModelLock& _rIns // < UNSAFE _rInstanceLock.acquire(); - m_bTransferingValue = sal_False; + m_bTransferingValue = false; } } @@ -2784,7 +2784,7 @@ void OBoundControlModel::recheckValidity( bool _bForceNotification ) { try { - sal_Bool bIsCurrentlyValid = sal_True; + bool bIsCurrentlyValid = true; if ( hasValidator() ) bIsCurrentlyValid = m_xValidator->isValid( translateControlValueToValidatableValue() ); diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 28229fcb3abe..bf7ef15b7b56 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -268,8 +268,8 @@ void OFormattedControl::setDesignMode(sal_Bool bOn) throw ( ::com::sun::star::un void OFormattedModel::implConstruct() { // members - m_bOriginalNumeric = sal_False; - m_bNumeric = sal_False; + m_bOriginalNumeric = false; + m_bNumeric = false; m_xOriginalFormatter = NULL; m_nKeyType = NumberFormat::UNDEFINED; m_aNullDate = DBTypeConversion::getStandardDate(); @@ -282,7 +282,7 @@ void OFormattedModel::implConstruct() startAggregatePropertyListening( PROPERTY_FORMATSSUPPLIER ); } OFormattedModel::OFormattedModel(const Reference<XComponentContext>& _rxFactory) - :OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_FORMATTEDFIELD, FRM_SUN_CONTROL_FORMATTEDFIELD, sal_True, sal_True ) + :OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_FORMATTEDFIELD, FRM_SUN_CONTROL_FORMATTEDFIELD, true, true ) // use the old control name for compytibility reasons ,OErrorBroadcaster( OComponentHelper::rBHelper ) { @@ -602,7 +602,7 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor // das Numeric-Flag an mein gebundenes Feld anpassen if (xField.is()) { - m_bNumeric = sal_False; + m_bNumeric = false; switch (nType) { case DataType::BIT: @@ -619,13 +619,13 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor case DataType::DATE: case DataType::TIME: case DataType::TIMESTAMP: - m_bNumeric = sal_True; + m_bNumeric = true; break; } } else m_bNumeric = m_bOriginalNumeric; - setPropertyValue(PROPERTY_TREATASNUMERIC, makeAny((sal_Bool)m_bNumeric)); + setPropertyValue(PROPERTY_TREATASNUMERIC, makeAny(m_bNumeric)); OSL_VERIFY( aFmtKey >>= nFormatKey ); } } @@ -644,7 +644,7 @@ void OFormattedModel::onDisconnectedDbColumn() { // unser aggregiertes Model hatte keinerlei Format-Informationen m_xAggregateSet->setPropertyValue(PROPERTY_FORMATSSUPPLIER, makeAny(m_xOriginalFormatter)); m_xAggregateSet->setPropertyValue(PROPERTY_FORMATKEY, Any()); - setPropertyValue(PROPERTY_TREATASNUMERIC, makeAny((sal_Bool)m_bOriginalNumeric)); + setPropertyValue(PROPERTY_TREATASNUMERIC, makeAny(m_bOriginalNumeric)); m_xOriginalFormatter = NULL; } m_nFieldType = DataType::OTHER; @@ -661,7 +661,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream) // aber deswegen muessen wir ja nicht gleich den ganzen Supplier speichern, das waere ein klein wenig Overhead ;) Reference<XNumberFormatsSupplier> xSupplier; Any aFmtKey; - sal_Bool bVoidKey = sal_True; + bool bVoidKey = true; if (m_xAggregateSet.is()) { Any aSupplier = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATSSUPPLIER); @@ -750,7 +750,7 @@ void OFormattedModel::read(const Reference<XObjectInputStream>& _rxInStream) thr case 0x0002 : case 0x0003 : { - sal_Bool bNonVoidKey = _rxInStream->readBoolean(); + bool bNonVoidKey = _rxInStream->readBoolean(); if (bNonVoidKey) { // read string and language... @@ -834,7 +834,7 @@ sal_uInt16 OFormattedModel::getPersistenceFlags() const // a) we do our own call to writeCommonEditProperties } -sal_Bool OFormattedModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) +bool OFormattedModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) { Any aControlValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) ); if ( aControlValue != m_aSaveValue ) @@ -864,12 +864,12 @@ sal_Bool OFormattedModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) } catch(const Exception&) { - return sal_False; + return false; } } m_aSaveValue = aControlValue; } - return sal_True; + return true; } void OFormattedModel::onConnectedExternalValue( ) @@ -890,7 +890,7 @@ Any OFormattedModel::translateExternalValueToControlValue( const Any& _rExternal break; case TypeClass_BOOLEAN: { - sal_Bool bExternalValue = sal_False; + bool bExternalValue = false; _rExternalValue >>= bExternalValue; aControlValue <<= (double)( bExternalValue ? 1 : 0 ); } diff --git a/forms/source/component/FormattedField.hxx b/forms/source/component/FormattedField.hxx index 0c99bf422284..58cc6551eb75 100644 --- a/forms/source/component/FormattedField.hxx +++ b/forms/source/component/FormattedField.hxx @@ -42,7 +42,7 @@ class OFormattedModel sal_Int32 m_nFieldType; sal_Int16 m_nKeyType; - sal_Bool m_bOriginalNumeric : 1, + bool m_bOriginalNumeric : 1, m_bNumeric : 1; // analogous for the TreatAsNumeric-property protected: @@ -115,7 +115,7 @@ class OFormattedModel // OBoundControlModel overridables virtual ::com::sun::star::uno::Any translateDbColumnToControlValue( ) SAL_OVERRIDE; - virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; + virtual bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > getSupportedBindingTypes() SAL_OVERRIDE; diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index f6a17b10497e..196f2c3281b7 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -77,13 +77,13 @@ OGridControlModel::OGridControlModel(const Reference<XComponentContext>& _rxFact ,m_nBorder(1) ,m_nWritingMode( WritingMode2::CONTEXT ) ,m_nContextWritingMode( WritingMode2::CONTEXT ) - ,m_bEnableVisible(sal_True) - ,m_bEnable(sal_True) - ,m_bNavigation(sal_True) - ,m_bRecordMarker(sal_True) - ,m_bPrintable(sal_True) - ,m_bAlwaysShowCursor(sal_False) - ,m_bDisplaySynchron(sal_True) + ,m_bEnableVisible(true) + ,m_bEnable(true) + ,m_bNavigation(true) + ,m_bRecordMarker(true) + ,m_bPrintable(true) + ,m_bAlwaysShowCursor(false) + ,m_bDisplaySynchron(true) { m_nClassId = FormComponentType::GRIDCONTROL; } @@ -350,7 +350,7 @@ void SAL_CALL OGridControlModel::reset() throw ( ::com::sun::star::uno::RuntimeE { ::cppu::OInterfaceIteratorHelper aIter(m_aResetListeners); EventObject aEvt(static_cast<XWeak*>(this)); - sal_Bool bContinue = sal_True; + bool bContinue = true; while (aIter.hasMoreElements() && bContinue) bContinue =((XResetListener*)aIter.next())->approveReset(aEvt); if (bContinue) @@ -490,7 +490,7 @@ void OGridControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle ) co sal_Bool OGridControlModel::convertFastPropertyValue( Any& rConvertedValue, Any& rOldValue, sal_Int32 nHandle, const Any& rValue )throw( IllegalArgumentException ) { - sal_Bool bModified(sal_False); + bool bModified(false); switch (nHandle) { case PROPERTY_ID_CONTEXT_WRITING_MODE: @@ -896,7 +896,7 @@ void OGridControlModel::read(const Reference<XObjectInputStream>& _rxInStream) t xMark->deleteMark(nMark); } if ( xCol.is() ) - implInsert( i, xCol, sal_False, NULL, sal_False ); + implInsert( i, xCol, false, NULL, false ); } } // In the base implementation events are only read, elements in the container exist diff --git a/forms/source/component/Grid.hxx b/forms/source/component/Grid.hxx index 5561a7679dc3..244944661f5e 100644 --- a/forms/source/component/Grid.hxx +++ b/forms/source/component/Grid.hxx @@ -87,13 +87,13 @@ class OGridControlModel :public OControlModel sal_Int16 m_nBorder; sal_Int16 m_nWritingMode; sal_Int16 m_nContextWritingMode; - sal_Bool m_bEnableVisible : 1; - sal_Bool m_bEnable : 1; - sal_Bool m_bNavigation : 1; - sal_Bool m_bRecordMarker : 1; - sal_Bool m_bPrintable : 1; - sal_Bool m_bAlwaysShowCursor : 1; // transient - sal_Bool m_bDisplaySynchron : 1; // transient + bool m_bEnableVisible : 1; + bool m_bEnable : 1; + bool m_bNavigation : 1; + bool m_bRecordMarker : 1; + bool m_bPrintable : 1; + bool m_bAlwaysShowCursor : 1; // transient + bool m_bDisplaySynchron : 1; // transient // [properties] protected: diff --git a/forms/source/component/GroupManager.cxx b/forms/source/component/GroupManager.cxx index ae83ca63e27f..44d6bb62c6c1 100644 --- a/forms/source/component/GroupManager.cxx +++ b/forms/source/component/GroupManager.cxx @@ -62,7 +62,7 @@ OGroupCompAcc::OGroupCompAcc(const Reference<XPropertySet>& rxElement, const OGr { } -sal_Bool OGroupCompAcc::operator==( const OGroupCompAcc& rCompAcc ) const +bool OGroupCompAcc::operator==( const OGroupCompAcc& rCompAcc ) const { return (m_xComponent == rCompAcc.GetComponent()); } @@ -70,7 +70,7 @@ sal_Bool OGroupCompAcc::operator==( const OGroupCompAcc& rCompAcc ) const class OGroupCompAccLess : public ::std::binary_function<OGroupCompAcc, OGroupCompAcc, sal_Bool> { public: - sal_Bool operator() (const OGroupCompAcc& lhs, const OGroupCompAcc& rhs) const + bool operator() (const OGroupCompAcc& lhs, const OGroupCompAcc& rhs) const { return reinterpret_cast<sal_Int64>(lhs.m_xComponent.get()) @@ -109,7 +109,7 @@ OGroupComp::OGroupComp(const Reference<XPropertySet>& rxSet, sal_Int32 nInsertPo } } -sal_Bool OGroupComp::operator==( const OGroupComp& rComp ) const +bool OGroupComp::operator==( const OGroupComp& rComp ) const { return m_nTabIndex == rComp.GetTabIndex() && m_nPos == rComp.GetPos(); } @@ -117,9 +117,9 @@ sal_Bool OGroupComp::operator==( const OGroupComp& rComp ) const class OGroupCompLess : public ::std::binary_function<OGroupComp, OGroupComp, sal_Bool> { public: - sal_Bool operator() (const OGroupComp& lhs, const OGroupComp& rhs) const + bool operator() (const OGroupComp& lhs, const OGroupComp& rhs) const { - sal_Bool bResult; + bool bResult; // TabIndex von 0 wird hinten einsortiert if (lhs.m_nTabIndex == rhs.GetTabIndex()) bResult = lhs.m_nPos < rhs.GetPos(); @@ -185,7 +185,7 @@ void OGroup::RemoveComponent( const Reference<XPropertySet>& rxElement ) } } -sal_Bool OGroup::operator==( const OGroup& rGroup ) const +bool OGroup::operator==( const OGroup& rGroup ) const { return m_aGroupName.equals(rGroup.GetGroupName()); } diff --git a/forms/source/component/GroupManager.hxx b/forms/source/component/GroupManager.hxx index 3023a6f22866..9a2db9710530 100644 --- a/forms/source/component/GroupManager.hxx +++ b/forms/source/component/GroupManager.hxx @@ -77,7 +77,7 @@ namespace frm } template <class ELEMENT, class LESS_COMPARE> - sal_Bool seek_entry(const ::std::vector<ELEMENT>& _rArray, const ELEMENT& _rNewElement, sal_Int32& nPos, const LESS_COMPARE& _rCompareOp) + bool seek_entry(const ::std::vector<ELEMENT>& _rArray, const ELEMENT& _rNewElement, sal_Int32& nPos, const LESS_COMPARE& _rCompareOp) { typename ::std::vector<ELEMENT>::const_iterator aExistentPos = ::std::lower_bound( _rArray.begin(), @@ -88,10 +88,10 @@ namespace frm if ((aExistentPos != _rArray.end()) && (*aExistentPos == _rNewElement)) { // we have a valid "lower or equal" element and it's really "equal" nPos = aExistentPos - _rArray.begin(); - return sal_True; + return true; } nPos = -1; - return sal_False; + return false; } @@ -110,7 +110,7 @@ public: OGroupComp(const OGroupComp& _rSource); OGroupComp(); - sal_Bool operator==( const OGroupComp& rComp ) const; + bool operator==( const OGroupComp& rComp ) const; inline const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& GetComponent() const { return m_xComponent; } inline const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>& GetControlModel() const { return m_xControlModel; } @@ -135,7 +135,7 @@ class OGroupCompAcc public: OGroupCompAcc(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& rxElement, const OGroupComp& _rGroupComp ); - sal_Bool operator==( const OGroupCompAcc& rCompAcc ) const; + bool operator==( const OGroupCompAcc& rCompAcc ) const; inline const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& GetComponent() const { return m_xComponent; } const OGroupComp& GetGroupComponent() const { return m_aGroupComp; } @@ -158,7 +158,7 @@ public: OGroup( const OUString& rGroupName ); virtual ~OGroup(); - sal_Bool operator==( const OGroup& rGroup ) const; + bool operator==( const OGroup& rGroup ) const; OUString GetGroupName() const { return m_aGroupName; } ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> > GetControlModels() const; diff --git a/forms/source/component/Hidden.cxx b/forms/source/component/Hidden.cxx index a6b306ab2a19..16236a2be7b3 100644 --- a/forms/source/component/Hidden.cxx +++ b/forms/source/component/Hidden.cxx @@ -99,7 +99,7 @@ sal_Bool OHiddenModel::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue) throw (IllegalArgumentException) { - sal_Bool bModified(sal_False); + bool bModified(false); switch (_nHandle) { case PROPERTY_ID_HIDDEN_VALUE : diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index a1a99ced0a56..c2691aeecf10 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -138,11 +138,11 @@ Sequence<Type> OImageControlModel::_getTypes() OImageControlModel::OImageControlModel(const Reference<XComponentContext>& _rxFactory) - :OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_IMAGECONTROL, FRM_SUN_CONTROL_IMAGECONTROL, sal_False, sal_False, sal_False ) + :OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_IMAGECONTROL, FRM_SUN_CONTROL_IMAGECONTROL, false, false, false ) // use the old control name for compytibility reasons ,m_pImageProducer( NULL ) ,m_bExternalGraphic( true ) - ,m_bReadOnly( sal_False ) + ,m_bReadOnly( false ) ,m_sImageURL() ,m_xGraphicObject() { @@ -226,7 +226,7 @@ Any SAL_CALL OImageControlModel::queryAggregation(const Type& _rType) throw (Run } -sal_Bool OImageControlModel::approveDbColumnType( sal_Int32 _nColumnType ) +bool OImageControlModel::approveDbColumnType( sal_Int32 _nColumnType ) { return ImageStoreInvalid != lcl_getImageStoreType( _nColumnType ); } @@ -237,7 +237,7 @@ void OImageControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) co switch (nHandle) { case PROPERTY_ID_READONLY: - rValue <<= (sal_Bool)m_bReadOnly; + rValue <<= m_bReadOnly; break; case PROPERTY_ID_IMAGE_URL: rValue <<= m_sImageURL; @@ -395,7 +395,7 @@ void OImageControlModel::read(const Reference<XObjectInputStream>& _rxInStream) break; default : OSL_FAIL("OImageControlModel::read : unknown version !"); - m_bReadOnly = sal_False; + m_bReadOnly = false; defaultCommonProperties(); break; } @@ -408,7 +408,7 @@ void OImageControlModel::read(const Reference<XObjectInputStream>& _rxInStream) } -sal_Bool OImageControlModel::impl_updateStreamForURL_lck( const OUString& _rURL, ValueChangeInstigator _eInstigator ) +bool OImageControlModel::impl_updateStreamForURL_lck( const OUString& _rURL, ValueChangeInstigator _eInstigator ) { // create a stream for the image specified by the URL boost::scoped_ptr< SvStream > pImageStream; @@ -421,7 +421,7 @@ sal_Bool OImageControlModel::impl_updateStreamForURL_lck( const OUString& _rURL, else { pImageStream.reset( ::utl::UcbStreamHelper::CreateStream( _rURL, STREAM_READ ) ); - sal_Bool bSetNull = ( pImageStream.get() == NULL ) || ( ERRCODE_NONE != pImageStream->GetErrorCode() ); + bool bSetNull = ( pImageStream.get() == NULL ) || ( ERRCODE_NONE != pImageStream->GetErrorCode() ); if ( !bSetNull ) { @@ -442,20 +442,20 @@ sal_Bool OImageControlModel::impl_updateStreamForURL_lck( const OUString& _rURL, else setControlValue( makeAny( xImageStream ), _eInstigator ); xImageStream->closeInput(); - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool OImageControlModel::impl_handleNewImageURL_lck( ValueChangeInstigator _eInstigator ) +bool OImageControlModel::impl_handleNewImageURL_lck( ValueChangeInstigator _eInstigator ) { switch ( lcl_getImageStoreType( getFieldType() ) ) { case ImageStoreBinary: if ( impl_updateStreamForURL_lck( m_sImageURL, _eInstigator ) ) - return sal_True; + return true; break; case ImageStoreLink: @@ -467,7 +467,7 @@ sal_Bool OImageControlModel::impl_handleNewImageURL_lck( ValueChangeInstigator _ if ( m_xColumnUpdate.is() ) { m_xColumnUpdate->updateString( sCommitURL ); - return sal_True; + return true; } } break; @@ -484,11 +484,11 @@ sal_Bool OImageControlModel::impl_handleNewImageURL_lck( ValueChangeInstigator _ else setControlValue( Any(), _eInstigator ); - return sal_True; + return true; } -sal_Bool OImageControlModel::commitControlValueToDbColumn( bool _bPostReset ) +bool OImageControlModel::commitControlValueToDbColumn( bool _bPostReset ) { if ( _bPostReset ) { @@ -503,7 +503,7 @@ sal_Bool OImageControlModel::commitControlValueToDbColumn( bool _bPostReset ) return impl_handleNewImageURL_lck( eDbColumnBinding ); } - return sal_True; + return true; } @@ -777,7 +777,7 @@ void SAL_CALL OImageControlControl::disposing( const EventObject& _Event ) throw } -void OImageControlControl::implClearGraphics( sal_Bool _bForce ) +void OImageControlControl::implClearGraphics( bool _bForce ) { Reference< XPropertySet > xSet( getModel(), UNO_QUERY ); if ( xSet.is() ) @@ -819,13 +819,13 @@ bool OImageControlControl::implInsertGraphics() Reference<XPropertySet> xBoundField; if ( hasProperty( PROPERTY_BOUNDFIELD, xSet ) ) xSet->getPropertyValue( PROPERTY_BOUNDFIELD ) >>= xBoundField; - sal_Bool bHasField = xBoundField.is(); + bool bHasField = xBoundField.is(); // if the control is bound to a DB field, then it's not possible to decide whether or not to link xController->enableControl(ExtendedFilePickerElementIds::CHECKBOX_LINK, !bHasField ); // if the control is bound to a DB field, then linking of the image depends on the type of the field - sal_Bool bImageIsLinked = sal_True; + bool bImageIsLinked = true; if ( bHasField ) { sal_Int32 nFieldType = DataType::OTHER; @@ -838,8 +838,8 @@ bool OImageControlControl::implInsertGraphics() { // reset the url property in case it already has the value we're about to set - in this case // our propertyChanged would not get called without this. - implClearGraphics( sal_False ); - sal_Bool bIsLink = sal_False; + implClearGraphics( false ); + bool bIsLink = false; xController->getValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0) >>= bIsLink; // Force bIsLink to be sal_True if we're bound to a field. Though we initialized the file picker with IsLink=TRUE // in this case, and disabled the respective control, there might be picker implementations which do not @@ -937,7 +937,7 @@ void OImageControlControl::mousePressed(const ::com::sun::star::awt::MouseEvent& break; case ID_CLEAR_GRAPHICS: - implClearGraphics( sal_True ); + implClearGraphics( true ); bModified = true; break; } @@ -968,7 +968,7 @@ void OImageControlControl::mousePressed(const ::com::sun::star::awt::MouseEvent& return; } - sal_Bool bReadOnly = false; + bool bReadOnly = false; xSet->getPropertyValue(PROPERTY_READONLY) >>= bReadOnly; if (bReadOnly) return; diff --git a/forms/source/component/ImageControl.hxx b/forms/source/component/ImageControl.hxx index dc1b3a0c47b7..2bce9b7e96d9 100644 --- a/forms/source/component/ImageControl.hxx +++ b/forms/source/component/ImageControl.hxx @@ -51,7 +51,7 @@ class OImageControlModel ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageProducer> m_xImageProducer; ImageProducer* m_pImageProducer; bool m_bExternalGraphic; - sal_Bool m_bReadOnly; + bool m_bReadOnly; OUString m_sImageURL; ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject > m_xGraphicObject; @@ -114,13 +114,13 @@ protected: virtual void onDisconnectedDbColumn() SAL_OVERRIDE; virtual ::com::sun::star::uno::Any translateDbColumnToControlValue( ) SAL_OVERRIDE; - virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; + virtual bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Any getControlValue( ) const SAL_OVERRIDE; virtual void doSetControlValue( const ::com::sun::star::uno::Any& _rValue ) SAL_OVERRIDE; - virtual sal_Bool approveDbColumnType(sal_Int32 _nColumnType) SAL_OVERRIDE; + virtual bool approveDbColumnType(sal_Int32 _nColumnType) SAL_OVERRIDE; virtual void resetNoBroadcast() SAL_OVERRIDE; @@ -133,12 +133,12 @@ protected: @precond our own mutex is locked */ - sal_Bool impl_handleNewImageURL_lck( ValueChangeInstigator _eInstigator ); + bool impl_handleNewImageURL_lck( ValueChangeInstigator _eInstigator ); /** updates the binary stream, created from loading the file which the given URL points to, into our bound field, or the control itself if there is no bound field */ - sal_Bool impl_updateStreamForURL_lck( const OUString& _rURL, ValueChangeInstigator _eInstigator ); + bool impl_updateStreamForURL_lck( const OUString& _rURL, ValueChangeInstigator _eInstigator ); DECL_LINK( OnImageImportDone, ::Graphic* ); }; @@ -186,7 +186,7 @@ public: virtual void SAL_CALL disposing() SAL_OVERRIDE; private: - void implClearGraphics( sal_Bool _bForce ); + void implClearGraphics( bool _bForce ); bool implInsertGraphics(); /** determines whether the control does currently have an empty grahic set diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index ea2d688603b6..7dcd15f078f4 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -156,7 +156,7 @@ namespace frm OListBoxModel::OListBoxModel(const Reference<XComponentContext>& _rxFactory) - :OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_LISTBOX, FRM_SUN_CONTROL_LISTBOX, sal_True, sal_True, sal_True ) + :OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_LISTBOX, FRM_SUN_CONTROL_LISTBOX, true, true, true ) // use the old control name for compatibility reasons ,OEntryListHelper( (OControlModel&)*this ) ,OErrorBroadcaster( OComponentHelper::rBHelper ) @@ -395,7 +395,7 @@ namespace frm Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue) throw (IllegalArgumentException) { - sal_Bool bModified(sal_False); + bool bModified(false); switch (_nHandle) { case PROPERTY_ID_BOUNDCOLUMN : @@ -727,7 +727,7 @@ namespace frm { m_aListRowSet.setConnection( xConnection ); - sal_Bool bExecute = sal_False; + bool bExecute = false; switch (m_eListSourceType) { case ListSourceType_TABLEFIELDS: @@ -801,21 +801,21 @@ namespace frm qualifiedNameComponents( xMeta, sListSource, sCatalog, sSchema, sTable, eInDataManipulation ); aStatement += composeTableNameForSelect( xConnection, sCatalog, sSchema, sTable ); - m_aListRowSet.setEscapeProcessing( sal_False ); + m_aListRowSet.setEscapeProcessing( false ); m_aListRowSet.setCommand( aStatement ); - bExecute = sal_True; + bExecute = true; } break; case ListSourceType_QUERY: m_aListRowSet.setCommandFromQuery( sListSource ); - bExecute = sal_True; + bExecute = true; break; default: m_aListRowSet.setEscapeProcessing( ListSourceType_SQLPASSTHROUGH != m_eListSourceType ); m_aListRowSet.setCommand( sListSource ); - bExecute = sal_True; + bExecute = true; break; } @@ -846,7 +846,7 @@ namespace frm // Fill display and value lists ValueList aDisplayList, aValueList; - sal_Bool bUseNULL = hasField() && !isRequired(); + bool bUseNULL = hasField() && !isRequired(); // empty BoundColumn is treated as BoundColumn==0, if(!aBoundColumn) @@ -1116,7 +1116,7 @@ namespace frm } - sal_Bool OListBoxModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) + bool OListBoxModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) { // current selection list const ORowSetValue aCurrentValue( getFirstSelectedValue() ); @@ -1132,12 +1132,12 @@ namespace frm } catch ( const Exception& ) { - return sal_False; + return false; } } m_aSaveValue = aCurrentValue; } - return sal_True; + return true; } @@ -1635,7 +1635,7 @@ namespace frm try { - sal_Bool bMultiSelection( sal_False ); + bool bMultiSelection( false ); OSL_VERIFY( const_cast< OListBoxModel* >( this )->getPropertyValue( PROPERTY_MULTISELECTION ) >>= bMultiSelection ); if ( bMultiSelection ) @@ -1768,7 +1768,7 @@ namespace frm OListBoxControl::OListBoxControl(const Reference<XComponentContext>& _rxFactory) - :OBoundControl( _rxFactory, VCL_CONTROL_LISTBOX, sal_False ) + :OBoundControl( _rxFactory, VCL_CONTROL_LISTBOX, false ) ,m_aChangeListeners( m_aMutex ) ,m_aItemListeners( m_aMutex ) { @@ -1882,14 +1882,14 @@ namespace frm if (xSet.is()) { // Has the selection been changed? - sal_Bool bModified(sal_False); + bool bModified(false); Any aValue = xSet->getPropertyValue(PROPERTY_SELECT_SEQ); Sequence<sal_Int16>& rSelection = *(Sequence<sal_Int16> *)aValue.getValue(); Sequence<sal_Int16>& rOldSelection = *(Sequence<sal_Int16> *)m_aCurrentSelection.getValue(); sal_Int32 nLen = rSelection.getLength(); if (nLen != rOldSelection.getLength()) - bModified = sal_True; + bModified = true; else { const sal_Int16* pVal = rSelection.getConstArray(); diff --git a/forms/source/component/ListBox.hxx b/forms/source/component/ListBox.hxx index f61fba4c9247..3dd20d376c49 100644 --- a/forms/source/component/ListBox.hxx +++ b/forms/source/component/ListBox.hxx @@ -188,7 +188,7 @@ protected: translateControlValueToExternalValue( ) const SAL_OVERRIDE; virtual ::com::sun::star::uno::Any translateControlValueToValidatableValue( ) const SAL_OVERRIDE; - virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; + virtual bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; virtual void onConnectedDbColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxForm ) SAL_OVERRIDE; virtual void onDisconnectedDbColumn() SAL_OVERRIDE; diff --git a/forms/source/component/Numeric.cxx b/forms/source/component/Numeric.cxx index af42655720d2..942e525afc71 100644 --- a/forms/source/component/Numeric.cxx +++ b/forms/source/component/Numeric.cxx @@ -90,7 +90,7 @@ Sequence<Type> ONumericModel::_getTypes() ONumericModel::ONumericModel(const Reference<XComponentContext>& _rxFactory) - :OEditBaseModel( _rxFactory, VCL_CONTROLMODEL_NUMERICFIELD, FRM_SUN_CONTROL_NUMERICFIELD, sal_True, sal_True ) + :OEditBaseModel( _rxFactory, VCL_CONTROLMODEL_NUMERICFIELD, FRM_SUN_CONTROL_NUMERICFIELD, true, true ) // use the old control name for compytibility reasons { @@ -153,7 +153,7 @@ OUString SAL_CALL ONumericModel::getServiceName() throw ( ::com::sun::star::uno: } -sal_Bool ONumericModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) +bool ONumericModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) { Any aControlValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) ); if ( !compare( aControlValue, m_aSaveValue ) ) @@ -168,12 +168,12 @@ sal_Bool ONumericModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) } catch(const Exception&) { - return sal_False; + return false; } } m_aSaveValue = aControlValue; } - return sal_True; + return true; } diff --git a/forms/source/component/Numeric.hxx b/forms/source/component/Numeric.hxx index 985bebd02988..7f469b226947 100644 --- a/forms/source/component/Numeric.hxx +++ b/forms/source/component/Numeric.hxx @@ -57,7 +57,7 @@ protected: // OBoundControlModel overridables virtual ::com::sun::star::uno::Any translateDbColumnToControlValue( ) SAL_OVERRIDE; - virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; + virtual bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Any getDefaultForReset() const SAL_OVERRIDE; diff --git a/forms/source/component/Pattern.cxx b/forms/source/component/Pattern.cxx index 79c5828f5eed..ddd4a84c8a5c 100644 --- a/forms/source/component/Pattern.cxx +++ b/forms/source/component/Pattern.cxx @@ -90,7 +90,7 @@ Sequence<Type> OPatternModel::_getTypes() OPatternModel::OPatternModel(const Reference<XComponentContext>& _rxFactory) - :OEditBaseModel( _rxFactory, VCL_CONTROLMODEL_PATTERNFIELD, FRM_SUN_CONTROL_PATTERNFIELD, sal_False, sal_False ) + :OEditBaseModel( _rxFactory, VCL_CONTROLMODEL_PATTERNFIELD, FRM_SUN_CONTROL_PATTERNFIELD, false, false ) // use the old control name for compytibility reasons { @@ -145,7 +145,7 @@ OUString SAL_CALL OPatternModel::getServiceName() throw ( ::com::sun::star::uno: } -sal_Bool OPatternModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) +bool OPatternModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) { Any aNewValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) ); @@ -166,16 +166,16 @@ sal_Bool OPatternModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) { OSL_ENSURE( m_pFormattedValue.get(), "OPatternModel::commitControlValueToDbColumn: no value helper!" ); if ( !m_pFormattedValue.get() ) - return sal_False; + return false; if ( !m_pFormattedValue->setFormattedValue( sNewValue ) ) - return sal_False; + return false; } m_aLastKnownValue = aNewValue; } - return sal_True; + return true; } diff --git a/forms/source/component/Pattern.hxx b/forms/source/component/Pattern.hxx index 64feec495ef8..93f625579c52 100644 --- a/forms/source/component/Pattern.hxx +++ b/forms/source/component/Pattern.hxx @@ -64,7 +64,7 @@ protected: // OBoundControlModel overridables virtual ::com::sun::star::uno::Any translateDbColumnToControlValue( ) SAL_OVERRIDE; - virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; + virtual bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; virtual void onConnectedDbColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxForm ) SAL_OVERRIDE; virtual void onDisconnectedDbColumn() SAL_OVERRIDE; diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx index 9c60421c4eaf..2dcec5b1f374 100644 --- a/forms/source/component/RadioButton.cxx +++ b/forms/source/component/RadioButton.cxx @@ -99,7 +99,7 @@ InterfaceRef SAL_CALL ORadioButtonModel_CreateInstance(const Reference<XMultiSer ORadioButtonModel::ORadioButtonModel(const Reference<XComponentContext>& _rxFactory) - :OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_RADIOBUTTON, FRM_SUN_CONTROL_RADIOBUTTON,sal_True ) + :OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_RADIOBUTTON, FRM_SUN_CONTROL_RADIOBUTTON,true ) // use the old control name for compytibility reasons { @@ -393,7 +393,7 @@ Any ORadioButtonModel::translateExternalValueToControlValue( const Any& _rExtern } -sal_Bool ORadioButtonModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) +bool ORadioButtonModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) { Reference< XPropertySet > xField( getField() ); OSL_PRECOND( xField.is(), "ORadioButtonModel::commitControlValueToDbColumn: not bound!" ); @@ -411,7 +411,7 @@ sal_Bool ORadioButtonModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) OSL_FAIL("ORadioButtonModel::commitControlValueToDbColumn: could not commit !"); } } - return sal_True; + return true; } diff --git a/forms/source/component/RadioButton.hxx b/forms/source/component/RadioButton.hxx index 9eb8ba82ff5b..c5d70b618aba 100644 --- a/forms/source/component/RadioButton.hxx +++ b/forms/source/component/RadioButton.hxx @@ -61,7 +61,7 @@ protected: // OBoundControlModel overridables virtual ::com::sun::star::uno::Any translateDbColumnToControlValue( ) SAL_OVERRIDE; - virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; + virtual bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Any translateExternalValueToControlValue( const ::com::sun::star::uno::Any& _rExternalValue ) const SAL_OVERRIDE; diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx index a37559fdb130..36f5e7c64ca3 100644 --- a/forms/source/component/Time.cxx +++ b/forms/source/component/Time.cxx @@ -123,7 +123,7 @@ Sequence<Type> OTimeModel::_getTypes() OTimeModel::OTimeModel(const Reference<XComponentContext>& _rxFactory) : OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_TIMEFIELD, - FRM_SUN_CONTROL_TIMEFIELD, sal_True, sal_True) + FRM_SUN_CONTROL_TIMEFIELD, true, true) // use the old control name for compatibility reasons , OLimitedFormats(_rxFactory, FormComponentType::TIMEFIELD) , m_bDateTimeField(false) @@ -215,7 +215,7 @@ void OTimeModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm ) Reference<XPropertySet> xField = getField(); if (xField.is()) { - m_bDateTimeField = sal_False; + m_bDateTimeField = false; try { sal_Int32 nFieldType = 0; @@ -229,7 +229,7 @@ void OTimeModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm ) } -sal_Bool OTimeModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) +bool OTimeModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) { Any aControlValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) ); if ( !compare( aControlValue, m_aSaveValue ) ) @@ -262,12 +262,12 @@ sal_Bool OTimeModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) } catch(const Exception&) { - return sal_False; + return false; } } m_aSaveValue = aControlValue; } - return sal_True; + return true; } diff --git a/forms/source/component/Time.hxx b/forms/source/component/Time.hxx index 564750282498..788daf018043 100644 --- a/forms/source/component/Time.hxx +++ b/forms/source/component/Time.hxx @@ -37,7 +37,7 @@ class OTimeModel { private: ::com::sun::star::uno::Any m_aSaveValue; - sal_Bool m_bDateTimeField; + bool m_bDateTimeField; protected: virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes() SAL_OVERRIDE; @@ -71,7 +71,7 @@ protected: // OBoundControlModel overridables virtual ::com::sun::star::uno::Any translateDbColumnToControlValue( ) SAL_OVERRIDE; - virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; + virtual bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > getSupportedBindingTypes() SAL_OVERRIDE; diff --git a/forms/source/component/cachedrowset.cxx b/forms/source/component/cachedrowset.cxx index 8989c4266286..ea1e684e5891 100644 --- a/forms/source/component/cachedrowset.cxx +++ b/forms/source/component/cachedrowset.cxx @@ -60,14 +60,14 @@ namespace frm struct CachedRowSet_Data { OUString sCommand; - sal_Bool bEscapeProcessing; + bool bEscapeProcessing; Reference< XConnection > xConnection; bool bStatementDirty; CachedRowSet_Data() :sCommand() - ,bEscapeProcessing( sal_False ) + ,bEscapeProcessing( false ) ,xConnection() ,bStatementDirty( true ) { @@ -106,7 +106,7 @@ namespace frm Reference< XNameAccess > xQueries ( xSupplyQueries->getQueries(), UNO_QUERY_THROW ); Reference< XPropertySet > xQuery ( xQueries->getByName( _rQueryName ), UNO_QUERY_THROW ); - sal_Bool bEscapeProcessing( sal_False ); + bool bEscapeProcessing( false ); OSL_VERIFY( xQuery->getPropertyValue( PROPERTY_ESCAPE_PROCESSING ) >>= bEscapeProcessing ); setEscapeProcessing( bEscapeProcessing ); @@ -116,7 +116,7 @@ namespace frm } - void CachedRowSet::setEscapeProcessing ( const sal_Bool _bEscapeProcessing ) + void CachedRowSet::setEscapeProcessing ( const bool _bEscapeProcessing ) { if ( m_pData->bEscapeProcessing == _bEscapeProcessing ) return; diff --git a/forms/source/component/cachedrowset.hxx b/forms/source/component/cachedrowset.hxx index 5d2b7b43187f..b7da2ba61c7b 100644 --- a/forms/source/component/cachedrowset.hxx +++ b/forms/source/component/cachedrowset.hxx @@ -72,7 +72,7 @@ namespace frm void setCommandFromQuery ( const OUString& _rQueryName ); void setCommand ( const OUString& _rCommand ); - void setEscapeProcessing ( const sal_Bool _bEscapeProcessing ); + void setEscapeProcessing ( const bool _bEscapeProcessing ); void setConnection ( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection ); private: diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index e94b6e16c698..a99066c9cd52 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -172,7 +172,7 @@ namespace frm bool OClickableImageBaseControl::approveAction( ) { - sal_Bool bCancelled = sal_False; + bool bCancelled = false; EventObject aEvent( static_cast< XWeak* >( this ) ); ::cppu::OInterfaceIteratorHelper aIter( m_aApproveActionListeners ); @@ -180,7 +180,7 @@ namespace frm { // Jede approveAction-Methode muss thread-safe sein!!! if( !static_cast< XApproveActionListener* >( aIter.next() )->approveAction( aEvent ) ) - bCancelled = sal_True; + bCancelled = true; } return !bCancelled; @@ -291,7 +291,7 @@ namespace frm aURL.Complete += aURL.Mark; } - sal_Bool bDispatchUrlInternal = sal_False; + bool bDispatchUrlInternal = false; xSet->getPropertyValue(PROPERTY_DISPATCHURLINTERNAL) >>= bDispatchUrlInternal; if ( bDispatchUrlInternal ) { @@ -454,9 +454,9 @@ namespace frm ,OPropertyChangeListener(m_aMutex) ,m_pMedium(NULL) ,m_pProducer( NULL ) - ,m_bDispatchUrlInternal(sal_False) - ,m_bDownloading(sal_False) - ,m_bProdStarted(sal_False) + ,m_bDispatchUrlInternal(false) + ,m_bDownloading(false) + ,m_bProdStarted(false) { implConstruct(); m_eButtonType = FormButtonType_PUSH; @@ -468,9 +468,9 @@ namespace frm ,OPropertyChangeListener( m_aMutex ) ,m_pMedium( NULL ) ,m_pProducer( NULL ) - ,m_bDispatchUrlInternal(sal_False) - ,m_bDownloading( sal_False ) - ,m_bProdStarted( sal_False ) + ,m_bDispatchUrlInternal(false) + ,m_bDownloading( false ) + ,m_bProdStarted( false ) { implConstruct(); @@ -684,7 +684,7 @@ namespace frm else // caution: the medium may be NULL if somebody gave us a invalid URL to work with pImgProd->SetImage(OUString()); - m_bDownloading = sal_False; + m_bDownloading = false; return; } if (m_pMedium->GetErrorCode()==0) @@ -693,14 +693,14 @@ namespace frm pImgProd->SetImage(*pStream); pImgProd->startProduction(); - m_bProdStarted = sal_True; + m_bProdStarted = true; } else { pImgProd->SetImage(OUString()); delete m_pMedium; m_pMedium = 0; - m_bDownloading = sal_False; + m_bDownloading = false; } } @@ -795,8 +795,8 @@ namespace frm // Downloading-Flag auf sal_True setzen. Es werden dann auch // Data-Available-Links, wenn wir in den Pending-Staus gelangen. - m_bDownloading = sal_True; - m_bProdStarted = sal_False; + m_bDownloading = true; + m_bProdStarted = false; // Download anstossen (Achtung: Kann auch synchron sein). m_pMedium->Download(STATIC_LINK(this, OClickableImageBaseModel, DownloadDoneLink)); @@ -822,7 +822,7 @@ namespace frm void OClickableImageBaseModel::DownloadDone() { DataAvailable(); - m_bDownloading = sal_False; + m_bDownloading = false; } diff --git a/forms/source/component/clickableimage.hxx b/forms/source/component/clickableimage.hxx index 453d79788ebd..ef967646ad80 100644 --- a/forms/source/component/clickableimage.hxx +++ b/forms/source/component/clickableimage.hxx @@ -66,9 +66,9 @@ namespace frm ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageProducer> m_xProducer; SfxMedium* m_pMedium; // Download-Medium ImageProducer* m_pProducer; - sal_Bool m_bDispatchUrlInternal; // property: is not allowed to set : 1 - sal_Bool m_bDownloading : 1; // laeuft ein Download? - sal_Bool m_bProdStarted : 1; + bool m_bDispatchUrlInternal; // property: is not allowed to set : 1 + bool m_bDownloading : 1; // laeuft ein Download? + bool m_bProdStarted : 1; // XSubmission stuff ::com::sun::star::uno::Reference< ::com::sun::star::form::submission::XSubmission > @@ -85,7 +85,7 @@ namespace frm ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes() SAL_OVERRIDE; inline bool isDispatchUrlInternal() const { return m_bDispatchUrlInternal; } - inline void setDispatchUrlInternal(sal_Bool _bDispatch) { m_bDispatchUrlInternal = _bDispatch; } + inline void setDispatchUrlInternal(bool _bDispatch) { m_bDispatchUrlInternal = _bDispatch; } public: DECLARE_DEFAULT_XTOR( OClickableImageBaseModel ); diff --git a/forms/source/component/entrylisthelper.cxx b/forms/source/component/entrylisthelper.cxx index 757d4ea4362d..afe5804f82fd 100644 --- a/forms/source/component/entrylisthelper.cxx +++ b/forms/source/component/entrylisthelper.cxx @@ -288,7 +288,7 @@ namespace frm } - sal_Bool OEntryListHelper::convertNewListSourceProperty( Any& _rConvertedValue, + bool OEntryListHelper::convertNewListSourceProperty( Any& _rConvertedValue, Any& _rOldValue, const Any& _rValue ) SAL_THROW( ( IllegalArgumentException ) ) { if ( hasExternalListSource() ) diff --git a/forms/source/component/entrylisthelper.hxx b/forms/source/component/entrylisthelper.hxx index e371de0265ea..e1c31b267e7f 100644 --- a/forms/source/component/entrylisthelper.hxx +++ b/forms/source/component/entrylisthelper.hxx @@ -91,7 +91,7 @@ namespace frm <p>The signature of this method and the return type have the same semantics as convertFastPropertyValue.</p> */ - sal_Bool convertNewListSourceProperty( + bool convertNewListSourceProperty( ::com::sun::star::uno::Any& _rConvertedValue, ::com::sun::star::uno::Any& _rOldValue, const ::com::sun::star::uno::Any& _rValue diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx index f6b9b0902a8b..7c1b3a4fc2a1 100644 --- a/forms/source/component/formcontrolfont.cxx +++ b/forms/source/component/formcontrolfont.cxx @@ -108,7 +108,7 @@ namespace frm break; case PROPERTY_ID_FONT_WORDLINEMODE: - aValue = makeAny( (sal_Bool)_rFont.WordLineMode ); + aValue = makeAny( _rFont.WordLineMode ); break; default: @@ -252,10 +252,10 @@ namespace frm } - sal_Bool FontControlModel::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, + bool FontControlModel::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw( IllegalArgumentException ) { - sal_Bool bModified = sal_False; + bool bModified = false; switch( _nHandle ) { case PROPERTY_ID_TEXTCOLOR: @@ -342,7 +342,7 @@ namespace frm break; case PROPERTY_ID_FONT_WORDLINEMODE: - bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, (sal_Bool)m_aFont.WordLineMode ); + bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, m_aFont.WordLineMode ); break; default: @@ -424,7 +424,7 @@ namespace frm case PROPERTY_ID_FONT_WORDLINEMODE: { - sal_Bool bWordLineMode = sal_False; + bool bWordLineMode = false; rValue >>= bWordLineMode; rFont.WordLineMode = bWordLineMode; } diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx index 6cb579794247..5e76b60b2ea8 100644 --- a/forms/source/component/imgprod.cxx +++ b/forms/source/component/imgprod.cxx @@ -42,7 +42,7 @@ class ImgProdLockBytes : public SvLockBytes public: - ImgProdLockBytes( SvStream* pStm, sal_Bool bOwner ); + ImgProdLockBytes( SvStream* pStm, bool bOwner ); ImgProdLockBytes( ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > & rStreamRef ); virtual ~ImgProdLockBytes(); @@ -55,7 +55,7 @@ public: -ImgProdLockBytes::ImgProdLockBytes( SvStream* pStm, sal_Bool bOwner ) : +ImgProdLockBytes::ImgProdLockBytes( SvStream* pStm, bool bOwner ) : SvLockBytes( pStm, bOwner ) { } @@ -173,7 +173,7 @@ ErrCode ImgProdLockBytes::Stat( SvLockBytesStat* pStat, SvLockBytesStatFlag eFla ImageProducer::ImageProducer() : mpStm(NULL) , mnTransIndex(0) - , mbConsInit(sal_False) + , mbConsInit(false) { mpGraphic = new Graphic; } @@ -223,7 +223,7 @@ void ImageProducer::SetImage( const OUString& rPath ) { maURL = rPath; mpGraphic->Clear(); - mbConsInit = sal_False; + mbConsInit = false; delete mpStm; if ( ::svt::GraphicAccess::isSupportedURL( maURL ) ) @@ -233,7 +233,7 @@ void ImageProducer::SetImage( const OUString& rPath ) else if( !maURL.isEmpty() ) { SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( maURL, STREAM_STD_READ ); - mpStm = pIStm ? new SvStream( new ImgProdLockBytes( pIStm, sal_True ) ) : NULL; + mpStm = pIStm ? new SvStream( new ImgProdLockBytes( pIStm, true ) ) : NULL; } else mpStm = NULL; @@ -245,10 +245,10 @@ void ImageProducer::SetImage( SvStream& rStm ) { maURL = OUString(); mpGraphic->Clear(); - mbConsInit = sal_False; + mbConsInit = false; delete mpStm; - mpStm = new SvStream( new ImgProdLockBytes( &rStm, sal_False ) ); + mpStm = new SvStream( new ImgProdLockBytes( &rStm, false ) ); } @@ -257,7 +257,7 @@ void ImageProducer::setImage( ::com::sun::star::uno::Reference< ::com::sun::star { maURL = OUString(); mpGraphic->Clear(); - mbConsInit = sal_False; + mbConsInit = false; delete mpStm; if( rInputStmRef.is() ) @@ -322,7 +322,7 @@ void ImageProducer::startProduction() throw(::com::sun::star::uno::RuntimeExcept -sal_Bool ImageProducer::ImplImportGraphic( Graphic& rGraphic ) +bool ImageProducer::ImplImportGraphic( Graphic& rGraphic ) { if (!mpStm) return false; @@ -332,7 +332,7 @@ sal_Bool ImageProducer::ImplImportGraphic( Graphic& rGraphic ) mpStm->Seek( 0UL ); - sal_Bool bRet = GraphicConverter::Import( *mpStm, rGraphic ) == ERRCODE_NONE; + bool bRet = GraphicConverter::Import( *mpStm, rGraphic ) == ERRCODE_NONE; if( ERRCODE_IO_PENDING == mpStm->GetError() ) mpStm->ResetError(); @@ -352,7 +352,7 @@ void ImageProducer::ImplUpdateData( const Graphic& rGraphic ) ConsumerList_t aTmp = maConsList; ImplUpdateConsumer( rGraphic ); - mbConsInit = sal_False; + mbConsInit = false; // iterate through interfaces for( ConsumerList_t::iterator iter = aTmp.begin(); iter != aTmp.end(); ++iter ) @@ -427,7 +427,7 @@ void ImageProducer::ImplInitConsumer( const Graphic& rGraphic ) } aBmp.ReleaseAccess( pBmpAcc ); - mbConsInit = sal_True; + mbConsInit = true; } } diff --git a/forms/source/component/imgprod.hxx b/forms/source/component/imgprod.hxx index 57d5e1d55302..6fcdd7d7b67e 100644 --- a/forms/source/component/imgprod.hxx +++ b/forms/source/component/imgprod.hxx @@ -57,10 +57,10 @@ private: Graphic* mpGraphic; SvStream* mpStm; sal_uInt32 mnTransIndex; - sal_Bool mbConsInit; + bool mbConsInit; Link maDoneHdl; - sal_Bool ImplImportGraphic( Graphic& rGraphic ); + bool ImplImportGraphic( Graphic& rGraphic ); void ImplUpdateData( const Graphic& rGraphic ); void ImplInitConsumer( const Graphic& rGraphic ); void ImplUpdateConsumer( const Graphic& rGraphic ); diff --git a/forms/source/component/navigationbar.cxx b/forms/source/component/navigationbar.cxx index 2078697bdfed..8cae338ab869 100644 --- a/forms/source/component/navigationbar.cxx +++ b/forms/source/component/navigationbar.cxx @@ -245,7 +245,7 @@ namespace frm // the maybeboid anys if ( nNonVoids & PERSIST_TABSTOP ) { - sal_Bool bTabStop( sal_False ); + bool bTabStop( false ); m_aTabStop >>= bTabStop; _rxOutStream->writeBoolean( bTabStop ); } @@ -372,7 +372,7 @@ namespace frm sal_Bool SAL_CALL ONavigationBarModel::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw( IllegalArgumentException ) { - sal_Bool bModified = sal_False; + bool bModified = false; if ( isRegisteredProperty( _nHandle ) ) { @@ -431,7 +431,7 @@ namespace frm case PROPERTY_ID_SHOW_NAVIGATION: case PROPERTY_ID_SHOW_RECORDACTIONS: case PROPERTY_ID_SHOW_FILTERSORT: - aDefault <<= (sal_Bool)sal_True; + aDefault <<= true; break; case PROPERTY_ID_ICONSIZE: diff --git a/forms/source/component/navigationbar.hxx b/forms/source/component/navigationbar.hxx index b3045ebc4a45..2696933b4a15 100644 --- a/forms/source/component/navigationbar.hxx +++ b/forms/source/component/navigationbar.hxx @@ -58,12 +58,12 @@ namespace frm sal_Int16 m_nIconSize; sal_Int16 m_nBorder; sal_Int32 m_nDelay; - sal_Bool m_bEnabled; - sal_Bool m_bEnableVisible; - sal_Bool m_bShowPosition; - sal_Bool m_bShowNavigation; - sal_Bool m_bShowActions; - sal_Bool m_bShowFilterSort; + bool m_bEnabled; + bool m_bEnableVisible; + bool m_bShowPosition; + bool m_bShowNavigation; + bool m_bShowActions; + bool m_bShowFilterSort; sal_Int16 m_nWritingMode; sal_Int16 m_nContextWritingMode; // </properties> diff --git a/forms/source/component/refvaluecomponent.cxx b/forms/source/component/refvaluecomponent.cxx index 4af480f1fe33..3e9b652529b1 100644 --- a/forms/source/component/refvaluecomponent.cxx +++ b/forms/source/component/refvaluecomponent.cxx @@ -37,8 +37,8 @@ namespace frm //= - OReferenceValueComponent::OReferenceValueComponent( const Reference< XComponentContext >& _rxFactory, const OUString& _rUnoControlModelTypeName, const OUString& _rDefault, sal_Bool _bSupportNoCheckRefValue ) - :OBoundControlModel( _rxFactory, _rUnoControlModelTypeName, _rDefault, sal_False, sal_True, sal_True ) + OReferenceValueComponent::OReferenceValueComponent( const Reference< XComponentContext >& _rxFactory, const OUString& _rUnoControlModelTypeName, const OUString& _rDefault, bool _bSupportNoCheckRefValue ) + :OBoundControlModel( _rxFactory, _rUnoControlModelTypeName, _rDefault, false, true, true ) ,m_eDefaultChecked( TRISTATE_FALSE ) ,m_bSupportSecondRefValue( _bSupportNoCheckRefValue ) { @@ -118,7 +118,7 @@ namespace frm sal_Bool SAL_CALL OReferenceValueComponent::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw (IllegalArgumentException) { - sal_Bool bModified = sal_False; + bool bModified = false; switch ( _nHandle ) { case PROPERTY_ID_REFVALUE: @@ -180,7 +180,7 @@ namespace frm { sal_Int16 nState = TRISTATE_INDET; - sal_Bool bExternalState = sal_False; + bool bExternalState = false; OUString sExternalValue; if ( _rExternalValue >>= bExternalState ) { @@ -231,7 +231,7 @@ namespace frm case TRISTATE_TRUE: if ( bBooleanExchange ) { - aExternalValue <<= (sal_Bool)sal_True; + aExternalValue <<= true; } else if ( bStringExchange ) { @@ -242,7 +242,7 @@ namespace frm case TRISTATE_FALSE: if ( bBooleanExchange ) { - aExternalValue <<= (sal_Bool)sal_False; + aExternalValue <<= false; } else if ( bStringExchange ) { @@ -273,10 +273,10 @@ namespace frm switch ( nControlValue ) { case TRISTATE_TRUE: - aValidatableValue <<= (sal_Bool)sal_True; + aValidatableValue <<= true; break; case TRISTATE_FALSE: - aValidatableValue <<= (sal_Bool)sal_False; + aValidatableValue <<= false; break; } return aValidatableValue; diff --git a/forms/source/component/refvaluecomponent.hxx b/forms/source/component/refvaluecomponent.hxx index e8a9f111d789..481f9b67dff9 100644 --- a/forms/source/component/refvaluecomponent.hxx +++ b/forms/source/component/refvaluecomponent.hxx @@ -42,7 +42,7 @@ namespace frm ToggleState m_eDefaultChecked; // the default check state // </properties> - sal_Bool m_bSupportSecondRefValue; // do we support the SecondaryRefValue property? + bool m_bSupportSecondRefValue; // do we support the SecondaryRefValue property? protected: const OUString& getReferenceValue() const { return m_sReferenceValue; } @@ -58,7 +58,7 @@ namespace frm const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory, const OUString& _rUnoControlModelTypeName, const OUString& _rDefault, - sal_Bool _bSupportNoCheckRefValue = sal_False + bool _bSupportNoCheckRefValue = false ); DECLARE_DEFAULT_CLONE_CTOR( OReferenceValueComponent ) DECLARE_DEFAULT_DTOR( OReferenceValueComponent ); diff --git a/forms/source/component/scrollbar.cxx b/forms/source/component/scrollbar.cxx index 85f86c091e15..97ad753dc730 100644 --- a/forms/source/component/scrollbar.cxx +++ b/forms/source/component/scrollbar.cxx @@ -100,7 +100,7 @@ namespace frm OScrollBarModel::OScrollBarModel( const Reference<XComponentContext>& _rxFactory ) - :OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_SCROLLBAR, VCL_CONTROL_SCROLLBAR, sal_True, sal_True, sal_False ) + :OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_SCROLLBAR, VCL_CONTROL_SCROLLBAR, true, true, false ) ,m_nDefaultScrollValue( 0 ) { @@ -180,7 +180,7 @@ namespace frm Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw ( IllegalArgumentException ) { - sal_Bool bModified( sal_False ); + bool bModified( false ); switch ( _nHandle ) { case PROPERTY_ID_DEFAULT_SCROLL_VALUE: @@ -221,10 +221,10 @@ namespace frm } - sal_Bool OScrollBarModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) + bool OScrollBarModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) { OSL_FAIL( "OScrollBarModel::commitControlValueToDbColumn: never to be called (we're not bound)!" ); - return sal_True; + return true; } diff --git a/forms/source/component/scrollbar.hxx b/forms/source/component/scrollbar.hxx index 32bcd4954f9d..3b330f632777 100644 --- a/forms/source/component/scrollbar.hxx +++ b/forms/source/component/scrollbar.hxx @@ -67,7 +67,7 @@ namespace frm // OBoundControlModel virtual ::com::sun::star::uno::Any translateDbColumnToControlValue( ) SAL_OVERRIDE; - virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; + virtual bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Any getDefaultForReset() const SAL_OVERRIDE; diff --git a/forms/source/component/spinbutton.cxx b/forms/source/component/spinbutton.cxx index 18ec0246a9ff..14f0efa80389 100644 --- a/forms/source/component/spinbutton.cxx +++ b/forms/source/component/spinbutton.cxx @@ -56,7 +56,7 @@ namespace frm OSpinButtonModel::OSpinButtonModel( const Reference<XComponentContext>& _rxFactory ) - :OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_SPINBUTTON, VCL_CONTROL_SPINBUTTON, sal_True, sal_True, sal_False ) + :OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_SPINBUTTON, VCL_CONTROL_SPINBUTTON, true, true, false ) ,m_nDefaultSpinValue( 0 ) { @@ -136,7 +136,7 @@ namespace frm Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw ( IllegalArgumentException ) { - sal_Bool bModified( sal_False ); + bool bModified( false ); switch ( _nHandle ) { case PROPERTY_ID_DEFAULT_SPIN_VALUE: @@ -177,10 +177,10 @@ namespace frm } - sal_Bool OSpinButtonModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) + bool OSpinButtonModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) { OSL_FAIL( "OSpinButtonModel::commitControlValueToDbColumn: never to be called (we're not bound)!" ); - return sal_True; + return true; } diff --git a/forms/source/component/spinbutton.hxx b/forms/source/component/spinbutton.hxx index 15e19d9eedec..e7bd87840019 100644 --- a/forms/source/component/spinbutton.hxx +++ b/forms/source/component/spinbutton.hxx @@ -67,7 +67,7 @@ namespace frm // OBoundControlModel virtual ::com::sun::star::uno::Any translateDbColumnToControlValue( ) SAL_OVERRIDE; - virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; + virtual bool commitControlValueToDbColumn( bool _bPostReset ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Any getDefaultForReset() const SAL_OVERRIDE; |