Author: nick
Date: Tue Nov 23 13:04:03 2010
New Revision: 1038095

URL: http://svn.apache.org/viewvc?rev=1038095&view=rev
Log:
Stub out a bit more for XSSF event processing of shared formulas, and only warn 
about them if the formula is a shared-child + the user actually wants the values

Modified:
    
poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java?rev=1038095&r1=1038094&r2=1038095&view=diff
==============================================================================
--- 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java
 (original)
+++ 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java
 Tue Nov 23 13:04:03 2010
@@ -130,9 +130,27 @@ public class XSSFSheetXMLHandler extends
           }
           
           // Decide where to get the formula string from
-          String type = attributes.getValue("t"); 
+          String type = attributes.getValue("t");
           if(type != null && type.equals("shared")) {
-             System.err.println("Warning - shared formulas not yet 
supported!");
+             // Is it the one that defines the shared, or uses it?
+             String ref = attributes.getValue("ref");
+             String si = attributes.getValue("si");
+             
+             if(ref != null) {
+                // This one defines it
+                // TODO Save it somewhere
+                fIsOpen = true;
+             } else {
+                // This one uses a shared formula
+                // TODO Retrieve the shared formula and tweak it to 
+                //  match the current cell
+                if(formulasNotResults) {
+                   System.err.println("Warning - shared formulas not yet 
supported!");
+                } else {
+                   // It's a shared formula, so we can't get at the formula 
string yet
+                   // However, they don't care about the formula string, so 
that's ok!
+                }
+             }
           } else {
              fIsOpen = true;
           }



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to