summaryrefslogtreecommitdiff
path: root/sw/source/core/access/accgraphic.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/access/accgraphic.cxx')
-rw-r--r--sw/source/core/access/accgraphic.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/core/access/accgraphic.cxx b/sw/source/core/access/accgraphic.cxx
index d5abfff1efed..cc5b63d8aab2 100644
--- a/sw/source/core/access/accgraphic.cxx
+++ b/sw/source/core/access/accgraphic.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/uno/RuntimeException.hpp>
#include <comphelper/servicehelper.hxx>
#include <flyfrm.hxx>
+#include <fmturl.hxx>
#include "accgraphic.hxx"
using namespace ::com::sun::star;
@@ -80,4 +81,15 @@ Sequence< sal_Int8 > SAL_CALL SwAccessibleGraphic::getImplementationId()
return theSwAccessibleGraphicImplementationId::get().getSeq();
}
+// Return this object's role.
+sal_Int16 SAL_CALL SwAccessibleGraphic::getAccessibleRole (void)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ SwFmtURL aURL( ((SwLayoutFrm*)GetFrm())->GetFmt()->GetURL() );
+
+ if (aURL.GetMap())
+ return AccessibleRole::IMAGE_MAP ;
+ return AccessibleRole::GRAPHIC ;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */