diff options
author | Noel Power <noel.power@suse.com> | 2013-04-24 11:36:34 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-04-26 15:30:35 +0100 |
commit | 1bbf62198c9118961024aba482e8f600cde22007 (patch) | |
tree | aa64315367dcf94253f7b58eacdf3b8b539da4ee /vbahelper | |
parent | 018752d1f6c90ac2fc6fd89b105d2dfe7ca3c666 (diff) |
support Shape.Alternative
Change-Id: I0679ee479ee8b75726a4d2fee7350803b852fbc8
Diffstat (limited to 'vbahelper')
-rw-r--r-- | vbahelper/inc/vbahelper/vbashape.hxx | 2 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbashape.cxx | 16 |
2 files changed, 18 insertions, 0 deletions
diff --git a/vbahelper/inc/vbahelper/vbashape.hxx b/vbahelper/inc/vbahelper/vbashape.hxx index 423807229ef3..0f5b8153ad35 100644 --- a/vbahelper/inc/vbahelper/vbashape.hxx +++ b/vbahelper/inc/vbahelper/vbashape.hxx @@ -62,6 +62,8 @@ public: // Attributes virtual rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException); virtual void SAL_CALL setName( const rtl::OUString& _name ) throw (css::uno::RuntimeException); + virtual rtl::OUString SAL_CALL getAlternativeText() throw (css::uno::RuntimeException); + virtual void SAL_CALL setAlternativeText( const rtl::OUString& _name ) throw (css::uno::RuntimeException); virtual double SAL_CALL getHeight() throw (css::uno::RuntimeException); virtual void SAL_CALL setHeight( double _height ) throw (css::uno::RuntimeException); virtual double SAL_CALL getWidth() throw (css::uno::RuntimeException); diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx index bd7458e21309..55795bcc2c8f 100644 --- a/vbahelper/source/vbahelper/vbashape.cxx +++ b/vbahelper/source/vbahelper/vbashape.cxx @@ -167,6 +167,22 @@ ScVbaShape::setName( const OUString& _name ) throw (uno::RuntimeException) xNamed->setName( _name ); } +OUString SAL_CALL +ScVbaShape::getAlternativeText() throw (uno::RuntimeException) +{ + OUString sAltText; + uno::Reference< beans::XPropertySet > xProps( m_xShape, uno::UNO_QUERY_THROW ); + xProps->getPropertyValue( OUString( "Title" ) ) >>= sAltText; + return sAltText; +} + +void SAL_CALL +ScVbaShape::setAlternativeText( const OUString& sAltText ) throw (uno::RuntimeException) +{ + uno::Reference< beans::XPropertySet > xProps( m_xShape, uno::UNO_QUERY_THROW ); + xProps->setPropertyValue( OUString( "Title" ), uno::Any( sAltText ) ); +} + double SAL_CALL ScVbaShape::getHeight() throw (uno::RuntimeException) { |