LibreOffice Module sc (master)  1
AccessiblePageHeader.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEPAGEHEADER_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEPAGEHEADER_HXX
22 
24 #include <editeng/svxenum.hxx>
25 #include <rtl/ref.hxx>
26 
27 class ScPreviewShell;
28 class EditTextObject;
30 
32 {
33 public:
34  ScAccessiblePageHeader( const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
35  ScPreviewShell* pViewShell, bool bHeader, sal_Int32 nIndex );
36 
37 protected:
38  virtual ~ScAccessiblePageHeader() override;
39 
41 
42 public:
44  virtual void SAL_CALL disposing() override;
45 
46  //===== SfxListener =====================================================
47 
48  virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
49 
50  //===== XAccessibleComponent ============================================
51 
52  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
53  getAccessibleAtPoint( const css::awt::Point& aPoint ) override;
54  virtual void SAL_CALL grabFocus() override;
55 
56  //===== XAccessibleContext ==============================================
57 
58  virtual sal_Int32 SAL_CALL getAccessibleChildCount() override;
59  virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
60  getAccessibleChild( sal_Int32 i ) override;
61  virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() override;
62  virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL
63  getAccessibleStateSet() override;
64 
65  //===== XServiceInfo ====================================================
66 
67  virtual OUString SAL_CALL getImplementationName() override;
68  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
69 
70 protected:
71  virtual OUString createAccessibleDescription() override;
72  virtual OUString createAccessibleName() override;
73 
74  virtual tools::Rectangle GetBoundingBoxOnScreen() const override;
75  virtual tools::Rectangle GetBoundingBox() const override;
76 
77 private:
79  sal_Int32 mnIndex;
80  bool mbHeader;
81  std::vector< rtl::Reference<ScAccessiblePageHeaderArea> >
83  sal_Int32 mnChildCount;
84 
85  bool IsDefunc(
86  const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates);
87 
88  void AddChild(const EditTextObject* pArea, sal_uInt32 nIndex, SvxAdjust eAdjust);
89 };
90 
91 #endif
92 
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
===== SfxListener =====================================================
sal_Int32 nIndex
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Returns a list of all supported services.
virtual OUString createAccessibleName() override
Return the object's current name.
virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() override
Return this objects index among the parents children.
virtual ~ScAccessiblePageHeader() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int32 i) override
Return the specified child or NULL if index is invalid.
ScAccessiblePageHeader(const css::uno::Reference< css::accessibility::XAccessible > &rxParent, ScPreviewShell *pViewShell, bool bHeader, sal_Int32 nIndex)
virtual tools::Rectangle GetBoundingBoxOnScreen() const override
Return the object's current bounding box relative to the desktop.
SvxAdjust
int i
virtual void SAL_CALL disposing() override
void AddChild(const EditTextObject *pArea, sal_uInt32 nIndex, SvxAdjust eAdjust)
virtual sal_Int32 SAL_CALL getAccessibleChildCount() override
===== XAccessibleContext ==============================================
std::vector< rtl::Reference< ScAccessiblePageHeaderArea > > maAreas
virtual void SAL_CALL disposing() override
virtual OUString createAccessibleDescription() override
Return this object's description.
virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet() override
Return the set of current states.
virtual void SAL_CALL grabFocus() override
virtual OUString SAL_CALL getImplementationName() override
===== XServiceInfo ====================================================
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
virtual tools::Rectangle GetBoundingBox() const override
Return the object's current bounding box relative to the parent object.