summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/browser/sbagrid.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/browser/sbagrid.cxx')
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx25
1 files changed, 8 insertions, 17 deletions
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 60bed33b48ae..bb0784c0ce53 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -1440,39 +1440,30 @@ void SbaGridControl::DoRowDrag( sal_Int16 nRowPos )
// -----------------------------------------------------------------------
void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfClipboardFalseIfDrag )
{
- Reference< XPropertySet > xDataSource(getDataSource(), UNO_QUERY);
- DBG_ASSERT(xDataSource.is(), "SbaGridControl::implTransferSelectedRows : invalid data source !");
+ Reference< XPropertySet > xForm( getDataSource(), UNO_QUERY );
+ DBG_ASSERT( xForm.is(), "SbaGridControl::implTransferSelectedRows: invalid form!" );
// build the sequence of numbers of selected rows
Sequence< Any > aSelectedRows;
+ sal_Bool bSelectionBookmarks = sal_True;
// collect the affected rows
if ((GetSelectRowCount() == 0) && (nRowPos >= 0))
{
- aSelectedRows.realloc(1);
+ aSelectedRows.realloc( 1 );
aSelectedRows[0] <<= (sal_Int32)(nRowPos + 1);
+ bSelectionBookmarks = sal_False;
}
else if ( !IsAllSelected() && GetSelectRowCount() )
{
- aSelectedRows.realloc(GetSelectRowCount());
- Any* pSelectedRows = aSelectedRows.getArray();
-
- for (long nIdx = FirstSelectedRow();
- nIdx >= 0;
- nIdx = NextSelectedRow(), ++pSelectedRows)
- {
- (*pSelectedRows) <<= (sal_Int32)(nIdx + 1);
- }
+ aSelectedRows = getSelectionBookmarks();
+ bSelectionBookmarks = sal_True;
}
Reference< XResultSet> xRowSetClone;
try
{
- Reference< XResultSetAccess > xResultSetAccess(xDataSource,UNO_QUERY);
- if ( xResultSetAccess.is() )
- xRowSetClone = xResultSetAccess->createResultSet();
-
- ODataClipboard* pTransfer = new ODataClipboard(xDataSource, aSelectedRows,xRowSetClone, getServiceManager());
+ ODataClipboard* pTransfer = new ODataClipboard( xForm, aSelectedRows, bSelectionBookmarks, getServiceManager() );
Reference< XTransferable > xEnsureDelete = pTransfer;
if ( _bTrueIfClipboardFalseIfDrag )