summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-06-23 13:02:01 +0200
committerAndras Timar <andras.timar@collabora.com>2015-08-06 12:51:36 +0200
commitd5268ba80a6ec982700d9e5edd84c669dab0ebf9 (patch)
tree680eaac111f6fd74e8c312b1f9293b33660e19fa /formula
parentb9b1ec3d44f05d00c423b73cb9a0b13e73d570fe (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();
}