]> source.dussan.org Git - poi.git/commitdiff
Forgot to reset shared formula option during conversion
authorJason Height <jheight@apache.org>
Sat, 26 Aug 2006 08:52:24 +0000 (08:52 +0000)
committerJason Height <jheight@apache.org>
Sat, 26 Aug 2006 08:52:24 +0000 (08:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@437128 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/record/FormulaRecord.java
src/java/org/apache/poi/hssf/record/SharedFormulaRecord.java

index 1b9428da8c49fdea7b7abc1aa3414ef75789dc22..bddd4e4db04e105775d8993f50f6d03b6a164f37 100644 (file)
@@ -195,12 +195,16 @@ public class FormulaRecord
     public short getOptions()
     {
         return field_5_options;
-    }
+    }    
     
     public boolean isSharedFormula() {
         return sharedFormula.isSet(field_5_options);
     }
     
+    public void setSharedFormula(boolean flag) {
+       sharedFormula.setBoolean(field_5_options, flag);
+    }
+    
     /**
      * get the length (in number of tokens) of the expression
      * @return  expression length
index b74284eb46fa316e20ad3eafad1e78644aa64532..8f52760e9ad8914ad7e66b63aea1c92abb707d54 100755 (executable)
@@ -254,6 +254,8 @@ public class SharedFormulaRecord
             newPtgStack.add(ptg);
           }
         formula.setParsedExpression(newPtgStack);
+        //Now its not shared!
+        formula.setSharedFormula(false);
       } else {
         throw new RuntimeException("Shared Formula Conversion: Coding Error");
       }