Commits

lihui  committed cd53292

Fix for issue: 114510

  • Participants
  • Parent commits 9709bb0

Comments (0)

Files changed (3)

File oovbaapi/ooo/vba/msforms/XShape.idl

 interface XShape : ooo::vba::XHelperInterface
 {
     [attribute] string Name;
+    [attribute] string AlternativeText;
     [attribute] double Height;
     [attribute] double Width;
     [attribute] double Left;

File vbahelper/inc/vbahelper/vbashape.hxx

     // 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& _alternativetext ) 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);

File vbahelper/source/vbahelper/vbashape.cxx

     xNamed->setName( _name );
 }
 
+rtl::OUString SAL_CALL ScVbaShape::getAlternativeText() throw (uno::RuntimeException)
+{
+    rtl::OUString sAlternativeText;
+    try
+    {
+        uno::Any aAlternativeText = m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "Title" ) );
+        aAlternativeText >>= sAlternativeText;
+    }
+    catch( uno::Exception& )
+    {
+    }
+    return sAlternativeText;
+}
+
+void SAL_CALL ScVbaShape::setAlternativeText( const rtl::OUString& _alternativetext ) throw (uno::RuntimeException)
+{
+    try
+    {
+        m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "Title" ), uno::makeAny( _alternativetext ) );
+    }
+    catch( uno::Exception& )
+    {
+    }
+}
+
 double SAL_CALL 
 ScVbaShape::getHeight() throw (uno::RuntimeException)
 {