1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 // MARKER(update_precomp.py): autogen include statement, do not remove 29 #include "precompiled_sc.hxx" 30 31 // INCLUDE --------------------------------------------------------------- 32 33 #include <com/sun/star/embed/EmbedStates.hpp> 34 35 #include <editeng/eeitem.hxx> 36 #include <editeng/flditem.hxx> 37 #include <svx/svdoole2.hxx> 38 #include <svx/svdotext.hxx> 39 #include <sfx2/dispatch.hxx> 40 #include <svtools/imapobj.hxx> 41 #include <svx/svdouno.hxx> 42 #include <svx/svdomedia.hxx> 43 #include <svx/svdpagv.hxx> 44 #include <editeng/outlobj.hxx> 45 #include <svx/svdocapt.hxx> 46 #include <sfx2/app.hxx> 47 48 #include "fusel.hxx" 49 #include "sc.hrc" 50 #include "fudraw.hxx" 51 #include "futext.hxx" 52 #include "drawview.hxx" 53 #include "tabvwsh.hxx" 54 #include "drawpage.hxx" 55 #include "globstr.hrc" 56 #include "drwlayer.hxx" 57 #include "userdat.hxx" 58 #include "scmod.hxx" 59 #include "client.hxx" 60 #include "charthelper.hxx" 61 #include "docuno.hxx" 62 #include "docsh.hxx" 63 64 // ----------------------------------------------------------------------- 65 66 // Maximal erlaubte Mausbewegung um noch Drag&Drop zu starten 67 //! fusel,fuconstr,futext - zusammenfassen! 68 #define SC_MAXDRAGMOVE 3 69 70 // ----------------------------------------------------------------------- 71 72 #ifdef _MSC_VER 73 #pragma optimize ( "", off ) 74 #endif 75 76 using namespace com::sun::star; 77 78 /************************************************************************* 79 |* 80 |* Konstruktor 81 |* 82 \************************************************************************/ 83 84 FuSelection::FuSelection(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP, 85 SdrModel* pDoc, SfxRequest& rReq ) : 86 FuDraw(pViewSh, pWin, pViewP, pDoc, rReq), 87 bVCAction(sal_False) 88 { 89 } 90 91 /************************************************************************* 92 |* 93 |* Destruktor 94 |* 95 \************************************************************************/ 96 97 FuSelection::~FuSelection() 98 { 99 } 100 101 sal_uInt8 FuSelection::Command(const CommandEvent& rCEvt) 102 { 103 // special code for non-VCL OS2/UNX removed 104 105 return FuDraw::Command( rCEvt ); 106 } 107 108 /************************************************************************* 109 |* 110 |* MouseButtonDown-event 111 |* 112 \************************************************************************/ 113 114 sal_Bool __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) 115 { 116 // #95491# remember button state for creation of own MouseEvents 117 SetMouseButtonCode(rMEvt.GetButtons()); 118 const bool bSelectionOnly = rMEvt.IsRight(); 119 if ( pView->IsAction() ) 120 { 121 if ( bSelectionOnly ) 122 pView->BckAction(); 123 return sal_True; 124 } 125 126 bVCAction = sal_False; 127 bIsInDragMode = sal_False; // irgendwo muss es ja zurueckgesetzt werden (#50033#) 128 129 sal_Bool bReturn = FuDraw::MouseButtonDown(rMEvt); 130 131 aMDPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() ); 132 133 if ( rMEvt.IsLeft() ) 134 { 135 SdrHdl* pHdl = pView->PickHandle(aMDPos); 136 SdrObject* pObj; 137 SdrPageView* pPV; 138 139 if ( pHdl!=NULL || pView->IsMarkedHit(aMDPos) ) 140 { 141 // Determine if this is the tail of a SdrCaptionObj i.e. 142 // we need to disable the drag option on the tail of a note 143 // object. Also, disable the ability to use the circular 144 // drag of a note object. 145 bool bDrag = false; 146 const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); 147 if( rMarkList.GetMarkCount() == 1 ) 148 { 149 SdrObject* pMarkedObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); 150 if( ScDrawLayer::IsNoteCaption( pMarkedObj ) ) 151 { 152 // move using the valid caption handles for note text box. 153 if(pHdl && (pHdl->GetKind() != HDL_POLY && pHdl->GetKind() != HDL_CIRC)) 154 bDrag = true; 155 // move the complete note box. 156 else if(!pHdl) 157 bDrag = true; 158 } 159 else 160 bDrag = true; // different object 161 } 162 else 163 bDrag = true; // several objects 164 165 if ( bDrag ) 166 { 167 aDragTimer.Start(); 168 pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl); 169 bReturn = sal_True; 170 } 171 } 172 else 173 { 174 sal_Bool bAlt = rMEvt.IsMod2(); 175 if ( !bAlt && pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO) ) 176 { 177 pView->BegMacroObj(aMDPos, pObj, pPV, pWindow); 178 bReturn = sal_True; 179 } 180 else 181 { 182 String sURL, sTarget; 183 if ( !bAlt && pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER)) 184 { 185 // Support for imported Excel docs 186 // Excel is of course not consistent and allows 187 // a hyperlink to be assigned for an object group 188 // and even though the hyperlink is exported in the Escher layer 189 // its never used, when dealing with a group object the link 190 // associated with the clicked object is used only 191 192 // additionally you can also select a macro in Excel for a grouped 193 // objects and this results in the macro being set for the elements 194 // in the group and no macro is exported for the group 195 196 // if a macro and hlink are defined favour the hlink 197 198 // If a group object has no hyperlink use the hyperlink of the 199 // object clicked 200 201 if ( pObj->IsGroupObject() ) 202 { 203 SdrObject* pHit = NULL; 204 if ( pView->PickObj(aMDPos, pView->getHitTolLog(), pHit, pPV, SDRSEARCH_DEEP ) ) 205 pObj = pHit; 206 } 207 208 ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True ); 209 #ifdef ISSUE66550_HLINK_FOR_SHAPES 210 // For interoperability favour links over macros if both are defined 211 if ( pInfo->GetHlink().getLength() > 0 ) 212 { 213 OSL_TRACE("** Got URL"); 214 sURL = pInfo->GetHlink(); 215 } 216 else if ( pInfo->GetMacro().getLength() > 0 ) 217 #else 218 if ( pInfo->GetMacro().getLength() > 0 ) 219 #endif 220 { 221 SfxObjectShell* pObjSh = SfxObjectShell::Current(); 222 if ( pObjSh && SfxApplication::IsXScriptURL( pInfo->GetMacro() ) ) 223 { 224 uno::Any aRet; 225 uno::Sequence< sal_Int16 > aOutArgsIndex; 226 uno::Sequence< uno::Any > aOutArgs; 227 uno::Sequence< uno::Any >* pInArgs = 228 new uno::Sequence< uno::Any >(0); 229 pObjSh->CallXScript( pInfo->GetMacro(), 230 *pInArgs, aRet, aOutArgsIndex, aOutArgs); 231 pViewShell->FakeButtonUp( pViewShell->GetViewData()->GetActivePart() ); 232 return sal_True; // kein CaptureMouse etc. 233 } 234 } 235 } 236 237 // URL / ImageMap 238 239 SdrViewEvent aVEvt; 240 if ( !bAlt && 241 pView->PickAnything( rMEvt, SDRMOUSEBUTTONDOWN, aVEvt ) != SDRHIT_NONE && 242 aVEvt.pObj != NULL ) 243 { 244 if ( ScDrawLayer::GetIMapInfo( aVEvt.pObj ) ) // ImageMap 245 { 246 const IMapObject* pIMapObj = 247 ScDrawLayer::GetHitIMapObject( aVEvt.pObj, aMDPos, *pWindow ); 248 if ( pIMapObj && pIMapObj->GetURL().Len() ) 249 { 250 sURL = pIMapObj->GetURL(); 251 sTarget = pIMapObj->GetTarget(); 252 } 253 } 254 if ( aVEvt.eEvent == SDREVENT_EXECUTEURL && aVEvt.pURLField ) // URL 255 { 256 sURL = aVEvt.pURLField->GetURL(); 257 sTarget = aVEvt.pURLField->GetTargetFrame(); 258 } 259 } 260 261 // open hyperlink, if found at object or in object's text 262 if ( sURL.Len() > 0 ) 263 { 264 ScGlobal::OpenURL( sURL, sTarget ); 265 pViewShell->FakeButtonUp( pViewShell->GetViewData()->GetActivePart() ); 266 return sal_True; // kein CaptureMouse etc. 267 } 268 269 // Is another object being edited in this view? 270 // (Editing is ended in MarkListHasChanged - test before UnmarkAll) 271 SfxInPlaceClient* pClient = pViewShell->GetIPClient(); 272 sal_Bool bWasOleActive = ( pClient && pClient->IsObjectInPlaceActive() ); 273 274 // Markieren 275 276 // do not allow multiselection with note caption 277 bool bCaptionClicked = IsNoteCaptionClicked( aMDPos ); 278 if ( !rMEvt.IsShift() || bCaptionClicked || IsNoteCaptionMarked() ) 279 pView->UnmarkAll(); 280 281 /* Unlock internal layer, if a note caption is clicked. The 282 layer will be relocked in ScDrawView::MarkListHasChanged(). */ 283 if( bCaptionClicked ) 284 pView->UnlockInternalLayer(); 285 286 // try to select the clicked object 287 if ( pView->MarkObj( aMDPos, -2, sal_False, rMEvt.IsMod1() ) ) 288 { 289 //********************************************************* 290 //Objekt verschieben 291 //******************************************************** 292 if (pView->IsMarkedHit(aMDPos)) 293 { 294 // #95834# Don't start drag timer if inplace editing of an OLE object 295 // was just ended with this mouse click - the view will be moved 296 // (different tool bars) and the object that was clicked on would 297 // be moved unintentionally. 298 if ( !bWasOleActive ) 299 aDragTimer.Start(); 300 301 pHdl=pView->PickHandle(aMDPos); 302 pView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl); 303 bReturn = sal_True; 304 } 305 else // Objekt am Rand getroffen 306 if (pViewShell->IsDrawSelMode()) 307 bReturn = sal_True; 308 } 309 else 310 { 311 // nichts getroffen 312 313 if (pViewShell->IsDrawSelMode()) 314 { 315 //********************************************************* 316 //Objekt selektieren 317 //******************************************************** 318 pView->BegMarkObj(aMDPos); 319 bReturn = sal_True; 320 } 321 } 322 } 323 } 324 325 } 326 327 if (!bIsInDragMode) 328 { 329 if (!bVCAction) // VC rufen selber CaptureMouse 330 pWindow->CaptureMouse(); 331 ForcePointer(&rMEvt); 332 } 333 334 return bReturn; 335 } 336 337 /************************************************************************* 338 |* 339 |* MouseMove-event 340 |* 341 \************************************************************************/ 342 343 sal_Bool __EXPORT FuSelection::MouseMove(const MouseEvent& rMEvt) 344 { 345 sal_Bool bReturn = FuDraw::MouseMove(rMEvt); 346 347 if (aDragTimer.IsActive() ) 348 { 349 Point aOldPixel = pWindow->LogicToPixel( aMDPos ); 350 Point aNewPixel = rMEvt.GetPosPixel(); 351 if ( Abs( aOldPixel.X() - aNewPixel.X() ) > SC_MAXDRAGMOVE || 352 Abs( aOldPixel.Y() - aNewPixel.Y() ) > SC_MAXDRAGMOVE ) 353 aDragTimer.Stop(); 354 } 355 356 if ( pView->IsAction() ) 357 { 358 Point aPix(rMEvt.GetPosPixel()); 359 Point aPnt(pWindow->PixelToLogic(aPix)); 360 361 ForceScroll(aPix); 362 pView->MovAction(aPnt); 363 bReturn = sal_True; 364 } 365 366 // Ein VCControl ist aktiv 367 // Event an den Manager weiterleiten 368 if( bVCAction ) 369 { 370 // GetSbxForm gibts nicht mehr - Basic-Controls sind tot 371 //SdrPageView* pPgView = pView->GetPageViewByIndex(0); 372 //ScDrawPage* pPage = (ScDrawPage*)pPgView->GetPage(); 373 //VCSbxForm* pForm = (VCSbxForm*)(SbxObject*)(pPage->GetSbxForm()); 374 //((VCManager*)(pForm->GetVCContainer()))-> 375 // MouseMove( pWindow, rMEvt ); 376 bReturn = sal_True; 377 } 378 379 ForcePointer(&rMEvt); 380 381 return (bReturn); 382 } 383 384 /************************************************************************* 385 |* 386 |* MouseButtonUp-event 387 |* 388 \************************************************************************/ 389 390 sal_Bool __EXPORT FuSelection::MouseButtonUp(const MouseEvent& rMEvt) 391 { 392 // #95491# remember button state for creation of own MouseEvents 393 SetMouseButtonCode(rMEvt.GetButtons()); 394 395 sal_Bool bReturn = FuDraw::MouseButtonUp(rMEvt); 396 // sal_Bool bOle = pViewShell->GetViewData()->IsOle(); 397 sal_Bool bOle = pViewShell->GetViewFrame()->GetFrame().IsInPlace(); 398 399 if (aDragTimer.IsActive() ) 400 { 401 aDragTimer.Stop(); 402 } 403 404 Point aPnt( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) ); 405 406 bool bCopy = false; 407 ScViewData* pViewData = ( pViewShell ? pViewShell->GetViewData() : NULL ); 408 ScDocument* pDocument = ( pViewData ? pViewData->GetDocument() : NULL ); 409 SdrPageView* pPageView = ( pView ? pView->GetSdrPageView() : NULL ); 410 SdrPage* pPage = ( pPageView ? pPageView->GetPage() : NULL ); 411 ::std::vector< ::rtl::OUString > aExcludedChartNames; 412 ScRangeListVector aProtectedChartRangesVector; 413 414 if ( rMEvt.IsLeft() ) 415 { 416 if ( pView->IsDragObj() ) 417 { 418 /****************************************************************** 419 * Objekt wurde verschoben 420 ******************************************************************/ 421 if ( rMEvt.IsMod1() ) 422 { 423 if ( pPage ) 424 { 425 ScChartHelper::GetChartNames( aExcludedChartNames, pPage ); 426 } 427 if ( pView && pDocument ) 428 { 429 const SdrMarkList& rSdrMarkList = pView->GetMarkedObjectList(); 430 sal_uLong nMarkCount = rSdrMarkList.GetMarkCount(); 431 for ( sal_uLong i = 0; i < nMarkCount; ++i ) 432 { 433 SdrMark* pMark = rSdrMarkList.GetMark( i ); 434 SdrObject* pObj = ( pMark ? pMark->GetMarkedSdrObj() : NULL ); 435 if ( pObj ) 436 { 437 ScChartHelper::AddRangesIfProtectedChart( aProtectedChartRangesVector, pDocument, pObj ); 438 } 439 } 440 } 441 bCopy = true; 442 } 443 444 pView->EndDragObj( rMEvt.IsMod1() ); 445 pView->ForceMarkedToAnotherPage(); 446 447 const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); 448 if (rMarkList.GetMarkCount() == 1) 449 { 450 SdrMark* pMark = rMarkList.GetMark(0); 451 SdrObject* pObj = pMark->GetMarkedSdrObj(); 452 FuPoor* pPoor = pViewShell->GetViewData()->GetView()->GetDrawFuncPtr(); 453 FuText* pText = static_cast<FuText*>(pPoor); 454 pText->StopDragMode(pObj ); 455 } 456 bReturn = sal_True; 457 } 458 else if (pView->IsAction() ) 459 { 460 // unlock internal layer to include note captions 461 pView->UnlockInternalLayer(); 462 pView->EndAction(); 463 if ( pView->AreObjectsMarked() ) 464 { 465 bReturn = sal_True; 466 467 /* if multi-selection contains a note caption object, remove 468 all other objects from selection. */ 469 const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); 470 sal_uLong nCount = rMarkList.GetMarkCount(); 471 if( nCount > 1 ) 472 { 473 bool bFound = false; 474 for( sal_uLong nIdx = 0; !bFound && (nIdx < nCount); ++nIdx ) 475 { 476 SdrObject* pObj = rMarkList.GetMark( nIdx )->GetMarkedSdrObj(); 477 bFound = ScDrawLayer::IsNoteCaption( pObj ); 478 if( bFound ) 479 { 480 pView->UnMarkAll(); 481 pView->MarkObj( pObj, pView->GetSdrPageView() ); 482 } 483 } 484 } 485 } 486 } 487 } 488 489 /* 490 if ( pView->IsObjEdit() ) 491 { 492 sal_Bool bShowCursor = sal_True; 493 //! pOutlinerView = pView->GetOutlinerView(pWindow, bShowCursor); 494 bReturn = sal_True; 495 } 496 */ 497 /************************************************************************** 498 * Ggf. OLE-Objekt beruecksichtigen 499 **************************************************************************/ 500 SfxInPlaceClient* pIPClient = pViewShell->GetIPClient(); 501 502 if (pIPClient) 503 { 504 ScModule* pScMod = SC_MOD(); 505 bool bUnoRefDialog = pScMod->IsRefDialogOpen() && pScMod->GetCurRefDlgId() == WID_SIMPLE_REF; 506 507 if ( pIPClient->IsObjectInPlaceActive() && !bUnoRefDialog ) 508 pIPClient->DeactivateObject(); 509 } 510 511 sal_uInt16 nClicks = rMEvt.GetClicks(); 512 if ( nClicks == 2 && rMEvt.IsLeft() ) 513 { 514 if ( pView->AreObjectsMarked() ) 515 { 516 const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); 517 if (rMarkList.GetMarkCount() == 1) 518 { 519 SdrMark* pMark = rMarkList.GetMark(0); 520 SdrObject* pObj = pMark->GetMarkedSdrObj(); 521 522 // #43984# aktivieren nur, wenn die Maus auch (noch) ueber dem 523 // selektierten Objekt steht 524 525 SdrViewEvent aVEvt; 526 SdrHitKind eHit = pView->PickAnything( rMEvt, SDRMOUSEBUTTONDOWN, aVEvt ); 527 if ( eHit != SDRHIT_NONE && aVEvt.pObj == pObj ) 528 { 529 sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); 530 531 // 532 // OLE: aktivieren 533 // 534 535 if (nSdrObjKind == OBJ_OLE2) 536 { 537 if (!bOle) 538 { 539 if (((SdrOle2Obj*) pObj)->GetObjRef().is()) 540 { 541 //HMHpView->HideMarkHdl(); 542 pViewShell->ActivateObject( (SdrOle2Obj*) pObj, 0 ); 543 } 544 } 545 } 546 547 // 548 // Edit text 549 // #49458# not in UNO controls 550 // #i32352# not in media objects 551 // 552 else if ( pObj->ISA(SdrTextObj) && !pObj->ISA(SdrUnoObj) && !pObj->ISA(SdrMediaObj) ) 553 { 554 OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject(); 555 sal_Bool bVertical = ( pOPO && pOPO->IsVertical() ); 556 sal_uInt16 nTextSlotId = bVertical ? SID_DRAW_TEXT_VERTICAL : SID_DRAW_TEXT; 557 558 pViewShell->GetViewData()->GetDispatcher(). 559 Execute(nTextSlotId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD); 560 561 // jetzt den erzeugten FuText holen und in den EditModus setzen 562 FuPoor* pPoor = pViewShell->GetViewData()->GetView()->GetDrawFuncPtr(); 563 if ( pPoor && pPoor->GetSlotID() == nTextSlotId ) // hat keine RTTI 564 { 565 FuText* pText = (FuText*)pPoor; 566 Point aMousePixel = rMEvt.GetPosPixel(); 567 pText->SetInEditMode( pObj, &aMousePixel ); 568 } 569 bReturn = sal_True; 570 } 571 } 572 } 573 } 574 else if ( TestDetective( pView->GetSdrPageView(), aPnt ) ) 575 bReturn = sal_True; 576 } 577 578 // Ein VCControl ist aktiv 579 // Event an den Manager weiterleiten 580 if( bVCAction ) 581 { 582 // GetSbxForm gibts nicht mehr - Basic-Controls sind tot 583 //SdrPageView* pPgView = pView->GetPageViewByIndex(0); 584 //ScDrawPage* pPage = (ScDrawPage*)pPgView->GetPage(); 585 //VCSbxForm* pForm = (VCSbxForm*)(SbxObject*)(pPage->GetSbxForm()); 586 //((VCManager*)(pForm->GetVCContainer()))-> 587 // MouseButtonUp( pWindow, rMEvt ); 588 //HMHpView->ShowMarkHdl(); 589 bVCAction = sal_False; 590 bReturn = sal_True; 591 } 592 593 ForcePointer(&rMEvt); 594 595 pWindow->ReleaseMouse(); 596 597 // Command-Handler fuer Kontext-Menue kommt erst nach MouseButtonUp, 598 // darum hier die harte IsLeft-Abfrage 599 if ( !bReturn && rMEvt.IsLeft() ) 600 if (pViewShell->IsDrawSelMode()) 601 pViewShell->GetViewData()->GetDispatcher(). 602 Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD); 603 604 if ( bCopy && pViewData && pDocument && pPage ) 605 { 606 ScDocShell* pDocShell = pViewData->GetDocShell(); 607 ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : NULL ); 608 if ( pModelObj ) 609 { 610 SCTAB nTab = pViewData->GetTabNo(); 611 ScChartHelper::CreateProtectedChartListenersAndNotify( pDocument, pPage, pModelObj, nTab, 612 aProtectedChartRangesVector, aExcludedChartNames ); 613 } 614 } 615 616 return (bReturn); 617 } 618 619 /************************************************************************* 620 |* 621 |* Tastaturereignisse bearbeiten 622 |* 623 |* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls 624 |* FALSE. 625 |* 626 \************************************************************************/ 627 628 sal_Bool FuSelection::KeyInput(const KeyEvent& rKEvt) 629 { 630 sal_Bool bReturn = sal_False; 631 632 if (!bReturn) 633 { 634 bReturn = FuDraw::KeyInput(rKEvt); 635 } 636 637 return(bReturn); 638 } 639 640 641 /************************************************************************* 642 |* 643 |* Function aktivieren 644 |* 645 \************************************************************************/ 646 647 void FuSelection::Activate() 648 { 649 /* 650 SdrDragMode eMode; 651 switch (aSfxRequest.GetSlot() ) 652 { 653 case SID_OBJECT_SELECT: 654 eMode = SDRDRAG_MOVE; 655 break; 656 case SID_OBJECT_ROTATE: 657 eMode = SDRDRAG_ROTATE; 658 break; 659 case SID_OBJECT_MIRROR: 660 eMode = SDRDRAG_MIRROR; 661 break; 662 } 663 pView->SetDragMode(eMode); 664 */ 665 FuDraw::Activate(); 666 } 667 668 669 670 /************************************************************************* 671 |* 672 |* Function deaktivieren 673 |* 674 \************************************************************************/ 675 676 void FuSelection::Deactivate() 677 { 678 /************************************************************************** 679 * Hide Cursor 680 **************************************************************************/ 681 // sal_Bool bShowCursor = sal_False; 682 //! pOutlinerView = pView->GetOutlinerView(pWindow, bShowCursor); 683 684 // pView->SetDragMode(SDRDRAG_MOVE); 685 FuDraw::Deactivate(); 686 } 687 688 689 #ifdef _MSC_VER 690 #pragma optimize ( "", on ) 691 #endif 692 693 694 695 696 697