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


Hi,

Please review attached patch for 3-5-6
It is a quick fix for https://bugs.freedesktop.org/show_bug.cgi?id=51601

Thanks
  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD
resolved fdo#51601 do not attempt to compile running formula cell

From: Eike Rathke <erack@redhat.com>

2fb377c19f8ae38e7ec649af1343bbd64b70a16b introduced compilation of
a formula cell while it is interpreted, ignoring the comment just above why
that does NOT work ...

This removes the portion that is responsible for the crash as a quick fix,
a more sophisticated solution might be needed to make the original
intention work.
---

 sc/source/core/data/cell.cxx |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)


diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index 4ed94b9..29ecd68 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -1527,7 +1527,9 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
         // #i11719# no UPN and no error and no token code but result string present
         // => interpretation of this cell during name-compilation and unknown names
         // => can't exchange underlying code array in CompileTokenArray() /
-        // Compile() because interpreter's token iterator would crash.
+        // Compile() because interpreter's token iterator would crash or pCode
+        // would be deleted twice if this cell was interpreted during
+        // compilation.
         // This should only be a temporary condition and, since we set an
         // error, if ran into it again we'd bump into the dirty-clearing
         // condition further down.
@@ -1536,12 +1538,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
             pCode->SetCodeError( errNoCode );
             // This is worth an assertion; if encountered in daily work
             // documents we might need another solution. Or just confirm correctness.
-            OSL_FAIL( "ScFormulaCell::Interpret: no UPN, no error, no token, but string -> Try 
compiling it." );
-            // Force Compilation
-            String aFormula = aResult.GetHybridFormula();
-            aResult.SetHybridFormula( String() );
-            Compile( aFormula );
-            InterpretTail( eTailParam );
+            OSL_FAIL( "ScFormulaCell::Interpret: no UPN, no error, no token, but hybrid formula 
string" );
             return;
         }
         CompileTokenArray();

Attachment: pgpEizwHlJqAH.pgp
Description: PGP signature


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.