diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-23 10:58:54 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-23 10:58:54 +0000 |
commit | 40bbc02981deb95ef799046c9a232dba8f375fe0 (patch) | |
tree | 9b4ad5c55d438fcc9ad4e7dca4cd8e2e366c8842 /svx/source/fmcomp/fmgridcl.cxx | |
parent | 5f90f399befdefdc684316ffb42abdc9d484e901 (diff) |
INTEGRATION: CWS dba201b (1.49.116); FILE MERGED
2005/09/21 17:12:21 oj 1.49.116.2: RESYNC: (1.49-1.50); FILE MERGED
2005/07/21 14:24:31 fs 1.49.116.1: #i52267# DnD: also recognize connections which are part of the descriptor
Diffstat (limited to 'svx/source/fmcomp/fmgridcl.cxx')
-rw-r--r-- | svx/source/fmcomp/fmgridcl.cxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index dde68a7310da..a75be129b0f4 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -4,9 +4,9 @@ * * $RCSfile: fmgridcl.cxx,v $ * - * $Revision: 1.50 $ + * $Revision: 1.51 $ * - * last change: $Author: rt $ $Date: 2005-09-08 22:45:23 $ + * last change: $Author: hr $ $Date: 2005-09-23 11:58:54 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -408,9 +408,15 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt ) if (aColumn.has(daColumnObject))aColumn[daColumnObject] >>= xField; if (aColumn.has(daConnection)) aColumn[daConnection] >>= xConnection; - if (!sFieldName.getLength() || !sCommand.getLength() || !sDatasouce.getLength()) + if ( !sFieldName.getLength() + || !sCommand.getLength() + || ( !sDatasouce.getLength() + && !sDatabaseLocation.getLength() + && !xConnection.is() + ) + ) { - DBG_ERROR("FmGridHeader::ExecuteDrop: somebody started a nonsense drag operation!!"); + DBG_ERROR( "FmGridHeader::ExecuteDrop: somebody started a nonsense drag operation!!" ); return DND_ACTION_NONE; } @@ -421,7 +427,8 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt ) { // the transferable did not contain the connection -> build an own one try { - xConnection = OStaticDataAccessTools().getConnection_withFeedback(sDatasouce, ::rtl::OUString(),::rtl::OUString(),static_cast<FmGridControl*>(GetParent())->getServiceManager()); + ::rtl::OUString sSignificantSource( sDatasouce.getLength() ? sDatasouce : sDatabaseLocation ); + xConnection = OStaticDataAccessTools().getConnection_withFeedback(sSignificantSource, ::rtl::OUString(),::rtl::OUString(),static_cast<FmGridControl*>(GetParent())->getServiceManager()); } catch(NoSuchElementException&) { // allowed, means sDatasouce isn't a valid data source name .... |