1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SFX2_SOURCE_INC_VERSDLG_HXX
21 #define INCLUDED_SFX2_SOURCE_INC_VERSDLG_HXX
23 #include <sfx2/basedlgs.hxx>
24 #include <vcl/weld.hxx>
27 struct SfxVersionInfo
;
29 class SfxVersionTableDtor
;
30 class SfxVersionDialog final
: public SfxDialogController
32 SfxViewFrame
* m_pViewFrame
;
33 bool m_bIsSaveVersionOnClose
;
34 std::unique_ptr
<SfxVersionTableDtor
> m_pTable
;
35 std::unique_ptr
<weld::Button
> m_xSaveButton
;
36 std::unique_ptr
<weld::CheckButton
> m_xSaveCheckBox
;
37 std::unique_ptr
<weld::Button
> m_xOpenButton
;
38 std::unique_ptr
<weld::Button
> m_xViewButton
;
39 std::unique_ptr
<weld::Button
> m_xDeleteButton
;
40 std::unique_ptr
<weld::Button
> m_xCompareButton
;
41 std::unique_ptr
<weld::Button
> m_xCmisButton
;
42 std::unique_ptr
<weld::TreeView
> m_xVersionBox
;
44 DECL_LINK(DClickHdl_Impl
, weld::TreeView
&, bool);
45 DECL_LINK(SelectHdl_Impl
, weld::TreeView
&, void);
46 DECL_LINK(ButtonHdl_Impl
, weld::Button
&, void);
47 DECL_LINK(ToggleHdl_Impl
, weld::Toggleable
&, void);
52 SfxVersionDialog(weld::Window
* pParent
, SfxViewFrame
* pFrame
, bool);
53 virtual ~SfxVersionDialog() override
;
54 bool IsSaveVersionOnClose() const { return m_bIsSaveVersionOnClose
; }
57 class SfxViewVersionDialog_Impl final
: public SfxDialogController
60 SfxVersionInfo
& m_rInfo
;
62 std::unique_ptr
<weld::Label
> m_xDateTimeText
;
63 std::unique_ptr
<weld::Label
> m_xSavedByText
;
64 std::unique_ptr
<weld::TextView
> m_xEdit
;
65 std::unique_ptr
<weld::Button
> m_xOKButton
;
66 std::unique_ptr
<weld::Button
> m_xCancelButton
;
67 std::unique_ptr
<weld::Button
> m_xCloseButton
;
69 DECL_LINK(ButtonHdl
, weld::Button
&, void);
72 SfxViewVersionDialog_Impl(weld::Window
* pParent
, SfxVersionInfo
& rInfo
, bool bEdit
);
75 class SfxCmisVersionsDialog final
: public SfxDialogController
77 SfxViewFrame
* m_pViewFrame
;
78 std::unique_ptr
<SfxVersionTableDtor
> m_pTable
;
80 std::unique_ptr
<weld::TreeView
> m_xVersionBox
;
85 SfxCmisVersionsDialog(weld::Window
* pParent
, SfxViewFrame
* pFrame
);
86 virtual ~SfxCmisVersionsDialog() override
;
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */