summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorWinfried Donkers <winfrieddonkers@libreoffice.org>2013-09-25 07:41:34 +0200
committerEike Rathke <erack@redhat.com>2013-10-10 17:03:39 +0000
commitddac824d9c109430f5caad05ca1d84cfcd599c4f (patch)
tree5cb6ba45e794429397bd9dcca3a6bb408a561a38 /sc
parent3ef5e2611197fe295c6b3521198390f9ad020f71 (diff)
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@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/addincol.cxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index 807bba24a73d..db0d521cc731 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