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