bump product version to 4.2.0.1
[LibreOffice.git] / include / unotest / filters-test.hxx
blob64e368c85a0561f06f90632d5133a31e2ba7b697
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 #include <comphelper/documentconstants.hxx>
11 #include <rtl/ustring.hxx>
12 #include <unotest/detail/unotestdllapi.hxx>
14 namespace test {
16 enum filterStatus
18 fail = 0,
19 pass = 1,
20 indeterminate = 2
24 * NOTE, any files beginning with CVE-, BID- or EDB- will be assumed to be
25 * encrypted using arcfour with key 0x435645, this is to silence panicky
26 * virus/malware-checkers
28 * e.g. m[de]crypt --bare -a arcfour -o hex -k 435645 -s 3
30 /* Implementation of Filters test */
31 class OOO_DLLPUBLIC_UNOTEST FiltersTest
33 public:
34 void testDir(
35 //filter name
36 const OUString &rFilter,
37 //root dir of test files, must contain pass, fail, indeterminate
38 const OUString &rURL,
39 //additional filter data for SfxFilter
40 const OUString &rUserData = OUString(),
41 //SfxFilterFlags for SfxFilter
42 unsigned int nFilterFlags = SFX_FILTER_IMPORT,
43 //Clipboard id for SfxFilter
44 unsigned int nClipboardID = 0,
45 //additional filter version for SfxFilter
46 unsigned int nFilterVersion = 0);
48 virtual bool load(
49 const OUString &rFilter,
50 const OUString &rURL,
51 const OUString &rUserData,
52 unsigned int nFilterFlags,
53 unsigned int nClipboardID,
54 unsigned int nFilterVersion) = 0;
56 protected:
57 ~FiltersTest() {}
59 void recursiveScan(
60 filterStatus nExpected,
61 const OUString &rFilter,
62 const OUString &rURL,
63 const OUString &rUserData,
64 unsigned int nFilterFlags,
65 unsigned int nClipboardID,
66 unsigned int nFilterVersion);
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */