Coverage Report

Created: 2025-12-31 10:39

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/sfx2/source/inc/versdlg.hxx
Line
Count
Source
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 <vcl/weld/TreeView.hxx>
25
#include <vcl/weld/weld.hxx>
26
27
class SfxViewFrame;
28
struct SfxVersionInfo;
29
30
class SfxVersionTableDtor;
31
class SfxVersionDialog final : public SfxDialogController
32
{
33
    SfxViewFrame* m_pViewFrame;
34
    bool m_bIsSaveVersionOnClose;
35
    std::unique_ptr<SfxVersionTableDtor> m_pTable;
36
    std::unique_ptr<weld::Button> m_xSaveButton;
37
    std::unique_ptr<weld::CheckButton> m_xSaveCheckBox;
38
    std::unique_ptr<weld::Button> m_xOpenButton;
39
    std::unique_ptr<weld::Button> m_xViewButton;
40
    std::unique_ptr<weld::Button> m_xDeleteButton;
41
    std::unique_ptr<weld::Button> m_xCompareButton;
42
    std::unique_ptr<weld::Button> m_xCmisButton;
43
    std::unique_ptr<weld::TreeView> m_xVersionBox;
44
45
    DECL_LINK(DClickHdl_Impl, weld::TreeView&, bool);
46
    DECL_LINK(SelectHdl_Impl, weld::TreeView&, void);
47
    DECL_LINK(ButtonHdl_Impl, weld::Button&, void);
48
    DECL_LINK(ToggleHdl_Impl, weld::Toggleable&, void);
49
    void Init_Impl();
50
    void Open_Impl();
51
52
public:
53
    SfxVersionDialog(weld::Window* pParent, SfxViewFrame* pFrame, bool);
54
    virtual ~SfxVersionDialog() override;
55
0
    bool IsSaveVersionOnClose() const { return m_bIsSaveVersionOnClose; }
56
};
57
58
class SfxViewVersionDialog_Impl final : public SfxDialogController
59
{
60
private:
61
    SfxVersionInfo& m_rInfo;
62
63
    std::unique_ptr<weld::Label> m_xDateTimeText;
64
    std::unique_ptr<weld::Label> m_xSavedByText;
65
    std::unique_ptr<weld::TextView> m_xEdit;
66
    std::unique_ptr<weld::Button> m_xOKButton;
67
    std::unique_ptr<weld::Button> m_xCancelButton;
68
    std::unique_ptr<weld::Button> m_xCloseButton;
69
70
    DECL_LINK(ButtonHdl, weld::Button&, void);
71
72
public:
73
    SfxViewVersionDialog_Impl(weld::Window* pParent, SfxVersionInfo& rInfo, bool bEdit);
74
};
75
76
class SfxCmisVersionsDialog final : public SfxDialogController
77
{
78
    SfxViewFrame* m_pViewFrame;
79
    std::unique_ptr<SfxVersionTableDtor> m_pTable;
80
81
    std::unique_ptr<weld::TreeView> m_xVersionBox;
82
83
    void LoadVersions();
84
85
public:
86
    SfxCmisVersionsDialog(weld::Window* pParent, SfxViewFrame* pFrame);
87
    virtual ~SfxCmisVersionsDialog() override;
88
};
89
90
#endif
91
92
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */