[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/source

Markus Mohrhard mmohrhard at kemper.freedesktop.org
Fri Feb 10 09:19:38 PST 2012


 sc/source/core/tool/address.cxx  |    4 +++-
 sc/source/core/tool/interpr1.cxx |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 619e36de3fec38d172e33a5f14fdc322e6ad479f
Author: Eike Rathke <erack at erack.de>
Date:   Tue Aug 23 16:34:42 2011 +0000

    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.
    
    Signed-off-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 156043b..0c4e235 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1013,12 +1013,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 eb5ab56..f8b8dfb 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -6655,7 +6655,7 @@ void ScInterpreter::ScIndirect()
             }
             while (false);
 
-            PushIllegalArgument();
+            PushError( errNoRef);
         }
     }
 }


More information about the Libreoffice-commits mailing list