openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o..@apache.org
Subject svn commit: r1578786 - /openoffice/trunk/main/svtools/source/edit/svmedit.cxx
Date Tue, 18 Mar 2014 09:16:21 GMT
Author: orw
Date: Tue Mar 18 09:16:21 2014
New Revision: 1578786

URL: http://svn.apache.org/r1578786
Log:
124427: <TextWindow/MultiLineEdit::GetFocus()> - call parent class' method to assure
corresponding notifications and listener calls

	This reverts a change made for the IA2 integration


Modified:
    openoffice/trunk/main/svtools/source/edit/svmedit.cxx

Modified: openoffice/trunk/main/svtools/source/edit/svmedit.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/edit/svmedit.cxx?rev=1578786&r1=1578785&r2=1578786&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/source/edit/svmedit.cxx (original)
+++ openoffice/trunk/main/svtools/source/edit/svmedit.cxx Tue Mar 18 09:16:21 2014
@@ -941,34 +941,40 @@ void TextWindow::Command( const CommandE
 
 void TextWindow::GetFocus()
 {
-	//Window::GetFocus();
-	if ( !mbActivePopup )
-	{
-		sal_Bool bGotoCursor = !mpExtTextView->IsReadOnly();
-		if ( mbFocusSelectionHide && IsReallyVisible() && !mpExtTextView->IsReadOnly()
-                && ( mbSelectOnTab &&
-                    (!mbInMBDown || ( GetSettings().GetStyleSettings().GetSelectionOptions()
& SELECTION_OPTION_FOCUS ) )) )
-		{
-			// Alles selektieren, aber nicht scrollen
-			sal_Bool bAutoScroll = mpExtTextView->IsAutoScroll();
-			mpExtTextView->SetAutoScroll( sal_False );
-			mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFF, 0xFFFF
) ) );
-			mpExtTextView->SetAutoScroll( bAutoScroll );
-			bGotoCursor = sal_False;
-		}
-		mpExtTextView->SetPaintSelection( sal_True );
-		mpExtTextView->ShowCursor( bGotoCursor );
-	}
+    Window::GetFocus();
+
+    if ( !mbActivePopup )
+    {
+        sal_Bool bGotoCursor = !mpExtTextView->IsReadOnly();
+        if ( mbFocusSelectionHide
+             && IsReallyVisible()
+             && !mpExtTextView->IsReadOnly()
+             && ( mbSelectOnTab
+                  && ( !mbInMBDown
+                       || ( GetSettings().GetStyleSettings().GetSelectionOptions() &
SELECTION_OPTION_FOCUS ) ) ) )
+        {
+            // Alles selektieren, aber nicht scrollen
+            sal_Bool bAutoScroll = mpExtTextView->IsAutoScroll();
+            mpExtTextView->SetAutoScroll( sal_False );
+            mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFF,
0xFFFF ) ) );
+            mpExtTextView->SetAutoScroll( bAutoScroll );
+            bGotoCursor = sal_False;
+        }
+        mpExtTextView->SetPaintSelection( sal_True );
+        mpExtTextView->ShowCursor( bGotoCursor );
+    }
 }
 
+
 void TextWindow::LoseFocus()
 {
-	Window::LoseFocus();
+    Window::LoseFocus();
 
-	if ( mbFocusSelectionHide && !mbActivePopup )
-		mpExtTextView->SetPaintSelection( sal_False );
+    if ( mbFocusSelectionHide && !mbActivePopup )
+        mpExtTextView->SetPaintSelection( sal_False );
 }
 
+
 // virtual
 ::css::uno::Reference< ::css::awt::XWindowPeer >
 TextWindow::GetComponentInterface(sal_Bool bCreate)
@@ -1246,13 +1252,15 @@ void MultiLineEdit::Resize()
 
 void MultiLineEdit::GetFocus()
 {
-    if ( !pImpSvMEdit )  // might be called from within the dtor, when pImpSvMEdit == NULL
is a valid state
+    if ( pImpSvMEdit == NULL )  // might be called from within the dtor, when pImpSvMEdit
== NULL is a valid state
         return;
-	//Disable the focused event on scroll pane
-	//Edit::GetFocus();
+
+    Edit::GetFocus();
+
     pImpSvMEdit->GetFocus();
 }
 
+
 void MultiLineEdit::SetSelection( const Selection& rSelection )
 {
 	pImpSvMEdit->SetSelection( rSelection );



Mime
View raw message