[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sc/source

frederic vroman fvroman at linagora.com
Mon May 15 15:12:44 UTC 2017


 sc/source/core/data/conditio.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4366a6bcc175886680ff1b727207ed1ae4f97ce9
Author: frederic vroman <fvroman at linagora.com>
Date:   Fri May 12 09:14:32 2017 +0200

    tdf#82326 calc 32bits unable to open files with a lot of cond formatting
    
    The code to build and compute formulas is using an fixed size array.
    The size of this array has been changed from 512 to 8192 by commit
    9c1ca6dca3b553c302a635357e33591605343b99
    
    Since then, LO consumes a LOT of memory while opening scalc
    files which are making extensive use of conditional formatting.
    
    This is a silent issue when working with a 64bits versions of LO because
    the memory is immediately released at the end of the load phase.
    However, with 32bits versions, some files can not be opened anymore as it
    can consume the full process memory space (2GB on windows).
    
    The parser is creating ScCondtionEntry objects to store conditional formatting expressions
    which are immediately compiled in the constructor. However the compile
    method did not return a flattened token array.
    
    Change-Id: Id290bc1f5838c246d4c2322b297b13307defaf88
    Reviewed-on: https://gerrit.libreoffice.org/37527
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit f566e2d579f5385b01d9b124e7055721313325c9)
    Reviewed-on: https://gerrit.libreoffice.org/37644

diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index f4f0f116ba61..c970520f3377 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -389,7 +389,7 @@ void ScConditionEntry::Compile( const OUString& rExpr1, const OUString& rExpr2,
                 //  temporary formula string as string tokens
                 //TODO: merge with lcl_ScDocFunc_CreateTokenArrayXML
                 pFormula1 = new ScTokenArray;
-                pFormula1->AddStringXML( rExpr1 );
+                pFormula1->AssignXMLString( rExpr1, rExprNmsp1 );
                 // bRelRef1 is set when the formula is compiled again (CompileXML)
             }
             else
@@ -427,7 +427,7 @@ void ScConditionEntry::Compile( const OUString& rExpr1, const OUString& rExpr2,
                 //  temporary formula string as string tokens
                 //TODO: merge with lcl_ScDocFunc_CreateTokenArrayXML
                 pFormula2 = new ScTokenArray;
-                pFormula2->AddStringXML( rExpr2 );
+                pFormula2->AssignXMLString( rExpr2, rExprNmsp2 );
                 // bRelRef2 is set when the formula is compiled again (CompileXML)
             }
             else


More information about the Libreoffice-commits mailing list