Update ooo320-m1
[ooovba.git] / sfx2 / source / layout / sfxtabpage.cxx
blob767cb14dfa2825d851a35a207667228391ac8758
1 /*************************************************************************
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * Copyright 2008 by Sun Microsystems, Inc.
6 * OpenOffice.org - a multi-platform office productivity suite
8 * $RCSfile: code,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
28 ************************************************************************/
30 #include <sfx2/layout.hxx>
32 #include <com/sun/star/awt/PosSize.hpp>
33 #include <toolkit/awt/vclxwindow.hxx>
35 namespace layout
38 using namespace ::com::sun::star;
40 #if 0
41 SfxTabDialog::SfxTabDialog (::Window *parent, char const* xml_file, char const* id, ResId const& res_id, SfxItemSet const* set)
42 : ::SfxTabDialog (parent, res_id, set)
43 , InPlug (parent, xml_file, id)
47 ::Window* SfxTabDialog::GetParent () const
49 return Window::GetParent ();
52 ::Window* SfxTabDialog::GetWindow () const
54 return Window::GetParent ();
57 void SfxTabDialog::FreeResource ()
59 //::Window::FreeResource ();
61 #endif
63 SfxTabPage::SfxTabPage (::Window *parent, char const* xml_file, char const* id, SfxItemSet const* set)
64 : ::SfxTabPage (parent, 0, *set)
65 , InPlug (parent, xml_file, id)
67 dynamic_cast< ::Window* > (this)->SetComponentInterface (GetVCLXWindow ());
70 ::Window* SfxTabPage::GetParent () const
72 return Window::GetParent ();
75 ::Window* SfxTabPage::GetWindow () const
77 return ::layout::Window::GetWindow();
80 void SfxTabPage::FreeResource ()
82 //::Window::FreeResource ();
85 Size SfxTabPage::GetOptimalSize (WindowSizeType) const
87 awt::Size s = GetVCLXWindow()->getMinimumSize ();
88 return Size (s.Width, s.Height);
91 } // end namespace layout