xref: /trunk/main/sfx2/source/inc/versdlg.hxx (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 #ifndef _VERSDLG_HXX
29 #define _VERSDLG_HXX
30 
31 // #include *****************************************************************
32 
33 #ifndef _SV_BUTTON_HXX //autogen
34 #include <vcl/button.hxx>
35 #endif
36 #include <vcl/fixed.hxx>
37 #ifndef _SVTREEBOX_HXX //autogen
38 #include <svtools/svtabbx.hxx>
39 #endif
40 #include <svtools/svmedit.hxx>
41 #include <sfx2/basedlgs.hxx>
42 
43 class SfxObjectShell;
44 class SfxViewFrame;
45 struct SfxVersionInfo;
46 
47 class SfxVersionsTabListBox_Impl  : public SvTabListBox
48 {
49     virtual void                KeyInput( const KeyEvent& rKeyEvent );
50 
51 public:
52                                 SfxVersionsTabListBox_Impl(
53                                     Window* pParent, const ResId& );
54 };
55 
56 class SfxVersionTableDtor;
57 class SfxVersionDialog : public SfxModalDialog
58 {
59     FixedLine                   aNewGroup;
60     PushButton                  aSaveButton;
61     CheckBox                    aSaveCheckBox;
62     FixedLine                   aExistingGroup;
63     FixedText                   aDateTimeText;
64     FixedText                   aSavedByText;
65     FixedText                   aCommentText;
66     SfxVersionsTabListBox_Impl  aVersionBox;
67     CancelButton                aCloseButton;
68     PushButton                  aOpenButton;
69     PushButton                  aViewButton;
70     PushButton                  aDeleteButton;
71     PushButton                  aCompareButton;
72     HelpButton                  aHelpButton;
73     SfxViewFrame*               pViewFrame;
74     SfxVersionTableDtor*        mpTable;
75     LocaleDataWrapper*          mpLocaleWrapper;
76     sal_Bool                    mbIsSaveVersionOnClose;
77 
78     DECL_LINK(                  DClickHdl_Impl, Control* );
79     DECL_LINK(                  SelectHdl_Impl, Control* );
80     DECL_LINK(                  ButtonHdl_Impl, Button* );
81     void                        Init_Impl();
82     void                        Open_Impl();
83     void                        RecalcDateColumn();
84 
85 public:
86                                 SfxVersionDialog ( SfxViewFrame* pFrame, sal_Bool );
87     virtual                     ~SfxVersionDialog ();
88     sal_Bool                    IsSaveVersionOnClose() const { return mbIsSaveVersionOnClose; }
89 };
90 
91 class SfxViewVersionDialog_Impl : public SfxModalDialog
92 {
93     FixedText                   aDateTimeText;
94     FixedText                   aSavedByText;
95     MultiLineEdit               aEdit;
96     OKButton                    aOKButton;
97     CancelButton                aCancelButton;
98     PushButton                  aCloseButton;
99     HelpButton                  aHelpButton;
100     SfxVersionInfo*             pInfo;
101 
102     DECL_LINK(                  ButtonHdl, Button* );
103 
104 public:
105                                 SfxViewVersionDialog_Impl( Window *pParent,
106                                     SfxVersionInfo& rInfo, sal_Bool bEdit );
107  };
108 
109 #endif
110