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 <AccessiblePresentationShape.hxx>
22 #include <SdShapeTypes.hxx>
24 #include <strings.hrc>
25 #include <sdresid.hxx>
26 #include <svx/ShapeTypeHandler.hxx>
28 #include <com/sun/star/drawing/XShape.hpp>
30 using namespace ::com::sun::star
;
32 namespace accessibility
34 //===== internal ============================================================
36 AccessiblePresentationShape::AccessiblePresentationShape(
37 const AccessibleShapeInfo
& rShapeInfo
, const AccessibleShapeTreeInfo
& rShapeTreeInfo
)
38 : AccessibleShape(rShapeInfo
, rShapeTreeInfo
)
42 AccessiblePresentationShape::~AccessiblePresentationShape() {}
46 OUString SAL_CALL
AccessiblePresentationShape::getImplementationName()
48 return u
"AccessiblePresentationShape"_ustr
;
51 /// Set this object's name if is different to the current name.
52 OUString
AccessiblePresentationShape::CreateAccessibleBaseName()
56 ShapeTypeId nShapeType
= ShapeTypeHandler::Instance().GetTypeId(mxShape
);
59 case PRESENTATION_TITLE
:
60 sName
= SdResId(SID_SD_A11Y_P_TITLE_N
);
62 case PRESENTATION_OUTLINER
:
63 sName
= SdResId(SID_SD_A11Y_P_OUTLINER_N
);
65 case PRESENTATION_SUBTITLE
:
66 sName
= SdResId(SID_SD_A11Y_P_SUBTITLE_N
);
68 case PRESENTATION_PAGE
:
69 sName
= SdResId(SID_SD_A11Y_P_PAGE_N
);
71 case PRESENTATION_NOTES
:
72 sName
= SdResId(SID_SD_A11Y_P_NOTES_N
);
74 case PRESENTATION_HANDOUT
:
75 sName
= SdResId(SID_SD_A11Y_P_HANDOUT_N
);
77 case PRESENTATION_HEADER
:
78 sName
= SdResId(SID_SD_A11Y_P_HEADER_N
);
80 case PRESENTATION_FOOTER
:
81 sName
= SdResId(SID_SD_A11Y_P_FOOTER_N
);
83 case PRESENTATION_DATETIME
:
84 sName
= SdResId(SID_SD_A11Y_P_DATE_N
);
86 case PRESENTATION_PAGENUMBER
:
87 sName
= SdResId(SID_SD_A11Y_P_NUMBER_N
);
90 sName
= SdResId(SID_SD_A11Y_P_UNKNOWN_N
);
92 sName
+= ": " + mxShape
->getShapeType();
98 OUString
AccessiblePresentationShape::GetStyle() const
102 ShapeTypeId nShapeType
= ShapeTypeHandler::Instance().GetTypeId(mxShape
);
105 case PRESENTATION_TITLE
:
106 sName
= SdResId(SID_SD_A11Y_P_TITLE_N_STYLE
);
108 case PRESENTATION_OUTLINER
:
109 sName
= SdResId(SID_SD_A11Y_P_OUTLINER_N_STYLE
);
111 case PRESENTATION_SUBTITLE
:
112 sName
= SdResId(SID_SD_A11Y_P_SUBTITLE_N_STYLE
);
114 case PRESENTATION_PAGE
:
115 sName
= SdResId(SID_SD_A11Y_P_PAGE_N_STYLE
);
117 case PRESENTATION_NOTES
:
118 sName
= SdResId(SID_SD_A11Y_P_NOTES_N_STYLE
);
120 case PRESENTATION_HANDOUT
:
121 sName
= SdResId(SID_SD_A11Y_P_HANDOUT_N_STYLE
);
123 case PRESENTATION_FOOTER
:
124 sName
= SdResId(SID_SD_A11Y_P_FOOTER_N_STYLE
);
126 case PRESENTATION_HEADER
:
127 sName
= SdResId(SID_SD_A11Y_P_HEADER_N_STYLE
);
129 case PRESENTATION_DATETIME
:
130 sName
= SdResId(SID_SD_A11Y_P_DATE_N_STYLE
);
132 case PRESENTATION_PAGENUMBER
:
133 sName
= SdResId(SID_SD_A11Y_P_NUMBER_N_STYLE
);
136 sName
= SdResId(SID_SD_A11Y_P_UNKNOWN_N_STYLE
);
138 sName
+= ": " + mxShape
->getShapeType();
143 } // end of namespace accessibility
145 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */