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