Kaydet (Commit) e6d79e89 authored tarafından Noel Grandin's avatar Noel Grandin

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: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 1a400fc3
......@@ -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);
......
......@@ -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
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment