Coverage Report

Created: 2025-12-08 09:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/vcl/uitest/logger.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
10
#ifndef INCLUDED_VCL_UITEST_LOGGER_HXX
11
#define INCLUDED_VCL_UITEST_LOGGER_HXX
12
13
#include <sal/config.h>
14
15
#include <string_view>
16
17
#include <vcl/dllapi.h>
18
19
#include <tools/stream.hxx>
20
#include <vcl/vclevent.hxx>
21
22
struct EventDescription;
23
class Control;
24
class KeyEvent;
25
26
class UITEST_DLLPUBLIC UITestLogger
27
{
28
private:
29
    SvFileStream maStream;
30
31
    bool mbValid;
32
33
    OUString app_name;
34
35
public:
36
    UITestLogger();
37
38
    void logAction(VclPtr<Control> const& xUIElement, VclEventId nEvent);
39
40
    void logAction(vcl::Window* const& xUIWin, VclEventId nEvent);
41
42
    void log(std::u16string_view rString);
43
44
    void logKeyInput(VclPtr<vcl::Window> const& xUIElement, const KeyEvent& rEvent);
45
46
    void logEvent(const EventDescription& rDescription);
47
48
    static UITestLogger& getInstance();
49
50
0
    void setAppName(const OUString& name) { app_name = name; }
51
52
0
    const OUString& getAppName() const { return app_name; }
53
};
54
55
#endif
56
57
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */