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 .
22 #include <sal/config.h>
24 #include <rtl/ref.hxx>
26 #include "AccessibleDocumentBase.hxx"
29 class ScNotesChildren
;
30 class ScShapeChildren
;
31 class ScAccessiblePreviewTable
;
32 class ScAccessiblePageHeader
;
34 class ScAccessibleDocumentPagePreview
35 : public ScAccessibleDocumentBase
38 //===== internal ========================================================
39 ScAccessibleDocumentPagePreview(
40 const css::uno::Reference
<css::accessibility::XAccessible
>& rxParent
,
41 ScPreviewShell
* pViewShell
);
43 virtual ~ScAccessibleDocumentPagePreview() override
;
45 using ScAccessibleDocumentBase::IsDefunc
;
48 using ScAccessibleContextBase::disposing
;
50 virtual void SAL_CALL
disposing() override
;
52 ///===== SfxListener =====================================================
54 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
56 ///===== XAccessibleComponent ============================================
58 virtual css::uno::Reference
< css::accessibility::XAccessible
>
59 SAL_CALL
getAccessibleAtPoint(
60 const css::awt::Point
& rPoint
) override
;
62 virtual void SAL_CALL
grabFocus( ) override
;
64 ///===== XAccessibleContext ==============================================
66 /// Return the number of currently visible children.
67 virtual sal_Int64 SAL_CALL
getAccessibleChildCount() override
;
69 /// Return the specified child or NULL if index is invalid.
70 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
71 getAccessibleChild(sal_Int64 nIndex
) override
;
73 /// Return the set of current states.
74 virtual sal_Int64 SAL_CALL
getAccessibleStateSet() override
;
76 virtual OUString SAL_CALL
getAccessibleName() override
;
77 ///===== XServiceInfo ====================================================
79 /** Returns an identifier for the implementation of this object.
81 virtual OUString SAL_CALL
82 getImplementationName() override
;
84 /** Returns a list of all supported services.
86 virtual css::uno::Sequence
< OUString
> SAL_CALL
87 getSupportedServiceNames() override
;
89 ///===== XTypeProvider ===================================================
91 /** Returns an implementation id.
93 virtual css::uno::Sequence
<sal_Int8
> SAL_CALL
94 getImplementationId() override
;
96 ///===== internal ========================================================
99 /// Return this object's description.
101 createAccessibleDescription() override
;
103 /// Return the object's current name.
105 createAccessibleName() override
;
107 public: // needed in ScShapeChildren
108 /// Return the object's current bounding box relative to the desktop.
109 virtual AbsoluteScreenPixelRectangle
GetBoundingBoxOnScreen() const override
;
112 /// Return the object's current bounding box relative to the parent object.
113 virtual tools::Rectangle
GetBoundingBox() const override
;
116 ScPreviewShell
* mpViewShell
;
117 std::unique_ptr
<ScNotesChildren
> mpNotesChildren
;
118 std::unique_ptr
<ScShapeChildren
> mpShapeChildren
;
119 rtl::Reference
<ScAccessiblePreviewTable
> mpTable
;
120 rtl::Reference
<ScAccessiblePageHeader
> mpHeader
;
121 rtl::Reference
<ScAccessiblePageHeader
> mpFooter
;
123 bool IsDefunc(sal_Int64 nParentStates
);
125 ScNotesChildren
* GetNotesChildren();
126 ScShapeChildren
* GetShapeChildren();
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */