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