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 <svx/ShapeTypeHandler.hxx>
21 #include <SdShapeTypes.hxx>
22 #include <AccessiblePresentationShape.hxx>
23 #include <AccessiblePresentationGraphicShape.hxx>
24 #include <AccessiblePresentationOLEShape.hxx>
26 namespace accessibility
{
28 static rtl::Reference
<AccessibleShape
>
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 u
"com.sun.star.presentation.OutlinerShape"_ustr
,
70 CreateSdAccessibleShape
),
72 PRESENTATION_SUBTITLE
,
73 u
"com.sun.star.presentation.SubtitleShape"_ustr
,
74 CreateSdAccessibleShape
),
76 PRESENTATION_GRAPHIC_OBJECT
,
77 u
"com.sun.star.presentation.GraphicObjectShape"_ustr
,
78 CreateSdAccessibleShape
),
81 u
"com.sun.star.presentation.PageShape"_ustr
,
82 CreateSdAccessibleShape
),
85 u
"com.sun.star.presentation.OLE2Shape"_ustr
,
86 CreateSdAccessibleShape
),
89 u
"com.sun.star.presentation.ChartShape"_ustr
,
90 CreateSdAccessibleShape
),
93 u
"com.sun.star.presentation.TableShape"_ustr
,
94 CreateSdAccessibleShape
),
97 u
"com.sun.star.presentation.NotesShape"_ustr
,
98 CreateSdAccessibleShape
),
101 u
"com.sun.star.presentation.TitleTextShape"_ustr
,
102 CreateSdAccessibleShape
),
103 ShapeTypeDescriptor (
104 PRESENTATION_HANDOUT
,
105 u
"com.sun.star.presentation.HandoutShape"_ustr
,
106 CreateSdAccessibleShape
),
107 ShapeTypeDescriptor (
109 u
"com.sun.star.presentation.HeaderShape"_ustr
,
110 CreateSdAccessibleShape
),
111 ShapeTypeDescriptor (
113 u
"com.sun.star.presentation.FooterShape"_ustr
,
114 CreateSdAccessibleShape
),
115 ShapeTypeDescriptor (
116 PRESENTATION_DATETIME
,
117 u
"com.sun.star.presentation.DateTimeShape"_ustr
,
118 CreateSdAccessibleShape
),
119 ShapeTypeDescriptor (
120 PRESENTATION_PAGENUMBER
,
121 u
"com.sun.star.presentation.SlideNumberShape"_ustr
,
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: */