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