Tag: cws_src680_dba205b User: oj Date: 2006/07/31 03:00:38 Modified: dba/dbaccess/source/ui/app/AppControllerDnD.cxx
Log: #i67017# copy all properties File Changes: Directory: /dba/dbaccess/source/ui/app/ ======================================= File [changed]: AppControllerDnD.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppControllerDnD.cxx?r1=1.16&r2=1.16.20.1 Delta lines: +9 -27 -------------------- --- AppControllerDnD.cxx 10 Jul 2006 15:22:54 -0000 1.16 +++ AppControllerDnD.cxx 31 Jul 2006 10:00:35 -0000 1.16.20.1 @@ -4,9 +4,9 @@ * * $RCSfile: AppControllerDnD.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.16.20.1 $ * - * last change: $Author: obo $ $Date: 2006/07/10 15:22:54 $ + * last change: $Author: oj $ $Date: 2006/07/31 10:00:35 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -39,6 +39,9 @@ #ifndef _COMPHELPER_SEQUENCE_HXX_ #include <comphelper/sequence.hxx> #endif +#ifndef _COMPHELPER_PROPERTY_HXX_ +#include <comphelper/property.hxx> +#endif #ifndef DBACCESS_SHARED_DBUSTRINGS_HRC #include "dbustrings.hrc" #endif @@ -732,7 +735,6 @@ // read all nescessary data ::rtl::OUString sCommand; - sal_Bool bEscapeProcessing = sal_True; _rPasteData[daCommand] >>= sCommand; if ( _rPasteData.has(daEscapeProcessing) ) @@ -751,11 +753,6 @@ return sal_False; } - // three properties we can set only if we have a query object as source - ::rtl::OUString sUpdateTableName; - ::rtl::OUString sUpdateSchemaName; - ::rtl::OUString sUpdateCatalogName; - // the target object name (as we'll suggest it to the user) String sTargetName; Reference< XNameAccess > xQueries; @@ -772,6 +769,7 @@ OSL_ENSURE(0,"could not create query default name!"); } + Reference< XPropertySet > xQuery; if (CommandType::QUERY == nCommandType) { // need to extract the statement and the escape processing flag from the query object @@ -779,7 +777,6 @@ try { // the concrete query - Reference< XPropertySet > xQuery; Reference<XQueryDefinitionsSupplier> xSourceQuerySup(getDataSourceByName_displayError( m_xDatabaseContext, sDataSourceName, getView(), getORB(), true ),UNO_QUERY); if ( xSourceQuerySup.is() ) xQueries.set(xSourceQuerySup->getQueryDefinitions(),UNO_QUERY); @@ -787,18 +784,7 @@ if ( xQueries.is() && xQueries->hasByName(sCommand) ) { xQuery.set(xQueries->getByName(sCommand),UNO_QUERY); - - if (xQuery.is()) - { - // extract all the properties we're interested in - xQuery->getPropertyValue(PROPERTY_COMMAND) >>= sCommand; - xQuery->getPropertyValue(PROPERTY_USE_ESCAPE_PROCESSING) >>= bEscapeProcessing; - - xQuery->getPropertyValue(PROPERTY_UPDATE_TABLENAME) >>= sUpdateTableName; - xQuery->getPropertyValue(PROPERTY_UPDATE_SCHEMANAME) >>= sUpdateSchemaName; - xQuery->getPropertyValue(PROPERTY_UPDATE_CATALOGNAME) >>= sUpdateCatalogName; - bSuccess = sal_True; - } + bSuccess = xQuery.is(); xQueries.clear(); } } @@ -844,11 +830,7 @@ if (xNewQuery.is()) { // initialize - xNewQuery->setPropertyValue( PROPERTY_COMMAND, makeAny(sCommand) ); - xNewQuery->setPropertyValue( PROPERTY_USE_ESCAPE_PROCESSING, makeAny(bEscapeProcessing) ); - xNewQuery->setPropertyValue( PROPERTY_UPDATE_TABLENAME, makeAny(sUpdateTableName) ); - xNewQuery->setPropertyValue( PROPERTY_UPDATE_SCHEMANAME, makeAny(sUpdateSchemaName) ); - xNewQuery->setPropertyValue( PROPERTY_UPDATE_CATALOGNAME, makeAny(sUpdateCatalogName) ); + ::comphelper::copyProperties(xQuery,xNewQuery); // insert xDestQueries->insertByName( sTargetName, makeAny(xNewQuery) ); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
