summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-11-22 11:24:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-11-22 15:30:37 +0100
commit8baf30424fa47138cf5828d80433c13e3f41edb3 (patch)
treeb1a044829c1926ec371943983ae77d4279379f32
parent52942824ef6486e48fdb5b3b85b210d82f05a901 (diff)
document HelpCompiler::getSourceDocument behaviour
Change-Id: I03348fc3bce4c879644c6b8d12444c8ec58c0c5e Reviewed-on: https://gerrit.libreoffice.org/83469 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--helpcompiler/source/HelpCompiler.cxx10
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)
{