diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2018-03-12 07:41:02 -0300 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-03-14 09:51:45 +0100 |
commit | 9f72889643afb8596affeb5ba66a564f4368fab9 (patch) | |
tree | dd211d4758eab450ae4f76edcc04270a6599a2f6 /sfx2 | |
parent | bba299d8146a07af6833620784ac5b697b0f7e84 (diff) |
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@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/sfxhelp.cxx | 20 |
1 files changed, 12 insertions, 8 deletions
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",":"); |