Tag: cws_src680_hsqlcsv
User: fs      
Date: 2006/09/18 05:17:07

Modified:
   dba/dbaccess/source/ui/app/AppController.cxx
   dba/dbaccess/source/ui/app/AppControllerDnD.cxx
   dba/dbaccess/source/ui/app/AppDetailPageHelper.cxx

Log:
 refactored the QueryDesignAccess clas hierarchy for extension for #i69526#

File Changes:

Directory: /dba/dbaccess/source/ui/app/
=======================================

File [changed]: AppController.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.cxx?r1=1.32.10.1&r2=1.32.10.2
Delta lines:  +24 -20
---------------------
--- AppController.cxx   14 Sep 2006 11:55:26 -0000      1.32.10.1
+++ AppController.cxx   18 Sep 2006 12:17:04 -0000      1.32.10.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppController.cxx,v $
  *
- *  $Revision: 1.32.10.1 $
+ *  $Revision: 1.32.10.2 $
  *
- *  last change: $Author: fs $ $Date: 2006/09/14 11:55:26 $
+ *  last change: $Author: fs $ $Date: 2006/09/18 12:17:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -157,8 +157,8 @@
 #ifndef _COMPHELPER_UNO3_HXX_
 #include <comphelper/uno3.hxx>
 #endif
-#ifndef _DBAUI_QUERYDESIGNACCESS_HXX_
-#include "querydesignaccess.hxx"
+#ifndef DBACCESS_DATABASE_OBJECT_VIEW_HXX
+#include "databaseobjectview.hxx"
 #endif
 #ifndef _SV_SVAPP_HXX //autogen
 #include <vcl/svapp.hxx>
@@ -1154,9 +1154,11 @@
                     SharedConnection xConnection( ensureConnection() );
                                        if ( xConnection.is() )
                                        {
-                                               OQueryDesignAccess 
aHelper(getORB(),sal_True,SID_DB_NEW_VIEW_SQL == _nId );
-                                               Reference< XComponent > 
xComponent(aHelper.create(Reference<XDataSource>(m_xDataSource,UNO_QUERY),xConnection),UNO_QUERY);
-                                               
addDocumentListener(xComponent,NULL);
+                                               QueryDesigner aDesigner( 
getORB(), xConnection, sal_True, SID_DB_NEW_VIEW_SQL == _nId );
+
+                        Reference< XDataSource > xDataSource( m_xDataSource, 
UNO_QUERY );
+                                               Reference< XComponent > 
xComponent( aDesigner.createNew( xDataSource ), UNO_QUERY );
+                                               addDocumentListener( 
xComponent, NULL );
                                        }
                                }
                                break;
@@ -1200,9 +1202,10 @@
                                        SharedConnection xConnection( 
ensureConnection() );
                                        if ( xConnection.is() )
                                        {
-                                               ORelationDesignAccess 
aHelper(getORB());
-                                               Reference< XComponent > 
xComponent(aHelper.create(Reference<XDataSource>(m_xDataSource,UNO_QUERY), 
xConnection),UNO_QUERY);
-                                               
addDocumentListener(xComponent,NULL);
+                                               RelationDesigner aDesigner( 
getORB(), xConnection );
+                        Reference< XDataSource > xDataSource( m_xDataSource, 
UNO_QUERY );
+                                               Reference< XComponent > 
xComponent( aDesigner.createNew( xDataSource ), UNO_QUERY );
+                                               addDocumentListener( 
xComponent, NULL );
                                        }
                                }
                                break;
@@ -1637,27 +1640,27 @@
                case E_QUERY:
                case E_TABLE:
                        {
-                               ::std::auto_ptr< ODesignAccess> pDispatcher;
                                SharedConnection xConnection( 
ensureConnection() );
                                if ( xConnection.is() )
                                {
+                                   ::std::auto_ptr< DatabaseObjectView > 
pDesigner;
                                        Sequence < PropertyValue > aArgs;
                                        Any aDataSource;
                                        if ( _eOpenMode == 
OLinkedDocumentsAccess::OPEN_DESIGN )
                                        {
                                                if ( _eType == E_TABLE )
                                                {
-                                                       pDispatcher.reset(new 
OTableDesignAccess(getORB()));
+                                                       pDesigner.reset( new 
TableDesigner( getORB(), xConnection ) );
                                                }
                                                else
                                                {
-                                                       pDispatcher.reset(new 
OQueryDesignAccess(getORB(), sal_False, sal_False));
+                                                       pDesigner.reset( new 
QueryDesigner( getORB(), xConnection, sal_False, sal_False ) );
                                                }
                                                aDataSource <<= m_xDataSource;
                                        }
                                        else
                                        {
-                                               pDispatcher.reset(new 
OTableAccess(getORB(),_eType == E_TABLE));
+                                               pDesigner.reset( new 
ResultSetBrowser( getORB(), xConnection, _eType == E_TABLE ) );
 
                                                aArgs.realloc(1);
                                                aArgs[0].Name = 
PROPERTY_SHOWMENU;
@@ -1666,8 +1669,8 @@
                                                aDataSource <<= 
getDatabaseName();
                                        }
 
-                                       Reference< XComponent > 
xComponent(pDispatcher->edit(aDataSource, _sName,xConnection,aArgs),UNO_QUERY);
-                                       addDocumentListener(xComponent,NULL);
+                                       Reference< XComponent > xComponent( 
pDesigner->openExisting( aDataSource, _sName, aArgs ), UNO_QUERY );
+                                       addDocumentListener( xComponent, NULL );
                                }
                        }
                        break;
@@ -1765,19 +1768,20 @@
                case E_QUERY:
                case E_TABLE:
                        {
-                               ::std::auto_ptr< ODesignAccess> pDispatcher;
+                               ::std::auto_ptr< DatabaseObjectView > pDesigner;
                                SharedConnection xConnection( 
ensureConnection() );
                                if ( xConnection.is() )
                                {
                                        if ( _eType == E_TABLE )
                                        {
-                                               pDispatcher.reset(new 
OTableDesignAccess(getORB()));
+                                               pDesigner.reset( new 
TableDesigner( getORB(), xConnection ) );
                                        }
                                        else
                                        {
-                                               pDispatcher.reset(new 
OQueryDesignAccess(getORB(), sal_False, _bSQLView));
+                                               pDesigner.reset( new 
QueryDesigner( getORB(), xConnection, sal_False, _bSQLView ) );
                                        }
-                                       Reference< XComponent > 
xComponent(pDispatcher->create(Reference<XDataSource>(m_xDataSource,UNO_QUERY), 
xConnection),UNO_QUERY);
+                    Reference< XDataSource > xDataSource( m_xDataSource, 
UNO_QUERY );
+                                       Reference< XComponent > xComponent( 
pDesigner->createNew( xDataSource ), UNO_QUERY );
                                        addDocumentListener(xComponent,NULL);
                                }
                        }

File [changed]: AppControllerDnD.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppControllerDnD.cxx?r1=1.16.22.1&r2=1.16.22.2
Delta lines:  +2 -5
-------------------
--- AppControllerDnD.cxx        14 Sep 2006 11:55:26 -0000      1.16.22.1
+++ AppControllerDnD.cxx        18 Sep 2006 12:17:04 -0000      1.16.22.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppControllerDnD.cxx,v $
  *
- *  $Revision: 1.16.22.1 $
+ *  $Revision: 1.16.22.2 $
  *
- *  last change: $Author: fs $ $Date: 2006/09/14 11:55:26 $
+ *  last change: $Author: fs $ $Date: 2006/09/18 12:17:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -146,9 +146,6 @@
 #endif
 #ifndef _COMPHELPER_UNO3_HXX_
 #include <comphelper/uno3.hxx>
-#endif
-#ifndef _DBAUI_QUERYDESIGNACCESS_HXX_
-#include "querydesignaccess.hxx"
 #endif
 #ifndef _SV_SVAPP_HXX //autogen
 #include <vcl/svapp.hxx>

File [changed]: AppDetailPageHelper.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppDetailPageHelper.cxx?r1=1.15.12.2&r2=1.15.12.3
Delta lines:  +9 -6
-------------------
--- AppDetailPageHelper.cxx     18 Sep 2006 09:00:20 -0000      1.15.12.2
+++ AppDetailPageHelper.cxx     18 Sep 2006 12:17:04 -0000      1.15.12.3
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppDetailPageHelper.cxx,v $
  *
- *  $Revision: 1.15.12.2 $
+ *  $Revision: 1.15.12.3 $
  *
- *  last change: $Author: fs $ $Date: 2006/09/18 09:00:20 $
+ *  last change: $Author: fs $ $Date: 2006/09/18 12:17:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -134,8 +134,8 @@
 #ifndef _DBACCESS_SLOTID_HRC_
 #include "dbaccess_slotid.hrc"
 #endif
-#ifndef _DBAUI_QUERYDESIGNACCESS_HXX_
-#include "querydesignaccess.hxx"
+#ifndef DBACCESS_DATABASE_OBJECT_VIEW_HXX
+#include "databaseobjectview.hxx"
 #endif
 #ifndef DBACCESS_IMAGEPROVIDER_HXX
 #include "imageprovider.hxx"
@@ -1108,7 +1108,10 @@
                        {
                        }
                }
-               ::std::auto_ptr< ODesignAccess> pDispatcher( new 
OTableAccess(getBorderWin()->getView()->getORB(),_bTable,Reference<XComponentLoader>(m_xFrame,UNO_QUERY)));
+               ::std::auto_ptr< DatabaseObjectView > pDispatcher( new 
ResultSetBrowser(
+            getBorderWin()->getView()->getORB(), _xConnection, _bTable
+        ) );
+        pDispatcher->setTargetFrame( m_xFrame );
 
                Sequence < PropertyValue > aArgs( 4 );
                aArgs[0].Name = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Preview"));
@@ -1120,7 +1123,7 @@
                aArgs[3].Name = PROPERTY_SHOWMENU;
                aArgs[3].Value <<= sal_False;
 
-               Reference<XFrame> 
xFrame(pDispatcher->edit(makeAny(_sDataSourceName), 
_sName,_xConnection,aArgs),UNO_QUERY);
+               Reference<XFrame> xFrame( pDispatcher->openExisting( makeAny( 
_sDataSourceName ), _sName, aArgs ), UNO_QUERY );
                sal_Bool bClearPreview = !xFrame.is();
 
                // clear the preview when the query or table could not be loaded




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

Reply via email to