From c106167f5f6ec1bff9b2291ff8791ca6d4d411c3 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 18 Jan 2013 22:14:57 +0100 Subject: PRODUCTEXTENSION: fix various obvious strings and such... ... to look pretty; most of these expect PRODUCTEXTENSION to be a word like "Beta" but nowadays it is ".micro.rc.alphabeta" numbers so there should be no space before it. ReplaceStringHookProc adds insult to injury by refusing to replace %ABOUTBOX variables unless some %PRODUCT is in the string. Change-Id: Ib676f3837ab0785529a226fc9359e8defacf3459 --- cui/source/dialogs/about.src | 2 +- desktop/source/app/app.cxx | 2 +- desktop/source/app/cmdlinehelp.cxx | 2 +- framework/source/fwe/helper/titlehelper.cxx | 15 +++------------ sfx2/source/bastyp/bastyp.src | 2 +- svx/source/dialog/linkwarn.src | 2 +- svx/source/src/app.src | 2 +- unotools/source/config/docinfohelper.cxx | 1 - 8 files changed, 9 insertions(+), 19 deletions(-) diff --git a/cui/source/dialogs/about.src b/cui/source/dialogs/about.src index defcf907182c..8daf7839abd7 100644 --- a/cui/source/dialogs/about.src +++ b/cui/source/dialogs/about.src @@ -63,7 +63,7 @@ ModalDialog RID_DEFAULTABOUT }; String ABOUT_STR_VERSION { - Text [ en-US ] = "Version %ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX %PRODUCTEXTENSION"; + Text [ en-US ] = "Version %ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX"; }; String ABOUT_STR_DESCRIPTION { diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 96010c91bf9d..e38491263b38 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -477,7 +477,7 @@ rtl::OUString ReplaceStringHookProc( const rtl::OUString& rStr ) { rtl::OUString sRet(rStr); - if ( sRet.indexOf( "%PRODUCT" ) != -1 ) + if (sRet.indexOf("%PRODUCT") != -1 || sRet.indexOf("%ABOUTBOX") != -1) { rtl::OUString sBrandName = BrandName::get(); rtl::OUString sVersion = Version::get(); diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx index 8ed32f72c63f..73d56133c6ab 100644 --- a/desktop/source/app/cmdlinehelp.cxx +++ b/desktop/source/app/cmdlinehelp.cxx @@ -45,7 +45,7 @@ namespace desktop // [OK] const char aCmdLineHelp_version[] = - "%PRODUCTNAME %PRODUCTVERSION %PRODUCTEXTENSION\n"\ + "%PRODUCTNAME %PRODUCTVERSION%PRODUCTEXTENSION\n"\ "\n"; const char aCmdLineHelp_head[] = "Usage: %CMDNAME [options] [documents...]\n"\ diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx index ff647422ae65..ec2ae43c84ca 100644 --- a/framework/source/fwe/helper/titlehelper.cxx +++ b/framework/source/fwe/helper/titlehelper.cxx @@ -490,7 +490,6 @@ void TitleHelper::impl_updateTitleForFrame (const css::uno::Reference< css::fram impl_appendComponentTitle (sTitle, xComponent); impl_appendProductName (sTitle); impl_appendModuleName (sTitle); - impl_appendProductExtension (sTitle); impl_appendDebugVersion (sTitle); // SYNCHRONIZED -> @@ -530,17 +529,6 @@ void TitleHelper::impl_appendProductName (::rtl::OUStringBuffer& sTitle) } } -//***************************************************************************************************************** -void TitleHelper::impl_appendProductExtension (::rtl::OUStringBuffer& sTitle) -{ - rtl::OUString ext(utl::ConfigManager::getProductExtension()); - if (!ext.isEmpty()) - { - sTitle.append(' '); - sTitle.append(ext); - } -} - //***************************************************************************************************************** void TitleHelper::impl_appendModuleName (::rtl::OUStringBuffer& sTitle) { @@ -578,6 +566,9 @@ void TitleHelper::impl_appendModuleName (::rtl::OUStringBuffer& sTitle) #ifdef DBG_UTIL void TitleHelper::impl_appendDebugVersion (::rtl::OUStringBuffer& sTitle) { + rtl::OUString version(utl::ConfigManager::getProductVersion()); + sTitle.append(' '); + sTitle.append(version); ::rtl::OUString sDefault(RTL_CONSTASCII_USTRINGPARAM("development")); ::rtl::OUString sVersion = ::utl::Bootstrap::getBuildIdData(sDefault); sTitle.appendAscii(RTL_CONSTASCII_STRINGPARAM(" [")); diff --git a/sfx2/source/bastyp/bastyp.src b/sfx2/source/bastyp/bastyp.src index 1d31cc8fbda1..6ade628a3b08 100644 --- a/sfx2/source/bastyp/bastyp.src +++ b/sfx2/source/bastyp/bastyp.src @@ -19,5 +19,5 @@ String STR_HTML_GENERATOR { - Text = "%PRODUCTNAME %PRODUCTVERSION %PRODUCTEXTENSION (%1)" ; + Text = "%PRODUCTNAME %PRODUCTVERSION%PRODUCTEXTENSION (%1)" ; }; diff --git a/svx/source/dialog/linkwarn.src b/svx/source/dialog/linkwarn.src index 56e0538e6d8b..dd8eb5489522 100644 --- a/svx/source/dialog/linkwarn.src +++ b/svx/source/dialog/linkwarn.src @@ -28,7 +28,7 @@ ModalDialog RID_SVXDLG_LINK_WARNING Moveable = TRUE; SVLook = TRUE; - Text = "%PRODUCTNAME %PRODUCTVERSION %PRODUCTEXTENSION"; + Text = "%PRODUCTNAME %PRODUCTVERSION%PRODUCTEXTENSION"; FixedImage FI_QUERY { diff --git a/svx/source/src/app.src b/svx/source/src/app.src index 6591eb12ce66..3b614823dd55 100644 --- a/svx/source/src/app.src +++ b/svx/source/src/app.src @@ -22,7 +22,7 @@ //---------------------------------------------------------------------------- String RID_APPTITLE { - Text = "%PRODUCTNAME %PRODUCTVERSION %PRODUCTEXTENSION" ; + Text = "%PRODUCTNAME %PRODUCTVERSION%PRODUCTEXTENSION" ; }; #define MASKCOLOR MaskColor = Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; }; diff --git a/unotools/source/config/docinfohelper.cxx b/unotools/source/config/docinfohelper.cxx index e2b0e83ad09d..91c9569c1b4c 100644 --- a/unotools/source/config/docinfohelper.cxx +++ b/unotools/source/config/docinfohelper.cxx @@ -50,7 +50,6 @@ namespace utl aValue = utl::ConfigManager::getProductExtension(); if ( !aValue.isEmpty() ) { - aResult.append( (sal_Unicode)'_' ); aResult.append( aValue.replace( ' ', '_' ) ); } } -- cgit