1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "SdShapeTypes.hxx"
21 #include "AccessiblePresentationShape.hxx"
22 #include "AccessiblePresentationGraphicShape.hxx"
23 #include "AccessiblePresentationOLEShape.hxx"
24 #include <rtl/ustring.hxx>
26 namespace accessibility
{
29 CreateSdAccessibleShape (
30 const AccessibleShapeInfo
& rShapeInfo
,
31 const AccessibleShapeTreeInfo
& rShapeTreeInfo
,
36 case PRESENTATION_TITLE
:
37 case PRESENTATION_OUTLINER
:
38 case PRESENTATION_SUBTITLE
:
39 case PRESENTATION_PAGE
:
40 case PRESENTATION_NOTES
:
41 case PRESENTATION_HANDOUT
:
42 case PRESENTATION_HEADER
:
43 case PRESENTATION_FOOTER
:
44 case PRESENTATION_DATETIME
:
45 case PRESENTATION_PAGENUMBER
:
46 return new AccessiblePresentationShape (rShapeInfo
, rShapeTreeInfo
);
48 case PRESENTATION_GRAPHIC_OBJECT
:
49 return new AccessiblePresentationGraphicShape (rShapeInfo
, rShapeTreeInfo
);
51 case PRESENTATION_OLE
:
52 case PRESENTATION_CHART
:
53 case PRESENTATION_TABLE
:
54 return new AccessiblePresentationOLEShape (rShapeInfo
, rShapeTreeInfo
);
57 return new AccessibleShape (rShapeInfo
, rShapeTreeInfo
);
61 void RegisterImpressShapeTypes()
63 /** List of shape type descriptors corresponding to the
64 <type>SdShapeTypes</type> enum.
66 ShapeTypeDescriptor aSdShapeTypeList
[] = {
68 PRESENTATION_OUTLINER
,
69 "com.sun.star.presentation.OutlinerShape",
70 CreateSdAccessibleShape
),
72 PRESENTATION_SUBTITLE
,
73 "com.sun.star.presentation.SubtitleShape",
74 CreateSdAccessibleShape
),
76 PRESENTATION_GRAPHIC_OBJECT
,
77 "com.sun.star.presentation.GraphicObjectShape",
78 CreateSdAccessibleShape
),
81 "com.sun.star.presentation.PageShape",
82 CreateSdAccessibleShape
),
85 "com.sun.star.presentation.OLE2Shape",
86 CreateSdAccessibleShape
),
89 "com.sun.star.presentation.ChartShape",
90 CreateSdAccessibleShape
),
93 "com.sun.star.presentation.TableShape",
94 CreateSdAccessibleShape
),
97 "com.sun.star.presentation.NotesShape",
98 CreateSdAccessibleShape
),
101 "com.sun.star.presentation.TitleTextShape",
102 CreateSdAccessibleShape
),
103 ShapeTypeDescriptor (
104 PRESENTATION_HANDOUT
,
105 "com.sun.star.presentation.HandoutShape",
106 CreateSdAccessibleShape
),
107 ShapeTypeDescriptor (
109 "com.sun.star.presentation.HeaderShape",
110 CreateSdAccessibleShape
),
111 ShapeTypeDescriptor (
113 "com.sun.star.presentation.FooterShape",
114 CreateSdAccessibleShape
),
115 ShapeTypeDescriptor (
116 PRESENTATION_DATETIME
,
117 "com.sun.star.presentation.DateTimeShape",
118 CreateSdAccessibleShape
),
119 ShapeTypeDescriptor (
120 PRESENTATION_PAGENUMBER
,
121 "com.sun.star.presentation.SlideNumberShape",
122 CreateSdAccessibleShape
)
125 ShapeTypeHandler::Instance().AddShapeTypeList (
126 PRESENTATION_PAGENUMBER
- PRESENTATION_OUTLINER
+ 1,
130 } // end of namespace accessibility
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */