1*c45d927aSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*c45d927aSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*c45d927aSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*c45d927aSAndrew Rist  * distributed with this work for additional information
6*c45d927aSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*c45d927aSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*c45d927aSAndrew Rist  * "License"); you may not use this file except in compliance
9*c45d927aSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*c45d927aSAndrew Rist  *
11*c45d927aSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*c45d927aSAndrew Rist  *
13*c45d927aSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*c45d927aSAndrew Rist  * software distributed under the License is distributed on an
15*c45d927aSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c45d927aSAndrew Rist  * KIND, either express or implied.  See the License for the
17*c45d927aSAndrew Rist  * specific language governing permissions and limitations
18*c45d927aSAndrew Rist  * under the License.
19*c45d927aSAndrew Rist  *
20*c45d927aSAndrew Rist  *************************************************************/
21*c45d927aSAndrew Rist 
22*c45d927aSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SD_ACCESSIBILITY_ACCESSIBLE_OUTLINE_EDITSOURCE_HXX
25cdf0e10cSrcweir #define SD_ACCESSIBILITY_ACCESSIBLE_OUTLINE_EDITSOURCE_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <memory>
28cdf0e10cSrcweir #include <vcl/svapp.hxx>
29cdf0e10cSrcweir #include <svl/brdcst.hxx>
30cdf0e10cSrcweir #include <svl/lstner.hxx>
31cdf0e10cSrcweir #include <editeng/unoedsrc.hxx>
32cdf0e10cSrcweir #include <editeng/editdata.hxx>
33cdf0e10cSrcweir #include <editeng/unoforou.hxx>
34cdf0e10cSrcweir #include <editeng/unoviwou.hxx>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir class OutlinerView;
37cdf0e10cSrcweir class SdrOutliner;
38cdf0e10cSrcweir class SdrView;
39cdf0e10cSrcweir class Window;
40cdf0e10cSrcweir 
41cdf0e10cSrcweir namespace accessibility
42cdf0e10cSrcweir {
43cdf0e10cSrcweir 	/**	Implementation of the SvxEditSource interface in the SdOutlineView
44cdf0e10cSrcweir 
45cdf0e10cSrcweir 		This class connects the SdOutlineView and its EditEngine
46cdf0e10cSrcweir 		outliner with the AccessibleTextHelper, which provides all
47cdf0e10cSrcweir 		necessary functionality to make the outliner text accessible
48cdf0e10cSrcweir 
49cdf0e10cSrcweir     	@see SvxEditSource
50cdf0e10cSrcweir     	@see SvxViewForwarder
51cdf0e10cSrcweir     */
52cdf0e10cSrcweir     class AccessibleOutlineEditSource :	public SvxEditSource, public SvxViewForwarder, public SfxBroadcaster, public SfxListener
53cdf0e10cSrcweir     {
54cdf0e10cSrcweir     public:
55cdf0e10cSrcweir         /// Create an SvxEditSource interface for the given Outliner
56cdf0e10cSrcweir         AccessibleOutlineEditSource(
57cdf0e10cSrcweir             SdrOutliner& rOutliner,
58cdf0e10cSrcweir             SdrView& rView,
59cdf0e10cSrcweir             OutlinerView& rOutlView,
60cdf0e10cSrcweir             const ::Window& rViewWindow );
61cdf0e10cSrcweir         virtual ~AccessibleOutlineEditSource();
62cdf0e10cSrcweir 
63cdf0e10cSrcweir         /// This method is disabled and always returns NULL
64cdf0e10cSrcweir         virtual SvxEditSource* 			Clone() const;
65cdf0e10cSrcweir         virtual SvxTextForwarder* 		GetTextForwarder();
66cdf0e10cSrcweir         virtual SvxViewForwarder* 		GetViewForwarder();
67cdf0e10cSrcweir         virtual SvxEditViewForwarder*  	GetEditViewForwarder( sal_Bool bCreate = sal_False );
68cdf0e10cSrcweir         virtual void					UpdateData();
69cdf0e10cSrcweir         virtual SfxBroadcaster&			GetBroadcaster() const;
70cdf0e10cSrcweir 
71cdf0e10cSrcweir         // the view forwarder
72cdf0e10cSrcweir         virtual sal_Bool		IsValid() const;
73cdf0e10cSrcweir         virtual Rectangle	GetVisArea() const;
74cdf0e10cSrcweir         virtual Point		LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
75cdf0e10cSrcweir         virtual Point		PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
76cdf0e10cSrcweir 
77cdf0e10cSrcweir         // SfxListener
78cdf0e10cSrcweir         virtual void		Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
79cdf0e10cSrcweir 
80cdf0e10cSrcweir     private:
81cdf0e10cSrcweir 
82cdf0e10cSrcweir         // declared, but not defined
83cdf0e10cSrcweir         AccessibleOutlineEditSource( const AccessibleOutlineEditSource& );
84cdf0e10cSrcweir         AccessibleOutlineEditSource& operator=( const AccessibleOutlineEditSource& );
85cdf0e10cSrcweir 
86cdf0e10cSrcweir         DECL_LINK( NotifyHdl, EENotify* );
87cdf0e10cSrcweir 
88cdf0e10cSrcweir         SdrView&						mrView;
89cdf0e10cSrcweir         const ::Window& mrWindow;
90cdf0e10cSrcweir         SdrOutliner*					mpOutliner;
91cdf0e10cSrcweir         OutlinerView* mpOutlinerView;
92cdf0e10cSrcweir 
93cdf0e10cSrcweir         SvxOutlinerForwarder			mTextForwarder;
94cdf0e10cSrcweir         SvxDrawOutlinerViewForwarder	mViewForwarder;
95cdf0e10cSrcweir 
96cdf0e10cSrcweir     };
97cdf0e10cSrcweir 
98cdf0e10cSrcweir } // end of namespace accessibility
99cdf0e10cSrcweir 
100cdf0e10cSrcweir #endif
101