helpcompiler/source/HelpCompiler.cxx |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 8baf30424fa47138cf5828d80433c13e3f41edb3
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Nov 22 11:24:40 2019 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Fri Nov 22 15:30:37 2019 +0100

    document HelpCompiler::getSourceDocument behaviour
    
    Change-Id: I03348fc3bce4c879644c6b8d12444c8ec58c0c5e
    Reviewed-on: https://gerrit.libreoffice.org/83469
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Caolán McNamara <[email protected]>

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)
         {
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to