LibreOffice Module sd (master) 1
fusel.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <fusel.hxx>
21#include <svx/svddrgmt.hxx>
22#include <svx/svdpagv.hxx>
23#include <svx/svdogrp.hxx>
24#include <svx/scene3d.hxx>
25#include <vcl/imapobj.hxx>
27#include <svx/svxids.hrc>
28#include <svx/xfillit0.hxx>
29#include <svx/ImageMapInfo.hxx>
30#include <sfx2/viewfrm.hxx>
31#include <svl/stritem.hxx>
32#include <svl/intitem.hxx>
33#include <sfx2/dispatch.hxx>
34#include <sfx2/docfile.hxx>
35#include <editeng/flditem.hxx>
36
37#include <svx/svdotable.hxx>
38
39#include <app.hrc>
40
41#include <sdmod.hxx>
42#include <DrawDocShell.hxx>
43#include <stlpool.hxx>
44#include <fudraw.hxx>
45#include <ViewShell.hxx>
46#include <ViewShellBase.hxx>
47#include <FrameView.hxx>
48#include <View.hxx>
49#include <Window.hxx>
50#include <drawdoc.hxx>
51#include <DrawViewShell.hxx>
52#include <ToolBarManager.hxx>
53#include <Client.hxx>
54
55#include <svx/svdundo.hxx>
56
59
60#include <LibreOfficeKit/LibreOfficeKitEnums.h>
61#include <comphelper/lok.hxx>
62
63using namespace ::com::sun::star;
64
65namespace sd {
66
68 ViewShell* pViewSh,
69 ::sd::Window* pWin,
70 ::sd::View* pView,
71 SdDrawDocument* pDoc,
72 SfxRequest& rReq)
73 : FuDraw(pViewSh, pWin, pView, pDoc, rReq),
74 bTempRotation(false),
75 bSelectionChanged(false),
76 pHdl(nullptr),
77 bSuppressChangesOfSelection(false),
78 bMirrorSide0(false),
79 nEditMode(SID_BEZIER_MOVE),
80 pWaterCanCandidate(nullptr)
81 //Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point,
82 //and SHIFT+ENTER key to decide the position and draw the new insert point
83 ,bBeginInsertPoint(false),
84 oldPoint(0,0)
85 ,bMovedToCenterPoint(false)
86{
87}
88
90{
91 rtl::Reference<FuPoor> xFunc( new FuSelection( pViewSh, pWin, pView, pDoc, rReq ) );
92 xFunc->DoExecute(rReq);
93 return xFunc;
94}
95
97{
98 FuDraw::DoExecute( rReq );
99
100 // Select object bar
102}
103
105{
108
109 if ( mpView->GetDragMode() != SdrDragMode::Move )
110 {
111 mpView->SetDragMode(SdrDragMode::Move);
112 }
113}
114
115namespace {
116 bool lcl_followHyperlinkAllowed(const MouseEvent& rMEvt) {
118 return false;
120 return false;
121 return true;
122 }
123}
124
126{
127 pHdl = nullptr;
128 bool bReturn = FuDraw::MouseButtonDown(rMEvt);
129 bool bWaterCan = SD_MOD()->GetWaterCan();
130 const bool bReadOnly = mpDocSh->IsReadOnly();
131 // When the right mouse button is pressed then only select objects
132 // (and deselect others) as a preparation for showing the context
133 // menu.
134 const bool bSelectionOnly = rMEvt.IsRight();
135
136 bMBDown = true;
137 bSelectionChanged = false;
138
139 if ( mpView->IsAction() )
140 {
141 if ( rMEvt.IsRight() )
142 mpView->BckAction();
143 return true;
144 }
145
146 sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(mpView->GetDragThresholdPixels(),0)).Width() );
147 sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
148
150 {
151 // When tiled rendering, we always work in logic units, use the non-pixel constants.
152 nDrgLog = DRGLOG;
153 nHitLog = HITLOG;
154 }
155
156 // The following code is executed for right clicks as well as for left
157 // clicks in order to modify the selection for the right button as a
158 // preparation for the context menu. The functions BegMarkObject() and
159 // BegDragObject(), however, are not called for right clicks because a)
160 // it makes no sense and b) to have IsAction() return sal_False when called
161 // from Command() which is a prerequisite for the context menu.
162 if ((rMEvt.IsLeft() || rMEvt.IsRight())
163 && !mpView->IsAction()
165 {
166 /******************************************************************
167 * NO BEZIER_EDITOR
168 ******************************************************************/
169 mpWindow->CaptureMouse();
171
172 Degree100 nAngle0 = GetAngle(aMDPos - mpView->GetRef1());
173 nAngle0 -= 27000_deg100;
174 nAngle0 = NormAngle36000(nAngle0);
175 bMirrorSide0 = nAngle0 < 18000_deg100;
176
178 {
179 /******************************************************************
180 * If 3D-rotation bodies are about to be created,
181 * end creation now.
182 ******************************************************************/
184 mpWindow->EnterWait();
188 mpWindow->LeaveWait();
189 }
190
191 bool bTextEdit = false;
192 SdrViewEvent aVEvt;
193 SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt);
194
195 if (eHit == SdrHitKind::TextEditObj && (mpViewShell->GetFrameView()->IsQuickEdit() || dynamic_cast< sdr::table::SdrTableObj* >(aVEvt.mpObj) != nullptr))
196 {
197 bTextEdit = true;
198 }
199
200 // When clicking into a URl field, also go to text edit mode (when not following the link)
201 if (!bTextEdit && eHit == SdrHitKind::UrlField && !rMEvt.IsMod2() && !lcl_followHyperlinkAllowed(rMEvt))
202 bTextEdit = true;
203
204 bool bPreventModify = mpDocSh->IsReadOnly();
205 if (bPreventModify && mpDocSh->GetSignPDFCertificate().is())
206 {
207 // If the just added signature line shape is selected, allow moving / resizing it.
208 bPreventModify = false;
209 }
210
211 if(!bTextEdit
212 && !bPreventModify
213 && ((mpView->IsMarkedHit(aMDPos, nHitLog) && !rMEvt.IsShift() && !rMEvt.IsMod2()) || pHdl != nullptr)
214 && (rMEvt.GetClicks() != 2)
215 )
216 {
218 {
219 // Switch between 3D-rotation body -> selection
221 }
222 else if (bWaterCan)
223 {
224 // Remember the selected object for proper handling in
225 // MouseButtonUp().
227 }
228 else
229 {
230 // hit handle or marked object
231 bFirstMouseMove = true;
233 }
234
235 if ( ! rMEvt.IsRight())
236 if (mpView->BegDragObj(aMDPos, nullptr, pHdl, nDrgLog))
238 bReturn = true;
239 }
240 else
241 {
242 SdrPageView* pPV = nullptr;
243 SdrObject* pObj = !rMEvt.IsMod2() ? mpView->PickObj(aMDPos, mpView->getHitTolLog(), pPV, SdrSearchOptions::PICKMACRO) : nullptr;
244 if (pObj)
245 {
246 mpView->BegMacroObj(aMDPos, nHitLog, pObj, pPV, mpWindow);
247 bReturn = true;
248 }
249 else if ( bTextEdit )
250 {
251 SdrObjKind nSdrObjKind = aVEvt.mpObj->GetObjIdentifier();
252
253 if (aVEvt.mpObj->GetObjInventor() == SdrInventor::Default &&
254 (nSdrObjKind == SdrObjKind::Text ||
255 nSdrObjKind == SdrObjKind::TitleText ||
256 nSdrObjKind == SdrObjKind::OutlineText ||
257 !aVEvt.mpObj->IsEmptyPresObj()))
258 {
259 // Seamless Editing: branch to text input
260 if (!rMEvt.IsShift())
261 mpView->UnmarkAll();
262
263 SfxUInt16Item aItem(SID_TEXTEDIT, 1);
265 ExecuteList(SID_TEXTEDIT,
266 SfxCallMode::SYNCHRON | SfxCallMode::RECORD,
267 { &aItem });
268 return bReturn; // CAUTION, due to the synchronous slot the object is deleted now
269 }
270 }
271 else if ( !rMEvt.IsMod2() && rMEvt.GetClicks() == 1 &&
272 aVEvt.meEvent == SdrEventKind::ExecuteUrl )
273 {
274 mpWindow->ReleaseMouse();
275
276 if (!aVEvt.mpURLField)
277 return true;
278
279 // If tiled rendering, let client handles URL execution and early returns.
281 {
282 SfxViewShell& rSfxViewShell = mpViewShell->GetViewShellBase();
283 rSfxViewShell.libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, aVEvt.mpURLField->GetURL().toUtf8());
284 return true;
285 }
286
287 if (!lcl_followHyperlinkAllowed(rMEvt))
288 return true;
289
290 SfxStringItem aStrItem(SID_FILE_NAME, aVEvt.mpURLField->GetURL());
291 SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName());
292 SfxBoolItem aBrowseItem( SID_BROWSE, true );
294 mpWindow->ReleaseMouse();
295
296 if (rMEvt.IsMod1())
297 {
298 // Open in new frame
299 pFrame->GetDispatcher()->ExecuteList(SID_OPENDOC,
300 SfxCallMode::ASYNCHRON | SfxCallMode::RECORD,
301 { &aStrItem, &aBrowseItem, &aReferer });
302 }
303 else
304 {
305 // Open in current frame
306 SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame);
307 pFrame->GetDispatcher()->ExecuteList(SID_OPENDOC,
308 SfxCallMode::ASYNCHRON | SfxCallMode::RECORD,
309 { &aStrItem, &aFrameItem, &aBrowseItem, &aReferer });
310 }
311
312 bReturn = true;
313 }
314 else if(!rMEvt.IsMod2()
315 && dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr
316 )
317 {
318 pObj = mpView->PickObj(aMDPos, mpView->getHitTolLog(), pPV, SdrSearchOptions::ALSOONMASTER);
319 if (pObj)
320 {
321 // Handle ImageMap click when not just selecting
322 if (!bSelectionOnly)
323 {
324 if (lcl_followHyperlinkAllowed(rMEvt))
325 bReturn = HandleImageMapClick(pObj, aMDPos);
326 }
327
328 if (!bReturn
329 && (dynamic_cast<const SdrObjGroup*>(pObj) != nullptr
330 || DynCastE3dScene(pObj)))
331 {
332 if (rMEvt.GetClicks() == 1)
333 {
334 // Look into the group
335 pObj = mpView->PickObj(aMDPos, mpView->getHitTolLog(), pPV,
336 SdrSearchOptions::ALSOONMASTER
337 | SdrSearchOptions::DEEP);
338 if (pObj && lcl_followHyperlinkAllowed(rMEvt))
339 bReturn = HandleImageMapClick(pObj, aMDPos);
340 }
341 else if (!bReadOnly && rMEvt.GetClicks() == 2)
342 {
343 // New: double click on selected Group object
344 // enter group
345 if (!bSelectionOnly
346 && pObj->getSdrPageFromSdrObject() == pPV->GetPage())
347 bReturn = pPV->EnterGroup(pObj);
348 }
349 }
350 }
351
352 // #i71727# replaced else here with two possibilities, once the original else (!pObj)
353 // and also ignoring the found object when it's on a masterpage
354 if(!pObj || (pObj->getSdrPageFromSdrObject() && pObj->getSdrPageFromSdrObject()->IsMasterPage()))
355 {
356 if(mpView->IsGroupEntered() && 2 == rMEvt.GetClicks())
357 {
358 // New: double click on empty space/on obj on MasterPage, leave group
360 bReturn = true;
361 }
362 }
363 }
364
365 if (!bReturn)
366 {
367 if (bWaterCan)
368 {
369 if ( ! (rMEvt.IsShift() || rMEvt.IsMod2()))
370 {
371 // Find the object under the current mouse position
372 // and store it for the MouseButtonUp() method to
373 // evaluate.
375 }
376 }
377 else
378 {
379 bReturn = true;
380 bool bDeactivateOLE = false;
381
382 if ( !rMEvt.IsShift() && !rMEvt.IsMod2() )
383 {
384 OSL_ASSERT (mpViewShell->GetViewShell()!=nullptr);
385 Client* pIPClient = static_cast<Client*>(
387
388 if (pIPClient && pIPClient->IsObjectInPlaceActive())
389 {
390 // OLE-object gets deactivated in subsequent UnmarkAll()
391 bDeactivateOLE = true;
392 }
393
394 mpView->UnmarkAll();
395 }
396
397 bool bMarked = false;
398
399 if ( !rMEvt.IsMod1() && !bDeactivateOLE)
400 {
401 if ( rMEvt.IsMod2() )
402 {
403 bMarked = mpView->MarkNextObj(aMDPos, nHitLog, rMEvt.IsShift() );
404 }
405 else
406 {
407 bool bToggle = false;
408
409 if (rMEvt.IsShift() && mpView->GetMarkedObjectList().GetMarkCount() > 1)
410 {
411 // No Toggle on single selection
412 bToggle = true;
413 }
414
415 bMarked = mpView->MarkObj(aMDPos, nHitLog, bToggle);
416 }
417 }
418
419 if( !bDeactivateOLE )
420 {
421 if ( !bReadOnly &&
422 bMarked &&
423 (!rMEvt.IsShift() || mpView->IsMarkedHit(aMDPos, nHitLog)))
424 {
425 /**********************************************************
426 * Move object
427 **********************************************************/
429
431 if ( ! rMEvt.IsRight())
432 mpView->BegDragObj(aMDPos, nullptr, pHdl, nDrgLog);
433 }
434 else
435 {
436 /**********************************************************
437 * Select object
438 **********************************************************/
439 if ( ! rMEvt.IsRight())
441 }
442 }
443
444 if( bMarked && bTempRotation && (nSlotId == SID_OBJECT_ROTATE) && !rMEvt.IsShift() && (rMEvt.GetClicks() != 2) )
445 {
446 nSlotId = SID_OBJECT_SELECT;
447 Activate();
448 }
449 }
450 }
451 }
452 }
453 else if ( !bReadOnly
454 && (rMEvt.IsLeft() || rMEvt.IsRight())
455 && !mpView->IsAction())
456 {
457 /**********************************************************************
458 * BEZIER-EDITOR
459 **********************************************************************/
460 mpWindow->CaptureMouse();
461 SdrViewEvent aVEvt;
462 SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt);
463
464 if (eHit == SdrHitKind::Handle && aVEvt.mpHdl->GetKind() == SdrHdlKind::BezierWeight)
465 {
466 /******************************************************************
467 * Drag Handle
468 ******************************************************************/
469 if ( ! rMEvt.IsRight())
470 mpView->BegDragObj(aMDPos, nullptr, aVEvt.mpHdl, nDrgLog);
471 }
472 else if (eHit == SdrHitKind::MarkedObject && nEditMode == SID_BEZIER_INSERT)
473 {
474 /******************************************************************
475 * Insert gluepoint
476 ******************************************************************/
478 }
479 else if (eHit == SdrHitKind::MarkedObject && rMEvt.IsMod1())
480 {
481 /******************************************************************
482 * Select gluepoint
483 ******************************************************************/
484 if (!rMEvt.IsShift())
486
487 if ( ! rMEvt.IsRight())
489 }
490 else if (eHit == SdrHitKind::MarkedObject && !rMEvt.IsShift() && !rMEvt.IsMod2())
491 {
492 /******************************************************************
493 * Move object
494 ******************************************************************/
495 if ( ! rMEvt.IsRight())
496 mpView->BegDragObj(aMDPos, nullptr, nullptr, nDrgLog);
497 }
498 else if (eHit == SdrHitKind::Handle)
499 {
500 /******************************************************************
501 * Select gluepoint
502 ******************************************************************/
503 if (!mpView->IsPointMarked(*aVEvt.mpHdl) || rMEvt.IsShift())
504 {
505 if (!rMEvt.IsShift())
506 {
509 }
510 else
511 {
512 if (mpView->IsPointMarked(*aVEvt.mpHdl))
513 {
514 mpView->UnmarkPoint(*aVEvt.mpHdl);
515 pHdl = nullptr;
516 }
517 else
518 {
520 }
521 }
522
523 if (pHdl)
524 {
526 if ( ! rMEvt.IsRight())
527 mpView->BegDragObj(aMDPos, nullptr, pHdl, nDrgLog);
528
529 }
530 }
531 else
532 {
533 // Point IS marked and NO shift is pressed. Start
534 // dragging of selected point(s)
536 if(pHdl && ! rMEvt.IsRight())
537 mpView->BegDragObj(aMDPos, nullptr, pHdl, nDrgLog);
538 }
539 }
540 else
541 {
542 /******************************************************************
543 * Select or drag object
544 ******************************************************************/
545 if (!rMEvt.IsShift() && !rMEvt.IsMod2() && eHit == SdrHitKind::UnmarkedObject)
546 {
548 }
549
550 bool bMarked = false;
551
552 if (!rMEvt.IsMod1())
553 {
554 if (rMEvt.IsMod2())
555 {
556 bMarked = mpView->MarkNextObj(aMDPos, nHitLog, rMEvt.IsShift());
557 }
558 else
559 {
560 bMarked = mpView->MarkObj(aMDPos, nHitLog, rMEvt.IsShift());
561 }
562 }
563
564 if (bMarked &&
565 (!rMEvt.IsShift() || eHit == SdrHitKind::MarkedObject))
566 {
567 // Move object
568 if ( ! rMEvt.IsRight())
569 mpView->BegDragObj(aMDPos, nullptr, aVEvt.mpHdl, nDrgLog);
570 }
571 else if (mpView->AreObjectsMarked())
572 {
573 /**************************************************************
574 * Select gluepoint
575 **************************************************************/
576 if (!rMEvt.IsShift())
578
579 if ( ! rMEvt.IsRight())
581 }
582 else
583 {
584 /**************************************************************
585 * Select object
586 **************************************************************/
587 if ( ! rMEvt.IsRight())
589 }
590
591 ForcePointer(&rMEvt);
592 }
593 }
594
595 if (!bIsInDragMode)
596 {
597 ForcePointer(&rMEvt);
598 }
599
600 return bReturn;
601}
602
604{
605 bool bReturn = FuDraw::MouseMove(rMEvt);
606
607 if (aDragTimer.IsActive())
608 {
610 {
611 bFirstMouseMove = false;
612 }
613 else
614 {
616 }
617 }
618
619 if (mpView->IsAction())
620 {
621 Point aPix(rMEvt.GetPosPixel());
622 Point aPnt(mpWindow->PixelToLogic(aPix));
623
624 ForceScroll(aPix);
625
626 if (mpView->IsInsObjPoint())
627 {
628 mpView->MovInsObjPoint(aPnt);
629 }
630 else
631 {
632 mpView->MovAction(aPnt);
633 }
634 }
635
636 ForcePointer(&rMEvt);
637
638 return bReturn;
639}
640
642{
643 bool bReturn = false;
644 // When the right mouse button is pressed then only select objects
645 // (and deselect others) as a preparation for showing the context
646 // menu.
647 const bool bSelectionOnly = rMEvt.IsRight();
648
649 if (aDragTimer.IsActive() )
650 {
652 bIsInDragMode = false;
653 }
654
655 if( !mpView )
656 return false;
657
658 Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
659 sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
660 sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(mpView->GetDragThresholdPixels(),0)).Width() );
661
663 {
664 /**********************************************************************
665 * NO BEZIER_EDITOR
666 **********************************************************************/
667 if ( mpView->IsDragObj() )
668 {
669 /******************************************************************
670 * Object was moved
671 ******************************************************************/
672 FrameView* pFrameView = mpViewShell->GetFrameView();
673 bool bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
674
675 if (bDragWithCopy)
676 {
677 bDragWithCopy = !mpView->IsPresObjSelected(false);
678 }
679
680 mpView->SetDragWithCopy(bDragWithCopy);
681 bool bWasDragged(mpView->EndDragObj( mpView->IsDragWithCopy() ));
682
684
685 if (!rMEvt.IsShift() && !rMEvt.IsMod1() && !rMEvt.IsMod2() &&
687 std::abs(aPnt.X() - aMDPos.X()) < nDrgLog &&
688 std::abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
689 {
690 /*************************************************************
691 * If a user wants to click on an object in front of a marked
692 * one, he releases the mouse button immediately
693 **************************************************************/
694 SdrPageView* pPV;
695 SdrObject* pObj = mpView->PickObj(aMDPos, mpView->getHitTolLog(), pPV, SdrSearchOptions::ALSOONMASTER | SdrSearchOptions::BEFOREMARK);
696 if (pObj && pPV->IsObjMarkable(pObj))
697 {
699 mpView->MarkObj(pObj,pPV);
700 return true;
701 }
702
703 // check for single object selected
704 SdrObject* pSingleObj = nullptr;
705
707 {
709 }
710
711 // Check for click on svx::diagram::DiagramFrameHdl
712 // - if we hit a SdrHdl
713 // - if it was not moved
714 // - if single object is selected
715 // - and it is a Diagram
716 if(pHdl && !bWasDragged && nullptr != pSingleObj && pSingleObj->isDiagram())
717 {
718 svx::diagram::DiagramFrameHdl* pDiagramFrameHdl(dynamic_cast<svx::diagram::DiagramFrameHdl*>(pHdl));
719 if(nullptr != pDiagramFrameHdl)
720 {
721 // let the DiagramFrameHdl decide what to do
723 }
724 }
725
726 /**************************************************************
727 * Toggle between selection and rotation
728 **************************************************************/
729 if (nSlotId == SID_OBJECT_SELECT
732
733 && (rMEvt.GetClicks() != 2)
735 || (pSingleObj
736 && pSingleObj->GetObjInventor()==SdrInventor::E3d))
737 && ! bSelectionOnly)
738
739 {
740 bTempRotation = true;
741 nSlotId = SID_OBJECT_ROTATE;
742 Activate();
743 }
744 else if (nSlotId == SID_OBJECT_ROTATE)
745 {
746 nSlotId = SID_OBJECT_SELECT;
747 Activate();
748 }
749 }
750 else if (nSlotId == SID_CONVERT_TO_3D_LATHE)
751 {
752 if (!pHdl)
753 {
757 }
758 else if (pHdl->GetKind() != SdrHdlKind::MirrorAxis &&
759 pHdl->GetKind() != SdrHdlKind::Ref1 &&
760 pHdl->GetKind() != SdrHdlKind::Ref2 && mpView->Is3DRotationCreationActive())
761 {
762 /*********************************************************
763 * If 3D-rotation bodies are about to be created,
764 * end creation now
765 **********************************************************/
766 Degree100 nAngle1 = GetAngle(aPnt - mpView->GetRef1());
767 nAngle1 -= 27000_deg100;
768 nAngle1 = NormAngle36000(nAngle1);
769 bool bMirrorSide1 = nAngle1 < 18000_deg100;
770
771 if (bMirrorSide0 != bMirrorSide1)
772 {
774 mpWindow->EnterWait();
777 nSlotId = SID_OBJECT_SELECT;
778 mpWindow->LeaveWait();
779 Activate();
780 }
781 }
782 }
783 }
784 else if (rMEvt.IsMod1()
785 && !rMEvt.IsMod2()
786 && std::abs(aPnt.X() - aMDPos.X()) < nDrgLog
787 && std::abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
788 {
789 // Enter group
790 mpView->MarkObj(aPnt, nHitLog, rMEvt.IsShift(), rMEvt.IsMod1());
791 }
792
793 if (mpView->IsAction() )
794 {
795 mpView->EndAction();
796 }
797
798 if( SD_MOD()->GetWaterCan() )
799 {
800 if( rMEvt.IsRight() )
801 {
802 // In watering-can mode, on press onto right mouse button, an undo is executed
803 mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_UNDO, SfxCallMode::ASYNCHRON );
804 }
805 else if (pWaterCanCandidate != nullptr)
806 {
807 // Is the candidate object still under the mouse?
808 if (pickObject (aPnt) == pWaterCanCandidate)
809 {
810 SdStyleSheetPool* pPool = static_cast<SdStyleSheetPool*>(
812 if (pPool != nullptr)
813 {
814 SfxStyleSheet* pStyleSheet = static_cast<SfxStyleSheet*>(
815 pPool->GetActualStyleSheet());
816 if (pStyleSheet != nullptr && mpView->IsUndoEnabled() )
817 {
818 // Added UNDOs for the WaterCan mode. This was never done in
819 // the past, thus it was missing all the time.
820 std::unique_ptr<SdrUndoAction> pUndoAttr = mpDoc->GetSdrUndoFactory().CreateUndoAttrObject(*pWaterCanCandidate, true, true);
821 mpView->BegUndo(pUndoAttr->GetComment());
823 mpView->AddUndo(std::move(pUndoAttr));
824
825 pWaterCanCandidate->SetStyleSheet (pStyleSheet, false);
826
827 mpView->EndUndo();
828 }
829 }
830 }
831 }
832 // else when there has been no object under the mouse when the
833 // button was pressed then nothing happens even when there is
834 // one now.
835 }
836
837 sal_uInt16 nClicks = rMEvt.GetClicks();
838
839 if (nClicks == 2 && rMEvt.IsLeft() && bMBDown &&
840 !rMEvt.IsMod1() && !rMEvt.IsShift() )
841 {
842 DoubleClick(rMEvt);
843 }
844
845 bMBDown = false;
846
847 ForcePointer(&rMEvt);
848 pHdl = nullptr;
849 mpWindow->ReleaseMouse();
850 SdrObject* pSingleObj = nullptr;
851 const size_t nMarkCount = mpView->GetMarkedObjectList().GetMarkCount();
852
853 if (nMarkCount==1)
854 {
856 }
857
858 if ( (nSlotId != SID_OBJECT_SELECT && nMarkCount==0) ||
859 ( mpView->GetDragMode() == SdrDragMode::Crook &&
861 ( mpView->GetDragMode() == SdrDragMode::Shear &&
863 ( nSlotId==SID_CONVERT_TO_3D_LATHE && pSingleObj &&
864 (pSingleObj->GetObjInventor() != SdrInventor::Default ||
865 pSingleObj->GetObjIdentifier() == SdrObjKind::Measure) ) )
866 {
867 bReturn = true;
868 ForcePointer(&rMEvt);
869 pHdl = nullptr;
870 mpWindow->ReleaseMouse();
872 mpViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::SYNCHRON);
873 return bReturn; // CAUTION, due to the synchronous slot, the object is deleted now.
874 }
875
877 }
878 else
879 {
880 /**********************************************************************
881 * BEZIER_EDITOR
882 **********************************************************************/
883 if ( mpView->IsAction() )
884 {
885 if ( mpView->IsInsObjPoint() )
886 {
887 mpView->EndInsObjPoint(SdrCreateCmd::ForceEnd);
888 }
889 else if ( mpView->IsDragObj() )
890 {
891 FrameView* pFrameView = mpViewShell->GetFrameView();
892 bool bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
893
894 if (bDragWithCopy)
895 {
896 bDragWithCopy = !mpView->IsPresObjSelected(false);
897 }
898
899 mpView->SetDragWithCopy(bDragWithCopy);
901 }
902 else
903 {
904 mpView->EndAction();
905
906 sal_uInt16 nDrgLog2 = sal_uInt16 ( mpWindow->PixelToLogic(Size(mpView->GetDragThresholdPixels(),0)).Width() );
907 Point aPos = mpWindow->PixelToLogic( rMEvt.GetPosPixel() );
908
909 if (std::abs(aMDPos.X() - aPos.X()) < nDrgLog2 &&
910 std::abs(aMDPos.Y() - aPos.Y()) < nDrgLog2 &&
911 !rMEvt.IsShift() && !rMEvt.IsMod2())
912 {
913 SdrViewEvent aVEvt;
914 SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt);
915
916 if (eHit == SdrHitKind::NONE)
917 {
918 // Click on the same place - unselect
920 }
921 }
922 }
923 }
924 else if (!rMEvt.IsShift() && rMEvt.IsMod1() && !rMEvt.IsMod2() &&
925 std::abs(aPnt.X() - aMDPos.X()) < nDrgLog &&
926 std::abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
927 {
928 // Enter group
929 mpView->MarkObj(aPnt, nHitLog, false, rMEvt.IsMod1());
930 }
931
932 ForcePointer(&rMEvt);
933 pHdl = nullptr;
934 mpWindow->ReleaseMouse();
935
937 }
938
939 return bReturn;
940}
941
947{
948 bool bReturn = false;
949
950 switch (rKEvt.GetKeyCode().GetCode())
951 {
952 case KEY_ESCAPE:
953 {
954 bReturn = FuSelection::cancel();
955 }
956 break;
957 //add keyboard operation for insert points in drawing curve
958 case KEY_UP:
959 case KEY_DOWN:
960 case KEY_LEFT:
961 case KEY_RIGHT:
962 {
963 if(rKEvt.GetKeyCode().IsShift()&&(nEditMode == SID_BEZIER_INSERT)){
964 ::tools::Long nX = 0;
965 ::tools::Long nY = 0;
966 sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
967 if (nCode == KEY_UP)
968 {
969 // scroll up
970 nX = 0;
971 nY =-1;
972 }
973 else if (nCode == KEY_DOWN)
974 {
975 // scroll down
976 nX = 0;
977 nY = 1;
978 }
979 else if (nCode == KEY_LEFT)
980 {
981 // scroll left
982 nX =-1;
983 nY = 0;
984 }
985 else if (nCode == KEY_RIGHT)
986 {
987 // scroll right
988 nX = 1;
989 nY = 0;
990 }
991
992 Point centerPoint;
994 centerPoint = mpWindow->LogicToPixel(rect.Center());
995 Point aPoint = bMovedToCenterPoint? oldPoint:centerPoint;
996 Point ePoint = aPoint + Point(nX,nY);
997 mpWindow->SetPointerPosPixel(ePoint);
998 //simulate mouse move action
999 MouseEvent eMevt(ePoint, 1, MouseEventModifiers::DRAGMOVE, MOUSE_LEFT, 0);
1000 MouseMove(eMevt);
1001 oldPoint = ePoint;
1002 bMovedToCenterPoint = true;
1003 bReturn = true;
1004 }
1005 }
1006 break;
1007 case KEY_RETURN:
1008 if(rKEvt.GetKeyCode().IsShift()&&(nEditMode == SID_BEZIER_INSERT))
1009 {
1011 {
1012 //simulate mouse button down action
1013 MouseEvent aMevt(oldPoint, 1,
1014 MouseEventModifiers::SIMPLEMOVE | MouseEventModifiers::DRAGMOVE,
1016 MouseButtonDown(aMevt);
1017 mpWindow->CaptureMouse();
1018 bBeginInsertPoint = true;
1019 }
1020 else
1021 {
1022 //simulate mouse button up action
1023 MouseEvent rMEvt(oldPoint, 1,
1024 MouseEventModifiers::SIMPLEMOVE | MouseEventModifiers::ENTERWINDOW,
1026 MouseButtonUp(rMEvt);
1027 bBeginInsertPoint = false;
1028 }
1029 bReturn= true;
1030 }
1031 break;
1032 }
1033 if (!bReturn)
1034 {
1035 bReturn = FuDraw::KeyInput(rKEvt);
1036
1038 {
1040
1041 mpViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD);
1042 }
1043 }
1044
1045 return bReturn;
1046
1047}
1048
1050{
1053 mpView->SetEditMode(SdrViewEditMode::Edit);
1054
1055 switch( nSlotId )
1056 {
1057 case SID_OBJECT_ROTATE:
1058 {
1059 eMode = SdrDragMode::Rotate;
1060
1061 if ( mpView->GetDragMode() != eMode )
1063 }
1064 break;
1065
1066 case SID_OBJECT_MIRROR:
1067 {
1068 eMode = SdrDragMode::Mirror;
1069
1070 if ( mpView->GetDragMode() != eMode )
1072 }
1073 break;
1074
1075 case SID_OBJECT_CROP:
1076 {
1077 eMode = SdrDragMode::Crop;
1078
1079 if ( mpView->GetDragMode() != eMode )
1081 }
1082 break;
1083
1084 case SID_OBJECT_TRANSPARENCE:
1085 {
1086 eMode = SdrDragMode::Transparence;
1087
1088 if ( mpView->GetDragMode() != eMode )
1090 }
1091 break;
1092
1093 case SID_OBJECT_GRADIENT:
1094 {
1095 eMode = SdrDragMode::Gradient;
1096
1097 if ( mpView->GetDragMode() != eMode )
1099 }
1100 break;
1101
1102 case SID_OBJECT_SHEAR:
1103 {
1104 eMode = SdrDragMode::Shear;
1105
1106 if ( mpView->GetDragMode() != eMode )
1108 }
1109 break;
1110
1111 case SID_OBJECT_CROOK_ROTATE:
1112 {
1113 eMode = SdrDragMode::Crook;
1114
1115 if ( mpView->GetDragMode() != eMode )
1116 {
1118 mpView->SetCrookMode(SdrCrookMode::Rotate);
1119 }
1120 }
1121 break;
1122
1123 case SID_OBJECT_CROOK_SLANT:
1124 {
1125 eMode = SdrDragMode::Crook;
1126
1127 if ( mpView->GetDragMode() != eMode )
1128 {
1130 mpView->SetCrookMode(SdrCrookMode::Slant);
1131 }
1132 }
1133 break;
1134
1135 case SID_OBJECT_CROOK_STRETCH:
1136 {
1137 eMode = SdrDragMode::Crook;
1138
1139 if ( mpView->GetDragMode() != eMode )
1140 {
1142 mpView->SetCrookMode(SdrCrookMode::Stretch);
1143 }
1144 }
1145 break;
1146
1147 case SID_CONVERT_TO_3D_LATHE:
1148 {
1149 eMode = SdrDragMode::Mirror;
1151
1152 if ( mpView->GetDragMode() != eMode )
1154
1157
1159 }
1160 break;
1161
1162 default:
1163 {
1164 eMode = SdrDragMode::Move;
1165
1166 if ( mpView->GetDragMode() != eMode )
1168 }
1169 break;
1170 }
1171
1172 if (nSlotId != SID_OBJECT_ROTATE)
1173 {
1174 bTempRotation = false;
1175 }
1176
1178}
1179
1181{
1182 bSelectionChanged = true;
1183
1185
1187 {
1188 // Switch rotation body -> selection
1190 nSlotId = SID_OBJECT_SELECT;
1191 Activate();
1192 }
1193
1194 // Activate the right tool bar for the current context of the view.
1195 mpViewShell->GetViewShellBase().GetToolBarManager()->SelectionHasChanged(*mpViewShell, *mpView);
1196}
1197
1201void FuSelection::SetEditMode(sal_uInt16 nMode)
1202{
1203 nEditMode = nMode;
1204
1205 if (nEditMode == SID_BEZIER_INSERT)
1206 {
1208 }
1209 else
1210 {
1211 mpView->SetInsObjPointMode(false);
1212 }
1213
1214 ForcePointer();
1215
1217 rBindings.Invalidate(SID_BEZIER_MOVE);
1218 rBindings.Invalidate(SID_BEZIER_INSERT);
1219}
1220
1225{
1226 bool bClosed = pObj->IsClosedObj();
1227 bool bFilled = false;
1228
1229 if (bClosed)
1230 {
1231 SfxItemSet aSet(mpDoc->GetPool());
1232
1233 aSet.Put(pObj->GetMergedItemSet());
1234
1235 const XFillStyleItem& rFillStyle = aSet.Get(XATTR_FILLSTYLE);
1236 bFilled = rFillStyle.GetValue() != drawing::FillStyle_NONE;
1237 }
1238
1239 const SdrLayerIDSet* pVisiLayer = &mpView->GetSdrPageView()->GetVisibleLayers();
1240 double fHitLog = mpWindow->PixelToLogic(Size(HITPIX, 0)).Width();
1241 const ::tools::Long n2HitLog = fHitLog * 2;
1242 Point aHitPosR(rPos);
1243 Point aHitPosL(rPos);
1244 Point aHitPosT(rPos);
1245 Point aHitPosB(rPos);
1246
1247 aHitPosR.AdjustX(n2HitLog);
1248 aHitPosL.AdjustX(-n2HitLog);
1249 aHitPosT.AdjustY(n2HitLog);
1250 aHitPosB.AdjustY(-n2HitLog);
1251
1252 if (!bClosed || !bFilled
1253 || (SdrObjectPrimitiveHit(*pObj, aHitPosR, {fHitLog, fHitLog}, *mpView->GetSdrPageView(), pVisiLayer,
1254 false)
1255 && SdrObjectPrimitiveHit(*pObj, aHitPosL, {fHitLog, fHitLog}, *mpView->GetSdrPageView(),
1256 pVisiLayer, false)
1257 && SdrObjectPrimitiveHit(*pObj, aHitPosT, {fHitLog, fHitLog}, *mpView->GetSdrPageView(),
1258 pVisiLayer, false)
1259 && SdrObjectPrimitiveHit(*pObj, aHitPosB, {fHitLog, fHitLog}, *mpView->GetSdrPageView(),
1260 pVisiLayer, false)))
1261 {
1262 if (SvxIMapInfo::GetIMapInfo(pObj))
1263 {
1264 const IMapObject* pIMapObj = SvxIMapInfo::GetHitIMapObject(pObj, rPos);
1265
1266 if (pIMapObj && !pIMapObj->GetURL().isEmpty())
1267 {
1268 // Jump to Document
1269 mpWindow->ReleaseMouse();
1270 SfxStringItem aStrItem(SID_FILE_NAME, pIMapObj->GetURL());
1271 SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName());
1273 SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame);
1274 SfxBoolItem aBrowseItem(SID_BROWSE, true);
1275 mpWindow->ReleaseMouse();
1276 pFrame->GetDispatcher()->ExecuteList(
1277 SID_OPENDOC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD,
1278 { &aStrItem, &aFrameItem, &aBrowseItem, &aReferer });
1279
1280 return true;
1281 }
1282 }
1283 }
1284
1285 return false;
1286}
1287
1295{
1297 {
1299 mpViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD);
1300 return true;
1301 }
1302 else
1303 {
1304 return false;
1305 }
1306}
1307
1309{
1310 SdrPageView* pPageView;
1311 sal_uInt16 nHitLog = sal_uInt16 (mpWindow->PixelToLogic(Size(HITPIX,0)).Width());
1312 return mpView->PickObj(rTestPoint, nHitLog, pPageView, SdrSearchOptions::PICKMARKABLE);
1313}
1314
1316{
1317 if(bMovedToCenterPoint && !bBeginInsertPoint && pMEvt)
1318 {
1319 MouseEvent aMEvt(pMEvt->GetPosPixel(), pMEvt->GetClicks(),
1320 pMEvt->GetMode(), pMEvt->GetButtons(), pMEvt->GetModifier() & ~KEY_SHIFT);
1321 FuDraw::ForcePointer(&aMEvt);
1322 }
1323 else
1324 {
1325 FuDraw::ForcePointer(pMEvt);
1326 }
1327}
1328
1329} // end of namespace sd
1330
1331/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void End3DCreation(bool bUseDefaultValuesForMirrorAxes=false)
virtual bool BegDragObj(const Point &rPnt, OutputDevice *pOut, SdrHdl *pHdl, short nMinMov=-3, SdrDragMethod *pForcedMeth=nullptr) override
bool Is3DRotationCreationActive() const
void Start3DCreation()
void ResetCreationActive()
virtual void MovAction(const Point &rPnt) override
const OUString & GetURL() const
const vcl::KeyCode & GetKeyCode() const
bool IsMod1() const
MouseEventModifiers GetMode() const
bool IsMod2() const
sal_uInt16 GetModifier() const
sal_uInt16 GetClicks() const
bool IsRight() const
sal_uInt16 GetButtons() const
const Point & GetPosPixel() const
bool IsLeft() const
bool IsShift() const
constexpr tools::Long Y() const
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
SAL_DLLPRIVATE SfxItemPool & GetPool()
Definition: drawdoc.hxx:237
SfxStyleSheetBase * GetActualStyleSheet()
Definition: stlpool.hxx:56
void SetEditMode(SdrViewEditMode eMode)
virtual bool IsAction() const override
virtual void BckAction() override
virtual void EndAction() override
void SetShiftPressed(bool bShiftPressed)
SdrDragMethod * GetDragMethod() const
bool EndDragObj(bool bCopy=false)
sal_Int32 GetDragThresholdPixels() const
bool IsDragWithCopy() const
void SetDragWithCopy(bool bOn)
bool IsInsObjPoint() const
void SetInsObjPointMode(bool bOn)
void MovInsObjPoint(const Point &rPnt)
bool BegInsObjPoint(const Point &rPnt, bool bNewObj)
bool EndInsObjPoint(SdrCreateCmd eCmd)
bool IsDragObj() const
bool IsUndoEnabled() const
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
void BegUndo()
bool IsDistortAllowed(bool bNoContortion=false) const
bool IsCrookAllowed(bool bNoContortion=false) const
void ForceMarkedToAnotherPage()
bool IsShearAllowed() const
bool IsRotateAllowed(bool b90Deg=false) const
void EndUndo()
SdrHdlKind GetKind() const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
void SetDragMode(SdrDragMode eMode)
bool IsFrameDragSingles() const
SdrHdl * PickHandle(const Point &rPnt) const
const Point & GetRef1() const
const SdrMarkList & GetMarkedObjectList() const
bool AreObjectsMarked() const
void BegMarkObj(const Point &rPnt, bool bUnmark=false)
bool BegMarkPoints(const Point &rPnt, bool bUnmark=false)
SdrObject * PickObj(const Point &rPnt, short nTol, SdrPageView *&rpPV, SdrSearchOptions nOptions, SdrObject **ppRootObj, bool *pbHitPassDirect=nullptr) const
SdrDragMode GetDragMode() const
void UnmarkAllObj(SdrPageView const *pPV=nullptr)
bool UnmarkAllPoints()
const tools::Rectangle & GetMarkedObjRect() const
bool IsMarkedHit(const Point &rPnt, short nTol=-2) const
bool MarkNextObj(bool bPrev=false)
bool UnmarkPoint(SdrHdl &rHdl)
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
bool IsPointMarked(const SdrHdl &rHdl) const
SdrObject * GetMarkedSdrObj() const
SdrUndoFactory & GetSdrUndoFactory() const
void BegMacroObj(const Point &rPnt, short nTol, SdrObject *pObj, SdrPageView *pPV, vcl::Window *pWin)
bool isDiagram() const
bool IsClosedObj() const
void SetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr)
virtual SdrInventor GetObjInventor() const
bool IsEmptyPresObj() const
virtual SdrObjKind GetObjIdentifier() const
SdrPage * getSdrPageFromSdrObject() const
const SfxItemSet & GetMergedItemSet() const
const SdrLayerIDSet & GetVisibleLayers() const
bool IsObjMarkable(SdrObject const *pObj) const
SdrPage * GetPage() const
bool EnterGroup(SdrObject *pObj)
bool IsMasterPage() const
bool IsGroupEntered() const
void LeaveOneGroup()
SdrPageView * GetSdrPageView() const
sal_uInt16 getHitTolLog() const
bool IsCrookNoContortion() const
void SetCrookMode(SdrCrookMode eMode)
virtual std::unique_ptr< SdrUndoAction > CreateUndoAttrObject(SdrObject &rObject, bool bStyleSheet1=false, bool bSaveText=false)
virtual std::unique_ptr< SdrUndoAction > CreateUndoGeoObject(SdrObject &rObject)
SdrHitKind PickAnything(const MouseEvent &rMEvt, SdrMouseEventKind nMouseDownOrMoveOrUp, SdrViewEvent &rVEvt) const
void UnmarkAll()
void Invalidate(sal_uInt16 nId)
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
bool IsObjectInPlaceActive() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
const OUString & GetName() const
bool IsReadOnly() const
SfxMedium * GetMedium() const
css::uno::Reference< css::security::XCertificate > GetSignPDFCertificate() const
SfxViewShell * GetViewShell() const
SfxBindings & GetBindings()
SfxDispatcher * GetDispatcher()
virtual void libreOfficeKitViewCallback(int nType, const OString &pPayload) const override
SfxInPlaceClient * GetIPClient() const
static SvxIMapInfo * GetIMapInfo(const SdrObject *pObject)
static IMapObject * GetHitIMapObject(const SdrObject *pObj, const Point &rWinPoint, const OutputDevice *pCmpWnd=nullptr)
const OUString & GetURL() const
bool IsActive() const
void Stop()
virtual void Start(bool bStartTimer=true) override
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
Definition: docshel4.cxx:690
Base class of the stacked shells that provide graphical views to Draw and Impress documents and editi...
View for MDIFrame.
Definition: FrameView.hxx:36
bool IsClickChangeRotation() const
Definition: FrameView.hxx:130
bool IsQuickEdit() const
Definition: FrameView.hxx:124
Base class for all Draw specific functions.
Definition: fudraw.hxx:34
virtual bool KeyInput(const KeyEvent &rKEvt) override
Process keyboard input.
Definition: fudraw.cxx:317
virtual void Activate() override
activates the function
Definition: fudraw.cxx:441
bool bMBDown
Definition: fudraw.hxx:73
virtual bool MouseMove(const MouseEvent &rMEvt) override
Definition: fudraw.cxx:214
virtual void DoubleClick(const MouseEvent &rMEvt)
Response of doubleclick.
Definition: fudraw.cxx:627
virtual void ForcePointer(const MouseEvent *pMEvt=nullptr)
Toggle mouse-pointer.
Definition: fudraw.cxx:450
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
Definition: fudraw.cxx:274
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
Definition: fudraw.cxx:141
SdDrawDocument * mpDoc
Definition: fupoor.hxx:148
static const int HITLOG
Definition: fupoor.hxx:51
VclPtr< ::sd::Window > mpWindow
Definition: fupoor.hxx:146
Point aMDPos
position of MouseButtonDown
Definition: fupoor.hxx:159
ViewShell * mpViewShell
Definition: fupoor.hxx:145
virtual void SelectionHasChanged()
Definition: fupoor.cxx:868
sal_uInt16 nSlotId
Definition: fupoor.hxx:150
void ForceScroll(const Point &aPixPos)
scroll when approached the border of the window; is called by MouseMove
Definition: fupoor.cxx:121
bool bIsInDragMode
Definition: fupoor.hxx:158
Timer aDragTimer
for Drag&Drop
Definition: fupoor.hxx:156
static const int DRGLOG
Definition: fupoor.hxx:52
DrawDocShell * mpDocSh
Definition: fupoor.hxx:147
::sd::View * mpView
Definition: fupoor.hxx:144
static const int HITPIX
Definition: fupoor.hxx:50
bool bFirstMouseMove
Definition: fupoor.hxx:168
virtual void DoExecute(SfxRequest &rReq)
Definition: fupoor.cxx:1129
Point oldPoint
Definition: fusel.hxx:97
SdrObject * pWaterCanCandidate
This pointer stores a candidate for assigning a style in the water can mode between mouse button down...
Definition: fusel.hxx:84
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
Definition: fusel.cxx:641
virtual bool MouseMove(const MouseEvent &rMEvt) override
Definition: fusel.cxx:603
virtual void DoExecute(SfxRequest &rReq) override
Definition: fusel.cxx:96
SdrHdl * pHdl
Definition: fusel.hxx:76
SdrObject * pickObject(const Point &rTestPoint)
Find the object under the given test point without selecting it.
Definition: fusel.cxx:1308
bool bSelectionChanged
Definition: fusel.hxx:75
bool bMovedToCenterPoint
Definition: fusel.hxx:99
virtual void SelectionHasChanged() override
Definition: fusel.cxx:1180
virtual ~FuSelection() override
Definition: fusel.cxx:104
virtual bool KeyInput(const KeyEvent &rKEvt) override
Process keyboard input.
Definition: fusel.cxx:946
virtual bool cancel() override
is called when the current function should be aborted.
Definition: fusel.cxx:1294
virtual void ForcePointer(const MouseEvent *pMEvt=nullptr) override
Toggle mouse-pointer.
Definition: fusel.cxx:1315
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
Definition: fusel.cxx:125
void SetEditMode(sal_uInt16 nMode)
Set current bezier edit mode.
Definition: fusel.cxx:1201
bool bBeginInsertPoint
Definition: fusel.hxx:96
FuSelection(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Definition: fusel.cxx:67
bool HandleImageMapClick(const SdrObject *pObj, const Point &rPos)
Execute ImageMap interaction.
Definition: fusel.cxx:1224
bool bSuppressChangesOfSelection
Definition: fusel.hxx:77
bool bTempRotation
Definition: fusel.hxx:74
bool bMirrorSide0
Definition: fusel.hxx:78
virtual void Activate() override
activates the function
Definition: fusel.cxx:1049
sal_uInt16 nEditMode
Definition: fusel.hxx:79
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Definition: fusel.cxx:89
std::shared_ptr< ToolBarManager > const & GetToolBarManager() const
Base class of the stacked shell hierarchy.
Definition: ViewShell.hxx:92
FrameView * GetFrameView()
Definition: ViewShell.hxx:221
SD_DLLPUBLIC ViewShellBase & GetViewShellBase() const
Definition: viewshel.cxx:1397
SD_DLLPUBLIC SfxViewFrame * GetViewFrame() const
Definition: viewshel.cxx:118
bool IsPresObjSelected(bool bOnPage=true, bool bOnMasterPage=true, bool bCheckPresObjListOnly=false, bool bCheckLayoutOnly=false) const
Is a presentation object selected?
Definition: sdview.cxx:523
virtual bool HasMarkablePoints() const override
Definition: sdview.cxx:1136
virtual bool MarkPoint(SdrHdl &rHdl, bool bUnmark=false) override
Definition: sdview.cxx:1159
An SdWindow contains the actual working area of ViewShell.
Definition: Window.hxx:45
static void clicked(const Point &rPnt)
constexpr Point Center() const
sal_uInt16 GetCode() const
bool IsShift() const
#define MOUSE_LEFT
bool bReadOnly
Mode eMode
constexpr sal_uInt16 KEY_RETURN
constexpr sal_uInt16 KEY_ESCAPE
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_SHIFT
bool IsOptionSet(EOption eOption)
long Long
#define SD_MOD()
Definition: sdmod.hxx:184
SVXCORE_DLLPUBLIC SdrObject * SdrObjectPrimitiveHit(const SdrObject &rObject, const Point &rPnt, const basegfx::B2DVector &rHitTolerance, const SdrPageView &rSdrPageView, const SdrLayerIDSet *pVisiLayer, bool bTextOnly, drawinglayer::primitive2d::Primitive2DContainer *pHitContainer=nullptr)
SdrObject * mpObj
SdrHdl * mpHdl
const SvxURLField * mpURLField
SdrEventKind meEvent
SdrHitKind
SVXCORE_DLLPUBLIC E3dScene * DynCastE3dScene(SdrObject *)
SdrObjKind
SVXCORE_DLLPUBLIC Degree100 GetAngle(const Point &rPnt)
SVXCORE_DLLPUBLIC Degree100 NormAngle36000(Degree100 a)
SdrDragMode
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)