xref: /AOO41X/main/toolkit/workben/layout/recover.cxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
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 #ifdef SVX_DLLIMPLEMENTATION
29 #undef SVX_DLLIMPLEMENTATION
30 #endif
31 
32 #if TEST_LAYOUT
33 #include <cstdio>
34 #endif /* TEST_LAYOUT */
35 #include <com/sun/star/awt/XDialog2.hpp>
36 #include <tools/shl.hxx>
37 #include <svtools/itemset.hxx>
38 #include <svtools/itempool.hxx>
39 #include <sfx2/objsh.hxx>
40 #include <vcl/msgbox.hxx>
41 #include <toolkit/awt/vclxwindow.hxx>
42 
43 
44 #include <com/sun/star/awt/PosSize.hpp> //redrawAlready
45 
46 using namespace com::sun::star;
47 
48 #define _SVX_RECOVER_CXX
49 
50 #include "recover.hxx"
51 
52 #include <layout/layout-pre.hxx>
53 
54 #if ENABLE_LAYOUT
55 #undef SVX_RES
56 #define SVX_RES(x) #x
57 #undef SfxModalDialog
58 #define SfxModalDialog( parent, id ) Dialog( parent, "recover.xml", id )
59 #endif /* ENABLE_LAYOUT */
60 
61 #if TEST_LAYOUT
62 SvxRecoverDialog::SvxRecoverDialog( Window* pParent )
63 #else /* !TEST_LAYOUT */
64 SvxRecoverDialog::SvxRecoverDialog( Window* pParent, const SfxItemSet& rCoreSet )
65 #endif /* !TEST_LAYOUT */
66 : SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_RECOVER ) )
67 
68     , aHeaderImage( this, SVX_RES( FI_HEADER ) )
69     , aHeaderText( this, SVX_RES( FT_HEADER ) )
70     , aHeaderLine( this, SVX_RES( FL_HEADER ) )
71     , aRecoverText( this, SVX_RES( FT_RECOVER ) )
72     , aTextAdvanced( this, SVX_RES( FT_ADVANCED ) )
73 
74 	, aCheckBoxDoc( this, SVX_RES( CB_DOC ) )
75 	, aImageDoc( this, SVX_RES( FI_DOC ) )
76 	, aTextDoc( this, SVX_RES( FT_DOC ) )
77 
78 	, aCheckBoxSheet( this, SVX_RES( CB_SHEET ) )
79 	, aImageSheet( this, SVX_RES( FI_SHEET ) )
80 	, aTextSheet( this, SVX_RES( FT_SHEET ) )
81 
82 	, aCheckBoxDraw( this, SVX_RES( CB_DRAW ) )
83 	, aImageDraw( this, SVX_RES( FI_DRAW ) )
84 	, aTextDraw( this, SVX_RES( FT_DRAW ) )
85 
86 	, aCheckBoxPresent( this, SVX_RES( CB_PRESENT ) )
87 	, aImagePresent( this, SVX_RES( FI_PRESENT ) )
88 	, aTextPresent( this, SVX_RES( FT_PRESENT ) )
89 
90 	, aButtonAdvanced( this, SVX_RES( PB_ADVANCED ) )
91 
92     , aProgressText( this, SVX_RES( FT_PROGRESS ) )
93     , aProgressBar( this, SVX_RES( PB_RECOVER ) )
94 	, aCheckBoxLogFile( this, SVX_RES( CH_LOGFILE ) )
95     , aOKBtn( this, SVX_RES( BTN_OK ) )
96 	, aCancelBtn( this, SVX_RES( BTN_CANCEL ) )
97 	, aHelpBtn( this, SVX_RES( BTN_HELP ) )
98 {
99     aButtonAdvanced.AddAdvanced( &aTextAdvanced );
100     aButtonAdvanced.AddAdvanced( &aCheckBoxDoc );
101     aButtonAdvanced.AddAdvanced( &aCheckBoxSheet );
102     aButtonAdvanced.AddAdvanced( &aCheckBoxDraw );
103     aButtonAdvanced.AddAdvanced( &aCheckBoxPresent );
104     aButtonAdvanced.AddAdvanced( &aCheckBoxLogFile );
105 }
106 
107 
108 SvxRecoverDialog::~SvxRecoverDialog()
109 {
110 }
111