diff options
-rw-r--r-- | helpcompiler/source/HelpCompiler.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx index 306d2d518067..4407d12c7c03 100644 --- a/helpcompiler/source/HelpCompiler.cxx +++ b/helpcompiler/source/HelpCompiler.cxx @@ -111,18 +111,20 @@ void HelpCompiler::saveXhpForJar( xmlDocPtr doc, const fs::path &filePath ) xmlFreeDoc(compacted); } - xmlDocPtr HelpCompiler::getSourceDocument(const fs::path &filePath) { - static xsltStylesheetPtr cur = nullptr; - xmlDocPtr res; - if( bExtensionMode ) + if (bExtensionMode) { + // this is the mode when used within LibreOffice for importing help + // bundled with an extension res = xmlParseFile(filePath.native_file_string().c_str()); } else { + // this is the mode when used at build time to generate LibreOffice + // help from its xhp source + static xsltStylesheetPtr cur = nullptr; static const char *params[2 + 1]; if (!cur) { |