You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2008/06/03 19:06:48 UTC
DO NOT REPLY [Bug 45123] Token operand class not being copied by
SharedFormulaRecord.
convertSharedFormulas()
https://issues.apache.org/bugzilla/show_bug.cgi?id=45123
Josh Micich <jo...@gildedtree.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #1 from Josh Micich <jo...@gildedtree.com> 2008-06-03 10:06:48 PST ---
The following patch fixes this bug:
Index: SharedFormulaRecord.java
===================================================================
--- SharedFormulaRecord.java (revision 661934)
+++ SharedFormulaRecord.java (working copy)
@@ -201,6 +201,10 @@
if (ptgs != null)
for (int k = 0; k < ptgs.size(); k++) {
Ptg ptg = (Ptg) ptgs.get(k);
+ byte originalOperandClass = -1;
+ if (!ptg.isBaseToken()) {
+ originalOperandClass = ptg.getPtgClass();
+ }
if (ptg instanceof RefNPtg) {
RefNPtg refNPtg = (RefNPtg)ptg;
ptg = new
ReferencePtg(fixupRelativeRow(formulaRow,refNPtg.getRow(),refNPtg.isRowRelative()),
@@ -249,7 +253,11 @@
areaNAPtg.isLastRowRelative(),
areaNAPtg.isFirstColRelative(),
areaNAPtg.isLastColRelative());
- }
+ }
+ if (!ptg.isBaseToken()) {
+ ptg.setClass(originalOperandClass);
+ }
+
newPtgStack.add(ptg);
}
return newPtgStack;
A junit also needs to be added.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org