diff options
author | Eike Rathke <erack@redhat.com> | 2017-05-18 14:59:54 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-05-18 15:02:50 +0200 |
commit | 1469a83ca1d712e30131597d70dad1b3eb322175 (patch) | |
tree | 7354ed4bd79adf5b846d5712004e3e3f7b6e9861 /sc/source/filter/xml/xmlimprt.cxx | |
parent | 47a0e1554add5cc10c068275697108a663cd7a9a (diff) |
Pass grammar to ScCompiler ctor instead of subsequent SetGrammar()
Not only to have more concise code but also to avoid setting grammar
twice if the actual grammar differs from the document's default one.
Change-Id: I7bfd151c22c48a40aea05f5f983fa0370d9fd9ae
Diffstat (limited to 'sc/source/filter/xml/xmlimprt.cxx')
-rw-r--r-- | sc/source/filter/xml/xmlimprt.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index d035e9e1cab9..437264636bc8 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -3058,8 +3058,7 @@ void SAL_CALL ScXMLImport::setTargetDocument( const css::uno::Reference< css::la throw lang::IllegalArgumentException(); mpDocImport.reset(new ScDocumentImport(*pDoc)); - mpComp.reset(new ScCompiler(pDoc, ScAddress())); - mpComp->SetGrammar(formula::FormulaGrammar::GRAM_ODFF); + mpComp.reset(new ScCompiler(pDoc, ScAddress(), formula::FormulaGrammar::GRAM_ODFF)); uno::Reference<document::XActionLockable> xActionLockable(xDoc, uno::UNO_QUERY); if (xActionLockable.is()) |