1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef _CHART_CONTROLLER_HXX
29 #define _CHART_CONTROLLER_HXX
31 #include "LifeTime.hxx"
32 #include "ServiceMacros.hxx"
33 #include "CommandDispatchContainer.hxx"
34 #include "SelectionHelper.hxx"
36 // header for enum SdrDragMode
37 #include <svx/svdtypes.hxx>
38 // header for class Timer
39 #include <vcl/timer.hxx>
40 // header for class MouseEvent
41 #include <vcl/event.hxx>
43 #include <cppuhelper/implbase12.hxx>
45 #include <com/sun/star/accessibility/XAccessible.hpp>
46 #include <com/sun/star/document/XUndoManager.hpp>
47 #include <com/sun/star/frame/XController.hpp>
48 #include <com/sun/star/frame/XDispatchProvider.hpp>
49 #include <com/sun/star/frame/XDispatch.hpp>
50 #include <com/sun/star/view/XSelectionSupplier.hpp>
51 #include <com/sun/star/ui/XContextMenuInterception.hpp>
52 #include <com/sun/star/uno/XWeak.hpp>
53 #include <com/sun/star/util/XCloseListener.hpp>
54 #include <com/sun/star/util/XCloseable.hpp>
55 #include <com/sun/star/lang/XInitialization.hpp>
56 #include <com/sun/star/lang/XServiceInfo.hpp>
57 #include <com/sun/star/uno/XComponentContext.hpp>
58 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
59 #include <com/sun/star/util/XModifyListener.hpp>
60 #include <com/sun/star/util/XModeChangeListener.hpp>
61 #include <com/sun/star/awt/Point.hpp>
62 #include <com/sun/star/awt/Size.hpp>
63 #include <com/sun/star/util/XURLTransformer.hpp>
64 #include <com/sun/star/frame/XLayoutManagerListener.hpp>
65 #include <com/sun/star/frame/XLayoutManagerEventBroadcaster.hpp>
68 #include <boost/shared_ptr.hpp>
76 class AcceleratorExecute
;
79 class DropTargetHelper
;
81 namespace com
{ namespace sun
{ namespace star
{
88 //.............................................................................
91 //.............................................................................
95 enum ChartDrawMode
{ CHARTDRAW_INSERT
, CHARTDRAW_SELECT
};
97 class WindowController
100 virtual ~WindowController() {};
102 virtual void PrePaint()=0;
103 virtual void execute_Paint( const Rectangle
& rRect
)=0;
104 virtual void execute_MouseButtonDown( const MouseEvent
& rMEvt
)=0;
105 virtual void execute_MouseMove( const MouseEvent
& rMEvt
)=0;
106 virtual void execute_Tracking( const TrackingEvent
& rTEvt
)=0;
107 virtual void execute_MouseButtonUp( const MouseEvent
& rMEvt
)=0;
108 virtual void execute_Resize()=0;
109 virtual void execute_Activate()=0;
110 virtual void execute_Deactivate()=0;
111 virtual void execute_GetFocus()=0;
112 virtual void execute_LoseFocus()=0;
113 virtual void execute_Command( const CommandEvent
& rCEvt
)=0;
114 virtual bool execute_KeyInput( const KeyEvent
& rKEvt
)=0;
116 /** get help text to be shown in a quick help
118 @param aAtLogicPosition the position in logic coordinates (of the
119 window) of the mouse cursor to determine for
120 which object help is requested.
122 @param bIsBalloonHelp determines whether to return the long text version
123 (balloon help) or the shorter one (quick help).
125 @param rOutQuickHelpText is filled with the quick help text
127 @param rOutEqualRect is filled with a rectangle that denotes the region
128 in which the quick help does not change.
130 @return </sal_True>, if a quick help should be shown.
132 virtual bool requestQuickHelp(
133 ::Point aAtLogicPosition
, bool bIsBalloonHelp
,
134 ::rtl::OUString
& rOutQuickHelpText
, ::com::sun::star::awt::Rectangle
& rOutEqualRect
) = 0;
136 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> CreateAccessible() = 0;
140 class DrawModelWrapper
;
141 class DrawViewWrapper
;
142 class ViewElementListProvider
;
143 class ReferenceSizeProvider
;
145 class ChartController
: public ::cppu::WeakImplHelper12
<
146 ::com::sun::star::frame::XController
//comprehends XComponent (required interface)
147 ,::com::sun::star::frame::XDispatchProvider
//(required interface)
148 ,::com::sun::star::view::XSelectionSupplier
//(optional interface)
149 ,::com::sun::star::ui::XContextMenuInterception
//(optional interface)
150 ,::com::sun::star::util::XCloseListener
//(needed for communication with XModel)
151 ,::com::sun::star::lang::XServiceInfo
152 // ,public ::com::sun::star::uno::XWeak // implemented by WeakImplHelper(optional interface)
153 // ,public ::com::sun::star::uno::XInterface // implemented by WeakImplHelper(optional interface)
154 // ,public ::com::sun::star::lang::XTypeProvider // implemented by WeakImplHelper
155 ,::com::sun::star::frame::XDispatch
156 ,::com::sun::star::awt::XWindow
//this is the Window Controller part of this Controller, that will be given to a Frame via setComponent
157 ,::com::sun::star::lang::XMultiServiceFactory
158 ,::com::sun::star::util::XModifyListener
159 ,::com::sun::star::util::XModeChangeListener
160 ,::com::sun::star::frame::XLayoutManagerListener
162 , public WindowController
164 friend class DrawCommandDispatch
;
165 friend class ShapeController
;
168 //no default constructor
169 ChartController(::com::sun::star::uno::Reference
<
170 ::com::sun::star::uno::XComponentContext
> const & xContext
);
171 virtual ~ChartController();
173 //-----------------------------------------------------------------
174 // ::com::sun::star::lang::XServiceInfo
175 //-----------------------------------------------------------------
177 APPHELPER_XSERVICEINFO_DECL()
178 APPHELPER_SERVICE_FACTORY_HELPER(ChartController
)
180 //-----------------------------------------------------------------
181 // ::com::sun::star::frame::XController (required interface)
182 //-----------------------------------------------------------------
183 virtual void SAL_CALL
184 attachFrame( const ::com::sun::star::uno::Reference
<
185 ::com::sun::star::frame::XFrame
> & xFrame
)
186 throw (::com::sun::star::uno::RuntimeException
);
188 virtual sal_Bool SAL_CALL
189 attachModel( const ::com::sun::star::uno::Reference
<
190 ::com::sun::star::frame::XModel
> & xModel
)
191 throw (::com::sun::star::uno::RuntimeException
);
193 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
> SAL_CALL
194 getFrame() throw (::com::sun::star::uno::RuntimeException
);
196 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
> SAL_CALL
197 getModel() throw (::com::sun::star::uno::RuntimeException
);
199 virtual ::com::sun::star::uno::Any SAL_CALL
200 getViewData() throw (::com::sun::star::uno::RuntimeException
);
202 virtual void SAL_CALL
203 restoreViewData( const ::com::sun::star::uno::Any
& rValue
)
204 throw (::com::sun::star::uno::RuntimeException
);
206 virtual sal_Bool SAL_CALL
207 suspend( sal_Bool bSuspend
)
208 throw (::com::sun::star::uno::RuntimeException
);
210 //-----------------------------------------------------------------
211 // ::com::sun::star::lang::XComponent (base of XController)
212 //-----------------------------------------------------------------
213 virtual void SAL_CALL
214 dispose() throw (::com::sun::star::uno::RuntimeException
);
216 virtual void SAL_CALL
217 addEventListener( const ::com::sun::star::uno::Reference
<
218 ::com::sun::star::lang::XEventListener
> & xListener
)
219 throw (::com::sun::star::uno::RuntimeException
);
221 virtual void SAL_CALL
222 removeEventListener( const ::com::sun::star::uno::Reference
<
223 ::com::sun::star::lang::XEventListener
> & xListener
)
224 throw (::com::sun::star::uno::RuntimeException
);
226 //-----------------------------------------------------------------
227 // ::com::sun::star::frame::XDispatchProvider (required interface)
228 //-----------------------------------------------------------------
229 virtual ::com::sun::star::uno::Reference
<
230 ::com::sun::star::frame::XDispatch
> SAL_CALL
231 queryDispatch( const ::com::sun::star::util::URL
& rURL
232 , const rtl::OUString
& rTargetFrameName
233 , sal_Int32 nSearchFlags
)
234 throw (::com::sun::star::uno::RuntimeException
);
236 virtual ::com::sun::star::uno::Sequence
<
237 ::com::sun::star::uno::Reference
<
238 ::com::sun::star::frame::XDispatch
> > SAL_CALL
239 queryDispatches( const ::com::sun::star::uno::Sequence
<
240 ::com::sun::star::frame::DispatchDescriptor
> & xDescripts
)
241 throw (::com::sun::star::uno::RuntimeException
);
243 //-----------------------------------------------------------------
244 // ::com::sun::star::view::XSelectionSupplier (optional interface)
245 //-----------------------------------------------------------------
246 virtual sal_Bool SAL_CALL
247 select( const ::com::sun::star::uno::Any
& rSelection
)
248 throw ( com::sun::star::lang::IllegalArgumentException
);
250 virtual ::com::sun::star::uno::Any SAL_CALL
251 getSelection() throw (::com::sun::star::uno::RuntimeException
);
253 virtual void SAL_CALL
254 addSelectionChangeListener( const ::com::sun::star::uno::Reference
<
255 com::sun::star::view::XSelectionChangeListener
> & xListener
)
256 throw (::com::sun::star::uno::RuntimeException
);
258 virtual void SAL_CALL
259 removeSelectionChangeListener( const ::com::sun::star::uno::Reference
<
260 com::sun::star::view::XSelectionChangeListener
> & xListener
)
261 throw (::com::sun::star::uno::RuntimeException
);
263 //-----------------------------------------------------------------
264 // ::com::sun::star::ui::XContextMenuInterception (optional interface)
265 //-----------------------------------------------------------------
266 virtual void SAL_CALL
267 registerContextMenuInterceptor( const ::com::sun::star::uno::Reference
<
268 ::com::sun::star::ui::XContextMenuInterceptor
> & xInterceptor
)
269 throw (::com::sun::star::uno::RuntimeException
);
271 virtual void SAL_CALL
272 releaseContextMenuInterceptor( const ::com::sun::star::uno::Reference
<
273 ::com::sun::star::ui::XContextMenuInterceptor
> & xInterceptor
)
274 throw (::com::sun::star::uno::RuntimeException
);
277 //-----------------------------------------------------------------
278 //-----------------------------------------------------------------
279 //additional interfaces
281 //-----------------------------------------------------------------
282 // ::com::sun::star::util::XCloseListener
283 //-----------------------------------------------------------------
284 virtual void SAL_CALL
285 queryClosing( const ::com::sun::star::lang::EventObject
& Source
286 , sal_Bool GetsOwnership
)
287 throw (::com::sun::star::util::CloseVetoException
288 , ::com::sun::star::uno::RuntimeException
);
290 virtual void SAL_CALL
291 notifyClosing( const ::com::sun::star::lang::EventObject
& Source
)
292 throw (::com::sun::star::uno::RuntimeException
);
294 //-------------------------------------------------------------------------------------
295 // ::com::sun::star::util::XEventListener (base of XCloseListener and XModifyListener)
296 //-------------------------------------------------------------------------------------
297 virtual void SAL_CALL
298 disposing( const ::com::sun::star::lang::EventObject
& Source
)
299 throw (::com::sun::star::uno::RuntimeException
);
301 //-----------------------------------------------------------------
302 // ::com::sun::star::frame::XDispatch
303 //-----------------------------------------------------------------
305 virtual void SAL_CALL
306 dispatch( const ::com::sun::star::util::URL
& aURL
307 , const ::com::sun::star::uno::Sequence
<
308 ::com::sun::star::beans::PropertyValue
>& aArgs
)
309 throw (::com::sun::star::uno::RuntimeException
);
311 virtual void SAL_CALL
312 addStatusListener( 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 virtual void SAL_CALL
318 removeStatusListener( const ::com::sun::star::uno::Reference
<
319 ::com::sun::star::frame::XStatusListener
>& xControl
320 , const ::com::sun::star::util::URL
& aURL
)
321 throw (::com::sun::star::uno::RuntimeException
);
323 //-----------------------------------------------------------------
324 // ::com::sun::star::awt::XWindow
325 //-----------------------------------------------------------------
326 virtual void SAL_CALL
327 setPosSize( sal_Int32 X
, sal_Int32 Y
328 , sal_Int32 Width
, sal_Int32 Height
, sal_Int16 Flags
)
329 throw (::com::sun::star::uno::RuntimeException
);
331 virtual ::com::sun::star::awt::Rectangle SAL_CALL
333 throw (::com::sun::star::uno::RuntimeException
);
335 virtual void SAL_CALL
336 setVisible( sal_Bool Visible
)
337 throw (::com::sun::star::uno::RuntimeException
);
339 virtual void SAL_CALL
340 setEnable( sal_Bool Enable
)
341 throw (::com::sun::star::uno::RuntimeException
);
343 virtual void SAL_CALL
344 setFocus() throw (::com::sun::star::uno::RuntimeException
);
347 virtual void SAL_CALL
348 addWindowListener( const ::com::sun::star::uno::Reference
<
349 ::com::sun::star::awt::XWindowListener
>& xListener
)
350 throw (::com::sun::star::uno::RuntimeException
);
352 virtual void SAL_CALL
353 removeWindowListener( const ::com::sun::star::uno::Reference
<
354 ::com::sun::star::awt::XWindowListener
>& xListener
)
355 throw (::com::sun::star::uno::RuntimeException
);
357 virtual void SAL_CALL
358 addFocusListener( const ::com::sun::star::uno::Reference
<
359 ::com::sun::star::awt::XFocusListener
>& xListener
)
360 throw (::com::sun::star::uno::RuntimeException
);
362 virtual void SAL_CALL
363 removeFocusListener( const ::com::sun::star::uno::Reference
<
364 ::com::sun::star::awt::XFocusListener
>& xListener
)
365 throw (::com::sun::star::uno::RuntimeException
);
367 virtual void SAL_CALL
368 addKeyListener( const ::com::sun::star::uno::Reference
<
369 ::com::sun::star::awt::XKeyListener
>& xListener
)
370 throw (::com::sun::star::uno::RuntimeException
);
372 virtual void SAL_CALL
373 removeKeyListener( const ::com::sun::star::uno::Reference
<
374 ::com::sun::star::awt::XKeyListener
>& xListener
)
375 throw (::com::sun::star::uno::RuntimeException
);
377 virtual void SAL_CALL
378 addMouseListener( const ::com::sun::star::uno::Reference
<
379 ::com::sun::star::awt::XMouseListener
>& xListener
)
380 throw (::com::sun::star::uno::RuntimeException
);
382 virtual void SAL_CALL
383 removeMouseListener( const ::com::sun::star::uno::Reference
<
384 ::com::sun::star::awt::XMouseListener
>& xListener
)
385 throw (::com::sun::star::uno::RuntimeException
);
387 virtual void SAL_CALL
388 addMouseMotionListener( const ::com::sun::star::uno::Reference
<
389 ::com::sun::star::awt::XMouseMotionListener
>& xListener
)
390 throw (::com::sun::star::uno::RuntimeException
);
392 virtual void SAL_CALL
393 removeMouseMotionListener( const ::com::sun::star::uno::Reference
<
394 ::com::sun::star::awt::XMouseMotionListener
>& xListener
)
395 throw (::com::sun::star::uno::RuntimeException
);
397 virtual void SAL_CALL
398 addPaintListener( const ::com::sun::star::uno::Reference
<
399 ::com::sun::star::awt::XPaintListener
>& xListener
)
400 throw (::com::sun::star::uno::RuntimeException
);
402 virtual void SAL_CALL
403 removePaintListener( const ::com::sun::star::uno::Reference
<
404 ::com::sun::star::awt::XPaintListener
>& xListener
)
405 throw (::com::sun::star::uno::RuntimeException
);
407 //-----------------------------------------------------------------
408 // ::com::sun::star::lang XMultiServiceFactory
409 //-----------------------------------------------------------------
410 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
411 createInstance( const ::rtl::OUString
& aServiceSpecifier
)
412 throw (::com::sun::star::uno::Exception
,
413 ::com::sun::star::uno::RuntimeException
);
414 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
415 createInstanceWithArguments( const ::rtl::OUString
& ServiceSpecifier
,
416 const ::com::sun::star::uno::Sequence
<
417 ::com::sun::star::uno::Any
>& Arguments
)
418 throw (::com::sun::star::uno::Exception
,
419 ::com::sun::star::uno::RuntimeException
);
420 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
421 getAvailableServiceNames()
422 throw (::com::sun::star::uno::RuntimeException
);
424 //-----------------------------------------------------------------
425 // ::com::sun::star::util::XModifyListener
426 //-----------------------------------------------------------------
427 virtual void SAL_CALL
modified(
428 const ::com::sun::star::lang::EventObject
& aEvent
)
429 throw (::com::sun::star::uno::RuntimeException
);
431 //-----------------------------------------------------------------
432 // ::com::sun::star::util::XModeChangeListener
433 //-----------------------------------------------------------------
434 virtual void SAL_CALL
modeChanged(
435 const ::com::sun::star::util::ModeChangeEvent
& _rSource
)
436 throw (::com::sun::star::uno::RuntimeException
);
438 //-----------------------------------------------------------------
439 // ::com::sun::star::frame::XLayoutManagerListener
440 //-----------------------------------------------------------------
441 virtual void SAL_CALL
layoutEvent(
442 const ::com::sun::star::lang::EventObject
& aSource
,
443 ::sal_Int16 eLayoutEvent
,
444 const ::com::sun::star::uno::Any
& aInfo
)
445 throw (::com::sun::star::uno::RuntimeException
);
447 //-----------------------------------------------------------------
448 // chart2::WindowController
449 //-----------------------------------------------------------------
450 virtual void PrePaint();
451 virtual void execute_Paint( const Rectangle
& rRect
);
452 virtual void execute_MouseButtonDown( const MouseEvent
& rMEvt
);
453 virtual void execute_MouseMove( const MouseEvent
& rMEvt
);
454 virtual void execute_Tracking( const TrackingEvent
& rTEvt
);
455 virtual void execute_MouseButtonUp( const MouseEvent
& rMEvt
);
456 virtual void execute_Resize();
457 virtual void execute_Activate();
458 virtual void execute_Deactivate();
459 virtual void execute_GetFocus();
460 virtual void execute_LoseFocus();
461 virtual void execute_Command( const CommandEvent
& rCEvt
);
462 virtual bool execute_KeyInput( const KeyEvent
& rKEvt
);
464 virtual bool requestQuickHelp(
465 ::Point aAtLogicPosition
, bool bIsBalloonHelp
,
466 ::rtl::OUString
& rOutQuickHelpText
, ::com::sun::star::awt::Rectangle
& rOutEqualRect
);
468 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> CreateAccessible();
470 //-----------------------------------------------------------------
471 //-----------------------------------------------------------------
473 static bool isObjectDeleteable( const ::com::sun::star::uno::Any
& rSelection
);
475 void setDrawMode( ChartDrawMode eMode
) { m_eDrawMode
= eMode
; }
476 ChartDrawMode
getDrawMode() const { return m_eDrawMode
; }
478 bool isShapeContext() const;
480 DECL_LINK( NotifyUndoActionHdl
, SdrUndoAction
* );
483 //-----------------------------------------------------------------
484 //-----------------------------------------------------------------
485 //-----------------------------------------------------------------
486 //-----------------------------------------------------------------
488 //-----------------------------------------------------------------
489 //-----------------------------------------------------------------
490 //-----------------------------------------------------------------
491 //-----------------------------------------------------------------
495 DrawModelWrapper
* GetDrawModelWrapper();
496 DrawViewWrapper
* GetDrawViewWrapper();
500 friend class ChartController::TheModelRef
;
505 virtual ~RefCountable();
509 sal_Int32
volatile m_nRefCount
;
511 class TheModel
: public RefCountable
514 TheModel( const ::com::sun::star::uno::Reference
<
515 ::com::sun::star::frame::XModel
> & xModel
);
519 void SetOwnerShip( sal_Bool bGetsOwnership
);
520 void addListener( ChartController
* pController
);
521 void removeListener( ChartController
* pController
);
522 void tryTermination();
523 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>
524 getModel() const { return m_xModel
;}
527 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
> m_xModel
;
528 ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloseable
> m_xCloseable
;
530 //the ownership between model and controller is not clear at first
531 //each controller might consider himself as owner of the model first
532 sal_Bool
volatile m_bOwnership
;
533 //with a XCloseable::close call and during XCloseListener::queryClosing
534 //the ownership can be regulated more explicit,
535 //if so the ownership is considered to be well known
536 sal_Bool
volatile m_bOwnershipIsWellKnown
;
541 TheModelRef( TheModel
* pTheModel
, ::osl::Mutex
& rMutex
);
542 TheModelRef( const TheModelRef
& rTheModel
, ::osl::Mutex
& rMutex
);
543 TheModelRef
& operator=(ChartController::TheModel
* pTheModel
);
544 TheModelRef
& operator=(const TheModelRef
& rTheModel
);
545 virtual ~TheModelRef();
547 TheModel
* operator->() const { return m_pTheModel
; }
549 TheModel
* m_pTheModel
;
550 ::osl::Mutex
& m_rModelMutex
;
554 mutable ::apphelper::LifeTimeManager m_aLifeTimeManager
;
556 mutable ::osl::Mutex m_aControllerMutex
;
557 sal_Bool
volatile m_bSuspended
;
558 sal_Bool
volatile m_bCanClose
;
560 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> m_xCC
;
563 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
> m_xFrame
;
564 mutable ::osl::Mutex m_aModelMutex
;
565 TheModelRef m_aModel
;
568 ChartWindow
* m_pChartWindow
;
569 ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XWindow
> m_xViewWindow
;
570 ::com::sun::star::uno::Reference
<
571 ::com::sun::star::uno::XInterface
> m_xChartView
;
572 ::boost::shared_ptr
< DrawModelWrapper
> m_pDrawModelWrapper
;
573 DrawViewWrapper
* m_pDrawViewWrapper
;
575 Selection m_aSelection
;
576 SdrDragMode m_eDragMode
;
578 Timer m_aDoubleClickTimer
;
579 bool volatile m_bWaitingForDoubleClick
;
580 bool volatile m_bWaitingForMouseUp
;
582 bool volatile m_bConnectingToView
;
584 ::com::sun::star::uno::Reference
< ::com::sun::star::document::XUndoManager
> m_xUndoManager
;
585 ::std::auto_ptr
< UndoGuard
> m_pTextActionUndoGuard
;
586 /// needed for dispatching URLs in FeatureStateEvents
587 mutable ::com::sun::star::uno::Reference
< ::com::sun::star::util::XURLTransformer
> m_xURLTransformer
;
589 ::std::auto_ptr
< ::svt::AcceleratorExecute
> m_apAccelExecute
;
591 CommandDispatchContainer m_aDispatchContainer
;
593 ::std::auto_ptr
< DropTargetHelper
> m_apDropTargetHelper
;
594 ::com::sun::star::uno::Reference
<
595 ::com::sun::star::frame::XLayoutManagerEventBroadcaster
>
596 m_xLayoutManagerEventBroadcaster
;
598 ChartDrawMode m_eDrawMode
;
603 sal_Bool
impl_isDisposedOrSuspended() const;
604 ::std::auto_ptr
< ReferenceSizeProvider
> impl_createReferenceSizeProvider();
605 void impl_adaptDataSeriesAutoResize();
607 void impl_createDrawViewController();
608 void impl_deleteDrawViewController();
610 //executeDispatch methods
611 void SAL_CALL
executeDispatch_ObjectProperties();
612 void SAL_CALL
executeDispatch_FormatObject( const ::rtl::OUString
& rDispatchCommand
);
613 void SAL_CALL
executeDlg_ObjectProperties( const ::rtl::OUString
& rObjectCID
);
614 bool executeDlg_ObjectProperties_withoutUndoGuard( const ::rtl::OUString
& rObjectCID
, bool bOkClickOnUnchangedDialogSouldBeRatedAsSuccessAlso
);
616 void SAL_CALL
executeDispatch_ChartType();
618 void executeDispatch_InsertTitles();
619 void executeDispatch_InsertLegend();
620 void executeDispatch_DeleteLegend();
621 void executeDispatch_OpenLegendDialog();
622 void executeDispatch_InsertAxes();
623 void executeDispatch_InsertGrid();
625 void executeDispatch_InsertMenu_DataLabels();
626 void executeDispatch_InsertMenu_Trendlines();
627 void executeDispatch_InsertMenu_MeanValues();
629 void executeDispatch_InsertMeanValue();
630 void executeDispatch_InsertTrendline();
631 void executeDispatch_InsertTrendlineEquation( bool bInsertR2
=false );
632 void executeDispatch_InsertErrorBars( bool bYError
);
634 void executeDispatch_InsertR2Value();
635 void executeDispatch_DeleteR2Value();
637 void executeDispatch_DeleteMeanValue();
638 void executeDispatch_DeleteTrendline();
639 void executeDispatch_DeleteTrendlineEquation();
640 void executeDispatch_DeleteErrorBars( bool bYError
);
642 void executeDispatch_InsertDataLabels();
643 void executeDispatch_InsertDataLabel();
644 void executeDispatch_DeleteDataLabels();
645 void executeDispatch_DeleteDataLabel();
647 void executeDispatch_ResetAllDataPoints();
648 void executeDispatch_ResetDataPoint();
650 void executeDispatch_InsertAxis();
651 void executeDispatch_InsertAxisTitle();
652 void executeDispatch_InsertMajorGrid();
653 void executeDispatch_InsertMinorGrid();
654 void executeDispatch_DeleteAxis();
655 void executeDispatch_DeleteMajorGrid();
656 void executeDispatch_DeleteMinorGrid();
658 void SAL_CALL
executeDispatch_InsertSpecialCharacter();
659 void SAL_CALL
executeDispatch_EditText( const Point
* pMousePixel
= NULL
);
660 void SAL_CALL
executeDispatch_SourceData();
661 void SAL_CALL
executeDispatch_MoveSeries( sal_Bool bForward
);
663 void StartTextEdit( const Point
* pMousePixel
= NULL
);
666 void SAL_CALL
executeDispatch_View3D();
667 void SAL_CALL
executeDispatch_PositionAndSize();
669 void executeDispatch_EditData();
671 void executeDispatch_NewArrangement();
672 void executeDispatch_ScaleText();
674 void executeDispatch_Paste();
675 void executeDispatch_Copy();
676 void executeDispatch_Cut();
677 bool executeDispatch_Delete();
678 void executeDispatch_ToggleLegend();
679 void executeDispatch_ToggleGridHorizontal();
681 void impl_ShapeControllerDispatch( const ::com::sun::star::util::URL
& rURL
,
682 const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& rArgs
);
684 DECL_LINK( DoubleClickWaitingHdl
, void* );
685 void execute_DoubleClick( const Point
* pMousePixel
= NULL
);
686 void startDoubleClickWaiting();
687 void stopDoubleClickWaiting();
689 void impl_selectObjectAndNotiy();
690 void impl_notifySelectionChangeListeners();
691 void impl_invalidateAccessible();
692 void impl_initializeAccessible();
693 void impl_initializeAccessible( const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XInitialization
>& xInit
);
695 //sets the model member to null if it equals the parameter
696 //returns true if successful
697 bool impl_releaseThisModel( const ::com::sun::star::uno::Reference
<
698 ::com::sun::star::uno::XInterface
> & xModel
);
700 enum eMoveOrResizeType
703 CENTERED_RESIZE_OBJECT
705 /// @return </sal_True>, if resize/move was successful
706 bool impl_moveOrResizeObject(
707 const ::rtl::OUString
& rCID
, eMoveOrResizeType eType
, double fAmountLogicX
, double fAmountLogicY
);
708 bool impl_DragDataPoint( const ::rtl::OUString
& rCID
, double fOffset
);
710 ::std::set
< ::rtl::OUString
> impl_getAvailableCommands();
712 /** Creates a helper accesibility class that must be initialized via XInitialization. For
715 The returned object should not be used directly. Instead a proxy object
716 should use this helper to retrieve its children and add them to its own
719 ::com::sun::star::uno::Reference
<
720 ::com::sun::star::accessibility::XAccessibleContext
>
721 impl_createAccessibleTextContext();
723 void impl_PasteGraphic( ::com::sun::star::uno::Reference
< ::com::sun::star::graphic::XGraphic
> & xGraphic
,
724 const ::Point
& aPosition
);
725 void impl_PasteShapes( SdrModel
* pModel
);
726 void impl_PasteStringAsTextShape( const ::rtl::OUString
& rString
, const ::com::sun::star::awt::Point
& rPosition
);
727 void impl_SetMousePointer( const MouseEvent
& rEvent
);
729 void impl_ClearSelection();
731 void impl_switchDiagramPositioningToExcludingPositioning();
734 //.............................................................................
736 //.............................................................................
740 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */