summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-06-23 13:02:01 +0200
committerEike Rathke <erack@redhat.com>2015-06-23 13:31:55 +0200
commitdf36fb6208123b0d61911c4714d1ab39c4e8285a (patch)
tree276441fb58691f0c0ed5b0a25eab30d5a67ea969 /formula
parentfc61dbd5fa32307081a26a1223ca3db65892bf44 (diff)
in OOXML save references of named expressions with col,row=0,0 base position
Saving relative references of named expressions to OOXML never worked, upon reload they pointed to a different position offset by the value of the original base position. This at least saves positive relative references correctly, while generating #REF! for negative offsets which is slightly better than having them point to a wrong location and silently calculate different values.. Also, this is a prerequisite for TableRef ThisRow references in named expressions to be saved correctly in A1 notation, which results in a relative row 0 value. Change-Id: I3734f910794ceab4b9224b214ad11c64d1d18e67 (cherry picked from commit 80aafaf79306ea82cd24f10f200908addccaf34f)
Diffstat (limited to 'formula')
-rw-r--r--formula/source/core/api/token.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index ce40870d2ad6..9f16f4ce90d0 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -706,7 +706,8 @@ FormulaTokenArray::FormulaTokenArray() :
nIndex(0),
nError(0),
nMode(ScRecalcMode::NORMAL),
- bHyperLink(false)
+ bHyperLink(false),
+ mbFromRangeName(false)
{
}
@@ -728,6 +729,7 @@ void FormulaTokenArray::Assign( const FormulaTokenArray& r )
nError = r.nError;
nMode = r.nMode;
bHyperLink = r.bHyperLink;
+ mbFromRangeName = r.mbFromRangeName;
pCode = NULL;
pRPN = NULL;
FormulaToken** pp;
@@ -780,6 +782,7 @@ FormulaTokenArray* FormulaTokenArray::Clone() const
p->nMode = nMode;
p->nError = nError;
p->bHyperLink = bHyperLink;
+ p->mbFromRangeName = mbFromRangeName;
FormulaToken** pp;
if( nLen )
{
@@ -837,6 +840,7 @@ void FormulaTokenArray::Clear()
pCode = NULL; pRPN = NULL;
nError = nLen = nIndex = nRPN = 0;
bHyperLink = false;
+ mbFromRangeName = false;
ClearRecalcMode();
}