1 /**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sd.hxx"
26
27 #include "LayerDialogContent.hxx"
28 #include <com/sun/star/presentation/AnimationEffect.hpp>
29 #include <com/sun/star/presentation/AnimationSpeed.hpp>
30
31 #include <svx/gallery.hxx>
32 #include <editeng/colritem.hxx>
33 #include <sfx2/dispatch.hxx>
34 #include <svl/aeitem.hxx>
35 #include <vcl/msgbox.hxx>
36
37 #include "sdattr.hxx"
38
39 #include "LayerDialog.hrc"
40 #include "app.hrc"
41 #include "strings.hrc"
42 #include "res_bmp.hrc"
43 #include "sdresid.hxx"
44 #include "View.hxx"
45 #include "drawdoc.hxx"
46 #include "ViewShellBase.hxx"
47 #include "DrawViewShell.hxx"
48 #include "framework/FrameworkHelper.hxx"
49
50 using namespace ::com::sun::star;
51
52 namespace sd {
53
54
55
LayerDialogContent(SfxBindings * pInBindings,SfxChildWindow * pCW,Window * pParent,const SdResId & rSdResId,ViewShellBase & rBase)56 LayerDialogContent::LayerDialogContent (
57 SfxBindings* pInBindings,
58 SfxChildWindow *pCW,
59 Window* pParent,
60 const SdResId& rSdResId,
61 ViewShellBase& rBase)
62 : SfxDockingWindow (pInBindings, pCW, pParent, rSdResId),
63 maLayerTabBar(
64 dynamic_cast<DrawViewShell*>(
65 framework::FrameworkHelper::Instance(rBase)->GetViewShell(
66 framework::FrameworkHelper::msCenterPaneURL).get()),
67 this,
68 SdResId(TB_LAYERS))
69 {
70 FreeResource();
71
72 maLayerTabBar.Show();
73 }
74
75
76
77
~LayerDialogContent(void)78 LayerDialogContent::~LayerDialogContent (void)
79 {
80 }
81
82
83
84
Close(void)85 sal_Bool LayerDialogContent::Close (void)
86 {
87 return SfxDockingWindow::Close();
88 }
89
90
91
92
Resize(void)93 void LayerDialogContent::Resize (void)
94 {
95 maLayerTabBar.SetPosSizePixel (
96 Point(0,0),
97 Size(GetSizePixel().Width(), 17));
98 SfxDockingWindow::Resize();
99 }
100
101
102 } // end of namespace sd
103