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