summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-01-16 17:12:47 +0200
committerNoel Grandin <noel@peralex.com>2013-02-11 08:02:11 +0200
commite5fdaec54a54e42b487c37e6b01493bcdfc30b4c (patch)
tree26421d24cee78af24feb748fc52845f279dd299e /editeng
parentc4d051c5dbee532264e1bfc2ccdb337c6dcf83ed (diff)
fdo#46808, Adapt document::XML*BasicExporter UNO services to new style
The services are document::XMLBasicExporter document::XMLOasisBasicExporter Change-Id: Ifd93e5735cae94d34904d79769cdb3edf587fe43
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/misc/SvXMLAutoCorrectExport.cxx8
-rw-r--r--editeng/source/misc/SvXMLAutoCorrectExport.hxx4
-rw-r--r--editeng/source/misc/svxacorr.cxx8
-rw-r--r--editeng/source/xml/xmltxtexp.cxx16
4 files changed, 12 insertions, 24 deletions
diff --git a/editeng/source/misc/SvXMLAutoCorrectExport.cxx b/editeng/source/misc/SvXMLAutoCorrectExport.cxx
index b70474a15c8f..2b08c0ff7085 100644
--- a/editeng/source/misc/SvXMLAutoCorrectExport.cxx
+++ b/editeng/source/misc/SvXMLAutoCorrectExport.cxx
@@ -28,11 +28,11 @@ using namespace ::xmloff::token;
using namespace ::rtl;
SvXMLAutoCorrectExport::SvXMLAutoCorrectExport(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
const SvxAutocorrWordList * pNewAutocorr_List,
const rtl::OUString &rFileName,
com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler> &rHandler)
-: SvXMLExport( xServiceFactory, rFileName, util::MeasureUnit::CM, rHandler ),
+: SvXMLExport( xContext, rFileName, util::MeasureUnit::CM, rHandler ),
pAutocorr_List( pNewAutocorr_List )
{
_GetNamespaceMap().Add( GetXMLToken ( XML_NP_BLOCK_LIST),
@@ -72,11 +72,11 @@ sal_uInt32 SvXMLAutoCorrectExport::exportDoc(enum XMLTokenEnum /*eClass*/)
}
SvXMLExceptionListExport::SvXMLExceptionListExport(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
const SvStringsISortDtor &rNewList,
const rtl::OUString &rFileName,
com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler> &rHandler)
-: SvXMLExport( xServiceFactory, rFileName, util::MeasureUnit::CM, rHandler ),
+: SvXMLExport( xContext, rFileName, util::MeasureUnit::CM, rHandler ),
rList( rNewList )
{
_GetNamespaceMap().Add( GetXMLToken ( XML_NP_BLOCK_LIST ),
diff --git a/editeng/source/misc/SvXMLAutoCorrectExport.hxx b/editeng/source/misc/SvXMLAutoCorrectExport.hxx
index 294122dc7eeb..430aca271c4e 100644
--- a/editeng/source/misc/SvXMLAutoCorrectExport.hxx
+++ b/editeng/source/misc/SvXMLAutoCorrectExport.hxx
@@ -31,7 +31,7 @@ private:
const SvxAutocorrWordList *pAutocorr_List;
public:
SvXMLAutoCorrectExport(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
const SvxAutocorrWordList * pNewAutocorr_List,
const rtl::OUString &rFileName,
com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler> &rHandler);
@@ -51,7 +51,7 @@ private:
const SvStringsISortDtor & rList;
public:
SvXMLExceptionListExport(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
const SvStringsISortDtor &rNewList,
const rtl::OUString &rFileName,
com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler> &rHandler);
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 50c5b02ca360..a6a483ca53c9 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2046,8 +2046,6 @@ void SvxAutoCorrectLanguageLists::SaveExceptList_Imp(
xStrm->SetProperty( rtl::OUString("MediaType"), aAny );
- uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
- comphelper::getProcessServiceFactory();
uno::Reference< uno::XComponentContext > xContext =
comphelper::getProcessComponentContext();
@@ -2056,7 +2054,7 @@ void SvxAutoCorrectLanguageLists::SaveExceptList_Imp(
xWriter->setOutputStream(xOut);
uno::Reference < xml::sax::XDocumentHandler > xHandler(xWriter, UNO_QUERY_THROW);
- SvXMLExceptionListExport aExp( xServiceFactory, rLst, sStrmName, xHandler );
+ SvXMLExceptionListExport aExp( xContext, rLst, sStrmName, xHandler );
aExp.exportDoc( XML_BLOCK_LIST );
@@ -2409,8 +2407,6 @@ sal_Bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg )
aAny <<= aMime;
refList->SetProperty( aPropName, aAny );
- uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
- comphelper::getProcessServiceFactory();
uno::Reference< uno::XComponentContext > xContext =
comphelper::getProcessComponentContext();
@@ -2419,7 +2415,7 @@ sal_Bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg )
xWriter->setOutputStream(xOut);
uno::Reference<xml::sax::XDocumentHandler> xHandler(xWriter, uno::UNO_QUERY);
- SvXMLAutoCorrectExport aExp( xServiceFactory, pAutocorr_List, sStrmName, xHandler );
+ SvXMLAutoCorrectExport aExp( xContext, pAutocorr_List, sStrmName, xHandler );
aExp.exportDoc( XML_BLOCK_LIST );
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index beec85ed2a29..0b568f211f66 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -348,7 +348,7 @@ class SvxXMLTextExportComponent : public SvXMLExport
{
public:
SvxXMLTextExportComponent(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
EditEngine* pEditEngine,
const ESelection& rSel,
const ::rtl::OUString& rFileName,
@@ -369,12 +369,12 @@ private:
///////////////////////////////////////////////////////////////////////
SvxXMLTextExportComponent::SvxXMLTextExportComponent(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
EditEngine* pEditEngine,
const ESelection& rSel,
const ::rtl::OUString& rFileName,
const com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler > & xHandler)
-: SvXMLExport( xServiceFactory, rFileName, xHandler, ((frame::XModel*)new SvxSimpleUnoModel()), MAP_CM ),
+: SvXMLExport( xContext, rFileName, xHandler, ((frame::XModel*)new SvxSimpleUnoModel()), MAP_CM ),
maSelection( rSel )
{
SvxEditEngineSource aEditSource( pEditEngine );
@@ -410,16 +410,8 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection&
do
{
// create service factory
-
- uno::Reference< lang::XMultiServiceFactory> xServiceFactory( ::comphelper::getProcessServiceFactory() );
uno::Reference<uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
- if( !xServiceFactory.is() )
- {
- OSL_FAIL( "got no service manager" );
- break;
- }
-
// create document handler
uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create( xContext );
@@ -441,7 +433,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection&
// SvxXMLTextExportComponent aExporter( &rEditEngine, rSel, aName, xHandler );
uno::Reference< xml::sax::XDocumentHandler > xHandler(xWriter, UNO_QUERY_THROW);
- SvxXMLTextExportComponent aExporter( xServiceFactory, &rEditEngine, rSel, aName, xHandler );
+ SvxXMLTextExportComponent aExporter( xContext, &rEditEngine, rSel, aName, xHandler );
aExporter.exportDoc();