[Libreoffice-commits] core.git: helpcompiler/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 22 14:31:41 UTC 2019


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

New commits:
commit 8baf30424fa47138cf5828d80433c13e3f41edb3
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Nov 22 11:24:40 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
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 <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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)
         {


More information about the Libreoffice-commits mailing list