diff options
author | Eike Rathke <erack@redhat.com> | 2015-06-23 13:02:01 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-06-23 13:19:25 +0200 |
commit | 80aafaf79306ea82cd24f10f200908addccaf34f (patch) | |
tree | a33ce059c74aac70560022f3dfc232e3889ef4de /formula/source | |
parent | 42713c52c6e145362e0d1409d2db1bb1f048b1c3 (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
Diffstat (limited to 'formula/source')
-rw-r--r-- | formula/source/core/api/token.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index e098a492e0fa..ac95b8dd6dec 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(); } |