Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / AccessibleDocumentPagePreview.hxx
blob1de55098655eea518e280074ac03b1bf19da97aa
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_ACCESSIBLEDOCUMENTPAGEPREVIEW_HXX
22 #define _SC_ACCESSIBLEDOCUMENTPAGEPREVIEW_HXX
24 #include "AccessibleDocumentBase.hxx"
26 class ScPreviewShell;
27 class ScNotesChildren;
28 class ScShapeChildren;
29 class ScAccessiblePreviewTable;
30 class ScAccessiblePageHeader;
32 class ScAccessibleDocumentPagePreview
33 : public ScAccessibleDocumentBase
35 public:
36 //===== internal ========================================================
37 ScAccessibleDocumentPagePreview(
38 const ::com::sun::star::uno::Reference<
39 ::com::sun::star::accessibility::XAccessible>& rxParent,
40 ScPreviewShell* pViewShell );
41 protected:
42 virtual ~ScAccessibleDocumentPagePreview(void);
44 using ScAccessibleDocumentBase::IsDefunc;
46 public:
47 using ScAccessibleContextBase::disposing;
49 virtual void SAL_CALL disposing();
51 ///===== SfxListener =====================================================
53 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
55 ///===== XAccessibleComponent ============================================
57 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
58 SAL_CALL getAccessibleAtPoint(
59 const ::com::sun::star::awt::Point& rPoint )
60 throw (::com::sun::star::uno::RuntimeException);
62 virtual void SAL_CALL grabFocus( )
63 throw (::com::sun::star::uno::RuntimeException);
65 ///===== XAccessibleContext ==============================================
67 /// Return the number of currently visible children.
68 virtual sal_Int32 SAL_CALL
69 getAccessibleChildCount(void)
70 throw (::com::sun::star::uno::RuntimeException);
72 /// Return the specified child or NULL if index is invalid.
73 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
74 getAccessibleChild(sal_Int32 nIndex)
75 throw (::com::sun::star::uno::RuntimeException,
76 ::com::sun::star::lang::IndexOutOfBoundsException);
78 /// Return the set of current states.
79 virtual ::com::sun::star::uno::Reference<
80 ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
81 getAccessibleStateSet(void)
82 throw (::com::sun::star::uno::RuntimeException);
84 ///===== XServiceInfo ====================================================
86 /** Returns an identifier for the implementation of this object.
88 virtual OUString SAL_CALL
89 getImplementationName(void)
90 throw (::com::sun::star::uno::RuntimeException);
92 /** Returns a list of all supported services.
94 virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL
95 getSupportedServiceNames(void)
96 throw (::com::sun::star::uno::RuntimeException);
98 ///===== XTypeProvider ===================================================
100 /** Returns a implementation id.
102 virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
103 getImplementationId(void)
104 throw (::com::sun::star::uno::RuntimeException);
106 ///===== internal ========================================================
108 protected:
109 /// Return this object's description.
110 virtual OUString SAL_CALL
111 createAccessibleDescription(void)
112 throw (::com::sun::star::uno::RuntimeException);
114 /// Return the object's current name.
115 virtual OUString SAL_CALL
116 createAccessibleName(void)
117 throw (::com::sun::star::uno::RuntimeException);
119 public: // needed in ScShapeChildren
120 /// Return the object's current bounding box relative to the desktop.
121 virtual Rectangle GetBoundingBoxOnScreen(void) const
122 throw (::com::sun::star::uno::RuntimeException);
124 protected:
125 /// Return the object's current bounding box relative to the parent object.
126 virtual Rectangle GetBoundingBox(void) const
127 throw (::com::sun::star::uno::RuntimeException);
129 private:
130 ScPreviewShell* mpViewShell;
131 ScNotesChildren* mpNotesChildren;
132 ScShapeChildren* mpShapeChildren;
133 ScAccessiblePreviewTable* mpTable;
134 ScAccessiblePageHeader* mpHeader;
135 ScAccessiblePageHeader* mpFooter;
137 sal_Bool IsDefunc(
138 const com::sun::star::uno::Reference<
139 ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
141 ScNotesChildren* GetNotesChildren();
142 ScShapeChildren* GetShapeChildren();
146 #endif
148 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */