[Libreoffice-commits] .: unotools/source
Petr Mladek
pmladek at kemper.freedesktop.org
Wed Dec 1 05:10:43 PST 2010
unotools/source/config/configmgr.cxx | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
New commits:
commit 9352c8a1a0bb8f878b84773803d69f0fee56d1de
Author: Petr Mladek <pmladek at suse.cz>
Date: Tue Nov 30 21:37:52 2010 +0100
use BrOffice in pt_BR locale (fdo#31770)
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index 398bf35..49ef013 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -38,6 +38,7 @@
#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
@@ -370,10 +371,17 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
}
Any aRet;
- ::rtl::OUString &rBrandName = BrandName::get();
- if ( eProp == PRODUCTNAME && rBrandName.getLength() )
+
+ ::rtl::OUString sBrandName;
+ LanguageType nType = MsLangId::getSystemUILanguage();
+ if ( nType == LANGUAGE_PORTUGUESE_BRAZILIAN )
+ sBrandName = OUString::createFromAscii("BrOffice");
+ else
+ sBrandName = BrandName::get();
+
+ if ( eProp == PRODUCTNAME && sBrandName.getLength() )
{
- aRet <<= rBrandName;
+ aRet <<= sBrandName;
return aRet;
}
@@ -522,7 +530,7 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
}
if ( eProp == PRODUCTNAME )
- aRet >>= rBrandName;
+ aRet >>= sBrandName;
if ( eProp == PRODUCTXMLFILEFORMATNAME )
aRet >>= rXMLFileFormatName;
More information about the Libreoffice-commits
mailing list