[Libreoffice-commits] core.git: 2 commits - helpcontent2 sfx2/source
Olivier Hallot
olivier.hallot at libreoffice.org
Wed Mar 14 08:52:10 UTC 2018
helpcontent2 | 2 +-
sfx2/source/appl/sfxhelp.cxx | 20 ++++++++++++--------
2 files changed, 13 insertions(+), 9 deletions(-)
New commits:
commit 0e7992d7b2e08afe11288aeb7d5444b5394e7079
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
Date: Mon Mar 12 08:34:35 2018 -0300
Updated core
Project: help 770c0c1746b5c0b94dc07d5f1d6c2c04802c8540
tdf#116296 remove produt version from help path
Part two.
Part 1 is in sfx2 module
Remove product version from offline help path but keep
in online help.
Product version is kept for online because a help server can have more
than one helponline version.
Change-Id: I1d4ba12a7d6472defd4210c79349e35ccaf32d8d
Reviewed-on: https://gerrit.libreoffice.org/51126
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Tested-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/helpcontent2 b/helpcontent2
index 05d4e9fb4712..770c0c1746b5 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 05d4e9fb471224b6adbc174ecb7968ffa29d4a56
+Subproject commit 770c0c1746b5c0b94dc07d5f1d6c2c04802c8540
commit 9f72889643afb8596affeb5ba66a564f4368fab9
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
Date: Mon Mar 12 07:41:02 2018 -0300
tdf#116296 remove produt version from help path
Part one.
Part 2 is in helpcontent2 module
Remove product version from offline help path but keep
in online help.
Test for existence of old offline help is done now
checking the presence of the file help/<lang>/err.html
Test for new (html) offline help is done now checking
the existence of the folder help/<lang>/text
Change-Id: I1d00a4eac6746f0ace5a40db56910803a5e0d6f4
Reviewed-on: https://gerrit.libreoffice.org/51127
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index fcf8c320397c..d924f81e4b2e 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -154,7 +154,7 @@ bool impl_checkHelpLocalePath(OUString const & rpPath)
}
/// Check for built-in help
-/// Check if help//lang folder exist
+/// Check if help/<lang>/err.html file exist
bool impl_hasHelpInstalled()
{
if (comphelper::LibreOfficeKit::isActive())
@@ -168,15 +168,19 @@ bool impl_hasHelpInstalled()
aLocaleStr = HelpLocaleString();
}
- OUString helpRootURL = getHelpRootURL() + "/" + aLocaleStr;
+ OUString helpRootURL = getHelpRootURL() + "/" + aLocaleStr + "/err.html";
+ bool bOK = false;
+ osl::DirectoryItem directoryItem;
+ if(osl::DirectoryItem::get(helpRootURL, directoryItem) == osl::FileBase::E_None){
+ bOK=true;
+ }
- bool bOK = impl_checkHelpLocalePath( helpRootURL );
+ SAL_INFO( "sfx.appl", "Checking old help installed " << bOK);
return bOK;
}
-
/// Check for html built-in help
-/// Check if help/productversion/lang folder exist
+/// Check if help/lang/text folder exist. Only html has it.
bool impl_hasHTMLHelpInstalled()
{
if (comphelper::LibreOfficeKit::isActive())
@@ -190,9 +194,9 @@ bool impl_hasHTMLHelpInstalled()
aLocaleStr = HelpLocaleString();
}
- OUString helpRootURL = getHelpRootURL() + "/" + utl::ConfigManager::getProductVersion() + "/" + aLocaleStr;
-
+ OUString helpRootURL = getHelpRootURL() + "/" + aLocaleStr + "/text";
bool bOK = impl_checkHelpLocalePath( helpRootURL );
+ SAL_INFO( "sfx.appl", "Checking new help (html) installed " << bOK);
return bOK;
}
@@ -691,7 +695,7 @@ static bool impl_showOfflineHelp( const OUString& rURL )
OUString aBaseInstallPath = getHelpRootURL();
OUString const aInternal( "vnd.sun.star.help://" );
- OUString aHelpLink( aBaseInstallPath + "/" + utl::ConfigManager::getProductVersion() + "/index.html?" );
+ OUString aHelpLink( aBaseInstallPath + "/index.html?" );
aHelpLink += rURL.copy( aInternal.getLength() );
aHelpLink = aHelpLink.replaceAll("%2F","/").replaceAll("%3A",":");
More information about the Libreoffice-commits
mailing list