diff options
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh2.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/impex.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/unoobj/forbiuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/xmlsource/xmlsourcedlg.cxx | 6 |
5 files changed, 10 insertions, 14 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index d7003c956cdd..da59b28504cc 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -1388,7 +1388,7 @@ sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) ScRange aRange; // HTML macht eigenes ColWidth/RowHeight CalcOutputFactor(); - SvNumberFormatter aNumFormatter( comphelper::getComponentContext(aDocument.GetServiceManager()), eLang); + SvNumberFormatter aNumFormatter( comphelper::getProcessComponentContext(), 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/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx index 1039219706ca..7f5ea07aa1e0 100644 --- a/sc/source/ui/docshell/docsh2.cxx +++ b/sc/source/ui/docshell/docsh2.cxx @@ -125,7 +125,7 @@ void ScDocShell::InitItems() if (aLocales.getLength()) { rtl::Reference<SvxForbiddenCharactersTable> xForbiddenTable = - new SvxForbiddenCharactersTable( comphelper::getComponentContext(aDocument.GetServiceManager()) ); + new SvxForbiddenCharactersTable( comphelper::getProcessComponentContext() ); const lang::Locale* pLocales = aLocales.getConstArray(); for (sal_Int32 i = 0; i < aLocales.getLength(); i++) diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index e09a139ccc57..4a74487b2487 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -1284,14 +1284,14 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm ) long nSkipLines = pExtOptions->GetStartRow(); LanguageType eDocLang = pExtOptions->GetLanguage(); - SvNumberFormatter aNumFormatter( comphelper::getComponentContext(pDoc->GetServiceManager()), eDocLang); + SvNumberFormatter aNumFormatter( comphelper::getProcessComponentContext(), eDocLang); bool bDetectNumFormat = pExtOptions->IsDetectSpecialNumber(); // For date recognition ::utl::TransliterationWrapper aTransliteration( - comphelper::getComponentContext(pDoc->GetServiceManager()), SC_TRANSLITERATION_IGNORECASE ); + comphelper::getProcessComponentContext(), SC_TRANSLITERATION_IGNORECASE ); aTransliteration.loadModuleIfNeeded( eDocLang ); - CalendarWrapper aCalendar( comphelper::getComponentContext(pDoc->GetServiceManager()) ); + CalendarWrapper aCalendar( comphelper::getProcessComponentContext() ); aCalendar.loadDefaultCalendar( LanguageTag( eDocLang ).getLocale() ); boost::scoped_ptr< ::utl::TransliterationWrapper > pEnglishTransliteration; @@ -1299,9 +1299,9 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm ) if ( eDocLang != LANGUAGE_ENGLISH_US ) { pEnglishTransliteration.reset(new ::utl::TransliterationWrapper ( - comphelper::getComponentContext(pDoc->GetServiceManager()), SC_TRANSLITERATION_IGNORECASE )); + comphelper::getProcessComponentContext(), SC_TRANSLITERATION_IGNORECASE )); aTransliteration.loadModuleIfNeeded( LANGUAGE_ENGLISH_US ); - pEnglishCalendar.reset(new CalendarWrapper ( comphelper::getComponentContext(pDoc->GetServiceManager()) )); + pEnglishCalendar.reset(new CalendarWrapper ( comphelper::getProcessComponentContext() )); pEnglishCalendar->loadDefaultCalendar( LanguageTag( LANGUAGE_ENGLISH_US ).getLocale() ); } @@ -2192,7 +2192,7 @@ bool ScImportExport::HTML2Doc( SvStream& rStrm, const String& rBaseURL ) { // Pick up import options if available. LanguageType eLang = pExtOptions->GetLanguage(); - SvNumberFormatter aNumFormatter( comphelper::getComponentContext(pDoc->GetServiceManager()), eLang); + SvNumberFormatter aNumFormatter( comphelper::getProcessComponentContext(), eLang); bool bSpecialNumber = pExtOptions->IsDetectSpecialNumber(); pImp->WriteToDocument(false, 1.0, &aNumFormatter, bSpecialNumber); } diff --git a/sc/source/ui/unoobj/forbiuno.cxx b/sc/source/ui/unoobj/forbiuno.cxx index e26190642b09..242816de80fc 100644 --- a/sc/source/ui/unoobj/forbiuno.cxx +++ b/sc/source/ui/unoobj/forbiuno.cxx @@ -38,7 +38,7 @@ static rtl::Reference<SvxForbiddenCharactersTable> lcl_GetForbidden( ScDocShell* // create an empty SvxForbiddenCharactersTable for SvxUnoForbiddenCharsTable, // so changes can be stored. - xRet = new SvxForbiddenCharactersTable( comphelper::getComponentContext(pDoc->GetServiceManager()) ); + xRet = new SvxForbiddenCharactersTable( comphelper::getProcessComponentContext() ); pDoc->SetForbiddenCharacters( xRet ); } } diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx index 952ac3c57d81..6699530f104d 100644 --- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx +++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx @@ -174,11 +174,7 @@ sal_Bool ScXMLSourceDlg::Close() void ScXMLSourceDlg::SelectSourceFile() { - uno::Reference<lang::XMultiServiceFactory> xServiceMgr = mpDoc->GetServiceManager(); - if (!xServiceMgr.is()) - return; - - uno::Reference<ui::dialogs::XFilePicker3> xFilePicker = ui::dialogs::FilePicker::createWithMode( comphelper::getComponentContext(xServiceMgr), ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE ); + uno::Reference<ui::dialogs::XFilePicker3> xFilePicker = ui::dialogs::FilePicker::createWithMode( comphelper::getProcessComponentContext(), ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE ); if (maSrcPath.isEmpty()) // Use default path. |