diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-05-18 00:03:32 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-05-22 10:00:17 +0200 |
commit | 8336f5e0f994250be428ae490783063eb58358b5 (patch) | |
tree | 5355b3460a0219ba832c89e61ad408069671829b /sc/source | |
parent | b547e4f32c63c066f752e86f73deae9e13c38c3f (diff) |
tdf#107920: Crash when using ScCompiler in condformat
Just call SetGrammar from ScCompiler object with grammar of document
See bt in https://bugs.documentfoundation.org/attachment.cgi?id=133382
Change-Id: Iedf4b88f2821bbcf728e4b1c023041fd6f10e5f3
Reviewed-on: https://gerrit.libreoffice.org/37739
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 63843a97262ccfa38d838a9cbbc3faadba8290a6)
Reviewed-on: https://gerrit.libreoffice.org/37756
Tested-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 5756d3d5bd2175335ac302aaa806fd5f2277f564)
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/unoobj/condformatuno.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx index d64b71d9bedd..bfc003e94a05 100644 --- a/sc/source/ui/unoobj/condformatuno.cxx +++ b/sc/source/ui/unoobj/condformatuno.cxx @@ -745,6 +745,7 @@ void SAL_CALL ScConditionEntryObj::setPropertyValue( if ((aValue >>= aFormula) && !aFormula.isEmpty()) { ScCompiler aComp(&mpDocShell->GetDocument(), getCoreObject()->GetSrcPos()); + aComp.SetGrammar(mpDocShell->GetDocument().GetGrammar()); std::unique_ptr<ScTokenArray> pArr(aComp.CompileString(aFormula)); getCoreObject()->SetFormula1(*pArr); } @@ -756,6 +757,7 @@ void SAL_CALL ScConditionEntryObj::setPropertyValue( if ((aValue >>= aFormula) && !aFormula.isEmpty()) { ScCompiler aComp(&mpDocShell->GetDocument(), getCoreObject()->GetSrcPos()); + aComp.SetGrammar(mpDocShell->GetDocument().GetGrammar()); std::unique_ptr<ScTokenArray> pArr(aComp.CompileString(aFormula)); getCoreObject()->SetFormula2(*pArr); } |