update dev300-m58
[ooovba.git] / toolkit / workben / layout / recover.cxx
blobb62ba68c22d7c95b141f946b86e5531f873fb0e0
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: recover.cxx,v $
11 * $Revision: 1.2 $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 #ifdef SVX_DLLIMPLEMENTATION
33 #undef SVX_DLLIMPLEMENTATION
34 #endif
36 #if TEST_LAYOUT
37 #include <cstdio>
38 #endif /* TEST_LAYOUT */
39 #include <com/sun/star/awt/XDialog2.hpp>
40 #include <tools/shl.hxx>
41 #include <svtools/itemset.hxx>
42 #include <svtools/itempool.hxx>
43 #include <sfx2/objsh.hxx>
44 #include <vcl/msgbox.hxx>
45 #include <toolkit/awt/vclxwindow.hxx>
48 #include <com/sun/star/awt/PosSize.hpp> //redrawAlready
50 using namespace com::sun::star;
52 #define _SVX_RECOVER_CXX
54 #include "recover.hxx"
56 #include <layout/layout-pre.hxx>
58 #if ENABLE_LAYOUT
59 #undef SVX_RES
60 #define SVX_RES(x) #x
61 #undef SfxModalDialog
62 #define SfxModalDialog( parent, id ) Dialog( parent, "recover.xml", id )
63 #endif /* ENABLE_LAYOUT */
65 #if TEST_LAYOUT
66 SvxRecoverDialog::SvxRecoverDialog( Window* pParent )
67 #else /* !TEST_LAYOUT */
68 SvxRecoverDialog::SvxRecoverDialog( Window* pParent, const SfxItemSet& rCoreSet )
69 #endif /* !TEST_LAYOUT */
70 : SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_RECOVER ) )
72 , aHeaderImage( this, SVX_RES( FI_HEADER ) )
73 , aHeaderText( this, SVX_RES( FT_HEADER ) )
74 , aHeaderLine( this, SVX_RES( FL_HEADER ) )
75 , aRecoverText( this, SVX_RES( FT_RECOVER ) )
76 , aTextAdvanced( this, SVX_RES( FT_ADVANCED ) )
78 , aCheckBoxDoc( this, SVX_RES( CB_DOC ) )
79 , aImageDoc( this, SVX_RES( FI_DOC ) )
80 , aTextDoc( this, SVX_RES( FT_DOC ) )
82 , aCheckBoxSheet( this, SVX_RES( CB_SHEET ) )
83 , aImageSheet( this, SVX_RES( FI_SHEET ) )
84 , aTextSheet( this, SVX_RES( FT_SHEET ) )
86 , aCheckBoxDraw( this, SVX_RES( CB_DRAW ) )
87 , aImageDraw( this, SVX_RES( FI_DRAW ) )
88 , aTextDraw( this, SVX_RES( FT_DRAW ) )
90 , aCheckBoxPresent( this, SVX_RES( CB_PRESENT ) )
91 , aImagePresent( this, SVX_RES( FI_PRESENT ) )
92 , aTextPresent( this, SVX_RES( FT_PRESENT ) )
94 , aButtonAdvanced( this, SVX_RES( PB_ADVANCED ) )
96 , aProgressText( this, SVX_RES( FT_PROGRESS ) )
97 , aProgressBar( this, SVX_RES( PB_RECOVER ) )
98 , aCheckBoxLogFile( this, SVX_RES( CH_LOGFILE ) )
99 , aOKBtn( this, SVX_RES( BTN_OK ) )
100 , aCancelBtn( this, SVX_RES( BTN_CANCEL ) )
101 , aHelpBtn( this, SVX_RES( BTN_HELP ) )
103 aButtonAdvanced.AddAdvanced( &aTextAdvanced );
104 aButtonAdvanced.AddAdvanced( &aCheckBoxDoc );
105 aButtonAdvanced.AddAdvanced( &aCheckBoxSheet );
106 aButtonAdvanced.AddAdvanced( &aCheckBoxDraw );
107 aButtonAdvanced.AddAdvanced( &aCheckBoxPresent );
108 aButtonAdvanced.AddAdvanced( &aCheckBoxLogFile );
112 SvxRecoverDialog::~SvxRecoverDialog()