Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / sc / source / ui / inc / AccessiblePageHeader.hxx
blob86877e1d55cf8c24b3ffd7cec15b10494d0b92d2
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 #ifndef INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEPAGEHEADER_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_ACCESSIBLEPAGEHEADER_HXX
23 #include "AccessibleContextBase.hxx"
24 #include <editeng/svxenum.hxx>
26 class ScPreviewShell;
27 class EditTextObject;
28 class ScAccessiblePageHeaderArea;
29 class ScPreviewShell;
31 class ScAccessiblePageHeader : public ScAccessibleContextBase
33 public:
34 ScAccessiblePageHeader( const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
35 ScPreviewShell* pViewShell, bool bHeader, sal_Int32 nIndex );
37 protected:
38 virtual ~ScAccessiblePageHeader();
40 using ScAccessibleContextBase::IsDefunc;
42 public:
43 using ScAccessibleContextBase::disposing;
44 virtual void SAL_CALL disposing() override;
46 //===== SfxListener =====================================================
48 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
50 //===== XAccessibleComponent ============================================
52 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
53 getAccessibleAtPoint( const css::awt::Point& aPoint )
54 throw (css::uno::RuntimeException, std::exception) override;
55 virtual void SAL_CALL grabFocus() throw (css::uno::RuntimeException, std::exception) override;
57 //===== XAccessibleContext ==============================================
59 virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (css::uno::RuntimeException, std::exception) override;
60 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
61 getAccessibleChild( sal_Int32 i )
62 throw (css::lang::IndexOutOfBoundsException,
63 css::uno::RuntimeException, std::exception) override;
64 virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw (css::uno::RuntimeException, std::exception) override;
65 virtual css::uno::Reference< css::accessibility::XAccessibleStateSet > SAL_CALL
66 getAccessibleStateSet() throw (css::uno::RuntimeException, std::exception) override;
68 //===== XServiceInfo ====================================================
70 virtual OUString SAL_CALL getImplementationName()
71 throw(css::uno::RuntimeException, std::exception) override;
72 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
73 throw(css::uno::RuntimeException, std::exception) override;
75 protected:
76 virtual OUString SAL_CALL createAccessibleDescription() throw(css::uno::RuntimeException, std::exception) override;
77 virtual OUString SAL_CALL createAccessibleName() throw (css::uno::RuntimeException, std::exception) override;
79 virtual Rectangle GetBoundingBoxOnScreen() const throw(css::uno::RuntimeException, std::exception) override;
80 virtual Rectangle GetBoundingBox() const throw (css::uno::RuntimeException, std::exception) override;
82 private:
83 ScPreviewShell* mpViewShell;
84 sal_Int32 mnIndex;
85 bool mbHeader;
86 typedef std::vector< ScAccessiblePageHeaderArea* > ScHFAreas;
87 ScHFAreas maAreas;
88 sal_Int32 mnChildCount;
90 bool IsDefunc(
91 const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates);
93 void AddChild(const EditTextObject* pArea, sal_uInt32 nIndex, SvxAdjust eAdjust);
96 #endif
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */