1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_sd.hxx" 26 27 #include "DrawViewShell.hxx" 28 #include <vcl/metaact.hxx> 29 #include <sfx2/request.hxx> 30 #include <sfx2/dispatch.hxx> 31 #include <vcl/msgbox.hxx> 32 #include <sfx2/viewfrm.hxx> 33 #include <svx/svdograf.hxx> 34 #ifndef _SVXIDS_HXX 35 #include <svx/svxids.hrc> 36 #endif 37 #ifndef _FONTWORK_HXX 38 #include <svx/fontwork.hxx> 39 #endif 40 #ifndef _BMPMASK_HXX 41 #include <svx/bmpmask.hxx> 42 #endif 43 #ifndef _SVX_GALBRWS_HXX 44 #include <svx/galbrws.hxx> 45 #endif 46 #ifndef _IMAPDLG_HXX 47 #include <svx/imapdlg.hxx> 48 #endif 49 #include <svx/xftsfit.hxx> 50 #include <svx/colrctrl.hxx> 51 #include <svx/f3dchild.hxx> 52 #include "optsitem.hxx" 53 #include <svx/extrusionbar.hxx> 54 #include <svx/fontworkbar.hxx> 55 #include <svx/tbxcustomshapes.hxx> 56 #ifndef _AVMEDIA_MEDIAPLAYER_HXX 57 #include <avmedia/mediaplayer.hxx> 58 #endif 59 60 #include "app.hrc" 61 #include "strings.hrc" 62 #include "glob.hrc" 63 64 #include "app.hxx" 65 #include "animobjs.hxx" 66 #include "AnimationChildWindow.hxx" 67 #include "NavigatorChildWindow.hxx" 68 #include "LayerDialogChildWindow.hxx" 69 #include "sdresid.hxx" 70 #include "fupoor.hxx" 71 #include "fusldlg.hxx" 72 #include "drawdoc.hxx" 73 #include "fuexpand.hxx" 74 #include "fusumry.hxx" 75 #include "fucushow.hxx" 76 #include "drawview.hxx" 77 #include "FrameView.hxx" 78 #include "Window.hxx" 79 #include "DrawDocShell.hxx" 80 #include "framework/FrameworkHelper.hxx" 81 #include <svx/svdoashp.hxx> 82 83 namespace sd { 84 85 /************************************************************************* 86 |* 87 |* SfxRequests fuer FontWork bearbeiten 88 |* 89 \************************************************************************/ 90 91 void DrawViewShell::ExecFormText(SfxRequest& rReq) 92 { 93 // waehrend einer Diashow wird nichts ausgefuehrt! 94 if(HasCurrentFunction(SID_PRESENTATION)) 95 return; 96 97 CheckLineTo (rReq); 98 99 const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList(); 100 101 if ( rMarkList.GetMarkCount() == 1 && rReq.GetArgs() && 102 mpDrawView && !mpDrawView->IsPresObjSelected() ) 103 { 104 const SfxItemSet& rSet = *rReq.GetArgs(); 105 const SfxPoolItem* pItem; 106 107 if ( mpDrawView->IsTextEdit() ) 108 mpDrawView->SdrEndTextEdit(); 109 110 if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem) == 111 SFX_ITEM_SET && 112 ((const XFormTextStdFormItem*) pItem)->GetValue() != XFTFORM_NONE ) 113 { 114 115 sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); 116 117 SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)GetViewFrame()-> 118 GetChildWindow(nId)->GetWindow(); 119 120 pDlg->CreateStdFormObj(*mpDrawView, *mpDrawView->GetSdrPageView(), 121 rSet, *rMarkList.GetMark(0)->GetMarkedSdrObj(), 122 ((const XFormTextStdFormItem*) pItem)-> 123 GetValue()); 124 125 if(HasCurrentFunction(SID_BEZIER_EDIT)) 126 { // ggf. die richtige Editfunktion aktivieren 127 GetViewFrame()->GetDispatcher()->Execute(SID_SWITCH_POINTEDIT, 128 SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD); 129 } 130 } 131 else 132 mpDrawView->SetAttributes(rSet); 133 } 134 } 135 136 /************************************************************************* 137 |* 138 |* Statuswerte fuer FontWork zurueckgeben 139 |* 140 \************************************************************************/ 141 142 void DrawViewShell::GetFormTextState(SfxItemSet& rSet) 143 { 144 const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList(); 145 const SdrObject* pObj = NULL; 146 SvxFontWorkDialog* pDlg = NULL; 147 148 sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); 149 150 if ( GetViewFrame()->HasChildWindow(nId) ) 151 pDlg = (SvxFontWorkDialog*)(GetViewFrame()->GetChildWindow(nId)->GetWindow()); 152 153 if ( rMarkList.GetMarkCount() == 1 ) 154 pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); 155 156 const SdrTextObj* pTextObj = dynamic_cast< const SdrTextObj* >(pObj); 157 const bool bDeactivate( 158 !pObj || 159 !pTextObj || 160 !pTextObj->HasText() || 161 dynamic_cast< const SdrObjCustomShape* >(pObj)); // #121538# no FontWork for CustomShapes 162 163 if(bDeactivate) 164 { 165 // automatisches Auf/Zuklappen des FontWork-Dialog; erstmal deaktiviert 166 // if ( pDlg ) 167 // pDlg->SetActive(sal_False); 168 169 rSet.DisableItem(XATTR_FORMTXTSTYLE); 170 rSet.DisableItem(XATTR_FORMTXTADJUST); 171 rSet.DisableItem(XATTR_FORMTXTDISTANCE); 172 rSet.DisableItem(XATTR_FORMTXTSTART); 173 rSet.DisableItem(XATTR_FORMTXTMIRROR); 174 rSet.DisableItem(XATTR_FORMTXTSTDFORM); 175 rSet.DisableItem(XATTR_FORMTXTHIDEFORM); 176 rSet.DisableItem(XATTR_FORMTXTOUTLINE); 177 rSet.DisableItem(XATTR_FORMTXTSHADOW); 178 rSet.DisableItem(XATTR_FORMTXTSHDWCOLOR); 179 rSet.DisableItem(XATTR_FORMTXTSHDWXVAL); 180 rSet.DisableItem(XATTR_FORMTXTSHDWYVAL); 181 } 182 else 183 { 184 if ( pDlg ) 185 { 186 // pDlg->SetActive(); 187 pDlg->SetColorTable(GetDoc()->GetColorTable()); 188 } 189 190 SfxItemSet aSet( GetDoc()->GetPool() ); 191 mpDrawView->GetAttributes( aSet ); 192 rSet.Set( aSet ); 193 } 194 } 195 196 /************************************************************************* 197 |* 198 |* SfxRequests fuer Animator bearbeiten 199 |* 200 \************************************************************************/ 201 202 void DrawViewShell::ExecAnimationWin( SfxRequest& rReq ) 203 { 204 // waehrend einer Diashow wird nichts ausgefuehrt! 205 if (HasCurrentFunction(SID_PRESENTATION)) 206 return; 207 208 CheckLineTo (rReq); 209 210 sal_uInt16 nSId = rReq.GetSlot(); 211 212 switch( nSId ) 213 { 214 case SID_ANIMATOR_INIT: 215 case SID_ANIMATOR_ADD: 216 case SID_ANIMATOR_CREATE: 217 { 218 AnimationWindow* pAnimWin; 219 sal_uInt16 nId = AnimationChildWindow::GetChildWindowId(); 220 //((const SfxUInt16Item&)(rReq.GetArgs()->Get(nSId))).GetValue(); 221 222 pAnimWin = static_cast<AnimationWindow*>( 223 GetViewFrame()->GetChildWindow(nId)->GetWindow()); 224 225 if ( pAnimWin ) 226 { 227 if( nSId == SID_ANIMATOR_ADD ) 228 pAnimWin->AddObj( *mpDrawView ); 229 else if( nSId == SID_ANIMATOR_CREATE ) 230 pAnimWin->CreateAnimObj( *mpDrawView ); 231 } 232 } 233 break; 234 235 default: 236 break; 237 } 238 } 239 240 /************************************************************************* 241 |* 242 |* Statuswerte fuer Animator zurueckgeben 243 |* 244 |* nValue == 0 -> Kein Button 245 |* nValue == 1 -> Button 'uebernehmen' 246 |* nValue == 2 -> Button 'einzeln uebernehmen' 247 |* nValue == 3 -> Buttons 'uebernehmen' und 'einzeln uebernehmen' 248 |* 249 \************************************************************************/ 250 251 void DrawViewShell::GetAnimationWinState( SfxItemSet& rSet ) 252 { 253 // Hier koennten Buttons etc. disabled werden 254 sal_uInt16 nValue; 255 256 const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList(); 257 sal_uLong nMarkCount = rMarkList.GetMarkCount(); 258 259 if( nMarkCount == 0 ) 260 nValue = 0; 261 else if( nMarkCount > 1 ) 262 nValue = 3; 263 else // 1 Objekt 264 { 265 const SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); 266 sal_uInt32 nInv = pObj->GetObjInventor(); 267 sal_uInt16 nId = pObj->GetObjIdentifier(); 268 // 1 selektiertes Gruppenobjekt 269 if( nInv == SdrInventor && nId == OBJ_GRUP ) 270 nValue = 3; 271 else if( nInv == SdrInventor && nId == OBJ_GRAF ) // Anim. GIF ? 272 { 273 sal_uInt16 nCount = 0; 274 275 if( ( (SdrGrafObj*) pObj )->IsAnimated() ) 276 nCount = ( (SdrGrafObj*) pObj )->GetGraphic().GetAnimation().Count(); 277 if( nCount > 0 ) 278 nValue = 2; 279 else 280 nValue = 1; 281 } 282 else 283 nValue = 1; 284 } 285 rSet.Put( SfxUInt16Item( SID_ANIMATOR_STATE, nValue ) ); 286 } 287 288 /************************************************************************* 289 |* 290 |* Statuswerte fuer SfxChildWindows setzen 291 |* 292 \************************************************************************/ 293 294 void DrawViewShell::SetChildWindowState( SfxItemSet& rSet ) 295 { 296 // Stati der SfxChild-Windows (Animator, Fontwork etc.) 297 if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_FONTWORK ) ) 298 { 299 sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId(); 300 rSet.Put(SfxBoolItem(SID_FONTWORK, GetViewFrame()->HasChildWindow(nId))); 301 } 302 if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_COLOR_CONTROL ) ) 303 { 304 sal_uInt16 nId = SvxColorChildWindow::GetChildWindowId(); 305 rSet.Put(SfxBoolItem(SID_COLOR_CONTROL, GetViewFrame()->HasChildWindow(nId))); 306 } 307 if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ANIMATION_OBJECTS ) ) 308 { 309 sal_uInt16 nId = AnimationChildWindow::GetChildWindowId(); 310 rSet.Put( SfxBoolItem( SID_ANIMATION_OBJECTS, GetViewFrame()->HasChildWindow( nId ) ) ); 311 } 312 if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_NAVIGATOR ) ) 313 { 314 sal_uInt16 nId = SID_NAVIGATOR; 315 rSet.Put( SfxBoolItem( SID_NAVIGATOR, GetViewFrame()->HasChildWindow( nId ) ) ); 316 } 317 if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BMPMASK ) ) 318 { 319 sal_uInt16 nId = SvxBmpMaskChildWindow::GetChildWindowId(); 320 rSet.Put( SfxBoolItem( SID_BMPMASK, GetViewFrame()->HasChildWindow( nId ) ) ); 321 } 322 if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GALLERY ) ) 323 { 324 sal_uInt16 nId = GalleryChildWindow::GetChildWindowId(); 325 rSet.Put( SfxBoolItem( SID_GALLERY, GetViewFrame()->HasChildWindow( nId ) ) ); 326 } 327 if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_IMAP ) ) 328 { 329 sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId(); 330 rSet.Put( SfxBoolItem( SID_IMAP, GetViewFrame()->HasChildWindow( nId ) ) ); 331 } 332 if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_LAYER_DIALOG_WIN ) ) 333 { 334 sal_uInt16 nId = LayerDialogChildWindow::GetChildWindowId(); 335 rSet.Put( SfxBoolItem( SID_LAYER_DIALOG_WIN, GetViewFrame()->HasChildWindow( nId ) ) ); 336 } 337 if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_3D_WIN ) ) 338 { 339 sal_uInt16 nId = Svx3DChildWindow::GetChildWindowId(); 340 rSet.Put( SfxBoolItem( SID_3D_WIN, GetViewFrame()->HasChildWindow( nId ) ) ); 341 } 342 if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_AVMEDIA_PLAYER ) ) 343 { 344 sal_uInt16 nId = ::avmedia::MediaPlayer::GetChildWindowId(); 345 rSet.Put( SfxBoolItem( SID_AVMEDIA_PLAYER, GetViewFrame()->HasChildWindow( nId ) ) ); 346 } 347 } 348 349 350 /************************************************************************* 351 |* 352 |* SfxRequests fuer Pipette bearbeiten 353 |* 354 \************************************************************************/ 355 356 void DrawViewShell::ExecBmpMask( SfxRequest& rReq ) 357 { 358 // waehrend einer Diashow wird nichts ausgefuehrt! 359 if (HasCurrentFunction(SID_PRESENTATION)) 360 return; 361 362 switch ( rReq.GetSlot() ) 363 { 364 case ( SID_BMPMASK_PIPETTE ) : 365 { 366 mbPipette = ( (const SfxBoolItem&) ( rReq.GetArgs()-> 367 Get( SID_BMPMASK_PIPETTE ) ) ).GetValue(); 368 } 369 break; 370 371 case ( SID_BMPMASK_EXEC ) : 372 { 373 SdrGrafObj* pObj = 0; 374 if( mpDrawView && mpDrawView->GetMarkedObjectList().GetMarkCount() ) 375 pObj = dynamic_cast< SdrGrafObj* >( mpDrawView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj() ); 376 377 if ( pObj && !mpDrawView->IsTextEdit() ) 378 { 379 SdrGrafObj* pNewObj = (SdrGrafObj*) pObj->Clone(); 380 sal_Bool bCont = sal_True; 381 382 if( pNewObj->IsLinkedGraphic() ) 383 { 384 QueryBox aQBox( (Window*) GetActiveWindow(), WB_YES_NO | WB_DEF_YES, 385 String( SdResId( STR_RELEASE_GRAPHICLINK ) ) ); 386 387 if( RET_YES == aQBox.Execute() ) 388 pNewObj->ReleaseGraphicLink(); 389 else 390 { 391 delete pNewObj; 392 bCont = sal_False; 393 } 394 } 395 396 if( bCont ) 397 { 398 const Graphic& rOldGraphic = pNewObj->GetGraphic(); 399 const Graphic aNewGraphic( ( (SvxBmpMask*) GetViewFrame()->GetChildWindow( 400 SvxBmpMaskChildWindow::GetChildWindowId() )->GetWindow() )-> 401 Mask( rOldGraphic ) ); 402 403 if( aNewGraphic != rOldGraphic ) 404 { 405 SdrPageView* pPV = mpDrawView->GetSdrPageView(); 406 407 pNewObj->SetEmptyPresObj( sal_False ); 408 pNewObj->SetGraphic( ( (SvxBmpMask*) GetViewFrame()->GetChildWindow( 409 SvxBmpMaskChildWindow::GetChildWindowId() )->GetWindow() )-> 410 Mask( pNewObj->GetGraphic() ) ); 411 412 String aStr( mpDrawView->GetDescriptionOfMarkedObjects() ); 413 aStr += (sal_Unicode)( ' ' ), aStr += String( SdResId( STR_EYEDROPPER ) ); 414 415 mpDrawView->BegUndo( aStr ); 416 mpDrawView->ReplaceObjectAtView( pObj, *pPV, pNewObj ); 417 mpDrawView->EndUndo(); 418 } 419 } 420 } 421 } 422 break; 423 424 default: 425 break; 426 } 427 } 428 429 /************************************************************************* 430 |* 431 |* 432 |* 433 \************************************************************************/ 434 435 void DrawViewShell::GetBmpMaskState( SfxItemSet& rSet ) 436 { 437 const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList(); 438 const SdrObject* pObj = NULL; 439 sal_uInt16 nId = SvxBmpMaskChildWindow::GetChildWindowId(); 440 SvxBmpMask* pDlg = NULL; 441 sal_Bool bEnable = sal_False; 442 443 if ( GetViewFrame()->HasChildWindow( nId ) ) 444 { 445 pDlg = (SvxBmpMask*) ( GetViewFrame()->GetChildWindow( nId )->GetWindow() ); 446 447 if ( pDlg->NeedsColorTable() ) 448 pDlg->SetColorTable( GetDoc()->GetColorTable() ); 449 } 450 451 if ( rMarkList.GetMarkCount() == 1 ) 452 pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); 453 454 // valid graphic object? 455 if( pObj && pObj->ISA( SdrGrafObj ) && 456 !((SdrGrafObj*) pObj)->IsEPS() && 457 !mpDrawView->IsTextEdit() ) 458 { 459 bEnable = sal_True; 460 } 461 462 // put value 463 rSet.Put( SfxBoolItem( SID_BMPMASK_EXEC, bEnable ) ); 464 } 465 466 /************************************************************************* 467 |* 468 |* SfxRequests fuer temporaere Funktionen 469 |* 470 \************************************************************************/ 471 472 void DrawViewShell::FuTemp04(SfxRequest& rReq) 473 { 474 sal_uInt16 nSId = rReq.GetSlot(); 475 switch( nSId ) 476 { 477 case SID_FONTWORK: 478 { 479 if ( rReq.GetArgs() ) 480 { 481 GetViewFrame()->SetChildWindow(SvxFontWorkChildWindow::GetChildWindowId(), 482 ((const SfxBoolItem&) (rReq.GetArgs()-> 483 Get(SID_FONTWORK))).GetValue()); 484 } 485 else 486 { 487 GetViewFrame()->ToggleChildWindow( SvxFontWorkChildWindow::GetChildWindowId() ); 488 } 489 490 GetViewFrame()->GetBindings().Invalidate(SID_FONTWORK); 491 Cancel(); 492 rReq.Ignore (); 493 } 494 break; 495 496 case SID_COLOR_CONTROL: 497 { 498 if ( rReq.GetArgs() ) 499 GetViewFrame()->SetChildWindow(SvxColorChildWindow::GetChildWindowId(), 500 ((const SfxBoolItem&) (rReq.GetArgs()-> 501 Get(SID_COLOR_CONTROL))).GetValue()); 502 else 503 GetViewFrame()->ToggleChildWindow(SvxColorChildWindow::GetChildWindowId() ); 504 505 GetViewFrame()->GetBindings().Invalidate(SID_COLOR_CONTROL); 506 Cancel(); 507 rReq.Ignore (); 508 } 509 break; 510 511 case SID_EXTRUSION_TOOGLE: 512 case SID_EXTRUSION_TILT_DOWN: 513 case SID_EXTRUSION_TILT_UP: 514 case SID_EXTRUSION_TILT_LEFT: 515 case SID_EXTRUSION_TILT_RIGHT: 516 case SID_EXTRUSION_3D_COLOR: 517 case SID_EXTRUSION_DEPTH: 518 case SID_EXTRUSION_DIRECTION: 519 case SID_EXTRUSION_PROJECTION: 520 case SID_EXTRUSION_LIGHTING_DIRECTION: 521 case SID_EXTRUSION_LIGHTING_INTENSITY: 522 case SID_EXTRUSION_SURFACE: 523 case SID_EXTRUSION_DEPTH_FLOATER: 524 case SID_EXTRUSION_DIRECTION_FLOATER: 525 case SID_EXTRUSION_LIGHTING_FLOATER: 526 case SID_EXTRUSION_SURFACE_FLOATER: 527 case SID_EXTRUSION_DEPTH_DIALOG: 528 svx::ExtrusionBar::execute( mpDrawView, rReq, GetViewFrame()->GetBindings() ); 529 Cancel(); 530 rReq.Ignore (); 531 break; 532 533 case SID_FONTWORK_SHAPE: 534 case SID_FONTWORK_SHAPE_TYPE: 535 case SID_FONTWORK_ALIGNMENT: 536 case SID_FONTWORK_SAME_LETTER_HEIGHTS: 537 case SID_FONTWORK_CHARACTER_SPACING: 538 case SID_FONTWORK_KERN_CHARACTER_PAIRS: 539 case SID_FONTWORK_GALLERY_FLOATER: 540 case SID_FONTWORK_CHARACTER_SPACING_FLOATER: 541 case SID_FONTWORK_ALIGNMENT_FLOATER: 542 case SID_FONTWORK_CHARACTER_SPACING_DIALOG: 543 svx::FontworkBar::execute( mpDrawView, rReq, GetViewFrame()->GetBindings() ); 544 Cancel(); 545 rReq.Ignore (); 546 break; 547 548 case SID_BMPMASK: 549 { 550 GetViewFrame()->ToggleChildWindow( SvxBmpMaskChildWindow::GetChildWindowId() ); 551 GetViewFrame()->GetBindings().Invalidate( SID_BMPMASK ); 552 553 Cancel(); 554 rReq.Ignore (); 555 } 556 break; 557 558 case SID_GALLERY: 559 { 560 GetViewFrame()->ToggleChildWindow( GalleryChildWindow::GetChildWindowId() ); 561 GetViewFrame()->GetBindings().Invalidate( SID_GALLERY ); 562 563 Cancel(); 564 rReq.Ignore (); 565 } 566 break; 567 568 case SID_NAVIGATOR: 569 { 570 if ( rReq.GetArgs() ) 571 GetViewFrame()->SetChildWindow(SID_NAVIGATOR, 572 ((const SfxBoolItem&) (rReq.GetArgs()-> 573 Get(SID_NAVIGATOR))).GetValue()); 574 else 575 GetViewFrame()->ToggleChildWindow( SID_NAVIGATOR ); 576 577 GetViewFrame()->GetBindings().Invalidate(SID_NAVIGATOR); 578 Cancel(); 579 rReq.Ignore (); 580 } 581 break; 582 583 case SID_ANIMATION_OBJECTS: 584 { 585 if ( rReq.GetArgs() ) 586 GetViewFrame()->SetChildWindow( 587 AnimationChildWindow::GetChildWindowId(), 588 ((const SfxBoolItem&) (rReq.GetArgs()-> 589 Get(SID_ANIMATION_OBJECTS))).GetValue()); 590 else 591 GetViewFrame()->ToggleChildWindow( 592 AnimationChildWindow::GetChildWindowId() ); 593 594 GetViewFrame()->GetBindings().Invalidate(SID_ANIMATION_OBJECTS); 595 Cancel(); 596 rReq.Ignore (); 597 } 598 break; 599 600 case SID_CUSTOM_ANIMATION_PANEL: 601 { 602 // Make the slide transition panel visible (expand it) in the 603 // tool pane. 604 framework::FrameworkHelper::Instance(GetViewShellBase())->RequestTaskPanel( 605 framework::FrameworkHelper::msCustomAnimationTaskPanelURL); 606 607 Cancel(); 608 rReq.Done (); 609 } 610 break; 611 612 case SID_SLIDE_TRANSITIONS_PANEL: 613 { 614 // Make the slide transition panel visible (expand it) in the 615 // tool pane. 616 framework::FrameworkHelper::Instance(GetViewShellBase())->RequestTaskPanel( 617 framework::FrameworkHelper::msSlideTransitionTaskPanelURL); 618 619 Cancel(); 620 rReq.Done (); 621 } 622 break; 623 624 case SID_3D_WIN: 625 { 626 if ( rReq.GetArgs() ) 627 GetViewFrame()->SetChildWindow( Svx3DChildWindow::GetChildWindowId(), 628 ((const SfxBoolItem&) (rReq.GetArgs()-> 629 Get( SID_3D_WIN ))).GetValue()); 630 else 631 GetViewFrame()->ToggleChildWindow( Svx3DChildWindow::GetChildWindowId() ); 632 633 GetViewFrame()->GetBindings().Invalidate( SID_3D_WIN ); 634 Cancel(); 635 rReq.Ignore (); 636 } 637 break; 638 639 case SID_CONVERT_TO_3D_LATHE_FAST: 640 { 641 // Der Aufruf ist ausreichend. Die Initialisierung per Start3DCreation und CreateMirrorPolygons 642 // ist nicht mehr noetig, falls der Parameter sal_True uebergeben wird. Dann wird sofort und 643 // ohne Benutzereingriff ein gekippter Rotationskoerper mit einer Achse links neben dem 644 // Umschliessenden Rechteck der slektierten Objekte gezeichnet. 645 mpDrawView->SdrEndTextEdit(); 646 if(GetActiveWindow()) 647 GetActiveWindow()->EnterWait(); 648 mpDrawView->End3DCreation(sal_True); 649 Cancel(); 650 rReq.Ignore(); 651 if(GetActiveWindow()) 652 GetActiveWindow()->LeaveWait(); 653 } 654 break; 655 656 case SID_PRESENTATION_DLG: 657 { 658 SetCurrentFunction( FuSlideShowDlg::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) ); 659 Cancel(); 660 } 661 break; 662 663 case SID_CUSTOMSHOW_DLG: 664 { 665 SetCurrentFunction( FuCustomShowDlg::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) ); 666 Cancel(); 667 } 668 break; 669 670 case SID_EXPAND_PAGE: 671 { 672 SetCurrentFunction( FuExpandPage::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) ); 673 Cancel(); 674 } 675 break; 676 677 case SID_SUMMARY_PAGE: 678 { 679 mpDrawView->SdrEndTextEdit(); 680 SetCurrentFunction( FuSummaryPage::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) ); 681 Cancel(); 682 } 683 break; 684 685 case SID_AVMEDIA_PLAYER: 686 { 687 GetViewFrame()->ToggleChildWindow( ::avmedia::MediaPlayer::GetChildWindowId() ); 688 GetViewFrame()->GetBindings().Invalidate( SID_AVMEDIA_PLAYER ); 689 Cancel(); 690 rReq.Ignore (); 691 } 692 break; 693 694 case SID_LAYER_DIALOG_WIN: 695 { 696 if ( rReq.GetArgs() ) 697 { 698 GetViewFrame()->SetChildWindow( 699 LayerDialogChildWindow::GetChildWindowId(), 700 ((const SfxBoolItem&) (rReq.GetArgs()-> 701 Get(SID_LAYER_DIALOG_WIN))).GetValue()); 702 } 703 else 704 { 705 GetViewFrame()->ToggleChildWindow( 706 LayerDialogChildWindow::GetChildWindowId()); 707 } 708 709 GetViewFrame()->GetBindings().Invalidate(SID_LAYER_DIALOG_WIN); 710 Cancel(); 711 rReq.Ignore (); 712 } 713 break; 714 715 case SID_DISPLAY_MASTER_BACKGROUND: 716 case SID_DISPLAY_MASTER_OBJECTS: 717 { 718 // Determine current page and toggle visibility of layers 719 // associated with master page background or master page shapes. 720 SdPage* pPage = GetActualPage(); 721 if (pPage != NULL 722 && GetDoc() != NULL) 723 { 724 SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers(); 725 SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin(); 726 sal_uInt8 aLayerId; 727 if (nSId == SID_DISPLAY_MASTER_BACKGROUND) 728 aLayerId = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False); 729 else 730 aLayerId = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False); 731 aVisibleLayers.Set(aLayerId, !aVisibleLayers.IsSet(aLayerId)); 732 pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers); 733 } 734 Cancel(); 735 rReq.Ignore (); 736 } 737 break; 738 739 default: 740 { 741 DBG_ASSERT( 0, "Slot ohne Funktion" ); 742 Cancel(); 743 rReq.Ignore (); 744 } 745 break; 746 } 747 } 748 749 } // end of namespace sd 750