diff options
Diffstat (limited to 'extensions/source/propctrlr/formgeometryhandler.cxx')
-rw-r--r-- | extensions/source/propctrlr/formgeometryhandler.cxx | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx index 8f7c04677538..b07cd7eb145e 100644 --- a/extensions/source/propctrlr/formgeometryhandler.cxx +++ b/extensions/source/propctrlr/formgeometryhandler.cxx @@ -41,9 +41,11 @@ #include <cppuhelper/implbase.hxx> #include <cppuhelper/interfacecontainer.hxx> +#include <comphelper/interfacecontainer2.hxx> #include <comphelper/componentbase.hxx> #include <rtl/ref.hxx> -#include <tools/diagnose_ex.h> +#include <utility> +#include <comphelper/diagnose_ex.hxx> namespace pcr { @@ -57,7 +59,6 @@ namespace pcr using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::RuntimeException; using ::com::sun::star::uno::Any; - using ::com::sun::star::uno::makeAny; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::XComponentContext; using ::com::sun::star::beans::Property; @@ -134,7 +135,6 @@ namespace pcr ShapeGeometryChangeNotifier( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rParentMutex, const Reference< XShape >& _shape ) :BroadcastHelperBase( _rParentMutex ) ,ShapeGeometryChangeNotifier_CBase( BroadcastHelperBase::getBroadcastHelper(), ::comphelper::ComponentBase::NoInitializationNeeded() ) - ,ShapeGeometryChangeNotifier_IBase() ,m_rParent( _rParent ) ,m_aPropertyChangeListeners( _rParentMutex ) ,m_xShape( _shape ) @@ -161,12 +161,12 @@ namespace pcr } // XInterface - virtual void SAL_CALL acquire( ) throw () override + virtual void SAL_CALL acquire( ) noexcept override { m_rParent.acquire(); } - virtual void SAL_CALL release( ) throw () override + virtual void SAL_CALL release( ) noexcept override { m_rParent.release(); } @@ -306,7 +306,7 @@ namespace pcr Reference< XMap > xControlMap; Any any = m_xContext->getValueByName( "ControlShapeAccess" ); any >>= xControlMap; - m_xAssociatedShape.set( xControlMap->get( makeAny( xControlModel ) ), UNO_QUERY_THROW ); + m_xAssociatedShape.set( xControlMap->get( Any( xControlModel ) ), UNO_QUERY_THROW ); m_xShapeProperties.set( m_xAssociatedShape, UNO_QUERY_THROW ); } } @@ -317,7 +317,7 @@ namespace pcr } if ( m_xAssociatedShape.is() ) - m_xChangeNotifier = new ShapeGeometryChangeNotifier( *this, m_aMutex, m_xAssociatedShape.get() ); + m_xChangeNotifier = new ShapeGeometryChangeNotifier( *this, m_aMutex, m_xAssociatedShape ); } @@ -640,7 +640,7 @@ namespace pcr continue; sal_Int32 nHeightOrWidth( 0 ); - OSL_VERIFY( xRowOrColumn->getPropertyValue( _bRows ? OUString(PROPERTY_HEIGHT) : OUString(PROPERTY_WIDTH) ) >>= nHeightOrWidth ); + OSL_VERIFY( xRowOrColumn->getPropertyValue( _bRows ? PROPERTY_HEIGHT : PROPERTY_WIDTH ) >>= nHeightOrWidth ); if ( nAccumulated + nHeightOrWidth > rRelativePos ) break; @@ -671,7 +671,7 @@ namespace pcr if ( xSheet.is() ) { css::awt::Point aPreservePosition( m_xAssociatedShape->getPosition() ); - m_xShapeProperties->setPropertyValue( PROPERTY_ANCHOR, makeAny( xSheet ) ); + m_xShapeProperties->setPropertyValue( PROPERTY_ANCHOR, Any( xSheet ) ); m_xAssociatedShape->setPosition( aPreservePosition ); } break; @@ -689,10 +689,10 @@ namespace pcr css::awt::Point aRelativePosition( m_xAssociatedShape->getPosition() ); Reference< XTableColumns > xCols( xColsRows->getColumns(), UNO_SET_THROW ); - sal_Int32 nNewAnchorCol = lcl_getLowerBoundRowOrColumn( xCols.get(), false, aRelativePosition ); + sal_Int32 nNewAnchorCol = lcl_getLowerBoundRowOrColumn( xCols, false, aRelativePosition ); Reference< XTableRows > xRows( xColsRows->getRows(), UNO_SET_THROW ); - sal_Int32 nNewAnchorRow = lcl_getLowerBoundRowOrColumn( xRows.get(), true, aRelativePosition ); + sal_Int32 nNewAnchorRow = lcl_getLowerBoundRowOrColumn( xRows, true, aRelativePosition ); Any aNewAnchorCell( xSheet->getCellByPosition( nNewAnchorCol, nNewAnchorRow ) ); m_xShapeProperties->setPropertyValue( PROPERTY_ANCHOR, aNewAnchorCell ); @@ -720,9 +720,9 @@ namespace pcr OUString sPropertyName; Any aNewPropertyValue; - EventTranslation( const OUString& _propertyName, const Any& _newPropertyValue ) - :sPropertyName( _propertyName ) - ,aNewPropertyValue( _newPropertyValue ) + EventTranslation( OUString _propertyName, Any _newPropertyValue ) + :sPropertyName(std::move( _propertyName )) + ,aNewPropertyValue(std::move( _newPropertyValue )) { } }; @@ -739,22 +739,22 @@ namespace pcr if ( _event.PropertyName == "Position" ) { css::awt::Point aPos = m_xShape->getPosition(); - aEventTranslations.push_back( EventTranslation( PROPERTY_POSITIONX, makeAny( aPos.X ) ) ); - aEventTranslations.push_back( EventTranslation( PROPERTY_POSITIONY, makeAny( aPos.Y ) ) ); + aEventTranslations.emplace_back(PROPERTY_POSITIONX, Any( aPos.X )); + aEventTranslations.emplace_back(PROPERTY_POSITIONY, Any( aPos.Y )); } else if ( _event.PropertyName == "Size" ) { css::awt::Size aSize = m_xShape->getSize(); - aEventTranslations.push_back( EventTranslation( PROPERTY_WIDTH, makeAny( aSize.Width ) ) ); - aEventTranslations.push_back( EventTranslation( PROPERTY_HEIGHT, makeAny( aSize.Height ) ) ); + aEventTranslations.emplace_back(PROPERTY_WIDTH, Any( aSize.Width )); + aEventTranslations.emplace_back(PROPERTY_HEIGHT, Any( aSize.Height )); } else if ( _event.PropertyName == PROPERTY_ANCHOR_TYPE ) { - aEventTranslations.push_back( EventTranslation( PROPERTY_TEXT_ANCHOR_TYPE, _event.NewValue ) ); + aEventTranslations.emplace_back(PROPERTY_TEXT_ANCHOR_TYPE, _event.NewValue); } else if ( _event.PropertyName == PROPERTY_ANCHOR ) { - aEventTranslations.push_back( EventTranslation( PROPERTY_SHEET_ANCHOR_TYPE, _event.NewValue ) ); + aEventTranslations.emplace_back(PROPERTY_SHEET_ANCHOR_TYPE, _event.NewValue); } PropertyChangeEvent aTranslatedEvent( _event ); |