User: obo     
Date: 2006/07/10 08:06:16

Modified:
   dba/dbaccess/source/core/api/querycomposer.cxx

Log:
 INTEGRATION: CWS qiq (1.63.18); FILE MERGED
 2006/06/28 10:31:07 fs 1.63.18.2: #i10000#
 2006/05/10 14:22:26 fs 1.63.18.1: no need to instantiate a 
SingleSelectQueryComposer directly

File Changes:

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

File [changed]: querycomposer.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/querycomposer.cxx?r1=1.63&r2=1.64
Delta lines:  +4 -24
--------------------
--- querycomposer.cxx   7 Apr 2006 14:10:56 -0000       1.63
+++ querycomposer.cxx   10 Jul 2006 15:06:14 -0000      1.64
@@ -96,9 +96,6 @@
 #ifndef DBA_HELPERCOLLECTIONS_HXX
 #include "HelperCollections.hxx"
 #endif
-#ifndef DBACCESS_CORE_API_SINGLESELECTQUERYCOMPOSER_HXX
-#include "SingleSelectQueryComposer.hxx"
-#endif
 #ifndef DBACCESS_SOURCE_CORE_INC_COMPOSERTOOLS_HXX
 #include "composertools.hxx"
 #endif
@@ -124,32 +121,15 @@
 
 DBG_NAME(OQueryComposer)
 // -------------------------------------------------------------------------
-OQueryComposer::OQueryComposer(const Reference< XNameAccess>& _xTableSupplier,
-                                                          const Reference< 
XConnection>& _xConnection,
-                                                          const Reference< 
XMultiServiceFactory >& _xServiceFactory)
+OQueryComposer::OQueryComposer(const Reference< XConnection>& _xConnection)
  : OSubComponent(m_aMutex,_xConnection)
 {
        DBG_CTOR(OQueryComposer,NULL);
        OSL_ENSURE(_xConnection.is()," Connection cant be null!");
 
-       try
-       {
-               Reference<XMultiServiceFactory> xFac(_xConnection,UNO_QUERY);
-               if ( xFac.is() )
-               {
-                       m_xComposer.set( xFac->createInstance( 
SERVICE_NAME_SINGLESELECTQUERYCOMPOSER ), UNO_QUERY );
-                       m_xComposerHelper.set( xFac->createInstance( 
SERVICE_NAME_SINGLESELECTQUERYCOMPOSER ), UNO_QUERY );
-               }
-               else
-               {
-            m_xComposer = new 
OSingleSelectQueryComposer(_xTableSupplier,_xConnection, _xServiceFactory );
-                       m_xComposerHelper = new 
OSingleSelectQueryComposer(_xTableSupplier,_xConnection, _xServiceFactory );
-               }
-       }
-       catch(Exception)
-       {
-       }
-    OSL_ENSURE( m_xComposer.is(), "OQueryComposer::OQueryComposer: Composer 
copuld be created!" );
+       Reference<XMultiServiceFactory> xFac( _xConnection, UNO_QUERY_THROW );
+       m_xComposer.set( xFac->createInstance( 
SERVICE_NAME_SINGLESELECTQUERYCOMPOSER ), UNO_QUERY_THROW );
+       m_xComposerHelper.set( xFac->createInstance( 
SERVICE_NAME_SINGLESELECTQUERYCOMPOSER ), UNO_QUERY_THROW );
 }
 // -------------------------------------------------------------------------
 OQueryComposer::~OQueryComposer()




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

Reply via email to