xref: /trunk/main/chart2/source/controller/main/ChartController.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
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 
23 #ifndef _CHART_CONTROLLER_HXX
24 #define _CHART_CONTROLLER_HXX
25 
26 #include "LifeTime.hxx"
27 #include "ServiceMacros.hxx"
28 #include "CommandDispatchContainer.hxx"
29 #include "SelectionHelper.hxx"
30 
31 // header for enum SdrDragMode
32 #include <svx/svdtypes.hxx>
33 // header for class Timer
34 #include <vcl/timer.hxx>
35 // header for class MouseEvent
36 #include <vcl/event.hxx>
37 
38 #include <cppuhelper/implbase12.hxx>
39 
40 #include <com/sun/star/accessibility/XAccessible.hpp>
41 #include <com/sun/star/document/XUndoManager.hpp>
42 #include <com/sun/star/frame/XController.hpp>
43 #include <com/sun/star/frame/XDispatchProvider.hpp>
44 #include <com/sun/star/frame/XDispatch.hpp>
45 #include <com/sun/star/view/XSelectionSupplier.hpp>
46 #include <com/sun/star/ui/XContextMenuInterception.hpp>
47 #include <com/sun/star/uno/XWeak.hpp>
48 #include <com/sun/star/util/XCloseListener.hpp>
49 #include <com/sun/star/util/XCloseable.hpp>
50 #include <com/sun/star/lang/XInitialization.hpp>
51 #include <com/sun/star/lang/XServiceInfo.hpp>
52 #include <com/sun/star/uno/XComponentContext.hpp>
53 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
54 #include <com/sun/star/util/XModifyListener.hpp>
55 #include <com/sun/star/util/XModeChangeListener.hpp>
56 #include <com/sun/star/awt/Point.hpp>
57 #include <com/sun/star/awt/Size.hpp>
58 #include <com/sun/star/util/XURLTransformer.hpp>
59 #include <com/sun/star/frame/XLayoutManagerListener.hpp>
60 #include <com/sun/star/frame/XLayoutManagerEventBroadcaster.hpp>
61 
62 #include <memory>
63 #include <boost/shared_ptr.hpp>
64 #include <set>
65 
66 
67 class SdrModel;
68 
69 namespace svt
70 {
71     class AcceleratorExecute;
72 }
73 
74 class DropTargetHelper;
75 
76 namespace com { namespace sun { namespace star {
77 namespace graphic {
78     class XGraphic;
79 }
80 }}}
81 
82 
83 //.............................................................................
84 namespace chart
85 {
86 //.............................................................................
87 
88 class UndoGuard;
89 
90 enum ChartDrawMode { CHARTDRAW_INSERT, CHARTDRAW_SELECT };
91 
92 class WindowController
93 {
94 public:
~WindowController()95     virtual ~WindowController() {};
96 
97     virtual void PrePaint()=0;
98     virtual void execute_Paint( const Rectangle& rRect )=0;
99     virtual void execute_MouseButtonDown( const MouseEvent& rMEvt )=0;
100     virtual void execute_MouseMove( const MouseEvent& rMEvt )=0;
101     virtual void execute_Tracking( const TrackingEvent& rTEvt )=0;
102     virtual void execute_MouseButtonUp( const MouseEvent& rMEvt )=0;
103     virtual void execute_Resize()=0;
104     virtual void execute_Activate()=0;
105     virtual void execute_Deactivate()=0;
106     virtual void execute_GetFocus()=0;
107     virtual void execute_LoseFocus()=0;
108     virtual void execute_Command( const CommandEvent& rCEvt )=0;
109     virtual bool execute_KeyInput( const KeyEvent& rKEvt )=0;
110 
111     /** get help text to be shown in a quick help
112 
113         @param aAtLogicPosition the position in logic coordinates (of the
114                                 window) of the mouse cursor to determine for
115                                 which object help is requested.
116 
117         @param bIsBalloonHelp determines whether to return the long text version
118                               (balloon help) or the shorter one (quick help).
119 
120         @param rOutQuickHelpText is filled with the quick help text
121 
122         @param rOutEqualRect is filled with a rectangle that denotes the region
123                              in which the quick help does not change.
124 
125         @return </sal_True>, if a quick help should be shown.
126      */
127     virtual bool requestQuickHelp(
128         ::Point aAtLogicPosition, bool bIsBalloonHelp,
129         ::rtl::OUString & rOutQuickHelpText, ::com::sun::star::awt::Rectangle & rOutEqualRect ) = 0;
130 
131     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() = 0;
132 };
133 
134 class ChartWindow;
135 class DrawModelWrapper;
136 class DrawViewWrapper;
137 class ViewElementListProvider;
138 class ReferenceSizeProvider;
139 
140 class ChartController   : public ::cppu::WeakImplHelper12 <
141          ::com::sun::star::frame::XController   //comprehends XComponent (required interface)
142         ,::com::sun::star::frame::XDispatchProvider     //(required interface)
143         ,::com::sun::star::view::XSelectionSupplier     //(optional interface)
144         ,::com::sun::star::ui::XContextMenuInterception //(optional interface)
145         ,::com::sun::star::util::XCloseListener         //(needed for communication with XModel)
146         ,::com::sun::star::lang::XServiceInfo
147     //  ,public ::com::sun::star::uno::XWeak            // implemented by WeakImplHelper(optional interface)
148     //  ,public ::com::sun::star::uno::XInterface       // implemented by WeakImplHelper(optional interface)
149     //  ,public ::com::sun::star::lang::XTypeProvider   // implemented by WeakImplHelper
150         ,::com::sun::star::frame::XDispatch
151         ,::com::sun::star::awt::XWindow //this is the Window Controller part of this Controller, that will be given to a Frame via setComponent
152         ,::com::sun::star::lang::XMultiServiceFactory
153         ,::com::sun::star::util::XModifyListener
154         ,::com::sun::star::util::XModeChangeListener
155         ,::com::sun::star::frame::XLayoutManagerListener
156         >
157         , public WindowController
158 {
159     friend class DrawCommandDispatch;
160     friend class ShapeController;
161 
162 public:
163     //no default constructor
164     ChartController(::com::sun::star::uno::Reference<
165                ::com::sun::star::uno::XComponentContext > const & xContext);
166     virtual ~ChartController();
167 
168     //-----------------------------------------------------------------
169     // ::com::sun::star::lang::XServiceInfo
170     //-----------------------------------------------------------------
171 
172     APPHELPER_XSERVICEINFO_DECL()
173     APPHELPER_SERVICE_FACTORY_HELPER(ChartController)
174 
175     //-----------------------------------------------------------------
176     // ::com::sun::star::frame::XController (required interface)
177     //-----------------------------------------------------------------
178     virtual void SAL_CALL
179         attachFrame( const ::com::sun::star::uno::Reference<
180                       ::com::sun::star::frame::XFrame > & xFrame );
181 
182     virtual sal_Bool SAL_CALL
183         attachModel( const ::com::sun::star::uno::Reference<
184                         ::com::sun::star::frame::XModel > & xModel );
185 
186     virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL
187         getFrame();
188 
189     virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL
190         getModel();
191 
192     virtual ::com::sun::star::uno::Any SAL_CALL
193         getViewData();
194 
195     virtual void SAL_CALL
196         restoreViewData( const ::com::sun::star::uno::Any& rValue );
197 
198     virtual sal_Bool SAL_CALL
199         suspend( sal_Bool bSuspend );
200 
201     //-----------------------------------------------------------------
202     // ::com::sun::star::lang::XComponent (base of XController)
203     //-----------------------------------------------------------------
204     virtual void SAL_CALL
205         dispose();
206 
207     virtual void SAL_CALL
208         addEventListener( const ::com::sun::star::uno::Reference<
209                           ::com::sun::star::lang::XEventListener > & xListener );
210 
211     virtual void SAL_CALL
212         removeEventListener( const ::com::sun::star::uno::Reference<
213                           ::com::sun::star::lang::XEventListener > & xListener );
214 
215     //-----------------------------------------------------------------
216     // ::com::sun::star::frame::XDispatchProvider (required interface)
217     //-----------------------------------------------------------------
218     virtual ::com::sun::star::uno::Reference<
219         ::com::sun::star::frame::XDispatch> SAL_CALL
220         queryDispatch( const ::com::sun::star::util::URL& rURL
221                             , const rtl::OUString& rTargetFrameName
222                             , sal_Int32 nSearchFlags);
223 
224     virtual ::com::sun::star::uno::Sequence<
225         ::com::sun::star::uno::Reference<
226         ::com::sun::star::frame::XDispatch > > SAL_CALL
227         queryDispatches( const ::com::sun::star::uno::Sequence<
228                             ::com::sun::star::frame::DispatchDescriptor > & xDescripts);
229 
230     //-----------------------------------------------------------------
231     // ::com::sun::star::view::XSelectionSupplier (optional interface)
232     //-----------------------------------------------------------------
233     virtual sal_Bool SAL_CALL
234         select( const ::com::sun::star::uno::Any& rSelection );
235 
236     virtual ::com::sun::star::uno::Any  SAL_CALL
237         getSelection();
238 
239     virtual void SAL_CALL
240         addSelectionChangeListener( const ::com::sun::star::uno::Reference<
241                             com::sun::star::view::XSelectionChangeListener > & xListener );
242 
243     virtual void SAL_CALL
244         removeSelectionChangeListener( const ::com::sun::star::uno::Reference<
245                             com::sun::star::view::XSelectionChangeListener > & xListener );
246 
247     //-----------------------------------------------------------------
248     // ::com::sun::star::ui::XContextMenuInterception (optional interface)
249     //-----------------------------------------------------------------
250     virtual void SAL_CALL
251         registerContextMenuInterceptor( const ::com::sun::star::uno::Reference<
252                             ::com::sun::star::ui::XContextMenuInterceptor > & xInterceptor);
253 
254     virtual void SAL_CALL
255         releaseContextMenuInterceptor( const ::com::sun::star::uno::Reference<
256                             ::com::sun::star::ui::XContextMenuInterceptor > & xInterceptor);
257 
258 
259     //-----------------------------------------------------------------
260     //-----------------------------------------------------------------
261     //additional interfaces
262 
263     //-----------------------------------------------------------------
264     // ::com::sun::star::util::XCloseListener
265     //-----------------------------------------------------------------
266     virtual void SAL_CALL
267         queryClosing( const ::com::sun::star::lang::EventObject& Source
268                             , sal_Bool GetsOwnership );
269 
270     virtual void SAL_CALL
271         notifyClosing( const ::com::sun::star::lang::EventObject& Source );
272 
273     //-------------------------------------------------------------------------------------
274     // ::com::sun::star::util::XEventListener (base of XCloseListener and XModifyListener)
275     //-------------------------------------------------------------------------------------
276     virtual void SAL_CALL
277         disposing( const ::com::sun::star::lang::EventObject& Source );
278 
279     //-----------------------------------------------------------------
280     // ::com::sun::star::frame::XDispatch
281     //-----------------------------------------------------------------
282 
283     virtual void SAL_CALL
284         dispatch( const ::com::sun::star::util::URL& aURL
285                     , const ::com::sun::star::uno::Sequence<
286                     ::com::sun::star::beans::PropertyValue >& aArgs );
287 
288     virtual void SAL_CALL
289         addStatusListener( const ::com::sun::star::uno::Reference<
290                     ::com::sun::star::frame::XStatusListener >& xControl
291                     , const ::com::sun::star::util::URL& aURL );
292 
293     virtual void SAL_CALL
294         removeStatusListener( const ::com::sun::star::uno::Reference<
295                     ::com::sun::star::frame::XStatusListener >& xControl
296                     , const ::com::sun::star::util::URL& aURL );
297 
298     //-----------------------------------------------------------------
299     // ::com::sun::star::awt::XWindow
300     //-----------------------------------------------------------------
301     virtual void SAL_CALL
302         setPosSize( sal_Int32 X, sal_Int32 Y
303                     , sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags );
304 
305     virtual ::com::sun::star::awt::Rectangle SAL_CALL
306         getPosSize();
307 
308     virtual void SAL_CALL
309         setVisible( sal_Bool Visible );
310 
311     virtual void SAL_CALL
312         setEnable( sal_Bool Enable );
313 
314     virtual void SAL_CALL
315         setFocus();
316 
317     //----------------
318     virtual void SAL_CALL
319         addWindowListener( const ::com::sun::star::uno::Reference<
320                     ::com::sun::star::awt::XWindowListener >& xListener );
321 
322     virtual void SAL_CALL
323         removeWindowListener( const ::com::sun::star::uno::Reference<
324                     ::com::sun::star::awt::XWindowListener >& xListener );
325 
326     virtual void SAL_CALL
327         addFocusListener( const ::com::sun::star::uno::Reference<
328                     ::com::sun::star::awt::XFocusListener >& xListener );
329 
330     virtual void SAL_CALL
331         removeFocusListener( const ::com::sun::star::uno::Reference<
332                     ::com::sun::star::awt::XFocusListener >& xListener );
333 
334     virtual void SAL_CALL
335         addKeyListener( const ::com::sun::star::uno::Reference<
336                     ::com::sun::star::awt::XKeyListener >& xListener );
337 
338     virtual void SAL_CALL
339         removeKeyListener( const ::com::sun::star::uno::Reference<
340                     ::com::sun::star::awt::XKeyListener >& xListener );
341 
342     virtual void SAL_CALL
343         addMouseListener( const ::com::sun::star::uno::Reference<
344                     ::com::sun::star::awt::XMouseListener >& xListener );
345 
346     virtual void SAL_CALL
347         removeMouseListener( const ::com::sun::star::uno::Reference<
348                     ::com::sun::star::awt::XMouseListener >& xListener );
349 
350     virtual void SAL_CALL
351         addMouseMotionListener( const ::com::sun::star::uno::Reference<
352                     ::com::sun::star::awt::XMouseMotionListener >& xListener );
353 
354     virtual void SAL_CALL
355         removeMouseMotionListener( const ::com::sun::star::uno::Reference<
356                     ::com::sun::star::awt::XMouseMotionListener >& xListener );
357 
358     virtual void SAL_CALL
359         addPaintListener( const ::com::sun::star::uno::Reference<
360                     ::com::sun::star::awt::XPaintListener >& xListener );
361 
362     virtual void SAL_CALL
363         removePaintListener( const ::com::sun::star::uno::Reference<
364                     ::com::sun::star::awt::XPaintListener >& xListener );
365 
366     //-----------------------------------------------------------------
367     // ::com::sun::star::lang XMultiServiceFactory
368     //-----------------------------------------------------------------
369     virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
370         createInstance( const ::rtl::OUString& aServiceSpecifier );
371     virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
372         createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier,
373                                      const ::com::sun::star::uno::Sequence<
374                                          ::com::sun::star::uno::Any >& Arguments );
375     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
376         getAvailableServiceNames();
377 
378     //-----------------------------------------------------------------
379     // ::com::sun::star::util::XModifyListener
380     //-----------------------------------------------------------------
381     virtual void SAL_CALL modified(
382         const ::com::sun::star::lang::EventObject& aEvent );
383 
384     //-----------------------------------------------------------------
385     // ::com::sun::star::util::XModeChangeListener
386     //-----------------------------------------------------------------
387     virtual void SAL_CALL modeChanged(
388         const ::com::sun::star::util::ModeChangeEvent& _rSource );
389 
390     //-----------------------------------------------------------------
391     // ::com::sun::star::frame::XLayoutManagerListener
392     //-----------------------------------------------------------------
393     virtual void SAL_CALL layoutEvent(
394         const ::com::sun::star::lang::EventObject& aSource,
395         ::sal_Int16 eLayoutEvent,
396         const ::com::sun::star::uno::Any& aInfo );
397 
398     //-----------------------------------------------------------------
399     // chart2::WindowController
400     //-----------------------------------------------------------------
401     virtual void PrePaint();
402     virtual void execute_Paint( const Rectangle& rRect );
403     virtual void execute_MouseButtonDown( const MouseEvent& rMEvt );
404     virtual void execute_MouseMove( const MouseEvent& rMEvt );
405     virtual void execute_Tracking( const TrackingEvent& rTEvt );
406     virtual void execute_MouseButtonUp( const MouseEvent& rMEvt );
407     virtual void execute_Resize();
408     virtual void execute_Activate();
409     virtual void execute_Deactivate();
410     virtual void execute_GetFocus();
411     virtual void execute_LoseFocus();
412     virtual void execute_Command( const CommandEvent& rCEvt );
413     virtual bool execute_KeyInput( const KeyEvent& rKEvt );
414 
415     virtual bool requestQuickHelp(
416         ::Point aAtLogicPosition, bool bIsBalloonHelp,
417         ::rtl::OUString & rOutQuickHelpText, ::com::sun::star::awt::Rectangle & rOutEqualRect );
418 
419     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
420 
421     //-----------------------------------------------------------------
422     //-----------------------------------------------------------------
423 
424     static bool isObjectDeleteable( const ::com::sun::star::uno::Any& rSelection );
425 
setDrawMode(ChartDrawMode eMode)426     void setDrawMode( ChartDrawMode eMode ) { m_eDrawMode = eMode; }
getDrawMode() const427     ChartDrawMode getDrawMode() const { return m_eDrawMode; }
428 
429     bool isShapeContext() const;
430 
431     DECL_LINK( NotifyUndoActionHdl, SdrUndoAction* );
432 
433 public:
434     //-----------------------------------------------------------------
435     //-----------------------------------------------------------------
436     //-----------------------------------------------------------------
437     //-----------------------------------------------------------------
438     //private
439     //-----------------------------------------------------------------
440     //-----------------------------------------------------------------
441     //-----------------------------------------------------------------
442     //-----------------------------------------------------------------
443 
444 
445 private:
446     DrawModelWrapper* GetDrawModelWrapper();
447     DrawViewWrapper* GetDrawViewWrapper();
448 
449 private:
450     class TheModelRef;
451     friend class ChartController::TheModelRef;
452     class RefCountable
453     {
454         public:
455             RefCountable();
456             virtual ~RefCountable();
457             void acquire();
458             void release();
459         private:
460             sal_Int32 volatile      m_nRefCount;
461     };
462     class TheModel : public RefCountable
463     {
464         public:
465             TheModel( const ::com::sun::star::uno::Reference<
466                         ::com::sun::star::frame::XModel > & xModel );
467 
468             virtual ~TheModel();
469 
470             void        SetOwnerShip( sal_Bool bGetsOwnership );
471             void        addListener( ChartController* pController );
472             void        removeListener(  ChartController* pController );
473             void        tryTermination();
474             ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
getModel()475                         getModel() { return m_xModel;}
476 
477         private:
478             ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >     m_xModel;
479             ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable >  m_xCloseable;
480 
481             //the ownership between model and controller is not clear at first
482             //each controller might consider himself as owner of the model first
483             sal_Bool volatile       m_bOwnership;
484             //with a XCloseable::close call and during XCloseListener::queryClosing
485             //the ownership can be regulated more explicit,
486             //if so the ownership is considered to be well known
487             sal_Bool volatile       m_bOwnershipIsWellKnown;
488     };
489     class TheModelRef
490     {
491         public:
492             TheModelRef( TheModel* pTheModel, ::osl::Mutex& rMutex );
493             TheModelRef( const TheModelRef& rTheModel, ::osl::Mutex& rMutex );
494             TheModelRef& operator=(ChartController::TheModel* pTheModel);
495             TheModelRef& operator=(const TheModelRef& rTheModel);
496             virtual ~TheModelRef();
497             sal_Bool is() const;
operator ->() const498                 TheModel* operator->() const { return m_pTheModel; }
499         private:
500             TheModel*               m_pTheModel;
501             ::osl::Mutex&   m_rModelMutex;
502     };
503 
504 private:
505     mutable ::apphelper::LifeTimeManager    m_aLifeTimeManager;
506 
507     mutable ::osl::Mutex    m_aControllerMutex;
508     sal_Bool volatile       m_bSuspended;
509     sal_Bool volatile       m_bCanClose;
510 
511     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>        m_xCC;
512 
513     //model
514     ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >     m_xFrame;
515     mutable ::osl::Mutex    m_aModelMutex;
516     TheModelRef             m_aModel;
517 
518     //view
519     ChartWindow*        m_pChartWindow;
520     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >      m_xViewWindow;
521     ::com::sun::star::uno::Reference<
522                        ::com::sun::star::uno::XInterface >                  m_xChartView;
523     ::boost::shared_ptr< DrawModelWrapper > m_pDrawModelWrapper;
524     DrawViewWrapper*    m_pDrawViewWrapper;
525 
526     Selection           m_aSelection;
527     SdrDragMode         m_eDragMode;
528 
529     Timer               m_aDoubleClickTimer;
530     bool volatile       m_bWaitingForDoubleClick;
531     bool volatile       m_bWaitingForMouseUp;
532 
533     bool volatile       m_bConnectingToView;
534 
535     ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManager >    m_xUndoManager;
536     ::std::auto_ptr< UndoGuard >                                                    m_pTextActionUndoGuard;
537     /// needed for dispatching URLs in FeatureStateEvents
538     mutable ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer;
539 
540     ::std::auto_ptr< ::svt::AcceleratorExecute >  m_apAccelExecute;
541 
542     CommandDispatchContainer m_aDispatchContainer;
543 
544     ::std::auto_ptr< DropTargetHelper >           m_apDropTargetHelper;
545     ::com::sun::star::uno::Reference<
546             ::com::sun::star::frame::XLayoutManagerEventBroadcaster >
547                                                   m_xLayoutManagerEventBroadcaster;
548 
549     ChartDrawMode       m_eDrawMode;
550 
551 private:
552     //private methods
553 
554     sal_Bool            impl_isDisposedOrSuspended() const;
555     ::std::auto_ptr< ReferenceSizeProvider > impl_createReferenceSizeProvider();
556     void                impl_adaptDataSeriesAutoResize();
557 
558     void                impl_createDrawViewController();
559     void                impl_deleteDrawViewController();
560 
561     //executeDispatch methods
562     void SAL_CALL       executeDispatch_ObjectProperties();
563     void SAL_CALL       executeDispatch_FormatObject( const ::rtl::OUString& rDispatchCommand );
564     void SAL_CALL       executeDlg_ObjectProperties( const ::rtl::OUString& rObjectCID );
565     bool                executeDlg_ObjectProperties_withoutUndoGuard( const ::rtl::OUString& rObjectCID, bool bOkClickOnUnchangedDialogSouldBeRatedAsSuccessAlso );
566 
567     void SAL_CALL       executeDispatch_ChartType();
568 
569     void                executeDispatch_InsertTitles();
570     void                executeDispatch_InsertLegend();
571     void                executeDispatch_DeleteLegend();
572     void                executeDispatch_OpenLegendDialog();
573     void                executeDispatch_InsertAxes();
574     void                executeDispatch_InsertGrid();
575 
576     void                executeDispatch_InsertMenu_DataLabels();
577     void                executeDispatch_InsertMenu_YErrorBars();
578     void                executeDispatch_InsertMenu_Trendlines();
579     void                executeDispatch_InsertMenu_MeanValues();
580 
581     void                executeDispatch_InsertMeanValue();
582     void                executeDispatch_InsertTrendline();
583     void                executeDispatch_InsertTrendlineEquation( bool bInsertR2=false );
584     void                executeDispatch_InsertYErrorBars();
585 
586     void                executeDispatch_InsertR2Value();
587     void                executeDispatch_DeleteR2Value();
588 
589     void                executeDispatch_DeleteMeanValue();
590     void                executeDispatch_DeleteTrendline();
591     void                executeDispatch_DeleteTrendlineEquation();
592     void                executeDispatch_DeleteYErrorBars();
593 
594     void                executeDispatch_InsertDataLabels();
595     void                executeDispatch_InsertDataLabel();
596     void                executeDispatch_DeleteDataLabels();
597     void                executeDispatch_DeleteDataLabel();
598 
599     void                executeDispatch_ResetAllDataPoints();
600     void                executeDispatch_ResetDataPoint();
601 
602     void                executeDispatch_InsertAxis();
603     void                executeDispatch_InsertAxisTitle();
604     void                executeDispatch_InsertMajorGrid();
605     void                executeDispatch_InsertMinorGrid();
606     void                executeDispatch_DeleteAxis();
607     void                executeDispatch_DeleteMajorGrid();
608     void                executeDispatch_DeleteMinorGrid();
609 
610     void SAL_CALL       executeDispatch_InsertSpecialCharacter();
611     void SAL_CALL       executeDispatch_EditText( const Point* pMousePixel = NULL );
612     void SAL_CALL       executeDispatch_SourceData();
613     void SAL_CALL       executeDispatch_MoveSeries( sal_Bool bForward );
614 
615     void                StartTextEdit( const Point* pMousePixel = NULL );
616     bool                EndTextEdit();
617 
618     void SAL_CALL       executeDispatch_View3D();
619     void SAL_CALL       executeDispatch_PositionAndSize();
620 
621     void                executeDispatch_EditData();
622 
623     void                executeDispatch_NewArrangement();
624     void                executeDispatch_ScaleText();
625 
626     void                executeDispatch_Paste();
627     void                executeDispatch_Copy();
628     void                executeDispatch_Cut();
629     bool                executeDispatch_Delete();
630     void                executeDispatch_ToggleLegend();
631     void                executeDispatch_ToggleGridHorizontal();
632 
633     void impl_ShapeControllerDispatch( const ::com::sun::star::util::URL& rURL,
634         const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs );
635 
636     //
637     DECL_LINK( DoubleClickWaitingHdl, void* );
638     void execute_DoubleClick( const Point* pMousePixel = NULL );
639     void startDoubleClickWaiting();
640     void stopDoubleClickWaiting();
641 
642     void impl_selectObjectAndNotiy();
643     void impl_notifySelectionChangeListeners();
644     void impl_invalidateAccessible();
645     void impl_initializeAccessible();
646     void impl_initializeAccessible( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XInitialization >& xInit );
647 
648     //sets the model member to null if it equals the parameter
649     //returns true if successful
650     bool impl_releaseThisModel( const ::com::sun::star::uno::Reference<
651                         ::com::sun::star::uno::XInterface > & xModel );
652 
653     enum eMoveOrResizeType
654     {
655         MOVE_OBJECT,
656         CENTERED_RESIZE_OBJECT
657     };
658     /// @return </sal_True>, if resize/move was successful
659     bool impl_moveOrResizeObject(
660         const ::rtl::OUString & rCID, eMoveOrResizeType eType, double fAmountLogicX, double fAmountLogicY );
661     bool impl_DragDataPoint( const ::rtl::OUString & rCID, double fOffset );
662 
663     ::std::set< ::rtl::OUString > impl_getAvailableCommands();
664 
665     /** Creates a helper accessibility class that must be initialized via XInitialization.  For
666         parameters see
667 
668         The returned object should not be used directly.  Instead a proxy object
669         should use this helper to retrieve its children and add them to its own
670         children.
671      */
672     ::com::sun::star::uno::Reference<
673             ::com::sun::star::accessibility::XAccessibleContext >
674         impl_createAccessibleTextContext();
675 
676     void impl_PasteGraphic( ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > & xGraphic,
677                             const ::Point & aPosition );
678     void impl_PasteShapes( SdrModel* pModel );
679     void impl_PasteStringAsTextShape( const ::rtl::OUString& rString, const ::com::sun::star::awt::Point& rPosition );
680     void impl_SetMousePointer( const MouseEvent & rEvent );
681 
682     void impl_ClearSelection();
683 
684     void impl_switchDiagramPositioningToExcludingPositioning();
685 };
686 
687 //.............................................................................
688 }  // namespace chart
689 //.............................................................................
690 
691 #endif
692