Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / AccessiblePageHeaderArea.hxx
blob6031c7d973c2760f7f2cd1ac48657519d6114530
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 .
21 #ifndef _SC_ACCESSIBLEPAGEHEADERAREA_HXX
22 #define _SC_ACCESSIBLEPAGEHEADERAREA_HXX
24 #include "AccessibleContextBase.hxx"
25 #include <editeng/svxenum.hxx>
27 class EditTextObject;
28 namespace accessibility
30 class AccessibleTextHelper;
32 class ScPreviewShell;
34 class ScAccessiblePageHeaderArea
35 : public ScAccessibleContextBase
37 public:
38 //===== internal ========================================================
39 ScAccessiblePageHeaderArea(
40 const ::com::sun::star::uno::Reference<
41 ::com::sun::star::accessibility::XAccessible>& rxParent,
42 ScPreviewShell* pViewShell,
43 const EditTextObject* pEditObj,
44 sal_Bool bHeader,
45 SvxAdjust eAdjust);
46 protected:
47 virtual ~ScAccessiblePageHeaderArea (void);
48 public:
49 const EditTextObject* GetEditTextObject() const { return mpEditObj; }
51 using ScAccessibleContextBase::disposing;
52 virtual void SAL_CALL disposing();
54 ///===== SfxListener =====================================================
56 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
58 ///===== XAccessibleComponent ============================================
60 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
61 SAL_CALL getAccessibleAtPoint(
62 const ::com::sun::star::awt::Point& rPoint )
63 throw (::com::sun::star::uno::RuntimeException);
65 ///===== XAccessibleContext ==============================================
67 /// Return the number of currently visible children.
68 // is overloaded to calculate this on demand
69 virtual sal_Int32 SAL_CALL
70 getAccessibleChildCount(void)
71 throw (::com::sun::star::uno::RuntimeException);
73 /// Return the specified child or NULL if index is invalid.
74 // is overloaded to calculate this on demand
75 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
76 getAccessibleChild(sal_Int32 nIndex)
77 throw (::com::sun::star::uno::RuntimeException,
78 ::com::sun::star::lang::IndexOutOfBoundsException);
80 /// Return the set of current states.
81 virtual ::com::sun::star::uno::Reference<
82 ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
83 getAccessibleStateSet(void)
84 throw (::com::sun::star::uno::RuntimeException);
86 ///===== XServiceInfo ====================================================
88 /** Returns an identifier for the implementation of this object.
90 virtual OUString SAL_CALL
91 getImplementationName(void)
92 throw (::com::sun::star::uno::RuntimeException);
94 /** Returns a list of all supported services. In this case that is just
95 the AccessibleContext and Accessible service.
97 virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL
98 getSupportedServiceNames(void)
99 throw (::com::sun::star::uno::RuntimeException);
101 ///===== XTypeProvider ===================================================
103 /** Returns a implementation id.
105 virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
106 getImplementationId(void)
107 throw (::com::sun::star::uno::RuntimeException);
109 protected:
110 virtual OUString SAL_CALL createAccessibleDescription(void) throw(::com::sun::star::uno::RuntimeException);
111 virtual OUString SAL_CALL createAccessibleName(void) throw (::com::sun::star::uno::RuntimeException);
113 virtual Rectangle GetBoundingBoxOnScreen(void) const throw(::com::sun::star::uno::RuntimeException);
114 virtual Rectangle GetBoundingBox(void) const throw (::com::sun::star::uno::RuntimeException);
116 private:
117 EditTextObject* mpEditObj;
118 accessibility::AccessibleTextHelper* mpTextHelper;
119 ScPreviewShell* mpViewShell;
120 sal_Bool mbHeader;
121 SvxAdjust meAdjust;
123 void CreateTextHelper();
127 #endif
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */