summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-05-10 21:21:55 +0200
committerJan Holesovsky <kendy@suse.cz>2011-05-10 21:23:33 +0200
commit159a9850622b983f55062cded5c45c1de18ad92f (patch)
tree5d6bfbae5fe1b7a8dc7d15e0c2ce8dc4650a60d9
parent17a2f9bf7e52afb0094197de14c658de59f77e83 (diff)
wikihelp: Pass the LibreOffice version to help.libreoffice.org.
-rw-r--r--sfx2/source/appl/sfxhelp.cxx9
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.cxx2
2 files changed, 11 insertions, 0 deletions
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 6ab161be9f33..f9dd7cdc814b 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -188,6 +188,15 @@ void AppendConfigToken( String& rURL, sal_Bool bQuestionMark, const rtl::OUStrin
rURL += DEFINE_CONST_UNICODE("&System=");
rURL += SvtHelpOptions().GetSystem();
+ static rtl::OUString aVersion;
+ if ( aVersion.isEmpty() )
+ aVersion = utl::Bootstrap::getProductVersion();
+
+ if ( !aVersion.isEmpty() )
+ {
+ rURL += DEFINE_CONST_UNICODE( "&Version=" );
+ rURL += String( aVersion );
+ }
}
sal_Bool GetHelpAnchor_Impl( const String& _rURL, String& _rAnchor )
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index 7f89f12c4c99..f0ca219e1155 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -697,6 +697,8 @@ bool URLParameter::query()
m_nHitCount = value.toInt32();
else if( parameter.compareToAscii( "Active" ) == 0 )
m_aActive = value;
+ else if( parameter.compareToAscii( "Version" ) == 0 )
+ ; // ignored (but accepted) in the build-in help, useful only for the online help
else
ret = false;
}