1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifdef SVX_DLLIMPLEMENTATION
25 #undef SVX_DLLIMPLEMENTATION
26 #endif
27 
28 #if TEST_LAYOUT
29 #include <cstdio>
30 #endif /* TEST_LAYOUT */
31 #include <com/sun/star/awt/XDialog2.hpp>
32 #include <tools/shl.hxx>
33 #include <svtools/itemset.hxx>
34 #include <svtools/itempool.hxx>
35 #include <sfx2/objsh.hxx>
36 #include <vcl/msgbox.hxx>
37 #include <toolkit/awt/vclxwindow.hxx>
38 
39 
40 #include <com/sun/star/awt/PosSize.hpp> //redrawAlready
41 
42 using namespace com::sun::star;
43 
44 #define _SVX_RECOVER_CXX
45 
46 #include "recover.hxx"
47 
48 #include <layout/layout-pre.hxx>
49 
50 #if ENABLE_LAYOUT
51 #undef SVX_RES
52 #define SVX_RES(x) #x
53 #undef SfxModalDialog
54 #define SfxModalDialog( parent, id ) Dialog( parent, "recover.xml", id )
55 #endif /* ENABLE_LAYOUT */
56 
57 #if TEST_LAYOUT
SvxRecoverDialog(Window * pParent)58 SvxRecoverDialog::SvxRecoverDialog( Window* pParent )
59 #else /* !TEST_LAYOUT */
60 SvxRecoverDialog::SvxRecoverDialog( Window* pParent, const SfxItemSet& rCoreSet )
61 #endif /* !TEST_LAYOUT */
62 : SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_RECOVER ) )
63 
64     , aHeaderImage( this, SVX_RES( FI_HEADER ) )
65     , aHeaderText( this, SVX_RES( FT_HEADER ) )
66     , aHeaderLine( this, SVX_RES( FL_HEADER ) )
67     , aRecoverText( this, SVX_RES( FT_RECOVER ) )
68     , aTextAdvanced( this, SVX_RES( FT_ADVANCED ) )
69 
70 	, aCheckBoxDoc( this, SVX_RES( CB_DOC ) )
71 	, aImageDoc( this, SVX_RES( FI_DOC ) )
72 	, aTextDoc( this, SVX_RES( FT_DOC ) )
73 
74 	, aCheckBoxSheet( this, SVX_RES( CB_SHEET ) )
75 	, aImageSheet( this, SVX_RES( FI_SHEET ) )
76 	, aTextSheet( this, SVX_RES( FT_SHEET ) )
77 
78 	, aCheckBoxDraw( this, SVX_RES( CB_DRAW ) )
79 	, aImageDraw( this, SVX_RES( FI_DRAW ) )
80 	, aTextDraw( this, SVX_RES( FT_DRAW ) )
81 
82 	, aCheckBoxPresent( this, SVX_RES( CB_PRESENT ) )
83 	, aImagePresent( this, SVX_RES( FI_PRESENT ) )
84 	, aTextPresent( this, SVX_RES( FT_PRESENT ) )
85 
86 	, aButtonAdvanced( this, SVX_RES( PB_ADVANCED ) )
87 
88     , aProgressText( this, SVX_RES( FT_PROGRESS ) )
89     , aProgressBar( this, SVX_RES( PB_RECOVER ) )
90 	, aCheckBoxLogFile( this, SVX_RES( CH_LOGFILE ) )
91     , aOKBtn( this, SVX_RES( BTN_OK ) )
92 	, aCancelBtn( this, SVX_RES( BTN_CANCEL ) )
93 	, aHelpBtn( this, SVX_RES( BTN_HELP ) )
94 {
95     aButtonAdvanced.AddAdvanced( &aTextAdvanced );
96     aButtonAdvanced.AddAdvanced( &aCheckBoxDoc );
97     aButtonAdvanced.AddAdvanced( &aCheckBoxSheet );
98     aButtonAdvanced.AddAdvanced( &aCheckBoxDraw );
99     aButtonAdvanced.AddAdvanced( &aCheckBoxPresent );
100     aButtonAdvanced.AddAdvanced( &aCheckBoxLogFile );
101 }
102 
103 
~SvxRecoverDialog()104 SvxRecoverDialog::~SvxRecoverDialog()
105 {
106 }
107