summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-01-10 16:40:27 +0200
committerNoel Grandin <noel@peralex.com>2013-01-28 08:25:24 +0200
commitf95a7c2c6d5c2158de12bb3ca6fd94b139e33c62 (patch)
tree85f09e15fd9954a84f55e561cb174fe0450ea99f /basic
parentb772eb0c728a06bdf72866ef61f800bbf7ec15a9 (diff)
fdo#46808, Convert SvNumberFormatter to use XComponentContext
Change-Id: If4e8312dae6bc5eb8bb7655cf250f06ab37b7e5c
Diffstat (limited to 'basic')
-rw-r--r--basic/source/runtime/methods.cxx4
-rw-r--r--basic/source/runtime/runtime.cxx5
-rw-r--r--basic/source/sbx/sbxdate.cxx10
-rw-r--r--basic/source/sbx/sbxscan.cxx4
4 files changed, 5 insertions, 18 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 3a6eb970bbaf..b9a286127c2c 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1966,9 +1966,7 @@ RTLFUNC(DateValue)
if( !bSuccess && ( eLangType != LANGUAGE_ENGLISH_US ) )
{
// Create a new SvNumberFormatter by using LANGUAGE_ENGLISH to get the date value;
- uno::Reference< lang::XMultiServiceFactory >
- xFactory = comphelper::getProcessServiceFactory();
- SvNumberFormatter aFormatter( xFactory, LANGUAGE_ENGLISH_US );
+ SvNumberFormatter aFormatter( comphelper::getProcessComponentContext(), LANGUAGE_ENGLISH_US );
bSuccess = aFormatter.IsNumberFormat( aStr, nIndex, fResult );
nType = aFormatter.GetType( nIndex );
}
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index eba60649f255..55836e8593af 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -349,9 +349,6 @@ void SbiInstance::PrepareNumberFormatter( SvNumberFormatter*& rpNumberFormatter,
sal_uInt32 &rnStdDateIdx, sal_uInt32 &rnStdTimeIdx, sal_uInt32 &rnStdDateTimeIdx,
LanguageType* peFormatterLangType, DateFormat* peFormatterDateFormat )
{
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
- xFactory = comphelper::getProcessServiceFactory();
-
LanguageType eLangType;
if( peFormatterLangType )
{
@@ -372,7 +369,7 @@ void SbiInstance::PrepareNumberFormatter( SvNumberFormatter*& rpNumberFormatter,
eDate = aSysLocale.GetLocaleData().getDateFormat();
}
- rpNumberFormatter = new SvNumberFormatter( xFactory, eLangType );
+ rpNumberFormatter = new SvNumberFormatter( comphelper::getProcessComponentContext(), eLangType );
sal_Int32 nCheckPos = 0; short nType;
rnStdTimeIdx = rpNumberFormatter->GetStandardFormat( NUMBERFORMAT_TIME, eLangType );
diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx
index 6d0a4073a64a..f28c5851f954 100644
--- a/basic/source/sbx/sbxdate.cxx
+++ b/basic/source/sbx/sbxdate.cxx
@@ -98,10 +98,7 @@ double ImpGetDate( const SbxValues* p )
{
LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
- SvNumberFormatter* pFormatter;
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
- xFactory = comphelper::getProcessServiceFactory();
- pFormatter = new SvNumberFormatter( xFactory, eLangType );
+ SvNumberFormatter* pFormatter = new SvNumberFormatter( comphelper::getProcessComponentContext(), eLangType );
sal_uInt32 nIndex;
sal_Int32 nCheckPos = 0;
@@ -271,10 +268,7 @@ start:
Color* pColor;
LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
- SvNumberFormatter* pFormatter;
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
- xFactory = comphelper::getProcessServiceFactory();
- pFormatter = new SvNumberFormatter( xFactory, eLangType );
+ SvNumberFormatter* pFormatter = new SvNumberFormatter( comphelper::getProcessComponentContext(), eLangType );
sal_uInt32 nIndex;
sal_Int32 nCheckPos = 0;
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 4febd4c27935..856a40daa805 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -717,9 +717,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
}
LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType();
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
- xFactory = comphelper::getProcessServiceFactory();
- SvNumberFormatter aFormatter( xFactory, eLangType );
+ SvNumberFormatter aFormatter( comphelper::getProcessComponentContext(), eLangType );
sal_uInt32 nIndex;
double nNumber;