Coverage Report

Created: 2026-04-09 11:41

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/svtools/recorditemwindow.hxx
Line
Count
Source
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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
10
#pragma once
11
12
#include <vcl/InterimItemWindow.hxx>
13
#include <vcl/weld/Entry.hxx>
14
#include <svtools/svtdllapi.h>
15
16
namespace weld
17
{
18
class Widget;
19
}
20
21
class SVT_DLLPUBLIC RecordItemWindowBase
22
{
23
public:
24
    RecordItemWindowBase(std::unique_ptr<weld::Entry> xEntry);
25
    virtual ~RecordItemWindowBase();
26
27
0
    void set_text(const OUString& rText) { m_xWidget->set_text(rText); }
28
0
    void set_help_id(const OUString& rHelpId) { m_xWidget->set_help_id(rHelpId); }
29
30
protected:
31
    std::unique_ptr<weld::Entry> m_xWidget;
32
33
    virtual bool DoKeyInput(const KeyEvent& rEvt);
34
35
private:
36
    virtual void PositionFired(sal_Int64 nRecord);
37
38
    DECL_DLLPRIVATE_LINK(KeyInputHdl, const KeyEvent&, bool);
39
40
    DECL_DLLPRIVATE_LINK(ActivatedHdl, weld::Entry&, bool);
41
    // for invalidating our content when losing the focus
42
    DECL_DLLPRIVATE_LINK(FocusOutHdl, weld::Widget&, void);
43
44
    void FirePosition(bool bForce);
45
};
46
47
class UNLESS_MERGELIBS(SVT_DLLPUBLIC) RecordItemWindow : public InterimItemWindow,
48
                                                         public RecordItemWindowBase
49
{
50
public:
51
    RecordItemWindow(vcl::Window* pParent);
52
    virtual void dispose() override;
53
    virtual ~RecordItemWindow() override;
54
55
protected:
56
    virtual bool DoKeyInput(const KeyEvent& rEvt) override;
57
};
58
59
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */