summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-07-12 01:51:46 +0200
committerKohei Yoshida <kyoshida@novell.com>2011-07-12 00:42:37 -0400
commit9ff1db9ac07244aaf839fe1a0ab7dd9ba531ddd0 (patch)
treedcb63c206671c2f2877f2bd60c7c9a5ea658e85a
parent8dbc5e5e88d9b01a6fd08b793bc3b7339e044004 (diff)
fix for fdo#39023: shared formulas are not imported correctly
Signed-off-by: Kohei Yoshida <kyoshida@novell.com>
-rw-r--r--oox/source/xls/formulaparser.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/oox/source/xls/formulaparser.cxx b/oox/source/xls/formulaparser.cxx
index 2543ef6dc910..fb7b5d37e473 100644
--- a/oox/source/xls/formulaparser.cxx
+++ b/oox/source/xls/formulaparser.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/sheet/ComplexReference.hpp>
#include <com/sun/star/sheet/ExternalReference.hpp>
#include <com/sun/star/sheet/FormulaToken.hpp>
+#include <com/sun/star/sheet/NameToken.hpp>
#include <com/sun/star/sheet/ReferenceFlags.hpp>
#include <com/sun/star/sheet/SingleReference.hpp>
#include "oox/core/filterbase.hxx"
@@ -2798,7 +2799,10 @@ void FormulaParser::convertNameToFormula( FormulaContext& rContext, sal_Int32 nT
{
ApiTokenSequence aTokens( 1 );
aTokens[ 0 ].OpCode = OPCODE_NAME;
- aTokens[ 0 ].Data <<= nTokenIndex;
+ NameToken aNameTokenData;
+ aNameTokenData.Global = sal_True;
+ aNameTokenData.Index= nTokenIndex;
+ aTokens[ 0 ].Data <<= aNameTokenData;
mxImpl->setFormula( rContext, aTokens );
}
else