Avoid potential negative array index access to cached text.
[LibreOffice.git] / writerperfect / qa / unit / WpftFilterFixture.hxx
blob2fdd6a2f858e2705f30b503819beed719f0b30a2
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 #pragma once
12 #include <config_writerperfect.h>
14 #include "wpftqahelperdllapi.h"
16 #include <com/sun/star/uno/Reference.hxx>
17 #include <com/sun/star/uno/Sequence.hxx>
19 #include <rtl/ustring.hxx>
21 #include <test/bootstrapfixture.hxx>
23 #define REQUIRE_VERSION(major, minor, micro, req_major, req_minor, req_micro) \
24 (major) > (req_major) \
25 || ((major) == (req_major) \
26 && ((minor) > (req_minor) || ((minor) == (req_minor) && ((micro) >= (req_micro)))))
28 #define REQUIRE_EBOOK_VERSION(major, minor, micro) \
29 REQUIRE_VERSION(EBOOK_VERSION_MAJOR, EBOOK_VERSION_MINOR, EBOOK_VERSION_MICRO, major, minor, \
30 micro)
32 #define REQUIRE_ETONYEK_VERSION(major, minor, micro) \
33 REQUIRE_VERSION(ETONYEK_VERSION_MAJOR, ETONYEK_VERSION_MINOR, ETONYEK_VERSION_MICRO, major, \
34 minor, micro)
36 #define REQUIRE_MWAW_VERSION(major, minor, micro) \
37 REQUIRE_VERSION(MWAW_VERSION_MAJOR, MWAW_VERSION_MINOR, MWAW_VERSION_MICRO, major, minor, micro)
39 #define REQUIRE_STAROFFICE_VERSION(major, minor, micro) \
40 REQUIRE_VERSION(STAROFFICE_VERSION_MAJOR, STAROFFICE_VERSION_MINOR, STAROFFICE_VERSION_MICRO, \
41 major, minor, micro)
43 #define REQUIRE_WPS_VERSION(major, minor, micro) \
44 REQUIRE_VERSION(WPS_VERSION_MAJOR, WPS_VERSION_MINOR, WPS_VERSION_MICRO, major, minor, micro)
46 namespace com
48 namespace sun
50 namespace star
52 namespace container
54 class XNameAccess;
56 namespace document
58 class XTypeDetection;
60 namespace frame
62 class XDesktop2;
68 namespace writerperfect
70 namespace test
72 class WPFTQAHELPER_DLLPUBLIC WpftFilterFixture : public ::test::BootstrapFixture
74 public:
75 virtual void setUp() override;
77 protected:
78 css::uno::Reference<css::frame::XDesktop2> m_xDesktop;
79 css::uno::Reference<css::document::XTypeDetection> m_xTypeDetection;
80 css::uno::Reference<css::container::XNameAccess> m_xTypeMap;
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */