1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 // MARKER(update_precomp.py): autogen include statement, do not remove 29 #include "precompiled_sd.hxx" 30 31 #include "LayerDialogContent.hxx" 32 #include <com/sun/star/presentation/AnimationEffect.hpp> 33 #include <com/sun/star/presentation/AnimationSpeed.hpp> 34 35 #include <svx/gallery.hxx> 36 #include <editeng/colritem.hxx> 37 #include <sfx2/dispatch.hxx> 38 #include <svl/aeitem.hxx> 39 #include <vcl/msgbox.hxx> 40 41 #include "sdattr.hxx" 42 43 #include "LayerDialog.hrc" 44 #include "app.hrc" 45 #include "strings.hrc" 46 #include "res_bmp.hrc" 47 #include "sdresid.hxx" 48 #include "View.hxx" 49 #include "drawdoc.hxx" 50 #include "ViewShellBase.hxx" 51 #include "DrawViewShell.hxx" 52 #include "framework/FrameworkHelper.hxx" 53 54 using namespace ::com::sun::star; 55 56 namespace sd { 57 58 59 60 LayerDialogContent::LayerDialogContent ( 61 SfxBindings* pInBindings, 62 SfxChildWindow *pCW, 63 Window* pParent, 64 const SdResId& rSdResId, 65 ViewShellBase& rBase) 66 : SfxDockingWindow (pInBindings, pCW, pParent, rSdResId), 67 maLayerTabBar( 68 dynamic_cast<DrawViewShell*>( 69 framework::FrameworkHelper::Instance(rBase)->GetViewShell( 70 framework::FrameworkHelper::msCenterPaneURL).get()), 71 this, 72 SdResId(TB_LAYERS)) 73 { 74 FreeResource(); 75 76 maLayerTabBar.Show(); 77 } 78 79 80 81 82 LayerDialogContent::~LayerDialogContent (void) 83 { 84 } 85 86 87 88 89 sal_Bool LayerDialogContent::Close (void) 90 { 91 return SfxDockingWindow::Close(); 92 } 93 94 95 96 97 void LayerDialogContent::Resize (void) 98 { 99 maLayerTabBar.SetPosSizePixel ( 100 Point(0,0), 101 Size(GetSizePixel().Width(), 17)); 102 SfxDockingWindow::Resize(); 103 } 104 105 106 } // end of namespace sd 107