LibreOffice Module sw (master) 1
accpreview.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
20#include <com/sun/star/accessibility/AccessibleStateType.hpp>
22#include <strings.hrc>
23#include "accpreview.hxx"
24
25constexpr OUStringLiteral sImplementationName
26 = u"com.sun.star.comp.Writer.SwAccessibleDocumentPageView";
27
28using ::com::sun::star::uno::Sequence;
29
30SwAccessiblePreview::SwAccessiblePreview(std::shared_ptr<SwAccessibleMap> const& pMap)
32{
33 SetName( GetResource( STR_ACCESS_PREVIEW_DOC_NAME ) );
34}
35
37{
38}
39
41{
43}
44
45sal_Bool SwAccessiblePreview::supportsService( const OUString& rServiceName )
46{
47 return cppu::supportsService(this, rServiceName);
48}
49
51{
52 return {"com.sun.star.text.AccessibleTextDocumentPageView",
54}
55
56Sequence< sal_Int8 > SAL_CALL SwAccessiblePreview::getImplementationId()
57{
58 return css::uno::Sequence<sal_Int8>();
59}
60
62{
63 return GetResource( STR_ACCESS_PREVIEW_DOC_NAME );
64}
65
67{
68 return SwAccessibleDocumentBase::getAccessibleName() + " " + GetResource( STR_ACCESS_PREVIEW_DOC_SUFFIX );
69}
70
72{
73 FireStateChangedEvent( css::accessibility::AccessibleStateType::FOCUSED, true );
74}
75
76/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr OUStringLiteral sAccessibleServiceName
Definition: acccontext.hxx:42
constexpr OUStringLiteral sImplementationName
Definition: accpreview.cxx:26
void FireStateChangedEvent(sal_Int64 nState, bool bNewState)
Definition: acccontext.cxx:467
void SetName(const OUString &rName)
Definition: acccontext.hxx:99
static OUString GetResource(TranslateId pResId, const OUString *pArg1=nullptr, const OUString *pArg2=nullptr)
virtual OUString SAL_CALL getAccessibleName() override
Definition: accdoc.cxx:195
virtual OUString SAL_CALL getImplementationName() override
Returns an identifier for the implementation of this object.
Definition: accpreview.cxx:40
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: accpreview.cxx:56
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
Return whether the specified service is supported by this class.
Definition: accpreview.cxx:45
virtual ~SwAccessiblePreview() override
Definition: accpreview.cxx:36
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
Definition: accpreview.cxx:50
OUString SAL_CALL getAccessibleDescription() override
Definition: accpreview.cxx:61
virtual void InvalidateFocus_() override
Definition: accpreview.cxx:71
SwAccessiblePreview(std::shared_ptr< SwAccessibleMap > const &pMap)
Definition: accpreview.cxx:30
OUString SAL_CALL getAccessibleName() override
Definition: accpreview.cxx:66
float u
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
unsigned char sal_Bool