merged tag ooo/DEV300_m102
[LibreOffice.git] / toolkit / workben / layout / plugin.cxx
blobd20fad8c71b9873b1f8c7f1a06b73f78592aee77
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #define _LAYOUT_PLUGIN_CXX
30 #include "plugin.hxx"
32 #include <com/sun/star/awt/XDialog2.hpp>
33 #include <dialcontrol.hxx>
34 #include <toolkit/awt/vclxwindow.hxx>
36 #include <layout/layout-pre.hxx>
38 using namespace com::sun::star;
40 #define LAYOUT_RES(x) #x
42 #undef ModalDialog
43 #define ModalDialog( parent, id ) Dialog( parent, "plugin.xml", id )
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 ) )
60 aDialControl.SetRotation( 425 );
63 PluginDialog::~PluginDialog()