diff options
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/inc/unotools/bootstrap.hxx | 3 | ||||
-rw-r--r-- | unotools/source/config/bootstrap.cxx | 10 | ||||
-rw-r--r-- | unotools/source/config/configmgr.cxx | 17 | ||||
-rw-r--r-- | unotools/source/config/makefile.mk | 4 | ||||
-rw-r--r-- | unotools/source/config/syslocaleoptions.cxx | 24 |
5 files changed, 27 insertions, 31 deletions
diff --git a/unotools/inc/unotools/bootstrap.hxx b/unotools/inc/unotools/bootstrap.hxx index d17e2940890d..523247b97141 100644 --- a/unotools/inc/unotools/bootstrap.hxx +++ b/unotools/inc/unotools/bootstrap.hxx @@ -55,6 +55,9 @@ namespace utl /// retrieve the product key; uses the given default, if not found static rtl::OUString getProductKey(rtl::OUString const& _sDefault); + /// retrieve the product version + static rtl::OUString getProductVersion(); + /// retrieve the product source (MWS name) static ::rtl::OUString getProductSource(rtl::OUString const& _sDefault); diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx index b19ee6a3683f..adc4b8cbf3a4 100644 --- a/unotools/source/config/bootstrap.cxx +++ b/unotools/source/config/bootstrap.cxx @@ -52,6 +52,7 @@ #define BOOTSTRAP_DATA_NAME SAL_CONFIGFILE("bootstrap") #define BOOTSTRAP_ITEM_PRODUCT_KEY "ProductKey" +#define BOOTSTRAP_ITEM_PRODUCT_VERSION "OOOBaseVersion" #define BOOTSTRAP_ITEM_PRODUCT_SOURCE "ProductSource" #define BOOTSTRAP_ITEM_VERSIONFILE "Location" #define BOOTSTRAP_ITEM_BUILDID "buildid" @@ -652,6 +653,14 @@ OUString Bootstrap::getProductKey(OUString const& _sDefault) } // --------------------------------------------------------------------------------------- +OUString Bootstrap::getProductVersion() +{ + // read OOOBaseVersion from version.ini (versionrc) + OUString sVersion; + data().getVersionValue( OUString( RTL_CONSTASCII_USTRINGPARAM( BOOTSTRAP_ITEM_PRODUCT_VERSION ) ), sVersion, OUString() ); + return sVersion; +} + OUString Bootstrap::getProductSource(OUString const& _sDefault) { OUString const csProductSourceItem(RTL_CONSTASCII_USTRINGPARAM(BOOTSTRAP_ITEM_PRODUCT_SOURCE)); @@ -675,6 +684,7 @@ OUString Bootstrap::getBuildIdData(OUString const& _sDefault) sBuildId = data().getBootstrapValue( csBuildIdItem, _sDefault ); return sBuildId; } + // --------------------------------------------------------------------------------------- OUString Bootstrap::getAllUsersValue(OUString const& _sDefault) diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx index 97c1776bf95b..69b945b1c754 100644 --- a/unotools/source/config/configmgr.cxx +++ b/unotools/source/config/configmgr.cxx @@ -38,7 +38,6 @@ #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <osl/diagnose.h> -#include <i18npool/mslangid.hxx> #include <rtl/bootstrap.hxx> #include <rtl/instance.hxx> #if OSL_DEBUG_LEVEL > 0 @@ -377,18 +376,10 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp) Any aRet; - ::rtl::OUString sBrandName; -#ifdef ENABLE_BROFFICE - LanguageType nType = MsLangId::getRealLanguage( LANGUAGE_NONE ); - if ( nType == LANGUAGE_PORTUGUESE_BRAZILIAN ) - sBrandName = OUString(RTL_CONSTASCII_USTRINGPARAM("BrOffice")); - else -#endif - sBrandName = BrandName::get(); - - if ( eProp == PRODUCTNAME && sBrandName.getLength() ) + ::rtl::OUString &rBrandName = BrandName::get(); + if ( eProp == PRODUCTNAME && rBrandName.getLength() ) { - aRet <<= sBrandName; + aRet <<= rBrandName; return aRet; } @@ -536,7 +527,7 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp) } if ( eProp == PRODUCTNAME ) - aRet >>= sBrandName; + aRet >>= rBrandName; if ( eProp == PRODUCTXMLFILEFORMATNAME ) aRet >>= rXMLFileFormatName; diff --git a/unotools/source/config/makefile.mk b/unotools/source/config/makefile.mk index 9a8e8d2d3d92..d639657eb7c6 100644 --- a/unotools/source/config/makefile.mk +++ b/unotools/source/config/makefile.mk @@ -37,10 +37,6 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk .INCLUDE : $(PRJ)$/util$/makefile.pmk -.IF "$(ENABLE_BROFFICE)"=="TRUE" -CDEFS+=-DENABLE_BROFFICE -.ENDIF - # --- Files ------------------------------------- SLOFILES=\ diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx index 2b6f4f2cdc1b..9c071cea2dd1 100644 --- a/unotools/source/config/syslocaleoptions.cxx +++ b/unotools/source/config/syslocaleoptions.cxx @@ -273,19 +273,16 @@ void SvtSysLocaleOptions_Impl::MakeRealLocale() void SvtSysLocaleOptions_Impl::MakeRealUILocale() { - if ( !m_aRealUILocale.Language.getLength() ) + // as we can't switch UILocale at runtime, we only store changes in the configuration + m_aRealUILocale = lcl_str_to_locale( m_aUILocaleString ); + if ( m_aRealUILocale.Language.getLength() ) { - // as we can't switch UILocale at runtime, we only store changes in the configuration - m_aRealUILocale = lcl_str_to_locale( m_aUILocaleString ); - if ( m_aRealUILocale.Language.getLength() ) - { - m_eRealUILanguage = MsLangId::convertLocaleToLanguage( m_aRealUILocale ); - } - else - { - m_eRealUILanguage = MsLangId::getSystemUILanguage(); - MsLangId::convertLanguageToLocale( m_eRealUILanguage, m_aRealUILocale ); - } + m_eRealUILanguage = MsLangId::convertLocaleToLanguage( m_aRealUILocale ); + } + else + { + m_eRealUILanguage = MsLangId::getSystemUILanguage(); + MsLangId::convertLanguageToLocale( m_eRealUILanguage, m_aRealUILocale ); } } @@ -399,13 +396,12 @@ void SvtSysLocaleOptions_Impl::SetUILocaleString( const OUString& rStr ) if (!m_bROUILocale && rStr != m_aUILocaleString ) { m_aUILocaleString = rStr; -/* + // as we can't switch UILocale at runtime, we only store changes in the configuration MakeRealUILocale(); MsLangId::setConfiguredSystemLanguage( m_eRealUILanguage ); SetModified(); NotifyListeners( SYSLOCALEOPTIONS_HINT_UILOCALE ); -*/ } } |