[Libreoffice-commits] .: 2 commits - sc/source

Eike Rathke erack at kemper.freedesktop.org
Tue Aug 23 10:10:51 PDT 2011


 sc/source/core/inc/interpre.hxx  |    2 +-
 sc/source/core/tool/address.cxx  |    4 +++-
 sc/source/core/tool/interpr1.cxx |    2 +-
 sc/source/core/tool/interpr4.cxx |    8 ++++----
 sc/source/core/tool/interpr5.cxx |    2 +-
 5 files changed, 10 insertions(+), 8 deletions(-)

New commits:
commit 0240cbf5bad319f82afe8fda9fb9f897e5e33e3d
Author: Eike Rathke <erack at erack.de>
Date:   Tue Aug 23 18:34:42 2011 +0200

    fdo#36109 in INDIRECT() make a non-existing sheet produce an error again
    
    * In lcl_ScAddress_Parse_OOo() don't assume non-existing sheets would be
      external documents if there was no sheet separator. This lead to an
      external reference being created that is only an error if
      dereferenced, not if fed to ISERROR() and the like.
    * In ScInterpreter::ScIndirect() push errNoRef instead of
      errInvalidArgument to produce a #REF! error.

diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 20fd586..53def4f 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1017,12 +1017,14 @@ lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAdd
         if (!bExtDoc && (!pDoc || !pDoc->GetTable( aTab, nTab )))
         {
             // Specified table name is not found in this document.  Assume this is an external document.
-            bExtDoc = true;
             aDocName = aTab;
             xub_StrLen n = aTab.SearchBackward('.');
             if (n != STRING_NOTFOUND && n > 0)
+            {
                 // Extension found.  Strip it.
                 aTab.Erase(n);
+                bExtDoc = true;
+            }
             else
                 // No extension found.  This is probably not an external document.
                 nBits = 0;
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 73fc350..fdbeb58 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -6620,7 +6620,7 @@ void ScInterpreter::ScIndirect()
             }
             while (false);
 
-            PushIllegalArgument();
+            PushError( errNoRef);
         }
     }
 }
commit df6f5c8014fe2477f7c3026007593fdc4cb69c8a
Author: Eike Rathke <erack at erack.de>
Date:   Tue Aug 23 17:50:57 2011 +0200

    typo meVolaileType -> meVolatileType

diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 95466cf..27027d5 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -179,7 +179,7 @@ private:
     bool        bCalcAsShown;           // precision as shown
     bool        bMatrixFormula;         // formula cell is a matrix formula
 
-    VolatileType meVolaileType;
+    VolatileType meVolatileType;
 
 //---------------------------------Funktionen in interpre.cxx---------
 // nMust <= nAct <= nMax ? ok : PushError
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index a8c7cdc..2f2d882 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3330,8 +3330,8 @@ void ScInterpreter::ScMacro()
             PushString( refRes->GetString() );
     }
 
-    if (bVolatileMacro && meVolaileType == NOT_VOLATILE)
-        meVolaileType = VOLATILE_MACRO;
+    if (bVolatileMacro && meVolatileType == NOT_VOLATILE)
+        meVolatileType = VOLATILE_MACRO;
 }
 
 
@@ -3635,7 +3635,7 @@ ScInterpreter::ScInterpreter( ScFormulaCell* pCell, ScDocument* pDoc,
     pFormatter( pDoc->GetFormatTable() ),
     mnStringNoValueError( errNoValue),
     bCalcAsShown( pDoc->GetDocOptions().IsCalcAsShown() ),
-    meVolaileType(r.IsRecalcModeAlways() ? VOLATILE : NOT_VOLATILE)
+    meVolatileType(r.IsRecalcModeAlways() ? VOLATILE : NOT_VOLATILE)
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScTTT" );
 
@@ -4078,7 +4078,7 @@ StackVar ScInterpreter::Interpret()
             }
 
             if (FormulaCompiler::IsOpCodeVolatile(eOp))
-                meVolaileType = VOLATILE;
+                meVolatileType = VOLATILE;
 
             // Remember result matrix in case it could be reused.
             if (pTokenMatrixMap && sp && GetStackType() == svMatrix)
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 20ddd2c..9d9a9b8 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -353,7 +353,7 @@ ScMatrixRef ScInterpreter::GetNewMat(SCSIZE nC, SCSIZE nR)
 
 ScInterpreter::VolatileType ScInterpreter::GetVolatileType() const
 {
-    return meVolaileType;
+    return meVolatileType;
 }
 
 ScMatrixRef ScInterpreter::CreateMatrixFromDoubleRef( const FormulaToken* pToken,


More information about the Libreoffice-commits mailing list