1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef SD_ACCESSIBILITY_ACCESSIBLE_OUTLINE_EDITSOURCE_HXX 29 #define SD_ACCESSIBILITY_ACCESSIBLE_OUTLINE_EDITSOURCE_HXX 30 31 #include <memory> 32 #include <vcl/svapp.hxx> 33 #include <svl/brdcst.hxx> 34 #include <svl/lstner.hxx> 35 #include <editeng/unoedsrc.hxx> 36 #include <editeng/editdata.hxx> 37 #include <editeng/unoforou.hxx> 38 #include <editeng/unoviwou.hxx> 39 40 class OutlinerView; 41 class SdrOutliner; 42 class SdrView; 43 class Window; 44 45 namespace accessibility 46 { 47 /** Implementation of the SvxEditSource interface in the SdOutlineView 48 49 This class connects the SdOutlineView and its EditEngine 50 outliner with the AccessibleTextHelper, which provides all 51 necessary functionality to make the outliner text accessible 52 53 @see SvxEditSource 54 @see SvxViewForwarder 55 */ 56 class AccessibleOutlineEditSource : public SvxEditSource, public SvxViewForwarder, public SfxBroadcaster, public SfxListener 57 { 58 public: 59 /// Create an SvxEditSource interface for the given Outliner 60 AccessibleOutlineEditSource( 61 SdrOutliner& rOutliner, 62 SdrView& rView, 63 OutlinerView& rOutlView, 64 const ::Window& rViewWindow ); 65 virtual ~AccessibleOutlineEditSource(); 66 67 /// This method is disabled and always returns NULL 68 virtual SvxEditSource* Clone() const; 69 virtual SvxTextForwarder* GetTextForwarder(); 70 virtual SvxViewForwarder* GetViewForwarder(); 71 virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool bCreate = sal_False ); 72 virtual void UpdateData(); 73 virtual SfxBroadcaster& GetBroadcaster() const; 74 75 // the view forwarder 76 virtual sal_Bool IsValid() const; 77 virtual Rectangle GetVisArea() const; 78 virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; 79 virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; 80 81 // SfxListener 82 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 83 84 private: 85 86 // declared, but not defined 87 AccessibleOutlineEditSource( const AccessibleOutlineEditSource& ); 88 AccessibleOutlineEditSource& operator=( const AccessibleOutlineEditSource& ); 89 90 DECL_LINK( NotifyHdl, EENotify* ); 91 92 SdrView& mrView; 93 const ::Window& mrWindow; 94 SdrOutliner* mpOutliner; 95 OutlinerView* mpOutlinerView; 96 97 SvxOutlinerForwarder mTextForwarder; 98 SvxDrawOutlinerViewForwarder mViewForwarder; 99 100 }; 101 102 } // end of namespace accessibility 103 104 #endif 105