From 2d54aa1d22f404a1a36aaa97d3e3bf5024e89aed Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 8 May 2014 11:42:32 +0200 Subject: reportdesign: sal_Bool->bool Change-Id: Ib3e7a51a8b01165d4706857f7b347d622c2e624a --- reportdesign/source/core/api/FormatCondition.cxx | 2 +- reportdesign/source/core/api/Function.cxx | 4 +- reportdesign/source/core/api/ImageControl.cxx | 6 +-- reportdesign/source/core/api/ReportDefinition.cxx | 48 +++++++++++----------- reportdesign/source/core/api/Section.cxx | 10 ++--- reportdesign/source/core/api/Shape.cxx | 4 +- reportdesign/source/core/inc/FixedText.hxx | 15 +++++++ reportdesign/source/core/inc/FormatCondition.hxx | 14 ++++++- reportdesign/source/core/inc/FormattedField.hxx | 15 +++++++ reportdesign/source/core/inc/Function.hxx | 16 +++++++- reportdesign/source/core/inc/Group.hxx | 15 +++++++ reportdesign/source/core/inc/ImageControl.hxx | 14 ++++++- reportdesign/source/core/inc/ReportComponent.hxx | 2 +- .../source/core/inc/ReportControlModel.hxx | 16 ++++---- reportdesign/source/core/inc/ReportHelperImpl.hxx | 2 +- reportdesign/source/core/inc/Section.hxx | 27 +++++++++--- reportdesign/source/core/inc/Shape.hxx | 16 +++++++- reportdesign/source/inc/GroupProperties.hxx | 6 +-- reportdesign/source/ui/dlg/Navigator.cxx | 10 ++--- reportdesign/source/ui/report/ReportController.cxx | 30 +++++++------- .../source/ui/report/ReportControllerObserver.cxx | 4 +- reportdesign/source/ui/report/ReportSection.cxx | 4 +- reportdesign/source/ui/report/SectionWindow.cxx | 2 +- 23 files changed, 195 insertions(+), 87 deletions(-) (limited to 'reportdesign/source') diff --git a/reportdesign/source/core/api/FormatCondition.cxx b/reportdesign/source/core/api/FormatCondition.cxx index 82e93485cc2e..2166a3ff86ba 100644 --- a/reportdesign/source/core/api/FormatCondition.cxx +++ b/reportdesign/source/core/api/FormatCondition.cxx @@ -43,7 +43,7 @@ uno::Reference< uno::XInterface > OFormatCondition::create(uno::Reference< uno:: OFormatCondition::OFormatCondition(uno::Reference< uno::XComponentContext > const & _xContext) :FormatConditionBase(m_aMutex) ,FormatConditionPropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),uno::Sequence< OUString >()) -,m_bEnabled(sal_True) +,m_bEnabled(true) { } diff --git a/reportdesign/source/core/api/Function.cxx b/reportdesign/source/core/api/Function.cxx index 70252090180e..fd9c96cf323f 100644 --- a/reportdesign/source/core/api/Function.cxx +++ b/reportdesign/source/core/api/Function.cxx @@ -41,8 +41,8 @@ OFunction::OFunction(uno::Reference< uno::XComponentContext > const & _xContext) :FunctionBase(m_aMutex) ,FunctionPropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),uno::Sequence< OUString >()) ,m_xContext(_xContext) -,m_bPreEvaluated(sal_False) -,m_bDeepTraversing(sal_False) +,m_bPreEvaluated(false) +,m_bDeepTraversing(false) { m_sInitialFormula.IsPresent = sal_False; } diff --git a/reportdesign/source/core/api/ImageControl.cxx b/reportdesign/source/core/api/ImageControl.cxx index 793ebe94012f..20593b19e8e4 100644 --- a/reportdesign/source/core/api/ImageControl.cxx +++ b/reportdesign/source/core/api/ImageControl.cxx @@ -118,7 +118,7 @@ OImageControl::OImageControl(uno::Reference< uno::XComponentContext > const & _x ,ImageControlPropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getImageOptionals()) ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext) ,m_nScaleMode(awt::ImageScaleMode::NONE) -,m_bPreserveIRI(sal_True) +,m_bPreserveIRI(true) { m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_IMAGECONTROL,m_aProps.aComponent.m_xContext->getServiceManager()); } @@ -130,7 +130,7 @@ OImageControl::OImageControl(uno::Reference< uno::XComponentContext > const & _x ,ImageControlPropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getImageOptionals()) ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext) ,m_nScaleMode(awt::ImageScaleMode::NONE) -,m_bPreserveIRI(sal_True) +,m_bPreserveIRI(true) { m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_IMAGECONTROL,m_aProps.aComponent.m_xContext->getServiceManager()); m_aProps.aComponent.m_xFactory = _xFactory; @@ -244,7 +244,7 @@ void SAL_CALL OImageControl::setHyperLinkName(const OUString & the_value) throw void SAL_CALL OImageControl::setControlBackground( ::sal_Int32 _backgroundcolor ) throw (uno::RuntimeException, beans::UnknownPropertyException, std::exception) { - sal_Bool bTransparent = _backgroundcolor == static_cast(COL_TRANSPARENT); + bool bTransparent = _backgroundcolor == static_cast(COL_TRANSPARENT); setControlBackgroundTransparent(bTransparent); if ( !bTransparent ) set(PROPERTY_CONTROLBACKGROUND,_backgroundcolor,m_aProps.aFormatProperties.nBackgroundColor); diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 09e90129cbf0..6a4457bd340d 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -585,10 +585,10 @@ struct OReportDefinitionImpl ::sal_Int16 m_nPageHeaderOption; ::sal_Int16 m_nPageFooterOption; ::sal_Int32 m_nCommandType; - sal_Bool m_bControllersLocked; - sal_Bool m_bModified; - sal_Bool m_bEscapeProcessing; - sal_Bool m_bSetModifiedEnabled; + bool m_bControllersLocked; + bool m_bModified; + bool m_bEscapeProcessing; + bool m_bSetModifiedEnabled; OReportDefinitionImpl(::osl::Mutex& _aMutex) :m_aStorageChangeListeners(_aMutex) @@ -604,10 +604,10 @@ struct OReportDefinitionImpl ,m_nPageHeaderOption(0) ,m_nPageFooterOption(0) ,m_nCommandType(sdb::CommandType::TABLE) - ,m_bControllersLocked(sal_False) - ,m_bModified(sal_False) - ,m_bEscapeProcessing(sal_True) - ,m_bSetModifiedEnabled( sal_True ) + ,m_bControllersLocked(false) + ,m_bModified(false) + ,m_bEscapeProcessing(true) + ,m_bSetModifiedEnabled( true ) {} OReportDefinitionImpl(::osl::Mutex& _aMutex,const OReportDefinitionImpl& _aCopy) @@ -1330,14 +1330,14 @@ void SAL_CALL OReportDefinition::lockControllers( ) throw (uno::RuntimeExceptio { ::osl::MutexGuard aGuard(m_aMutex); ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); - m_pImpl->m_bControllersLocked = sal_True; + m_pImpl->m_bControllersLocked = true; } void SAL_CALL OReportDefinition::unlockControllers( ) throw (uno::RuntimeException, std::exception) { ::osl::MutexGuard aGuard(m_aMutex); ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); - m_pImpl->m_bControllersLocked = sal_False; + m_pImpl->m_bControllersLocked = false; } sal_Bool SAL_CALL OReportDefinition::hasControllersLocked( ) throw (uno::RuntimeException, std::exception) @@ -1439,7 +1439,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS uno::Sequence < beans::PropertyValue > aProps; // export sub streams for package, else full stream into a file - sal_Bool bWarn = sal_False, bErr = sal_False; + bool bWarn = false, bErr = false; OUString sWarnFile, sErrFile; uno::Reference< beans::XPropertySet> xProp(_xStorageToSaveTo,uno::UNO_QUERY); @@ -1502,7 +1502,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS { if( !bWarn ) { - bWarn = sal_True; + bWarn = true; sWarnFile = "settings.xml"; } } @@ -1518,7 +1518,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS { if( !bWarn ) { - bWarn = sal_True; + bWarn = true; sWarnFile = "meta.xml"; } } @@ -1534,7 +1534,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS { if( !bWarn ) { - bWarn = sal_True; + bWarn = true; sWarnFile = "styles.xml"; } } @@ -1548,7 +1548,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS "com.sun.star.comp.report.ExportFilter", aDelegatorArguments, aProps, _xStorageToSaveTo ) ) { - bErr = sal_True; + bErr = true; sErrFile = "content.xml"; } } @@ -1573,7 +1573,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS if ( !bErr ) { - sal_Bool bPersist = sal_False; + bool bPersist = false; if ( _xStorageToSaveTo == m_pImpl->m_xStorage ) bPersist = m_pImpl->m_pObjectContainer->StoreChildren(true,false); else @@ -1679,12 +1679,12 @@ bool OReportDefinition::WriteThroughComponent( // encrypt all streams xStreamProp->setPropertyValue( "UseCommonStoragePasswordEncryption", - uno::makeAny( (sal_Bool)sal_True ) ); + uno::makeAny( true ) ); // set buffer and create outputstream // write the stuff - sal_Bool bRet = WriteThroughComponent( + bool bRet = WriteThroughComponent( xOutputStream, xComponent, pServiceName, rArguments, rMediaDesc ); // finally, commit stream. @@ -1804,7 +1804,7 @@ void SAL_CALL OReportDefinition::load( const uno::Sequence< beans::PropertyValue size_t nFirstOpenMode = 0; if ( aArguments.has( "ReadOnly" ) ) { - sal_Bool bReadOnly = sal_False; + bool bReadOnly = false; aArguments.get_ensureType( "ReadOnly", bReadOnly ); nFirstOpenMode = bReadOnly ? 1 : 0; } @@ -1894,8 +1894,8 @@ sal_Bool SAL_CALL OReportDefinition::disableSetModified( ) throw (uno::RuntimeE ::osl::MutexGuard aGuard( m_aMutex ); ::connectivity::checkDisposed( ReportDefinitionBase::rBHelper.bDisposed ); - const sal_Bool bWasEnabled = m_pImpl->m_bSetModifiedEnabled; - m_pImpl->m_bSetModifiedEnabled = sal_False; + const bool bWasEnabled = m_pImpl->m_bSetModifiedEnabled; + m_pImpl->m_bSetModifiedEnabled = false; return bWasEnabled; } @@ -1904,8 +1904,8 @@ sal_Bool SAL_CALL OReportDefinition::enableSetModified( ) throw (uno::RuntimeEx ::osl::MutexGuard aGuard( m_aMutex ); ::connectivity::checkDisposed( ReportDefinitionBase::rBHelper.bDisposed ); - const sal_Bool bWasEnabled = m_pImpl->m_bSetModifiedEnabled; - m_pImpl->m_bSetModifiedEnabled = sal_True; + const bool bWasEnabled = m_pImpl->m_bSetModifiedEnabled; + m_pImpl->m_bSetModifiedEnabled = true; return bWasEnabled; } @@ -1935,7 +1935,7 @@ void SAL_CALL OReportDefinition::setModified( sal_Bool _bModified ) throw (beans if ( m_pImpl->m_pReportModel->IsReadOnly() && _bModified ) throw beans::PropertyVetoException(); - if ( m_pImpl->m_bModified != _bModified ) + if ( (m_pImpl->m_bModified ? 1 : 0) != _bModified ) { m_pImpl->m_bModified = _bModified; if ( ( m_pImpl->m_pReportModel->IsChanged() ? 1 : 0 ) != _bModified ) diff --git a/reportdesign/source/core/api/Section.cxx b/reportdesign/source/core/api/Section.cxx index 49f6fab4c3d4..747e30b7815a 100644 --- a/reportdesign/source/core/api/Section.cxx +++ b/reportdesign/source/core/api/Section.cxx @@ -117,12 +117,12 @@ OSection::OSection(const uno::Reference< report::XReportDefinition >& xParentDef ,m_nBackgroundColor(COL_TRANSPARENT) ,m_nForceNewPage(report::ForceNewPage::NONE) ,m_nNewRowOrCol(report::ForceNewPage::NONE) -,m_bKeepTogether(sal_False) +,m_bKeepTogether(false) ,m_bCanGrow(false) ,m_bCanShrink(false) -,m_bRepeatSection(sal_False) -,m_bVisible(sal_True) -,m_bBacktransparent(sal_True) +,m_bRepeatSection(false) +,m_bVisible(true) +,m_bBacktransparent(true) ,m_bInRemoveNotify(false) ,m_bInInsertNotify(false) { @@ -261,7 +261,7 @@ void SAL_CALL OSection::setHeight( ::sal_uInt32 _height ) throw (uno::RuntimeExc void SAL_CALL OSection::setBackColor( ::sal_Int32 _backgroundcolor ) throw (uno::RuntimeException, std::exception) { - sal_Bool bTransparent = _backgroundcolor == static_cast(COL_TRANSPARENT); + bool bTransparent = _backgroundcolor == static_cast(COL_TRANSPARENT); setBackTransparent(bTransparent); if ( !bTransparent ) set(PROPERTY_BACKCOLOR,_backgroundcolor,m_nBackgroundColor); diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx index c0cf7fce9b8e..17f67f9685d2 100644 --- a/reportdesign/source/core/api/Shape.cxx +++ b/reportdesign/source/core/api/Shape.cxx @@ -57,7 +57,7 @@ OShape::OShape(uno::Reference< uno::XComponentContext > const & _xContext) ,ShapePropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getShapeOptionals()) ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext) ,m_nZOrder(0) -,m_bOpaque(sal_False) +,m_bOpaque(false) { m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_SHAPE,m_aProps.aComponent.m_xContext->getServiceManager()); } @@ -70,7 +70,7 @@ OShape::OShape(uno::Reference< uno::XComponentContext > const & _xContext ,ShapePropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getShapeOptionals()) ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext) ,m_nZOrder(0) -,m_bOpaque(sal_False) +,m_bOpaque(false) ,m_sServiceName(_sServiceName) { m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_SHAPE,m_aProps.aComponent.m_xContext->getServiceManager()); diff --git a/reportdesign/source/core/inc/FixedText.hxx b/reportdesign/source/core/inc/FixedText.hxx index 66aec839ff7b..296f96ce5d32 100644 --- a/reportdesign/source/core/inc/FixedText.hxx +++ b/reportdesign/source/core/inc/FixedText.hxx @@ -65,6 +65,21 @@ namespace reportdesign } l.notify(); } + void set( const OUString& _sProperty + ,bool _Value + ,bool& _member) + { + BoundListeners l; + { + ::osl::MutexGuard aGuard(m_aMutex); + if ( _member != _Value ) + { + prepareSet(_sProperty, ::com::sun::star::uno::makeAny(_member), ::com::sun::star::uno::makeAny(_Value), &l); + _member = _Value; + } + } + l.notify(); + } void checkIndex(sal_Int32 _nIndex); protected: virtual ~OFixedText(); diff --git a/reportdesign/source/core/inc/FormatCondition.hxx b/reportdesign/source/core/inc/FormatCondition.hxx index d31c03bca277..3ab7246af03b 100644 --- a/reportdesign/source/core/inc/FormatCondition.hxx +++ b/reportdesign/source/core/inc/FormatCondition.hxx @@ -43,7 +43,7 @@ namespace reportdesign { OFormatProperties m_aFormatProperties; OUString m_sFormula; - sal_Bool m_bEnabled; + bool m_bEnabled; private: OFormatCondition(const OFormatCondition&); OFormatCondition& operator=(const OFormatCondition&); @@ -60,6 +60,18 @@ namespace reportdesign } l.notify(); } + void set( const OUString& _sProperty + ,bool _Value + ,bool& _member) + { + BoundListeners l; + { + ::osl::MutexGuard aGuard(m_aMutex); + prepareSet(_sProperty, ::com::sun::star::uno::makeAny(_member), ::com::sun::star::uno::makeAny(_Value), &l); + _member = _Value; + } + l.notify(); + } protected: virtual ~OFormatCondition(); public: diff --git a/reportdesign/source/core/inc/FormattedField.hxx b/reportdesign/source/core/inc/FormattedField.hxx index 0d9541332e32..bf8eb9a7869a 100644 --- a/reportdesign/source/core/inc/FormattedField.hxx +++ b/reportdesign/source/core/inc/FormattedField.hxx @@ -68,6 +68,21 @@ namespace reportdesign } l.notify(); } + void set( const OUString& _sProperty + ,bool _Value + ,bool& _member) + { + BoundListeners l; + { + ::osl::MutexGuard aGuard(m_aMutex); + if ( _member != _Value ) + { + prepareSet(_sProperty, ::com::sun::star::uno::makeAny(_member), ::com::sun::star::uno::makeAny(_Value), &l); + _member = _Value; + } + } + l.notify(); + } void checkIndex(sal_Int32 _nIndex); protected: virtual ~OFormattedField(); diff --git a/reportdesign/source/core/inc/Function.hxx b/reportdesign/source/core/inc/Function.hxx index d48c35cb7a1c..25ad9774af35 100644 --- a/reportdesign/source/core/inc/Function.hxx +++ b/reportdesign/source/core/inc/Function.hxx @@ -45,8 +45,8 @@ namespace reportdesign ::com::sun::star::uno::WeakReference< ::com::sun::star::report::XFunctions > m_xParent; OUString m_sName; OUString m_sFormula; - sal_Bool m_bPreEvaluated; - sal_Bool m_bDeepTraversing; + bool m_bPreEvaluated; + bool m_bDeepTraversing; private: OFunction(const OFunction&); OFunction& operator=(const OFunction&); @@ -63,6 +63,18 @@ namespace reportdesign } l.notify(); } + void set( const OUString& _sProperty + ,bool _Value + ,bool& _member) + { + BoundListeners l; + { + ::osl::MutexGuard aGuard(m_aMutex); + prepareSet(_sProperty, ::com::sun::star::uno::makeAny(_member), ::com::sun::star::uno::makeAny(_Value), &l); + _member = _Value; + } + l.notify(); + } protected: virtual ~OFunction(); public: diff --git a/reportdesign/source/core/inc/Group.hxx b/reportdesign/source/core/inc/Group.hxx index 1e198405d673..e103f51d449a 100644 --- a/reportdesign/source/core/inc/Group.hxx +++ b/reportdesign/source/core/inc/Group.hxx @@ -69,6 +69,21 @@ namespace reportdesign } l.notify(); } + void set( const OUString& _sProperty + ,bool _Value + ,bool& _member) + { + BoundListeners l; + { + ::osl::MutexGuard aGuard(m_aMutex); + if ( _member != _Value ) + { + prepareSet(_sProperty, ::com::sun::star::uno::makeAny(_member), ::com::sun::star::uno::makeAny(_Value), &l); + _member = _Value; + } + } + l.notify(); + } void setSection( const OUString& _sProperty ,const bool& _bOn ,const OUString& _sName diff --git a/reportdesign/source/core/inc/ImageControl.hxx b/reportdesign/source/core/inc/ImageControl.hxx index 4512f527d7c9..df06f1bcbe72 100644 --- a/reportdesign/source/core/inc/ImageControl.hxx +++ b/reportdesign/source/core/inc/ImageControl.hxx @@ -45,7 +45,7 @@ namespace reportdesign OReportControlModel m_aProps; OUString m_aImageURL; sal_Int16 m_nScaleMode; - sal_Bool m_bPreserveIRI; + bool m_bPreserveIRI; private: OImageControl(const OImageControl&); OImageControl& operator=(const OImageControl&); @@ -62,6 +62,18 @@ namespace reportdesign } l.notify(); } + void set( const OUString& _sProperty + ,bool _Value + ,bool& _member) + { + BoundListeners l; + { + ::osl::MutexGuard aGuard(m_aMutex); + prepareSet(_sProperty, ::com::sun::star::uno::makeAny(_member), ::com::sun::star::uno::makeAny(_Value), &l); + _member = _Value; + } + l.notify(); + } void checkIndex(sal_Int32 _nIndex); protected: virtual ~OImageControl(); diff --git a/reportdesign/source/core/inc/ReportComponent.hxx b/reportdesign/source/core/inc/ReportComponent.hxx index 15693988eeee..d9ca539465f2 100644 --- a/reportdesign/source/core/inc/ReportComponent.hxx +++ b/reportdesign/source/core/inc/ReportComponent.hxx @@ -56,7 +56,7 @@ namespace reportdesign ::sal_Int32 m_nPosY; ::sal_Int32 m_nBorderColor; ::sal_Int16 m_nBorder; - sal_Bool m_bPrintRepeatedValues; + bool m_bPrintRepeatedValues; OReportComponentProperties(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & _xContext ) diff --git a/reportdesign/source/core/inc/ReportControlModel.hxx b/reportdesign/source/core/inc/ReportControlModel.hxx index 0fecef6ff605..01be9afa06dc 100644 --- a/reportdesign/source/core/inc/ReportControlModel.hxx +++ b/reportdesign/source/core/inc/ReportControlModel.hxx @@ -67,13 +67,13 @@ namespace reportdesign ::sal_Int16 nCharCaseMap; ::sal_Int16 nCharKerning; ::sal_Int8 nCharEscapementHeight; - sal_Bool m_bBackgroundTransparent; - sal_Bool bCharFlash; - sal_Bool bCharAutoKerning; - sal_Bool bCharCombineIsOn; - sal_Bool bCharHidden; - sal_Bool bCharShadowed; - sal_Bool bCharContoured; + bool m_bBackgroundTransparent; + bool bCharFlash; + bool bCharAutoKerning; + bool bCharCombineIsOn; + bool bCharHidden; + bool bCharShadowed; + bool bCharContoured; OFormatProperties(); }; class OReportControlModel @@ -91,7 +91,7 @@ namespace reportdesign osl::Mutex& m_rMutex; OUString aDataField; OUString aConditionalPrintExpression; - sal_Bool bPrintWhenGroupChange; + bool bPrintWhenGroupChange; OReportControlModel(osl::Mutex& _rMutex ,::com::sun::star::container::XContainer* _pOwner diff --git a/reportdesign/source/core/inc/ReportHelperImpl.hxx b/reportdesign/source/core/inc/ReportHelperImpl.hxx index a8b173efa24e..269d9396aa23 100644 --- a/reportdesign/source/core/inc/ReportHelperImpl.hxx +++ b/reportdesign/source/core/inc/ReportHelperImpl.hxx @@ -158,7 +158,7 @@ void SAL_CALL clazz::setDetailFields( const ::com::sun::star::uno::Sequence< OUS \ void SAL_CALL clazz::setControlBackground( ::sal_Int32 _backgroundcolor ) throw (uno::RuntimeException, beans::UnknownPropertyException, std::exception)\ { \ - sal_Bool bTransparent = _backgroundcolor == static_cast(COL_TRANSPARENT);\ + bool bTransparent = _backgroundcolor == static_cast(COL_TRANSPARENT);\ setControlBackgroundTransparent(bTransparent);\ if ( !bTransparent )\ set(PROPERTY_CONTROLBACKGROUND,_backgroundcolor,varName.nBackgroundColor);\ diff --git a/reportdesign/source/core/inc/Section.hxx b/reportdesign/source/core/inc/Section.hxx index ffe330c64b1a..b0de3eccfdf0 100644 --- a/reportdesign/source/core/inc/Section.hxx +++ b/reportdesign/source/core/inc/Section.hxx @@ -66,12 +66,12 @@ namespace reportdesign ::sal_Int32 m_nBackgroundColor; ::sal_Int16 m_nForceNewPage; ::sal_Int16 m_nNewRowOrCol; - sal_Bool m_bKeepTogether; - bool m_bCanGrow; - bool m_bCanShrink; - sal_Bool m_bRepeatSection; - sal_Bool m_bVisible; - sal_Bool m_bBacktransparent; + bool m_bKeepTogether; + bool m_bCanGrow; + bool m_bCanShrink; + bool m_bRepeatSection; + bool m_bVisible; + bool m_bBacktransparent; bool m_bInRemoveNotify; bool m_bInInsertNotify; @@ -94,6 +94,21 @@ namespace reportdesign } l.notify(); } + void set( const OUString& _sProperty + ,bool _Value + ,bool& _member) + { + BoundListeners l; + { + ::osl::MutexGuard aGuard(m_aMutex); + if ( _member != _Value ) + { + prepareSet(_sProperty, ::com::sun::star::uno::makeAny(_member), ::com::sun::star::uno::makeAny(_Value), &l); + _member = _Value; + } + } + l.notify(); + } /** checks if this section is eiter the page header or footer and if so it throws an UnknownPropertyException * diff --git a/reportdesign/source/core/inc/Shape.hxx b/reportdesign/source/core/inc/Shape.hxx index 42a519af920d..63f9ebf0c19b 100644 --- a/reportdesign/source/core/inc/Shape.hxx +++ b/reportdesign/source/core/inc/Shape.hxx @@ -47,8 +47,8 @@ namespace reportdesign ::std::auto_ptr< ::comphelper::OPropertyArrayAggregationHelper> m_pAggHelper; OReportControlModel m_aProps; com::sun::star::drawing::HomogenMatrix3 m_Transformation; - sal_Int32 m_nZOrder; - sal_Bool m_bOpaque; + sal_Int32 m_nZOrder; + bool m_bOpaque; OUString m_sServiceName; OUString m_CustomShapeEngine; @@ -72,6 +72,18 @@ namespace reportdesign } l.notify(); } + void set( const OUString& _sProperty + ,bool _Value + ,bool& _member) + { + BoundListeners l; + { + ::osl::MutexGuard aGuard(m_aMutex); + prepareSet(_sProperty, ::com::sun::star::uno::makeAny(_member), ::com::sun::star::uno::makeAny(_Value), &l); + _member = _Value; + } + l.notify(); + } void checkIndex(sal_Int32 _nIndex); cppu::IPropertyArrayHelper& getInfoHelper(); protected: diff --git a/reportdesign/source/inc/GroupProperties.hxx b/reportdesign/source/inc/GroupProperties.hxx index 2dd5a2647564..a824edfec8a3 100644 --- a/reportdesign/source/inc/GroupProperties.hxx +++ b/reportdesign/source/inc/GroupProperties.hxx @@ -29,9 +29,9 @@ namespace rptshared OUString m_sExpression; sal_Int16 m_nGroupOn; sal_Int16 m_nKeepTogether; - sal_Bool m_eSortAscending; - sal_Bool m_bStartNewColumn; - sal_Bool m_bResetPageNumber; + bool m_eSortAscending; + bool m_bStartNewColumn; + bool m_bResetPageNumber; GroupProperties() :m_nGroupInterval(1) diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx index fd2fbbf03152..68625d9d3782 100644 --- a/reportdesign/source/ui/dlg/Navigator.cxx +++ b/reportdesign/source/ui/dlg/Navigator.cxx @@ -262,7 +262,7 @@ NavigatorTree::~NavigatorTree() void NavigatorTree::Command( const CommandEvent& rEvt ) { - sal_Bool bHandled = sal_False; + bool bHandled = false; switch( rEvt.GetCommand() ) { case COMMAND_CONTEXTMENU: @@ -294,7 +294,7 @@ void NavigatorTree::Command( const CommandEvent& rEvt ) uno::Reference< report::XFunctionsSupplier> xSupplier(pData->getContent(),uno::UNO_QUERY); uno::Reference< report::XFunctions> xFunctions(pData->getContent(),uno::UNO_QUERY); uno::Reference< report::XGroup> xGroup(pData->getContent(),uno::UNO_QUERY); - sal_Bool bDeleteAllowed = m_rController.isEditable() && (xGroup.is() || + bool bDeleteAllowed = m_rController.isEditable() && (xGroup.is() || uno::Reference< report::XFunction>(pData->getContent(),uno::UNO_QUERY).is()); PopupMenu aContextMenu( ModuleRes( RID_MENU_NAVIGATOR ) ); @@ -306,7 +306,7 @@ void NavigatorTree::Command( const CommandEvent& rEvt ) sal_uInt16 nId = aContextMenu.GetItemId(i); aContextMenu.CheckItem(nId,m_rController.isCommandChecked(nId)); - sal_Bool bEnabled = m_rController.isCommandEnabled(nId); + bool bEnabled = m_rController.isCommandEnabled(nId); if ( nId == SID_RPT_NEW_FUNCTION ) aContextMenu.EnableItem(nId,m_rController.isEditable() && (xSupplier.is() || xFunctions.is()) ); // special condition, check for function and group @@ -336,7 +336,7 @@ void NavigatorTree::Command( const CommandEvent& rEvt ) m_rController.executeUnChecked(nId,aArgs); } - bHandled = sal_True; + bHandled = true; } break; } @@ -647,7 +647,7 @@ void NavigatorTree::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) uno::Reference< report::XReportDefinition> xReport(_rEvent.Source,uno::UNO_QUERY); if ( xReport.is() ) { - sal_Bool bEnabled = sal_False; + bool bEnabled = false; _rEvent.NewValue >>= bEnabled; if ( bEnabled ) { diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index d96652fd9777..e4fd4e0fe502 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -985,7 +985,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); - sal_Bool bForceBroadcast = sal_False; + bool bForceBroadcast = false; switch(_nId) { case SID_RPT_TEXTDOCUMENT: @@ -1420,7 +1420,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > if (aArgs.getLength() == 1 ) aArgs[0].Value >>= xSection; openPageDialog(xSection); - bForceBroadcast = sal_True; + bForceBroadcast = true; } break; case SID_SORTINGANDGROUPING: @@ -1438,7 +1438,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > xSection->setBackColor( aColor ); } } - bForceBroadcast = sal_True; + bForceBroadcast = true; } break; case SID_ATTR_CHAR_WEIGHT: @@ -1466,7 +1466,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > const SequenceAsHashMap aMap(aArgs); const util::Color aColor = aMap.getUnpackedValueOrDefault(PROPERTY_FONTCOLOR,util::Color()); impl_setPropertyAtControls_throw(RID_STR_UNDO_CHANGEFONT,PROPERTY_CHARCOLOR,uno::makeAny(aColor),aArgs); - bForceBroadcast = sal_True; + bForceBroadcast = true; } break; case SID_ATTR_CHAR_FONT: @@ -2191,7 +2191,7 @@ void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEven ::osl::MutexGuard aGuard( getMutex() ); try { - sal_Bool bShow = sal_False; + bool bShow = false; evt.NewValue >>= bShow; if ( evt.Source == m_xReportDefinition ) { @@ -2484,7 +2484,7 @@ void OReportController::openPageDialog(const uno::Reference& _ if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_PAGE,true,&pItem)) { const SvxPageItem* pPageItem = static_cast(pItem); - xProp->setPropertyValue(PROPERTY_ISLANDSCAPE,uno::makeAny(static_cast(pPageItem->IsLandscape()))); + xProp->setPropertyValue(PROPERTY_ISLANDSCAPE,uno::makeAny(pPageItem->IsLandscape())); xProp->setPropertyValue(PROPERTY_NUMBERINGTYPE,uno::makeAny(static_cast(pPageItem->GetNumType()))); uno::Any aValue; pPageItem->QueryValue(aValue,MID_PAGE_LAYOUT); @@ -3018,7 +3018,7 @@ void OReportController::insertGraphic() if ( ERRCODE_NONE == aDialog.Execute() ) { - sal_Bool bLink = sal_True; + bool bLink = true; xController->getValue( ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, 0) >>= bLink; uno::Sequence aArgs(2); aArgs[0].Name = PROPERTY_IMAGEURL; @@ -3042,7 +3042,7 @@ void OReportController::insertGraphic() sal_Bool SAL_CALL OReportController::select( const Any& aSelection ) throw (IllegalArgumentException, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( getMutex() ); - sal_Bool bRet = sal_True; + bool bRet = true; if ( getDesignView() ) { getDesignView()->unmarkAllObjects(NULL); @@ -3250,13 +3250,13 @@ void OReportController::createDateTime(const Sequence< PropertyValue >& _aArgs) uno::Reference< report::XSection> xSection = aMap.getUnpackedValueOrDefault(PROPERTY_SECTION,uno::Reference< report::XSection>()); OUString sFunction; - sal_Bool bDate = aMap.getUnpackedValueOrDefault(PROPERTY_DATE_STATE,sal_False); + bool bDate = aMap.getUnpackedValueOrDefault(PROPERTY_DATE_STATE,sal_False); if ( bDate ) { sFunction = "TODAY()"; createControl(aMap.getAsConstPropertyValueList(),xSection,sFunction); } - sal_Bool bTime = aMap.getUnpackedValueOrDefault(PROPERTY_TIME_STATE,sal_False); + bool bTime = aMap.getUnpackedValueOrDefault(PROPERTY_TIME_STATE,sal_False); if ( bTime ) { sFunction = "TIMEVALUE(NOW())"; @@ -3279,7 +3279,7 @@ void OReportController::createPageNumber(const Sequence< PropertyValue >& _aArgs } SequenceAsHashMap aMap(_aArgs); - sal_Bool bStateOfPage = aMap.getUnpackedValueOrDefault(PROPERTY_STATE,sal_False); + bool bStateOfPage = aMap.getUnpackedValueOrDefault(PROPERTY_STATE,sal_False); OUString sFunction( ModuleRes(STR_RPT_PN_PAGE).toString() ); sFunction = sFunction.replaceFirst("#PAGENUMBER#", "PageNumber()"); @@ -3290,7 +3290,7 @@ void OReportController::createPageNumber(const Sequence< PropertyValue >& _aArgs sFunction = sFunction.replaceFirst("#PAGECOUNT#", "PageCount()"); } - sal_Bool bInPageHeader = aMap.getUnpackedValueOrDefault(PROPERTY_PAGEHEADERON,sal_True); + bool bInPageHeader = aMap.getUnpackedValueOrDefault(PROPERTY_PAGEHEADERON,sal_True); createControl(_aArgs,bInPageHeader ? m_xReportDefinition->getPageHeader() : m_xReportDefinition->getPageFooter(),sFunction); } @@ -3343,7 +3343,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) // LLA: new feature, add the Label in dependency of the given DND_ACTION one section up, normal or one section down sal_Int8 nDNDAction = aMap.getUnpackedValueOrDefault("DNDAction", sal_Int8(0)); pSectionWindow[1] = pSectionWindow[0]; - sal_Bool bLabelAboveTextField = nDNDAction == DND_ACTION_COPY; + bool bLabelAboveTextField = nDNDAction == DND_ACTION_COPY; if ( bLabelAboveTextField || nDNDAction == DND_ACTION_LINK ) { // Add the Label one Section up @@ -3902,7 +3902,7 @@ void OReportController::createGroupSection(const bool _bUndo,const bool _bHeader if ( m_xReportDefinition.is() ) { const SequenceAsHashMap aMap(_aArgs); - const sal_Bool bSwitchOn = aMap.getUnpackedValueOrDefault(_bHeader ? OUString(PROPERTY_HEADERON) : OUString(PROPERTY_FOOTERON), sal_False); + const bool bSwitchOn = aMap.getUnpackedValueOrDefault(_bHeader ? OUString(PROPERTY_HEADERON) : OUString(PROPERTY_FOOTERON), sal_False); uno::Reference< report::XGroup> xGroup = aMap.getUnpackedValueOrDefault(PROPERTY_GROUP,uno::Reference< report::XGroup>()); if ( xGroup.is() ) { @@ -3996,7 +3996,7 @@ void OReportController::checkChartEnabled() ::utl::OConfigurationTreeRoot aConfiguration( ::utl::OConfigurationTreeRoot::createWithComponentContext( m_xContext, sConfigName ) ); - sal_Bool bChartEnabled = sal_False; + bool bChartEnabled = false; if ( aConfiguration.hasByHierarchicalName(sPropertyName) ) aConfiguration.getNodeValue( sPropertyName ) >>= bChartEnabled; m_bChartEnabled = bChartEnabled; diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx index 58abafba5c06..13cd591e3097 100644 --- a/reportdesign/source/ui/report/ReportControllerObserver.cxx +++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx @@ -55,7 +55,7 @@ public: ::std::vector< uno::Reference< container::XChild> > m_aSections; ::osl::Mutex m_aMutex; oslInterlockedCount m_nLocks; - sal_Bool m_bReadOnly; + bool m_bReadOnly; OXReportControllerObserverImpl(const OReportController& _rController); ~OXReportControllerObserverImpl(); @@ -66,7 +66,7 @@ public: OXReportControllerObserverImpl::OXReportControllerObserverImpl(const OReportController& _rController) :m_rReportController(_rController) ,m_nLocks(0) - ,m_bReadOnly(sal_False) + ,m_bReadOnly(false) { } diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 5eb799853347..6ea7f946ecb5 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -622,7 +622,7 @@ void OReportSection::createDefault(const OUString& _sType) void OReportSection::createDefault(const OUString& _sType,SdrObject* _pObj) { - sal_Bool bAttributesAppliedFromGallery = sal_False; + bool bAttributesAppliedFromGallery = false; if ( GalleryExplorer::GetSdrObjCount( GALLERY_THEME_POWERPOINT ) ) { @@ -666,7 +666,7 @@ void OReportSection::createDefault(const OUString& _sType,SdrObject* _pObj) double a = nAngle * F_PI18000; _pObj->NbcRotate( _pObj->GetSnapRect().Center(), nAngle, sin( a ), cos( a ) ); } - bAttributesAppliedFromGallery = sal_True; + bAttributesAppliedFromGallery = true; } } break; diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 779a410d69cc..c0b6c53ce9c8 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -288,7 +288,7 @@ IMPL_LINK( OSectionWindow, Collapsed, OColorListener *, _pMarker ) { if ( _pMarker ) { - sal_Bool bShow = !_pMarker->isCollapsed(); + bool bShow = !_pMarker->isCollapsed(); m_aReportSection.Show(bShow); m_aEndMarker.Show(bShow); m_aSplitter.Show(bShow); -- cgit