xref: /aoo41x/main/toolkit/workben/layout/plugin.cxx (revision cdf0e10c)
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 #define _LAYOUT_PLUGIN_CXX
29 
30 #include "plugin.hxx"
31 
32 #include <com/sun/star/awt/XDialog2.hpp>
33 #include <dialcontrol.hxx>
34 #include <toolkit/awt/vclxwindow.hxx>
35 
36 #include <layout/layout-pre.hxx>
37 
38 using namespace com::sun::star;
39 
40 #define LAYOUT_RES(x) #x
41 
42 #undef ModalDialog
43 #define ModalDialog( parent, id ) Dialog( parent, "plugin.xml", id )
44 
45 PluginDialog::PluginDialog( Window* pParent )
46     : ModalDialog( pParent, LAYOUT_RES( RID_DLG_PLUGIN ) )
47     , aHeaderImage( this, LAYOUT_RES( FI_HEADER ) )
48     , aHeaderText( this, LAYOUT_RES( FT_HEADER ) )
49     , aHeaderLine( this, LAYOUT_RES( FL_HEADER ) )
50     , aPlugin( this, LAYOUT_RES( PL_DIAL ),
51 // FIXME: width=, height=, are not recognized as properties.
52 //               new svx::DialControl( LAYOUT_DIALOG_PARENT, Size( 0, 0 ), 0 ) )
53                new svx::DialControl( LAYOUT_DIALOG_PARENT, Size( 80, 80 ), 0 ) )
54       //, aDialControl( static_cast<svx::DialControl&> ( aPlugin.GetPlugin() ) )
55     , aDialControl( static_cast<svx::DialControl&> ( *aPlugin.mpPlugin ) )
56     , aOKBtn( this, LAYOUT_RES( BTN_OK ) )
57 	, aCancelBtn( this, LAYOUT_RES( BTN_CANCEL ) )
58 	, aHelpBtn( this, LAYOUT_RES( BTN_HELP ) )
59 {
60     aDialControl.SetRotation( 425 );
61 }
62 
63 PluginDialog::~PluginDialog()
64 {
65 }
66