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 #ifndef INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEDOCUMENTPAGEPREVIEW_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEDOCUMENTPAGEPREVIEW_HXX
23 #include <sal/config.h>
25 #include <rtl/ref.hxx>
27 #include "AccessibleDocumentBase.hxx"
30 class ScNotesChildren
;
31 class ScShapeChildren
;
32 class ScAccessiblePreviewTable
;
33 class ScAccessiblePageHeader
;
35 class ScAccessibleDocumentPagePreview
36 : public ScAccessibleDocumentBase
39 //===== internal ========================================================
40 ScAccessibleDocumentPagePreview(
41 const css::uno::Reference
<css::accessibility::XAccessible
>& rxParent
,
42 ScPreviewShell
* pViewShell
);
44 virtual ~ScAccessibleDocumentPagePreview();
46 using ScAccessibleDocumentBase::IsDefunc
;
49 using ScAccessibleContextBase::disposing
;
51 virtual void SAL_CALL
disposing() override
;
53 ///===== SfxListener =====================================================
55 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
57 ///===== XAccessibleComponent ============================================
59 virtual css::uno::Reference
< css::accessibility::XAccessible
>
60 SAL_CALL
getAccessibleAtPoint(
61 const css::awt::Point
& rPoint
)
62 throw (css::uno::RuntimeException
, std::exception
) override
;
64 virtual void SAL_CALL
grabFocus( )
65 throw (css::uno::RuntimeException
, std::exception
) override
;
67 ///===== XAccessibleContext ==============================================
69 /// Return the number of currently visible children.
70 virtual sal_Int32 SAL_CALL
getAccessibleChildCount()
71 throw (css::uno::RuntimeException
, std::exception
) override
;
73 /// Return the specified child or NULL if index is invalid.
74 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
75 getAccessibleChild(sal_Int32 nIndex
)
76 throw (css::uno::RuntimeException
,
77 css::lang::IndexOutOfBoundsException
,
78 std::exception
) override
;
80 /// Return the set of current states.
81 virtual css::uno::Reference
<
82 css::accessibility::XAccessibleStateSet
> SAL_CALL
83 getAccessibleStateSet()
84 throw (css::uno::RuntimeException
, std::exception
) override
;
86 virtual OUString SAL_CALL
getAccessibleName()
87 throw (css::uno::RuntimeException
, std::exception
) override
;
88 ///===== XServiceInfo ====================================================
90 /** Returns an identifier for the implementation of this object.
92 virtual OUString SAL_CALL
93 getImplementationName()
94 throw (css::uno::RuntimeException
, std::exception
) override
;
96 /** Returns a list of all supported services.
98 virtual css::uno::Sequence
< OUString
> SAL_CALL
99 getSupportedServiceNames()
100 throw (css::uno::RuntimeException
, std::exception
) override
;
102 ///===== XTypeProvider ===================================================
104 /** Returns a implementation id.
106 virtual css::uno::Sequence
<sal_Int8
> SAL_CALL
107 getImplementationId()
108 throw (css::uno::RuntimeException
, std::exception
) override
;
110 ///===== internal ========================================================
113 /// Return this object's description.
114 virtual OUString SAL_CALL
115 createAccessibleDescription()
116 throw (css::uno::RuntimeException
, std::exception
) override
;
118 /// Return the object's current name.
119 virtual OUString SAL_CALL
120 createAccessibleName()
121 throw (css::uno::RuntimeException
, std::exception
) override
;
123 public: // needed in ScShapeChildren
124 /// Return the object's current bounding box relative to the desktop.
125 virtual Rectangle
GetBoundingBoxOnScreen() const
126 throw (css::uno::RuntimeException
, std::exception
) override
;
129 /// Return the object's current bounding box relative to the parent object.
130 virtual Rectangle
GetBoundingBox() const
131 throw (css::uno::RuntimeException
, std::exception
) override
;
134 ScPreviewShell
* mpViewShell
;
135 ScNotesChildren
* mpNotesChildren
;
136 ScShapeChildren
* mpShapeChildren
;
137 rtl::Reference
<ScAccessiblePreviewTable
> mpTable
;
138 ScAccessiblePageHeader
* mpHeader
;
139 ScAccessiblePageHeader
* mpFooter
;
142 const css::uno::Reference
<css::accessibility::XAccessibleStateSet
>& rxParentStates
);
144 ScNotesChildren
* GetNotesChildren();
145 ScShapeChildren
* GetShapeChildren();
150 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */