summaryrefslogtreecommitdiff
path: root/sc
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 /sc
parentb772eb0c728a06bdf72866ef61f800bbf7ec15a9 (diff)
fdo#46808, Convert SvNumberFormatter to use XComponentContext
Change-Id: If4e8312dae6bc5eb8bb7655cf250f06ab37b7e5c
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/dpobject.cxx4
-rw-r--r--sc/source/core/data/global.cxx2
-rw-r--r--sc/source/core/data/poolhelp.cxx2
-rw-r--r--sc/source/filter/excel/xestyle.cxx4
-rw-r--r--sc/source/ui/docshell/docsh.cxx2
-rw-r--r--sc/source/ui/docshell/impex.cxx4
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx2
7 files changed, 10 insertions, 10 deletions
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index d86a012118e3..c82926827f22 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -2847,7 +2847,7 @@ const ScDPCache* ScDPCollection::DBCaches::getCache(
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<ScDPCache> pCache(new ScDPCache(mpDoc));
SAL_WNODEPRECATED_DECLARATIONS_POP
- SvNumberFormatter aFormat(mpDoc->GetServiceManager(), ScGlobal::eLnge);
+ SvNumberFormatter aFormat( comphelper::getComponentContext(mpDoc->GetServiceManager()), ScGlobal::eLnge);
DBConnector aDB(*pCache, xRowSet, *aFormat.GetNullDate());
if (!aDB.isValid())
return NULL;
@@ -2961,7 +2961,7 @@ void ScDPCollection::DBCaches::updateCache(
return;
}
- SvNumberFormatter aFormat(mpDoc->GetServiceManager(), ScGlobal::eLnge);
+ SvNumberFormatter aFormat( comphelper::getComponentContext(mpDoc->GetServiceManager()), ScGlobal::eLnge);
DBConnector aDB(rCache, xRowSet, *aFormat.GetNullDate());
if (!aDB.isValid())
return;
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index e18d241ba54b..5f146c813a16 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -208,7 +208,7 @@ SvNumberFormatter* ScGlobal::GetEnglishFormatter()
if ( !pEnglishFormatter )
{
pEnglishFormatter = new SvNumberFormatter(
- ::comphelper::getProcessServiceFactory(), LANGUAGE_ENGLISH_US );
+ ::comphelper::getProcessComponentContext(), LANGUAGE_ENGLISH_US );
pEnglishFormatter->SetEvalDateFormat( NF_EVALDATEFORMAT_INTL_FORMAT );
}
return pEnglishFormatter;
diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx
index c8d4780f3a1e..c2ba946938a2 100644
--- a/sc/source/core/data/poolhelp.cxx
+++ b/sc/source/core/data/poolhelp.cxx
@@ -73,7 +73,7 @@ SvNumberFormatter* ScPoolHelper::GetFormTable() const
{
if ( !pFormTable )
{
- pFormTable = new SvNumberFormatter( m_pSourceDoc->GetServiceManager(), ScGlobal::eLnge );
+ pFormTable = new SvNumberFormatter( comphelper::getComponentContext(m_pSourceDoc->GetServiceManager()), ScGlobal::eLnge );
pFormTable->SetColorLink( LINK( m_pSourceDoc, ScDocument, GetUserDefinedColor ) );
pFormTable->SetEvalDateFormat( NF_EVALDATEFORMAT_INTL_FORMAT );
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index a7b8b032160c..ff39ed467d49 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -1225,7 +1225,7 @@ XclExpNumFmtBuffer::XclExpNumFmtBuffer( const XclExpRoot& rRoot ) :
/* Compiler needs a hint, this doesn't work: new NfKeywordTable;
cannot convert from 'class String *' to 'class String (*)[54]'
The effective result here is class String (*)[54*1] */
- mxFormatter( new SvNumberFormatter( rRoot.GetDoc().GetServiceManager(), LANGUAGE_ENGLISH_US ) ),
+ mxFormatter( new SvNumberFormatter( comphelper::getComponentContext(rRoot.GetDoc().GetServiceManager()), LANGUAGE_ENGLISH_US ) ),
mpKeywordTable( new NfKeywordTable ),
mnStdFmt( GetFormatter().GetStandardFormat( ScGlobal::eLnge ) )
{
@@ -2866,7 +2866,7 @@ void XclExpXFBuffer::AddBorderAndFill( const XclExpXF& rXF )
XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot )
: XclExpRoot( rRoot ),
- mxFormatter( new SvNumberFormatter( rRoot.GetDoc().GetServiceManager(), LANGUAGE_ENGLISH_US ) ),
+ mxFormatter( new SvNumberFormatter( comphelper::getComponentContext(rRoot.GetDoc().GetServiceManager()), LANGUAGE_ENGLISH_US ) ),
mpKeywordTable( new NfKeywordTable )
{
mxFormatter->FillKeywordTable( *mpKeywordTable, LANGUAGE_ENGLISH_US );
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 79e7dd09fb0a..21629ce6a80c 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1360,7 +1360,7 @@ sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
ScRange aRange;
// HTML macht eigenes ColWidth/RowHeight
CalcOutputFactor();
- SvNumberFormatter aNumFormatter(aDocument.GetServiceManager(), eLang);
+ SvNumberFormatter aNumFormatter( comphelper::getComponentContext(aDocument.GetServiceManager()), eLang);
eError = ScFormatFilter::Get().ScImportHTML( *pInStream, rMedium.GetBaseURL(), &aDocument, aRange,
GetOutputFactor(), !bWebQuery, &aNumFormatter, bDateConvert );
if (eError != eERR_OK)
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 09ec1cd750cb..12d04a136699 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1279,7 +1279,7 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm )
long nSkipLines = pExtOptions->GetStartRow();
LanguageType eDocLang = pExtOptions->GetLanguage();
- SvNumberFormatter aNumFormatter(pDoc->GetServiceManager(), eDocLang);
+ SvNumberFormatter aNumFormatter( comphelper::getComponentContext(pDoc->GetServiceManager()), eDocLang);
bool bDetectNumFormat = pExtOptions->IsDetectSpecialNumber();
// For date recognition
@@ -2175,7 +2175,7 @@ bool ScImportExport::HTML2Doc( SvStream& rStrm, const String& rBaseURL )
{
// Pick up import options if available.
LanguageType eLang = pExtOptions->GetLanguage();
- SvNumberFormatter aNumFormatter(pDoc->GetServiceManager(), eLang);
+ SvNumberFormatter aNumFormatter( comphelper::getComponentContext(pDoc->GetServiceManager()), eLang);
bool bSpecialNumber = pExtOptions->IsDetectSpecialNumber();
pImp->WriteToDocument(false, 1.0, &aNumFormatter, bSpecialNumber);
}
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index 1a354f8f90e2..bf3317716c5f 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -75,7 +75,7 @@ ScAutoFmtPreview::ScAutoFmtPreview( Window* pParent, const ResId& rRes, ScDocume
aStrMid ( ScResId( STR_MID ) ),
aStrSouth ( ScResId( STR_SOUTH ) ),
aStrSum ( ScResId( STR_SUM ) ),
- pNumFmt ( new SvNumberFormatter( ::comphelper::getProcessServiceFactory(), ScGlobal::eLnge ) )
+ pNumFmt ( new SvNumberFormatter( ::comphelper::getProcessComponentContext(), ScGlobal::eLnge ) )
{
Init();
}