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