workaround segfault in compiler on macos-clang-intel
[LibreOffice.git] / include / vcl / uitest / logger.hxx
blobbc353ad4ea11a5ec7ec59c66375734a83e6c3b84
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #ifndef INCLUDED_VCL_UITEST_LOGGER_HXX
11 #define INCLUDED_VCL_UITEST_LOGGER_HXX
13 #include <sal/config.h>
15 #include <string_view>
17 #include <vcl/dllapi.h>
19 #include <tools/stream.hxx>
20 #include <vcl/vclevent.hxx>
22 namespace com::sun::star::beans
24 struct PropertyValue;
26 namespace com::sun::star::uno
28 template <class E> class Sequence;
30 struct EventDescription;
31 class Control;
32 class KeyEvent;
34 class UITEST_DLLPUBLIC UITestLogger
36 private:
37 SvFileStream maStream;
39 bool mbValid;
41 OUString app_name;
43 public:
44 UITestLogger();
46 void logCommand(std::u16string_view rAction,
47 const css::uno::Sequence<css::beans::PropertyValue>& rArgs);
49 void logAction(VclPtr<Control> const& xUIElement, VclEventId nEvent);
51 void logAction(vcl::Window* const& xUIWin, VclEventId nEvent);
53 void log(std::u16string_view rString);
55 void logKeyInput(VclPtr<vcl::Window> const& xUIElement, const KeyEvent& rEvent);
57 void logEvent(const EventDescription& rDescription);
59 static UITestLogger& getInstance();
61 void setAppName(const OUString& name) { app_name = name; }
63 const OUString& getAppName() const { return app_name; }
66 #endif
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */