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: SdShapeTypes.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_sd.hxx"
34 #include "SdShapeTypes.hxx"
35 #include "AccessiblePresentationShape.hxx"
36 #include "AccessiblePresentationGraphicShape.hxx"
37 #include "AccessiblePresentationOLEShape.hxx"
38 #include <rtl/ustring.h>
40 namespace accessibility
{
43 CreateSdAccessibleShape (
44 const AccessibleShapeInfo
& rShapeInfo
,
45 const AccessibleShapeTreeInfo
& rShapeTreeInfo
,
50 case PRESENTATION_TITLE
:
51 case PRESENTATION_OUTLINER
:
52 case PRESENTATION_SUBTITLE
:
53 case PRESENTATION_PAGE
:
54 case PRESENTATION_NOTES
:
55 case PRESENTATION_HANDOUT
:
56 case PRESENTATION_HEADER
:
57 case PRESENTATION_FOOTER
:
58 case PRESENTATION_DATETIME
:
59 case PRESENTATION_PAGENUMBER
:
60 return new AccessiblePresentationShape (rShapeInfo
, rShapeTreeInfo
);
62 case PRESENTATION_GRAPHIC_OBJECT
:
63 return new AccessiblePresentationGraphicShape (rShapeInfo
, rShapeTreeInfo
);
65 case PRESENTATION_OLE
:
66 case PRESENTATION_CHART
:
67 case PRESENTATION_TABLE
:
68 return new AccessiblePresentationOLEShape (rShapeInfo
, rShapeTreeInfo
);
71 return new AccessibleShape (rShapeInfo
, rShapeTreeInfo
);
78 ShapeTypeDescriptor aSdShapeTypeList
[] = {
80 PRESENTATION_OUTLINER
,
81 ::rtl::OUString::createFromAscii ("com.sun.star.presentation.OutlinerShape"),
82 CreateSdAccessibleShape
),
84 PRESENTATION_SUBTITLE
,
85 ::rtl::OUString::createFromAscii ("com.sun.star.presentation.SubtitleShape"),
86 CreateSdAccessibleShape
),
88 PRESENTATION_GRAPHIC_OBJECT
,
89 ::rtl::OUString::createFromAscii ("com.sun.star.presentation.GraphicObjectShape"),
90 CreateSdAccessibleShape
),
93 ::rtl::OUString::createFromAscii ("com.sun.star.presentation.PageShape"),
94 CreateSdAccessibleShape
),
97 ::rtl::OUString::createFromAscii ("com.sun.star.presentation.OLE2Shape"),
98 CreateSdAccessibleShape
),
101 ::rtl::OUString::createFromAscii ("com.sun.star.presentation.ChartShape"),
102 CreateSdAccessibleShape
),
103 ShapeTypeDescriptor (
105 ::rtl::OUString::createFromAscii ("com.sun.star.presentation.TableShape"),
106 CreateSdAccessibleShape
),
107 ShapeTypeDescriptor (
109 ::rtl::OUString::createFromAscii ("com.sun.star.presentation.NotesShape"),
110 CreateSdAccessibleShape
),
111 ShapeTypeDescriptor (
113 ::rtl::OUString::createFromAscii ("com.sun.star.presentation.TitleTextShape"),
114 CreateSdAccessibleShape
),
115 ShapeTypeDescriptor (
116 PRESENTATION_HANDOUT
,
117 ::rtl::OUString::createFromAscii ("com.sun.star.presentation.HandoutShape"),
118 CreateSdAccessibleShape
),
119 ShapeTypeDescriptor (
121 ::rtl::OUString::createFromAscii ("com.sun.star.presentation.HeaderShape"),
122 CreateSdAccessibleShape
),
123 ShapeTypeDescriptor (
125 ::rtl::OUString::createFromAscii ("com.sun.star.presentation.FooterShape"),
126 CreateSdAccessibleShape
),
127 ShapeTypeDescriptor (
128 PRESENTATION_DATETIME
,
129 ::rtl::OUString::createFromAscii ("com.sun.star.presentation.DateTimeShape"),
130 CreateSdAccessibleShape
),
131 ShapeTypeDescriptor (
132 PRESENTATION_PAGENUMBER
,
133 ::rtl::OUString::createFromAscii ("com.sun.star.presentation.SlideNumberShape"),
134 CreateSdAccessibleShape
)
140 void RegisterImpressShapeTypes (void)
142 ShapeTypeHandler::Instance().AddShapeTypeList (
143 PRESENTATION_PAGENUMBER
- PRESENTATION_OUTLINER
+ 1,
150 } // end of namespace accessibility