Tag: cws_src680_dba24d
User: fs      
Date: 2007-11-22 13:09:44+0000
Modified:
   dba/dbaccess/source/core/api/RowSet.cxx
   dba/dbaccess/source/core/api/RowSet.hxx

Log:
 #i81658# moved the DBA services to use the helpers in 
unotools/componentresmodule resp. comphelper/componentmodule. Those helpers 
allow for old- and new-style singletons to co-exist, which wasn't the case for 
the old helpers previously found in dba_reghelper.hxx

File Changes:

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

File [changed]: RowSet.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSet.cxx?r1=1.153.70.1&r2=1.153.70.2
Delta lines:  +15 -20
---------------------
--- RowSet.cxx  2007-11-08 14:10:57+0000        1.153.70.1
+++ RowSet.cxx  2007-11-22 13:09:41+0000        1.153.70.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RowSet.cxx,v $
  *
- *  $Revision: 1.153.70.1 $
+ *  $Revision: 1.153.70.2 $
  *
- *  last change: $Author: fs $ $Date: 2007/11/08 14:10:57 $
+ *  last change: $Author: fs $ $Date: 2007/11/22 13:09:41 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -36,18 +36,12 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_dbaccess.hxx"
 
-#ifndef DBACCESS_CORE_API_ROWSET_HXX
 #include "RowSet.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBASTRINGS_HRC
 #include "dbastrings.hrc"
-#endif
-#ifndef DBACORE_SDBCORETOOLS_HXX
 #include "sdbcoretools.hxx"
-#endif
-#ifndef DBACCESS_CORE_API_SINGLESELECTQUERYCOMPOSER_HXX
 #include "SingleSelectQueryComposer.hxx"
-#endif
+#include "module_dba.hxx"
+
 #ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #endif
@@ -66,6 +60,9 @@
 #ifndef _COMPHELPER_SEQUENCE_HXX_
 #include <comphelper/sequence.hxx>
 #endif
+#ifndef COMPHELPER_COMPONENTCONTEXT_HXX
+#include <comphelper/componentcontext.hxx>
+#endif
 #ifndef _COM_SUN_STAR_SDB_XCOMPLETEDCONNECTION_HPP_
 #include <com/sun/star/sdb/XCompletedConnection.hpp>
 #endif
@@ -117,9 +114,6 @@
 #ifndef DBACCESS_CORE_API_ROWSETCACHE_HXX
 #include "RowSetCache.hxx"
 #endif
-#ifndef _DBA_REGHELPER_HXX_
-#include "dba_reghelper.hxx"
-#endif
 #if OSL_DEBUG_LEVEL > 1
 #ifndef _COM_SUN_STAR_SDBC_XDRIVERMANAGER_HPP_
 #include <com/sun/star/sdbc/XDriverManager.hpp>
@@ -228,7 +222,7 @@
 //--------------------------------------------------------------------------
 extern "C" void SAL_CALL createRegistryInfo_ORowSet()
 {
-       static OMultiInstanceAutoRegistration< ORowSet > aAutoRegistration;
+       static ::dba::OAutoRegistration< ORowSet > aAutoRegistration;
 }
 // 
-----------------------------------------------------------------------------
 
@@ -591,7 +585,7 @@
        return aRet;
 }
 
//------------------------------------------------------------------------------
-rtl::OUString ORowSet::getImplementationName_Static(  ) throw(RuntimeException)
+rtl::OUString ORowSet::getImplementationName_static(  ) throw(RuntimeException)
 {
        return rtl::OUString::createFromAscii("com.sun.star.comp.dba.ORowSet");
 }
@@ -599,7 +593,7 @@
 // ::com::sun::star::XServiceInfo
 ::rtl::OUString SAL_CALL ORowSet::getImplementationName(  ) 
throw(RuntimeException)
 {
-       return getImplementationName_Static();
+       return getImplementationName_static();
 }
 // -------------------------------------------------------------------------
 sal_Bool SAL_CALL ORowSet::supportsService( const ::rtl::OUString& 
_rServiceName ) throw(RuntimeException)
@@ -607,7 +601,7 @@
        return ::comphelper::findValue(getSupportedServiceNames(), 
_rServiceName, sal_True).getLength() != 0;
 }
 
//------------------------------------------------------------------------------
-Sequence< ::rtl::OUString > ORowSet::getSupportedServiceNames_Static(  ) throw 
(RuntimeException)
+Sequence< ::rtl::OUString > ORowSet::getSupportedServiceNames_static(  ) throw 
(RuntimeException)
 {
        Sequence< rtl::OUString > aSNS( 5 );
        aSNS[0] = SERVICE_SDBC_RESULTSET;
@@ -620,12 +614,13 @@
 // -------------------------------------------------------------------------
 Sequence< ::rtl::OUString > SAL_CALL ORowSet::getSupportedServiceNames(  ) 
throw(RuntimeException)
 {
-       return getSupportedServiceNames_Static();
+       return getSupportedServiceNames_static();
 }
 
//------------------------------------------------------------------------------
-Reference< XInterface > ORowSet::Create(const Reference< XMultiServiceFactory 
>& _rxFactory)
+Reference< XInterface > ORowSet::Create(const Reference< XComponentContext >& 
_rxContext)
 {
-       return ORowSet_CreateInstance(_rxFactory);
+    ::comphelper::ComponentContext aContext( _rxContext );
+       return ORowSet_CreateInstance( aContext.getLegacyServiceFactory() );
 }
 // -------------------------------------------------------------------------
 // OComponentHelper

File [changed]: RowSet.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSet.hxx?r1=1.48&r2=1.48.70.1
Delta lines:  +6 -6
-------------------
--- RowSet.hxx  2007-07-06 07:52:06+0000        1.48
+++ RowSet.hxx  2007-11-22 13:09:41+0000        1.48.70.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RowSet.hxx,v $
  *
- *  $Revision: 1.48 $
+ *  $Revision: 1.48.70.1 $
  *
- *  last change: $Author: rt $ $Date: 2007/07/06 07:52:06 $
+ *  last change: $Author: fs $ $Date: 2007/11/22 13:09:41 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -306,10 +306,10 @@
                virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > 
SAL_CALL getSupportedServiceNames(  ) 
throw(::com::sun::star::uno::RuntimeException);
 
        // ::com::sun::star::lang::XServiceInfo - static methods
-               static ::com::sun::star::uno::Sequence< ::rtl::OUString > 
getSupportedServiceNames_Static(void) throw( 
::com::sun::star::uno::RuntimeException );
-               static ::rtl::OUString getImplementationName_Static(void) 
throw( ::com::sun::star::uno::RuntimeException );
+               static ::com::sun::star::uno::Sequence< ::rtl::OUString > 
getSupportedServiceNames_static(void) throw( 
::com::sun::star::uno::RuntimeException );
+               static ::rtl::OUString getImplementationName_static(void) 
throw( ::com::sun::star::uno::RuntimeException );
                static ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface >
-                               SAL_CALL Create(const 
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory 
>&);
+                               SAL_CALL Create(const 
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
 
        // OComponentHelper
                virtual void SAL_CALL disposing(void);




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

Reply via email to