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_ACCESSIBLEPAGEHEADERAREA_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEPAGEHEADERAREA_HXX
23 #include "AccessibleContextBase.hxx"
24 #include <editeng/svxenum.hxx>
27 namespace accessibility
29 class AccessibleTextHelper
;
33 class ScAccessiblePageHeaderArea
34 : public ScAccessibleContextBase
37 //===== internal ========================================================
38 ScAccessiblePageHeaderArea(
39 const css::uno::Reference
<css::accessibility::XAccessible
>& rxParent
,
40 ScPreviewShell
* pViewShell
,
41 const EditTextObject
* pEditObj
,
45 virtual ~ScAccessiblePageHeaderArea();
47 const EditTextObject
* GetEditTextObject() const { return mpEditObj
; }
49 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
)
61 throw (css::uno::RuntimeException
, std::exception
) override
;
63 ///===== XAccessibleContext ==============================================
65 /// Return the number of currently visible children.
66 /// override to calculate this on demand
67 virtual sal_Int32 SAL_CALL
68 getAccessibleChildCount()
69 throw (css::uno::RuntimeException
, std::exception
) override
;
71 /// Return the specified child or NULL if index is invalid.
72 /// override to calculate this on demand
73 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
74 getAccessibleChild(sal_Int32 nIndex
)
75 throw (css::uno::RuntimeException
,
76 css::lang::IndexOutOfBoundsException
, std::exception
) override
;
78 /// Return the set of current states.
79 virtual css::uno::Reference
<
80 css::accessibility::XAccessibleStateSet
> SAL_CALL
81 getAccessibleStateSet()
82 throw (css::uno::RuntimeException
, std::exception
) override
;
84 ///===== XServiceInfo ====================================================
86 /** Returns an identifier for the implementation of this object.
88 virtual OUString SAL_CALL
89 getImplementationName()
90 throw (css::uno::RuntimeException
, std::exception
) override
;
92 /** Returns a list of all supported services. In this case that is just
93 the AccessibleContext and Accessible service.
95 virtual css::uno::Sequence
< OUString
> SAL_CALL
96 getSupportedServiceNames()
97 throw (css::uno::RuntimeException
, std::exception
) override
;
99 ///===== XTypeProvider ===================================================
101 /** Returns a implementation id.
103 virtual css::uno::Sequence
<sal_Int8
> SAL_CALL
104 getImplementationId()
105 throw (css::uno::RuntimeException
, std::exception
) override
;
108 virtual OUString SAL_CALL
createAccessibleDescription() throw(css::uno::RuntimeException
, std::exception
) override
;
109 virtual OUString SAL_CALL
createAccessibleName() throw (css::uno::RuntimeException
, std::exception
) override
;
111 virtual Rectangle
GetBoundingBoxOnScreen() const throw(css::uno::RuntimeException
, std::exception
) override
;
112 virtual Rectangle
GetBoundingBox() const throw (css::uno::RuntimeException
, std::exception
) override
;
115 EditTextObject
* mpEditObj
;
116 accessibility::AccessibleTextHelper
* mpTextHelper
;
117 ScPreviewShell
* mpViewShell
;
121 void CreateTextHelper();
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */