tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / ui / inc / AccessiblePageHeaderArea.hxx
bloba1e813ec67e0663f5ccbb991cc2af6907f8509ef
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #pragma once
22 #include "AccessibleContextBase.hxx"
23 #include <editeng/svxenum.hxx>
25 class EditTextObject;
26 namespace accessibility
28 class AccessibleTextHelper;
30 class ScPreviewShell;
32 class ScAccessiblePageHeaderArea
33 : public ScAccessibleContextBase
35 public:
36 //===== internal ========================================================
37 ScAccessiblePageHeaderArea(
38 const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
39 ScPreviewShell* pViewShell,
40 const EditTextObject* pEditObj,
41 SvxAdjust eAdjust);
42 protected:
43 virtual ~ScAccessiblePageHeaderArea() override;
44 public:
45 const EditTextObject* GetEditTextObject() const { return mpEditObj.get(); }
47 using ScAccessibleContextBase::disposing;
48 virtual void SAL_CALL disposing() override;
50 ///===== SfxListener =====================================================
52 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
54 ///===== XAccessibleComponent ============================================
56 virtual css::uno::Reference< css::accessibility::XAccessible >
57 SAL_CALL getAccessibleAtPoint(
58 const css::awt::Point& rPoint ) override;
60 ///===== XAccessibleContext ==============================================
62 /// Return the number of currently visible children.
63 /// override to calculate this on demand
64 virtual sal_Int64 SAL_CALL
65 getAccessibleChildCount() override;
67 /// Return the specified child or NULL if index is invalid.
68 /// override to calculate this on demand
69 virtual css::uno::Reference< css::accessibility::XAccessible> SAL_CALL
70 getAccessibleChild(sal_Int64 nIndex) override;
72 /// Return the set of current states.
73 virtual sal_Int64 SAL_CALL
74 getAccessibleStateSet() override;
76 ///===== XServiceInfo ====================================================
78 /** Returns an identifier for the implementation of this object.
80 virtual OUString SAL_CALL
81 getImplementationName() override;
83 /** Returns a list of all supported services. In this case that is just
84 the AccessibleContext and Accessible service.
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 protected:
97 virtual OUString createAccessibleDescription() override;
98 virtual OUString createAccessibleName() override;
100 virtual AbsoluteScreenPixelRectangle GetBoundingBoxOnScreen() const override;
101 virtual tools::Rectangle GetBoundingBox() const override;
103 private:
104 std::unique_ptr<EditTextObject> mpEditObj;
105 std::unique_ptr<accessibility::AccessibleTextHelper> mpTextHelper;
106 ScPreviewShell* mpViewShell;
107 SvxAdjust meAdjust;
109 void CreateTextHelper();
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */