Author: orw
Date: Tue Mar 18 10:59:37 2014
New Revision: 1578821

URL: http://svn.apache.org/r1578821
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

        cherry-picked from trunk


Modified:
    openoffice/branches/AOO410/   (props changed)
    openoffice/branches/AOO410/main/   (props changed)
    openoffice/branches/AOO410/main/svtools/source/edit/svmedit.cxx

Propchange: openoffice/branches/AOO410/
------------------------------------------------------------------------------
  Merged /openoffice/trunk:r1578786

Propchange: openoffice/branches/AOO410/main/
------------------------------------------------------------------------------
  Merged /openoffice/trunk/main:r1578786

Modified: openoffice/branches/AOO410/main/svtools/source/edit/svmedit.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/svtools/source/edit/svmedit.cxx?rev=1578821&r1=1578820&r2=1578821&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/svtools/source/edit/svmedit.cxx (original)
+++ openoffice/branches/AOO410/main/svtools/source/edit/svmedit.cxx Tue Mar 18 
10:59:37 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 );


Reply via email to