[ooo-build-commit] Branch 'ooo-build-3-1-1' - patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Mon Sep 28 19:06:02 PDT 2009


 patches/dev300/calc-selection-fixed-cursor.diff |   25 +++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

New commits:
commit a96dab3afc2d47da4cabf2890e3c8215187e96a6
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Mon Sep 28 22:06:42 2009 -0400

    Fixed range selection for RTL languages.
    
    * patches/dev300/calc-selection-fixed-cursor.diff: mirror
      horizontal direction when expanding cell ranges for RTL
      layout mode. (n#542684)

diff --git a/patches/dev300/calc-selection-fixed-cursor.diff b/patches/dev300/calc-selection-fixed-cursor.diff
index 0688c2b..e813e2c 100644
--- a/patches/dev300/calc-selection-fixed-cursor.diff
+++ b/patches/dev300/calc-selection-fixed-cursor.diff
@@ -87,6 +87,14 @@ diff --git sc/source/ui/view/cellsh4.cxx sc/source/ui/view/cellsh4.cxx
 index 4cb00fb..3f80397 100644
 --- sc/source/ui/view/cellsh4.cxx
 +++ sc/source/ui/view/cellsh4.cxx
+@@ -52,6 +52,7 @@
+ #include "document.hxx"
+ #include "sc.hrc"
+ 
++#include "vcl/svapp.hxx"
+ 
+ //------------------------------------------------------------------
+ 
 @@ -88,10 +88,56 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
          {
              // ADD mode: keep the selection, start a new block when marking with shift again
@@ -145,7 +153,7 @@ index 4cb00fb..3f80397 100644
      SCsCOLROW nRTLSign = 1;
      if ( pData->GetDocument()->IsLayoutRTL( pData->GetTabNo() ) )
      {
-@@ -172,38 +218,58 @@ void ScCellShell::GetStateCursor( SfxItemSet& /* rSet */ )
+@@ -172,38 +218,61 @@ void ScCellShell::GetStateCursor( SfxItemSet& /* rSet */ )
  
  void ScCellShell::ExecuteCursorSel( SfxRequest& rReq )
  {
@@ -170,6 +178,9 @@ index 4cb00fb..3f80397 100644
 +    }
  
 -    switch ( nSlotId )
++    // Horizontal direction depends on whether or not the UI language is RTL.
++    SCsCOL nMovX = Application::GetSettings().GetLayoutRTL() ? -1 : 1;
++
 +    switch (nSlotId)
      {
 -        case SID_CURSORDOWN_SEL:		rReq.SetSlot( SID_CURSORDOWN );  break;
@@ -191,10 +202,10 @@ index 4cb00fb..3f80397 100644
 +            pViewShell->ExpandBlock(0, -1, SC_FOLLOW_LINE);
 +        break;
 +        case SID_CURSORRIGHT_SEL:
-+            pViewShell->ExpandBlock(1, 0, SC_FOLLOW_LINE);
++            pViewShell->ExpandBlock(nMovX, 0, SC_FOLLOW_LINE);
 +        break;
 +        case SID_CURSORLEFT_SEL:
-+            pViewShell->ExpandBlock(-1, 0, SC_FOLLOW_LINE);
++            pViewShell->ExpandBlock(-nMovX, 0, SC_FOLLOW_LINE);
 +        break;
 +        case SID_CURSORPAGEUP_SEL:
 +            pViewShell->ExpandBlockPage(0, -1);
@@ -203,10 +214,10 @@ index 4cb00fb..3f80397 100644
 +            pViewShell->ExpandBlockPage(0, 1);
 +        break;
 +        case SID_CURSORPAGERIGHT_SEL:
-+            pViewShell->ExpandBlockPage(1, 0);
++            pViewShell->ExpandBlockPage(nMovX, 0);
 +        break;
 +        case SID_CURSORPAGELEFT_SEL:
-+            pViewShell->ExpandBlockPage(-1, 0);
++            pViewShell->ExpandBlockPage(-nMovX, 0);
 +        break;
 +        case SID_CURSORBLKDOWN_SEL:
 +            pViewShell->ExpandBlockArea(0, 1);
@@ -215,10 +226,10 @@ index 4cb00fb..3f80397 100644
 +            pViewShell->ExpandBlockArea(0, -1);
 +        break;
 +        case SID_CURSORBLKRIGHT_SEL:
-+            pViewShell->ExpandBlockArea(1, 0);
++            pViewShell->ExpandBlockArea(nMovX, 0);
 +        break;
 +        case SID_CURSORBLKLEFT_SEL:
-+            pViewShell->ExpandBlockArea(-1, 0);
++            pViewShell->ExpandBlockArea(-nMovX, 0);
 +        break;
          default:
 -            DBG_ERROR("Unbekannte Message bei ViewShell (CursorSel)");


More information about the ooo-build-commit mailing list