summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/sfxhelp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/appl/sfxhelp.cxx')
-rw-r--r--sfx2/source/appl/sfxhelp.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 170c9454dcf3..27624ed15475 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -332,6 +332,8 @@ std::map<OUString, OUString> SfxHelp_Impl::loadHelpStrings( const OUString& rMod
if( pStrm->GetError() == 0 )
{
bool bRead = true;
+ OUString aProductName = utl::ConfigManager::getProductName();
+ OUString aProductVersion = utl::ConfigManager::getProductVersion();
while(bRead)
{
OUString aLine;
@@ -344,6 +346,8 @@ std::map<OUString, OUString> SfxHelp_Impl::loadHelpStrings( const OUString& rMod
if(nIndex != -1)
{
OUString aValue = aLine.copy(nIndex);
+ aValue = aValue.replaceAll("%PRODUCTNAME", aProductName);
+ aValue = aValue.replaceAll("%PRODUCTVERSION", aProductVersion);
aRet.insert( std::pair< OUString, OUString >( aId, aValue ) );
//SAL_WARN("sfx2.appl", "added help string with id: " << aId << " and value: " << aValue);
}
@@ -380,6 +384,9 @@ OUString SfxHelp_Impl::GetHelpText_Impl( const OUString& rCommandURL, const OUSt
OUString SfxHelp_Impl::GetHelpText( const OUString& aCommandURL, const OUString& rModule )
{
+ if(aCommandURL.isEmpty())
+ return OUString();
+
OUString aHelpText = GetHelpText_Impl( aCommandURL, rModule );
if(aHelpText.isEmpty())
aHelpText = GetHelpText_Impl( aCommandURL, "shared" );