Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : :
30 : : #include "SdShapeTypes.hxx"
31 : : #include "AccessiblePresentationShape.hxx"
32 : : #include "AccessiblePresentationGraphicShape.hxx"
33 : : #include "AccessiblePresentationOLEShape.hxx"
34 : : #include <rtl/ustring.hxx>
35 : :
36 : : namespace accessibility {
37 : :
38 : : AccessibleShape*
39 : 0 : CreateSdAccessibleShape (
40 : : const AccessibleShapeInfo& rShapeInfo,
41 : : const AccessibleShapeTreeInfo& rShapeTreeInfo,
42 : : ShapeTypeId nId)
43 : : {
44 [ # # # # ]: 0 : switch (nId)
45 : : {
46 : : case PRESENTATION_TITLE:
47 : : case PRESENTATION_OUTLINER:
48 : : case PRESENTATION_SUBTITLE:
49 : : case PRESENTATION_PAGE:
50 : : case PRESENTATION_NOTES:
51 : : case PRESENTATION_HANDOUT:
52 : : case PRESENTATION_HEADER:
53 : : case PRESENTATION_FOOTER:
54 : : case PRESENTATION_DATETIME:
55 : : case PRESENTATION_PAGENUMBER:
56 [ # # ]: 0 : return new AccessiblePresentationShape (rShapeInfo, rShapeTreeInfo);
57 : :
58 : : case PRESENTATION_GRAPHIC_OBJECT:
59 [ # # ]: 0 : return new AccessiblePresentationGraphicShape (rShapeInfo, rShapeTreeInfo);
60 : :
61 : : case PRESENTATION_OLE:
62 : : case PRESENTATION_CHART:
63 : : case PRESENTATION_TABLE:
64 [ # # ]: 0 : return new AccessiblePresentationOLEShape (rShapeInfo, rShapeTreeInfo);
65 : :
66 : : default:
67 [ # # ]: 0 : return new AccessibleShape (rShapeInfo, rShapeTreeInfo);
68 : : }
69 : : }
70 : :
71 : 22 : void RegisterImpressShapeTypes (void)
72 : : {
73 : : /** List of shape type descriptors corresponding to the
74 : : <type>SdShapeTypes</type> enum.
75 : : */
76 : : ShapeTypeDescriptor aSdShapeTypeList[] = {
77 : : ShapeTypeDescriptor (
78 : : PRESENTATION_OUTLINER,
79 : : "com.sun.star.presentation.OutlinerShape",
80 : : CreateSdAccessibleShape ),
81 : : ShapeTypeDescriptor (
82 : : PRESENTATION_SUBTITLE,
83 : : "com.sun.star.presentation.SubtitleShape",
84 : : CreateSdAccessibleShape ),
85 : : ShapeTypeDescriptor (
86 : : PRESENTATION_GRAPHIC_OBJECT,
87 : : "com.sun.star.presentation.GraphicObjectShape",
88 : : CreateSdAccessibleShape ),
89 : : ShapeTypeDescriptor (
90 : : PRESENTATION_PAGE,
91 : : "com.sun.star.presentation.PageShape",
92 : : CreateSdAccessibleShape ),
93 : : ShapeTypeDescriptor (
94 : : PRESENTATION_OLE,
95 : : "com.sun.star.presentation.OLE2Shape",
96 : : CreateSdAccessibleShape ),
97 : : ShapeTypeDescriptor (
98 : : PRESENTATION_CHART,
99 : : "com.sun.star.presentation.ChartShape",
100 : : CreateSdAccessibleShape ),
101 : : ShapeTypeDescriptor (
102 : : PRESENTATION_TABLE,
103 : : "com.sun.star.presentation.TableShape",
104 : : CreateSdAccessibleShape ),
105 : : ShapeTypeDescriptor (
106 : : PRESENTATION_NOTES,
107 : : "com.sun.star.presentation.NotesShape",
108 : : CreateSdAccessibleShape ),
109 : : ShapeTypeDescriptor (
110 : : PRESENTATION_TITLE,
111 : : "com.sun.star.presentation.TitleTextShape",
112 : : CreateSdAccessibleShape ),
113 : : ShapeTypeDescriptor (
114 : : PRESENTATION_HANDOUT,
115 : : "com.sun.star.presentation.HandoutShape",
116 : : CreateSdAccessibleShape ),
117 : : ShapeTypeDescriptor (
118 : : PRESENTATION_HEADER,
119 : : "com.sun.star.presentation.HeaderShape",
120 : : CreateSdAccessibleShape ),
121 : : ShapeTypeDescriptor (
122 : : PRESENTATION_FOOTER,
123 : : "com.sun.star.presentation.FooterShape",
124 : : CreateSdAccessibleShape ),
125 : : ShapeTypeDescriptor (
126 : : PRESENTATION_DATETIME,
127 : : "com.sun.star.presentation.DateTimeShape",
128 : : CreateSdAccessibleShape ),
129 : : ShapeTypeDescriptor (
130 : : PRESENTATION_PAGENUMBER,
131 : : "com.sun.star.presentation.SlideNumberShape",
132 : : CreateSdAccessibleShape )
133 : 330 : };
134 : :
135 [ + - ]: 22 : ShapeTypeHandler::Instance().AddShapeTypeList (
136 : : PRESENTATION_PAGENUMBER - PRESENTATION_OUTLINER + 1,
137 [ + - ]: 330 : aSdShapeTypeList);
[ + + # # ]
138 : 22 : }
139 : :
140 : : } // end of namespace accessibility
141 : :
142 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|