Tag: cws_src680_dba24
User: oj      
Date: 05/02/27 23:06:01

Modified:
 /dba/dbaccess/source/core/dataaccess/
  datasource.cxx

Log:
 #i43628# #i43627# check impl and reinvent service datasource

File Changes:

Directory: /dba/dbaccess/source/core/dataaccess/
================================================

File [changed]: datasource.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/datasource.cxx?r1=1.53.2.8&r2=1.53.2.9
Delta lines:  +171 -144
-----------------------
--- datasource.cxx      25 Feb 2005 10:29:46 -0000      1.53.2.8
+++ datasource.cxx      28 Feb 2005 07:05:58 -0000      1.53.2.9
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: datasource.cxx,v $
  *
- *  $Revision: 1.53.2.8 $
+ *  $Revision: 1.53.2.9 $
  *
- *  last change: $Author: oj $ $Date: 2005/02/25 10:29:46 $
+ *  last change: $Author: oj $ $Date: 2005/02/28 07:05:58 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -516,6 +516,18 @@
 //============================================================
 DBG_NAME(ODatabaseSource)
 //--------------------------------------------------------------------------
+extern "C" void SAL_CALL createRegistryInfo_ODatabaseSource()
+{
+       static OMultiInstanceAutoRegistration< ODatabaseSource > 
aAutoRegistration;
+}
+//--------------------------------------------------------------------------
+Reference< XInterface > ODatabaseSource_CreateInstance(const Reference< 
XMultiServiceFactory >& _rxFactory)
+{
+    Reference< XSingleServiceFactory > 
xDb(_rxFactory->createInstance(SERVICE_SDB_DATABASECONTEXT),UNO_QUERY);
+    return xDb->createInstance(  );
+}
+
+//--------------------------------------------------------------------------
 ODatabaseSource::ODatabaseSource(const ::rtl::Reference<ODatabaseModelImpl>& 
_pImpl)
                        :OSubComponent(m_aMutex, Reference< XInterface >())
                        ,OPropertySetHelper(OComponentHelper::rBHelper)
@@ -631,6 +643,12 @@
 {
        return getSupportedServiceNames_Static();
 }
+//------------------------------------------------------------------------------
+Reference< XInterface > ODatabaseSource::Create(const Reference< 
XMultiServiceFactory >& _rxFactory)
+{
+       return ODatabaseSource_CreateInstance(_rxFactory);
+}
+
 
 
//------------------------------------------------------------------------------
 Sequence< ::rtl::OUString > ODatabaseSource::getSupportedServiceNames_Static(  
) throw (RuntimeException)
@@ -781,10 +799,12 @@
 
//------------------------------------------------------------------------------
 sal_Bool ODatabaseSource::convertFastPropertyValue(Any & rConvertedValue, Any 
& rOldValue, sal_Int32 nHandle, const Any& rValue ) throw( 
IllegalArgumentException  )
 {
+    sal_Bool bModified(sal_False);
+    if ( m_pImpl.is() )
+    {
        if (m_pImpl->m_bReadOnly)
                throw IllegalArgumentException();
 
-       sal_Bool bModified(sal_False);
        switch (nHandle)
        {
                case PROPERTY_ID_TABLEFILTER:
@@ -849,12 +869,15 @@
                default:
                        DBG_ERROR("unknown Property");
        }
+    }
        return bModified;
 }
 
 
//------------------------------------------------------------------------------
 void ODatabaseSource::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, 
const Any& rValue ) throw (Exception)
 {
+    if ( m_pImpl.is() )
+    {
        switch(nHandle)
        {
                case PROPERTY_ID_TABLEFILTER:
@@ -888,11 +911,14 @@
                        break;
        }
        m_pImpl->setModified(sal_True);
+    }
 }
 
 
//------------------------------------------------------------------------------
 void ODatabaseSource::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) 
const
 {
+    if ( m_pImpl.is() )
+    {
        switch (nHandle)
        {
                case PROPERTY_ID_TABLEFILTER:
@@ -934,6 +960,7 @@
                default:
                        DBG_ERROR("unknown Property");
        }
+    }
 }
 
 // XDataSource




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

Reply via email to