1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: SvxShapeTypes.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_svx.hxx"
34 #include <svx/SvxShapeTypes.hxx>
35 #include <svx/AccessibleShape.hxx>
36 #include <svx/AccessibleGraphicShape.hxx>
37 #include <svx/AccessibleOLEShape.hxx>
38 #include <svx/AccessibleControlShape.hxx>
39 #include <svx/AccessibleTableShape.hxx>
41 namespace accessibility
{
43 AccessibleShape
* CreateSvxAccessibleShape (
44 const AccessibleShapeInfo
& rShapeInfo
,
45 const AccessibleShapeTreeInfo
& rShapeTreeInfo
,
51 case DRAWING_3D_EXTRUDE
:
52 case DRAWING_3D_LATHE
:
53 case DRAWING_3D_SCENE
:
54 case DRAWING_3D_SPHERE
:
56 case DRAWING_CLOSED_BEZIER
:
57 case DRAWING_CLOSED_FREEHAND
:
58 case DRAWING_CONNECTOR
:
63 case DRAWING_OPEN_BEZIER
:
64 case DRAWING_OPEN_FREEHAND
:
66 case DRAWING_POLY_POLYGON
:
67 case DRAWING_POLY_LINE
:
68 case DRAWING_POLY_POLYGON_PATH
:
69 case DRAWING_POLY_LINE_PATH
:
70 case DRAWING_RECTANGLE
:
72 // --> OD 2004-11-29 #i37790# - default accessiblility shape for
73 // com::sun::star::drawing::CustomShape
76 // --> OD 2008-05-19 #i85429# - default accessiblility shape for
77 // com::sun::star::drawing::MediaShape
80 return new AccessibleShape (rShapeInfo
, rShapeTreeInfo
);
83 return new AccessibleControlShape (rShapeInfo
, rShapeTreeInfo
);
85 case DRAWING_GRAPHIC_OBJECT
:
86 return new AccessibleGraphicShape (rShapeInfo
, rShapeTreeInfo
);
92 return new AccessibleOLEShape (rShapeInfo
, rShapeTreeInfo
);
95 return new AccessibleTableShape( rShapeInfo
, rShapeTreeInfo
);
104 ShapeTypeDescriptor aSvxShapeTypeList
[] = {
105 ShapeTypeDescriptor (DRAWING_TEXT
,
106 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.TextShape"),
107 CreateSvxAccessibleShape
),
108 ShapeTypeDescriptor (DRAWING_RECTANGLE
,
109 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.RectangleShape"),
110 CreateSvxAccessibleShape
),
111 ShapeTypeDescriptor ( DRAWING_ELLIPSE
,
112 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.EllipseShape"),
113 CreateSvxAccessibleShape
),
114 ShapeTypeDescriptor ( DRAWING_CONTROL
,
115 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.ControlShape"),
116 CreateSvxAccessibleShape
),
117 ShapeTypeDescriptor ( DRAWING_CONNECTOR
,
118 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.ConnectorShape"),
119 CreateSvxAccessibleShape
),
120 ShapeTypeDescriptor ( DRAWING_MEASURE
,
121 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.MeasureShape"),
122 CreateSvxAccessibleShape
),
123 ShapeTypeDescriptor ( DRAWING_LINE
,
124 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.LineShape"),
125 CreateSvxAccessibleShape
),
126 ShapeTypeDescriptor ( DRAWING_POLY_POLYGON
,
127 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.PolyPolygonShape"),
128 CreateSvxAccessibleShape
),
129 ShapeTypeDescriptor ( DRAWING_POLY_LINE
,
130 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.PolyLineShape"),
131 CreateSvxAccessibleShape
),
132 ShapeTypeDescriptor ( DRAWING_OPEN_BEZIER
,
133 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.OpenBezierShape"),
134 CreateSvxAccessibleShape
),
135 ShapeTypeDescriptor ( DRAWING_CLOSED_BEZIER
,
136 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.ClosedBezierShape"),
137 CreateSvxAccessibleShape
),
138 ShapeTypeDescriptor ( DRAWING_OPEN_FREEHAND
,
139 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.OpenFreeHandShape"),
140 CreateSvxAccessibleShape
),
141 ShapeTypeDescriptor ( DRAWING_CLOSED_FREEHAND
,
142 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.ClosedFreeHandShape"),
143 CreateSvxAccessibleShape
),
144 ShapeTypeDescriptor ( DRAWING_POLY_POLYGON_PATH
,
145 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.PolyPolygonPathShape"),
146 CreateSvxAccessibleShape
),
147 ShapeTypeDescriptor ( DRAWING_POLY_LINE_PATH
,
148 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.PolyLinePathShape"),
149 CreateSvxAccessibleShape
),
150 ShapeTypeDescriptor ( DRAWING_GRAPHIC_OBJECT
,
151 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.GraphicObjectShape"),
152 CreateSvxAccessibleShape
),
153 ShapeTypeDescriptor ( DRAWING_GROUP
,
154 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.GroupShape"),
155 CreateSvxAccessibleShape
),
156 ShapeTypeDescriptor ( DRAWING_OLE
,
157 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.OLE2Shape"),
158 CreateSvxAccessibleShape
),
159 ShapeTypeDescriptor ( DRAWING_PAGE
,
160 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.PageShape"),
161 CreateSvxAccessibleShape
),
162 ShapeTypeDescriptor ( DRAWING_CAPTION
,
163 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.CaptionShape"),
164 CreateSvxAccessibleShape
),
165 ShapeTypeDescriptor ( DRAWING_FRAME
,
166 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.FrameShape"),
167 CreateSvxAccessibleShape
),
168 ShapeTypeDescriptor ( DRAWING_PLUGIN
,
169 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.PluginShape"),
170 CreateSvxAccessibleShape
),
171 ShapeTypeDescriptor ( DRAWING_APPLET
,
172 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.AppletShape"),
173 CreateSvxAccessibleShape
),
174 ShapeTypeDescriptor ( DRAWING_3D_SCENE
,
175 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.Shape3DSceneObject"),
176 CreateSvxAccessibleShape
),
177 ShapeTypeDescriptor ( DRAWING_3D_CUBE
,
178 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.Shape3DCubeObject"),
179 CreateSvxAccessibleShape
),
180 ShapeTypeDescriptor ( DRAWING_3D_SPHERE
,
181 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.Shape3DSphereObject"),
182 CreateSvxAccessibleShape
),
183 ShapeTypeDescriptor ( DRAWING_3D_LATHE
,
184 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.Shape3DLatheObject"),
185 CreateSvxAccessibleShape
),
186 ShapeTypeDescriptor ( DRAWING_3D_EXTRUDE
,
187 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.Shape3DExtrudeObject"),
188 CreateSvxAccessibleShape
),
189 ShapeTypeDescriptor ( DRAWING_CUSTOM
,
190 ::rtl::OUString::createFromAscii ("com.sun.star.drawing.CustomShape"),
191 CreateSvxAccessibleShape
),
192 ShapeTypeDescriptor ( DRAWING_TABLE
,
193 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.TableShape" ) ),
194 CreateSvxAccessibleShape
),
195 ShapeTypeDescriptor ( DRAWING_MEDIA
,
196 rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.MediaShape" ) ),
197 CreateSvxAccessibleShape
),
202 void RegisterDrawShapeTypes (void)
204 // --> OD 2004-11-26 #i37790#
205 ShapeTypeHandler::Instance().AddShapeTypeList ( DRAWING_END
, aSvxShapeTypeList
);
210 } // end of namespace accessibility