merge the formfield patch from ooo-build
[ooovba.git] / toolkit / workben / layout / plugin.cxx
blob28dafc2bba78698a0473dd086afa656a7cc2d765
1 /*************************************************************************
3 * OpenOffice.org - a multi-platform office productivity suite
5 * $RCSfile$
7 * $Revision$
9 * last change: $Author$ $Date$
11 * The Contents of this file are made available subject to
12 * the terms of GNU Lesser General Public License Version 2.1.
15 * GNU Lesser General Public License Version 2.1
16 * =============================================
17 * Copyright 2005 by Sun Microsystems, Inc.
18 * 901 San Antonio Road, Palo Alto, CA 94303, USA
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License version 2.1, as published by the Free Software Foundation.
24 * This library is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 * Lesser General Public License for more details.
29 * You should have received a copy of the GNU Lesser General Public
30 * License along with this library; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32 * MA 02111-1307 USA
34 ************************************************************************/
36 #define _LAYOUT_PLUGIN_CXX
38 #include "plugin.hxx"
40 #include <com/sun/star/awt/XDialog2.hpp>
41 #include <dialcontrol.hxx>
42 #include <toolkit/awt/vclxwindow.hxx>
44 #include <layout/layout-pre.hxx>
46 using namespace com::sun::star;
48 #define LAYOUT_RES(x) #x
50 #undef ModalDialog
51 #define ModalDialog( parent, id ) Dialog( parent, "plugin.xml", id )
53 PluginDialog::PluginDialog( Window* pParent )
54 : ModalDialog( pParent, LAYOUT_RES( RID_DLG_PLUGIN ) )
55 , aHeaderImage( this, LAYOUT_RES( FI_HEADER ) )
56 , aHeaderText( this, LAYOUT_RES( FT_HEADER ) )
57 , aHeaderLine( this, LAYOUT_RES( FL_HEADER ) )
58 , aPlugin( this, LAYOUT_RES( PL_DIAL ),
59 // FIXME: width=, height=, are not recognized as properties.
60 // new svx::DialControl( LAYOUT_DIALOG_PARENT, Size( 0, 0 ), 0 ) )
61 new svx::DialControl( LAYOUT_DIALOG_PARENT, Size( 80, 80 ), 0 ) )
62 //, aDialControl( static_cast<svx::DialControl&> ( aPlugin.GetPlugin() ) )
63 , aDialControl( static_cast<svx::DialControl&> ( *aPlugin.mpPlugin ) )
64 , aOKBtn( this, LAYOUT_RES( BTN_OK ) )
65 , aCancelBtn( this, LAYOUT_RES( BTN_CANCEL ) )
66 , aHelpBtn( this, LAYOUT_RES( BTN_HELP ) )
68 aDialControl.SetRotation( 425 );
71 PluginDialog::~PluginDialog()