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