[Libreoffice-commits] core.git: helpcompiler/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 30 07:33:00 UTC 2019
helpcompiler/source/HelpIndexer.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit ba2ef4a37f7e182fa6cecbfc9c47937c8e56e639
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sun Dec 29 23:33:49 2019 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Dec 30 08:32:26 2019 +0100
Avoid -Werror,-Wdeprecated-enum-enum-conversion
...with recent Clang 10 trunk:
> helpcompiler/source/HelpIndexer.cxx:119:71: error: bitwise operation between different enumeration types ('lucene::document::Field::Store' and 'lucene::document::Field::Index') is deprecated [-Werror,-Wdeprecated-enum-enum-conversion]
> doc->add(*_CLNEW Field(_T("path"), aPath.data(), Field::STORE_YES | Field::INDEX_UNTOKENIZED));
> ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
where the Field constructor in
workdir/UnpackedTarball/clucene/src/core/CLucene/document/Field.h has an "int
_config" parameter that is apparently intended to take a mix of Store (bit
values 1, 2, 4) and Index (bit values 16, 32, 64, 128) flags.
Change-Id: Ie080e44bf820cb776bc61ac22cf73f5437d8c5dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85972
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/helpcompiler/source/HelpIndexer.cxx b/helpcompiler/source/HelpIndexer.cxx
index 198824d3b92f..dca372ea3700 100644
--- a/helpcompiler/source/HelpIndexer.cxx
+++ b/helpcompiler/source/HelpIndexer.cxx
@@ -116,7 +116,7 @@ void HelpIndexer::helpDocument(OUString const & fileName, Document *doc) const {
OUString path = "#HLP#" + d_module + "/" + fileName;
std::vector<TCHAR> aPath(OUStringToTCHARVec(path));
- doc->add(*_CLNEW Field(_T("path"), aPath.data(), Field::STORE_YES | Field::INDEX_UNTOKENIZED));
+ doc->add(*_CLNEW Field(_T("path"), aPath.data(), int(Field::STORE_YES) | int(Field::INDEX_UNTOKENIZED)));
OUString sEscapedFileName =
rtl::Uri::encode(fileName,
@@ -124,11 +124,11 @@ void HelpIndexer::helpDocument(OUString const & fileName, Document *doc) const {
// Add the caption as a field.
OUString captionPath = d_captionDir + "/" + sEscapedFileName;
- doc->add(*_CLNEW Field(_T("caption"), helpFileReader(captionPath), Field::STORE_NO | Field::INDEX_TOKENIZED));
+ doc->add(*_CLNEW Field(_T("caption"), helpFileReader(captionPath), int(Field::STORE_NO) | int(Field::INDEX_TOKENIZED)));
// Add the content as a field.
OUString contentPath = d_contentDir + "/" + sEscapedFileName;
- doc->add(*_CLNEW Field(_T("content"), helpFileReader(contentPath), Field::STORE_NO | Field::INDEX_TOKENIZED));
+ doc->add(*_CLNEW Field(_T("content"), helpFileReader(contentPath), int(Field::STORE_NO) | int(Field::INDEX_TOKENIZED)));
}
lucene::util::Reader *HelpIndexer::helpFileReader(OUString const & path) {
More information about the Libreoffice-commits
mailing list