1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fudraw.cxx,v $
10 * $Revision: 1.25.128.4 $
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 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sc.hxx"
34 //------------------------------------------------------------------------
36 #include <svx/editeng.hxx> // EditEngine::IsSimpleCharInput
37 #include <svx/outlobj.hxx>
38 #include <svx/svdobj.hxx>
39 #include <svx/svdoole2.hxx>
40 #include <svx/svdouno.hxx>
41 #include <svx/svdocapt.hxx>
42 #include <svx/svdpage.hxx>
43 #include <svx/svditer.hxx>
44 #include <svx/svdundo.hxx>
45 #include <sfx2/dispatch.hxx>
46 #include <sfx2/viewfrm.hxx>
47 #include <com/sun/star/embed/EmbedVerbs.hpp>
52 #include "tabvwsh.hxx"
53 #include "drwlayer.hxx"
54 #include "scresid.hxx"
55 #include "userdat.hxx"
58 #include "globstr.hrc"
59 #include "drawview.hxx"
61 using namespace ::com::sun::star
;
63 /*************************************************************************
65 |* Basisklasse fuer alle Drawmodul-spezifischen Funktionen
67 \************************************************************************/
69 FuDraw::FuDraw(ScTabViewShell
* pViewSh
, Window
* pWin
, ScDrawView
* pViewP
,
70 SdrModel
* pDoc
, SfxRequest
& rReq
) :
71 FuPoor (pViewSh
, pWin
, pViewP
, pDoc
, rReq
),
72 aNewPointer ( POINTER_ARROW
),
73 aOldPointer ( POINTER_ARROW
)
77 /*************************************************************************
81 \************************************************************************/
87 /*************************************************************************
89 |* Modifier-Tasten auswerten
91 \************************************************************************/
93 void FuDraw::DoModifiers(const MouseEvent
& rMEvt
)
95 // Shift = Ortho und AngleSnap
96 // Control = Snap (Toggle)
99 BOOL bShift
= rMEvt
.IsShift();
100 // BOOL bCtrl = rMEvt.IsMod1();
101 BOOL bAlt
= rMEvt
.IsMod2();
103 // ScViewData* pViewData = pViewShell->GetViewData();
104 // const ScViewOptions& rOpt = pViewData->GetOptions();
105 // const ScGridOptions& rGrid = rOpt.GetGridOptions();
106 // BOOL bGridOpt = rGrid.GetUseGridSnap();
108 BOOL bOrtho
= bShift
;
109 BOOL bAngleSnap
= bShift
;
110 // BOOL bGridSnap = ( bGridOpt != bCtrl ); // andere Snap's nicht unterstuetzt
114 if(doConstructOrthogonal())
119 if (pView
->IsOrtho() != bOrtho
)
120 pView
->SetOrtho(bOrtho
);
121 if (pView
->IsAngleSnapEnabled() != bAngleSnap
)
122 pView
->SetAngleSnapEnabled(bAngleSnap
);
124 /* Control fuer Snap beisst sich beim Verschieben mit "kopieren" !!!
126 if (pView->IsGridSnap() != bGridSnap)
127 pView->SetGridSnap(bGridSnap);
128 if (pView->IsSnapEnabled() != bGridSnap)
129 pView->SetSnapEnabled(bGridSnap);
131 if (pView
->IsCreate1stPointAsCenter() != bCenter
)
132 pView
->SetCreate1stPointAsCenter(bCenter
);
133 if (pView
->IsResizeAtCenter() != bCenter
)
134 pView
->SetResizeAtCenter(bCenter
);
138 void FuDraw::ResetModifiers()
140 ScViewData
* pViewData
= pViewShell
->GetViewData();
141 const ScViewOptions
& rOpt
= pViewData
->GetOptions();
142 const ScGridOptions
& rGrid
= rOpt
.GetGridOptions();
143 BOOL bGridOpt
= rGrid
.GetUseGridSnap();
145 if (pView
->IsOrtho())
146 pView
->SetOrtho(FALSE
);
147 if (pView
->IsAngleSnapEnabled())
148 pView
->SetAngleSnapEnabled(FALSE
);
150 if (pView
->IsGridSnap() != bGridOpt
)
151 pView
->SetGridSnap(bGridOpt
);
152 if (pView
->IsSnapEnabled() != bGridOpt
)
153 pView
->SetSnapEnabled(bGridOpt
);
155 if (pView
->IsCreate1stPointAsCenter())
156 pView
->SetCreate1stPointAsCenter(FALSE
);
157 if (pView
->IsResizeAtCenter())
158 pView
->SetResizeAtCenter(FALSE
);
161 /*************************************************************************
163 |* MouseButtonDown-event
165 \************************************************************************/
167 BOOL __EXPORT
FuDraw::MouseButtonDown(const MouseEvent
& rMEvt
)
169 // #95491# remember button state for creation of own MouseEvents
170 SetMouseButtonCode(rMEvt
.GetButtons());
172 DoModifiers( rMEvt
);
176 /*************************************************************************
180 \************************************************************************/
182 BOOL __EXPORT
FuDraw::MouseMove(const MouseEvent
& rMEvt
)
184 // #106438# evaluate modifiers only if in a drawing layer action
185 // (don't interfere with keyboard shortcut handling)
186 if (pView
->IsAction())
187 DoModifiers( rMEvt
);
192 /*************************************************************************
194 |* MouseButtonUp-event
196 \************************************************************************/
198 BOOL __EXPORT
FuDraw::MouseButtonUp(const MouseEvent
& rMEvt
)
200 // #95491# remember button state for creation of own MouseEvents
201 SetMouseButtonCode(rMEvt
.GetButtons());
207 /*************************************************************************
209 |* Tastaturereignisse bearbeiten
211 |* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
214 \************************************************************************/
216 BOOL
lcl_KeyEditMode( SdrObject
* pObj
, ScTabViewShell
* pViewShell
, const KeyEvent
* pInitialKey
)
218 BOOL bReturn
= FALSE
;
219 if ( pObj
&& pObj
->ISA(SdrTextObj
) && !pObj
->ISA(SdrUnoObj
) )
221 // start text edit - like FuSelection::MouseButtonUp,
222 // but with bCursorToEnd instead of mouse position
224 OutlinerParaObject
* pOPO
= pObj
->GetOutlinerParaObject();
225 BOOL bVertical
= ( pOPO
&& pOPO
->IsVertical() );
226 USHORT nTextSlotId
= bVertical
? SID_DRAW_TEXT_VERTICAL
: SID_DRAW_TEXT
;
228 // don't switch shells if text shell is already active
229 FuPoor
* pPoor
= pViewShell
->GetViewData()->GetView()->GetDrawFuncPtr();
230 if ( !pPoor
|| pPoor
->GetSlotID() != nTextSlotId
)
232 pViewShell
->GetViewData()->GetDispatcher().
233 Execute(nTextSlotId
, SFX_CALLMODE_SYNCHRON
| SFX_CALLMODE_RECORD
);
236 // get the resulting FuText and set in edit mode
237 pPoor
= pViewShell
->GetViewData()->GetView()->GetDrawFuncPtr();
238 if ( pPoor
&& pPoor
->GetSlotID() == nTextSlotId
) // no RTTI
240 FuText
* pText
= (FuText
*)pPoor
;
241 pText
->SetInEditMode( pObj
, NULL
, TRUE
, pInitialKey
);
242 //! set cursor to end of text
249 BOOL __EXPORT
FuDraw::KeyInput(const KeyEvent
& rKEvt
)
251 BOOL bReturn
= FALSE
;
252 ScViewData
& rViewData
= *pViewShell
->GetViewData();
254 switch ( rKEvt
.GetKeyCode().GetCode() )
258 /* 18.12.95: TextShell beibehalten nicht mehr gewuenscht...
260 * if ( pView->IsAction() )
262 * pView->BrkAction();
263 * pWindow->ReleaseMouse();
266 * else if ( pView->IsTextEdit() )
268 * pView->EndTextEdit();
269 * pView->SetCreateMode();
270 * pViewShell->GetScDrawView()->InvalidateDrawTextAttrs();
276 if ( pViewShell
->IsDrawTextShell() || aSfxRequest
.GetSlot() == SID_DRAW_NOTEEDIT
)
278 // in normale Draw-Shell, wenn Objekt selektiert, sonst Zeichnen aus
279 rViewData
.GetDispatcher().Execute(aSfxRequest
.GetSlot(), SFX_CALLMODE_SLOT
| SFX_CALLMODE_RECORD
);
282 else if ( pViewShell
->IsDrawSelMode() )
285 rViewData
.GetDispatcher().Execute(SID_OBJECT_SELECT
, SFX_CALLMODE_SLOT
| SFX_CALLMODE_RECORD
);
288 else if ( pView
->AreObjectsMarked() )
291 SdrHdlList
& rHdlList
= const_cast< SdrHdlList
& >( pView
->GetHdlList() );
292 if( rHdlList
.GetFocusHdl() )
293 rHdlList
.ResetFocusHdl();
297 // Beim Bezier-Editieren ist jetzt wieder das Objekt selektiert
298 if (!pView
->AreObjectsMarked())
299 pViewShell
->SetDrawShell( FALSE
);
305 case KEY_DELETE
: //! ueber Accelerator
306 pView
->DeleteMarked();
312 if( rKEvt
.GetKeyCode().GetModifier() == 0 )
314 // #98256# activate OLE object on RETURN for selected object
315 // #98198# put selected text object in edit mode
316 const SdrMarkList
& rMarkList
= pView
->GetMarkedObjectList();
317 if( !pView
->IsTextEdit() && 1 == rMarkList
.GetMarkCount() )
319 BOOL bOle
= pViewShell
->GetViewFrame()->GetFrame()->IsInPlace();
320 SdrObject
* pObj
= rMarkList
.GetMark( 0 )->GetMarkedSdrObj();
321 if( pObj
&& pObj
->ISA( SdrOle2Obj
) && !bOle
)
323 //HMHpView->HideMarkHdl();
324 if(rKEvt
.GetKeyCode().IsShift())
325 pViewShell
->ActivateObject( static_cast< SdrOle2Obj
* >( pObj
),
326 embed::EmbedVerbs::MS_OLEVERB_OPEN
);
328 pViewShell
->ActivateObject( static_cast< SdrOle2Obj
* >( pObj
),
329 embed::EmbedVerbs::MS_OLEVERB_PRIMARY
);
334 else if ( lcl_KeyEditMode( pObj
, pViewShell
, NULL
) ) // start text edit for suitable object
343 if( rKEvt
.GetKeyCode().GetModifier() == 0 )
345 // #98198# put selected text object in edit mode
346 // (this is not SID_SETINPUTMODE, but F2 hardcoded, like in Writer)
347 const SdrMarkList
& rMarkList
= pView
->GetMarkedObjectList();
348 if( !pView
->IsTextEdit() && 1 == rMarkList
.GetMarkCount() )
350 SdrObject
* pObj
= rMarkList
.GetMark( 0 )->GetMarkedSdrObj();
351 if ( lcl_KeyEditMode( pObj
, pViewShell
, NULL
) ) // start text edit for suitable object
361 // in calc do NOT start draw object selection using TAB/SHIFT-TAB when
362 // there is not yet a object selected
363 if(pView
->AreObjectsMarked())
365 KeyCode aCode
= rKEvt
.GetKeyCode();
367 if ( !aCode
.IsMod1() && !aCode
.IsMod2() )
369 // changeover to the next object
370 if(!pView
->MarkNextObj( !aCode
.IsShift() ))
372 // #97016# No next object: go over open end and
373 // get first from the other side
374 pView
->UnmarkAllObj();
375 pView
->MarkNextObj(!aCode
.IsShift());
379 if(pView
->AreObjectsMarked())
380 pView
->MakeVisible(pView
->GetAllMarkedRect(), *pWindow
);
385 // #98994# handle Mod1 and Mod2 to get travelling running on different systems
386 if(rKEvt
.GetKeyCode().IsMod1() || rKEvt
.GetKeyCode().IsMod2())
388 // #97016# II do something with a selected handle?
389 const SdrHdlList
& rHdlList
= pView
->GetHdlList();
390 sal_Bool
bForward(!rKEvt
.GetKeyCode().IsShift());
392 ((SdrHdlList
&)rHdlList
).TravelFocusHdl(bForward
);
394 // guarantee visibility of focused handle
395 SdrHdl
* pHdl
= rHdlList
.GetFocusHdl();
399 Point
aHdlPosition(pHdl
->GetPos());
400 Rectangle
aVisRect(aHdlPosition
- Point(100, 100), Size(200, 200));
401 pView
->MakeVisible(aVisRect
, *pWindow
);
414 // in calc do NOT select the last draw object when
415 // there is not yet a object selected
416 if(pView
->AreObjectsMarked())
418 KeyCode aCode
= rKEvt
.GetKeyCode();
420 if ( aCode
.IsMod1() )
422 // #97016# mark last object
423 pView
->UnmarkAllObj();
424 pView
->MarkNextObj(FALSE
);
427 if(pView
->AreObjectsMarked())
428 pView
->MakeVisible(pView
->GetAllMarkedRect(), *pWindow
);
439 // in calc do NOT select the first draw object when
440 // there is not yet a object selected
441 if(pView
->AreObjectsMarked())
443 KeyCode aCode
= rKEvt
.GetKeyCode();
445 if ( aCode
.IsMod1() )
447 // #97016# mark first object
448 pView
->UnmarkAllObj();
449 pView
->MarkNextObj(TRUE
);
452 if(pView
->AreObjectsMarked())
453 pView
->MakeVisible(pView
->GetAllMarkedRect(), *pWindow
);
467 // in calc do cursor travelling of draw objects only when
468 // there is a object selected yet
469 if(pView
->AreObjectsMarked())
472 const SdrMarkList
& rMarkList
= pView
->GetMarkedObjectList();
473 if(rMarkList
.GetMarkCount() == 1)
475 // disable cursor travelling on note objects as the tail connector position
477 SdrObject
* pObj
= rMarkList
.GetMark( 0 )->GetMarkedSdrObj();
478 if( ScDrawLayer::IsNoteCaption( pObj
) )
484 USHORT nCode
= rKEvt
.GetKeyCode().GetCode();
492 else if (nCode
== KEY_DOWN
)
498 else if (nCode
== KEY_LEFT
)
504 else if (nCode
== KEY_RIGHT
)
506 // Scroll nach rechts
511 BOOL bReadOnly
= rViewData
.GetDocShell()->IsReadOnly();
513 if(!rKEvt
.GetKeyCode().IsMod1() && !bReadOnly
)
515 if(rKEvt
.GetKeyCode().IsMod2())
517 // #97016# move in 1 pixel distance
518 Size aLogicSizeOnePixel
= (pWindow
) ? pWindow
->PixelToLogic(Size(1,1)) : Size(100, 100);
519 nX
*= aLogicSizeOnePixel
.Width();
520 nY
*= aLogicSizeOnePixel
.Height();
524 // old, fixed move distance
529 // is there a movement to do?
530 if(0 != nX
|| 0 != nY
)
533 const SdrHdlList
& rHdlList
= pView
->GetHdlList();
534 SdrHdl
* pHdl
= rHdlList
.GetFocusHdl();
538 // #107086# only take action when move is allowed
539 if(pView
->IsMoveAllowed())
541 // #90129# restrict movement to WorkArea
542 const Rectangle
& rWorkArea
= pView
->GetWorkArea();
544 if(!rWorkArea
.IsEmpty())
546 Rectangle
aMarkRect(pView
->GetMarkedObjRect());
547 aMarkRect
.Move(nX
, nY
);
549 if(!aMarkRect
.IsInside(rWorkArea
))
551 if(aMarkRect
.Left() < rWorkArea
.Left())
553 nX
+= rWorkArea
.Left() - aMarkRect
.Left();
556 if(aMarkRect
.Right() > rWorkArea
.Right())
558 nX
-= aMarkRect
.Right() - rWorkArea
.Right();
561 if(aMarkRect
.Top() < rWorkArea
.Top())
563 nY
+= rWorkArea
.Top() - aMarkRect
.Top();
566 if(aMarkRect
.Bottom() > rWorkArea
.Bottom())
568 nY
-= aMarkRect
.Bottom() - rWorkArea
.Bottom();
573 // now move the selected draw objects
574 pView
->MoveAllMarked(Size(nX
, nY
));
577 pView
->MakeVisible(pView
->GetAllMarkedRect(), *pWindow
);
584 // move handle with index nHandleIndex
585 if(pHdl
&& (nX
|| nY
))
587 // now move the Handle (nX, nY)
588 Point
aStartPoint(pHdl
->GetPos());
589 Point
aEndPoint(pHdl
->GetPos() + Point(nX
, nY
));
590 const SdrDragStat
& rDragStat
= pView
->GetDragStat();
593 pView
->BegDragObj(aStartPoint
, 0, pHdl
, 0);
595 if(pView
->IsDragObj())
597 FASTBOOL bWasNoSnap
= rDragStat
.IsNoSnap();
598 BOOL bWasSnapEnabled
= pView
->IsSnapEnabled();
600 // switch snapping off
602 ((SdrDragStat
&)rDragStat
).SetNoSnap(TRUE
);
604 pView
->SetSnapEnabled(FALSE
);
606 pView
->MovAction(aEndPoint
);
611 ((SdrDragStat
&)rDragStat
).SetNoSnap(bWasNoSnap
);
613 pView
->SetSnapEnabled(bWasSnapEnabled
);
616 // make moved handle visible
617 Rectangle
aVisRect(aEndPoint
- Point(100, 100), Size(200, 200));
618 pView
->MakeVisible(aVisRect
, *pWindow
);
632 // in calc do only something when draw objects are selected
633 if(pView
->AreObjectsMarked())
635 const SdrHdlList
& rHdlList
= pView
->GetHdlList();
636 SdrHdl
* pHdl
= rHdlList
.GetFocusHdl();
640 if(pHdl
->GetKind() == HDL_POLY
)
642 // rescue ID of point with focus
643 sal_uInt32
nPol(pHdl
->GetPolyNum());
644 sal_uInt32
nPnt(pHdl
->GetPointNum());
646 if(pView
->IsPointMarked(*pHdl
))
648 if(rKEvt
.GetKeyCode().IsShift())
650 pView
->UnmarkPoint(*pHdl
);
655 if(!rKEvt
.GetKeyCode().IsShift())
657 pView
->UnmarkAllPoints();
660 pView
->MarkPoint(*pHdl
);
663 if(0L == rHdlList
.GetFocusHdl())
665 // restore point with focus
666 SdrHdl
* pNewOne
= 0L;
668 for(sal_uInt32
a(0); !pNewOne
&& a
< rHdlList
.GetHdlCount(); a
++)
670 SdrHdl
* pAct
= rHdlList
.GetHdl(a
);
673 && pAct
->GetKind() == HDL_POLY
674 && pAct
->GetPolyNum() == nPol
675 && pAct
->GetPointNum() == nPnt
)
683 ((SdrHdlList
&)rHdlList
).SetFocusHdl(pNewOne
);
697 bReturn
= FuPoor::KeyInput(rKEvt
);
702 // #98198# allow direct typing into a selected text object
704 const SdrMarkList
& rMarkList
= pView
->GetMarkedObjectList();
705 if( !pView
->IsTextEdit() && 1 == rMarkList
.GetMarkCount() && EditEngine::IsSimpleCharInput(rKEvt
) )
707 SdrObject
* pObj
= rMarkList
.GetMark( 0 )->GetMarkedSdrObj();
709 // start text edit for suitable object, pass key event to OutlinerView
710 if ( lcl_KeyEditMode( pObj
, pViewShell
, &rKEvt
) )
719 void FuDraw::SelectionHasChanged()
721 const SdrHdlList
& rHdlList
= pView
->GetHdlList();
722 ((SdrHdlList
&)rHdlList
).ResetFocusHdl();
725 /*************************************************************************
727 |* Vor dem Scrollen Selektionsdarstellung ausblenden
729 \************************************************************************/
731 void FuDraw::ScrollStart()
733 // HideShownXor in Gridwin
736 /*************************************************************************
738 |* Nach dem Scrollen Selektionsdarstellung wieder anzeigen
740 \************************************************************************/
742 void FuDraw::ScrollEnd()
744 // ShowShownXor in Gridwin
747 /*************************************************************************
749 |* Function aktivieren
751 \************************************************************************/
753 void FuDraw::Activate()
758 /*************************************************************************
760 |* Function deaktivieren
762 \************************************************************************/
764 void FuDraw::Deactivate()
766 FuPoor::Deactivate();
769 /*************************************************************************
771 |* Maus-Pointer umschalten
773 \************************************************************************/
775 BOOL
lcl_UrlHit( SdrView
* pView
, const Point
& rPosPixel
, Window
* pWindow
)
778 MouseEvent
aMEvt( rPosPixel
, 1, 0, MOUSE_LEFT
);
779 SdrHitKind eHit
= pView
->PickAnything( aMEvt
, SDRMOUSEBUTTONDOWN
, aVEvt
);
781 if ( eHit
!= SDRHIT_NONE
&& aVEvt
.pObj
!= NULL
)
783 if ( ScDrawLayer::GetIMapInfo( aVEvt
.pObj
) && ScDrawLayer::GetHitIMapObject(
784 aVEvt
.pObj
, pWindow
->PixelToLogic(rPosPixel
), *pWindow
) )
787 if ( aVEvt
.eEvent
== SDREVENT_EXECUTEURL
)
794 void FuDraw::ForcePointer(const MouseEvent
* pMEvt
)
796 if ( !pView
->IsAction() )
798 Point aPosPixel
= pWindow
->GetPointerPosPixel();
799 BOOL bAlt
= pMEvt
&& pMEvt
->IsMod2();
800 Point aPnt
= pWindow
->PixelToLogic( aPosPixel
);
801 SdrHdl
* pHdl
= pView
->PickHandle(aPnt
);
805 ScMacroInfo
* pInfo
= 0;
806 if ( pView
->PickObj(aPnt
, pView
->getHitTolLog(), pObj
, pPV
, SDRSEARCH_ALSOONMASTER
) )
808 if ( pObj
->IsGroupObject() )
811 if ( pView
->PickObj(aMDPos
, pView
->getHitTolLog(), pHit
, pPV
, SDRSEARCH_DEEP
) )
814 pInfo
= ScDrawLayer::GetMacroInfo( pObj
);
817 if ( pView
->IsTextEdit() )
819 pViewShell
->SetActivePointer(Pointer(POINTER_TEXT
)); // kann nicht sein ?
823 pViewShell
->SetActivePointer(
824 pView
->GetPreferedPointer( aPnt
, pWindow
) );
826 else if ( pView
->IsMarkedHit(aPnt
) )
828 pViewShell
->SetActivePointer( Pointer(POINTER_MOVE
) );
830 else if ( !bAlt
&& ( !pMEvt
|| !pMEvt
->GetButtons() )
831 && lcl_UrlHit( pView
, aPosPixel
, pWindow
) )
833 // kann mit ALT unterdrueckt werden
834 pWindow
->SetPointer( Pointer( POINTER_REFHAND
) ); // Text-URL / ImageMap
836 else if ( !bAlt
&& pView
->PickObj(aPnt
, pView
->getHitTolLog(), pObj
, pPV
, SDRSEARCH_PICKMACRO
) )
838 // kann mit ALT unterdrueckt werden
839 SdrObjMacroHitRec aHitRec
; //! muss da noch irgendwas gesetzt werden ????
840 pViewShell
->SetActivePointer( pObj
->GetMacroPointer(aHitRec
) );
842 else if ( !bAlt
&& pInfo
&& ((pInfo
->GetMacro().getLength() > 0) || (pInfo
->GetHlink().getLength() > 0)) )
843 pWindow
->SetPointer( Pointer( POINTER_REFHAND
) );
844 else if ( IsDetectiveHit( aPnt
) )
845 pViewShell
->SetActivePointer( Pointer( POINTER_DETECTIVE
) );
847 pViewShell
->SetActivePointer( aNewPointer
); //! in Gridwin?
851 BOOL
FuDraw::IsSizingOrMovingNote( const MouseEvent
& rMEvt
) const
853 BOOL bIsSizingOrMoving
= FALSE
;
854 if ( rMEvt
.IsLeft() )
856 const SdrMarkList
& rNoteMarkList
= pView
->GetMarkedObjectList();
857 if(rNoteMarkList
.GetMarkCount() == 1)
859 SdrObject
* pObj
= rNoteMarkList
.GetMark( 0 )->GetMarkedSdrObj();
860 if ( ScDrawLayer::IsNoteCaption( pObj
) )
862 Point aMPos
= pWindow
->PixelToLogic( rMEvt
.GetPosPixel() );
864 pView
->PickHandle( aMPos
) || // handles to resize the note
865 pView
->IsTextEditFrameHit( aMPos
); // frame for moving the note
869 return bIsSizingOrMoving
;