Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef INCLUDED_SFX2_SOURCE_INC_VERSDLG_HXX
21 : #define INCLUDED_SFX2_SOURCE_INC_VERSDLG_HXX
22 :
23 : #include <sfx2/basedlgs.hxx>
24 : #include <svtools/simptabl.hxx>
25 : #include <svtools/svmedit.hxx>
26 : #include <svtools/svtabbx.hxx>
27 : #include <vcl/button.hxx>
28 : #include <vcl/fixed.hxx>
29 :
30 : class SfxViewFrame;
31 : struct SfxVersionInfo;
32 :
33 0 : class SfxVersionsTabListBox_Impl : public SvSimpleTable
34 : {
35 : public:
36 0 : SfxVersionsTabListBox_Impl(SvSimpleTableContainer& rParent, WinBits nBits)
37 0 : : SvSimpleTable(rParent, nBits)
38 : {
39 0 : }
40 : void setColSizes();
41 : virtual void Resize() SAL_OVERRIDE;
42 : virtual void KeyInput(const KeyEvent& rKeyEvent) SAL_OVERRIDE;
43 : };
44 :
45 : class SfxVersionTableDtor;
46 : class SfxVersionDialog : public SfxModalDialog
47 : {
48 : VclPtr<PushButton> m_pSaveButton;
49 : VclPtr<CheckBox> m_pSaveCheckBox;
50 : VclPtr<SfxVersionsTabListBox_Impl> m_pVersionBox;
51 : VclPtr<PushButton> m_pOpenButton;
52 : VclPtr<PushButton> m_pViewButton;
53 : VclPtr<PushButton> m_pDeleteButton;
54 : VclPtr<PushButton> m_pCompareButton;
55 : VclPtr<PushButton> m_pCmisButton;
56 : SfxViewFrame* pViewFrame;
57 : SfxVersionTableDtor* m_pTable;
58 : bool m_bIsSaveVersionOnClose;
59 :
60 : DECL_LINK(DClickHdl_Impl, void *);
61 : DECL_LINK(SelectHdl_Impl, void *);
62 : DECL_LINK( ButtonHdl_Impl, Button* );
63 : void Init_Impl();
64 : void Open_Impl();
65 :
66 : public:
67 : SfxVersionDialog ( SfxViewFrame* pFrame, bool );
68 : virtual ~SfxVersionDialog ();
69 : virtual void dispose() SAL_OVERRIDE;
70 0 : bool IsSaveVersionOnClose() const { return m_bIsSaveVersionOnClose; }
71 : };
72 :
73 : class SfxViewVersionDialog_Impl : public SfxModalDialog
74 : {
75 : VclPtr<FixedText> m_pDateTimeText;
76 : VclPtr<FixedText> m_pSavedByText;
77 : VclPtr<VclMultiLineEdit> m_pEdit;
78 : VclPtr<OKButton> m_pOKButton;
79 : VclPtr<CancelButton> m_pCancelButton;
80 : VclPtr<CloseButton> m_pCloseButton;
81 : SfxVersionInfo& m_rInfo;
82 :
83 : DECL_LINK(ButtonHdl, Button*);
84 :
85 : public:
86 : SfxViewVersionDialog_Impl(vcl::Window *pParent, SfxVersionInfo& rInfo, bool bEdit);
87 : virtual ~SfxViewVersionDialog_Impl();
88 : virtual void dispose() SAL_OVERRIDE;
89 : };
90 :
91 : class SfxCmisVersionsDialog : public SfxModalDialog
92 : {
93 : VclPtr<SfxVersionsTabListBox_Impl> m_pVersionBox;
94 : VclPtr<PushButton> m_pOpenButton;
95 : VclPtr<PushButton> m_pViewButton;
96 : VclPtr<PushButton> m_pDeleteButton;
97 : VclPtr<PushButton> m_pCompareButton;
98 : SfxViewFrame* pViewFrame;
99 : SfxVersionTableDtor* m_pTable;
100 : bool m_bIsSaveVersionOnClose;
101 :
102 : DECL_LINK(DClickHdl_Impl, void *);
103 : DECL_LINK(SelectHdl_Impl, void *);
104 : DECL_LINK( ButtonHdl_Impl, Button* );
105 : void LoadVersions();
106 :
107 : public:
108 : SfxCmisVersionsDialog ( SfxViewFrame* pFrame, bool );
109 : virtual ~SfxCmisVersionsDialog ();
110 : virtual void dispose() SAL_OVERRIDE;
111 : };
112 :
113 : #endif
114 :
115 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|