LibreOffice Module sd (master) 1
AccessiblePresentationShape.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
21
22#include <SdShapeTypes.hxx>
23
24#include <strings.hrc>
25#include <sdresid.hxx>
27
28#include <com/sun/star/drawing/XShape.hpp>
29
30using namespace ::com::sun::star;
31using namespace ::com::sun::star::accessibility;
32
33namespace accessibility
34{
35//===== internal ============================================================
36
38 const AccessibleShapeInfo& rShapeInfo, const AccessibleShapeTreeInfo& rShapeTreeInfo)
39 : AccessibleShape(rShapeInfo, rShapeTreeInfo)
40{
41}
42
44
45// XServiceInfo
46
48{
49 return "AccessiblePresentationShape";
50}
51
54{
55 OUString sName;
56
58 switch (nShapeType)
59 {
61 sName = SdResId(SID_SD_A11Y_P_TITLE_N);
62 break;
64 sName = SdResId(SID_SD_A11Y_P_OUTLINER_N);
65 break;
67 sName = SdResId(SID_SD_A11Y_P_SUBTITLE_N);
68 break;
70 sName = SdResId(SID_SD_A11Y_P_PAGE_N);
71 break;
73 sName = SdResId(SID_SD_A11Y_P_NOTES_N);
74 break;
76 sName = SdResId(SID_SD_A11Y_P_HANDOUT_N);
77 break;
79 sName = SdResId(SID_SD_A11Y_P_HEADER_N);
80 break;
82 sName = SdResId(SID_SD_A11Y_P_FOOTER_N);
83 break;
85 sName = SdResId(SID_SD_A11Y_P_DATE_N);
86 break;
88 sName = SdResId(SID_SD_A11Y_P_NUMBER_N);
89 break;
90 default:
91 sName = SdResId(SID_SD_A11Y_P_UNKNOWN_N);
92 if (mxShape.is())
93 sName += ": " + mxShape->getShapeType();
94 }
95
96 return sName;
97}
98
100{
101 OUString sName;
102
104 switch (nShapeType)
105 {
107 sName = SdResId(SID_SD_A11Y_P_TITLE_N_STYLE);
108 break;
110 sName = SdResId(SID_SD_A11Y_P_OUTLINER_N_STYLE);
111 break;
113 sName = SdResId(SID_SD_A11Y_P_SUBTITLE_N_STYLE);
114 break;
116 sName = SdResId(SID_SD_A11Y_P_PAGE_N_STYLE);
117 break;
119 sName = SdResId(SID_SD_A11Y_P_NOTES_N_STYLE);
120 break;
122 sName = SdResId(SID_SD_A11Y_P_HANDOUT_N_STYLE);
123 break;
125 sName = SdResId(SID_SD_A11Y_P_FOOTER_N_STYLE);
126 break;
128 sName = SdResId(SID_SD_A11Y_P_HEADER_N_STYLE);
129 break;
131 sName = SdResId(SID_SD_A11Y_P_DATE_N_STYLE);
132 break;
134 sName = SdResId(SID_SD_A11Y_P_NUMBER_N_STYLE);
135 break;
136 default:
137 sName = SdResId(SID_SD_A11Y_P_UNKNOWN_N_STYLE);
138 if (mxShape.is())
139 sName += ": " + mxShape->getShapeType();
140 }
141
142 return sName;
143}
144} // end of namespace accessibility
145
146/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString SAL_CALL getImplementationName() override
Returns an identifier for the implementation of this object.
virtual OUString CreateAccessibleBaseName() override
Create a name string that contains the accessible name.
AccessiblePresentationShape(const AccessibleShapeInfo &rShapeInfo, const AccessibleShapeTreeInfo &rShapeTreeInfo)
css::uno::Reference< css::drawing::XShape > mxShape
ShapeTypeId GetTypeId(const OUString &aServiceName) const
static ShapeTypeHandler & Instance()
OUString sName
OUString SdResId(TranslateId aId)
Definition: sdmod.cxx:83