merge the formfield patch from ooo-build
[ooovba.git] / chart2 / source / controller / main / ChartController.hxx
blob99844a96ba2b87e2f36cfb8a64f6de55194fb441
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ChartController.hxx,v $
10 * $Revision: 1.12.44.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _CHART_CONTROLLER_HXX
31 #define _CHART_CONTROLLER_HXX
33 #include "LifeTime.hxx"
34 #include "ServiceMacros.hxx"
35 #include "CommandDispatchContainer.hxx"
36 #include "SelectionHelper.hxx"
38 // header for enum SdrDragMode
39 #include <svx/svdtypes.hxx>
40 // header for class Timer
41 #include <vcl/timer.hxx>
42 // header for class MouseEvent
43 #include <vcl/event.hxx>
45 #include <cppuhelper/implbase12.hxx>
47 #include <com/sun/star/accessibility/XAccessible.hpp>
48 #include <com/sun/star/chart2/XUndoManager.hpp>
49 #include <com/sun/star/frame/XController.hpp>
50 #include <com/sun/star/frame/XDispatchProvider.hpp>
51 #include <com/sun/star/frame/XDispatch.hpp>
52 #include <com/sun/star/view/XSelectionSupplier.hpp>
53 #include <com/sun/star/ui/XContextMenuInterception.hpp>
54 #include <com/sun/star/uno/XWeak.hpp>
55 #include <com/sun/star/util/XCloseListener.hpp>
56 #include <com/sun/star/util/XCloseable.hpp>
57 #include <com/sun/star/lang/XInitialization.hpp>
58 #include <com/sun/star/lang/XServiceInfo.hpp>
59 #include <com/sun/star/uno/XComponentContext.hpp>
60 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
61 #include <com/sun/star/util/XModifyListener.hpp>
62 #include <com/sun/star/util/XModeChangeListener.hpp>
63 #include <com/sun/star/awt/Size.hpp>
64 #include <com/sun/star/util/XURLTransformer.hpp>
65 #include <com/sun/star/frame/XLayoutManagerListener.hpp>
66 #include <com/sun/star/frame/XLayoutManagerEventBroadcaster.hpp>
68 #include <memory>
69 #include <boost/shared_ptr.hpp>
70 #include <set>
73 class SdrModel;
75 namespace svt
77 class AcceleratorExecute;
80 class DropTargetHelper;
82 namespace com { namespace sun { namespace star {
83 namespace graphic {
84 class XGraphic;
86 }}}
89 //.............................................................................
90 namespace chart
92 //.............................................................................
94 class WindowController
96 public:
97 virtual ~WindowController() {};
99 virtual void PrePaint()=0;
100 virtual void execute_Paint( const Rectangle& rRect )=0;
101 virtual void execute_MouseButtonDown( const MouseEvent& rMEvt )=0;
102 virtual void execute_MouseMove( const MouseEvent& rMEvt )=0;
103 virtual void execute_Tracking( const TrackingEvent& rTEvt )=0;
104 virtual void execute_MouseButtonUp( const MouseEvent& rMEvt )=0;
105 virtual void execute_Resize()=0;
106 virtual void execute_Activate()=0;
107 virtual void execute_Deactivate()=0;
108 virtual void execute_GetFocus()=0;
109 virtual void execute_LoseFocus()=0;
110 virtual void execute_Command( const CommandEvent& rCEvt )=0;
111 virtual bool execute_KeyInput( const KeyEvent& rKEvt )=0;
113 /** get help text to be shown in a quick help
115 @param aAtLogicPosition the position in logic coordinates (of the
116 window) of the mouse cursor to determine for
117 which object help is requested.
119 @param bIsBalloonHelp determines whether to return the long text version
120 (balloon help) or the shorter one (quick help).
122 @param rOutQuickHelpText is filled with the quick help text
124 @param rOutEqualRect is filled with a rectangle that denotes the region
125 in which the quick help does not change.
127 @return </TRUE>, if a quick help should be shown.
129 virtual bool requestQuickHelp(
130 ::Point aAtLogicPosition, bool bIsBalloonHelp,
131 ::rtl::OUString & rOutQuickHelpText, ::com::sun::star::awt::Rectangle & rOutEqualRect ) = 0;
133 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() = 0;
136 class ChartWindow;
137 class DrawModelWrapper;
138 class DrawViewWrapper;
139 class ViewElementListProvider;
140 class ReferenceSizeProvider;
142 class ChartController : public ::cppu::WeakImplHelper12 <
143 ::com::sun::star::frame::XController //comprehends XComponent (required interface)
144 ,::com::sun::star::frame::XDispatchProvider //(required interface)
145 ,::com::sun::star::view::XSelectionSupplier //(optional interface)
146 ,::com::sun::star::ui::XContextMenuInterception //(optional interface)
147 ,::com::sun::star::util::XCloseListener //(needed for communication with XModel)
148 ,::com::sun::star::lang::XServiceInfo
149 // ,public ::com::sun::star::uno::XWeak // implemented by WeakImplHelper(optional interface)
150 // ,public ::com::sun::star::uno::XInterface // implemented by WeakImplHelper(optional interface)
151 // ,public ::com::sun::star::lang::XTypeProvider // implemented by WeakImplHelper
152 ,::com::sun::star::frame::XDispatch
153 ,::com::sun::star::awt::XWindow //this is the Window Controller part of this Controller, that will be given to a Frame via setComponent
154 ,::com::sun::star::lang::XMultiServiceFactory
155 ,::com::sun::star::util::XModifyListener
156 ,::com::sun::star::util::XModeChangeListener
157 ,::com::sun::star::frame::XLayoutManagerListener
159 , public WindowController
161 public:
162 //no default constructor
163 ChartController(::com::sun::star::uno::Reference<
164 ::com::sun::star::uno::XComponentContext > const & xContext);
165 virtual ~ChartController();
167 //-----------------------------------------------------------------
168 // ::com::sun::star::lang::XServiceInfo
169 //-----------------------------------------------------------------
171 APPHELPER_XSERVICEINFO_DECL()
172 APPHELPER_SERVICE_FACTORY_HELPER(ChartController)
174 //-----------------------------------------------------------------
175 // ::com::sun::star::frame::XController (required interface)
176 //-----------------------------------------------------------------
177 virtual void SAL_CALL
178 attachFrame( const ::com::sun::star::uno::Reference<
179 ::com::sun::star::frame::XFrame > & xFrame )
180 throw (::com::sun::star::uno::RuntimeException);
182 virtual sal_Bool SAL_CALL
183 attachModel( const ::com::sun::star::uno::Reference<
184 ::com::sun::star::frame::XModel > & xModel )
185 throw (::com::sun::star::uno::RuntimeException);
187 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL
188 getFrame() throw (::com::sun::star::uno::RuntimeException);
190 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL
191 getModel() throw (::com::sun::star::uno::RuntimeException);
193 virtual ::com::sun::star::uno::Any SAL_CALL
194 getViewData() throw (::com::sun::star::uno::RuntimeException);
196 virtual void SAL_CALL
197 restoreViewData( const ::com::sun::star::uno::Any& rValue )
198 throw (::com::sun::star::uno::RuntimeException);
200 virtual sal_Bool SAL_CALL
201 suspend( sal_Bool bSuspend )
202 throw (::com::sun::star::uno::RuntimeException);
204 //-----------------------------------------------------------------
205 // ::com::sun::star::lang::XComponent (base of XController)
206 //-----------------------------------------------------------------
207 virtual void SAL_CALL
208 dispose() throw (::com::sun::star::uno::RuntimeException);
210 virtual void SAL_CALL
211 addEventListener( const ::com::sun::star::uno::Reference<
212 ::com::sun::star::lang::XEventListener > & xListener )
213 throw (::com::sun::star::uno::RuntimeException);
215 virtual void SAL_CALL
216 removeEventListener( const ::com::sun::star::uno::Reference<
217 ::com::sun::star::lang::XEventListener > & xListener )
218 throw (::com::sun::star::uno::RuntimeException);
220 //-----------------------------------------------------------------
221 // ::com::sun::star::frame::XDispatchProvider (required interface)
222 //-----------------------------------------------------------------
223 virtual ::com::sun::star::uno::Reference<
224 ::com::sun::star::frame::XDispatch> SAL_CALL
225 queryDispatch( const ::com::sun::star::util::URL& rURL
226 , const rtl::OUString& rTargetFrameName
227 , sal_Int32 nSearchFlags)
228 throw (::com::sun::star::uno::RuntimeException);
230 virtual ::com::sun::star::uno::Sequence<
231 ::com::sun::star::uno::Reference<
232 ::com::sun::star::frame::XDispatch > > SAL_CALL
233 queryDispatches( const ::com::sun::star::uno::Sequence<
234 ::com::sun::star::frame::DispatchDescriptor > & xDescripts)
235 throw (::com::sun::star::uno::RuntimeException);
237 //-----------------------------------------------------------------
238 // ::com::sun::star::view::XSelectionSupplier (optional interface)
239 //-----------------------------------------------------------------
240 virtual sal_Bool SAL_CALL
241 select( const ::com::sun::star::uno::Any& rSelection )
242 throw ( com::sun::star::lang::IllegalArgumentException );
244 virtual ::com::sun::star::uno::Any SAL_CALL
245 getSelection() throw (::com::sun::star::uno::RuntimeException);
247 virtual void SAL_CALL
248 addSelectionChangeListener( const ::com::sun::star::uno::Reference<
249 com::sun::star::view::XSelectionChangeListener > & xListener )
250 throw (::com::sun::star::uno::RuntimeException);
252 virtual void SAL_CALL
253 removeSelectionChangeListener( const ::com::sun::star::uno::Reference<
254 com::sun::star::view::XSelectionChangeListener > & xListener )
255 throw (::com::sun::star::uno::RuntimeException);
257 //-----------------------------------------------------------------
258 // ::com::sun::star::ui::XContextMenuInterception (optional interface)
259 //-----------------------------------------------------------------
260 virtual void SAL_CALL
261 registerContextMenuInterceptor( const ::com::sun::star::uno::Reference<
262 ::com::sun::star::ui::XContextMenuInterceptor > & xInterceptor)
263 throw (::com::sun::star::uno::RuntimeException);
265 virtual void SAL_CALL
266 releaseContextMenuInterceptor( const ::com::sun::star::uno::Reference<
267 ::com::sun::star::ui::XContextMenuInterceptor > & xInterceptor)
268 throw (::com::sun::star::uno::RuntimeException);
271 //-----------------------------------------------------------------
272 //-----------------------------------------------------------------
273 //additional interfaces
275 //-----------------------------------------------------------------
276 // ::com::sun::star::util::XCloseListener
277 //-----------------------------------------------------------------
278 virtual void SAL_CALL
279 queryClosing( const ::com::sun::star::lang::EventObject& Source
280 , sal_Bool GetsOwnership )
281 throw (::com::sun::star::util::CloseVetoException
282 , ::com::sun::star::uno::RuntimeException);
284 virtual void SAL_CALL
285 notifyClosing( const ::com::sun::star::lang::EventObject& Source )
286 throw (::com::sun::star::uno::RuntimeException);
288 //-------------------------------------------------------------------------------------
289 // ::com::sun::star::util::XEventListener (base of XCloseListener and XModifyListener)
290 //-------------------------------------------------------------------------------------
291 virtual void SAL_CALL
292 disposing( const ::com::sun::star::lang::EventObject& Source )
293 throw (::com::sun::star::uno::RuntimeException);
295 //-----------------------------------------------------------------
296 // ::com::sun::star::frame::XDispatch
297 //-----------------------------------------------------------------
299 virtual void SAL_CALL
300 dispatch( const ::com::sun::star::util::URL& aURL
301 , const ::com::sun::star::uno::Sequence<
302 ::com::sun::star::beans::PropertyValue >& aArgs )
303 throw (::com::sun::star::uno::RuntimeException);
305 virtual void SAL_CALL
306 addStatusListener( const ::com::sun::star::uno::Reference<
307 ::com::sun::star::frame::XStatusListener >& xControl
308 , const ::com::sun::star::util::URL& aURL )
309 throw (::com::sun::star::uno::RuntimeException);
311 virtual void SAL_CALL
312 removeStatusListener( const ::com::sun::star::uno::Reference<
313 ::com::sun::star::frame::XStatusListener >& xControl
314 , const ::com::sun::star::util::URL& aURL )
315 throw (::com::sun::star::uno::RuntimeException);
317 //-----------------------------------------------------------------
318 // ::com::sun::star::awt::XWindow
319 //-----------------------------------------------------------------
320 virtual void SAL_CALL
321 setPosSize( sal_Int32 X, sal_Int32 Y
322 , sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags )
323 throw (::com::sun::star::uno::RuntimeException);
325 virtual ::com::sun::star::awt::Rectangle SAL_CALL
326 getPosSize()
327 throw (::com::sun::star::uno::RuntimeException);
329 virtual void SAL_CALL
330 setVisible( sal_Bool Visible )
331 throw (::com::sun::star::uno::RuntimeException);
333 virtual void SAL_CALL
334 setEnable( sal_Bool Enable )
335 throw (::com::sun::star::uno::RuntimeException);
337 virtual void SAL_CALL
338 setFocus() throw (::com::sun::star::uno::RuntimeException);
340 //----------------
341 virtual void SAL_CALL
342 addWindowListener( const ::com::sun::star::uno::Reference<
343 ::com::sun::star::awt::XWindowListener >& xListener )
344 throw (::com::sun::star::uno::RuntimeException);
346 virtual void SAL_CALL
347 removeWindowListener( const ::com::sun::star::uno::Reference<
348 ::com::sun::star::awt::XWindowListener >& xListener )
349 throw (::com::sun::star::uno::RuntimeException);
351 virtual void SAL_CALL
352 addFocusListener( const ::com::sun::star::uno::Reference<
353 ::com::sun::star::awt::XFocusListener >& xListener )
354 throw (::com::sun::star::uno::RuntimeException);
356 virtual void SAL_CALL
357 removeFocusListener( const ::com::sun::star::uno::Reference<
358 ::com::sun::star::awt::XFocusListener >& xListener )
359 throw (::com::sun::star::uno::RuntimeException);
361 virtual void SAL_CALL
362 addKeyListener( const ::com::sun::star::uno::Reference<
363 ::com::sun::star::awt::XKeyListener >& xListener )
364 throw (::com::sun::star::uno::RuntimeException);
366 virtual void SAL_CALL
367 removeKeyListener( const ::com::sun::star::uno::Reference<
368 ::com::sun::star::awt::XKeyListener >& xListener )
369 throw (::com::sun::star::uno::RuntimeException);
371 virtual void SAL_CALL
372 addMouseListener( const ::com::sun::star::uno::Reference<
373 ::com::sun::star::awt::XMouseListener >& xListener )
374 throw (::com::sun::star::uno::RuntimeException);
376 virtual void SAL_CALL
377 removeMouseListener( const ::com::sun::star::uno::Reference<
378 ::com::sun::star::awt::XMouseListener >& xListener )
379 throw (::com::sun::star::uno::RuntimeException);
381 virtual void SAL_CALL
382 addMouseMotionListener( const ::com::sun::star::uno::Reference<
383 ::com::sun::star::awt::XMouseMotionListener >& xListener )
384 throw (::com::sun::star::uno::RuntimeException);
386 virtual void SAL_CALL
387 removeMouseMotionListener( const ::com::sun::star::uno::Reference<
388 ::com::sun::star::awt::XMouseMotionListener >& xListener )
389 throw (::com::sun::star::uno::RuntimeException);
391 virtual void SAL_CALL
392 addPaintListener( const ::com::sun::star::uno::Reference<
393 ::com::sun::star::awt::XPaintListener >& xListener )
394 throw (::com::sun::star::uno::RuntimeException);
396 virtual void SAL_CALL
397 removePaintListener( const ::com::sun::star::uno::Reference<
398 ::com::sun::star::awt::XPaintListener >& xListener )
399 throw (::com::sun::star::uno::RuntimeException);
401 //-----------------------------------------------------------------
402 // ::com::sun::star::lang XMultiServiceFactory
403 //-----------------------------------------------------------------
404 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
405 createInstance( const ::rtl::OUString& aServiceSpecifier )
406 throw (::com::sun::star::uno::Exception,
407 ::com::sun::star::uno::RuntimeException);
408 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
409 createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier,
410 const ::com::sun::star::uno::Sequence<
411 ::com::sun::star::uno::Any >& Arguments )
412 throw (::com::sun::star::uno::Exception,
413 ::com::sun::star::uno::RuntimeException);
414 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
415 getAvailableServiceNames()
416 throw (::com::sun::star::uno::RuntimeException);
418 //-----------------------------------------------------------------
419 // ::com::sun::star::util::XModifyListener
420 //-----------------------------------------------------------------
421 virtual void SAL_CALL modified(
422 const ::com::sun::star::lang::EventObject& aEvent )
423 throw (::com::sun::star::uno::RuntimeException);
425 //-----------------------------------------------------------------
426 // ::com::sun::star::util::XModeChangeListener
427 //-----------------------------------------------------------------
428 virtual void SAL_CALL modeChanged(
429 const ::com::sun::star::util::ModeChangeEvent& _rSource )
430 throw (::com::sun::star::uno::RuntimeException);
432 //-----------------------------------------------------------------
433 // ::com::sun::star::frame::XLayoutManagerListener
434 //-----------------------------------------------------------------
435 virtual void SAL_CALL layoutEvent(
436 const ::com::sun::star::lang::EventObject& aSource,
437 ::sal_Int16 eLayoutEvent,
438 const ::com::sun::star::uno::Any& aInfo )
439 throw (::com::sun::star::uno::RuntimeException);
441 //-----------------------------------------------------------------
442 // chart2::WindowController
443 //-----------------------------------------------------------------
444 virtual void PrePaint();
445 virtual void execute_Paint( const Rectangle& rRect );
446 virtual void execute_MouseButtonDown( const MouseEvent& rMEvt );
447 virtual void execute_MouseMove( const MouseEvent& rMEvt );
448 virtual void execute_Tracking( const TrackingEvent& rTEvt );
449 virtual void execute_MouseButtonUp( const MouseEvent& rMEvt );
450 virtual void execute_Resize();
451 virtual void execute_Activate();
452 virtual void execute_Deactivate();
453 virtual void execute_GetFocus();
454 virtual void execute_LoseFocus();
455 virtual void execute_Command( const CommandEvent& rCEvt );
456 virtual bool execute_KeyInput( const KeyEvent& rKEvt );
458 virtual bool requestQuickHelp(
459 ::Point aAtLogicPosition, bool bIsBalloonHelp,
460 ::rtl::OUString & rOutQuickHelpText, ::com::sun::star::awt::Rectangle & rOutEqualRect );
462 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
464 //-----------------------------------------------------------------
465 //-----------------------------------------------------------------
467 static bool isObjectDeleteable( const ::com::sun::star::uno::Any& rSelection );
469 public:
470 //-----------------------------------------------------------------
471 //-----------------------------------------------------------------
472 //-----------------------------------------------------------------
473 //-----------------------------------------------------------------
474 //private
475 //-----------------------------------------------------------------
476 //-----------------------------------------------------------------
477 //-----------------------------------------------------------------
478 //-----------------------------------------------------------------
481 private:
482 DrawModelWrapper* GetDrawModelWrapper();
484 private:
485 class TheModelRef;
486 friend class ChartController::TheModelRef;
487 class RefCountable
489 public:
490 RefCountable();
491 virtual ~RefCountable();
492 void acquire();
493 void release();
494 private:
495 sal_Int32 volatile m_nRefCount;
497 class TheModel : public RefCountable
499 public:
500 TheModel( const ::com::sun::star::uno::Reference<
501 ::com::sun::star::frame::XModel > & xModel );
503 virtual ~TheModel();
505 void SetOwnerShip( sal_Bool bGetsOwnership );
506 void addListener( ChartController* pController );
507 void removeListener( ChartController* pController );
508 void tryTermination();
509 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
510 getModel() { return m_xModel;}
512 private:
513 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xModel;
514 ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable > m_xCloseable;
516 //the ownership between model and controller is not clear at first
517 //each controller might consider himself as owner of the model first
518 sal_Bool volatile m_bOwnership;
519 //with a XCloseable::close call and during XCloseListener::queryClosing
520 //the ownership can be regulated more explicit,
521 //if so the ownership is considered to be well known
522 sal_Bool volatile m_bOwnershipIsWellKnown;
524 class TheModelRef
526 public:
527 TheModelRef( TheModel* pTheModel, ::osl::Mutex& rMutex );
528 TheModelRef( const TheModelRef& rTheModel, ::osl::Mutex& rMutex );
529 TheModelRef& operator=(ChartController::TheModel* pTheModel);
530 TheModelRef& operator=(const TheModelRef& rTheModel);
531 virtual ~TheModelRef();
532 sal_Bool is() const;
533 TheModel* operator->() const { return m_pTheModel; }
534 private:
535 TheModel* m_pTheModel;
536 mutable ::osl::Mutex& m_rModelMutex;
539 private:
540 mutable ::apphelper::LifeTimeManager m_aLifeTimeManager;
542 mutable ::osl::Mutex m_aControllerMutex;
543 sal_Bool volatile m_bSuspended;
544 sal_Bool volatile m_bCanClose;
546 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xCC;
548 //model
549 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
550 mutable ::osl::Mutex m_aModelMutex;
551 TheModelRef m_aModel;
553 //view
554 ChartWindow* m_pChartWindow;
555 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xViewWindow;
556 ::com::sun::star::uno::Reference<
557 ::com::sun::star::uno::XInterface > m_xChartView;
558 ::boost::shared_ptr< DrawModelWrapper > m_pDrawModelWrapper;
559 DrawViewWrapper* m_pDrawViewWrapper;
561 Selection m_aSelection;
562 SdrDragMode m_eDragMode;
564 Timer m_aDoubleClickTimer;
565 bool volatile m_bWaitingForDoubleClick;
566 bool volatile m_bWaitingForMouseUp;
568 bool volatile m_bConnectingToView;
570 ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XUndoManager > m_xUndoManager;
571 /// needed for dispatching URLs in FeatureStateEvents
572 mutable ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xURLTransformer;
574 ::std::auto_ptr< ::svt::AcceleratorExecute > m_apAccelExecute;
576 CommandDispatchContainer m_aDispatchContainer;
578 ::std::auto_ptr< DropTargetHelper > m_apDropTargetHelper;
579 ::com::sun::star::uno::Reference<
580 ::com::sun::star::frame::XLayoutManagerEventBroadcaster >
581 m_xLayoutManagerEventBroadcaster;
583 private:
584 //private methods
586 sal_Bool impl_isDisposedOrSuspended() const;
587 ::std::auto_ptr< ReferenceSizeProvider > impl_createReferenceSizeProvider() const;
588 void impl_adaptDataSeriesAutoResize();
590 void impl_createDrawViewController();
591 void impl_deleteDrawViewController();
593 //executeDispatch methods
594 void SAL_CALL executeDispatch_ObjectProperties();
595 void SAL_CALL executeDispatch_FormatObject( const ::rtl::OUString& rDispatchCommand );
596 void SAL_CALL executeDlg_ObjectProperties( const ::rtl::OUString& rObjectCID );
597 bool executeDlg_ObjectProperties_withoutUndoGuard( const ::rtl::OUString& rObjectCID, bool bOkClickOnUnchangedDialogSouldBeRatedAsSuccessAlso );
599 void SAL_CALL executeDispatch_ChartType();
601 void executeDispatch_InsertTitles();
602 void executeDispatch_InsertLegend();
603 void executeDispatch_DeleteLegend();
604 void executeDispatch_OpenLegendDialog();
605 void executeDispatch_InsertAxes();
606 void executeDispatch_InsertGrid();
608 void executeDispatch_InsertMenu_DataLabels();
609 void executeDispatch_InsertMenu_YErrorBars();
610 void executeDispatch_InsertMenu_Trendlines();
611 void executeDispatch_InsertMenu_MeanValues();
613 void executeDispatch_InsertMeanValue();
614 void executeDispatch_InsertTrendline();
615 void executeDispatch_InsertTrendlineEquation( bool bInsertR2=false );
616 void executeDispatch_InsertYErrorBars();
618 void executeDispatch_InsertR2Value();
619 void executeDispatch_DeleteR2Value();
621 void executeDispatch_DeleteMeanValue();
622 void executeDispatch_DeleteTrendline();
623 void executeDispatch_DeleteTrendlineEquation();
624 void executeDispatch_DeleteYErrorBars();
626 void executeDispatch_InsertDataLabels();
627 void executeDispatch_InsertDataLabel();
628 void executeDispatch_DeleteDataLabels();
629 void executeDispatch_DeleteDataLabel();
631 void executeDispatch_ResetAllDataPoints();
632 void executeDispatch_ResetDataPoint();
634 void executeDispatch_InsertAxis();
635 void executeDispatch_InsertAxisTitle();
636 void executeDispatch_InsertMajorGrid();
637 void executeDispatch_InsertMinorGrid();
638 void executeDispatch_DeleteAxis();
639 void executeDispatch_DeleteMajorGrid();
640 void executeDispatch_DeleteMinorGrid();
642 void SAL_CALL executeDispatch_InsertSpecialCharacter();
643 void SAL_CALL executeDispatch_EditText();
644 void SAL_CALL executeDispatch_SourceData();
645 void SAL_CALL executeDispatch_MoveSeries( sal_Bool bForward );
647 void StartTextEdit();
648 bool EndTextEdit();
650 void SAL_CALL executeDispatch_View3D();
651 void SAL_CALL executeDispatch_PositionAndSize();
653 void executeDispatch_EditData();
655 void executeDispatch_NewArrangement();
656 void executeDispatch_ScaleText();
658 void executeDispatch_Paste();
659 void executeDispatch_Copy();
660 void executeDispatch_Cut();
661 bool executeDispatch_Delete();
662 void executeDispatch_ToggleLegend();
663 void executeDispatch_ToggleGridHorizontal();
666 DECL_LINK( DoubleClickWaitingHdl, void* );
667 void execute_DoubleClick();
668 void startDoubleClickWaiting();
669 void stopDoubleClickWaiting();
671 void impl_selectObjectAndNotiy();
672 void impl_notifySelectionChangeListeners();
673 void impl_invalidateAccessible();
674 void impl_initializeAccessible();
675 void impl_initializeAccessible( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XInitialization >& xInit );
677 //sets the model member to null if it equals the parameter
678 //returns true if successful
679 bool impl_releaseThisModel( const ::com::sun::star::uno::Reference<
680 ::com::sun::star::uno::XInterface > & xModel );
682 enum eMoveOrResizeType
684 MOVE_OBJECT,
685 CENTERED_RESIZE_OBJECT
687 /// @return </TRUE>, if resize/move was successful
688 bool impl_moveOrResizeObject(
689 const ::rtl::OUString & rCID, eMoveOrResizeType eType, double fAmountLogicX, double fAmountLogicY );
690 bool impl_DragDataPoint( const ::rtl::OUString & rCID, double fOffset );
692 ::std::set< ::rtl::OUString > impl_getAvailableCommands();
694 /** Creates a helper accesibility class that must be initialized via XInitialization. For
695 parameters see
697 The returned object should not be used directly. Instead a proxy object
698 should use this helper to retrieve its children and add them to its own
699 children.
701 ::com::sun::star::uno::Reference<
702 ::com::sun::star::accessibility::XAccessibleContext >
703 impl_createAccessibleTextContext();
705 void impl_PasteGraphic( ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > & xGraphic,
706 const ::Point & aPosition );
707 void impl_SetMousePointer( const MouseEvent & rEvent );
709 void impl_ClearSelection();
712 //.............................................................................
713 } // namespace chart
714 //.............................................................................
716 #endif