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