Kaydet (Commit) 15f18d1b authored tarafından Eike Rathke's avatar Eike Rathke

do not adjust RPN named expressions relative references, tdf#91842 follow-up

Change-Id: I5a991d3b86fec0a3800d8243f73eb764789c8c69
üst d5cebdd2
...@@ -138,7 +138,25 @@ namespace ...@@ -138,7 +138,25 @@ namespace
// Handle all tokens in RPN, and code tokens only if they have a // Handle all tokens in RPN, and code tokens only if they have a
// reference count of 1, which means they are not referenced in // reference count of 1, which means they are not referenced in
// RPN. // RPN.
return i == 0 && (*pp)->GetRef() > 1; if (i == 0)
return (*pp)->GetRef() > 1;
// Skip (do not adjust) relative references resulting from named
// expressions.
switch ((*pp)->GetType())
{
case svSingleRef:
return (*pp)->GetSingleRef()->IsRelName();
case svDoubleRef:
{
const ScComplexRefData& rRef = *(*pp)->GetDoubleRef();
return rRef.Ref1.IsRelName() || rRef.Ref2.IsRelName();
}
default:
; // nothing
}
return false;
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment