Kaydet (Commit) a7cc0fae authored tarafından Noel Power's avatar Noel Power

support Shape.Alternative

Change-Id: I6d822ef0d06e222f454c1279be16e33bcaae0037
üst ca3447ea
...@@ -62,6 +62,8 @@ public: ...@@ -62,6 +62,8 @@ public:
// Attributes // Attributes
virtual OUString SAL_CALL getName() throw (css::uno::RuntimeException); virtual OUString SAL_CALL getName() throw (css::uno::RuntimeException);
virtual void SAL_CALL setName( const OUString& _name ) throw (css::uno::RuntimeException); virtual void SAL_CALL setName( const OUString& _name ) throw (css::uno::RuntimeException);
virtual OUString SAL_CALL getAlternativeText() throw (css::uno::RuntimeException);
virtual void SAL_CALL setAlternativeText( const OUString& _name ) throw (css::uno::RuntimeException);
virtual double SAL_CALL getHeight() 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 void SAL_CALL setHeight( double _height ) throw (css::uno::RuntimeException);
virtual double SAL_CALL getWidth() throw (css::uno::RuntimeException); virtual double SAL_CALL getWidth() throw (css::uno::RuntimeException);
......
...@@ -28,6 +28,7 @@ interface XShapeRange; ...@@ -28,6 +28,7 @@ interface XShapeRange;
interface XShape : ooo::vba::XHelperInterface interface XShape : ooo::vba::XHelperInterface
{ {
[attribute] string Name; [attribute] string Name;
[attribute] string AlternativeText;
[attribute] double Height; [attribute] double Height;
[attribute] double Width; [attribute] double Width;
[attribute] double Left; [attribute] double Left;
......
...@@ -167,6 +167,22 @@ ScVbaShape::setName( const OUString& _name ) throw (uno::RuntimeException) ...@@ -167,6 +167,22 @@ ScVbaShape::setName( const OUString& _name ) throw (uno::RuntimeException)
xNamed->setName( _name ); 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 double SAL_CALL
ScVbaShape::getHeight() throw (uno::RuntimeException) ScVbaShape::getHeight() throw (uno::RuntimeException)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment