LibreOffice Module helpcompiler (master) 1
HelpIndexer.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_HELPCOMPILER_HELPINDEXER_HXX
11#define INCLUDED_HELPCOMPILER_HELPINDEXER_HXX
12
13#include <helpcompiler/dllapi.h>
14
15#include <rtl/ustring.hxx>
16#include <set>
17#include <string_view>
18
19// I assume that TCHAR is defined as wchar_t throughout
20
21namespace lucene
22{
23namespace document
24{
25class Document;
26}
27namespace util
28{
29class Reader;
30}
31}
32
34 private:
35 OUString d_lang;
36 OUString d_module;
37 OUString d_captionDir;
38 OUString d_contentDir;
39 OUString d_indexDir;
40 OUString d_error;
41 std::set<OUString> d_files;
42
43 public:
44
51 HelpIndexer(OUString lang, OUString module,
52 std::u16string_view srcDir, std::u16string_view outDir);
53
58 bool indexDocuments();
59
63 OUString const & getErrorMessage() const { return d_error;}
64
65 private:
66
70 bool scanForFiles();
71
75 bool scanForFiles(OUString const &path);
76
80 void helpDocument(OUString const & fileName, lucene::document::Document *doc) const;
81
85 static lucene::util::Reader *helpFileReader(OUString const & path);
86};
87
88#endif
89
90/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString d_module
Definition: HelpIndexer.hxx:36
OUString d_captionDir
Definition: HelpIndexer.hxx:37
std::set< OUString > d_files
Definition: HelpIndexer.hxx:41
OUString d_contentDir
Definition: HelpIndexer.hxx:38
OUString d_error
Definition: HelpIndexer.hxx:40
OUString d_indexDir
Definition: HelpIndexer.hxx:39
OUString const & getErrorMessage() const
Get the error string (empty if no error occurred).
Definition: HelpIndexer.hxx:63
OUString d_lang
Definition: HelpIndexer.hxx:35
#define L10N_DLLPUBLIC
Definition: dllapi.h:29