Tag: cws_src680_dba25
User: fs      
Date: 05/03/14 05:27:43

Modified:
 /dba/dbaccess/source/filter/xml/
  xmlExport.cxx

Log:
 RESYNC: (1.4-1.5); FILE MERGED

File Changes:

Directory: /dba/dbaccess/source/filter/xml/
===========================================

File [changed]: xmlExport.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/filter/xml/xmlExport.cxx?r1=1.4.44.2&r2=1.4.44.3
Delta lines:  +17 -12
---------------------
--- xmlExport.cxx       9 Mar 2005 08:25:28 -0000       1.4.44.2
+++ xmlExport.cxx       14 Mar 2005 13:27:41 -0000      1.4.44.3
@@ -101,6 +101,9 @@
 #ifndef _COM_SUN_STAR_SDB_XFORMDOCUMENTSSUPPLIER_HPP_
 #include <com/sun/star/sdb/XFormDocumentsSupplier.hpp>
 #endif
+#ifndef _COM_SUN_STAR_SDB_XOFFICEDATABASEDOCUMENT_HPP_
+#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
+#endif
 #ifndef _COM_SUN_STAR_SDB_XREPORTDOCUMENTSSUPPLIER_HPP_
 #include <com/sun/star/sdb/XReportDocumentsSupplier.hpp>
 #endif
@@ -306,7 +309,7 @@
 // 
-----------------------------------------------------------------------------   
    
 void ODBExport::exportDataSource()
 {
-       Reference<XPropertySet> xProp(GetModel(),UNO_QUERY);
+       Reference<XPropertySet> xProp(getDataSource());
        if ( xProp.is() )
        {
                ::rtl::OUString sValue;
@@ -589,7 +592,7 @@
                                                        
,::xmloff::token::XMLTokenEnum _eTokenFilter
                                                        
,::xmloff::token::XMLTokenEnum _eTokenType)
 {
-       Reference<XPropertySet> xProp(GetModel(),UNO_QUERY);
+       Reference<XPropertySet> xProp(getDataSource());
        Sequence< ::rtl::OUString> aValue;
        if ( _aValue.getLength() )
        {
@@ -607,7 +610,7 @@
 // 
-----------------------------------------------------------------------------
 void ODBExport::exportLogin()
 {
-       Reference<XPropertySet> xProp(GetModel(),UNO_QUERY);
+       Reference<XPropertySet> xProp(getDataSource());
        ::rtl::OUString sValue;
        xProp->getPropertyValue(PROPERTY_USER) >>= sValue;
        if ( sValue.getLength() )
@@ -852,7 +855,7 @@
 // 
-----------------------------------------------------------------------------
 void ODBExport::exportQueries(sal_Bool _bExportContext)
 {
-       Reference<XQueryDefinitionsSupplier> xSup(GetModel(),UNO_QUERY);
+       Reference<XQueryDefinitionsSupplier> xSup(getDataSource(),UNO_QUERY);
        if ( xSup.is() )
        {
                Reference< XNameAccess > xCollection = 
xSup->getQueryDefinitions();
@@ -871,7 +874,7 @@
 // 
-----------------------------------------------------------------------------
 void ODBExport::exportTables(sal_Bool _bExportContext)
 {
-       Reference<XTablesSupplier> xSup(GetModel(),UNO_QUERY);
+       Reference<XTablesSupplier> xSup(getDataSource(),UNO_QUERY);
        if ( xSup.is() )
        {
                Reference< XNameAccess > xCollection = xSup->getTables();
@@ -979,7 +982,7 @@
 // 
-----------------------------------------------------------------------------
 void ODBExport::GetViewSettings(Sequence<PropertyValue>& aProps)
 {
-       Reference<XQueryDefinitionsSupplier> xSup(GetModel(),UNO_QUERY);
+       Reference<XQueryDefinitionsSupplier> xSup(getDataSource(),UNO_QUERY);
        if ( xSup.is() )
        {
                Reference< XNameAccess > xCollection = 
xSup->getQueryDefinitions();
@@ -1017,7 +1020,7 @@
 // 
-----------------------------------------------------------------------------
 void ODBExport::GetConfigurationSettings(Sequence<PropertyValue>& aProps)
 {
-       Reference<XPropertySet> xProp(GetModel(),UNO_QUERY);
+       Reference<XPropertySet> xProp(getDataSource());
        if ( xProp.is() )
        {
                sal_Int32 nLength = aProps.getLength();
@@ -1091,8 +1094,10 @@
 // 
-----------------------------------------------------------------------------
 void SAL_CALL ODBExport::setSourceDocument( const Reference< XComponent >& 
xDoc ) throw(IllegalArgumentException, RuntimeException)
 {
-       Reference<XPropertySet> xProp(xDoc,UNO_QUERY);
-       Reference< XNumberFormatsSupplier > 
xNum(xProp->getPropertyValue(PROPERTY_NUMBERFORMATSSUPPLIER),UNO_QUERY);
+       Reference<XOfficeDatabaseDocument> xOfficeDoc(xDoc,UNO_QUERY_THROW);
+       m_xDataSource.set(xOfficeDoc->getDataSource(),UNO_QUERY_THROW);
+       OSL_ENSURE(m_xDataSource.is(),"DataSource is NULL!");
+       Reference< XNumberFormatsSupplier > 
xNum(m_xDataSource->getPropertyValue(PROPERTY_NUMBERFORMATSSUPPLIER),UNO_QUERY);
        SetNumberFormatsSupplier(xNum);
        SvXMLExport::setSourceDocument(xDoc);
 }




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to