xref: /aoo42x/main/sw/inc/accmap.hxx (revision ca62e2c2)
11d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
31d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
41d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
51d2dbeb0SAndrew Rist  * distributed with this work for additional information
61d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
71d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
81d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
91d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
101d2dbeb0SAndrew Rist  *
111d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
121d2dbeb0SAndrew Rist  *
131d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
141d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
151d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
161d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
171d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
181d2dbeb0SAndrew Rist  * under the License.
191d2dbeb0SAndrew Rist  *
201d2dbeb0SAndrew Rist  *************************************************************/
211d2dbeb0SAndrew Rist 
221d2dbeb0SAndrew Rist 
23cdf0e10cSrcweir #ifndef _ACCMAP_HXX
24cdf0e10cSrcweir #define _ACCMAP_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <cppuhelper/weakref.hxx>
27cdf0e10cSrcweir #include <com/sun/star/accessibility/XAccessible.hpp>
28cdf0e10cSrcweir #include <vos/ref.hxx>
29cdf0e10cSrcweir #include <vos/mutex.hxx>
30cdf0e10cSrcweir #include <svx/IAccessibleViewForwarder.hxx>
31cdf0e10cSrcweir #include <svx/IAccessibleParent.hxx>
32cdf0e10cSrcweir #include <tools/debug.hxx>
33cdf0e10cSrcweir #include <tools/fract.hxx>
34cdf0e10cSrcweir 
35*ca62e2c2SSteve Yin //IAccessibility2 Implementation 2009-----
36*ca62e2c2SSteve Yin #include <svx/AccessibleControlShape.hxx>
37*ca62e2c2SSteve Yin #include <svx/AccessibleShape.hxx>
38*ca62e2c2SSteve Yin #include "fesh.hxx"
39cdf0e10cSrcweir #include <vector>
40*ca62e2c2SSteve Yin #include <set>
41*ca62e2c2SSteve Yin class SwAccessibleParagraph;
42*ca62e2c2SSteve Yin //-----IAccessibility2 Implementation 2009
43cdf0e10cSrcweir 
44cdf0e10cSrcweir class ViewShell;
45cdf0e10cSrcweir class Rectangle;
46cdf0e10cSrcweir class SwFrm;
47cdf0e10cSrcweir class SwTxtFrm;
48cdf0e10cSrcweir class SwPageFrm;
49cdf0e10cSrcweir class SwAccessibleContext;
50cdf0e10cSrcweir class SwAccessibleContextMap_Impl;
51cdf0e10cSrcweir class SwAccessibleEventList_Impl;
52cdf0e10cSrcweir class SwAccessibleEventMap_Impl;
53cdf0e10cSrcweir class SwShapeList_Impl;
54cdf0e10cSrcweir class SdrObject;
55cdf0e10cSrcweir namespace accessibility {
56cdf0e10cSrcweir     class AccessibleShape;
57cdf0e10cSrcweir }
58cdf0e10cSrcweir class SwAccessibleShapeMap_Impl;
59cdf0e10cSrcweir struct SwAccessibleEvent_Impl;
60cdf0e10cSrcweir class SwAccessibleSelectedParas_Impl;
61cdf0e10cSrcweir class SwRect;
62cdf0e10cSrcweir class MapMode;
63cdf0e10cSrcweir class SwAccPreviewData;
64cdf0e10cSrcweir struct PrevwPage;
65cdf0e10cSrcweir class Window;
66cdf0e10cSrcweir 
67cdf0e10cSrcweir // real states for events
68cdf0e10cSrcweir #define ACC_STATE_EDITABLE 0x01
69cdf0e10cSrcweir #define ACC_STATE_OPAQUE 0x02
70cdf0e10cSrcweir 
71cdf0e10cSrcweir // pseudo states for events
72cdf0e10cSrcweir // --> OD 2009-01-07 #i88069# - pseudo state for event TEXT_ATTRIBUTE_CHANGED
73cdf0e10cSrcweir #define ACC_STATE_TEXT_ATTRIBUTE_CHANGED 0x0200
74cdf0e10cSrcweir // <--
75cdf0e10cSrcweir // --> OD 2005-12-12 #i27301# - pseudo state for event TEXT_SELECTION_CHANGED
76cdf0e10cSrcweir #define ACC_STATE_TEXT_SELECTION_CHANGED 0x0100
77cdf0e10cSrcweir // <--
78cdf0e10cSrcweir #define ACC_STATE_CARET 0x80
79cdf0e10cSrcweir #define ACC_STATE_RELATION_FROM 0x40
80cdf0e10cSrcweir #define ACC_STATE_RELATION_TO 0x20
81cdf0e10cSrcweir 
82cdf0e10cSrcweir #define ACC_STATE_RELATION_MASK 0x60
83cdf0e10cSrcweir 
84cdf0e10cSrcweir #define ACC_STATE_MASK 0x1F
85cdf0e10cSrcweir 
86cdf0e10cSrcweir // --> OD 2005-12-12 #i27301# - introduce type definition of states
87cdf0e10cSrcweir typedef sal_uInt16 tAccessibleStates;
88cdf0e10cSrcweir // <--
89cdf0e10cSrcweir 
90*ca62e2c2SSteve Yin class SwAccessibleMap : public ::accessibility::IAccessibleViewForwarder,
91*ca62e2c2SSteve Yin 						public ::accessibility::IAccessibleParent
92cdf0e10cSrcweir {
93cdf0e10cSrcweir     mutable ::vos::OMutex maMutex;
94cdf0e10cSrcweir 	::vos::OMutex maEventMutex;
95cdf0e10cSrcweir 	SwAccessibleContextMap_Impl *mpFrmMap;
96cdf0e10cSrcweir 	SwAccessibleShapeMap_Impl *mpShapeMap;
97cdf0e10cSrcweir 	SwShapeList_Impl *mpShapes;
98cdf0e10cSrcweir 	SwAccessibleEventList_Impl *mpEvents;
99cdf0e10cSrcweir 	SwAccessibleEventMap_Impl *mpEventMap;
100cdf0e10cSrcweir     // --> OD 2005-12-13 #i27301# - data structure to keep information about
101cdf0e10cSrcweir     // accessible paragraph, which have a selection.
102cdf0e10cSrcweir     SwAccessibleSelectedParas_Impl* mpSelectedParas;
103cdf0e10cSrcweir     // <--
104cdf0e10cSrcweir     ViewShell *mpVSh;
105cdf0e10cSrcweir     /// for page preview: store preview data, VisArea, and mapping of
106cdf0e10cSrcweir     /// preview-to-display coordinates
107cdf0e10cSrcweir     SwAccPreviewData* mpPreview;
108cdf0e10cSrcweir 
109cdf0e10cSrcweir 	::com::sun::star::uno::WeakReference < ::com::sun::star::accessibility::XAccessible > mxCursorContext;
110cdf0e10cSrcweir 
111cdf0e10cSrcweir 	sal_Int32 mnPara;
112cdf0e10cSrcweir 	sal_Int32 mnFootnote;
113cdf0e10cSrcweir 	sal_Int32 mnEndnote;
114cdf0e10cSrcweir 
115cdf0e10cSrcweir 
116cdf0e10cSrcweir 	sal_Bool mbShapeSelected;
117cdf0e10cSrcweir 
118cdf0e10cSrcweir 	void FireEvent( const SwAccessibleEvent_Impl& rEvent );
119cdf0e10cSrcweir 
120cdf0e10cSrcweir 	void AppendEvent( const SwAccessibleEvent_Impl& rEvent );
121cdf0e10cSrcweir 
122cdf0e10cSrcweir 	void InvalidateCursorPosition(
123cdf0e10cSrcweir 		const ::com::sun::star::uno::Reference<
124cdf0e10cSrcweir 			::com::sun::star::accessibility::XAccessible>& rAcc );
125*ca62e2c2SSteve Yin 	//IAccessibility2 Implementation 2009-----
126*ca62e2c2SSteve Yin 	void DoInvalidateShapeSelection(sal_Bool bInvalidateFocusMode = sal_False);
127*ca62e2c2SSteve Yin 
128*ca62e2c2SSteve Yin 	//Replace by DoInvalidateShapeSelection
129*ca62e2c2SSteve Yin 	//void DoInvalidateShapeFocus();
130cdf0e10cSrcweir 	void InvalidateShapeSelection();
131cdf0e10cSrcweir 
132*ca62e2c2SSteve Yin 	//mpSelectedFrmMap contains the old selected objects.
133*ca62e2c2SSteve Yin 	SwAccessibleContextMap_Impl *mpSeletedFrmMap;
134*ca62e2c2SSteve Yin 	//IvalidateShapeInParaSelection() method is reponsible for the updating the selected states of the objects.
135*ca62e2c2SSteve Yin 	void InvalidateShapeInParaSelection();
136*ca62e2c2SSteve Yin 	//-----IAccessibility2 Implementation 2009
137*ca62e2c2SSteve Yin 
138cdf0e10cSrcweir     void _InvalidateRelationSet( const SwFrm* pFrm, sal_Bool bFrom );
139cdf0e10cSrcweir 
140cdf0e10cSrcweir 	::com::sun::star::uno::Reference<
141cdf0e10cSrcweir 		::com::sun::star::accessibility::XAccessible>
142cdf0e10cSrcweir             _GetDocumentView( sal_Bool bPagePreview );
143cdf0e10cSrcweir 
144cdf0e10cSrcweir     /** method to build up a new data structure of the accessible pararaphs,
145cdf0e10cSrcweir         which have a selection
146cdf0e10cSrcweir 
147cdf0e10cSrcweir         OD 2005-12-13 #i27301#
148cdf0e10cSrcweir         Important note: method has to used inside a mutual exclusive section
149cdf0e10cSrcweir 
150cdf0e10cSrcweir         @author OD
151cdf0e10cSrcweir     */
152cdf0e10cSrcweir     SwAccessibleSelectedParas_Impl* _BuildSelectedParas();
153cdf0e10cSrcweir 
154cdf0e10cSrcweir public:
155cdf0e10cSrcweir 
156cdf0e10cSrcweir 	SwAccessibleMap( ViewShell *pSh );
157cdf0e10cSrcweir 	~SwAccessibleMap();
158cdf0e10cSrcweir 
159cdf0e10cSrcweir 	::com::sun::star::uno::Reference<
160cdf0e10cSrcweir 		::com::sun::star::accessibility::XAccessible> GetDocumentView();
161cdf0e10cSrcweir 
162cdf0e10cSrcweir     // OD 15.01.2003 #103492# - complete re-factoring of method due to new
163cdf0e10cSrcweir     // page/print preview functionality.
164cdf0e10cSrcweir     ::com::sun::star::uno::Reference<
165cdf0e10cSrcweir         ::com::sun::star::accessibility::XAccessible> GetDocumentPreview(
166cdf0e10cSrcweir                             const std::vector<PrevwPage*>& _rPrevwPages,
167cdf0e10cSrcweir                             const Fraction&  _rScale,
168cdf0e10cSrcweir                             const SwPageFrm* _pSelectedPageFrm,
169cdf0e10cSrcweir                             const Size&      _rPrevwWinSize );
170cdf0e10cSrcweir 
171cdf0e10cSrcweir 	::vos::ORef < SwAccessibleContext > GetContextImpl(
172cdf0e10cSrcweir 									 			const SwFrm *pFrm,
173cdf0e10cSrcweir 												sal_Bool bCreate = sal_True );
174cdf0e10cSrcweir 	::com::sun::star::uno::Reference<
175cdf0e10cSrcweir 		::com::sun::star::accessibility::XAccessible> GetContext(
176cdf0e10cSrcweir 									 			const SwFrm *pFrm,
177cdf0e10cSrcweir 												sal_Bool bCreate = sal_True );
178cdf0e10cSrcweir 
179cdf0e10cSrcweir 	::vos::ORef < ::accessibility::AccessibleShape > GetContextImpl(
180cdf0e10cSrcweir 										const SdrObject *pObj,
181cdf0e10cSrcweir 										SwAccessibleContext *pParentImpl,
182cdf0e10cSrcweir 										sal_Bool bCreate = sal_True );
183cdf0e10cSrcweir 	::com::sun::star::uno::Reference<
184cdf0e10cSrcweir 		::com::sun::star::accessibility::XAccessible> GetContext(
185cdf0e10cSrcweir 										const SdrObject *pObj,
186cdf0e10cSrcweir 										SwAccessibleContext *pParentImpl,
187cdf0e10cSrcweir 										sal_Bool bCreate = sal_True );
188cdf0e10cSrcweir 
189cdf0e10cSrcweir     inline ViewShell* GetShell() const
190cdf0e10cSrcweir     {
191cdf0e10cSrcweir         return mpVSh;
192cdf0e10cSrcweir     }
193*ca62e2c2SSteve Yin 	//IAccessibility2 Implementation 2009-----
194*ca62e2c2SSteve Yin 	sal_Bool IsInSameLevel(const SdrObject* pObj, const SwFEShell* pFESh);
195*ca62e2c2SSteve Yin 	void AddShapeContext(const SdrObject *pObj,
196*ca62e2c2SSteve Yin 							 ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > xAccShape);
197*ca62e2c2SSteve Yin 
198*ca62e2c2SSteve Yin 	void AddGroupContext(const SdrObject *pParentObj,
199*ca62e2c2SSteve Yin 					::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > xAccParent);
200*ca62e2c2SSteve Yin 	void RemoveGroupContext(const SdrObject *pParentObj, ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > xAccParent);
201*ca62e2c2SSteve Yin 	//-----IAccessibility2 Implementation 2009
202cdf0e10cSrcweir 
203cdf0e10cSrcweir     const SwRect& GetVisArea() const;
204cdf0e10cSrcweir 
205cdf0e10cSrcweir     /** get size of a dedicated preview page
206cdf0e10cSrcweir 
207cdf0e10cSrcweir         OD 15.01.2003 #103492#
208cdf0e10cSrcweir         complete re-factoring of previous method due to new page/print preview
209cdf0e10cSrcweir         functionality.
210cdf0e10cSrcweir 
211cdf0e10cSrcweir         @author OD
212cdf0e10cSrcweir 
213cdf0e10cSrcweir         @param _nPrevwPageNum
214cdf0e10cSrcweir         input parameter - physical page number of page visible in the page preview
215cdf0e10cSrcweir 
216cdf0e10cSrcweir         @return an object of class <Size>
217cdf0e10cSrcweir     */
218cdf0e10cSrcweir     Size GetPreViewPageSize( sal_uInt16 _nPrevwPageNum ) const;
219cdf0e10cSrcweir 
220cdf0e10cSrcweir 	void RemoveContext( const SwFrm *pFrm );
221cdf0e10cSrcweir 	void RemoveContext( const SdrObject *pObj );
222cdf0e10cSrcweir 
223cdf0e10cSrcweir 	// Dispose frame and its children if bRecursive is set
224cdf0e10cSrcweir     void Dispose( const SwFrm* pFrm,
225cdf0e10cSrcweir                   const SdrObject* pObj,
226cdf0e10cSrcweir                   Window* pWindow,
227cdf0e10cSrcweir                   sal_Bool bRecursive = sal_False );
228cdf0e10cSrcweir 
229cdf0e10cSrcweir     void InvalidatePosOrSize( const SwFrm* pFrm,
230cdf0e10cSrcweir                               const SdrObject* pObj,
231cdf0e10cSrcweir                               Window* pWindow,
232cdf0e10cSrcweir 							  const SwRect& rOldFrm );
233cdf0e10cSrcweir 
234cdf0e10cSrcweir 	void InvalidateContent( const SwFrm *pFrm );
235cdf0e10cSrcweir 
236cdf0e10cSrcweir     // --> OD 2009-01-06 #i88069#
237cdf0e10cSrcweir     void InvalidateAttr( const SwTxtFrm& rTxtFrm );
238cdf0e10cSrcweir     // <--
239cdf0e10cSrcweir 
240cdf0e10cSrcweir 	void InvalidateCursorPosition( const SwFrm *pFrm );
241cdf0e10cSrcweir 	void InvalidateFocus();
242*ca62e2c2SSteve Yin 	//IAccessibility2 Implementation 2009-----
243*ca62e2c2SSteve Yin 	void FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage);
244*ca62e2c2SSteve Yin 	void FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection);
245*ca62e2c2SSteve Yin 	void FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn);
246*ca62e2c2SSteve Yin 	//-----IAccessibility2 Implementation 2009
247cdf0e10cSrcweir 	void SetCursorContext(
248cdf0e10cSrcweir 		const ::vos::ORef < SwAccessibleContext >& rCursorContext );
249cdf0e10cSrcweir 
250cdf0e10cSrcweir 	// Invalidate state of whole tree. If an action is open, this call
251cdf0e10cSrcweir 	// is processed when the last action ends.
252cdf0e10cSrcweir     // --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
253cdf0e10cSrcweir     void InvalidateStates( tAccessibleStates _nStates,
254cdf0e10cSrcweir                            const SwFrm* _pFrm = 0 );
255cdf0e10cSrcweir 
256cdf0e10cSrcweir     void InvalidateRelationSet( const SwFrm* pMaster, const SwFrm* pFollow );
257cdf0e10cSrcweir 
258cdf0e10cSrcweir     /** invalidation CONTENT_FLOWS_FROM/_TO relation of a paragraph
259cdf0e10cSrcweir 
260cdf0e10cSrcweir         OD 2005-12-01 #i27138#
261cdf0e10cSrcweir 
262cdf0e10cSrcweir         @author OD
263cdf0e10cSrcweir 
264cdf0e10cSrcweir         @param _rTxtFrm
265cdf0e10cSrcweir         input parameter - reference to paragraph, whose CONTENT_FLOWS_FROM/_TO
266cdf0e10cSrcweir         has to be invalidated.
267cdf0e10cSrcweir 
268cdf0e10cSrcweir         @param _bFrom
269cdf0e10cSrcweir         input parameter - boolean indicating, if relation CONTENT_FLOWS_FROM
270cdf0e10cSrcweir         (value <true>) or CONTENT_FLOWS_TO (value <false>) has to be invalidated.
271cdf0e10cSrcweir     */
272cdf0e10cSrcweir     void InvalidateParaFlowRelation( const SwTxtFrm& _rTxtFrm,
273cdf0e10cSrcweir                                      const bool _bFrom );
274cdf0e10cSrcweir 
275cdf0e10cSrcweir     /** invalidation of text selection of a paragraph
276cdf0e10cSrcweir 
277cdf0e10cSrcweir         OD 2005-12-12 #i27301#
278cdf0e10cSrcweir 
279cdf0e10cSrcweir         @author OD
280cdf0e10cSrcweir     */
281cdf0e10cSrcweir     void InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm );
282cdf0e10cSrcweir 
283cdf0e10cSrcweir     /** invalidation of text selection of all paragraphs
284cdf0e10cSrcweir 
285cdf0e10cSrcweir         OD 2005-12-13 #i27301#
286cdf0e10cSrcweir 
287cdf0e10cSrcweir         @author OD
288cdf0e10cSrcweir     */
289cdf0e10cSrcweir     void InvalidateTextSelectionOfAllParas();
290cdf0e10cSrcweir 
291cdf0e10cSrcweir     sal_Int32 GetChildIndex( const SwFrm& rParentFrm,
292cdf0e10cSrcweir                              Window& rChild ) const;
293cdf0e10cSrcweir 
294cdf0e10cSrcweir     // update preview data (and fire events if necessary)
295cdf0e10cSrcweir     // OD 15.01.2003 #103492# - complete re-factoring of method due to new
296cdf0e10cSrcweir     // page/print preview functionality.
297cdf0e10cSrcweir     void UpdatePreview( const std::vector<PrevwPage*>& _rPrevwPages,
298cdf0e10cSrcweir                         const Fraction&  _rScale,
299cdf0e10cSrcweir                         const SwPageFrm* _pSelectedPageFrm,
300cdf0e10cSrcweir                         const Size&      _rPrevwWinSize );
301cdf0e10cSrcweir 
302cdf0e10cSrcweir     void InvalidatePreViewSelection( sal_uInt16 nSelPage );
303cdf0e10cSrcweir 	sal_Bool IsPageSelected( const SwPageFrm *pPageFrm ) const;
304cdf0e10cSrcweir 
305cdf0e10cSrcweir 	void FireEvents();
306cdf0e10cSrcweir 
307cdf0e10cSrcweir 
308cdf0e10cSrcweir 	// IAccessibleViewForwarder
309cdf0e10cSrcweir 
310cdf0e10cSrcweir 	virtual sal_Bool IsValid() const;
311cdf0e10cSrcweir     virtual Rectangle GetVisibleArea() const;
312cdf0e10cSrcweir     virtual Point LogicToPixel (const Point& rPoint) const;
313cdf0e10cSrcweir     virtual Size LogicToPixel (const Size& rSize) const;
314cdf0e10cSrcweir     virtual Point PixelToLogic (const Point& rPoint) const;
315cdf0e10cSrcweir     virtual Size PixelToLogic (const Size& rSize) const;
316cdf0e10cSrcweir 
317cdf0e10cSrcweir 	// IAccessibleParent
318cdf0e10cSrcweir     virtual sal_Bool ReplaceChild (
319cdf0e10cSrcweir         ::accessibility::AccessibleShape* pCurrentChild,
320cdf0e10cSrcweir 		const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _rxShape,
321cdf0e10cSrcweir 		const long _nIndex,
322cdf0e10cSrcweir 		const ::accessibility::AccessibleShapeTreeInfo& _rShapeTreeInfo
323cdf0e10cSrcweir 	)	throw (::com::sun::star::uno::RuntimeException);
324*ca62e2c2SSteve Yin 	//IAccessibility2 Implementation 2009-----
325*ca62e2c2SSteve Yin 	virtual ::accessibility::AccessibleControlShape* GetAccControlShapeFromModel
326*ca62e2c2SSteve Yin 		(::com::sun::star::beans::XPropertySet* pSet)
327*ca62e2c2SSteve Yin 		throw (::com::sun::star::uno::RuntimeException);
328*ca62e2c2SSteve Yin 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >   GetAccessibleCaption (
329*ca62e2c2SSteve Yin 		const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape)
330*ca62e2c2SSteve Yin     throw (::com::sun::star::uno::RuntimeException);
331*ca62e2c2SSteve Yin 	//-----IAccessibility2 Implementation 2009
332cdf0e10cSrcweir 
333cdf0e10cSrcweir     // additional Core/Pixel conversions for internal use; also works
334cdf0e10cSrcweir     // for preview
335cdf0e10cSrcweir     Point PixelToCore (const Point& rPoint) const;
336cdf0e10cSrcweir     Rectangle CoreToPixel (const Rectangle& rRect) const;
337cdf0e10cSrcweir 
338cdf0e10cSrcweir private:
339cdf0e10cSrcweir     /** get mapping mode for LogicToPixel and PixelToLogic conversions
340cdf0e10cSrcweir 
341cdf0e10cSrcweir         OD 15.01.2003 #103492#
342cdf0e10cSrcweir         Replacement method <PreviewAdjust(..)> by new method <GetMapMode>.
343cdf0e10cSrcweir         Method returns mapping mode of current output device and adjusts it,
344cdf0e10cSrcweir         if the shell is in page/print preview.
345cdf0e10cSrcweir         Necessary, because <PreviewAdjust(..)> changes mapping mode at current
346cdf0e10cSrcweir         output device for mapping logic document positions to page preview window
347cdf0e10cSrcweir         positions and vice versa and doesn't take care to recover its changes.
348cdf0e10cSrcweir 
349cdf0e10cSrcweir         @author OD
350cdf0e10cSrcweir 
351cdf0e10cSrcweir         @param _rPoint
352cdf0e10cSrcweir         input parameter - constant reference to point to determine the mapping
353cdf0e10cSrcweir         mode adjustments for page/print preview.
354cdf0e10cSrcweir 
355cdf0e10cSrcweir         @param _orMapMode
356cdf0e10cSrcweir         output parameter - reference to the mapping mode, which is determined
357cdf0e10cSrcweir         by the method
358cdf0e10cSrcweir     */
359cdf0e10cSrcweir     void GetMapMode( const Point& _rPoint,
360cdf0e10cSrcweir                      MapMode&     _orMapMode ) const;
361*ca62e2c2SSteve Yin //IAccessibility2 Implementation 2009-----
362*ca62e2c2SSteve Yin public:
363*ca62e2c2SSteve Yin 	virtual sal_Bool IsDocumentSelAll();
364*ca62e2c2SSteve Yin 
365*ca62e2c2SSteve Yin 	::com::sun::star::uno::WeakReference < ::com::sun::star::accessibility::XAccessible >
366*ca62e2c2SSteve Yin 		GetCursorContext() const { return mxCursorContext; }
367*ca62e2c2SSteve Yin 
368*ca62e2c2SSteve Yin     //Para Container for InvalidateCursorPosition
369*ca62e2c2SSteve Yin     typedef std::set< SwAccessibleParagraph* >  SET_PARA;
370*ca62e2c2SSteve Yin     SET_PARA m_setParaAdd;
371*ca62e2c2SSteve Yin     SET_PARA m_setParaRemove;
372*ca62e2c2SSteve Yin     //-----IAccessibility2 Implementation 2009
373cdf0e10cSrcweir };
374cdf0e10cSrcweir #endif
375