1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #ifndef INCLUDED_HELPCOMPILER_HELPINDEXER_HXX
11 #define INCLUDED_HELPCOMPILER_HELPINDEXER_HXX
13 #include <helpcompiler/dllapi.h>
15 #include <rtl/ustring.hxx>
18 // I assume that TCHAR is defined as wchar_t throughout
32 class L10N_DLLPUBLIC HelpIndexer
{
36 OUString d_captionDir
;
37 OUString d_contentDir
;
40 std::set
<OUString
> d_files
;
45 * @param lang Help files language.
46 * @param module The module of the helpfiles.
47 * @param srcDir The help directory to index
48 * @param outDir The directory to write the "module".idxl directory to
50 HelpIndexer(OUString
const &lang
, OUString
const &module
,
51 OUString
const &srcDir
, OUString
const &outDir
);
55 * @return true if index successfully generated.
57 bool indexDocuments();
60 * Get the error string (empty if no error occurred).
62 OUString
const & getErrorMessage() { return d_error
;}
67 * Scan the caption & contents directories for help files.
72 * Scan for files in the given directory.
74 bool scanForFiles(OUString
const &path
);
77 * Fill the Document with information on the given help file.
79 bool helpDocument(OUString
const & fileName
, lucene::document::Document
*doc
);
82 * Create a reader for the given file, and create an "empty" reader in case the file doesn't exist.
84 static lucene::util::Reader
*helpFileReader(OUString
const & path
);
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */