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