summaryrefslogtreecommitdiff
path: root/sc/source/ui/app/inputhdl.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2007-07-03 14:53:54 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2007-07-03 14:53:54 +0000
commit0301c877b85e5ff4216bc5d9628dff31abdeafe2 (patch)
treea1109bd33d3fcbfa84b9d483deba8260ba3de5e5 /sc/source/ui/app/inputhdl.cxx
parent578730f6f8ebced2e32e50d571f1484e3c939301 (diff)
INTEGRATION: CWS dr54 (1.68.54); FILE MERGED
2007/06/11 12:04:39 dr 1.68.54.2: RESYNC: (1.68-1.69); FILE MERGED 2007/06/08 13:11:20 nn 1.68.54.1: #i47125# with AutoInput, do final AutoCorrect at end of text
Diffstat (limited to 'sc/source/ui/app/inputhdl.cxx')
-rw-r--r--sc/source/ui/app/inputhdl.cxx26
1 files changed, 24 insertions, 2 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 99fff510b..576ed0cc5 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: inputhdl.cxx,v $
*
- * $Revision: 1.70 $
+ * $Revision: 1.71 $
*
- * last change: $Author: hr $ $Date: 2007-06-27 12:45:09 $
+ * last change: $Author: rt $ $Date: 2007-07-03 15:53:54 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1996,6 +1996,19 @@ BOOL lcl_IsNumber(const String& rString)
return TRUE;
}
+void lcl_SelectionToEnd( EditView* pView )
+{
+ if ( pView )
+ {
+ EditEngine* pEngine = pView->GetEditEngine();
+ USHORT nParCnt = pEngine->GetParagraphCount();
+ if ( nParCnt == 0 )
+ nParCnt = 1;
+ ESelection aSel( nParCnt-1, pEngine->GetTextLen(nParCnt-1) ); // empty selection, cursor at the end
+ pView->SetSelection( aSel );
+ }
+}
+
void ScInputHandler::EnterHandler( BYTE nBlockMode )
{
// #62806# Bei Makro-Aufrufen fuer Gueltigkeit kann Tod und Teufel passieren,
@@ -2019,6 +2032,15 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
EditView* pActiveView = pTopView ? pTopView : pTableView;
if (bModified && pActiveView && aString.Len() && !lcl_IsNumber(aString))
{
+ if ( pColumnData && nAutoPos != SCPOS_INVALID )
+ {
+ // #i47125# If AutoInput appended something, do the final AutoCorrect
+ // with the cursor at the end of the input.
+
+ lcl_SelectionToEnd(pTopView);
+ lcl_SelectionToEnd(pTableView);
+ }
+
if (pTopView)
pTopView->CompleteAutoCorrect(); // #59759# CompleteAutoCorrect fuer beide Views
if (pTableView)