LibreOffice Module vcl (master) 1
logger.hxx
Go to the documentation of this file.
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
23{
24struct PropertyValue;
25}
26namespace com::sun::star::uno
27{
28template <class E> class Sequence;
29}
30struct EventDescription;
31class Control;
32class KeyEvent;
33
35{
36private:
38
39 bool mbValid;
40
41 OUString app_name;
42
43public:
45
46 void logCommand(std::u16string_view rAction,
47 const css::uno::Sequence<css::beans::PropertyValue>& rArgs);
48
49 void logAction(VclPtr<Control> const& xUIElement, VclEventId nEvent);
50
51 void logAction(vcl::Window* const& xUIWin, VclEventId nEvent);
52
53 void log(std::u16string_view rString);
54
55 void logKeyInput(VclPtr<vcl::Window> const& xUIElement, const KeyEvent& rEvent);
56
57 void logEvent(const EventDescription& rDescription);
58
59 static UITestLogger& getInstance();
60
61 void setAppName(OUString name) { app_name = name; }
62
63 const OUString& getAppName() const { return app_name; }
64};
65
66#endif
67
68/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: ctrl.hxx:80
void setAppName(OUString name)
Definition: logger.hxx:61
bool mbValid
Definition: logger.hxx:39
OUString app_name
Definition: logger.hxx:41
const OUString & getAppName() const
Definition: logger.hxx:63
SvFileStream maStream
Definition: logger.hxx:37
#define UITEST_DLLPUBLIC
Definition: dllapi.h:36
const char * name
log
VclEventId
Definition: vclevent.hxx:38