INTEGRATION: CWS os49 (1.46.58); FILE MERGED

2005/03/01 14:03:29 os 1.46.58.2: #i40413# don't remove selected element on ::drop() in mail merge
2005/01/20 11:08:05 mbu 1.46.58.1: #i40413
This commit is contained in:
Vladimir Glazounov 2005-03-07 16:31:54 +00:00
parent adffe02bb6
commit bd2690e404

View file

@ -2,9 +2,9 @@
* *
* $RCSfile: textview.cxx,v $ * $RCSfile: textview.cxx,v $
* *
* $Revision: 1.46 $ * $Revision: 1.47 $
* *
* last change: $Author: rt $ $Date: 2004-11-15 16:32:41 $ * last change: $Author: vg $ $Date: 2005-03-07 17:31:54 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@ -881,6 +881,12 @@ void TextView::MouseButtonDown( const MouseEvent& rMouseEvent )
mpImpl->mpSelEngine->SelMouseButtonDown( rMouseEvent ); mpImpl->mpSelEngine->SelMouseButtonDown( rMouseEvent );
// mbu 20.01.2005 - SelMouseButtonDown() possibly triggers a 'selection changed'
// notification. The appropriate handler could change the current selection,
// which is the case in the MailMerge address block control. To enable select'n'drag
// we need to reevaluate the selection after the notification has been fired.
mpImpl->mbClickedInSelection = IsSelectionAtPoint( rMouseEvent.GetPosPixel() );
// Sonderbehandlungen // Sonderbehandlungen
if ( !rMouseEvent.IsShift() && ( rMouseEvent.GetClicks() >= 2 ) ) if ( !rMouseEvent.IsShift() && ( rMouseEvent.GetClicks() >= 2 ) )
{ {
@ -2090,7 +2096,8 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
} }
if ( aPrevSel.HasRange() && if ( aPrevSel.HasRange() &&
( rDTDE.DropAction & datatransfer::dnd::DNDConstants::ACTION_MOVE ) || !bStarterOfDD ) !mpImpl->mbSupportProtectAttribute && // don't remove currently selected element
(( rDTDE.DropAction & datatransfer::dnd::DNDConstants::ACTION_MOVE ) || !bStarterOfDD) )
{ {
// ggf. Selection anpasssen: // ggf. Selection anpasssen:
if ( ( mpImpl->mpDDInfo->maDropPos.GetPara() < aPrevSel.GetStart().GetPara() ) || if ( ( mpImpl->mpDDInfo->maDropPos.GetPara() < aPrevSel.GetStart().GetPara() ) ||