[Libreoffice-commits] core.git: helpcompiler/inc helpcompiler/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Jul 27 06:28:58 UTC 2018
helpcompiler/inc/HelpCompiler.hxx | 2 +-
helpcompiler/source/HelpCompiler.cxx | 3 +--
helpcompiler/source/HelpIndexer.cxx | 2 +-
helpcompiler/source/HelpLinker.cxx | 14 +-------------
4 files changed, 4 insertions(+), 17 deletions(-)
New commits:
commit e6d79e896c540c3e758ebc4b730ca71987c2cee6
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jul 26 12:20:59 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jul 27 08:28:27 2018 +0200
loplugin:returnconstant in helpcompiler
and fix scanForFiles to return false on error
Change-Id: I246e906de9985947be421d361340874c94a2102d
Reviewed-on: https://gerrit.libreoffice.org/58085
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/helpcompiler/inc/HelpCompiler.hxx b/helpcompiler/inc/HelpCompiler.hxx
index dbc76764e35b..31ef2c0c2076 100644
--- a/helpcompiler/inc/HelpCompiler.hxx
+++ b/helpcompiler/inc/HelpCompiler.hxx
@@ -218,7 +218,7 @@ public:
bool in_bExtensionMode);
/// @throws HelpProcessingException
/// @throws BasicCodeTagger::TaggerException
- bool compile();
+ void compile();
private:
xmlDocPtr getSourceDocument(const fs::path &filePath);
static void tagBasicCodeExamples(xmlDocPtr doc);
diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx
index 8cfdcecfa539..5abbdc648f41 100644
--- a/helpcompiler/source/HelpCompiler.cxx
+++ b/helpcompiler/source/HelpCompiler.cxx
@@ -439,7 +439,7 @@ void myparser::traverse( xmlNodePtr parentNode )
}
}
-bool HelpCompiler::compile()
+void HelpCompiler::compile()
{
// we now have the jaroutputstream, which will contain the document.
// now determine the document as a dom tree in variable docResolved
@@ -503,7 +503,6 @@ bool HelpCompiler::compile()
}
streamTable.document_module = actMod;
xmlFreeDoc(docResolvedOrg);
- return true;
}
namespace fs
diff --git a/helpcompiler/source/HelpIndexer.cxx b/helpcompiler/source/HelpIndexer.cxx
index 870db09e0faa..d2380c53d3d1 100644
--- a/helpcompiler/source/HelpIndexer.cxx
+++ b/helpcompiler/source/HelpIndexer.cxx
@@ -96,7 +96,7 @@ bool HelpIndexer::scanForFiles(OUString const & path) {
osl::Directory dir(path);
if (osl::FileBase::E_None != dir.open()) {
d_error = "Error reading directory " + path;
- return true;
+ return false;
}
osl::DirectoryItem item;
diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx
index c8801b14a947..da6365fe4b7c 100644
--- a/helpcompiler/source/HelpLinker.cxx
+++ b/helpcompiler/source/HelpLinker.cxx
@@ -347,21 +347,9 @@ void HelpLinker::link()
compactStylesheet, embeddStylesheet, module, lang, bExtensionMode );
HCDBG(std::cerr << "before compile of " << xhpFileName << std::endl);
- bool success = hc.compile();
+ hc.compile();
HCDBG(std::cerr << "after compile of " << xhpFileName << std::endl);
- if (!success && !bExtensionMode)
- {
- std::stringstream aStrStream;
- aStrStream <<
- "\nERROR: compiling help particle '"
- << xhpFileName
- << "' for language '"
- << lang
- << "' failed!";
- throw HelpProcessingException( HelpProcessingErrorClass::General, aStrStream.str() );
- }
-
if (!m_bCreateIndex)
continue;
More information about the Libreoffice-commits
mailing list