[ooo-build-commit] 2 commits - patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Mon Sep 21 12:56:30 PDT 2009


 patches/dev300/calc-find-replace-empty-cells-sc.diff |    8 ++++----
 patches/dev300/calc-selection-fixed-cursor.diff      |   12 ++++++++++--
 2 files changed, 14 insertions(+), 6 deletions(-)

New commits:
commit fc5d12716f83d2005fa64bcc8815e268900ae271
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Fri Sep 18 23:24:13 2009 -0400

    Fixed wrong placement of closing paren which caused unintended behavior.
    
    * patches/dev300/calc-find-replace-empty-cells-sc.diff: wrong placement
      of the closing parenthesis caused incorrect search start position
      during search for empty cells.

diff --git a/patches/dev300/calc-find-replace-empty-cells-sc.diff b/patches/dev300/calc-find-replace-empty-cells-sc.diff
index 2605d27..f78ad8b 100644
--- a/patches/dev300/calc-find-replace-empty-cells-sc.diff
+++ b/patches/dev300/calc-find-replace-empty-cells-sc.diff
@@ -172,7 +172,7 @@ index 994596d..8d5ec0f 100644
 +                SCCOL nBeginCol = rRange.aEnd.Col();
 +                if (nRow == rRow && nBeginCol >= rCol)
 +                    // always start from one cell before the cursor.
-+                    nBeginCol = rCol - (nCmd == SVX_SEARCHCMD_FIND) ? 1 : 0;
++                    nBeginCol = rCol - (nCmd == SVX_SEARCHCMD_FIND ? 1 : 0);
 +
 +                for (SCCOL nCol = nBeginCol; nCol >= rRange.aStart.Col(); --nCol)
 +                {
@@ -202,7 +202,7 @@ index 994596d..8d5ec0f 100644
 +                SCROW nBeginRow = rRange.aEnd.Row();
 +                if (nCol == rCol && nBeginRow >= rRow)
 +                    // always start from one cell before the cursor.
-+                    nBeginRow = rRow - (nCmd == SVX_SEARCHCMD_FIND) ? 1 : 0;
++                    nBeginRow = rRow - (nCmd == SVX_SEARCHCMD_FIND ? 1 : 0);
 +                for (SCROW nRow = nBeginRow; nRow >= rRange.aStart.Row(); --nRow)
 +                {   
 +                    ScBaseCell* pCell = aCol[nCol].GetCell(nRow);
@@ -235,7 +235,7 @@ index 994596d..8d5ec0f 100644
 +                SCCOL nBeginCol = rRange.aStart.Col();
 +                if (nRow == rRow && nBeginCol <= rCol)
 +                    // always start from one cell past the cursor.
-+                    nBeginCol = rCol + (nCmd == SVX_SEARCHCMD_FIND) ? 1 : 0;
++                    nBeginCol = rCol + (nCmd == SVX_SEARCHCMD_FIND ? 1 : 0);
 +                for (SCCOL nCol = nBeginCol; nCol <= rRange.aEnd.Col(); ++nCol)
 +                {
 +                    ScBaseCell* pCell = aCol[nCol].GetCell(nRow);
@@ -264,7 +264,7 @@ index 994596d..8d5ec0f 100644
 +                SCROW nBeginRow = rRange.aStart.Row();
 +                if (nCol == rCol && nBeginRow <= rRow)
 +                    // always start from one cell past the cursor.
-+                    nBeginRow = rRow + (nCmd == SVX_SEARCHCMD_FIND) ? 1 : 0;
++                    nBeginRow = rRow + (nCmd == SVX_SEARCHCMD_FIND ? 1 : 0);
 +                for (SCROW nRow = nBeginRow; nRow <= rRange.aEnd.Row(); ++nRow)
 +                {   
 +                    ScBaseCell* pCell = aCol[nCol].GetCell(nRow);
commit 731167e5a310da8eb4eb4a37ed610be050eaad6a
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Thu Sep 17 19:54:04 2009 -0400

    Fixed incorrect focus shift during row/column selection.
    
    * patches/dev300/calc-selection-fixed-cursor.diff: keep the focus
      area where the cell cursor is when a row or column selection is
      expanded or shrinked. (n#539434)

diff --git a/patches/dev300/calc-selection-fixed-cursor.diff b/patches/dev300/calc-selection-fixed-cursor.diff
index a4dccaf..2ce3e91 100644
--- a/patches/dev300/calc-selection-fixed-cursor.diff
+++ b/patches/dev300/calc-selection-fixed-cursor.diff
@@ -348,7 +348,7 @@ index bd9515c..bd744e4 100644
  void ScTabView::DoneBlockMode( BOOL bContinue )            // Default FALSE
  {
      //	Wenn zwischen Tabellen- und Header SelectionEngine gewechselt wird,
-@@ -414,6 +408,297 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
+@@ -414,6 +408,305 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
          aHdrFunc.SetAnchorFlag( FALSE );
  }
  
@@ -621,7 +621,15 @@ index bd9515c..bd744e4 100644
 +    
 +        pDoc->SkipOverlapped(nBlockEndX, nBlockEndY, nTab);
 +        MarkCursor(nBlockEndX, nBlockEndY, nTab, false, false, true);
-+        AlignToCursor(nBlockEndX, nBlockEndY, eMode);
++
++        // Check if the entire row(s) or column(s) are selected.
++        ScSplitPos eActive = aViewData.GetActivePart();
++        bool bRowSelected = (nBlockStartX == 0 && nBlockEndX == MAXCOL);
++        bool bColSelected = (nBlockStartY == 0 && nBlockEndY == MAXROW);
++        SCsCOL nAlignX = bRowSelected ? aViewData.GetPosX(WhichH(eActive)) : nBlockEndX;
++        SCsROW nAlignY = bColSelected ? aViewData.GetPosY(WhichV(eActive)) : nBlockEndY;
++        AlignToCursor(nAlignX, nAlignY, eMode);
++
 +        UpdateAutoFillMark();
 +    }
 +}


More information about the ooo-build-commit mailing list