summaryrefslogtreecommitdiff
path: root/vcl/source/window/seleng.cxx
diff options
context:
space:
mode:
authorgt <gt@openoffice.org>2002-04-04 08:22:32 +0000
committergt <gt@openoffice.org>2002-04-04 08:22:32 +0000
commit835219840d42cfb891614db2ed7bf0386293468a (patch)
tree0ea0f49a27d9a9bee66f7ff8128a4fce52a74466 /vcl/source/window/seleng.cxx
parentcf5ce3d57f0eafa25f3d94e4f18036a4709e5b01 (diff)
#98354# enable Ctrl-functionality for CursorPosChanging()
Diffstat (limited to 'vcl/source/window/seleng.cxx')
-rw-r--r--vcl/source/window/seleng.cxx24
1 files changed, 18 insertions, 6 deletions
diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index 8fd3b665aa8a..538c0208ed5f 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: seleng.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:05:40 $
+ * last change: $Author: gt $ $Date: 2002-04-04 09:22:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,6 +66,14 @@
#pragma hdrstop
+
+inline BOOL SelectionEngine::ShouldDeselect( BOOL bModifierKey1 ) const
+{
+// return !( eSelMode == MULTIPLE_SELECTION && bModifierKey1 );
+ return eSelMode != MULTIPLE_SELECTION || !bModifierKey1;
+}
+
+
// TODO: FunctionSet::SelectAtPoint raus
/*************************************************************************
@@ -158,11 +166,11 @@ void SelectionEngine::ActivateDragMode()
|*
|* Beschreibung SELENG.SDW
|* Ersterstellung OV 10.10.94
-|* Letzte Aenderung OV 10.10.94
+|* Letzte Aenderung GT 2002-04-04
|*
*************************************************************************/
-void SelectionEngine::CursorPosChanging( BOOL bShift, BOOL /* bMod1 */ )
+void SelectionEngine::CursorPosChanging( BOOL bShift, BOOL bMod1 )
{
if ( !pFunctionSet )
return;
@@ -181,7 +189,8 @@ void SelectionEngine::CursorPosChanging( BOOL bShift, BOOL /* bMod1 */ )
{
if ( !(nFlags & SELENG_HAS_ANCH) )
{
- pFunctionSet->DeselectAll();
+ if( ShouldDeselect( bMod1 ) )
+ pFunctionSet->DeselectAll();
pFunctionSet->CreateAnchor();
nFlags |= SELENG_HAS_ANCH;
}
@@ -200,7 +209,10 @@ void SelectionEngine::CursorPosChanging( BOOL bShift, BOOL /* bMod1 */ )
}
else
{
- pFunctionSet->DeselectAll();
+ if( ShouldDeselect( bMod1 ) )
+ pFunctionSet->DeselectAll();
+ else
+ pFunctionSet->DestroyAnchor();
nFlags &= (~SELENG_HAS_ANCH);
}
}