[Libreoffice-commits] .: sc/source

Muthu Subramanian sumuthu at kemper.freedesktop.org
Sun Jan 9 23:27:24 PST 2011


 sc/source/core/tool/address.cxx  |   15 +++++++++++++++
 sc/source/core/tool/compiler.cxx |    1 +
 2 files changed, 16 insertions(+)

New commits:
commit 2eae9fbd32f651885eeb780afc6821c1f44d49c0
Author: Muthu Subramanian K <sumuthu at novell.com>
Date:   Mon Jan 10 12:51:31 2011 +0530

    Allow Range Syntax to be of the form: Sheet1!A1:Sheet2!A2
    
    This is for XL A1 Syntax.
    Also fixes one of the (related) cases where pSym is not updated after
    cSymbol is updated.

diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 9690721..0d4a70c 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -903,6 +903,21 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
     p = tmp2;
     p = lcl_eatWhiteSpace( p+1 );
     tmp1 = lcl_a1_get_col( p, &r.aEnd, &nFlags2 );
+    if( !tmp1 && !aEndTabName.Len() )     // Probably the aEndTabName was specified after the first range
+    {
+        SCTAB nTab = 0;
+        p = lcl_XL_ParseSheetRef( p, aEndTabName, false, NULL );
+        if( p )
+        {
+            if( aEndTabName.Len() && pDoc->GetTable( aEndTabName, nTab ) )
+            {
+                r.aEnd.SetTab( nTab );
+                nFlags |= SCA_VALID_TAB2 | SCA_TAB2_3D | SCA_TAB2_ABSOLUTE;
+            }
+            p = lcl_eatWhiteSpace( p+1 );
+            tmp1 = lcl_a1_get_col( p, &r.aEnd, &nFlags2 );
+        }
+    }
     if( !tmp1 ) // strange, but valid singleton
         return nFlags;
 
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 8ea4217..844a901 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2496,6 +2496,7 @@ Label_MaskStateMachine:
             nLen = MAXSTRLEN-1;
         }
         lcl_UnicodeStrNCpy( cSymbol, aSymbol.GetBuffer(), nLen );
+        pSym = &cSymbol[nLen];
     }
     else
     {


More information about the Libreoffice-commits mailing list