Coverage Report

Created: 2026-09-28 10:59

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