[Libreoffice-commits] core.git: sc/source
Winfried Donkers
winfrieddonkers at libreoffice.org
Thu Oct 10 10:04:00 PDT 2013
sc/source/core/tool/addincol.cxx | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
New commits:
commit ddac824d9c109430f5caad05ca1d84cfcd599c4f
Author: Winfried Donkers <winfrieddonkers at libreoffice.org>
Date: Wed Sep 25 07:41:34 2013 +0200
fdo#50118 use English add-in function names
This patch sets the function names of add-in functions as set
in the golbal configuration of LibreOffice ('Use English Function names')
Changing this setting has not yet an immediate effect. (I'm still working on
that, which is a hard nut to crack.) The add-in function names are set at
start up of calc.
Change-Id: I5fffd9edb09647c1bcd0c3f35ffa6ab69ef48589
Reviewed-on: https://gerrit.libreoffice.org/6032
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index 807bba2..db0d521 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -50,6 +50,7 @@
#include "rangeseq.hxx"
#include "funcdesc.hxx"
#include "svl/sharedstring.hxx"
+#include "formulaopt.hxx" //fdo50118
using namespace com::sun::star;
@@ -746,12 +747,15 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
uno::Reference<lang::XServiceName> xName( xInterface, uno::UNO_QUERY );
if ( xAddIn.is() && xName.is() )
{
- // AddIns must use the language for which the office is installed
- lang::Locale aLocale( Application::GetSettings().GetUILanguageTag().getLocale());
- xAddIn->setLocale( aLocale );
+ // fdo50118 when GetUseEnglishFunctionName() returns true, set the
+ // locale to en-US to get English function names
+ if ( SC_MOD()->GetFormulaOptions().GetUseEnglishFuncName() )
+ xAddIn->setLocale( lang::Locale( "en", "US", ""));
+ else
+ xAddIn->setLocale( Application::GetSettings().GetUILanguageTag().getLocale());
OUString aServiceName( xName->getServiceName() );
- ScUnoAddInHelpIdGenerator aHelpIdGenerator( xName->getServiceName() );
+ ScUnoAddInHelpIdGenerator aHelpIdGenerator( aServiceName );
//! pass XIntrospection to ReadFromAddIn
@@ -1001,8 +1005,12 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface
uno::Reference<lang::XLocalizable> xLoc( xInterface, uno::UNO_QUERY );
if ( xLoc.is() ) // optional in new add-ins
{
- lang::Locale aLocale( Application::GetSettings().GetUILanguageTag().getLocale());
- xLoc->setLocale( aLocale );
+ // fdo50118 when GetUseEnglishFunctionName() returns true, set the
+ // locale to en-US to get English function names
+ if ( SC_MOD()->GetFormulaOptions().GetUseEnglishFuncName() )
+ xLoc->setLocale( lang::Locale( "en", "US", ""));
+ else
+ xLoc->setLocale( Application::GetSettings().GetUILanguageTag().getLocale());
}
// if function list was already initialized, it must be updated
More information about the Libreoffice-commits
mailing list