Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hello,

this patch checks if we have a local ScRangeName before it tries to use it.

I consider this patch safe and think it should be in 3-4 so Review& Sign-off
appreciated.

Regards,
Markus
From eda5da2df84567b4025cdfd2f94c0e425553db6c Mon Sep 17 00:00:00 2001
From: Markus Mohrhard <markus.mohrhard@googlemail.com>
Date: Tue, 2 Aug 2011 21:19:52 +0200
Subject: [PATCH] fix for fdo#39728: check for empty local range names

---
 sc/source/core/tool/compiler.cxx |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index b61b146..9f39358 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2895,7 +2895,9 @@ sal_Bool ScCompiler::IsNamedRange( const String& rUpperName )
     // try local names first
     bool bGlobal = false;
     ScRangeName* pRangeName = pDoc->GetRangeName(aPos.Tab());
-    const ScRangeData* pData = pRangeName->findByUpperName(rUpperName);
+    const ScRangeData* pData = NULL;
+    if (pRangeName)
+        pData = pRangeName->findByUpperName(rUpperName);
     if (!pData)
     {
         pRangeName = pDoc->GetRangeName();
-- 
1.7.3.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.