[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - sc/source

Eike Rathke erack at kemper.freedesktop.org
Wed Feb 8 12:30:29 PST 2012


 sc/source/core/data/document.cxx |    2 +-
 sc/source/ui/app/inputwin.cxx    |   17 +++++++++++++----
 sc/source/ui/inc/inputwin.hxx    |    4 ++++
 3 files changed, 18 insertions(+), 5 deletions(-)

New commits:
commit 01cb770ff2c97a3befee5f52ff0563d5e9525f29
Author: Noel Power <noel.power at novell.com>
Date:   Tue Feb 7 11:47:13 2012 +0000

    fix problem with vba Range.Copy ( for multirange ) bnc#707486
    (cherry picked from commit b0602d2f179182de42bffb739252cc3f3705d18f)
    
    Signed-off-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 61fdbe5..93a067e 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1948,7 +1948,7 @@ void ScDocument::CopyToClip(const ScClipParam& rClipParam,
     {
         pClipDoc->ResetClip( this, nTab );
         i = nTab;
-        nEndTab = nTab;
+        nEndTab = nTab + 1;
     }
     else
         pClipDoc->ResetClip(this, pMarks);
commit 910c68b5ddc30fb8dc63b67470105d0960fa04a1
Author: Noel Power <noel.power at novell.com>
Date:   Tue Feb 7 15:36:29 2012 +0000

    make ctrl-shift-f2 change focus to the inputline fdo#40957
    (cherry picked from commit 09d7b5e6039827d0f02f424370f929caff179ac9)
    
    Signed-off-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 37caced..3e53062 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -697,7 +697,7 @@ void ScInputWindow::StopEditEngine( sal_Bool bAll )
 
 void ScInputWindow::TextGrabFocus()
 {
-    aTextWindow.GrabFocus();
+    aTextWindow.TextGrabFocus();
 }
 
 void ScInputWindow::TextInvalidate()
@@ -712,12 +712,13 @@ void ScInputWindow::SwitchToTextWin()
     aTextWindow.StartEditEngine();
     if ( SC_MOD()->IsEditMode() )
     {
-        aTextWindow.GrabFocus();
+        aTextWindow.TextGrabFocus();
         EditView* pView = aTextWindow.GetEditView();
         if (pView)
         {
-            xub_StrLen nLen = pView->GetEditEngine()->GetTextLen(0);
-            ESelection aSel( 0, nLen, 0, nLen );
+            sal_uInt16 nPara =  pView->GetEditEngine()->GetParagraphCount() ? ( pView->GetEditEngine()->GetParagraphCount() - 1 ) : 0;
+            xub_StrLen nLen = pView->GetEditEngine()->GetTextLen( nPara );
+            ESelection aSel( nPara, nLen, nPara, nLen );
             pView->SetSelection( aSel );                // set cursor to end of text
         }
     }
@@ -1115,6 +1116,10 @@ IMPL_LINK( ScInputBarGroup, Impl_ScrollHdl, ScrollBar*, EMPTYARG )
     return 0;
 }
 
+void ScInputBarGroup::TextGrabFocus()
+{
+    aMultiTextWnd.TextGrabFocus();
+}
 
 //========================================================================
 //                      ScMultiTextWnd
@@ -2018,6 +2023,10 @@ void ScTextWnd::DataChanged( const DataChangedEvent& rDCEvt )
         Window::DataChanged( rDCEvt );
 }
 
+void ScTextWnd::TextGrabFocus()
+{
+    GrabFocus();
+}
 
 //========================================================================
 //                          Positionsfenster
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index eec7fed..ae8383d 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -65,6 +65,7 @@ public:
     virtual void            MakeDialogEditView() = 0;
     virtual void            SetFormulaMode( sal_Bool bSet ) = 0;
     virtual sal_Bool            IsInputActive() = 0;
+    virtual void            TextGrabFocus() = 0;
 };
 
 class ScTextWnd : public ScTextWndBase, public DragSourceHelper     // edit window
@@ -85,6 +86,8 @@ public:
     virtual void            StartEditEngine();
     virtual void            StopEditEngine( sal_Bool bAll );
 
+    virtual void            TextGrabFocus();
+
     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
 
     virtual void            SetFormulaMode( sal_Bool bSet );
@@ -223,6 +226,7 @@ public:
     virtual void    Resize();
     virtual const String&   GetTextString() const;
     virtual void            StopEditEngine( sal_Bool bAll );
+    virtual void            TextGrabFocus();
     void            InitEditEngine(SfxObjectShell* pObjSh);
     void            SetFormulaMode( sal_Bool bSet );
     bool            IsFocus();


More information about the Libreoffice-commits mailing list