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