[Libreoffice-commits] .: Branch 'libreoffice-3-5' - cui/source desktop/source instsetoo_native/util officecfg/registry solenv/bin unotools/inc unotools/source

Petr Mladek pmladek at kemper.freedesktop.org
Fri Dec 16 05:12:58 PST 2011


 cui/source/dialogs/about.src                       |    2 +-
 desktop/source/app/app.cxx                         |    5 +++++
 desktop/source/deployment/gui/dp_gui_service.cxx   |    5 +++++
 instsetoo_native/util/openoffice.lst               |    5 +++++
 officecfg/registry/data/org/openoffice/Setup.xcu   |    3 +++
 officecfg/registry/schema/org/openoffice/Setup.xcs |    7 +++++++
 solenv/bin/modules/installer/download.pm           |    1 +
 unotools/inc/unotools/configmgr.hxx                |    2 ++
 unotools/source/config/configmgr.cxx               |    7 +++++++
 9 files changed, 36 insertions(+), 1 deletion(-)

New commits:
commit 8c7ca43f690b12043d78a698f622eb565f305782
Author: Petr Mladek <pmladek at suse.cz>
Date:   Fri Dec 16 14:08:38 2011 +0100

    add version suffix (beta1) to about dialog
    
    configurable at build time via ABOUTBOXPRODUCTVERSIONSUFFIX in
    instsetoo_native/util/openoffice.lst
    
    configurable at runtime via registry/data/org/openoffice/Setup.xcu
    and ooSetupVersionAboutBoxSuffix property

diff --git a/cui/source/dialogs/about.src b/cui/source/dialogs/about.src
index 8ee4862..86f3811 100644
--- a/cui/source/dialogs/about.src
+++ b/cui/source/dialogs/about.src
@@ -70,7 +70,7 @@ ModalDialog RID_DEFAULTABOUT
     };
     String ABOUT_STR_VERSION
     {
-        Text[ en-US ] = "%PRODUCTNAME %ABOUTBOXPRODUCTVERSION %PRODUCTEXTENSION";
+        Text[ en-US ] = "%PRODUCTNAME %ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX %PRODUCTEXTENSION";
     };
     String ABOUT_STR_VENDOR
     {
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 9e9f656..ada6c82 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -330,6 +330,8 @@ namespace
         : public rtl::Static< String, Version > {};
     struct AboutBoxVersion
         : public rtl::Static< String, AboutBoxVersion > {};
+    struct AboutBoxVersionSuffix
+        : public rtl::Static< String, AboutBoxVersionSuffix > {};
     struct OOOVendor
         : public rtl::Static< String, OOOVendor > {};
     struct Extension
@@ -352,6 +354,7 @@ void ReplaceStringHookProc( UniString& rStr )
         String rBrandName = BrandName::get();
         String rVersion = Version::get();
         String rAboutBoxVersion = AboutBoxVersion::get();
+        String rAboutBoxVersionSuffix = AboutBoxVersionSuffix::get();
         String rExtension = Extension::get();
         String rXMLFileFormatName = XMLFileFormatName::get();
         String rXMLFileFormatVersion = XMLFileFormatVersion::get();
@@ -364,6 +367,7 @@ void ReplaceStringHookProc( UniString& rStr )
                 utl::ConfigManager::getProductXmlFileFormatVersion();
             rVersion = utl::ConfigManager::getProductVersion();
             rAboutBoxVersion = utl::ConfigManager::getAboutBoxProductVersion();
+            rAboutBoxVersionSuffix = utl::ConfigManager::getAboutBoxProductVersionSuffix();
             if ( !rExtension.Len() )
             {
                 rExtension = utl::ConfigManager::getProductExtension();
@@ -373,6 +377,7 @@ void ReplaceStringHookProc( UniString& rStr )
         nPro++;
         rStr.SearchAndReplaceAllAscii( "%PRODUCTNAME", rBrandName );
         rStr.SearchAndReplaceAllAscii( "%PRODUCTVERSION", rVersion );
+        rStr.SearchAndReplaceAllAscii( "%ABOUTBOXPRODUCTVERSIONSUFFIX", rAboutBoxVersionSuffix );
         rStr.SearchAndReplaceAllAscii( "%ABOUTBOXPRODUCTVERSION", rAboutBoxVersion );
         rStr.SearchAndReplaceAllAscii( "%PRODUCTEXTENSION", rExtension );
         rStr.SearchAndReplaceAllAscii( "%PRODUCTXMLFILEFORMATNAME", rXMLFileFormatName );
diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx
index 8108e74..1e98df4 100644
--- a/desktop/source/deployment/gui/dp_gui_service.cxx
+++ b/desktop/source/deployment/gui/dp_gui_service.cxx
@@ -92,6 +92,8 @@ namespace
         : public rtl::Static< String, Version > {};
     struct AboutBoxVersion
         : public rtl::Static< String, AboutBoxVersion > {};
+    struct AboutBoxVersionSuffix
+        : public rtl::Static< String, AboutBoxVersionSuffix > {};
     struct OOOVendor
         : public rtl::Static< String, OOOVendor > {};
     struct Extension
@@ -108,6 +110,7 @@ void ReplaceProductNameHookProc( String& rStr )
         String rProductName = ProductName::get();
         String rVersion = Version::get();
         String rAboutBoxVersion = AboutBoxVersion::get();
+        String rAboutBoxVersionSuffix = AboutBoxVersionSuffix::get();
         String rExtension = Extension::get();
         String rOOOVendor = OOOVendor::get();
 
@@ -116,6 +119,7 @@ void ReplaceProductNameHookProc( String& rStr )
             rProductName = utl::ConfigManager::getProductName();
             rVersion = utl::ConfigManager::getProductVersion();
             rAboutBoxVersion = utl::ConfigManager::getAboutBoxProductVersion();
+            rAboutBoxVersionSuffix = utl::ConfigManager::getAboutBoxProductVersionSuffix();
             rOOOVendor = utl::ConfigManager::getVendor();
             if ( !rExtension.Len() )
             {
@@ -126,6 +130,7 @@ void ReplaceProductNameHookProc( String& rStr )
         nPro++;
         rStr.SearchAndReplaceAllAscii( "%PRODUCTNAME", rProductName );
         rStr.SearchAndReplaceAllAscii( "%PRODUCTVERSION", rVersion );
+        rStr.SearchAndReplaceAllAscii( "%ABOUTBOXPRODUCTVERSIONSUFFIX", rAboutBoxVersionSuffix );
         rStr.SearchAndReplaceAllAscii( "%ABOUTBOXPRODUCTVERSION", rAboutBoxVersion );
         rStr.SearchAndReplaceAllAscii( "%OOOVENDOR", rOOOVendor );
         rStr.SearchAndReplaceAllAscii( "%PRODUCTEXTENSION", rExtension );
diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst
index 3a7ab86..0b79557 100644
--- a/instsetoo_native/util/openoffice.lst
+++ b/instsetoo_native/util/openoffice.lst
@@ -59,6 +59,7 @@ LibreOffice
 			BRANDPACKAGEVERSION 3.5
 			USERDIRPRODUCTVERSION 3
 			ABOUTBOXPRODUCTVERSION 3.5.0
+			ABOUTBOXPRODUCTVERSIONSUFFIX beta1+
 			BASEPRODUCTVERSION 3.5
             PCPFILENAME libreoffice.pcp
 			UPDATEURL http://update.libreoffice.org/check.php
@@ -117,6 +118,7 @@ LibreOffice_wJRE
 			BRANDPACKAGEVERSION 3.5
 			USERDIRPRODUCTVERSION 3
 			ABOUTBOXPRODUCTVERSION 3.5.0
+			ABOUTBOXPRODUCTVERSIONSUFFIX beta1+
 			BASEPRODUCTVERSION 3.5
 			UPDATEURL http://update.libreoffice.org/check.php
 			ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk,javaversion2.dat,userland.txt,version.lst
@@ -175,6 +177,7 @@ LibreOffice_Dev
 			BRANDPACKAGEVERSION 3.5
 			USERDIRPRODUCTVERSION 3
 			ABOUTBOXPRODUCTVERSION 3.5.0
+			ABOUTBOXPRODUCTVERSIONSUFFIX beta1+
 			BASEPRODUCTVERSION 3.5
 			DEVELOPMENTPRODUCT 1
 			BASISPACKAGEPREFIX lodevbasis
@@ -461,6 +464,7 @@ OxygenOffice
 			BRANDPACKAGEVERSION 3.5
 			USERDIRPRODUCTVERSION 3
 			ABOUTBOXPRODUCTVERSION 3.5.0
+			ABOUTBOXPRODUCTVERSIONSUFFIX beta1+
 			BASEPRODUCTVERSION 3.5
             PCPFILENAME openoffice.pcp
 			UPDATEURL http://update.libreoffice.org/check.php
@@ -524,6 +528,7 @@ OxygenOffice_wJRE
 			BRANDPACKAGEVERSION 3.5
 			USERDIRPRODUCTVERSION 3
 			ABOUTBOXPRODUCTVERSION 3.5.0
+			ABOUTBOXPRODUCTVERSIONSUFFIX beta1+
 			BASEPRODUCTVERSION 3.5
 			UPDATEURL http://update.libreoffice.org/check.php
 			ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk,javaversion2.dat,userland.txt
diff --git a/officecfg/registry/data/org/openoffice/Setup.xcu b/officecfg/registry/data/org/openoffice/Setup.xcu
index fc7affa..c446099 100644
--- a/officecfg/registry/data/org/openoffice/Setup.xcu
+++ b/officecfg/registry/data/org/openoffice/Setup.xcu
@@ -37,6 +37,9 @@
         <prop oor:name="ooSetupVersionAboutBox">
             <value>${ABOUTBOXPRODUCTVERSION}</value>
         </prop>
+        <prop oor:name="ooSetupVersionAboutBoxSuffix">
+            <value>${ABOUTBOXPRODUCTVERSIONSUFFIX}</value>
+        </prop>
         <prop oor:name="ooVendor">
             <value>${OOOVENDOR}</value>
         </prop>
diff --git a/officecfg/registry/schema/org/openoffice/Setup.xcs b/officecfg/registry/schema/org/openoffice/Setup.xcs
index 62d3fdc..f6ac667 100644
--- a/officecfg/registry/schema/org/openoffice/Setup.xcs
+++ b/officecfg/registry/schema/org/openoffice/Setup.xcs
@@ -267,6 +267,13 @@
 				</info>
 				<value/>
 			</prop>
+			<prop oor:name="ooSetupVersionAboutBoxSuffix" oor:type="xs:string">
+				<info>
+					<author>PMLADEK</author>
+					<desc>Specifies the version suffix (beta1, rc2) of the product that appears only on the about box.</desc>
+				</info>
+				<value/>
+			</prop>
 			<prop oor:name="ooVendor" oor:type="xs:string">
 				<info>
 					<author>IHI</author>
diff --git a/solenv/bin/modules/installer/download.pm b/solenv/bin/modules/installer/download.pm
index 5f186b7..bc6ac27 100644
--- a/solenv/bin/modules/installer/download.pm
+++ b/solenv/bin/modules/installer/download.pm
@@ -425,6 +425,7 @@ sub get_download_version
 
     $version = $allvariables->{'PRODUCTVERSION'};
     if (( $allvariables->{'ABOUTBOXPRODUCTVERSION'} ) && ( $allvariables->{'ABOUTBOXPRODUCTVERSION'} ne "" )) { $version = $allvariables->{'ABOUTBOXPRODUCTVERSION'}; }
+    if (( $allvariables->{'ABOUTBOXPRODUCTVERSIONSUFFIX'} ) && ( $allvariables->{'ABOUTBOXPRODUCTVERSIONSUFFIX'} ne "" )) { $version = $allvariables->{'ABOUTBOXPRODUCTVERSIONSUFFIX'}; }
     if (( $allvariables->{'SHORT_PRODUCTEXTENSION'} ) && ( $allvariables->{'SHORT_PRODUCTEXTENSION'} ne "" )) { $version = $version . $allvariables->{'SHORT_PRODUCTEXTENSION'}; }
 
     return $version;
diff --git a/unotools/inc/unotools/configmgr.hxx b/unotools/inc/unotools/configmgr.hxx
index 1ac1868..56a216a 100644
--- a/unotools/inc/unotools/configmgr.hxx
+++ b/unotools/inc/unotools/configmgr.hxx
@@ -50,6 +50,8 @@ class UNOTOOLS_DLLPUBLIC ConfigManager: private boost::noncopyable {
 public:
     static rtl::OUString getAboutBoxProductVersion();
 
+    static rtl::OUString getAboutBoxProductVersionSuffix();
+
     static rtl::OUString getDefaultCurrency();
 
     static rtl::OUString getLocale();
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index 553e15a..f761c5f 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -114,6 +114,13 @@ rtl::OUString utl::ConfigManager::getAboutBoxProductVersion() {
             RTL_CONSTASCII_USTRINGPARAM("Product/ooSetupVersionAboutBox")));
 }
 
+rtl::OUString utl::ConfigManager::getAboutBoxProductVersionSuffix() {
+    return getConfigurationString(
+        rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup")),
+        rtl::OUString(
+            RTL_CONSTASCII_USTRINGPARAM("Product/ooSetupVersionAboutBoxSuffix")));
+}
+
 rtl::OUString utl::ConfigManager::getDefaultCurrency() {
     return getConfigurationString(
         rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Setup")),


More information about the Libreoffice-commits mailing list