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 <com/sun/star/accessibility/AccessibleStateType.hpp>
21 #include <cppuhelper/supportsservice.hxx>
22 #include <strings.hrc>
23 #include "accpreview.hxx"
25 constexpr OUStringLiteral sImplementationName
26 = u
"com.sun.star.comp.Writer.SwAccessibleDocumentPageView";
28 using ::com::sun::star::uno::Sequence
;
30 SwAccessiblePreview::SwAccessiblePreview(std::shared_ptr
<SwAccessibleMap
> const& pMap
)
31 : SwAccessibleDocumentBase(pMap
)
33 SetName( GetResource( STR_ACCESS_PREVIEW_DOC_NAME
) );
36 SwAccessiblePreview::~SwAccessiblePreview()
40 OUString
SwAccessiblePreview::getImplementationName( )
42 return sImplementationName
;
45 sal_Bool
SwAccessiblePreview::supportsService( const OUString
& rServiceName
)
47 return cppu::supportsService(this, rServiceName
);
50 Sequence
<OUString
> SwAccessiblePreview::getSupportedServiceNames( )
52 return {"com.sun.star.text.AccessibleTextDocumentPageView",
53 sAccessibleServiceName
};
56 Sequence
< sal_Int8
> SAL_CALL
SwAccessiblePreview::getImplementationId()
58 return css::uno::Sequence
<sal_Int8
>();
61 OUString SAL_CALL
SwAccessiblePreview::getAccessibleDescription()
63 return GetResource( STR_ACCESS_PREVIEW_DOC_NAME
);
66 OUString SAL_CALL
SwAccessiblePreview::getAccessibleName()
68 return SwAccessibleDocumentBase::getAccessibleName() + " " + GetResource( STR_ACCESS_PREVIEW_DOC_SUFFIX
);
71 void SwAccessiblePreview::InvalidateFocus_()
73 FireStateChangedEvent( css::accessibility::AccessibleStateType::FOCUSED
, true );
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */