Tag: cws_src680_dba201
User: oj      
Date: 05/04/28 23:01:54

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

Log:
 #i47363# new format for report and forms

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.20.6.3&r2=1.20.6.4
Delta lines:  +12 -9
--------------------
--- AppController.cxx   26 Apr 2005 10:47:11 -0000      1.20.6.3
+++ AppController.cxx   29 Apr 2005 06:01:51 -0000      1.20.6.4
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: AppController.cxx,v $
  *
- *  $Revision: 1.20.6.3 $
+ *  $Revision: 1.20.6.4 $
  *
- *  last change: $Author: oj $ $Date: 2005/04/26 10:47:11 $
+ *  last change: $Author: oj $ $Date: 2005/04/29 06:01:51 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -344,6 +344,7 @@
 //====================================================================
 //= OApplicationController
 //====================================================================
+DBG_NAME(OApplicationController)
 //--------------------------------------------------------------------
 OApplicationController::OApplicationController(const Reference< 
XMultiServiceFactory >& _rxORB)
        :OApplicationController_CBASE( _rxORB )
@@ -356,6 +357,8 @@
        ,m_eOldType(E_NONE)
     ,m_aTableCopyHelper(this)
 {
+    DBG_CTOR(OApplicationController,NULL);
+
        m_aTypeCollection.initUserDriverTypes(_rxORB);
 }
 
//------------------------------------------------------------------------------
@@ -370,6 +373,8 @@
        }
        ::std::auto_ptr< Window> aTemp(m_pView);
        m_pView = NULL;
+
+    DBG_DTOR(OApplicationController,NULL);
 }
 //--------------------------------------------------------------------
 
IMPLEMENT_FORWARD_XTYPEPROVIDER2(OApplicationController,OApplicationController_CBASE,OApplicationController_Base)
@@ -647,7 +652,7 @@
                                                aReturn.bEnabled = 
!isDataSourceReadOnly() && 
getViewClipboard().HasFormat(SOT_FORMATSTR_ID_DBACCESS_QUERY);
                                                break;
                                        default:
-                                               aReturn.bEnabled = 
!isDataSourceReadOnly() && 
OComponentTransferable::canExtractComponentDescriptor(getViewClipboard().GetDataFlavorExVector());
+                                               aReturn.bEnabled = 
!isDataSourceReadOnly() && 
OComponentTransferable::canExtractComponentDescriptor(getViewClipboard().GetDataFlavorExVector(),getContainer()->getElementType()
 == E_FORM);
                                }
                                break;
                        case SID_DB_APP_PASTE_SPECIAL:
@@ -793,16 +798,14 @@
                        case SID_DB_APP_DSPROPS:
                                if ( aReturn.bEnabled = m_xDataSource.is() )
                                {
-                                       static ODsnTypeCollection 
aTypeCollection;
-                                       DATASOURCE_TYPE eType = 
aTypeCollection.getType(::comphelper::getString(m_xDataSource->getPropertyValue(PROPERTY_URL)));
+                                       DATASOURCE_TYPE eType = 
m_aTypeCollection.getType(::comphelper::getString(m_xDataSource->getPropertyValue(PROPERTY_URL)));
                                        aReturn.bEnabled = DST_EMBEDDED != 
eType && DST_MOZILLA != eType && DST_EVOLUTION != eType && DST_OUTLOOK != eType 
&& DST_OUTLOOKEXP != eType;
                                }
                                break;
                        case SID_DB_APP_DSCONNECTION_TYPE:
                                if ( aReturn.bEnabled = !isDataSourceReadOnly() 
&& m_xDataSource.is() )
                                {
-                                       static ODsnTypeCollection 
aTypeCollection;
-                                       DATASOURCE_TYPE eType = 
aTypeCollection.getType(::comphelper::getString(m_xDataSource->getPropertyValue(PROPERTY_URL)));
+                                       DATASOURCE_TYPE eType = 
m_aTypeCollection.getType(::comphelper::getString(m_xDataSource->getPropertyValue(PROPERTY_URL)));
                                        aReturn.bEnabled = DST_EMBEDDED != 
eType;
                                }
                                break;
@@ -2217,7 +2220,7 @@
                                return DND_ACTION_COPY;
                        if ( eType == E_FORM || eType == E_REPORT )
                        {
-                               sal_Int8 nAction = 
OComponentTransferable::canExtractComponentDescriptor(_rFlavors) ? 
DND_ACTION_COPY : DND_ACTION_NONE;
+                               sal_Int8 nAction = 
OComponentTransferable::canExtractComponentDescriptor(_rFlavors,eType == 
E_FORM) ? DND_ACTION_COPY : DND_ACTION_NONE;
                                if ( nAction != DND_ACTION_NONE )
                                {
                                        SvLBoxEntry* pHitEntry = 
pView->getEntry(_rEvt.maPosPixel);
@@ -2288,7 +2291,7 @@
                m_nAsyncDrop = Application::PostUserEvent(LINK(this, 
OApplicationController, OnAsyncDrop));
                return DND_ACTION_COPY;
        }
-       else if ( 
OComponentTransferable::canExtractComponentDescriptor(aDroppedData.GetDataFlavorExVector())
 )
+       else if ( 
OComponentTransferable::canExtractComponentDescriptor(aDroppedData.GetDataFlavorExVector(),m_aAsyncDrop.nType
 == E_FORM) )
        {
                m_aAsyncDrop.aDroppedData = 
OComponentTransferable::extractComponentDescriptor(aDroppedData);
                SvLBoxEntry* pHitEntry = pView->getEntry(_rEvt.maPosPixel);




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

Reply via email to