summaryrefslogtreecommitdiff
path: root/dbaccess
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 /dbaccess
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 'dbaccess')
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx23
-rw-r--r--dbaccess/source/filter/xml/xmlExport.hxx2
2 files changed, 17 insertions, 8 deletions
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 391c462ed7e5..ca5bb8c5b0c6 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -102,7 +102,7 @@ namespace dbaxml
//---------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODBExportHelper::Create(const Reference< XMultiServiceFactory >& _rxORB)
{
- return static_cast< XServiceInfo* >(new ODBExport(_rxORB,EXPORT_SETTINGS | EXPORT_PRETTY ));
+ return static_cast< XServiceInfo* >(new ODBExport(comphelper::getComponentContext(_rxORB),EXPORT_SETTINGS | EXPORT_PRETTY ));
}
//---------------------------------------------------------------------
::rtl::OUString SAL_CALL ODBExportHelper::getImplementationName_Static( ) throw (RuntimeException)
@@ -121,7 +121,7 @@ namespace dbaxml
//---------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODBFullExportHelper::Create(const Reference< XMultiServiceFactory >& _rxORB)
{
- return static_cast< XServiceInfo* >(new ODBExport(_rxORB,EXPORT_ALL));
+ return static_cast< XServiceInfo* >(new ODBExport(comphelper::getComponentContext(_rxORB),EXPORT_ALL));
}
//---------------------------------------------------------------------
::rtl::OUString SAL_CALL ODBFullExportHelper::getImplementationName_Static( ) throw (RuntimeException)
@@ -193,10 +193,10 @@ namespace dbaxml
}
};
// -----------------------------------------------------------------------------
-ODBExport::ODBExport(const Reference< XMultiServiceFactory >& _rxMSF,sal_uInt16 nExportFlag)
-: SvXMLExport( util::MeasureUnit::MM_10TH, _rxMSF, XML_DATABASE,
+ODBExport::ODBExport(const Reference< XComponentContext >& _rxContext,sal_uInt16 nExportFlag)
+: SvXMLExport( util::MeasureUnit::MM_10TH, _rxContext, XML_DATABASE,
EXPORT_OASIS | nExportFlag)
-,m_aTypeCollection(comphelper::getComponentContext(_rxMSF))
+,m_aTypeCollection(_rxContext)
,m_bAllreadyFilled(sal_False)
{
GetMM100UnitConverter().SetCoreMeasureUnit(util::MeasureUnit::MM_10TH);
@@ -259,7 +259,16 @@ ODBExport::ODBExport(const Reference< XMultiServiceFactory >& _rxMSF,sal_uInt16
rtl::OUString(XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX ));
}
// -----------------------------------------------------------------------------
-IMPLEMENT_SERVICE_INFO1_STATIC( ODBExport, "com.sun.star.comp.sdb.DBExportFilter", "com.sun.star.document.ExportFilter")
+IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(ODBExport, "com.sun.star.comp.sdb.DBExportFilter")
+IMPLEMENT_SERVICE_INFO_SUPPORTS(ODBExport)
+IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(ODBExport, "com.sun.star.document.ExportFilter")
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ SAL_CALL ODBExport::Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB)
+{
+ return static_cast< XServiceInfo* >(new ODBExport( comphelper::getComponentContext(_rxORB)));
+}
+
// -----------------------------------------------------------------------------
void ODBExport::exportDataSource()
{
@@ -281,7 +290,7 @@ void ODBExport::exportDataSource()
xSettingsState->getPropertyDefault( INFO_DECIMALDELIMITER ) >>= aDelimiter.sDecimal;
xSettingsState->getPropertyDefault( INFO_THOUSANDSDELIMITER ) >>= aDelimiter.sThousand;
- ::connectivity::DriversConfig aDriverConfig(comphelper::getComponentContext(getServiceFactory()));
+ ::connectivity::DriversConfig aDriverConfig(getComponentContext());
const ::rtl::OUString sURL = ::comphelper::getString(xProp->getPropertyValue(PROPERTY_URL));
::comphelper::NamedValueCollection aDriverSupportedProperties( aDriverConfig.getProperties( sURL ) );
diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx
index 664ed30f48a4..68ce90019e5a 100644
--- a/dbaccess/source/filter/xml/xmlExport.hxx
+++ b/dbaccess/source/filter/xml/xmlExport.hxx
@@ -176,7 +176,7 @@ protected:
virtual ~ODBExport(){};
public:
- ODBExport(const Reference< XMultiServiceFactory >& _rxMSF, sal_uInt16 nExportFlag = EXPORT_CONTENT | EXPORT_AUTOSTYLES | EXPORT_PRETTY | EXPORT_FONTDECLS | EXPORT_SCRIPTS );
+ ODBExport(const Reference< XComponentContext >& _rxContext, sal_uInt16 nExportFlag = EXPORT_CONTENT | EXPORT_AUTOSTYLES | EXPORT_PRETTY | EXPORT_FONTDECLS | EXPORT_SCRIPTS );
// XServiceInfo
DECLARE_SERVICE_INFO_STATIC( );