summaryrefslogtreecommitdiff
path: root/svx/source/accessibility
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-11-26 17:11:49 +0000
committerRüdiger Timm <rt@openoffice.org>2004-11-26 17:11:49 +0000
commit0ce23526131ff4bafea336ea0cfe161a4ac1ed89 (patch)
tree0af24cb16fc0b4aefa315592fae3b354631d9555 /svx/source/accessibility
parent7da0d687a3aa382dc2732a747fd7d3193af18a01 (diff)
INTEGRATION: CWS presentationengine01 (1.12.432); FILE MERGED
2004/11/18 13:13:14 thb 1.12.432.2: #i10000# File merged, but not committed 2004/07/05 13:10:01 cl 1.12.432.1: smile
Diffstat (limited to 'svx/source/accessibility')
-rwxr-xr-xsvx/source/accessibility/ShapeTypeHandler.cxx110
1 files changed, 108 insertions, 2 deletions
diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx
index 3a5b95fd40ac..73fef1cbcf12 100755
--- a/svx/source/accessibility/ShapeTypeHandler.cxx
+++ b/svx/source/accessibility/ShapeTypeHandler.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ShapeTypeHandler.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: vg $ $Date: 2003-04-24 16:57:01 $
+ * last change: $Author: rt $ $Date: 2004-11-26 18:11:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,6 +76,11 @@
#include <vcl/svapp.hxx>
#endif
+#ifndef _SVX_DIALMGR_HXX
+#include "dialmgr.hxx"
+#endif
+#include "svdstr.hrc"
+
using namespace ::rtl;
using namespace ::com::sun::star;
@@ -293,4 +298,105 @@ long ShapeTypeHandler::GetSlotId (const uno::Reference<drawing::XShape>& rxShape
return 0;
}
+/// get the accessible base name for an object
+::rtl::OUString
+ ShapeTypeHandler::CreateAccessibleBaseName (const uno::Reference<drawing::XShape>& rxShape)
+ throw (::com::sun::star::uno::RuntimeException)
+{
+ sal_Int32 nResourceId;
+ OUString sName;
+
+ switch (ShapeTypeHandler::Instance().GetTypeId (rxShape))
+ {
+ // case DRAWING_3D_POLYGON: was removed in original code in
+ // AccessibleShape::CreateAccessibleBaseName. See issue 11190 for details.
+ // Id can be removed from SvxShapeTypes.hxx as well.
+ case DRAWING_3D_CUBE:
+ nResourceId = STR_ObjNameSingulCube3d;
+ break;
+ case DRAWING_3D_EXTRUDE:
+ nResourceId = STR_ObjNameSingulExtrude3d;
+ break;
+ case DRAWING_3D_LATHE:
+ nResourceId = STR_ObjNameSingulLathe3d;
+ break;
+ case DRAWING_3D_SCENE:
+ nResourceId = STR_ObjNameSingulScene3d;
+ break;
+ case DRAWING_3D_SPHERE:
+ nResourceId = STR_ObjNameSingulSphere3d;
+ break;
+ case DRAWING_CAPTION:
+ nResourceId = STR_ObjNameSingulCAPTION;
+ break;
+ case DRAWING_CLOSED_BEZIER:
+ nResourceId = STR_ObjNameSingulPATHFILL;
+ break;
+ case DRAWING_CLOSED_FREEHAND:
+ nResourceId = STR_ObjNameSingulFREEFILL;
+ break;
+ case DRAWING_CONNECTOR:
+ nResourceId = STR_ObjNameSingulEDGE;
+ break;
+ case DRAWING_CONTROL:
+ nResourceId = STR_ObjNameSingulUno;
+ break;
+ case DRAWING_ELLIPSE:
+ nResourceId = STR_ObjNameSingulCIRCE;
+ break;
+ case DRAWING_GROUP:
+ nResourceId = STR_ObjNameSingulGRUP;
+ break;
+ case DRAWING_LINE:
+ nResourceId = STR_ObjNameSingulLINE;
+ break;
+ case DRAWING_MEASURE:
+ nResourceId = STR_ObjNameSingulMEASURE;
+ break;
+ case DRAWING_OPEN_BEZIER:
+ nResourceId = STR_ObjNameSingulPATHLINE;
+ break;
+ case DRAWING_OPEN_FREEHAND:
+ nResourceId = STR_ObjNameSingulFREELINE;
+ break;
+ case DRAWING_PAGE:
+ nResourceId = STR_ObjNameSingulPAGE;
+ break;
+ case DRAWING_POLY_LINE:
+ nResourceId = STR_ObjNameSingulPLIN;
+ break;
+ case DRAWING_POLY_LINE_PATH:
+ nResourceId = STR_ObjNameSingulPLIN;
+ break;
+ case DRAWING_POLY_POLYGON:
+ nResourceId = STR_ObjNameSingulPOLY;
+ break;
+ case DRAWING_POLY_POLYGON_PATH:
+ nResourceId = STR_ObjNameSingulPOLY;
+ break;
+ case DRAWING_RECTANGLE:
+ nResourceId = STR_ObjNameSingulRECT;
+ break;
+ case DRAWING_TEXT:
+ nResourceId = STR_ObjNameSingulTEXT;
+ break;
+ default:
+ nResourceId = -1;
+ sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("UnknownAccessibleShape"));
+ uno::Reference<drawing::XShapeDescriptor> xDescriptor (rxShape, uno::UNO_QUERY);
+ if (xDescriptor.is())
+ sName += ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM(": "))
+ + xDescriptor->getShapeType();
+ break;
+ }
+
+ if (nResourceId != -1)
+ {
+ ::vos::OGuard aGuard (::Application::GetSolarMutex());
+ sName = OUString (SVX_RESSTR((unsigned short)nResourceId));
+ }
+
+ return sName;
+}
+
} // end of namespace accessibility