sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx |    6 +++++-
 sc/source/ui/inc/viewdata.hxx                        |    6 ++----
 sc/source/ui/view/viewdata.cxx                       |    9 +++++++++
 3 files changed, 16 insertions(+), 5 deletions(-)

New commits:
commit 70ce8987feeb06255eaeb7663bb076a8f4e0593f
Author: Kohei Yoshida <kohei.yosh...@collabora.com>
Date:   Mon Dec 16 15:04:09 2013 -0500

    Check IsRefMode() before accessing the ref range.
    
    Else you'd end up with wrong ref range values.  Also in
    selectAllAccessibleChildren(), the code is probably meant to select
    all sheet, rather than setting the top-left reference position twice
    in a row.
    
    Change-Id: I895896418476ffea0862e8df4e03f6efc4c91dd2

diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx 
b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 40d2d39..5fa5740 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -1131,7 +1131,7 @@ void SAL_CALL
             ScViewData *pViewData = mpViewShell->GetViewData();
             mpViewShell->InitRefMode( 0, 0, pViewData->GetTabNo(), 
SC_REFTYPE_REF );
             pViewData->SetRefStart(0,0,pViewData->GetTabNo());
-            pViewData->SetRefStart(MAXCOL,MAXROW,pViewData->GetTabNo());
+            pViewData->SetRefEnd(MAXCOL,MAXROW,pViewData->GetTabNo());
             mpViewShell->UpdateRef(MAXCOL, MAXROW, pViewData->GetTabNo());
         }
         else
@@ -1559,6 +1559,10 @@ void ScAccessibleSpreadsheet::FireFirstCellFocus()
 void ScAccessibleSpreadsheet::NotifyRefMode()
 {
     ScViewData *pViewData = mpViewShell->GetViewData();
+    if (!pViewData->IsRefMode())
+        // Not in reference mode. Bail out.
+        return;
+
     sal_uInt16 nRefStartX =pViewData->GetRefStartX();
     sal_Int32 nRefStartY=pViewData->GetRefStartY();
     sal_uInt16 nRefEndX=pViewData->GetRefEndX();
commit 087c2fddce7b38d67c1168f9d28134819dac57b1
Author: Kohei Yoshida <kohei.yosh...@collabora.com>
Date:   Mon Dec 16 15:03:25 2013 -0500

    Make this non-inline (for easier debugging).
    
    Change-Id: I2b7a84c56b8130c6566eb971ba6ba0c3ee487c86

diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index ca90f3e..58267c1 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -375,10 +375,8 @@ public:
     void            SetRefMode( bool bNewMode, ScRefType eNewType )
                                     { bIsRefMode = bNewMode; eRefType = 
eNewType; }
 
-    void            SetRefStart( SCCOL nNewX, SCROW nNewY, SCTAB nNewZ )
-                            { nRefStartX = nNewX; nRefStartY = nNewY; 
nRefStartZ = nNewZ; }
-    void            SetRefEnd( SCCOL nNewX, SCROW nNewY, SCTAB nNewZ )
-                            { nRefEndX = nNewX; nRefEndY = nNewY; nRefEndZ = 
nNewZ; }
+    void            SetRefStart( SCCOL nNewX, SCROW nNewY, SCTAB nNewZ );
+    void            SetRefEnd( SCCOL nNewX, SCROW nNewY, SCTAB nNewZ );
 
     void            ResetDelMark()                          { bDelMarkValid = 
false; }
     void            SetDelMark( const ScRange& rRange )
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 1b6daf0..9f74c84 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -3018,6 +3018,15 @@ ScAddress ScViewData::GetCurPos() const
     return ScAddress( GetCurX(), GetCurY(), GetTabNo() );
 }
 
+void ScViewData::SetRefStart( SCCOL nNewX, SCROW nNewY, SCTAB nNewZ )
+{
+    nRefStartX = nNewX; nRefStartY = nNewY; nRefStartZ = nNewZ;
+}
+
+void ScViewData::SetRefEnd( SCCOL nNewX, SCROW nNewY, SCTAB nNewZ )
+{
+    nRefEndX = nNewX; nRefEndY = nNewY; nRefEndZ = nNewZ;
+}
 
 void ScViewData::AddPixelsWhile( long & rScrY, long nEndPixels, SCROW & rPosY,
         SCROW nEndRow, double nPPTY, const ScDocument * pDoc, SCTAB nTabNo )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to