svn commit: r1899668 - in /poi/trunk/poi/src: main/java/org/apache/poi/ss/formula/functions/Rate.java test/java/org/apache/poi/ss/formula/functions/TestRate.java

2022-04-08 Thread yegor
Author: yegor
Date: Fri Apr  8 15:08:50 2022
New Revision: 1899668

URL: http://svn.apache.org/viewvc?rev=1899668&view=rev
Log:
Bug 65988: Rate function giving incorrect results

Modified:
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Rate.java

poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestRate.java

Modified: 
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Rate.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Rate.java?rev=1899668&r1=1899667&r2=1899668&view=diff
==
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Rate.java 
(original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Rate.java 
Fri Apr  8 15:08:50 2022
@@ -73,42 +73,49 @@ public class Rate implements Function {
 return new NumberEval(rate);
 }
 
-private double calculateRate(double nper, double pmt, double pv, double 
fv, double type, double guess) {
-//FROM MS 
http://office.microsoft.com/en-us/excel-help/rate-HP005209232.aspx
-int FINANCIAL_MAX_ITERATIONS = 20;//Bet accuracy with 128
-double FINANCIAL_PRECISION = 0.001;//1.0e-8
-
-double y, y0, y1, x0, x1, f = 0, i;
-double rate = guess;
-if (Math.abs(rate) < FINANCIAL_PRECISION) {
-y = pv * (1 + nper * rate) + pmt * (1 + rate * type) * nper + fv;
-} else {
-f = Math.pow(1 + rate, nper);
-y = pv * f + pmt * (1 / rate + type) * (f - 1) + fv;
-}
-y0 = pv + pmt * nper + fv;
-y1 = pv * f + pmt * (1 / rate + type) * (f - 1) + fv;
-
-// find root by Newton secant method
-i = x0 = 0.0;
-x1 = rate;
-while ((Math.abs(y0 - y1) > FINANCIAL_PRECISION) && (i < 
FINANCIAL_MAX_ITERATIONS)) {
-rate = (y1 * x0 - y0 * x1) / (y1 - y0);
-x0 = x1;
-x1 = rate;
+private static double _g_div_gp(double r, double n, double p, double x, 
double y, double w) {
+double t1 = Math.pow(r+1, n);
+double t2 = Math.pow(r+1, n-1);
+return (y + t1*x + p*(t1 - 1)*(r*w + 1)/r) /
+(n*t2*x - p*(t1 - 1)*(r*w + 1)/(Math.pow(r, 2) + n*p*t2*(r*w + 
1)/r +
+p*(t1 - 1)*w/r));
+}
 
-if (Math.abs(rate) < FINANCIAL_PRECISION) {
-y = pv * (1 + nper * rate) + pmt * (1 + rate * type) * nper + 
fv;
-} else {
-f = Math.exp(nper * Math.log(1 + rate));
-y = pv * f + pmt * (1 / rate + type) * (f - 1) + fv;
-}
+/**
+ * Compute the rate of interest per period.
+ *
+ * The implementation was ported from the NumPy library,
+ * see 
https://github.com/numpy/numpy-financial/blob/d02edfb65dcdf23bd571c2cded7fcd4a0528c6af/numpy_financial/_financial.py#L602
+ *
+ *
+ * @param nper Number of compounding periods
+ * @param pmt Payment
+ * @param pv Present Value
+ * @param fv Future value
+ * @param type When payments are due ('begin' (1) or 'end' (0))
+ * @param guess Starting guess for solving the rate of interest
+ * @return rate of interest per period or NaN if the solution didn't 
converge
+ */
+static double calculateRate(double nper, double pmt, double pv, double fv, 
double type, double guess){
+double tol = 1e-8;
+double maxiter = 100;
+
+double rn = guess;
+int iter = 0;
+boolean close = false;
+while (iter < maxiter && !close){
+double rnp1 = rn - _g_div_gp(rn, nper, pmt, pv, fv, type);
+double diff = Math.abs(rnp1 - rn);
+close = diff < tol;
+iter += 1;
+rn = rnp1;
 
-y0 = y1;
-y1 = y;
-++i;
 }
-return rate;
+if(!close)
+return Double.NaN;
+else {
+return rn;
+}
 }
 
 /**

Modified: 
poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestRate.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestRate.java?rev=1899668&r1=1899667&r2=1899668&view=diff
==
--- 
poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestRate.java 
(original)
+++ 
poi/trunk/poi/src/test/java/org/apache/poi/ss/formula/functions/TestRate.java 
Fri Apr  8 15:08:50 2022
@@ -24,11 +24,13 @@ import org.apache.poi.hssf.usermodel.HSS
 import org.apache.poi.hssf.usermodel.HSSFRow;
 import org.apache.poi.hssf.usermodel.HSSFSheet;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.FormulaError;
 import org.junit.jupiter.api.Disabled;
 import or

svn commit: r1881924 - in /poi/trunk: osgi/ osgi/src/main/java/org/apache/poi/osgi/ osgi/src/test/java/org/apache/poi/osgi/ src/java/org/apache/poi/extractor/ src/java/org/apache/poi/sl/usermodel/ src

2020-09-22 Thread yegor
Author: yegor
Date: Tue Sep 22 12:42:18 2020
New Revision: 1881924

URL: http://svn.apache.org/viewvc?rev=1881924&view=rev
Log:
OSGi support: register service providers in bundle activator

Added:
poi/trunk/osgi/src/test/java/org/apache/poi/osgi/BaseOSGiTestCase.java   
(with props)
poi/trunk/osgi/src/test/java/org/apache/poi/osgi/OSGiExtractorsIT.java   
(with props)
poi/trunk/osgi/src/test/java/org/apache/poi/osgi/OSGiSlideShowIT.java   
(with props)
Modified:
poi/trunk/osgi/pom.xml
poi/trunk/osgi/src/main/java/org/apache/poi/osgi/Activator.java
poi/trunk/osgi/src/test/java/org/apache/poi/osgi/OSGiSpreadsheetIT.java
poi/trunk/src/java/org/apache/poi/extractor/ExtractorFactory.java
poi/trunk/src/java/org/apache/poi/sl/usermodel/SlideShowFactory.java
poi/trunk/src/java/org/apache/poi/ss/usermodel/WorkbookFactory.java

Modified: poi/trunk/osgi/pom.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/osgi/pom.xml?rev=1881924&r1=1881923&r2=1881924&view=diff
==
--- poi/trunk/osgi/pom.xml (original)
+++ poi/trunk/osgi/pom.xml Tue Sep 22 12:42:18 2020
@@ -50,6 +50,9 @@
 true
 
 
+
+org.apache.poi.osgi.Activator
+
 
 org.apache.poi.*,
 org.openxmlformats.schemas.*,

Modified: poi/trunk/osgi/src/main/java/org/apache/poi/osgi/Activator.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/osgi/src/main/java/org/apache/poi/osgi/Activator.java?rev=1881924&r1=1881923&r2=1881924&view=diff
==
--- poi/trunk/osgi/src/main/java/org/apache/poi/osgi/Activator.java (original)
+++ poi/trunk/osgi/src/main/java/org/apache/poi/osgi/Activator.java Tue Sep 22 
12:42:18 2020
@@ -17,12 +17,44 @@
 
 package org.apache.poi.osgi;
 
+import org.apache.poi.extractor.ExtractorFactory;
+import org.apache.poi.extractor.MainExtractorFactory;
+import org.apache.poi.extractor.ole2.OLE2ScratchpadExtractorFactory;
+import org.apache.poi.hslf.usermodel.HSLFSlideShowFactory;
+import org.apache.poi.hssf.usermodel.HSSFWorkbookFactory;
+import org.apache.poi.ooxml.extractor.POIXMLExtractorFactory;
+import org.apache.poi.sl.usermodel.SlideShowFactory;
+import org.apache.poi.ss.usermodel.WorkbookFactory;
+import org.apache.poi.xslf.usermodel.XSLFSlideShowFactory;
+import org.apache.poi.xssf.usermodel.XSSFWorkbookFactory;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 
 public class Activator implements BundleActivator {
-public void start(BundleContext context) throws Exception {
+
+@Override
+public void start(BundleContext context) {
+WorkbookFactory.addProvider(new HSSFWorkbookFactory());
+WorkbookFactory.addProvider(new XSSFWorkbookFactory());
+
+SlideShowFactory.addProvider(new HSLFSlideShowFactory());
+SlideShowFactory.addProvider(new XSLFSlideShowFactory());
+
+ExtractorFactory.addProvider(new OLE2ScratchpadExtractorFactory());
+ExtractorFactory.addProvider(new POIXMLExtractorFactory());
+ExtractorFactory.addProvider(new MainExtractorFactory());
 }
-public void stop(BundleContext context) throws Exception {
+
+@Override
+public void stop(BundleContext context) {
+WorkbookFactory.removeProvider(HSSFWorkbookFactory.class);
+WorkbookFactory.removeProvider(XSSFWorkbookFactory.class);
+
+SlideShowFactory.removeProvider(HSLFSlideShowFactory.class);
+SlideShowFactory.removeProvider(XSLFSlideShowFactory.class);
+
+ExtractorFactory.removeProvider(OLE2ScratchpadExtractorFactory.class);
+ExtractorFactory.removeProvider(POIXMLExtractorFactory.class);
+ExtractorFactory.removeProvider(MainExtractorFactory.class);
 }
 }

Added: poi/trunk/osgi/src/test/java/org/apache/poi/osgi/BaseOSGiTestCase.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/osgi/src/test/java/org/apache/poi/osgi/BaseOSGiTestCase.java?rev=1881924&view=auto
==
--- poi/trunk/osgi/src/test/java/org/apache/poi/osgi/BaseOSGiTestCase.java 
(added)
+++ poi/trunk/osgi/src/test/java/org/apache/poi/osgi/BaseOSGiTestCase.java Tue 
Sep 22 12:42:18 2020
@@ -0,0 +1,49 @@
+/* 
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License

svn commit: r1881825 - /poi/trunk/osgi/pom.xml

2020-09-18 Thread yegor
Author: yegor
Date: Fri Sep 18 15:44:40 2020
New Revision: 1881825

URL: http://svn.apache.org/viewvc?rev=1881825&view=rev
Log:
mark org.apache.commons.logging.* as an optional osgi dependency

Modified:
poi/trunk/osgi/pom.xml

Modified: poi/trunk/osgi/pom.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/osgi/pom.xml?rev=1881825&r1=1881824&r2=1881825&view=diff
==
--- poi/trunk/osgi/pom.xml (original)
+++ poi/trunk/osgi/pom.xml Fri Sep 18 15:44:40 2020
@@ -80,6 +80,7 @@
 org.apache.xml.resolver.*;resolution:=optional,
 org.apache.xml.security.*;resolution:=optional,
 org.bouncycastle.*;resolution:=optional,
+org.apache.commons.logging.*;resolution:=optional,
 !com.github.luben.zstd.*,
 !org.tukaani.xz.*,
 !org.brotli.dec.*,



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1881771 - in /poi/trunk: maven/ osgi/ osgi/lib/ osgi/src/test/java/org/apache/poi/osgi/

2020-09-16 Thread yegor
Author: yegor
Date: Wed Sep 16 15:48:27 2020
New Revision: 1881771

URL: http://svn.apache.org/viewvc?rev=1881771&view=rev
Log:
Bug 57857 POI OSGi bundle

Added:
poi/trunk/osgi/README.md
poi/trunk/osgi/src/test/java/org/apache/poi/osgi/OSGiSpreadsheetIT.java   
(with props)
Removed:
poi/trunk/osgi/build.xml
poi/trunk/osgi/bundle.info
poi/trunk/osgi/lib/
poi/trunk/osgi/src/test/java/org/apache/poi/osgi/TestOSGiBundle.java
poi/trunk/osgi/test-bundles.xml
Modified:
poi/trunk/maven/ooxml-schemas.pom
poi/trunk/maven/poi-ooxml-schemas.pom
poi/trunk/osgi/pom.xml

Modified: poi/trunk/maven/ooxml-schemas.pom
URL: 
http://svn.apache.org/viewvc/poi/trunk/maven/ooxml-schemas.pom?rev=1881771&r1=1881770&r2=1881771&view=diff
==
--- poi/trunk/maven/ooxml-schemas.pom (original)
+++ poi/trunk/maven/ooxml-schemas.pom Wed Sep 16 15:48:27 2020
@@ -64,7 +64,7 @@
 
   org.apache.xmlbeans
   xmlbeans
-  2.6.0
+  4.0.0
 
   
 

Modified: poi/trunk/maven/poi-ooxml-schemas.pom
URL: 
http://svn.apache.org/viewvc/poi/trunk/maven/poi-ooxml-schemas.pom?rev=1881771&r1=1881770&r2=1881771&view=diff
==
--- poi/trunk/maven/poi-ooxml-schemas.pom (original)
+++ poi/trunk/maven/poi-ooxml-schemas.pom Wed Sep 16 15:48:27 2020
@@ -70,7 +70,7 @@
 
   org.apache.xmlbeans
   xmlbeans
-  3.1.0
+  4.0.0
 
   
 

Added: poi/trunk/osgi/README.md
URL: http://svn.apache.org/viewvc/poi/trunk/osgi/README.md?rev=1881771&view=auto
==
--- poi/trunk/osgi/README.md (added)
+++ poi/trunk/osgi/README.md Wed Sep 16 15:48:27 2020
@@ -0,0 +1,58 @@
+# Apache POI OSGi Bundle
+
+The POI bundle is an Uber jar which exports all the POI classes, XML Beans, 
OOXML Schemas and required  dependencies. The current size is around 21 MB. 
+The bundle is self-contained and can be used out of the box in a bare OSGi 
container.
+
+## Embedded Dependencies
+The bundle embeds all the jars from lib/main:
+
+- SparseBitSet
+- curvesapi
+- commons-math3
+- commons-compress
+- commons-collections4
+- commons-codec
+
+## Optional Dependencies
+
+1. Apache Batik
+Required to render WMF/EMF images. The OSGi bundle is provided by ServiceMix 
and available in Maven Central: 
https://mvnrepository.com/artifact/org.apache.servicemix.bundles/org.apache.servicemix.bundles.batik/1.13_1
+2. Saxon
+Required if using as the XSLT and XQuery Processor engine in XML Beans.
+Available in Maven Central: 
https://mvnrepository.com/artifact/net.sf.saxon/saxon/8.9.0.4-osgi
+3. Apache XML Security for Java, Bouncy Castle and XML Commons Resolver 
+These are required to sign or validate signed Office documents. The OSGi 
bundles are available in Maven Central:
+
+- Apache XML Security for Java: 
https://mvnrepository.com/artifact/org.apache.santuario/xmlsec/2.2.0
+
+- XML Commons Resolver: 
https://mvnrepository.com/artifact/xml-resolver/xml-resolver/1.2-osgi
+
+- Bouncy Castle: 
https://mvnrepository.com/artifact/org.bouncycastle/bcprov-ext-jdk15on/1.66, 
https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk15on/1.66
+
+## Blocked Imports
+
+The Bundle Maven Plugin performs a thorough inspection of the dependencies on 
external packages and by default  includes them all in the  
section. 
+
+Transitive dependencies from XML Beans not required by POI:
+
+- !com.github.javaparser.*,
+- !org.apache.tools.ant.*
+
+Optional codecs pulled by  Commons-Compress. Not used by POI
+
+- !com.github.luben.zstd.*,
+- !org.tukaani.xz.*,
+- !org.brotli.dec.*,
+
+Internal APIs which are no more in JPMS
+
+- !sun.misc.*
+
+## Integration Testing
+
+The project tests the bundle using the Pax Exam framework which executes junit 
tests within an OSGi container started by Maven. The current version uses the 
Apache Felix driver but the framework should not matter, same tests will pass 
with the Karaf or Equinox drivers.
+
+When running integration tests Maven starts a bare Apache Felix OSGi 
container, deploys the POI bundle and runs a few simple tests to validate the 
code is working fine, e.g. create a spreadsheet, serialize it to a byte array 
and read back.
+
+ 
+

Modified: poi/trunk/osgi/pom.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/osgi/pom.xml?rev=1881771&r1=1881770&r2=1881771&view=diff
==
--- poi/trunk/osgi/pom.xml (original)
+++ poi/trunk/osgi/pom.xml Wed Sep 16 15:48:27 2020
@@ -1,4 +1,4 @@
-
+
 
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
 

svn commit: r1855662 - in /poi/trunk: src/java/org/apache/poi/ss/formula/eval/ src/java/org/apache/poi/ss/formula/functions/ src/java/org/apache/poi/ss/usermodel/ src/testcases/org/apache/poi/ss/formu

2019-03-16 Thread yegor
Author: yegor
Date: Sat Mar 16 15:41:46 2019
New Revision: 1855662

URL: http://svn.apache.org/viewvc?rev=1855662&view=rev
Log:
Bug 61472: Convert date/time strings to numbers when evaluating formulas

Added:

poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestDateTimeToNumberFromSpreadsheet.java
   (with props)
poi/trunk/test-data/spreadsheet/DateTimeToNumberTestCases.xls   (with props)
Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/eval/OperandResolver.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Value.java
poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java

poi/trunk/src/testcases/org/apache/poi/ss/formula/eval/TestOperandResolver.java

poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/eval/OperandResolver.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/eval/OperandResolver.java?rev=1855662&r1=1855661&r2=1855662&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/eval/OperandResolver.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/eval/OperandResolver.java Sat 
Mar 16 15:41:46 2019
@@ -18,8 +18,10 @@
 package org.apache.poi.ss.formula.eval;
 
 import org.apache.poi.ss.formula.EvaluationCell;
+import org.apache.poi.ss.usermodel.DateUtil;
 import org.apache.poi.ss.util.CellRangeAddress;
 
+import java.time.DateTimeException;
 import java.util.regex.Pattern;
 
 /**
@@ -258,7 +260,9 @@ public final class OperandResolver {
 return ((NumericValueEval)ev).getNumberValue();
 }
 if (ev instanceof StringEval) {
-Double dd = parseDouble(((StringEval) ev).getStringValue());
+String sval = ((StringEval) ev).getStringValue();
+Double dd = parseDouble(sval);
+if(dd == null) dd = parseDateTime(sval);
 if (dd == null) {
 throw EvaluationException.invalidValue();
 }
@@ -300,6 +304,16 @@ public final class OperandResolver {
 
 }
 
+public static Double parseDateTime(String pText) {
+
+try {
+return DateUtil.parseDateTime(pText);
+} catch (DateTimeException e) {
+return null;
+}
+
+}
+
 /**
  * @param ve must be a NumberEval, StringEval, 
BoolEval, or BlankEval
  * @return the converted string value. never null

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Value.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Value.java?rev=1855662&r1=1855661&r2=1855662&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Value.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Value.java Sat Mar 
16 15:41:46 2019
@@ -22,6 +22,9 @@ import org.apache.poi.ss.formula.eval.Ev
 import org.apache.poi.ss.formula.eval.NumberEval;
 import org.apache.poi.ss.formula.eval.OperandResolver;
 import org.apache.poi.ss.formula.eval.ValueEval;
+import org.apache.poi.ss.usermodel.DateUtil;
+
+import java.time.DateTimeException;
 
 /**
  * Implementation for Excel VALUE() function.
@@ -48,6 +51,7 @@ public final class Value extends Fixed1A
}
String strText = OperandResolver.coerceValueToString(veText);
Double result = convertTextToNumber(strText);
+   if(result == null) result = parseDateTime(strText);
if (result == null) {
return ErrorEval.VALUE_INVALID;
}
@@ -59,7 +63,7 @@ public final class Value extends Fixed1A
 *
 * @return null if there is any problem converting the text
 */
-   private static Double convertTextToNumber(String strText) {
+   public static Double convertTextToNumber(String strText) {
boolean foundCurrency = false;
boolean foundUnaryPlus = false;
boolean foundUnaryMinus = false;
@@ -189,4 +193,14 @@ public final class Value extends Fixed1A
 double result = foundUnaryMinus ? -d : d;
 return foundPercentage ? result/100. : result;
}
+
+   public static Double parseDateTime(String pText) {
+
+   try {
+   return DateUtil.parseDateTime(pText);
+   } catch (DateTimeException e) {
+   return null;
+   }
+
+   }
 }

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java?rev=1855662&r1=1855661&r2=1855662&view=diff
==
--- poi/tr

svn commit: r1854037 - in /poi/trunk/src: java/org/apache/poi/ss/formula/FormulaParser.java testcases/org/apache/poi/hssf/model/TestFormulaParser.java testcases/org/apache/poi/ss/usermodel/BaseTestFor

2019-02-21 Thread yegor
Author: yegor
Date: Thu Feb 21 11:00:40 2019
New Revision: 1854037

URL: http://svn.apache.org/viewvc?rev=1854037&view=rev
Log:
Bug 60980: Fix parsing formulas with intersections in functions args

Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/FormulaParser.java
poi/trunk/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java

poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestFormulaEvaluator.java

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/FormulaParser.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/FormulaParser.java?rev=1854037&r1=1854036&r2=1854037&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/FormulaParser.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/FormulaParser.java Thu Feb 21 
11:00:40 2019
@@ -939,7 +939,7 @@ public final class FormulaParser {
 GetChar();
 }
 SkipWhite();
-
+
 return sb.toString();
 }
 
@@ -1476,7 +1476,7 @@ public final class FormulaParser {
 missedPrevArg = true;
 continue;
 }
-temp.add(comparisonExpression());
+temp.add(intersectionExpression());
 missedPrevArg = false;
 SkipWhite();
 if (!isArgumentDelimiter(look)) {

Modified: 
poi/trunk/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java?rev=1854037&r1=1854036&r2=1854037&view=diff
==
--- poi/trunk/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java 
(original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java 
Thu Feb 21 11:00:40 2019
@@ -1279,7 +1279,42 @@ public final class TestFormulaParser {
 ParenthesisPtg.class
 );
 }
-
+
+// https://bz.apache.org/bugzilla/show_bug.cgi?id=60980
+@Test
+public void testIntersectionInFunctionArgs() {
+confirmTokenClasses("SUM(A1:B2 B2:C3)",
+MemAreaPtg.class,
+AreaPtg.class,
+AreaPtg.class,
+IntersectionPtg.class,
+AttrPtg.class
+);
+}
+
+@Test
+public void testIntersectionNamesInFunctionArgs() {
+HSSFWorkbook wb = new HSSFWorkbook();
+
+HSSFName name1 = wb.createName();
+name1.setNameName("foo1");
+name1.setRefersToFormula("A1:A3");
+
+HSSFName name2 = wb.createName();
+name2.setNameName("foo2");
+name2.setRefersToFormula("A1:B3");
+
+Ptg[] ptgs = FormulaParser.parse("SUM(foo1 foo2)", 
HSSFEvaluationWorkbook.create(wb), FormulaType.CELL, -1);
+
+confirmTokenClasses(ptgs,
+MemFuncPtg.class,
+NamePtg.class,
+NamePtg.class,
+IntersectionPtg.class,
+AttrPtg.class
+);
+}
+
 @Test
 public void testRange_bug46643() throws IOException {
 String formula = "Sheet1!A1:Sheet1!B3";

Modified: 
poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestFormulaEvaluator.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestFormulaEvaluator.java?rev=1854037&r1=1854036&r2=1854037&view=diff
==
--- 
poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestFormulaEvaluator.java
 (original)
+++ 
poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestFormulaEvaluator.java
 Thu Feb 21 11:00:40 2019
@@ -691,4 +691,42 @@ public abstract class BaseTestFormulaEva
 assertEquals(formula, a2.getCellFormula());
 }
 }
+
+// setting an evaluation of function arguments with the intersect operator 
(space)
+// see https://bz.apache.org/bugzilla/show_bug.cgi?id=60980
+@Test
+public void testIntersectionInFunctionArgs_60980() throws IOException {
+Workbook wb = _testDataProvider.createWorkbook();
+FormulaEvaluator fe = wb.getCreationHelper().createFormulaEvaluator();
+
+
+Name n1 = wb.createName();
+n1.setNameName("foo");
+n1.setRefersToFormula("A4:B5");
+Name n2 = wb.createName();
+n2.setNameName("bar");
+n2.setRefersToFormula("B4:C5");
+
+Sheet sheet = wb.createSheet();
+Row row3 = sheet.createRow(3);
+row3.createCell(0).setCellValue(1);
+row3.createCell(1).setCellValue(2);
+row3.createCell(2).setCellValue(3);
+Row row4 = sheet.createRow(4);
+row4.createCell(0).setCellValue(4)

svn commit: r1853523 - /poi/trunk/build.xml

2019-02-13 Thread yegor
Author: yegor
Date: Wed Feb 13 18:37:20 2019
New Revision: 1853523

URL: http://svn.apache.org/viewvc?rev=1853523&view=rev
Log:
Bug 63029: fixed failing test in test-ooxml-lite 

Modified:
poi/trunk/build.xml

Modified: poi/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/build.xml?rev=1853523&r1=1853522&r2=1853523&view=diff
==
--- poi/trunk/build.xml (original)
+++ poi/trunk/build.xml Wed Feb 13 18:37:20 2019
@@ -409,6 +409,7 @@ under the License.
 
 
 
+
 
 
 



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1853474 - in /poi/trunk/src/ooxml: java/org/apache/poi/openxml4j/opc/ZipPackage.java testcases/org/apache/poi/openxml4j/opc/TestPackage.java

2019-02-12 Thread yegor
Author: yegor
Date: Wed Feb 13 06:45:14 2019
New Revision: 1853474

URL: http://svn.apache.org/viewvc?rev=1853474&view=rev
Log:
Bug 63029: revert handling NotOfficeXmlFileException in ZipPackage as this 
change broke the build 

Modified:
poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java
poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java?rev=1853474&r1=1853473&r2=1853474&view=diff
==
--- poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java Wed 
Feb 13 06:45:14 2019
@@ -144,7 +144,9 @@ public final class ZipPackage extends OP
 if (access == PackageAccess.WRITE) {
 throw new InvalidOperationException("Can't open the specified 
file: '" + file + "'", e);
 }
-if ("archive is not a ZIP archive".equals(e.getMessage())) {
+// YK: this is incorrect and the exception below is never thrown.
+// The could below should catch "archive is not a ZIP archive"
+if ("java.util.zip.ZipException: archive is not a ZIP 
archive".equals(e.getMessage())) {
 throw new NotOfficeXmlFileException("archive is not a ZIP 
archive", e);
 }
 LOG.log(POILogger.ERROR, "Error in zip file "+file+" - falling 
back to stream processing (i.e. ignoring zip central directory)");

Modified: 
poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java?rev=1853474&r1=1853473&r2=1853474&view=diff
==
--- poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java 
(original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java 
Wed Feb 13 06:45:14 2019
@@ -1195,11 +1195,14 @@ public final class TestPackage {
File tmpFile = 
OpenXML4JTestDataSamples.getOutputFile("Bug63029.docx");
Files.copy(testFile, tmpFile);
 
+   int numPartsBefore = 0;
String md5Before = Files.hash(tmpFile, 
Hashing.md5()).toString();
 
RuntimeException ex = null;
try(OPCPackage pkg = OPCPackage.open(tmpFile, 
PackageAccess.READ_WRITE))
{
+   numPartsBefore = pkg.getParts().size();
+
// add a marshaller that will throw an exception on save
pkg.addMarshaller("poi/junit", (part, out) -> {
throw new RuntimeException("Bugzilla 63029");
@@ -1216,10 +1219,12 @@ public final class TestPackage {
assertEquals(md5Before, md5After);
 
// try to read the source file once again
-   try ( OPCPackage zip = OPCPackage.open(tmpFile, 
PackageAccess.READ_WRITE)){
+   try ( OPCPackage pkg = OPCPackage.open(tmpFile, 
PackageAccess.READ_WRITE)){
// the source is still a valid zip archive.
// prior to the fix this used to throw 
NotOfficeXmlFileException("archive is not a ZIP archive")
 
+   // assert that the number of parts remained the same
+   assertEquals(pkg.getParts().size(), numPartsBefore);
}
 
}



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1853455 - /poi/site/src/documentation/content/xdocs/changes.xml

2019-02-12 Thread yegor
Author: yegor
Date: Tue Feb 12 16:55:29 2019
New Revision: 1853455

URL: http://svn.apache.org/viewvc?rev=1853455&view=rev
Log:
Bug 63029: OPCPackage Potentially clobbers files on close()  

Modified:
poi/site/src/documentation/content/xdocs/changes.xml

Modified: poi/site/src/documentation/content/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/changes.xml?rev=1853455&r1=1853454&r2=1853455&view=diff
==
--- poi/site/src/documentation/content/xdocs/changes.xml (original)
+++ poi/site/src/documentation/content/xdocs/changes.xml Tue Feb 12 16:55:29 
2019
@@ -87,6 +87,7 @@
 
 
   
+OPCPackage 
Potentially clobbers files on close()
 Make D* functions ignore case in headings 
 Adding 
custom properties creates invalid .xlsx file on second write
 Null 
pointer exception in ExternSheetNameResolver.prependSheetName method



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1853454 - in /poi/trunk/src/ooxml: java/org/apache/poi/openxml4j/opc/ZipPackage.java testcases/org/apache/poi/openxml4j/opc/TestPackage.java

2019-02-12 Thread yegor
Author: yegor
Date: Tue Feb 12 16:55:13 2019
New Revision: 1853454

URL: http://svn.apache.org/viewvc?rev=1853454&view=rev
Log:
Bug 63029: OPCPackage Potentially clobbers files on close()  

Modified:
poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java
poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java?rev=1853454&r1=1853453&r2=1853454&view=diff
==
--- poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java Tue 
Feb 12 16:55:13 2019
@@ -144,7 +144,7 @@ public final class ZipPackage extends OP
 if (access == PackageAccess.WRITE) {
 throw new InvalidOperationException("Can't open the specified 
file: '" + file + "'", e);
 }
-if ("java.util.zip.ZipException: archive is not a ZIP 
archive".equals(e.getMessage())) {
+if ("archive is not a ZIP archive".equals(e.getMessage())) {
 throw new NotOfficeXmlFileException("archive is not a ZIP 
archive", e);
 }
 LOG.log(POILogger.ERROR, "Error in zip file "+file+" - falling 
back to stream processing (i.e. ignoring zip central directory)");
@@ -424,14 +424,18 @@ public final class ZipPackage extends OP
File tempFile = TempFile.createTempFile(tempFileName, ".tmp");
 
// Save the final package to a temporary file
+boolean success = false;
try {
save(tempFile);
+success = true;
} finally {
 // Close the current zip file, so we can overwrite it on all 
platforms
 IOUtils.closeQuietly(this.zipArchive);
try {
-   // Copy the new file over the old one
-   FileHelper.copyFile(tempFile, targetFile);
+   // Copy the new file over the old one if save() 
succeed
+if(success) {
+   FileHelper.copyFile(tempFile, targetFile);
+}
} finally {
// Either the save operation succeed or not, we 
delete the temporary file
if (!tempFile.delete()) {

Modified: 
poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java?rev=1853454&r1=1853453&r2=1853454&view=diff
==
--- poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java 
(original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java 
Tue Feb 12 16:55:13 2019
@@ -17,6 +17,8 @@
 
 package org.apache.poi.openxml4j.opc;
 
+import com.google.common.hash.Hashing;
+import com.google.common.io.Files;
 import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
 import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
 import org.apache.commons.compress.archivers.zip.ZipFile;
@@ -84,6 +86,7 @@ import java.util.List;
 import java.util.TreeMap;
 import java.util.function.BiConsumer;
 import java.util.regex.Pattern;
+import java.util.zip.ZipException;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -1185,4 +1188,39 @@ public final class TestPackage {
.appendValue(expectedMessage);
}
}
+
+   @Test
+   public void testBug63029() throws Exception {
+   File testFile = 
OpenXML4JTestDataSamples.getSampleFile("sample.docx");
+   File tmpFile = 
OpenXML4JTestDataSamples.getOutputFile("Bug63029.docx");
+   Files.copy(testFile, tmpFile);
+
+   String md5Before = Files.hash(tmpFile, 
Hashing.md5()).toString();
+
+   RuntimeException ex = null;
+   try(OPCPackage pkg = OPCPackage.open(tmpFile, 
PackageAccess.READ_WRITE))
+   {
+   // add a marshaller that will throw an exception on save
+   pkg.addMarshaller("poi/junit", (part, out) -> {
+   throw new RuntimeException("Bugzilla 63029");
+   });
+   
pkg.createPart(PackagingURIHelper.createPartName("/poi/test.xml"), "poi/junit");
+   } catch (RuntimeEx

svn commit: r1853268 - in /poi/trunk: src/java/org/apache/poi/ss/formula/functions/DStarRunner.java test-data/spreadsheet/DGet.xls

2019-02-09 Thread yegor
Author: yegor
Date: Sat Feb  9 13:00:09 2019
New Revision: 1853268

URL: http://svn.apache.org/viewvc?rev=1853268&view=rev
Log:
Bug 62980: Make D* functions ignore case in headings

Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/DStarRunner.java
poi/trunk/test-data/spreadsheet/DGet.xls

Modified: 
poi/trunk/src/java/org/apache/poi/ss/formula/functions/DStarRunner.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/DStarRunner.java?rev=1853268&r1=1853267&r2=1853268&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/DStarRunner.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/DStarRunner.java Sat 
Feb  9 13:00:09 2019
@@ -164,6 +164,7 @@ public final class DStarRunner implement
 
 /**
  * For a given database returns the column number for a column heading.
+ * Comparison is case-insensitive.
  *
  * @param db Database.
  * @param name Column heading.
@@ -183,7 +184,7 @@ public final class DStarRunner implement
 continue;
 }
 String columnName = 
OperandResolver.coerceValueToString(columnNameValueEval);
-if(name.equals(columnName)) {
+if(name.equalsIgnoreCase(columnName)) {
 resultColumn = column;
 break;
 }

Modified: poi/trunk/test-data/spreadsheet/DGet.xls
URL: 
http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/DGet.xls?rev=1853268&r1=1853267&r2=1853268&view=diff
==
Binary files - no diff available.



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1853267 - /poi/site/src/documentation/content/xdocs/changes.xml

2019-02-09 Thread yegor
Author: yegor
Date: Sat Feb  9 12:59:41 2019
New Revision: 1853267

URL: http://svn.apache.org/viewvc?rev=1853267&view=rev
Log:
Bug 62980: Make D* functions ignore case in headings

Modified:
poi/site/src/documentation/content/xdocs/changes.xml

Modified: poi/site/src/documentation/content/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/changes.xml?rev=1853267&r1=1853266&r2=1853267&view=diff
==
--- poi/site/src/documentation/content/xdocs/changes.xml (original)
+++ poi/site/src/documentation/content/xdocs/changes.xml Sat Feb  9 12:59:41 
2019
@@ -87,6 +87,7 @@
 
 
   
+Make D* functions ignore case in headings 
 Adding 
custom properties creates invalid .xlsx file on second write
 Null 
pointer exception in ExternSheetNameResolver.prependSheetName method
 Fix 
copying styles/conditional formatting



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1851263 - in /poi/trunk: src/java/org/apache/poi/ss/formula/ src/java/org/apache/poi/ss/formula/eval/ src/java/org/apache/poi/ss/formula/functions/ src/testcases/org/apache/poi/ss/formula

2019-01-14 Thread yegor
Author: yegor
Date: Mon Jan 14 14:48:21 2019
New Revision: 1851263

URL: http://svn.apache.org/viewvc?rev=1851263&view=rev
Log:
follow-up to Bug 62904. More tests and improved evaluation of IF in array mode

Added:

poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestBooleanFunctionsFromSpreadsheet.java
   (with props)
poi/trunk/test-data/spreadsheet/BooleanFunctionsTestCaseData.xls   (with 
props)
poi/trunk/test-data/spreadsheet/RowFunctionTestCaseData.xls   (with props)
Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
poi/trunk/src/java/org/apache/poi/ss/formula/eval/UnaryMinusEval.java
poi/trunk/src/java/org/apache/poi/ss/formula/eval/UnaryPlusEval.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/ArrayFunction.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/BooleanFunction.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/IfFunc.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/LogicalFunction.java
poi/trunk/test-data/spreadsheet/IfFunctionTestCaseData.xls

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java?rev=1851263&r1=1851262&r2=1851263&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java Mon Jan 
14 14:48:21 2019
@@ -398,6 +398,9 @@ public final class WorkbookEvaluator {
 dbgEvaluationOutputIndent++;
 }
 
+EvaluationSheet evalSheet = 
ec.getWorkbook().getSheet(ec.getSheetIndex());
+EvaluationCell evalCell = evalSheet.getCell(ec.getRowIndex(), 
ec.getColumnIndex());
+
 Stack stack = new Stack<>();
 for (int i = 0, iSize = ptgs.length; i < iSize; i++) {
 // since we don't know how to handle these yet :(
@@ -436,46 +439,41 @@ public final class WorkbookEvaluator {
 continue;
 }
 if (attrPtg.isOptimizedIf()) {
-ValueEval arg0 = stack.pop();
-boolean evaluatedPredicate;
-try {
-evaluatedPredicate = IfFunc.evaluateFirstArg(arg0, 
ec.getRowIndex(), ec.getColumnIndex());
-} catch (EvaluationException e) {
-stack.push(e.getErrorEval());
-int dist = attrPtg.getData();
-i+= countTokensToBeSkipped(ptgs, i, dist);
-attrPtg = (AttrPtg) ptgs[i];
-dist = attrPtg.getData()+1;
-i+= countTokensToBeSkipped(ptgs, i, dist);
-continue;
-}
-if (evaluatedPredicate) {
-// nothing to skip - true param follows
-} else {
-int dist = attrPtg.getData();
-Ptg currPtg = ptgs[i+1];
-i+= countTokensToBeSkipped(ptgs, i, dist);
-Ptg nextPtg = ptgs[i+1];
+if(!evalCell.isPartOfArrayFormulaGroup()) {
+ValueEval arg0 = stack.pop();
+boolean evaluatedPredicate;
 
-if (ptgs[i] instanceof AttrPtg && nextPtg instanceof 
FuncVarPtg &&
-// in order to verify that there is no third 
param, we need to check
-// if we really have the IF next or some other 
FuncVarPtg as third param, e.g. ROW()/COLUMN()!
-((FuncVarPtg)nextPtg).getFunctionIndex() == 
FunctionMetadataRegistry.FUNCTION_INDEX_IF) {
-// this is an if statement without a false param 
(as opposed to MissingArgPtg as the false param)
-//i++;
-stack.push(arg0);
-if(currPtg instanceof AreaPtg){
-// IF in array mode. See Bug 62904
-ValueEval currEval = getEvalForPtg(currPtg, 
ec);
-stack.push(currEval);
-} else {
+try {
+evaluatedPredicate = IfFunc.evaluateFirstArg(arg0, 
ec.getRowIndex(), ec.getColumnIndex());
+} catch (EvaluationException e) {
+stack.push(e.getErrorEval());
+int dist = attrPtg.getData();
+i += countTokensToBeSkipped(ptgs, i, dist);
+attrPtg = (AttrPtg) ptgs[i];
+dist = attrPtg.getData() + 1;
+ 

svn commit: r1850773 - /poi/site/src/documentation/content/xdocs/changes.xml

2019-01-08 Thread yegor
Author: yegor
Date: Tue Jan  8 16:37:24 2019
New Revision: 1850773

URL: http://svn.apache.org/viewvc?rev=1850773&view=rev
Log:
added bugs 63054 and 62904 to changelog

Modified:
poi/site/src/documentation/content/xdocs/changes.xml

Modified: poi/site/src/documentation/content/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/changes.xml?rev=1850773&r1=1850772&r2=1850773&view=diff
==
--- poi/site/src/documentation/content/xdocs/changes.xml (original)
+++ poi/site/src/documentation/content/xdocs/changes.xml Tue Jan  8 16:37:24 
2019
@@ -87,7 +87,9 @@
 
 
   
+Improved evaluation of array formulas with errors in arguments
 Make POILogger subclassable
+Support array arguments in IF and logical IS*** functions
 Provide font embedding for slideshows
 Fix 
setting values/types during formula evaluation for SXSSF
 Allow to 
handle files with invalid content types for pictures
@@ -134,10 +136,12 @@
 Provide OOXMLLite alternative for Java 12+
 Handle off-spec, variant REFERENCE_NAME record structure 
in VBAMacroReader
 Handle module name mapping in VBAMacroReader
+Support TREND function
 Rare NPE 
while creating XWPFSDTContent
 Support for FREQUENCY function
 WorkbookFactory.create support for subclass of File, eg 
from JFileChooser
 XLSB 
number extraction improvements
+Support FREQUENCY function
 Add common-compress jar to bin zip/tgz
 Upgrade bouncycastle dependency to 1.60
 Relations 
on XSLFPictureShape were removed unconditionally



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1850772 - /poi/trunk/test-data/spreadsheet/TwoOperandNumericFunctionTestCaseData.xls

2019-01-08 Thread yegor
Author: yegor
Date: Tue Jan  8 16:36:34 2019
New Revision: 1850772

URL: http://svn.apache.org/viewvc?rev=1850772&view=rev
Log:
Bug 63054: updated formulas in test spreadsheet to keep build happy

Modified:
poi/trunk/test-data/spreadsheet/TwoOperandNumericFunctionTestCaseData.xls

Modified: 
poi/trunk/test-data/spreadsheet/TwoOperandNumericFunctionTestCaseData.xls
URL: 
http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/TwoOperandNumericFunctionTestCaseData.xls?rev=1850772&r1=1850771&r2=1850772&view=diff
==
Binary files - no diff available.



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1850742 - in /poi/trunk: src/testcases/org/apache/poi/ss/formula/functions/TestTwoOperandNumericFunctionsFromSpreadsheet.java test-data/spreadsheet/TwoOperandNumericFunctionTestCaseData.x

2019-01-08 Thread yegor
Author: yegor
Date: Tue Jan  8 12:54:39 2019
New Revision: 1850742

URL: http://svn.apache.org/viewvc?rev=1850742&view=rev
Log:
Bug 63054: improved evaluation of array formulas with error in arguments

Added:

poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestTwoOperandNumericFunctionsFromSpreadsheet.java
   (with props)
poi/trunk/test-data/spreadsheet/TwoOperandNumericFunctionTestCaseData.xls   
(with props)

Added: 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestTwoOperandNumericFunctionsFromSpreadsheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestTwoOperandNumericFunctionsFromSpreadsheet.java?rev=1850742&view=auto
==
--- 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestTwoOperandNumericFunctionsFromSpreadsheet.java
 (added)
+++ 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestTwoOperandNumericFunctionsFromSpreadsheet.java
 Tue Jan  8 12:54:39 2019
@@ -0,0 +1,33 @@
+/* 
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ */
+
+package org.apache.poi.ss.formula.functions;
+
+import org.junit.runners.Parameterized.Parameters;
+
+import java.util.Collection;
+
+/**
+ * Tests for numeric functions with two arguments such aqs +, -, *, POWER
+ * as loaded from a test data spreadsheet.
+ */
+public class TestTwoOperandNumericFunctionsFromSpreadsheet extends 
BaseTestFunctionsFromSpreadsheet {
+@Parameters(name="{0}")
+public static Collection data() throws Exception {
+return data(TestTwoOperandNumericFunctionsFromSpreadsheet.class, 
"TwoOperandNumericFunctionTestCaseData.xls");
+}
+}

Propchange: 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestTwoOperandNumericFunctionsFromSpreadsheet.java
--
svn:eol-style = native

Added: poi/trunk/test-data/spreadsheet/TwoOperandNumericFunctionTestCaseData.xls
URL: 
http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/TwoOperandNumericFunctionTestCaseData.xls?rev=1850742&view=auto
==
Binary file - no diff available.

Propchange: 
poi/trunk/test-data/spreadsheet/TwoOperandNumericFunctionTestCaseData.xls
--
svn:mime-type = application/vnd.ms-excel



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1850646 - in /poi/trunk: src/java/org/apache/poi/ss/formula/ src/java/org/apache/poi/ss/formula/eval/ src/java/org/apache/poi/ss/formula/functions/ src/testcases/org/apache/poi/ss/formula

2019-01-07 Thread yegor
Author: yegor
Date: Mon Jan  7 14:34:19 2019
New Revision: 1850646

URL: http://svn.apache.org/viewvc?rev=1850646&view=rev
Log:
Bug 62904: Support array arguments in IF and logical IS*** functions

Added:

poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestIFFunctionFromSpreadsheet.java
   (with props)

poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestLogicalFunctionsFromSpreadsheet.java
   (with props)
poi/trunk/test-data/spreadsheet/IfFunctionTestCaseData.xls   (with props)
poi/trunk/test-data/spreadsheet/LogicalFunctionsTestCaseData.xls   (with 
props)
Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java
poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java

poi/trunk/src/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java

poi/trunk/src/java/org/apache/poi/ss/formula/eval/TwoOperandNumericOperation.java
poi/trunk/src/java/org/apache/poi/ss/formula/eval/UnaryMinusEval.java
poi/trunk/src/java/org/apache/poi/ss/formula/eval/UnaryPlusEval.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/ArrayFunction.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/IfFunc.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/LogicalFunction.java

Modified: 
poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java?rev=1850646&r1=1850645&r2=1850646&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java 
Mon Jan  7 14:34:19 2019
@@ -56,6 +56,7 @@ import org.apache.poi.ss.formula.functio
 import org.apache.poi.ss.formula.functions.ArrayFunction;
 import org.apache.poi.ss.formula.functions.Function;
 import org.apache.poi.ss.formula.functions.Indirect;
+import org.apache.poi.ss.util.CellRangeAddress;
 
 /**
  * This class creates OperationEval instances to help evaluate 
OperationPtg
@@ -138,8 +139,16 @@ final class OperationEvaluatorFactory {
EvaluationSheet evalSheet = 
ec.getWorkbook().getSheet(ec.getSheetIndex());
EvaluationCell evalCell = 
evalSheet.getCell(ec.getRowIndex(), ec.getColumnIndex());
 
-   if (evalCell != null && 
(evalCell.isPartOfArrayFormulaGroup() || ec.isArraymode()) && result instanceof 
ArrayFunction)
-   return ((ArrayFunction) result).evaluateArray(args, 
ec.getRowIndex(), ec.getColumnIndex());
+   if (evalCell != null && result instanceof ArrayFunction) {
+   ArrayFunction func = (ArrayFunction) result;
+   if(evalCell.isPartOfArrayFormulaGroup()){
+   // array arguments must be evaluated 
relative to the function defining range
+   CellRangeAddress ca = 
evalCell.getArrayFormulaRange();
+   return func.evaluateArray(args, 
ca.getFirstRow(), ca.getFirstColumn());
+   } else if (ec.isArraymode()){
+   return func.evaluateArray(args, 
ec.getRowIndex(), ec.getColumnIndex());
+   }
+   }

return  result.evaluate(args, ec.getRowIndex(), 
ec.getColumnIndex());
} else if (udfFunc != null){

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java?rev=1850646&r1=1850645&r2=1850646&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java Mon Jan 
 7 14:34:19 2019
@@ -453,15 +453,24 @@ public final class WorkbookEvaluator {
 // nothing to skip - true param follows
 } else {
 int dist = attrPtg.getData();
+Ptg currPtg = ptgs[i+1];
 i+= countTokensToBeSkipped(ptgs, i, dist);
 Ptg nextPtg = ptgs[i+1];
-if (ptgs[i] instanceof AttrPtg && nextPtg instanceof 
FuncVarPtg && 
-// in order to verify that there is no third 
param, we need to check 
+
+if (ptgs[i] instanceof AttrPtg && nextPtg instanceof 
FuncVarPtg &&
+// in order to verify that 

svn commit: r1845586 - in /poi/trunk: src/java/org/apache/poi/ss/formula/eval/ src/java/org/apache/poi/ss/formula/functions/ src/testcases/org/apache/poi/ss/formula/functions/ test-data/spreadsheet/

2018-11-02 Thread yegor
Author: yegor
Date: Fri Nov  2 13:34:28 2018
New Revision: 1845586

URL: http://svn.apache.org/viewvc?rev=1845586&view=rev
Log:
Bug 62836: Implementation of Excel TREND function

Added:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Trend.java   (with 
props)

poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestTrendFunctionsFromSpreadsheet.java
   (with props)
poi/trunk/test-data/spreadsheet/Trend.xls   (with props)
Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java

poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/AllSpreadsheetBasedTests.java

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java?rev=1845586&r1=1845585&r2=1845586&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java Fri Nov 
 2 13:34:28 2018
@@ -115,7 +115,7 @@ public final class FunctionEval {
 // 47: DVAR
 retval[48] = TextFunction.TEXT;
 // 49: LINEST
-// 50: TREND
+retval[50] = new Trend();
 // 51: LOGEST
 // 52: GROWTH
 

Added: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Trend.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Trend.java?rev=1845586&view=auto
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Trend.java (added)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Trend.java Fri Nov  
2 13:34:28 2018
@@ -0,0 +1,377 @@
+/* 
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ */
+
+/*
+ * Notes:
+ * Duplicate x values don't work most of the time because of the way the
+ * math library handles multiple regression.
+ * The math library currently fails when the number of x variables is >=
+ * the sample size (see 
https://github.com/Hipparchus-Math/hipparchus/issues/13).
+ */
+
+package org.apache.poi.ss.formula.functions;
+
+import org.apache.poi.ss.formula.CacheAreaEval;
+import org.apache.poi.ss.formula.eval.AreaEval;
+import org.apache.poi.ss.formula.eval.BoolEval;
+import org.apache.poi.ss.formula.eval.ErrorEval;
+import org.apache.poi.ss.formula.eval.EvaluationException;
+import org.apache.poi.ss.formula.eval.MissingArgEval;
+import org.apache.poi.ss.formula.eval.NotImplementedException;
+import org.apache.poi.ss.formula.eval.NumberEval;
+import org.apache.poi.ss.formula.eval.NumericValueEval;
+import org.apache.poi.ss.formula.eval.RefEval;
+import org.apache.poi.ss.formula.eval.ValueEval;
+import org.apache.commons.math3.linear.SingularMatrixException;
+import org.apache.commons.math3.stat.regression.OLSMultipleLinearRegression;
+
+import java.util.Arrays;
+
+
+/**
+ * Implementation for the Excel function TREND
+ * 
+ * Syntax:
+ * TREND(known_y's, known_x's, new_x's, constant)
+ *
+ *  known_y's, known_x's, new_x'stypically area 
references, possibly cell references or scalar values
+ *  constantTRUE or FALSE:
+ *  determines whether the regression line should include an intercept 
term
+ *
+ * If known_x's is not given, it is assumed to be the default array {1, 
2, 3, ...}
+ * of the same size as known_y's.
+ * If new_x's is not given, it is assumed to be the same as 
known_x's
+ * If constant is omitted, it is assumed to be TRUE
+ * 
+ */
+
+public final class Trend implements Function {
+MatrixFunction.MutableValueCollector collector = new 
MatrixFunction.MutableValueCollector(false, false);
+private static final class TrendResults {
+public double[] vals;
+public int resultWidth;
+public int resultHeight;
+
+public TrendResults(double[] vals, int resultWidth, int resultHeight) {
+   

svn commit: r1844238 - in /poi/trunk/src: java/org/apache/poi/ss/formula/eval/FunctionEval.java java/org/apache/poi/ss/formula/functions/Frequency.java testcases/org/apache/poi/ss/formula/functions/Te

2018-10-18 Thread yegor
Author: yegor
Date: Thu Oct 18 13:46:04 2018
New Revision: 1844238

URL: http://svn.apache.org/viewvc?rev=1844238&view=rev
Log:
Bug 62373: Support for FREQUENCY function

Added:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Frequency.java   
(with props)

poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestFrequency.java  
 (with props)
Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java?rev=1844238&r1=1844237&r2=1844238&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java Thu Oct 
18 13:46:04 2018
@@ -243,7 +243,8 @@ public final class FunctionEval {
 
 // 247: DB
 // 252: FEQUENCY
-
+retval[252] = Frequency.instance;
+
 retval[FunctionID.EXTERNAL_FUNC] = null; // ExternalFunction is a 
FreeRefFunction, nominally 255
 
 retval[261] = new Errortype();

Added: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Frequency.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Frequency.java?rev=1844238&view=auto
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Frequency.java 
(added)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Frequency.java Thu 
Oct 18 13:46:04 2018
@@ -0,0 +1,81 @@
+/* 
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ */
+
+package org.apache.poi.ss.formula.functions;
+
+import org.apache.poi.ss.formula.CacheAreaEval;
+import org.apache.poi.ss.formula.eval.EvaluationException;
+import org.apache.poi.ss.formula.eval.NumberEval;
+import org.apache.poi.ss.formula.eval.ValueEval;
+
+import java.util.Arrays;
+
+/**
+ * Implementation of Excel 'Analysis ToolPak' function FREQUENCY()
+ * Returns a frequency distribution as a vertical array
+ * 
+ * Syntax
+ * FREQUENCY(data_array, bins_array)
+ * 
+ * data_array Required. An array of or reference to a set of values for 
which you want to count frequencies.
+ * If data_array contains no values, FREQUENCY returns an array of zeros.
+ * bins_array Required. An array of or reference to intervals into 
which you want to group the values in data_array.
+ * If bins_array contains no values, FREQUENCY returns the number of elements 
in data_array.
+ *
+ * @author Yegor Kozlov
+ */
+public class Frequency extends Fixed2ArgFunction {
+public static final Function instance = new Frequency();
+
+private Frequency() {
+// enforce singleton
+}
+
+public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval 
arg0, ValueEval arg1) {
+MatrixFunction.MutableValueCollector collector = new 
MatrixFunction.MutableValueCollector(false, false);
+
+double[] values;
+double[] bins;
+try {
+values = collector.collectValues(arg0);
+bins = collector.collectValues(arg1);
+} catch (EvaluationException e) {
+return e.getErrorEval();
+}
+
+// can bins be not sorted?
+//bins = Arrays.stream(bins).sorted().distinct().toArray();
+
+int[] histogram = histogram(values, bins);
+NumberEval[] result = 
Arrays.stream(histogram).boxed().map(NumberEval::new).toArray(NumberEval[]::new);
+return new CacheAreaEval(srcRowIndex, srcColumnIndex,
+srcRowIndex + result.length - 1, srcColumnIndex, result);
+}
+
+static int findBin(double value, double[] bins) {
+int idx = Arrays.binarySearch(bins, value);
+return idx >= 0 ? idx + 1 : -idx;
+}
+
+static int[] histogram(double[] values, double[] bins) {
+int[] histogram = new in

svn commit: r1819623 - in /poi/trunk: src/ooxml/java/org/apache/poi/xssf/usermodel/ src/ooxml/testcases/org/apache/poi/xssf/usermodel/ test-data/spreadsheet/

2017-12-30 Thread yegor
Author: yegor
Date: Sat Dec 30 16:34:57 2017
New Revision: 1819623

URL: http://svn.apache.org/viewvc?rev=1819623&view=rev
Log:
Bug 58106: when a cell with a 'master' shared formula is removed,  the next 
cell in the range becomes the master

Added:
poi/trunk/test-data/spreadsheet/58106.xlsx   (with props)
Modified:
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java

poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java?rev=1819623&r1=1819622&r2=1819623&view=diff
==
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java Sat 
Dec 30 16:34:57 2017
@@ -559,6 +559,7 @@ public final class XSSFCell implements C
 if (formula == null) {
 wb.onDeleteFormula(this);
 if (_cell.isSetF()) {
+_row.getSheet().onDeleteFormula(this);
 _cell.unsetF();
 }
 return;
@@ -963,6 +964,9 @@ public final class XSSFCell implements C
 notifyArrayFormulaChanging();
 }
 if(prevType == CellType.FORMULA && cellType != CellType.FORMULA) {
+if (_cell.isSetF()) {
+_row.getSheet().onDeleteFormula(this);
+}
 getSheet().getWorkbook().onDeleteFormula(this);
 }
 

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java?rev=1819623&r1=1819622&r2=1819623&view=diff
==
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java Sat 
Dec 30 16:34:57 2017
@@ -4455,7 +4455,40 @@ public class XSSFSheet extends POIXMLDoc
 removeRelation(part.getDocumentPart(), true);
 }
 }
-
+
+/**
+ *  when a cell with a 'master' shared formula is removed,  the next cell 
in the range becomes the master
+ */
+protected void onDeleteFormula(XSSFCell cell){
+
+CTCellFormula f = cell.getCTCell().getF();
+if (f != null && f.getT() == STCellFormulaType.SHARED && f.isSetRef() 
&& f.getStringValue() != null) {
+
+CellRangeAddress ref = CellRangeAddress.valueOf(f.getRef());
+if(ref.getNumberOfCells() > 1){
+DONE:
+for(int i = cell.getRowIndex(); i <= ref.getLastRow(); i++){
+XSSFRow row = getRow(i);
+if(row != null) for(int j = cell.getColumnIndex(); j <= 
ref.getLastColumn(); j++){
+XSSFCell nextCell = row.getCell(j);
+if(nextCell != null && nextCell != cell){
+CTCellFormula nextF = nextCell.getCTCell().getF();
+nextF.setStringValue(nextCell.getCellFormula());
+CellRangeAddress nextRef = new CellRangeAddress(
+nextCell.getRowIndex(), ref.getLastRow(),
+nextCell.getColumnIndex(), 
ref.getLastColumn());
+nextF.setRef(nextRef.formatAsString());
+
+sharedFormulas.put((int)nextF.getSi(), nextF);
+break DONE;
+}
+}
+}
+}
+
+}
+}
+
 /**
  * Determine the OleObject which links shapes with embedded resources
  *

Modified: 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java?rev=1819623&r1=1819622&r2=1819623&view=diff
==
--- 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java 
(original)
+++ 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java 
Sat Dec 30 16:34:57 2017
@@ -48,6 +48,7 @@ import org.apache.poi.xssf.XSSFTestDataS
 import org.apache.poi.xssf.model.SharedStringsTable;
 import org.junit.Test;
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCell;
+import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCellFormula;
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.STCellFormulaType;
 imp

svn commit: r1819596 - in /poi/trunk: src/java/org/apache/poi/ss/formula/ src/java/org/apache/poi/ss/formula/functions/ src/testcases/org/apache/poi/ss/format/ src/testcases/org/apache/poi/ss/formula/

2017-12-30 Thread yegor
Author: yegor
Date: Sat Dec 30 13:11:56 2017
New Revision: 1819596

URL: http://svn.apache.org/viewvc?rev=1819596&view=rev
Log:
Bugzilla 61116: Formula evaluation fails when using matrix addition within 
index function call

Added:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/ArrayMode.java   
(with props)
poi/trunk/test-data/spreadsheet/61116.xls   (with props)
Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluationContext.java
poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java
poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Index.java
poi/trunk/src/testcases/org/apache/poi/ss/format/TestCellFormat.java
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestIndex.java

Modified: 
poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluationContext.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluationContext.java?rev=1819596&r1=1819595&r2=1819596&view=diff
==
--- 
poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluationContext.java 
(original)
+++ 
poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluationContext.java 
Sat Dec 30 13:11:56 2017
@@ -33,7 +33,6 @@ import org.apache.poi.ss.formula.eval.Re
 import org.apache.poi.ss.formula.eval.StringEval;
 import org.apache.poi.ss.formula.eval.ValueEval;
 import org.apache.poi.ss.formula.functions.FreeRefFunction;
-import org.apache.poi.ss.formula.functions.Function;
 import org.apache.poi.ss.formula.ptg.*;
 import org.apache.poi.ss.util.CellReference;
 import org.apache.poi.ss.util.CellReference.NameType;
@@ -53,7 +52,7 @@ public final class OperationEvaluationCo
 private final EvaluationTracker _tracker;
 private final WorkbookEvaluator _bookEvaluator;
 private final boolean _isSingleValue;
-private final boolean _isInArrayContext;
+private boolean _isInArrayContext;
 
 public OperationEvaluationContext(WorkbookEvaluator bookEvaluator, 
EvaluationWorkbook workbook, int sheetIndex, int srcRowNum,
 int srcColNum, EvaluationTracker tracker) {
@@ -62,11 +61,6 @@ public final class OperationEvaluationCo
 
 public OperationEvaluationContext(WorkbookEvaluator bookEvaluator, 
EvaluationWorkbook workbook, int sheetIndex, int srcRowNum,
 int srcColNum, EvaluationTracker tracker, boolean isSingleValue) {
-this(bookEvaluator, workbook, sheetIndex, srcRowNum, srcColNum, 
tracker, isSingleValue, null);
-}
-
-public OperationEvaluationContext(WorkbookEvaluator bookEvaluator, 
EvaluationWorkbook workbook, int sheetIndex, int srcRowNum,
-  int srcColNum, EvaluationTracker 
tracker, boolean isSingleValue, Ptg[] ptgs) {
 _bookEvaluator = bookEvaluator;
 _workbook = workbook;
 _sheetIndex = sheetIndex;
@@ -74,49 +68,14 @@ public final class OperationEvaluationCo
 _columnIndex = srcColNum;
 _tracker = tracker;
 _isSingleValue = isSingleValue;
-
-_isInArrayContext = isInArrayContext(ptgs);
 }
 
-/**
- * Check if the given formula should be evaluated in array mode.
- *
- * 
- * Normally, array formulas are recognized from their definition:
- * pressing Ctrl+Shift+Enter in Excel marks the input as an array 
entered formula.
- *
- * 
- * However, in some cases Excel evaluates  tokens in array mode 
depending on the context.
- * The INDEX( area, row_num, [column_num]) function is an 
example:
- *
- * If the array argument includes more than one row and row_num is 
omitted or set to 0,
- * the Excel INDEX function returns an array of the entire column. 
Similarly, if array
- * includes more than one column and the column_num argument is 
omitted or set to 0,
- * the INDEX formula returns the entire row
- * 
- *
- * @param ptgs  parsed formula to analyze
- * @return whether the formula should be evaluated in array mode
- */
-private boolean isInArrayContext(Ptg[] ptgs){
-boolean arrayMode = false;
-if(ptgs != null) for(int j = ptgs.length - 1; j >= 0; j--){
-if(ptgs[j] instanceof FuncVarPtg){
-FuncVarPtg f = (FuncVarPtg)ptgs[j];
-if(f.getName().equals("INDEX") && f.getNumberOfOperands() <= 
3){
-// check 2nd and 3rd arguments.
-arrayMode = (ptgs[j - 1] instanceof IntPtg && 
((IntPtg)ptgs[j - 1]).getValue() == 0)
-|| (ptgs[j - 2] instanceof IntPtg && 
((IntPtg)ptgs[j - 2]).getValue() == 0);
-if(arrayMode) break;
-}
-}
-}
-return arrayMode;
-}
-
-  

svn commit: r1818818 - in /poi/trunk: src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java test-data/spreadsheet/61869.xlsx

2017-12-20 Thread yegor
Author: yegor
Date: Wed Dec 20 16:30:13 2017
New Revision: 1818818

URL: http://svn.apache.org/viewvc?rev=1818818&view=rev
Log:
Bug 61869: updating a cell with shared formula produces an unreadable file

Added:
poi/trunk/test-data/spreadsheet/61869.xlsx   (with props)
Modified:
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java

poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java?rev=1818818&r1=1818817&r2=1818818&view=diff
==
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java Wed 
Dec 20 16:30:13 2017
@@ -558,21 +558,30 @@ public final class XSSFCell implements C
 XSSFWorkbook wb = _row.getSheet().getWorkbook();
 if (formula == null) {
 wb.onDeleteFormula(this);
-if(_cell.isSetF()) {
+if (_cell.isSetF()) {
 _cell.unsetF();
 }
 return;
 }
 
-if(wb.getCellFormulaValidation()) {
+if (wb.getCellFormulaValidation()) {
 XSSFEvaluationWorkbook fpb = XSSFEvaluationWorkbook.create(wb);
 //validate through the FormulaParser
 FormulaParser.parse(formula, fpb, formulaType, 
wb.getSheetIndex(getSheet()), getRowIndex());
 }
 
-CTCellFormula f = CTCellFormula.Factory.newInstance();
-f.setStringValue(formula);
-_cell.setF(f);
+CTCellFormula f;
+if (_cell.isSetF()) {
+f = _cell.getF();
+f.setStringValue(formula);
+if(f.getT() == STCellFormulaType.SHARED){
+getRow().getSheet().onReadCell(this);
+}
+} else {
+f = CTCellFormula.Factory.newInstance();
+f.setStringValue(formula);
+_cell.setF(f);
+}
 if(_cell.isSetV()) {
 _cell.unsetV();
 }

Modified: 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java?rev=1818818&r1=1818817&r2=1818818&view=diff
==
--- 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java 
(original)
+++ 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java 
Wed Dec 20 16:30:13 2017
@@ -48,6 +48,7 @@ import org.apache.poi.xssf.XSSFTestDataS
 import org.apache.poi.xssf.model.SharedStringsTable;
 import org.junit.Test;
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCell;
+import org.openxmlformats.schemas.spreadsheetml.x2006.main.STCellFormulaType;
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.STCellType;
 
 import static org.junit.Assert.*;
@@ -670,4 +671,34 @@ public final class TestXSSFCell extends
 
 destCell.setCellValue(true);
 }
-}
+
+/**
+ * Bug 61869: updating a shared formula produces an unreadable file
+ */
+@Test
+public void test61869() throws Exception {
+try (XSSFWorkbook wb = 
XSSFTestDataSamples.openSampleWorkbook("61869.xlsx")) {
+XSSFSheet sheet = wb.getSheetAt(0);
+XSSFCell c2 = sheet.getRow(1).getCell(2);
+assertEquals("SUM(A2,B2)", c2.getCellFormula());
+assertEquals(STCellFormulaType.SHARED, 
c2.getCTCell().getF().getT());
+assertEquals(0, c2.getCTCell().getF().getSi());
+XSSFCell c3 = sheet.getRow(2).getCell(2);
+assertEquals(STCellFormulaType.SHARED, 
c3.getCTCell().getF().getT());
+assertEquals(0, c3.getCTCell().getF().getSi());
+assertEquals("SUM(A3,B3)", c3.getCellFormula());
+
+assertEquals("SUM(A2,B2)", 
sheet.getSharedFormula(0).getStringValue());
+
+c2.setCellFormula("SUM(A2:B2)");
+assertEquals(STCellFormulaType.SHARED, 
c2.getCTCell().getF().getT()); // c2 remains the master formula
+
+assertEquals("SUM(A2:B2)", 
sheet.getSharedFormula(0).getStringValue());
+assertEquals(STCellFormulaType.SHARED, 
c3.getCTCell().getF().getT());
+assertEquals(0, c3.getCTCell().getF().getSi());
+assertEquals("SUM(A3:B3)", c3.getCellFormula());  // formula in 
the follower cell is rebuilt
+
+}
+
+}
+}
\ No newline at end of file

Added: poi/trunk/test-data/spreadsheet/61869.xlsx
URL: 
http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/61869.xlsx?rev=1818818&view=auto

svn commit: r1818587 - in /poi/trunk: src/java/org/apache/poi/ss/formula/ src/java/org/apache/poi/ss/formula/eval/ src/testcases/org/apache/poi/ss/formula/functions/ test-data/spreadsheet/

2017-12-18 Thread yegor
Author: yegor
Date: Mon Dec 18 15:54:50 2017
New Revision: 1818587

URL: http://svn.apache.org/viewvc?rev=1818587&view=rev
Log:
Bug 61859: support for evaluating comparison operators in array mode, detect 
array mode from formula ptgs

Added:

poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestRelationalOperations.java
   (with props)
poi/trunk/test-data/spreadsheet/maxindextest.xls   (with props)
Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluationContext.java
poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java
poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
poi/trunk/src/java/org/apache/poi/ss/formula/eval/OperandResolver.java

poi/trunk/src/java/org/apache/poi/ss/formula/eval/RelationalOperationEval.java

poi/trunk/src/java/org/apache/poi/ss/formula/eval/TwoOperandNumericOperation.java
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestIndex.java

Modified: 
poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluationContext.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluationContext.java?rev=1818587&r1=1818586&r2=1818587&view=diff
==
--- 
poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluationContext.java 
(original)
+++ 
poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluationContext.java 
Mon Dec 18 15:54:50 2017
@@ -33,13 +33,8 @@ import org.apache.poi.ss.formula.eval.Re
 import org.apache.poi.ss.formula.eval.StringEval;
 import org.apache.poi.ss.formula.eval.ValueEval;
 import org.apache.poi.ss.formula.functions.FreeRefFunction;
-import org.apache.poi.ss.formula.ptg.Area3DPtg;
-import org.apache.poi.ss.formula.ptg.Area3DPxg;
-import org.apache.poi.ss.formula.ptg.NameXPtg;
-import org.apache.poi.ss.formula.ptg.NameXPxg;
-import org.apache.poi.ss.formula.ptg.Ptg;
-import org.apache.poi.ss.formula.ptg.Ref3DPtg;
-import org.apache.poi.ss.formula.ptg.Ref3DPxg;
+import org.apache.poi.ss.formula.functions.Function;
+import org.apache.poi.ss.formula.ptg.*;
 import org.apache.poi.ss.util.CellReference;
 import org.apache.poi.ss.util.CellReference.NameType;
 
@@ -58,7 +53,8 @@ public final class OperationEvaluationCo
 private final EvaluationTracker _tracker;
 private final WorkbookEvaluator _bookEvaluator;
 private final boolean _isSingleValue;
-
+private final boolean _isInArrayContext;
+
 public OperationEvaluationContext(WorkbookEvaluator bookEvaluator, 
EvaluationWorkbook workbook, int sheetIndex, int srcRowNum,
 int srcColNum, EvaluationTracker tracker) {
 this(bookEvaluator, workbook, sheetIndex, srcRowNum, srcColNum, 
tracker, true);
@@ -66,6 +62,11 @@ public final class OperationEvaluationCo
 
 public OperationEvaluationContext(WorkbookEvaluator bookEvaluator, 
EvaluationWorkbook workbook, int sheetIndex, int srcRowNum,
 int srcColNum, EvaluationTracker tracker, boolean isSingleValue) {
+this(bookEvaluator, workbook, sheetIndex, srcRowNum, srcColNum, 
tracker, isSingleValue, null);
+}
+
+public OperationEvaluationContext(WorkbookEvaluator bookEvaluator, 
EvaluationWorkbook workbook, int sheetIndex, int srcRowNum,
+  int srcColNum, EvaluationTracker 
tracker, boolean isSingleValue, Ptg[] ptgs) {
 _bookEvaluator = bookEvaluator;
 _workbook = workbook;
 _sheetIndex = sheetIndex;
@@ -73,6 +74,48 @@ public final class OperationEvaluationCo
 _columnIndex = srcColNum;
 _tracker = tracker;
 _isSingleValue = isSingleValue;
+
+_isInArrayContext = isInArrayContext(ptgs);
+}
+
+/**
+ * Check if the given formula should be evaluated in array mode.
+ *
+ * 
+ * Normally, array formulas are recognized from their definition:
+ * pressing Ctrl+Shift+Enter in Excel marks the input as an array 
entered formula.
+ *
+ * 
+ * However, in some cases Excel evaluates  tokens in array mode 
depending on the context.
+ * The INDEX( area, row_num, [column_num]) function is an 
example:
+ *
+ * If the array argument includes more than one row and row_num is 
omitted or set to 0,
+ * the Excel INDEX function returns an array of the entire column. 
Similarly, if array
+ * includes more than one column and the column_num argument is 
omitted or set to 0,
+ * the INDEX formula returns the entire row
+ * 
+ *
+ * @param ptgs  parsed formula to analyze
+ * @return whether the formula should be evaluated in array mode
+ */
+private boolean isInArrayContext(Ptg[] ptgs){
+boolean arrayMode = false;
+if(ptgs != null) for(int j = ptgs.length - 1; j >= 0; j--){
+if(ptgs[j] instanceof FuncVarPtg){
+FuncVarPtg f =

svn commit: r1566985 - in /poi/site: publish/index.html src/documentation/content/xdocs/index.xml

2014-02-10 Thread yegor
Author: yegor
Date: Tue Feb 11 05:00:14 2014
New Revision: 1566985

URL: http://svn.apache.org/r1566985
Log:
updated release date of POI-3.10 on index.html

Modified:
poi/site/publish/index.html
poi/site/src/documentation/content/xdocs/index.xml

Modified: poi/site/publish/index.html
URL: 
http://svn.apache.org/viewvc/poi/site/publish/index.html?rev=1566985&r1=1566984&r2=1566985&view=diff
==
--- poi/site/publish/index.html (original)
+++ poi/site/publish/index.html Tue Feb 11 05:00:14 2014
@@ -217,29 +217,13 @@ if (VERSION > 3) {
 Project News
 
   
-
+
 
-19 September 2013 - POI 3.10 Beta 2 available
+8 February 2014 - POI 3.10-FINAL available
 

-The Apache POI team is pleased to announce the release of 3.10 Beta 2. This 
primarily
-includes a large number of bug fixes, and some enhancements 
(especially in the number of
-Formula Functions supported).
-   
-   
-A full list of changes is available in the change 
log. 
-People interested should also follow the dev mailing list to track further progress.
-   
-See the downloads page for more details.
-  
-  
-
-
-3 December 2012 - POI 3.9 available
-
-   
-The Apache POI team is pleased to announce the release of 3.9. This 
includes a large number of bug fixes, and some
-enhancements (especially text extraction). See the
+The Apache POI team is pleased to announce the release of 3.10-FINAL. 
+Featured are significant performance improvements and numerous bug 
fixes. See the
 http://www.apache.org/dist/poi/release/RELEASE-NOTES.txt";>release 
notes for more details.



Modified: poi/site/src/documentation/content/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/index.xml?rev=1566985&r1=1566984&r2=1566985&view=diff
==
--- poi/site/src/documentation/content/xdocs/index.xml (original)
+++ poi/site/src/documentation/content/xdocs/index.xml Tue Feb 11 05:00:14 2014
@@ -33,18 +33,9 @@
 
   
 Project News
-  19 September 2013 - POI 3.10 Beta 2 available
-   The Apache POI team is pleased to announce the release of 3.10 Beta 
2. This primarily
-includes a large number of bug fixes, and some enhancements 
(especially in the number of
-Formula Functions supported).
-   
-   A full list of changes is available in the change log. 
-People interested should also follow the dev mailing list to track further progress.
-   See the downloads page for more 
details.
-  
-  3 December 2012 - POI 3.9 available
-   The Apache POI team is pleased to announce the release of 3.9. This 
includes a large number of bug fixes, and some
-enhancements (especially text extraction). See the
+  8 February 2014 - POI 3.10-FINAL available
+   The Apache POI team is pleased to announce the release of 
3.10-FINAL. 
+Featured are significant performance improvements and numerous bug 
fixes. See the
 http://www.apache.org/dist/poi/release/RELEASE-NOTES.txt";>release 
notes for more details.

A full list of changes is available in the change log. 



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1566984 - in /poi/site: publish/download.html src/documentation/content/xdocs/download.xml

2014-02-10 Thread yegor
Author: yegor
Date: Tue Feb 11 04:54:54 2014
New Revision: 1566984

URL: http://svn.apache.org/r1566984
Log:
updated release date of POI-3.10 on download.html

Modified:
poi/site/publish/download.html
poi/site/src/documentation/content/xdocs/download.xml

Modified: poi/site/publish/download.html
URL: 
http://svn.apache.org/viewvc/poi/site/publish/download.html?rev=1566984&r1=1566983&r2=1566984&view=diff
==
--- poi/site/publish/download.html (original)
+++ poi/site/publish/download.html Tue Feb 11 04:54:54 2014
@@ -263,11 +263,7 @@ if (VERSION > 3) {
 
   
 
-The latest development release is 
Apache POI 3.10 Beta 2
-
-  
-
-The latest stable release is Apache POI 3.9
+The latest stable release is Apache POI 
3.10-FINAL
 
   
 
@@ -288,12 +284,12 @@ if (VERSION > 3) {
 
 
 
-
+
 
-3 December 2012 - POI 3.9 available
+8 February 2014 - POI 3.10-FINAL available
 
   
-The Apache POI team is pleased to announce the release of 3.9. 
+The Apache POI team is pleased to announce the release of 3.10-FINAL. 
  This includes a large number of bug fixes and enhancements. 
   
   
@@ -303,7 +299,7 @@ if (VERSION > 3) {
 
 The POI source release as well as the pre-built binary deployment 
packages are listed below. 
 Pre-built versions of all POI 
components are available in the central Maven repository
-under Group ID "org.apache.poi" and Version "3.9".
+under Group ID "org.apache.poi" and Version "3.10-FINAL".
   
   
 
@@ -314,28 +310,28 @@ if (VERSION > 3) {
 
 
 
-http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.9-20121203.tar.gz";>poi-bin-3.9-20121203.tar.gz
 (
-  16MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.tar.gz.asc";>signed)
+http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.10-FINAL-20140208.tar.gz";>poi-bin-3.10-FINAL-20140208.tar.gz
 (
+  16MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140208.tar.gz.asc";>signed)
   
-  MD5 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.tar.gz.md5";>
-  09c4dfd63317bb9eb37fe12d6febea74 
+  MD5 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140208.tar.gz.md5";>
+  818d1e99a2efe539ba49f622b554950c 
   
 
-  SHA1 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.tar.gz.sha1";>
-  5e5747efebd65623bed5b8562b30fae24f75b198 
+  SHA1 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140208.tar.gz.sha1";>
+  38b61905d780e09604fb8053fd46ab1b8b18392f 
 
 
 
 
-http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.9-20121203.zip";>poi-bin-3.9-20121203.zip
 (
-  23MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.zip.asc";>signed)
+http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.10-FINAL-20140208.zip";>poi-bin-3.10-FINAL-20140208.zip
 (
+  23MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140208.zip.asc";>signed)
   
-  MD5 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.zip.md5";>
-  24aea12578d5745dfb8eba9d185b9136 
+  MD5 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140208.zip.md5";>
+  e304be0a3169697d31e029f63458a963 
   
 
-  SHA1 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.zip.sha1";>
-  231e738b40175a40c51af5549c82d554bf13f97e 
+  SHA1 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140208.zip.sha1";>
+  704f103bca893e3d4df5c2cc95d275b0cd5d0b33 
 
 
   
@@ -350,120 +346,28 @@ if (VERSION > 3) {
 
 
 
-http://www.apache.org/dyn/closer.cgi/poi/release/src/poi-src-3.9-20121203.tar.gz";>poi-src-3.9-20121203.tar.gz
 (
-  48MB, http://www.apache.org/dist/poi/release/src/poi-src-3.9-20121203.tar.gz.asc";>signed)
-  
-  MD5 checksum: http://www.apache.org/dist/poi/release/src/poi-src-3.9-20121203.tar.gz.md5";>
-  fe12cf4620340f61dd42e43f6087a336 
-  
-
-  SHA1 checksum: http://www.apache.org/dist/poi/release/src/poi-src-3.9-20121203.tar.gz.sha1";>
-  3a8660b9c99111b72365269e23fefae5e6bdcf4b 
-
-
-
-
-http://www.apache.org/dyn/closer.cgi/poi/release/src/poi-src-3.9-20121203.zip";>poi-src-3.9-20121203.zip
 (
-  58MB, http://www.apache.org/dist/poi/release/src/poi-src-3.9-20121203.zip.asc";>signed)
-  
-  MD5

svn commit: r4342 - /dev/poi/3_10_FINAL/RELEASE-NOTES.txt /release/poi/release/RELEASE-NOTES.txt

2014-02-09 Thread yegor
Author: yegor
Date: Sun Feb  9 11:38:08 2014
New Revision: 4342

Log:
move staging files of POI-3.10-FINAL to the release area

Added:
release/poi/release/RELEASE-NOTES.txt
  - copied unchanged from r4341, dev/poi/3_10_FINAL/RELEASE-NOTES.txt
Removed:
dev/poi/3_10_FINAL/RELEASE-NOTES.txt


-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r4341 - /dev/poi/3_10_FINAL/bin/ /dev/poi/3_10_FINAL/src/ /release/poi/release/bin/ /release/poi/release/src/

2014-02-09 Thread yegor
Author: yegor
Date: Sun Feb  9 11:35:44 2014
New Revision: 4341

Log:
move staging files of POI-3.10-FINAL to the release area

Added:
release/poi/release/bin/
  - copied from r4340, dev/poi/3_10_FINAL/bin/
release/poi/release/src/
  - copied from r4340, dev/poi/3_10_FINAL/src/
Removed:
dev/poi/3_10_FINAL/bin/
dev/poi/3_10_FINAL/src/


-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r4340 - in /release/poi/release: bin/ src/

2014-02-09 Thread yegor
Author: yegor
Date: Sun Feb  9 11:33:45 2014
New Revision: 4340

Log:
remove the previous release of POI-3.9

Removed:
release/poi/release/bin/
release/poi/release/src/


-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r4339 - in /release/poi/dev: bin/ src/

2014-02-09 Thread yegor
Author: yegor
Date: Sun Feb  9 11:31:06 2014
New Revision: 4339

Log:
remove the previous release of POI-3.10-beta2

Removed:
release/poi/dev/bin/
release/poi/dev/src/


-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1563422 - in /poi/site/src/documentation/content/xdocs: download.xml status.xml

2014-02-01 Thread yegor
Author: yegor
Date: Sat Feb  1 14:29:52 2014
New Revision: 1563422

URL: http://svn.apache.org/r1563422
Log:
update download and status pages to reflect 3.10 release

Modified:
poi/site/src/documentation/content/xdocs/download.xml
poi/site/src/documentation/content/xdocs/status.xml

Modified: poi/site/src/documentation/content/xdocs/download.xml
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/download.xml?rev=1563422&r1=1563421&r2=1563422&view=diff
==
--- poi/site/src/documentation/content/xdocs/download.xml (original)
+++ poi/site/src/documentation/content/xdocs/download.xml Sat Feb  1 14:29:52 
2014
@@ -59,45 +59,45 @@
   
   Binary Distribution
   
-http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.10-FINAL-20140123.tar.gz";>poi-bin-3.10-FINAL-20140123.tar.gz
 (
-  16MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140123.tar.gz.asc";>signed)
+http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.10-FINAL-20140208.tar.gz";>poi-bin-3.10-FINAL-20140208.tar.gz
 (
+  16MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140208.tar.gz.asc";>signed)
   
-  MD5 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140123.tar.gz.md5";>
-  2a542ff3321a6c26e06a81813a5ca167 
+  MD5 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140208.tar.gz.md5";>
+  818d1e99a2efe539ba49f622b554950c 
   
-  SHA1 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140123.tar.gz.sha1";>
-  a5b3838a04328dc00d3a6768d84ac2722ecf550a 
+  SHA1 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140208.tar.gz.sha1";>
+  38b61905d780e09604fb8053fd46ab1b8b18392f 
 
-http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.10-FINAL-20140123.zip";>poi-bin-3.10-FINAL-20140123.zip
 (
-  23MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140123.zip.asc";>signed)
+http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.10-FINAL-20140208.zip";>poi-bin-3.10-FINAL-20140208.zip
 (
+  23MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140208.zip.asc";>signed)
   
-  MD5 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140123.zip.md5";>
-  7864fa2773f4c7afe8b247f0ceef0a19 
+  MD5 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140208.zip.md5";>
+  e304be0a3169697d31e029f63458a963 
   
-  SHA1 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140123.zip.sha1";>
-  e841c49006f8f9d8f345a82c5db488e19196abd1.10-FINAL7e 
+  SHA1 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140208.zip.sha1";>
+  704f103bca893e3d4df5c2cc95d275b0cd5d0b33 
 
   
   
   Source Distribution
   
-http://www.apache.org/dyn/closer.cgi/poi/release/src/poi-bin-3.10-FINAL-20140123.tar.gz";>poi-src-3.10-FINAL-20140123.tar.gz
 (
-  48MB, http://www.apache.org/dist/poi/release/src/poi-src-3.10-FINAL-20140123.tar.gz.asc";>signed)
+http://www.apache.org/dyn/closer.cgi/poi/release/src/poi-bin-3.10-FINAL-20140208.tar.gz";>poi-src-3.10-FINAL-20140208.tar.gz
 (
+  48MB, http://www.apache.org/dist/poi/release/src/poi-src-3.10-FINAL-20140208.tar.gz.asc";>signed)
   
-  MD5 checksum: http://www.apache.org/dist/poi/release/src/poi-src-3.10-FINAL-20140123.tar.gz.md5";>
-  e5db34ccdbbd4a7e057040f7bcb3d148 
+  MD5 checksum: http://www.apache.org/dist/poi/release/src/poi-src-3.10-FINAL-20140208.tar.gz.md5";>
+  438157bfee9fe74869abd898820c7dae 
   
-  SHA1 checksum: http://www.apache.org/dist/poi/release/src/poi-src-3.10-FINAL-20140123.tar.gz.sha1";>
-  2ceb567625e52e28014169a32eaa5babc2695f07 
+  SHA1 checksum: http://www.apache.org/dist/poi/release/src/poi-src-3.10-FINAL-20140208.tar.gz.sha1";>
+  d0d5f596a649d1a852916fbadec4bdd9bdf70b9e 
 
-http://www.apache.org/dyn/closer.cgi/poi/release/src/poi-src-3.10-FINAL-20140123.zip";>poi-src-3.10-FINAL-20140123.zip
 (
-  58MB, http://www.apache.org/dist/poi/release/src/poi-src-3.10-FINAL-20140123.zip.asc";>signed)
+http://www.apache.org/dyn/closer.cgi/poi/release/src/poi-src-3.10-FINAL-20140208.zip";>poi-src-3.10-FINAL-20140208.zip
 (
+  58MB, http://www.apache.org/dist/poi/release/src/poi-src-3.10-FINAL-20140208.

svn commit: r1563415 [2/2] - in /poi/tags/REL_3_10_FINAL: ./ src/java/org/apache/poi/ss/formula/atp/ src/java/org/apache/poi/ss/formula/functions/ src/ooxml/java/org/apache/poi/xssf/usermodel/ src/oox

2014-02-01 Thread yegor
Modified: 
poi/tags/REL_3_10_FINAL/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
URL: 
http://svn.apache.org/viewvc/poi/tags/REL_3_10_FINAL/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java?rev=1563415&r1=1563414&r2=1563415&view=diff
==
--- 
poi/tags/REL_3_10_FINAL/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
 (original)
+++ 
poi/tags/REL_3_10_FINAL/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
 Sat Feb  1 13:20:42 2014
@@ -17,20 +17,44 @@
 
 package org.apache.poi.hssf.usermodel;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.util.List;
 
-import junit.framework.AssertionFailedError;
-
 import org.apache.poi.ddf.EscherDgRecord;
 import org.apache.poi.hssf.HSSFITestDataProvider;
 import org.apache.poi.hssf.HSSFTestDataSamples;
 import org.apache.poi.hssf.model.DrawingManager2;
 import org.apache.poi.hssf.model.InternalSheet;
 import org.apache.poi.hssf.model.InternalWorkbook;
-import org.apache.poi.hssf.record.*;
+import org.apache.poi.hssf.record.AutoFilterInfoRecord;
+import org.apache.poi.hssf.record.CommonObjectDataSubRecord;
+import org.apache.poi.hssf.record.DimensionsRecord;
+import org.apache.poi.hssf.record.FtCblsSubRecord;
+import org.apache.poi.hssf.record.GridsetRecord;
+import org.apache.poi.hssf.record.HCenterRecord;
+import org.apache.poi.hssf.record.LbsDataSubRecord;
+import org.apache.poi.hssf.record.NameRecord;
+import org.apache.poi.hssf.record.ObjRecord;
+import org.apache.poi.hssf.record.ObjectProtectRecord;
+import org.apache.poi.hssf.record.PasswordRecord;
+import org.apache.poi.hssf.record.ProtectRecord;
+import org.apache.poi.hssf.record.Record;
+import org.apache.poi.hssf.record.SCLRecord;
+import org.apache.poi.hssf.record.ScenarioProtectRecord;
+import org.apache.poi.hssf.record.SubRecord;
+import org.apache.poi.hssf.record.VCenterRecord;
+import org.apache.poi.hssf.record.WSBoolRecord;
+import org.apache.poi.hssf.record.WindowTwoRecord;
 import org.apache.poi.hssf.record.aggregates.WorksheetProtectionBlock;
 import org.apache.poi.hssf.usermodel.RecordInspector.RecordCollector;
 import org.apache.poi.ss.formula.ptg.Area3DPtg;
@@ -46,6 +70,7 @@ import org.apache.poi.ss.usermodel.Workb
 import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.ss.util.CellRangeAddressList;
 import org.apache.poi.util.TempFile;
+import org.junit.Test;
 
 /**
  * Tests HSSFSheet.  This test case is very incomplete at the moment.
@@ -65,7 +90,8 @@ public final class TestHSSFSheet extends
  * Test for Bugzilla #29747.
  * Moved from TestHSSFWorkbook#testSetRepeatingRowsAndColumns().
  */
-public void testSetRepeatingRowsAndColumnsBug29747() {
+@Test
+public void setRepeatingRowsAndColumnsBug29747() {
 HSSFWorkbook wb = new HSSFWorkbook();
 wb.createSheet();
 wb.createSheet();
@@ -76,14 +102,16 @@ public final class TestHSSFSheet extends
 }
 
 
-public void testTestGetSetMargin() {
+@Test
+public void getSetMargin() {
 baseTestGetSetMargin(new double[]{0.75, 0.75, 1.0, 1.0, 0.3, 0.3});
 }
 
 /**
  * Test the gridset field gets set as expected.
  */
-public void testBackupRecord() {
+@Test
+public void backupRecord() {
 HSSFWorkbook wb = new HSSFWorkbook();
 HSSFSheet s = wb.createSheet();
 GridsetRecord gridsetRec = s.getSheet().getGridsetRecord();
@@ -96,7 +124,8 @@ public final class TestHSSFSheet extends
  * Test vertically centered output.
  */
 @SuppressWarnings("deprecation")
-public void testVerticallyCenter() {
+@Test
+public void verticallyCenter() {
 HSSFWorkbook wb = new HSSFWorkbook();
 HSSFSheet s = wb.createSheet();
 VCenterRecord record = s.getSheet().getPageSettings().getVCenter();
@@ -115,7 +144,8 @@ public final class TestHSSFSheet extends
 /**
  * Test horizontally centered output.
  */
-public void testHorizontallyCenter() {
+@Test
+public void horizontallyCenter() {
 HSSFWorkbook wb = new HSSFWorkbook();
 HSSFSheet s = wb.createSheet();
 HCenterRecord record = s.getSheet().getPageSettings().getHCenter();
@@ -129,7 +159,8 @@ public final class TestHSSFSheet extends
 /**
  * Test WSBboolRecord fields get set in the user model.
  */
-public void testWSBool() {
+@Test
+public void wsBool() {
 HSSFWorkbook wb = new HSSFWorkbook();
 HSSFSheet s = wb.createSheet();
 WSBoolRecord record =
@@ -177,7 +208,8 @@ public 

svn commit: r4098 - /dev/poi/3_10_FINAL/RELEASE-NOTES.txt

2014-01-15 Thread yegor
Author: yegor
Date: Thu Jan 16 05:33:38 2014
New Revision: 4098

Log:
fixed typo in release notes

Modified:
dev/poi/3_10_FINAL/RELEASE-NOTES.txt

Modified: dev/poi/3_10_FINAL/RELEASE-NOTES.txt
==
--- dev/poi/3_10_FINAL/RELEASE-NOTES.txt (original)
+++ dev/poi/3_10_FINAL/RELEASE-NOTES.txt Thu Jan 16 05:33:38 2014
@@ -25,7 +25,7 @@
  - pre-built binaries containing compiled versions of all Apache POI 
components and documentation 
(poi-bin-3.10-FINAL-20140123.zip or poi-bin-3.10-FINAL-20140123.tar.gz)
  - source archive you can build POI from 
-   (poi-bin-3.10-FINAL-20140123.zip or poi-bin-3.10-FINAL-20140123.tar.gz)
+   (poi-src-3.10-FINAL-20140123.zip or poi-src-3.10-FINAL-20140123.tar.gz)
   Unpack the archive and use  the following command to build all POI 
components with Apache Ant 1.6+ and JDK 1.5 or higher:
 
   ant jar



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1558699 - in /poi/site/src/documentation/content/xdocs: download.xml status.xml

2014-01-15 Thread yegor
Author: yegor
Date: Thu Jan 16 05:32:06 2014
New Revision: 1558699

URL: http://svn.apache.org/r1558699
Log:
updated release info on 3.10-FINAL

Modified:
poi/site/src/documentation/content/xdocs/download.xml
poi/site/src/documentation/content/xdocs/status.xml

Modified: poi/site/src/documentation/content/xdocs/download.xml
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/download.xml?rev=1558699&r1=1558698&r2=1558699&view=diff
==
--- poi/site/src/documentation/content/xdocs/download.xml (original)
+++ poi/site/src/documentation/content/xdocs/download.xml Thu Jan 16 05:32:06 
2014
@@ -33,8 +33,7 @@
the project homepage.
   
   
-  The latest development 
release is Apache POI 3.10 Beta 2
-  The latest stable release is 
Apache POI 3.9
+  The latest stable 
release is Apache POI 3.10-FINAL
   Archives of all prior 
releases
   
   
@@ -47,8 +46,8 @@
   
 
 
-3 December 2012 - POI 3.9 available
-  The Apache POI team is pleased to announce the release of 3.9. 
+23 January 2013 - POI 3.10-FINAL 
available
+  The Apache POI team is pleased to announce the release of 3.10-FINAL. 
  This includes a large number of bug fixes and enhancements. 
   
   A full list of changes is available in the change log. 
@@ -56,106 +55,49 @@
   
 The POI source release as well as the pre-built binary deployment 
packages are listed below. 
 Pre-built versions of all POI 
components are available in the central Maven repository
-under Group ID "org.apache.poi" and Version "3.9".
+under Group ID "org.apache.poi" and Version "3.10-FINAL".
   
   Binary Distribution
   
-http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.9-20121203.tar.gz";>poi-bin-3.9-20121203.tar.gz
 (
-  16MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.tar.gz.asc";>signed)
+http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.10-FINAL-20140123.tar.gz";>poi-bin-3.10-FINAL-20140123.tar.gz
 (
+  16MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140123.tar.gz.asc";>signed)
   
-  MD5 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.tar.gz.md5";>
-  09c4dfd63317bb9eb37fe12d6febea74 
+  MD5 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140123.tar.gz.md5";>
+  2a542ff3321a6c26e06a81813a5ca167 
   
-  SHA1 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.tar.gz.sha1";>
-  5e5747efebd65623bed5b8562b30fae24f75b198 
+  SHA1 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140123.tar.gz.sha1";>
+  a5b3838a04328dc00d3a6768d84ac2722ecf550a 
 
-http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.9-20121203.zip";>poi-bin-3.9-20121203.zip
 (
-  23MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.zip.asc";>signed)
+http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.10-FINAL-20140123.zip";>poi-bin-3.10-FINAL-20140123.zip
 (
+  23MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140123.zip.asc";>signed)
   
-  MD5 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.zip.md5";>
-  24aea12578d5745dfb8eba9d185b9136 
+  MD5 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140123.zip.md5";>
+  7864fa2773f4c7afe8b247f0ceef0a19 
   
-  SHA1 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.zip.sha1";>
-  231e738b40175a40c51af5549c82d554bf13f97e 
+  SHA1 checksum: http://www.apache.org/dist/poi/release/bin/poi-bin-3.10-FINAL-20140123.zip.sha1";>
+  e841c49006f8f9d8f345a82c5db488e19196abd1.10-FINAL7e 
 
   
   
   Source Distribution
   
-http://www.apache.org/dyn/closer.cgi/poi/release/src/poi-src-3.9-20121203.tar.gz";>poi-src-3.9-20121203.tar.gz
 (
-  48MB, http://www.apache.org/dist/poi/release/src/poi-src-3.9-20121203.tar.gz.asc";>signed)
+http://www.apache.org/dyn/closer.cgi/poi/release/src/poi-bin-3.10-FINAL-20140123.tar.gz";>poi-src-3.10-FINAL-20140123.tar.gz
 (
+  48MB, http://www.apache.org/dist/poi/release/src/poi-src-3.10-FINAL-20140123.tar.gz.asc";>signed)
   
-  MD5 checksum: http://www.apache.org/dist/poi/release/src/poi-src-3.9-20121203.tar.gz.md5";>
-  fe12cf4620340f61dd42e43f6087a336 
+  MD5 checksum: ht

svn commit: r4097 - in /dev/poi: ./ 3_10_FINAL/ 3_10_FINAL/bin/ 3_10_FINAL/src/

2014-01-15 Thread yegor
Author: yegor
Date: Thu Jan 16 05:28:07 2014
New Revision: 4097

Log:
staging files for POI 3.10-FINAL

Added:
dev/poi/3_10_FINAL/
dev/poi/3_10_FINAL/RELEASE-NOTES.txt   (with props)
dev/poi/3_10_FINAL/bin/
dev/poi/3_10_FINAL/bin/poi-bin-3.10-FINAL-20140123.tar.gz   (with props)
dev/poi/3_10_FINAL/bin/poi-bin-3.10-FINAL-20140123.tar.gz.asc   (with props)
dev/poi/3_10_FINAL/bin/poi-bin-3.10-FINAL-20140123.tar.gz.md5
dev/poi/3_10_FINAL/bin/poi-bin-3.10-FINAL-20140123.tar.gz.sha1
dev/poi/3_10_FINAL/bin/poi-bin-3.10-FINAL-20140123.zip   (with props)
dev/poi/3_10_FINAL/bin/poi-bin-3.10-FINAL-20140123.zip.asc   (with props)
dev/poi/3_10_FINAL/bin/poi-bin-3.10-FINAL-20140123.zip.md5
dev/poi/3_10_FINAL/bin/poi-bin-3.10-FINAL-20140123.zip.sha1
dev/poi/3_10_FINAL/src/
dev/poi/3_10_FINAL/src/poi-src-3.10-FINAL-20140123.tar.gz   (with props)
dev/poi/3_10_FINAL/src/poi-src-3.10-FINAL-20140123.tar.gz.asc   (with props)
dev/poi/3_10_FINAL/src/poi-src-3.10-FINAL-20140123.tar.gz.md5
dev/poi/3_10_FINAL/src/poi-src-3.10-FINAL-20140123.tar.gz.sha1
dev/poi/3_10_FINAL/src/poi-src-3.10-FINAL-20140123.zip   (with props)
dev/poi/3_10_FINAL/src/poi-src-3.10-FINAL-20140123.zip.asc   (with props)
dev/poi/3_10_FINAL/src/poi-src-3.10-FINAL-20140123.zip.md5
dev/poi/3_10_FINAL/src/poi-src-3.10-FINAL-20140123.zip.sha1
Removed:
dev/poi/RELEASE-NOTES.txt
Modified:
dev/poi/KEYS

Added: dev/poi/3_10_FINAL/RELEASE-NOTES.txt
==
--- dev/poi/3_10_FINAL/RELEASE-NOTES.txt (added)
+++ dev/poi/3_10_FINAL/RELEASE-NOTES.txt Thu Jan 16 05:28:07 2014
@@ -0,0 +1,41 @@
+The Apache POI project is pleased to announce the release of POI 3.10 FINAL. 
The release is available for download at:
+
+http://poi.apache.org/download.html
+
+See the full release notes below for details about this release.
+
+Release Notes -- Apache POI -- Version 3.10 FINAL
+
+Introduction
+
+
+Apache POI is well-known in the Java field as a library for reading and
+writing Microsoft Office file formats, such as Excel, PowerPoint, Visio and
+Word. See http://poi.apache.org/ for more details
+
+Apache POI 3.10 is an incremental feature release, it is considered stable and 
recommended for production use.
+
+A full list of changes is available in the change log: 
http://poi.apache.org/changes.html. 
+People interested should also follow the dev mailing list to track further 
progress.
+
+Release Contents
+
+
+This release comes in two forms:
+ - pre-built binaries containing compiled versions of all Apache POI 
components and documentation 
+   (poi-bin-3.10-FINAL-20140123.zip or poi-bin-3.10-FINAL-20140123.tar.gz)
+ - source archive you can build POI from 
+   (poi-bin-3.10-FINAL-20140123.zip or poi-bin-3.10-FINAL-20140123.tar.gz)
+  Unpack the archive and use  the following command to build all POI 
components with Apache Ant 1.6+ and JDK 1.5 or higher:
+
+  ant jar
+
+ Pre-built versions of all POI components are also available in the central 
Maven repository 
+ under Group ID "org.apache.poi" and Version "3.10-FINAL"
+
+All release artifacts are accompanied by MD5 checksums and a PGP signatures 
+that you can use to verify the authenticity of your download.
+The public key used for the PGP signature can be found at 
+http://svn.apache.org/repos/asf/poi/tags/REL_3_10_FINAL/KEYS
+
+

Propchange: dev/poi/3_10_FINAL/RELEASE-NOTES.txt
--
svn:executable = *

Added: dev/poi/3_10_FINAL/bin/poi-bin-3.10-FINAL-20140123.tar.gz
==
Binary file - no diff available.

Propchange: dev/poi/3_10_FINAL/bin/poi-bin-3.10-FINAL-20140123.tar.gz
--
svn:executable = *

Propchange: dev/poi/3_10_FINAL/bin/poi-bin-3.10-FINAL-20140123.tar.gz
--
svn:mime-type = application/x-gzip

Added: dev/poi/3_10_FINAL/bin/poi-bin-3.10-FINAL-20140123.tar.gz.asc
==
Binary file - no diff available.

Propchange: dev/poi/3_10_FINAL/bin/poi-bin-3.10-FINAL-20140123.tar.gz.asc
--
svn:mime-type = application/pgp-signature

Added: dev/poi/3_10_FINAL/bin/poi-bin-3.10-FINAL-20140123.tar.gz.md5
==
--- dev/poi/3_10_FINAL/bin/poi-bin-3.10-FINAL-20140123.tar.gz.md5 (added)
+++ dev/poi/3_10_FINAL/bin/poi-bin-3.10-FINAL-20140123.tar.gz.md5 Thu Jan 16 
05:28:07 2014
@@ -0,0 +1 @@
+2a542ff3321a6c26e06a81813a5ca167 *poi-bin-3.10-FINAL-20140123.tar.gz

Added: dev/poi/3_10_FINAL/bin/poi-bin

svn commit: r4096 - /dev/poi/maven/

2014-01-15 Thread yegor
Author: yegor
Date: Thu Jan 16 05:00:27 2014
New Revision: 4096

Log:
zap old poi releases

Removed:
dev/poi/maven/


-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1558698 - /poi/trunk/build.xml

2014-01-15 Thread yegor
Author: yegor
Date: Thu Jan 16 04:56:26 2014
New Revision: 1558698

URL: http://svn.apache.org/r1558698
Log:
set version.id to 3.11-beta1

Modified:
poi/trunk/build.xml

Modified: poi/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/build.xml?rev=1558698&r1=1558697&r2=1558698&view=diff
==
--- poi/trunk/build.xml (original)
+++ poi/trunk/build.xml Thu Jan 16 04:56:26 2014
@@ -51,7 +51,7 @@ under the License.
 
 The Apache POI project Ant build.
 
-
+
 
 
 



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1558697 - /poi/tags/REL_3_10_FINAL/build.xml

2014-01-15 Thread yegor
Author: yegor
Date: Thu Jan 16 04:55:08 2014
New Revision: 1558697

URL: http://svn.apache.org/r1558697
Log:
set version.id to 3_10_FINAL

Modified:
poi/tags/REL_3_10_FINAL/build.xml

Modified: poi/tags/REL_3_10_FINAL/build.xml
URL: 
http://svn.apache.org/viewvc/poi/tags/REL_3_10_FINAL/build.xml?rev=1558697&r1=1558696&r2=1558697&view=diff
==
--- poi/tags/REL_3_10_FINAL/build.xml (original)
+++ poi/tags/REL_3_10_FINAL/build.xml Thu Jan 16 04:55:08 2014
@@ -51,7 +51,7 @@ under the License.
 
 The Apache POI project Ant build.
 
-
+
 
 
 



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1558694 - /poi/tags/REL_3_10_FINAL/

2014-01-15 Thread yegor
Author: yegor
Date: Thu Jan 16 04:25:53 2014
New Revision: 1558694

URL: http://svn.apache.org/r1558694
Log:
tag r1557290 as 3_10_FINAL

Added:
poi/tags/REL_3_10_FINAL/   (props changed)
  - copied from r1558693, poi/trunk/

Propchange: poi/tags/REL_3_10_FINAL/
--
--- svn:ignore (added)
+++ svn:ignore Thu Jan 16 04:25:53 2014
@@ -0,0 +1,16 @@
+classes
+workbook.xls
+bak
+*.iws
+build.number
+*.el
+TEST-org.apache.poi*.xml
+build
+.settings
+scripts
+*.ipr
+untitled1.jpx
+*.iml
+log*.*
+dist
+*.log

Propchange: poi/tags/REL_3_10_FINAL/
--
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Jan 16 04:25:53 2014
@@ -0,0 +1,3 @@
+/poi/branches/excelant:1069732-1073692
+/poi/branches/gsoc2012:1341450-1371650
+/poi/trunk:693591-694881,695264-695420,695621,695649-711764

Propchange: poi/tags/REL_3_10_FINAL/
--
--- svnmerge-blocked (added)
+++ svnmerge-blocked Thu Jan 16 04:25:53 2014
@@ -0,0 +1 @@
+/poi/trunk:638785,639487,639602,640057,642563,642567,642575,642737-642738,650915

Propchange: poi/tags/REL_3_10_FINAL/
--
--- svnmerge-integrated (added)
+++ svnmerge-integrated Thu Jan 16 04:25:53 2014
@@ -0,0 +1 @@
+/poi/trunk:1-638784,638786-639486,639488-639601,639603-640056,640058-642562,642564-642566,642568-642574,642576-642736,642739-650914,650916-711764



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1553248 - /poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java

2013-12-23 Thread yegor
Author: yegor
Date: Tue Dec 24 06:02:27 2013
New Revision: 1553248

URL: http://svn.apache.org/r1553248
Log:
patch 55731:  StringBuilder logic in DataFormatter.cleanFormatForNumber

Modified:
poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java?rev=1553248&r1=1553247&r2=1553248&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/DataFormatter.java Tue Dec 
24 06:02:27 2013
@@ -583,6 +583,7 @@ public class DataFormatter {
 }
 // Remove the character too
 sb.deleteCharAt(i);
+i--;
 }
 }
 }
@@ -606,6 +607,7 @@ public class DataFormatter {
 }
 // Remove the _ too
 sb.deleteCharAt(i);
+i--;
 }
 }
 }



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1553247 - in /poi/trunk/src: java/org/apache/poi/ss/usermodel/BuiltinFormats.java testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java

2013-12-23 Thread yegor
Author: yegor
Date: Tue Dec 24 05:58:23 2013
New Revision: 1553247

URL: http://svn.apache.org/r1553247
Log:
patch 55730:  Fix org.apache.poi.ss.usermodel.BuiltinFormats.java for 0x29-0x2c

Modified:
poi/trunk/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java

poi/trunk/src/testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java?rev=1553247&r1=1553246&r2=1553247&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java Tue Dec 
24 05:58:23 2013
@@ -54,10 +54,10 @@ import java.util.Map;
  *   0x26, "#,##0_);[Red](#,##0)"
  *   0x27, "#,##0.00_);(#,##0.00)"
  *   0x28, "#,##0.00_);[Red](#,##0.00)"
- *   0x29, "_(*#,##0_);_(*(#,##0);_(* \"-\"_);_(@_)"
- *   0x2a, "_($*#,##0_);_($*(#,##0);_($* \"-\"_);_(@_)"
- *   0x2b, "_(*#,##0.00_);_(*(#,##0.00);_(*\"-\"??_);_(@_)"
- *   0x2c, "_($*#,##0.00_);_($*(#,##0.00);_($*\"-\"??_);_(@_)"
+ *   0x29, "_(* #,##0_);_(* (#,##0);_(* \"-\"_);_(@_)"
+ *   0x2a, "_($* #,##0_);_($* (#,##0);_($* \"-\"_);_(@_)"
+ *   0x2b, "_(* #,##0.00_);_(* (#,##0.00);_(* \"-\"??_);_(@_)"
+ *   0x2c, "_($* #,##0.00_);_($* (#,##0.00);_($* \"-\"??_);_(@_)"
  *   0x2d, "mm:ss"
  *   0x2e, "[h]:mm:ss"
  *   0x2f, "mm:ss.0"
@@ -69,6 +69,7 @@ import java.util.Map;
  * @author Yegor Kozlov
  *
  * Modified 6/17/09 by Stanislav Shor - positive formats don't need starting 
'('
+ * Modified 10/31/13 by Eric Peters - * is a repeating/padding character 
directive, examples needed a space after the asterix (e.i. Accounting format)
  *
  */
 public final class BuiltinFormats {
@@ -137,8 +138,8 @@ public final class BuiltinFormats {
putFormat(m, 0x28, "#,##0.00_);[Red](#,##0.00)");
putFormat(m, 0x29, "_(\"$\"* #,##0_);_(\"$\"* (#,##0);_(\"$\"* 
\"-\"_);_(@_)");
putFormat(m, 0x2a, "_(* #,##0_);_(* (#,##0);_(* \"-\"_);_(@_)");
-   putFormat(m, 0x2b, "_(\"$\"* #,##0.00_);_(\"$\"* 
(#,##0.00);_(\"$\"* \"-\"??_);_(@_)");
-   putFormat(m, 0x2c, "_(* #,##0.00_);_(* (#,##0.00);_(* 
\"-\"??_);_(@_)");
+   putFormat(m, 0x2b, "_(* #,##0.00_);_(* (#,##0.00);_(* 
\"-\"??_);_(@_)");
+   putFormat(m, 0x2c, "_(\"$\"* #,##0.00_);_(\"$\"* 
(#,##0.00);_(\"$\"* \"-\"??_);_(@_)");
putFormat(m, 0x2d, "mm:ss");
putFormat(m, 0x2e, "[h]:mm:ss");
putFormat(m, 0x2f, "mm:ss.0");

Modified: 
poi/trunk/src/testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java?rev=1553247&r1=1553246&r2=1553247&view=diff
==
--- 
poi/trunk/src/testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java
 (original)
+++ 
poi/trunk/src/testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java
 Tue Dec 24 05:58:23 2013
@@ -57,7 +57,8 @@ public final class TestFormatTrackingHSS
 
assertEquals("_(\"$\"* #,##0_);_(\"$\"* (#,##0);_(\"$\"* 
\"-\"_);_(@_)", listener.getFormatString(41));
assertEquals("_(* #,##0_);_(* (#,##0);_(* \"-\"_);_(@_)", 
listener.getFormatString(42));
-   assertEquals("_(\"$\"* #,##0.00_);_(\"$\"* (#,##0.00);_(\"$\"* 
\"-\"??_);_(@_)", listener.getFormatString(43));
+   assertEquals("_(* #,##0.00_);_(* (#,##0.00);_(* 
\"-\"??_);_(@_)", listener.getFormatString(43));
+   assertEquals("_(\"$\"* #,##0.00_);_(\"$\"* (#,##0.00);_(\"$\"* 
\"-\"??_);_(@_)", listener.getFormatString(44));
}

/**



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1551845 - in /poi/trunk: src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java test-data/slideshow/PictureLengthZero.ppt

2013-12-17 Thread yegor
Author: yegor
Date: Wed Dec 18 05:26:49 2013
New Revision: 1551845

URL: http://svn.apache.org/r1551845
Log:
removed pictureFileZero.ppt from svn as requested by the owner, see discussion 
on @poi-dev from Dec 12, 2013

Removed:
poi/trunk/test-data/slideshow/PictureLengthZero.ppt
Modified:

poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java

Modified: 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java?rev=1551845&r1=1551844&r2=1551845&view=diff
==
--- 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java
 (original)
+++ 
poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestPictures.java
 Wed Dec 18 05:26:49 2013
@@ -24,6 +24,7 @@ import org.apache.poi.POIDataSamples;
 import junit.framework.TestCase;
 
 import java.io.*;
+import java.net.URL;
 import java.util.Arrays;
 
 /**
@@ -386,8 +387,14 @@ public final class TestPictures extends 
 assertEquals(Picture.WMF, pdata.getType());
}
 
-   public void testZeroPictureLength() throws Exception {
-   HSLFSlideShow hslf = new 
HSLFSlideShow(slTests.openResourceAsStream("PictureLengthZero.ppt"));
+/**
+ * YK: The test is disabled because the owner asked to delete the test 
file from POI svn.
+ * See "Please remove my file from your svn" on @poi-dev from Dec 12, 2013
+ */
+   public void disabled_testZeroPictureLength() throws Exception {
+// take the data from www instead of test directory
+URL url = new 
URL("http://www.cs.sfu.ca/~anoop/courses/CMPT-882-Fall-2002/chris.ppt";);
+   HSLFSlideShow hslf = new HSLFSlideShow(url.openStream());
 
// Should still have 2 real pictures
assertEquals(2, hslf.getPictures().length);



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1540296 - /poi/site/src/documentation/content/xdocs/status.xml

2013-11-09 Thread yegor
Author: yegor
Date: Sat Nov  9 11:57:52 2013
New Revision: 1540296

URL: http://svn.apache.org/r1540296
Log:
Bugzilla 55560 : Patch for hiding slides in HSLF

Modified:
poi/site/src/documentation/content/xdocs/status.xml

Modified: poi/site/src/documentation/content/xdocs/status.xml
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/status.xml?rev=1540296&r1=1540295&r2=1540296&view=diff
==
--- poi/site/src/documentation/content/xdocs/status.xml (original)
+++ poi/site/src/documentation/content/xdocs/status.xml Sat Nov  9 11:57:52 2013
@@ -35,6 +35,7 @@
 
 
  
+  55560 - Patch for hiding 
slides in HSLF
   53176 - Fixed auto shapes 
render problem in pptx files
   55661 - CellStyle support 
for get/set Shrink To Fit
   49237 - HSSF Row Style 
XfIndex is 12 not 16 bits of data



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1540295 - in /poi/trunk/src/scratchpad: src/org/apache/poi/hslf/model/Slide.java src/org/apache/poi/hslf/record/RecordTypes.java src/org/apache/poi/hslf/record/SSSlideInfoAtom.java testca

2013-11-09 Thread yegor
Author: yegor
Date: Sat Nov  9 11:57:21 2013
New Revision: 1540295

URL: http://svn.apache.org/r1540295
Log:
Bugzilla 55560 : Patch for hiding slides in HSLF

Added:
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SSSlideInfoAtom.java
Modified:
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Slide.java
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/RecordTypes.java

poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestSlideAtom.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Slide.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Slide.java?rev=1540295&r1=1540294&r2=1540295&view=diff
==
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Slide.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Slide.java Sat Nov  
9 11:57:21 2013
@@ -32,6 +32,7 @@ import org.apache.poi.hslf.record.Header
 import org.apache.poi.hslf.record.Record;
 import org.apache.poi.hslf.record.RecordContainer;
 import org.apache.poi.hslf.record.RecordTypes;
+import org.apache.poi.hslf.record.SSSlideInfoAtom;
 import org.apache.poi.hslf.record.SlideAtom;
 import org.apache.poi.hslf.record.StyleTextProp9Atom;
 import org.apache.poi.hslf.record.TextHeaderAtom;
@@ -488,4 +489,25 @@ public final class Slide extends Sheet
public EscherTextboxWrapper[] getTextboxWrappers() {
return this.getPPDrawing().getTextboxWrappers();
}
+
+   public void setHidden(boolean hidden) {
+   org.apache.poi.hslf.record.Slide cont = getSlideRecord();
+   
+   SSSlideInfoAtom slideInfo = 
+   
(SSSlideInfoAtom)cont.findFirstOfType(RecordTypes.SSSlideInfoAtom.typeID);
+   if (slideInfo == null) {
+   slideInfo = new SSSlideInfoAtom();
+   cont.addChildAfter(slideInfo, 
cont.findFirstOfType(RecordTypes.SlideAtom.typeID));
+   }
+   
+   
slideInfo.setEffectTransitionFlagByBit(SSSlideInfoAtom.HIDDEN_BIT, hidden);
+   }
+   
+   public boolean getHidden() {
+   SSSlideInfoAtom slideInfo = 
+   
(SSSlideInfoAtom)getSlideRecord().findFirstOfType(RecordTypes.SSSlideInfoAtom.typeID);
+   return (slideInfo == null)
+   ? false
+   : 
slideInfo.getEffectTransitionFlagByBit(SSSlideInfoAtom.HIDDEN_BIT);
+   }
 }

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/RecordTypes.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/RecordTypes.java?rev=1540295&r1=1540294&r2=1540295&view=diff
==
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/RecordTypes.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/RecordTypes.java 
Sat Nov  9 11:57:21 2013
@@ -46,7 +46,7 @@ public final class RecordTypes {
 public static final Type SlidePersistAtom = new 
Type(1011,SlidePersistAtom.class);
 public static final Type SSlideLayoutAtom = new Type(1015,null);
 public static final Type MainMaster = new Type(1016,MainMaster.class);
-public static final Type SSSlideInfoAtom = new Type(1017,null);
+public static final Type SSSlideInfoAtom = new 
Type(1017,SSSlideInfoAtom.class);
 public static final Type SlideViewInfo = new Type(1018,null);
 public static final Type GuideAtom = new Type(1019,null);
 public static final Type ViewInfo = new Type(1020,null);

Added: 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SSSlideInfoAtom.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SSSlideInfoAtom.java?rev=1540295&view=auto
==
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SSSlideInfoAtom.java 
(added)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SSSlideInfoAtom.java 
Sat Nov  9 11:57:21 2013
@@ -0,0 +1,289 @@
+/* 
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITH

svn commit: r1540291 - /poi/site/src/documentation/content/xdocs/status.xml

2013-11-09 Thread yegor
Author: yegor
Date: Sat Nov  9 11:33:21 2013
New Revision: 1540291

URL: http://svn.apache.org/r1540291
Log:
Patch 53176 - Fixed auto shapes render problem in pptx files

Modified:
poi/site/src/documentation/content/xdocs/status.xml

Modified: poi/site/src/documentation/content/xdocs/status.xml
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/status.xml?rev=1540291&r1=1540290&r2=1540291&view=diff
==
--- poi/site/src/documentation/content/xdocs/status.xml (original)
+++ poi/site/src/documentation/content/xdocs/status.xml Sat Nov  9 11:33:21 2013
@@ -35,6 +35,7 @@
 
 
  
+  53176 - Fixed auto shapes 
render problem in pptx files
   55661 - CellStyle support 
for get/set Shrink To Fit
   49237 - HSSF Row Style 
XfIndex is 12 not 16 bits of data
   53475 - OOXML encrypted 
document fix for cspname being optional



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1540290 - /poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java

2013-11-09 Thread yegor
Author: yegor
Date: Sat Nov  9 11:32:55 2013
New Revision: 1540290

URL: http://svn.apache.org/r1540290
Log:
Patch 53176 - Fixed auto shapes render problem in pptx files

Modified:
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java?rev=1540290&r1=1540289&r2=1540290&view=diff
==
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java Sat 
Nov  9 11:32:55 2013
@@ -141,11 +141,42 @@ public abstract class XSLFShape {
 double rotation = getRotation();
 if (rotation != 0.) {
 // PowerPoint rotates shapes relative to the geometric center
-double centerX = anchor.getX() + anchor.getWidth() / 2;
-double centerY = anchor.getY() + anchor.getHeight() / 2;
+double centerX = anchor.getCenterX();
+double centerY = anchor.getCenterY();
 
+// normalize rotation
+rotation = (360.+(rotation%360.))%360.;
+int quadrant = (((int)rotation+45)/90)%4;
+double scaleX = 1.0, scaleY = 1.0;
+
+// scale to bounding box (bug #53176)
+if (quadrant == 1 || quadrant == 3) {
+// In quadrant 1 and 3, which is basically a shape in a more 
or less portrait orientation (45°-135° and 225°-315°),
+// we need to first rotate the shape by a multiple of 90° and 
then resize the bounding box  
+// to its original bbox. After that we can rotate the shape to 
the exact rotation amount.
+// It's strange that you'll need to rotate the shape back and 
forth again, but you can
+// think of it, as if you paint the shape on a canvas. First 
you rotate the canvas, which might
+// be already (differently) scaled, so you can paint the shape 
in its default orientation
+// and later on, turn it around again to compare it with its 
original size ...
+AffineTransform txg = new AffineTransform(); // graphics 
coordinate space
+AffineTransform txs = new AffineTransform(tx); // shape 
coordinate space
+txg.translate(centerX, centerY);
+txg.rotate(Math.toRadians(quadrant*90));
+txg.translate(-centerX, -centerY);
+txs.translate(centerX, centerY);
+txs.rotate(Math.toRadians(-quadrant*90));
+txs.translate(-centerX, -centerY);
+txg.concatenate(txs);
+Rectangle2D anchor2 = 
txg.createTransformedShape(getAnchor()).getBounds2D();
+scaleX = anchor.getWidth() == 0. ? 1.0 : anchor.getWidth() / 
anchor2.getWidth();
+scaleY = anchor.getHeight() == 0. ? 1.0 : anchor.getHeight() / 
anchor2.getHeight();
+}
+
+// transformation is applied reversed ...
 graphics.translate(centerX, centerY);
-graphics.rotate(Math.toRadians(rotation));
+graphics.rotate(Math.toRadians(rotation-(double)(quadrant*90)));
+graphics.scale(scaleX, scaleY);
+graphics.rotate(Math.toRadians(quadrant*90));
 graphics.translate(-centerX, -centerY);
 }
 



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1535810 - /poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java

2013-10-25 Thread yegor
Author: yegor
Date: Fri Oct 25 18:41:24 2013
New Revision: 1535810

URL: http://svn.apache.org/r1535810
Log:
Patch 55612 - Performance improvement in  HSSFCellStyle.getDataFormatString()

Modified:
poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java?rev=1535810&r1=1535809&r2=1535810&view=diff
==
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java Fri Oct 
25 18:41:24 2013
@@ -18,9 +18,13 @@
 
 package org.apache.poi.hssf.usermodel;
 
+import java.util.Arrays;
+import java.util.List;
+
 import org.apache.poi.hssf.model.InternalWorkbook;
 import org.apache.poi.hssf.record.ExtendedFormatRecord;
 import org.apache.poi.hssf.record.FontRecord;
+import org.apache.poi.hssf.record.FormatRecord;
 import org.apache.poi.hssf.record.StyleRecord;
 import org.apache.poi.hssf.util.HSSFColor;
 import org.apache.poi.ss.usermodel.CellStyle;
@@ -104,9 +108,26 @@ public final class HSSFCellStyle impleme
  * @see org.apache.poi.hssf.usermodel.HSSFDataFormat
  * @return the format string or "General" if not found
  */
+ 
+private static short lastDateFormat = Short.MIN_VALUE;
+private static List lastFormats = null;
+private static String getDataFormatStringCache = null;
+
 public String getDataFormatString() {
-return getDataFormatString(_workbook);
+if (getDataFormatStringCache != null) {
+if (lastDateFormat == getDataFormat() && 
_workbook.getFormats().equals(lastFormats)) {
+return getDataFormatStringCache;
+}
+}
+
+lastFormats = _workbook.getFormats();
+lastDateFormat = getDataFormat();
+
+getDataFormatStringCache = getDataFormatString(_workbook);
+
+return getDataFormatStringCache;
 }
+
 /**
  * Get the contents of the format string, by looking up
  *  the DataFormat against the supplied workbook
@@ -826,6 +847,11 @@ public final class HSSFCellStyle impleme
 
// Handle matching things if we cross workbooks
if(_workbook != source._workbook) {
+
+lastDateFormat = Short.MIN_VALUE;
+lastFormats = null;
+getDataFormatStringCache = null;
+  
// Then we need to clone the format string,
//  and update the format record for this
short fmt = 
(short)_workbook.createFormat(source.getDataFormatString() );
@@ -872,4 +898,5 @@ public final class HSSFCellStyle impleme
}
return false;
}
+   
 }



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1535806 - /poi/site/src/documentation/content/xdocs/status.xml

2013-10-25 Thread yegor
Author: yegor
Date: Fri Oct 25 18:38:44 2013
New Revision: 1535806

URL: http://svn.apache.org/r1535806
Log:
Patch 55612 - Performance improvement in  HSSFCellStyle.getDataFormatString()

Modified:
poi/site/src/documentation/content/xdocs/status.xml

Modified: poi/site/src/documentation/content/xdocs/status.xml
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/status.xml?rev=1535806&r1=1535805&r2=1535806&view=diff
==
--- poi/site/src/documentation/content/xdocs/status.xml (original)
+++ poi/site/src/documentation/content/xdocs/status.xml Fri Oct 25 18:38:44 2013
@@ -35,6 +35,10 @@
 
 
  
+  55612 - Performance 
improvement in  HSSFCellStyle.getDataFormatString()
+  55611 - Performance 
improvement in DateUtil.isADateFormat(int, String)
+  55578 - Support embedding 
OLE1.0 packages in HSSF
+  49658 - Support embedding 
EMF/WMF pictures in HSSF
   55692 - Give a more helpful 
error if an Encrypted .xlsx file is passed to HSSF
   55650 - Avoid AIOOBE if a 
non-existant Xfs is requested for a style
   55658 - Don't fail in SXSSF 
if a numeric cell is overwritten with a string
@@ -78,6 +82,10 @@
   github4 - Expose from 
XWPFParagraph the number level and format, if applied
   github3 - Extract references 
from XWPF footnotes
   55053 - Update License links 
following ECMA site re-organisation
+  49658 - Support embedding 
EMF/WMF pictures in HSSF 
+  55047 - REPT formula support 

+  55042 - COMPLEX formula 
support 
+  55041 - CODE formula support 

   55001 - Support Unicode text 
(TextCharsAtom) in HSLF TextShape
   54682 - 
UnhandledDataStructure should sanity check before allocating, not after
   54673 - Simple wildcard 
support in HLOOKUP, VOOLKUP, MATCH, COUNTIF 



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1533768 - /poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java

2013-10-19 Thread yegor
Author: yegor
Date: Sat Oct 19 14:12:15 2013
New Revision: 1533768

URL: http://svn.apache.org/r1533768
Log:
Patch 55611 - Performance improvement in DateUtil.isADateFormat(int, String)

Modified:
poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java?rev=1533768&r1=1533767&r2=1533768&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java Sat Oct 19 
14:12:15 2013
@@ -299,7 +299,7 @@ public class DateUtil {
  * @see #isInternalDateFormat(int)
  */
 
-public static boolean isADateFormat(int formatIndex, String formatString) {
+public static synchronized boolean isADateFormat(int formatIndex, String 
formatString) {

  if (formatString != null && formatIndex == lastFormatIndex && 
formatString.equals(lastFormatString)) {
return cached;



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1533764 - in /poi/trunk/src/java/org/apache/poi: hssf/record/ExtendedFormatRecord.java ss/usermodel/DateUtil.java

2013-10-19 Thread yegor
Author: yegor
Date: Sat Oct 19 13:53:19 2013
New Revision: 1533764

URL: http://svn.apache.org/r1533764
Log:
Patch 55611 - Performance improvement in DateUtil.isADateFormat(int, String)

Modified:
poi/trunk/src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java
poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java?rev=1533764&r1=1533763&r2=1533764&view=diff
==
--- poi/trunk/src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/ExtendedFormatRecord.java Sat 
Oct 19 13:53:19 2013
@@ -1,4 +1,3 @@
-
 /* 
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements.  See the NOTICE file distributed with
@@ -1861,6 +1860,11 @@ public final class ExtendedFormatRecord
}
return false;
}
+   
+   public int[] stateSummary() {
+   return new int[] { field_1_font_index, field_2_format_index, 
field_3_cell_options, field_4_alignment_options,
+   field_5_indention_options, 
field_6_border_options, field_7_palette_options, field_8_adtl_palette_options, 
field_9_fill_palette_options };
+   }
 
 
 }

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java?rev=1533764&r1=1533763&r2=1533764&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java Sat Oct 19 
13:53:19 2013
@@ -277,6 +277,14 @@ public class DateUtil {
 }
 
 
+// variables for performance optimization:
+// avoid re-checking DataUtil.isADateFormat(int, String) if a given format
+// string represents a date format if the same string is passed multiple 
times.
+// see https://issues.apache.org/bugzilla/show_bug.cgi?id=55611
+private static int lastFormatIndex = -1;
+private static String lastFormatString = null;
+private static boolean cached = false;
+
 /**
  * Given a format ID and its format String, will check to see if the
  *  format represents a date format or not.
@@ -290,14 +298,25 @@ public class DateUtil {
  * @param formatString The format string, eg from 
FormatRecord.getFormatString
  * @see #isInternalDateFormat(int)
  */
+
 public static boolean isADateFormat(int formatIndex, String formatString) {
+   
+ if (formatString != null && formatIndex == lastFormatIndex && 
formatString.equals(lastFormatString)) {
+   return cached;
+ }
 // First up, is this an internal date format?
 if(isInternalDateFormat(formatIndex)) {
+lastFormatIndex = formatIndex;
+lastFormatString = formatString;
+cached = true;
 return true;
 }
 
 // If we didn't get a real string, it can't be
 if(formatString == null || formatString.length() == 0) {
+lastFormatIndex = formatIndex;
+lastFormatString = formatString;
+cached = false;
 return false;
 }
 
@@ -349,6 +368,9 @@ public class DateUtil {
 
 // short-circuit if it indicates elapsed time: [h], [m] or [s]
 if(date_ptrn4.matcher(fs).matches()){
+lastFormatIndex = formatIndex;
+lastFormatString = formatString;
+cached = true;
 return true;
 }
 
@@ -374,7 +396,12 @@ public class DateUtil {
 // If we get here, check it's only made up, in any case, of:
 //  y m d h s - \ / , . : [ ]
 // optionally followed by AM/PM
-return date_ptrn3b.matcher(fs).matches();
+
+boolean result = date_ptrn3b.matcher(fs).matches();
+lastFormatIndex = formatIndex;
+lastFormatString = formatString;
+cached = result;
+return result;
 }
 
 /**



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1531623 - in /poi/trunk/src: java/org/apache/poi/hpsf/ java/org/apache/poi/hssf/record/ java/org/apache/poi/hssf/usermodel/ java/org/apache/poi/poifs/filesystem/ testcases/org/apache/poi/

2013-10-13 Thread yegor
Author: yegor
Date: Sun Oct 13 07:39:40 2013
New Revision: 1531623

URL: http://svn.apache.org/r1531623
Log:
Bugzilla 55578 - Support embedding OLE1.0 packages in HSSF

Added:
poi/trunk/src/java/org/apache/poi/hssf/record/FtCfSubRecord.java
poi/trunk/src/java/org/apache/poi/hssf/record/FtPioGrbitSubRecord.java
Modified:
poi/trunk/src/java/org/apache/poi/hpsf/ClassID.java

poi/trunk/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java
poi/trunk/src/java/org/apache/poi/hssf/record/SubRecord.java
poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPatriarch.java
poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
poi/trunk/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java
poi/trunk/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java
poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPicture.java
poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java

Modified: poi/trunk/src/java/org/apache/poi/hpsf/ClassID.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/ClassID.java?rev=1531623&r1=1531622&r2=1531623&view=diff
==
--- poi/trunk/src/java/org/apache/poi/hpsf/ClassID.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/ClassID.java Sun Oct 13 07:39:40 2013
@@ -30,7 +30,12 @@ import org.apache.poi.util.HexDump;
  */
 public class ClassID
 {
-
+public static final ClassID OLE10_PACKAGE = new 
ClassID("{0003000C---C000-0046}");
+public static final ClassID PPT_SHOW = new 
ClassID("{64818D10-4F9B-11CF-86EA-00AA00B929E8}");
+public static final ClassID XLS_WORKBOOK = new 
ClassID("{00020841---C000-0046}");
+public static final ClassID TXT_ONLY = new 
ClassID("{5e941d80-bf96-11cd-b579-08002b30bfeb}"); // ???
+   
+   
 /**
  * The bytes making out the class ID in correct order,
  * i.e. big-endian.
@@ -64,6 +69,20 @@ public class ClassID
 }
 
 
+/**
+ * Creates a {@link ClassID} from a human-readable representation of 
the Class ID in standard 
+ * format "{----}".
+ * 
+ * @param externalForm representation of the Class ID represented by this 
object.
+ */
+public ClassID(String externalForm) {
+   bytes = new byte[LENGTH];
+String clsStr = externalForm.replaceAll("[{}-]", "");
+for (int i=0; iThe number of bytes occupied by this object in the byte
  * stream. */

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java?rev=1531623&r1=1531622&r2=1531623&view=diff
==
--- 
poi/trunk/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java 
(original)
+++ 
poi/trunk/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java 
Sun Oct 13 07:39:40 2013
@@ -64,7 +64,7 @@ public final class EmbeddedObjectRefSubR
 
 
// currently for testing only - needs review
-   EmbeddedObjectRefSubRecord() {
+   public EmbeddedObjectRefSubRecord() {
field_2_unknownFormulaData = new byte[] { 0x02, 0x6C, 0x6A, 
0x16, 0x01, }; // just some sample data.  These values vary a lot
field_6_unknown = EMPTY_BYTE_ARRAY;
field_4_ole_classname = null;
@@ -334,4 +334,16 @@ public final class EmbeddedObjectRefSubR
sb.append("[/ftPictFmla]");
return sb.toString();
}
+   
+   public void setUnknownFormulaData(byte[] formularData) {
+   field_2_unknownFormulaData = formularData;
+   }
+   
+   public void setOleClassname(String oleClassname) {
+   field_4_ole_classname = oleClassname;
+   }
+   
+   public void setStorageId(int storageId) {
+   field_5_stream_id = storageId;
+   }
 }

Added: poi/trunk/src/java/org/apache/poi/hssf/record/FtCfSubRecord.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/FtCfSubRecord.java?rev=1531623&view=auto
==
--- poi/trunk/src/java/org/apache/poi/hssf/record/FtCfSubRecord.java (added)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/FtCfSubRecord.java Sun Oct 13 
07:39:40 2013
@@ -0,0 +1,113 @@
+/* 
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to Y

svn commit: r1531622 - in /poi/trunk/src: java/org/apache/poi/ddf/EscherMetafileBlip.java java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java testcases/org/apache/poi/hssf/usermodel/TestHSSFPicture.j

2013-10-13 Thread yegor
Author: yegor
Date: Sun Oct 13 07:20:36 2013
New Revision: 1531622

URL: http://svn.apache.org/r1531622
Log:
Bugzilla 49658 - Support embedding EMF/WMF pictures in HSSF 

Modified:
poi/trunk/src/java/org/apache/poi/ddf/EscherMetafileBlip.java
poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPicture.java

Modified: poi/trunk/src/java/org/apache/poi/ddf/EscherMetafileBlip.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ddf/EscherMetafileBlip.java?rev=1531622&r1=1531621&r2=1531622&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ddf/EscherMetafileBlip.java (original)
+++ poi/trunk/src/java/org/apache/poi/ddf/EscherMetafileBlip.java Sun Oct 13 
07:20:36 2013
@@ -21,6 +21,7 @@ import org.apache.poi.util.HexDump;
 import org.apache.poi.util.LittleEndian;
 import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
+import org.apache.poi.hssf.usermodel.HSSFPictureData;
 
 import java.awt.Dimension;
 import java.awt.Rectangle;
@@ -28,6 +29,7 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.util.zip.InflaterInputStream;
+import java.util.zip.DeflaterOutputStream;
 
 /**
  * @author Daniel Noll
@@ -39,13 +41,6 @@ public final class EscherMetafileBlip ex
 public static final short RECORD_ID_WMF = (short) 0xF018 + 3;
 public static final short RECORD_ID_PICT = (short) 0xF018 + 4;
 
-/**
- * BLIP signatures as defined in the escher spec
- */
-public static final short SIGNATURE_EMF  = 0x3D40;
-public static final short SIGNATURE_WMF  = 0x2160;
-public static final short SIGNATURE_PICT = 0x5420;
-
 private static final int HEADER_SIZE = 8;
 
 private byte[] field_1_UID;
@@ -288,11 +283,37 @@ public final class EscherMetafileBlip ex
  */
 public short getSignature() {
 switch (getRecordId()) {
-case RECORD_ID_EMF:  return SIGNATURE_EMF;
-case RECORD_ID_WMF:  return SIGNATURE_WMF;
-case RECORD_ID_PICT: return  SIGNATURE_PICT;
+case RECORD_ID_EMF:  return HSSFPictureData.MSOBI_EMF;
+case RECORD_ID_WMF:  return HSSFPictureData.MSOBI_WMF;
+case RECORD_ID_PICT: return HSSFPictureData.MSOBI_PICT;
 }
 log.log(POILogger.WARN, "Unknown metafile: " + getRecordId());
 return 0;
 }
+
+public void setPictureData(byte[] pictureData) {
+   super.setPictureData(pictureData);
+setUncompressedSize(pictureData.length);
+
+// info of chicago project:
+// "... LZ compression algorithm in the format used by GNU Zip 
deflate/inflate with a 32k window ..."
+// not sure what to do, when lookup tables exceed 32k ...
+
+try {
+   ByteArrayOutputStream bos = new ByteArrayOutputStream();
+   DeflaterOutputStream dos = new DeflaterOutputStream(bos);
+   dos.write(pictureData);
+   dos.close();
+   raw_pictureData = bos.toByteArray();
+} catch (IOException e) {
+   throw new RuntimeException("Can't compress metafile picture 
data", e);
+}
+
+setCompressedSize(raw_pictureData.length);
+setCompressed(true);
+}
+
+public void setFilter(byte filter) {
+   field_7_fFilter = filter;
+}
 }

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java?rev=1531622&r1=1531621&r2=1531622&view=diff
==
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java Sun Oct 
13 07:20:36 2013
@@ -34,6 +34,7 @@ import org.apache.poi.POIDocument;
 import org.apache.poi.ddf.EscherBSERecord;
 import org.apache.poi.ddf.EscherBitmapBlip;
 import org.apache.poi.ddf.EscherBlipRecord;
+import org.apache.poi.ddf.EscherMetafileBlip;
 import org.apache.poi.ddf.EscherRecord;
 import org.apache.poi.hssf.OldExcelFormatException;
 import org.apache.poi.hssf.model.DrawingManager2;
@@ -57,6 +58,7 @@ import org.apache.poi.ss.usermodel.Row.M
 import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.ss.util.WorkbookUtil;
 import org.apache.poi.util.Configurator;
+import org.apache.poi.util.LittleEndian;
 import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
 
@@ -1587,7 +1589,40 @@ public final class HSSFWorkbook extends 
 initDrawings();
 
 byte[] uid = DigestUtils.md5(pictureData);
-EscherBitmapBlip blipRecord = new EscherBitmapBlip();
+EscherBlipRecord 

svn commit: r1489685 - in /poi/trunk/src: java/org/apache/poi/ss/formula/functions/ scratchpad/src/org/apache/poi/hwpf/model/

2013-06-04 Thread yegor
Author: yegor
Date: Wed Jun  5 02:03:07 2013
New Revision: 1489685

URL: http://svn.apache.org/r1489685
Log:
fixed compatibility issues with JDK 1.5

Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Quotient.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Rept.java

poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/UnhandledDataStructure.java

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java?rev=1489685&r1=1489684&r2=1489685&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java Wed Jun 
 5 02:03:07 2013
@@ -70,7 +70,7 @@ public class Complex extends Var2or3ArgF
 }
 
 String suffixValue = OperandResolver.coerceValueToString(suffix);
-if (suffixValue.isEmpty()) {
+if (suffixValue.length() == 0) {
 suffixValue = DEFAULT_SUFFIX;
 }
 if (suffixValue.equals(DEFAULT_SUFFIX.toUpperCase()) || 
suffixValue.equals(SUPPORTED_SUFFIX.toUpperCase())) {

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Quotient.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Quotient.java?rev=1489685&r1=1489684&r2=1489685&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Quotient.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Quotient.java Wed 
Jun  5 02:03:07 2013
@@ -23,7 +23,7 @@ import org.apache.poi.ss.formula.eval.*;
  * @author cedric dot walter @ gmail dot com
  */
 public class Quotient extends Fixed2ArgFunction {
-@Override
+
 public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval 
venumerator, ValueEval vedenominator) {
 
 double enumerator = 0;

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Rept.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Rept.java?rev=1489685&r1=1489684&r2=1489685&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Rept.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Rept.java Wed Jun  5 
02:03:07 2013
@@ -42,7 +42,6 @@ import java.math.BigDecimal;
 public class Rept extends Fixed2ArgFunction  {
 
 
-@Override
 public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval 
text, ValueEval number_times) {
 
 ValueEval veText1;

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/UnhandledDataStructure.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/UnhandledDataStructure.java?rev=1489685&r1=1489684&r2=1489685&view=diff
==
--- 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/UnhandledDataStructure.java
 (original)
+++ 
poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/UnhandledDataStructure.java
 Wed Jun  5 02:03:07 2013
@@ -48,9 +48,23 @@ public final class UnhandledDataStructur
 }
 
 // Save that requested portion of the data 
-_buf = Arrays.copyOfRange(buf, offset, offsetEnd);
+_buf = copyOfRange(buf, offset, offsetEnd);
+
   }
 
+/**
+ * YK: Arrays.copyOfRange is not in JDK 1.5
+ */
+static byte[] copyOfRange(byte[] original, int from, int to) {
+int newLength = to - from;
+if (newLength < 0)
+throw new IllegalArgumentException(from + " > " + to);
+byte[] copy = new byte[newLength];
+System.arraycopy(original, from, copy, 0,
+Math.min(original.length - from, newLength));
+return copy;
+}
+
   byte[] getBuf()
   {
 return _buf;



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1488823 - /poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java

2013-06-02 Thread yegor
Author: yegor
Date: Mon Jun  3 01:05:28 2013
New Revision: 1488823

URL: http://svn.apache.org/r1488823
Log:
removed @Override to keep javac on JDK 1.5 happy

Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java?rev=1488823&r1=1488822&r2=1488823&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java Mon Jun 
 3 01:05:28 2013
@@ -38,12 +38,10 @@ public class Complex extends Var2or3ArgF
 public static final String DEFAULT_SUFFIX = "i";
 public static final String SUPPORTED_SUFFIX = "j";
 
-@Override
 public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval 
real_num, ValueEval i_num) {
 return this.evaluate(srcRowIndex, srcColumnIndex, real_num, i_num, new 
StringEval(DEFAULT_SUFFIX));
 }
 
-@Override
 public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval 
real_num, ValueEval i_num, ValueEval suffix) {
 ValueEval veText1;
 try {
@@ -119,7 +117,6 @@ public class Complex extends Var2or3ArgF
 return (number == Math.floor(number)) && !Double.isInfinite(number);
 }
 
-@Override
 public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) 
{
 if (args.length == 2) {
 return evaluate(ec.getRowIndex(), ec.getColumnIndex(), args[0], 
args[1]);



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1488811 - in /poi/trunk: src/java/org/apache/poi/ss/formula/eval/ src/java/org/apache/poi/ss/formula/functions/ src/testcases/org/apache/poi/ss/formula/functions/ test-data/spreadsheet/

2013-06-02 Thread yegor
Author: yegor
Date: Sun Jun  2 23:39:41 2013
New Revision: 1488811

URL: http://svn.apache.org/r1488811
Log:
Bug 55047: REPT formula support

Added:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Rept.java

poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestReptFunctionsFromSpreadsheet.java
poi/trunk/test-data/spreadsheet/ReptFunctionTestCaseData.xls   (with props)
Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java?rev=1488811&r1=1488810&r2=1488811&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java Sun Jun 
 2 23:39:41 2013
@@ -89,6 +89,7 @@ public final class FunctionEval {
retval[27] = NumericFunction.ROUND;
retval[28] = new Lookup();
retval[29] = new Index();
+   retval[30] = new Rept();
 
retval[31] = TextFunction.MID;
retval[32] = TextFunction.LEN;

Added: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Rept.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Rept.java?rev=1488811&view=auto
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Rept.java (added)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Rept.java Sun Jun  2 
23:39:41 2013
@@ -0,0 +1,74 @@
+/* 
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ */
+
+package org.apache.poi.ss.formula.functions;
+
+import org.apache.poi.ss.formula.OperationEvaluationContext;
+import org.apache.poi.ss.formula.eval.*;
+
+import java.math.BigDecimal;
+
+/**
+ * Implementation for Excel REPT () function.
+ * 
+ * Syntax: REPT  (text,number_times )
+ * 
+ * Repeats text a given number of times. Use REPT to fill a cell with a number 
of instances of a text string.
+ *
+ * text : text The text that you want to repeat.
+ * number_times:   A positive number specifying the number of times to 
repeat text.
+ *
+ * If number_times is 0 (zero), REPT returns "" (empty text).
+ * If this argument contains a decimal value, this function ignores the 
numbers to the right side of the decimal point.
+ *
+ * The result of the REPT function cannot be longer than 32,767 characters, or 
REPT returns #VALUE!.
+ *
+ * @author cedric dot walter @ gmail dot com
+ */
+public class Rept extends Fixed2ArgFunction  {
+
+
+@Override
+public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval 
text, ValueEval number_times) {
+
+ValueEval veText1;
+try {
+veText1 = OperandResolver.getSingleValue(text, srcRowIndex, 
srcColumnIndex);
+} catch (EvaluationException e) {
+return e.getErrorEval();
+}
+String strText1 = OperandResolver.coerceValueToString(veText1);
+double numberOfTime = 0;
+try {
+numberOfTime = OperandResolver.coerceValueToDouble(number_times);
+} catch (EvaluationException e) {
+return ErrorEval.VALUE_INVALID;
+}
+
+int numberOfTimeInt = new Double(numberOfTime).intValue();
+StringBuffer strb = new StringBuffer(strText1.length() * 
numberOfTimeInt);
+for(int i = 0; i < numberOfTimeInt; i++) {
+strb.append(strText1);
+}
+
+if (strb.toString().length() > 32767) {
+return ErrorEval.VALUE_INVALID;
+}
+
+return new StringEval(strb.toString());
+}
+}

Added: 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestReptFunctionsFromSpreadsheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestRep

svn commit: r1488810 - in /poi/trunk: src/java/org/apache/poi/ss/formula/eval/FunctionEval.java src/testcases/org/apache/poi/ss/formula/functions/TestCodeFunctionsFromSpreadsheet.java test-data/spread

2013-06-02 Thread yegor
Author: yegor
Date: Sun Jun  2 23:32:24 2013
New Revision: 1488810

URL: http://svn.apache.org/r1488810
Log:
missing tests for Bug 55041 - CODE formula support

Added:

poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestCodeFunctionsFromSpreadsheet.java
poi/trunk/test-data/spreadsheet/CodeFunctionTestCaseData.xls   (with props)
Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java?rev=1488810&r1=1488809&r2=1488810&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java Sun Jun 
 2 23:32:24 2013
@@ -151,6 +151,7 @@ public final class FunctionEval {
retval[118] = TextFunction.TRIM;
retval[119] = new Replace();
retval[120] = new Substitute();
+retval[121] = new Code();
 
retval[124] = TextFunction.FIND;
 

Added: 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestCodeFunctionsFromSpreadsheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestCodeFunctionsFromSpreadsheet.java?rev=1488810&view=auto
==
--- 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestCodeFunctionsFromSpreadsheet.java
 (added)
+++ 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestCodeFunctionsFromSpreadsheet.java
 Sun Jun  2 23:32:24 2013
@@ -0,0 +1,31 @@
+/* 
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ */
+
+package org.apache.poi.ss.formula.functions;
+
+/**
+ * Tests CODE() as loaded from a test data spreadsheet.
+ *
+ * @author cedric dot walter @ gmail dot com
+ */
+public class TestCodeFunctionsFromSpreadsheet extends 
BaseTestFunctionsFromSpreadsheet {
+
+@Override
+protected String getFilename() {
+return "CodeFunctionTestCaseData.xls";
+}
+}
\ No newline at end of file

Added: poi/trunk/test-data/spreadsheet/CodeFunctionTestCaseData.xls
URL: 
http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/CodeFunctionTestCaseData.xls?rev=1488810&view=auto
==
Binary file - no diff available.

Propchange: poi/trunk/test-data/spreadsheet/CodeFunctionTestCaseData.xls
--
svn:mime-type = application/vnd.ms-excel



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1488809 - /poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestComplexFunctionsFromSpreadsheet.java

2013-06-02 Thread yegor
Author: yegor
Date: Sun Jun  2 23:25:33 2013
New Revision: 1488809

URL: http://svn.apache.org/r1488809
Log:
added missing tests for Bug 55042: patch for missing function COMPLEX

Added:

poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestComplexFunctionsFromSpreadsheet.java

Added: 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestComplexFunctionsFromSpreadsheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestComplexFunctionsFromSpreadsheet.java?rev=1488809&view=auto
==
--- 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestComplexFunctionsFromSpreadsheet.java
 (added)
+++ 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestComplexFunctionsFromSpreadsheet.java
 Sun Jun  2 23:25:33 2013
@@ -0,0 +1,31 @@
+/* 
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ */
+
+package org.apache.poi.ss.formula.functions;
+
+/**
+ * Tests COMPLEX() as loaded from a test data spreadsheet.
+ *
+ * @author cedric dot walter @ gmail dot com
+ */
+public class TestComplexFunctionsFromSpreadsheet extends 
BaseTestFunctionsFromSpreadsheet {
+
+@Override
+protected String getFilename() {
+return "ComplexFunctionTestCaseData.xls";
+}
+}
\ No newline at end of file



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1488808 - in /poi/trunk: src/java/org/apache/poi/ss/formula/atp/AnalysisToolPak.java src/java/org/apache/poi/ss/formula/functions/Complex.java test-data/spreadsheet/ComplexFunctionTestCas

2013-06-02 Thread yegor
Author: yegor
Date: Sun Jun  2 23:25:07 2013
New Revision: 1488808

URL: http://svn.apache.org/r1488808
Log:
added missing tests for Bug 55042: patch for missing function COMPLEX

Added:
poi/trunk/test-data/spreadsheet/ComplexFunctionTestCaseData.xls   (with 
props)
Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/atp/AnalysisToolPak.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/atp/AnalysisToolPak.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/atp/AnalysisToolPak.java?rev=1488808&r1=1488807&r2=1488808&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/atp/AnalysisToolPak.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/atp/AnalysisToolPak.java Sun 
Jun  2 23:25:07 2013
@@ -15,9 +15,7 @@ import org.apache.poi.ss.formula.eval.No
 import org.apache.poi.ss.formula.eval.ValueEval;
 import org.apache.poi.ss.formula.function.FunctionMetadata;
 import org.apache.poi.ss.formula.function.FunctionMetadataRegistry;
-import org.apache.poi.ss.formula.functions.EDate;
-import org.apache.poi.ss.formula.functions.FreeRefFunction;
-import org.apache.poi.ss.formula.functions.Sumifs;
+import org.apache.poi.ss.formula.functions.*;
 import org.apache.poi.ss.formula.udf.UDFFinder;
 
 import java.util.*;
@@ -74,7 +72,7 @@ public final class AnalysisToolPak imple
 r(m, "BIN2DEC", null);
 r(m, "BIN2HEX", null);
 r(m, "BIN2OCT", null);
-r(m, "COMPLEX", null);
+r(m, "COMPLEX", Complex.instance);
 r(m, "CONVERT", null);
 r(m, "COUNTIFS", null);
 r(m, "COUPDAYBS", null);

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java?rev=1488808&r1=1488807&r2=1488808&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java Sun Jun 
 2 23:25:07 2013
@@ -1,5 +1,6 @@
 package org.apache.poi.ss.formula.functions;
 
+import org.apache.poi.ss.formula.OperationEvaluationContext;
 import org.apache.poi.ss.formula.eval.*;
 
 /**
@@ -30,7 +31,9 @@ import org.apache.poi.ss.formula.eval.*;
  *
  * @author cedric dot walter @ gmail dot com
  */
-public class Complex extends Var2or3ArgFunction {
+public class Complex extends Var2or3ArgFunction implements FreeRefFunction {
+
+public static final FreeRefFunction instance = new Complex();
 
 public static final String DEFAULT_SUFFIX = "i";
 public static final String SUPPORTED_SUFFIX = "j";
@@ -116,4 +119,15 @@ public class Complex extends Var2or3ArgF
 return (number == Math.floor(number)) && !Double.isInfinite(number);
 }
 
+@Override
+public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) 
{
+if (args.length == 2) {
+return evaluate(ec.getRowIndex(), ec.getColumnIndex(), args[0], 
args[1]);
+}
+if (args.length == 3) {
+return evaluate(ec.getRowIndex(), ec.getColumnIndex(), args[0], 
args[1], args[2]);
+}
+
+return ErrorEval.VALUE_INVALID;
+}
 }

Added: poi/trunk/test-data/spreadsheet/ComplexFunctionTestCaseData.xls
URL: 
http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/ComplexFunctionTestCaseData.xls?rev=1488808&view=auto
==
Binary file - no diff available.

Propchange: poi/trunk/test-data/spreadsheet/ComplexFunctionTestCaseData.xls
--
svn:mime-type = application/vnd.ms-excel



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1488734 - in /poi/trunk/src: java/org/apache/poi/ss/formula/functions/ testcases/org/apache/poi/ss/formula/functions/

2013-06-02 Thread yegor
Author: yegor
Date: Sun Jun  2 16:08:17 2013
New Revision: 1488734

URL: http://svn.apache.org/r1488734
Log:
Bugzilla 55043 and 55042: initial support for Complex and Quotient functions

Added:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Quotient.java
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestComplex.java

poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestQuotient.java

Added: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java?rev=1488734&view=auto
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java (added)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java Sun Jun 
 2 16:08:17 2013
@@ -0,0 +1,119 @@
+package org.apache.poi.ss.formula.functions;
+
+import org.apache.poi.ss.formula.eval.*;
+
+/**
+ * Implementation for Excel COMPLEX () function.
+ * 
+ * Syntax: COMPLEX   
(real_num,i_num,suffix  )
+ * 
+ * Converts real and imaginary coefficients into a complex number of the form 
x + yi or x + yj.
+ * 
+ * 
+ * All complex number functions accept "i" and "j" for suffix, but neither "I" 
nor "J".
+ * Using uppercase results in the #VALUE! error value. All functions that 
accept two
+ * or more complex numbers require that all suffixes match.
+ * 
+ * real_num The real coefficient of the complex number.
+ * If this argument is nonnumeric, this function returns the #VALUE! error 
value.
+ * 
+ * 
+ * i_num The imaginary coefficient of the complex number.
+ * If this argument is nonnumeric, this function returns the #VALUE! error 
value.
+ * 
+ * 
+ * suffix The suffix for the imaginary component of the complex number.
+ * 
+ * If omitted, suffix is assumed to be "i".
+ * If suffix is neither "i" nor "j", COMPLEX returns the #VALUE! error 
value.
+ * 
+ *
+ * @author cedric dot walter @ gmail dot com
+ */
+public class Complex extends Var2or3ArgFunction {
+
+public static final String DEFAULT_SUFFIX = "i";
+public static final String SUPPORTED_SUFFIX = "j";
+
+@Override
+public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval 
real_num, ValueEval i_num) {
+return this.evaluate(srcRowIndex, srcColumnIndex, real_num, i_num, new 
StringEval(DEFAULT_SUFFIX));
+}
+
+@Override
+public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval 
real_num, ValueEval i_num, ValueEval suffix) {
+ValueEval veText1;
+try {
+veText1 = OperandResolver.getSingleValue(real_num, srcRowIndex, 
srcColumnIndex);
+} catch (EvaluationException e) {
+return e.getErrorEval();
+}
+double realNum = 0;
+try {
+realNum = OperandResolver.coerceValueToDouble(veText1);
+} catch (EvaluationException e) {
+return ErrorEval.VALUE_INVALID;
+}
+
+ValueEval veINum;
+try {
+veINum = OperandResolver.getSingleValue(i_num, srcRowIndex, 
srcColumnIndex);
+} catch (EvaluationException e) {
+return e.getErrorEval();
+}
+double realINum = 0;
+try {
+realINum = OperandResolver.coerceValueToDouble(veINum);
+} catch (EvaluationException e) {
+return ErrorEval.VALUE_INVALID;
+}
+
+String suffixValue = OperandResolver.coerceValueToString(suffix);
+if (suffixValue.isEmpty()) {
+suffixValue = DEFAULT_SUFFIX;
+}
+if (suffixValue.equals(DEFAULT_SUFFIX.toUpperCase()) || 
suffixValue.equals(SUPPORTED_SUFFIX.toUpperCase())) {
+return ErrorEval.VALUE_INVALID;
+}
+if (!(suffixValue.equals(DEFAULT_SUFFIX) || 
suffixValue.equals(SUPPORTED_SUFFIX))) {
+return ErrorEval.VALUE_INVALID;
+}
+
+StringBuffer strb = new StringBuffer("");
+if (realNum != 0) {
+if (isDoubleAnInt(realNum)) {
+strb.append(new Double(realNum).intValue());
+} else {
+strb.append(realNum);
+}
+}
+if (realINum != 0) {
+if (strb.length() != 0) {
+if (realINum > 0) {
+strb.append("+");
+}
+}
+
+if (realINum != 1 && realINum != -1) {
+if (isDoubleAnInt(realINum)) {
+strb.append(new Double(realINum).intValue());
+} else {
+strb.append(realINum);
+}
+}
+
+strb.append(suffixValue);
+}
+
+return new StringEval(strb.toString());
+}
+
+/

svn commit: r1488733 - in /poi/trunk/src: java/org/apache/poi/ss/formula/functions/ testcases/org/apache/poi/ss/formula/functions/

2013-06-02 Thread yegor
Author: yegor
Date: Sun Jun  2 15:58:41 2013
New Revision: 1488733

URL: http://svn.apache.org/r1488733
Log:
Bugzilla 55041: CODE function support, also removed @Override from interfaces 
to stay compatible with JDK 1.5

Added:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Code.java
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestCode.java
Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Dec2Hex.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Delta.java

Added: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Code.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Code.java?rev=1488733&view=auto
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Code.java (added)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Code.java Sun Jun  2 
15:58:41 2013
@@ -0,0 +1,37 @@
+package org.apache.poi.ss.formula.functions;
+
+import org.apache.poi.ss.formula.eval.*;
+
+/**
+ * Implementation for Excel CODE () function.
+ * 
+ * Syntax: CODE   (text )
+ * 
+ * Returns a numeric code for the first character in a text string. The 
returned code corresponds to the character set used by your computer.
+ * 
+ * text The text for which you want the code of the first character.
+ *
+ * @author cedric dot walter @ gmail dot com
+ */
+public class Code extends Fixed1ArgFunction {
+
+public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval 
textArg) {
+
+ValueEval veText1;
+try {
+veText1 = OperandResolver.getSingleValue(textArg, srcRowIndex, 
srcColumnIndex);
+} catch (EvaluationException e) {
+return e.getErrorEval();
+}
+String text = OperandResolver.coerceValueToString(veText1);
+
+if (text.length() == 0) {
+return ErrorEval.VALUE_INVALID;
+}
+
+int code = (int)text.charAt(0);
+
+return new StringEval(String.valueOf(code));
+}
+}
+

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Dec2Hex.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Dec2Hex.java?rev=1488733&r1=1488732&r2=1488733&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Dec2Hex.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Dec2Hex.java Sun Jun 
 2 15:58:41 2013
@@ -17,6 +17,7 @@
 
 package org.apache.poi.ss.formula.functions;
 
+import org.apache.poi.ss.formula.OperationEvaluationContext;
 import org.apache.poi.ss.formula.eval.*;
 
 /**
@@ -51,13 +52,12 @@ import org.apache.poi.ss.formula.eval.*;
  *
  * @author cedric dot walter @ gmail dot com
  */
-public final class Dec2Hex extends Var1or2ArgFunction {
+public final class Dec2Hex extends Var1or2ArgFunction implements 
FreeRefFunction {
 
 private final static long MIN_VALUE = new 
Long("-549755813888").longValue();
 private final static long MAX_VALUE = new Long("549755813887").longValue();
 private final static int DEFAULT_PLACES_VALUE = 10;;
 
-@Override
 public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval 
number, ValueEval places) {
 ValueEval veText1;
 try {
@@ -115,8 +115,15 @@ public final class Dec2Hex extends Var1o
 return new StringEval(hex.toUpperCase());
 }
 
-@Override
 public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval 
arg0) {
 return this.evaluate(srcRowIndex, srcColumnIndex, arg0, new 
StringEval(String.valueOf(DEFAULT_PLACES_VALUE)));
 }
+
+public ValueEval evaluate(ValueEval[] args, OperationEvaluationContext ec) 
{
+if (args.length != 2) {
+return ErrorEval.VALUE_INVALID;
+}
+return evaluate(ec.getRowIndex(), ec.getColumnIndex(), args[0], 
args[1]);
+}
+
 }
\ No newline at end of file

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Delta.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Delta.java?rev=1488733&r1=1488732&r2=1488733&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Delta.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Delta.java Sun Jun  
2 15:58:41 2013
@@ -42,7 +42,6 @@ public final class Delta extends Fixed2A
 private final static NumberEval ONE = new NumberEval(1);
 private final static NumberEval ZERO = new NumberEval(0);
 
-@Override
 public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval 
arg1, ValueEval arg2) {
 ValueEval veText1;
 try {

Added: poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/Test

svn commit: r1488730 - in /poi/trunk/src: java/org/apache/poi/ss/formula/functions/Delta.java testcases/org/apache/poi/ss/formula/functions/TestDelta.java

2013-06-02 Thread yegor
Author: yegor
Date: Sun Jun  2 15:30:58 2013
New Revision: 1488730

URL: http://svn.apache.org/r1488730
Log:
Bugzilla 55037: DELTA function support

Added:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Delta.java
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestDelta.java

Added: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Delta.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Delta.java?rev=1488730&view=auto
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Delta.java (added)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Delta.java Sun Jun  
2 15:30:58 2013
@@ -0,0 +1,76 @@
+/* 
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ */
+
+package org.apache.poi.ss.formula.functions;
+
+import org.apache.poi.ss.formula.eval.*;
+
+import java.math.BigDecimal;
+
+/**
+ * Implementation for Excel DELTA() function.
+ * 
+ * Syntax: DELTA (number1,number2 )
+ * 
+ * Tests whether two values are equal. Returns 1 if number1 = number2; returns 
0 otherwise.
+ * Use this function to filter a set of values. For example, by summing 
several DELTA functions
+ * you calculate the count of equal pairs. This function is also known as the 
Kronecker Delta function.
+ *
+ * 
+ * If number1 is nonnumeric, DELTA returns the #VALUE! error 
value.
+ * If number2 is nonnumeric, DELTA returns the #VALUE! error 
value.
+ * 
+ *
+ * @author cedric dot walter @ gmail dot com
+ */
+public final class Delta extends Fixed2ArgFunction {
+
+private final static NumberEval ONE = new NumberEval(1);
+private final static NumberEval ZERO = new NumberEval(0);
+
+@Override
+public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval 
arg1, ValueEval arg2) {
+ValueEval veText1;
+try {
+veText1 = OperandResolver.getSingleValue(arg1, srcRowIndex, 
srcColumnIndex);
+} catch (EvaluationException e) {
+return e.getErrorEval();
+}
+String strText1 = OperandResolver.coerceValueToString(veText1);
+Double number1 = OperandResolver.parseDouble(strText1);
+if (number1 == null) {
+return ErrorEval.VALUE_INVALID;
+}
+
+ValueEval veText2;
+try {
+veText2 = OperandResolver.getSingleValue(arg2, srcRowIndex, 
srcColumnIndex);
+} catch (EvaluationException e) {
+return e.getErrorEval();
+}
+
+String strText2 = OperandResolver.coerceValueToString(veText2);
+Double number2 = OperandResolver.parseDouble(strText2);
+if (number2 == null) {
+return ErrorEval.VALUE_INVALID;
+}
+
+int result = new BigDecimal(number1.doubleValue()).compareTo(new 
BigDecimal(number2.doubleValue()));
+return result == 0 ? ONE : ZERO;
+}
+
+}
\ No newline at end of file

Added: 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestDelta.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestDelta.java?rev=1488730&view=auto
==
--- poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestDelta.java 
(added)
+++ poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestDelta.java 
Sun Jun  2 15:30:58 2013
@@ -0,0 +1,63 @@
+/* 
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable

svn commit: r1488729 - in /poi/trunk/src: java/org/apache/poi/hssf/usermodel/ java/org/apache/poi/ss/formula/functions/ java/org/apache/poi/util/ testcases/org/apache/poi/ss/formula/functions/

2013-06-02 Thread yegor
Author: yegor
Date: Sun Jun  2 15:13:47 2013
New Revision: 1488729

URL: http://svn.apache.org/r1488729
Log:
Bugzilla 55036 - Dec2HEx formula support

Added:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Dec2Hex.java
poi/trunk/src/java/org/apache/poi/util/Configurator.java
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestDec2Hex.java
Modified:
poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java
poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java

poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/BaseTestFunctionsFromSpreadsheet.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java?rev=1488729&r1=1488728&r2=1488729&view=diff
==
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java Sun Jun  2 
15:13:47 2013
@@ -27,6 +27,7 @@ import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.CellStyle;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.SpreadsheetVersion;
+import org.apache.poi.util.Configurator;
 
 /**
  * High level representation of a row of a spreadsheet.
@@ -39,7 +40,7 @@ import org.apache.poi.ss.SpreadsheetVers
 public final class HSSFRow implements Row {
 
 // used for collections
-public final static int INITIAL_CAPACITY = 5;
+public final static int INITIAL_CAPACITY = 
Configurator.getIntValue("HSSFRow.ColInitialCapacity", 5);
 
 private int rowNum;
 private HSSFCell[] cells;

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java?rev=1488729&r1=1488728&r2=1488729&view=diff
==
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java Sun Jun  2 
15:13:47 2013
@@ -50,6 +50,7 @@ import org.apache.poi.ss.util.CellRangeA
 import org.apache.poi.ss.util.CellReference;
 import org.apache.poi.ss.util.SSCellRange;
 import org.apache.poi.ss.util.SheetUtil;
+import org.apache.poi.util.Configurator;
 import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
 
@@ -74,7 +75,7 @@ public final class HSSFSheet implements 
  * rows.  It is currently set to 20.  If you generate larger sheets you 
may benefit
  * by setting this to a higher number and recompiling a custom edition of 
HSSFSheet.
  */
-public final static int INITIAL_CAPACITY = 20;
+public final static int INITIAL_CAPACITY = 
Configurator.getIntValue("HSSFSheet.RowInitialCapacity", 20);
 
 /**
  * reference to the low level {@link InternalSheet} object

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java?rev=1488729&r1=1488728&r2=1488729&view=diff
==
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java Sun Jun  
2 15:13:47 2013
@@ -29,6 +29,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.regex.Pattern;
 
+import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.poi.POIDocument;
 import org.apache.poi.ddf.EscherBSERecord;
 import org.apache.poi.ddf.EscherBitmapBlip;
@@ -54,9 +55,9 @@ import org.apache.poi.ss.formula.udf.UDF
 import org.apache.poi.ss.usermodel.Row.MissingCellPolicy;
 import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.ss.util.WorkbookUtil;
+import org.apache.poi.util.Configurator;
 import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
-import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.poi.ss.formula.udf.IndexedUDFFinder;
 
 
@@ -93,7 +94,7 @@ public final class HSSFWorkbook extends 
  * since you're never allowed to have more or less than three sheets!
  */
 
-public final static int INITIAL_CAPACITY = 3;
+public final static int INITIAL_CAPACITY = 
Configurator.getIntValue("HSSFWorkbook.SheetInitialCapacity",3);
 
 /**
  * this is the reference to the low level Workbook object

Added: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Dec2Hex.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Dec2Hex.java?rev=1488729&view=auto

svn commit: r1457245 - /poi/site/src/documentation/content/xdocs/status.xml

2013-03-16 Thread yegor
Author: yegor
Date: Sat Mar 16 13:06:42 2013
New Revision: 1457245

URL: http://svn.apache.org/r1457245
Log:
added BUg 54673 to status.xml

Modified:
poi/site/src/documentation/content/xdocs/status.xml

Modified: poi/site/src/documentation/content/xdocs/status.xml
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/status.xml?rev=1457245&r1=1457244&r2=1457245&view=diff
==
--- poi/site/src/documentation/content/xdocs/status.xml (original)
+++ poi/site/src/documentation/content/xdocs/status.xml Sat Mar 16 13:06:42 2013
@@ -34,6 +34,7 @@
 
 
 
+  54673 - Simple wildcard 
support in HLOOKUP, VOOLKUP, MATCH, COUNTIF 
   54625 - Register 
user-defined functions in instance scope instead of static 
   54469 - Support for 
financial functions IPMT and PPMT 
   54407 - Avoid 
XmlValueDisconnectedException when merging slides 



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1452196 - in /poi/site: publish/ publish/hpbf/ publish/hpsf/ publish/hwpf/ publish/poifs/ publish/skin/ publish/slideshow/ src/documentation/content/xdocs/

2013-03-03 Thread yegor
Author: yegor
Date: Mon Mar  4 06:43:29 2013
New Revision: 1452196

URL: http://svn.apache.org/r1452196
Log:
recent changes in status.xml

Modified:
poi/site/publish/changes.html
poi/site/publish/changes.rss
poi/site/publish/hpbf/file-format.html
poi/site/publish/hpbf/file-format.xml
poi/site/publish/hpsf/thumbnails.html
poi/site/publish/hwpf/quick-guide.html
poi/site/publish/poifs/usecases.html
poi/site/publish/skin/mysite.css
poi/site/publish/skin/print.css
poi/site/publish/skin/site.css
poi/site/publish/skin/tigris.css
poi/site/publish/slideshow/ppt-file-format.html
poi/site/src/documentation/content/xdocs/status.xml

Modified: poi/site/publish/changes.html
URL: 
http://svn.apache.org/viewvc/poi/site/publish/changes.html?rev=1452196&r1=1452195&r2=1452196&view=diff
==
--- poi/site/publish/changes.html (original)
+++ poi/site/publish/changes.html Mon Mar  4 06:43:29 2013
@@ -255,6 +255,33 @@ if (VERSION > 3) {
 
   
 
+54625 - Register user-defined 
functions in instance scope instead of static (poi-developers)
+  
+
+54469 - Support for financial 
functions IPMT and PPMT (poi-developers)
+  
+
+54407 - Avoid 
XmlValueDisconnectedException when merging slides (poi-developers)
+  
+
+54356 - Support of 
statistical function SLOPE(poi-developers)
+  
+
+54403 - Support of 
statistical function INTERCEPT(poi-developers)
+  
+
+54557 - Don't mis-detect 
format patterns like .000 as dates(poi-developers)
+  
+
+54506 - Support unusual .xls 
files with a BOOK directory entry (normally it is Workbook)(poi-developers)
+  
+
+54508 - EDATE formula 
support(poi-developers)
+  
+
+53810 - NPOIFS fix for 0 not 
-1 padded partially used XBATs(poi-developers)
+  
+
 54402 - IfError handling of 
indirect references(poi-developers)
   
 

Modified: poi/site/publish/changes.rss
URL: 
http://svn.apache.org/viewvc/poi/site/publish/changes.rss?rev=1452196&r1=1452195&r2=1452196&view=diff
==
Binary files - no diff available.

Modified: poi/site/publish/hpbf/file-format.html
URL: 
http://svn.apache.org/viewvc/poi/site/publish/hpbf/file-format.html?rev=1452196&r1=1452195&r2=1452196&view=diff
==
--- poi/site/publish/hpbf/file-format.html (original)
+++ poi/site/publish/hpbf/file-format.html Mon Mar  4 06:43:29 2013
@@ -76,23 +76,18 @@ if (VERSION > 3) {
 
 
 Apache POI
-
 
 Top
 
-
 
 
 HPBF
-
 
 Overview
 
-
 
 File Format
 
-   
 
 
 

Modified: poi/site/publish/hpbf/file-format.xml
URL: 
http://svn.apache.org/viewvc/poi/site/publish/hpbf/file-format.xml?rev=1452196&r1=1452195&r2=1452196&view=diff
==
Binary files - no diff available.

Modified: poi/site/publish/hpsf/thumbnails.html
URL: 
http://svn.apache.org/viewvc/poi/site/publish/hpsf/thumbnails.html?rev=1452196&r1=1452195&r2=1452196&view=diff
==
--- poi/site/publish/hpsf/thumbnails.html (original)
+++ poi/site/publish/hpsf/thumbnails.html Mon Mar  4 06:43:29 2013
@@ -76,35 +76,27 @@ if (VERSION > 3) {
 
 
 Apache POI
-
 
 Top
 
-  
 
 
 HPSF
-
 
 Overview
 
-
 
 How To
 
-
 
 Thumbnails
 
-
 
 Internals
 
-
 
 To Do
 
-  
 
 
 

Modified: poi/site/publish/hwpf/quick-guide.html
URL: 
http://svn.apache.org/viewvc/poi/site/publish/hwpf/quick-guide.html?rev=1452196&r1=1452195&r2=1452196&view=diff
==
--- poi/site/publish/hwpf/quick-guide.html (original)
+++ poi/site/publish/hwpf/quick-guide.html Mon Mar  4 06:43:29 2013
@@ -76,24 +76,31 @@ if (VERSION > 3) {
 
 
 Apache POI
+   
 
 Top
 
+   
 
 
 HWPF
+   
 
 Overview
 
+   
 
 Quick Guide
 
+   
 
 HWPF Format
 
+   
 
 HWPF Project plan
 
+   
 
 
 

Modified: poi/site/publish/poifs/usecases.html
URL: 
http://svn.apache.org/viewvc/poi/site/publish/poifs/usecases.html?rev=1452196&r1=1452195&r2=1452196&view=diff
==
--- poi/site/publish/poifs/usecases.html (original)
+++ poi/site/publish/poifs/usecases.html Mon Mar  4 06:43:29 2013
@@ -76,27 +76,35 @@ if (VERSION > 3) {
 
 
 Apache POI
+
 
 Top
 
+  
 
 
 POIFS
+
 
 Overview
 
+
 
 How To
 
+
 
 Embeded Documents
 
+
 
 File System Documentation
 
+
 
 Use Cases
 
+  
 
 
 

Modified: poi/site/publish/skin/mysite.css
URL: 
h

svn commit: r1452060 - in /poi/trunk/src: java/org/apache/poi/hssf/usermodel/ java/org/apache/poi/ss/formula/udf/ ooxml/java/org/apache/poi/xssf/model/ ooxml/java/org/apache/poi/xssf/usermodel/

2013-03-03 Thread yegor
Author: yegor
Date: Sun Mar  3 16:16:12 2013
New Revision: 1452060

URL: http://svn.apache.org/r1452060
Log:
Bugzilla 54625 - Register user-defined functions in instance scope instead of 
static

Added:
poi/trunk/src/java/org/apache/poi/ss/formula/udf/IndexedUDFFinder.java
  - copied, changed from r1451872, 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/IndexedUDFFinder.java
poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/IndexedUDFFinder.java
Modified:
poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java

poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationWorkbook.java
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java?rev=1452060&r1=1452059&r2=1452060&view=diff
==
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java Sun Mar  
3 16:16:12 2013
@@ -57,6 +57,7 @@ import org.apache.poi.ss.util.WorkbookUt
 import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
 import org.apache.commons.codec.digest.DigestUtils;
+import org.apache.poi.ss.formula.udf.IndexedUDFFinder;
 
 
 /**
@@ -145,7 +146,7 @@ public final class HSSFWorkbook extends 
  * The locator of user-defined functions.
  * By default includes functions from the Excel Analysis Toolpack
  */
-private UDFFinder _udfFinder = UDFFinder.DEFAULT;
+private UDFFinder _udfFinder = new IndexedUDFFinder(UDFFinder.DEFAULT);
 
 public static HSSFWorkbook create(InternalWorkbook book) {
return new HSSFWorkbook(book);

Copied: poi/trunk/src/java/org/apache/poi/ss/formula/udf/IndexedUDFFinder.java 
(from r1451872, 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/IndexedUDFFinder.java)
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/udf/IndexedUDFFinder.java?p2=poi/trunk/src/java/org/apache/poi/ss/formula/udf/IndexedUDFFinder.java&p1=poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/IndexedUDFFinder.java&r1=1451872&r2=1452060&rev=1452060&view=diff
==
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/IndexedUDFFinder.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/udf/IndexedUDFFinder.java Sun 
Mar  3 16:16:12 2013
@@ -14,11 +14,9 @@
See the License for the specific language governing permissions and
limitations under the License.
  */
-package org.apache.poi.xssf.model;
+package org.apache.poi.ss.formula.udf;
 
 import org.apache.poi.ss.formula.functions.FreeRefFunction;
-import org.apache.poi.ss.formula.udf.AggregatingUDFFinder;
-import org.apache.poi.ss.formula.udf.UDFFinder;
 import org.apache.poi.util.Internal;
 
 import java.util.HashMap;
@@ -29,7 +27,7 @@ import java.util.HashMap;
  * @author Yegor Kozlov
  */
 @Internal
-public final class IndexedUDFFinder extends AggregatingUDFFinder {
+public class IndexedUDFFinder extends AggregatingUDFFinder {
 private final HashMap _funcMap;
 
 public IndexedUDFFinder(UDFFinder... usedToolPacks) {

Added: poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/IndexedUDFFinder.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/IndexedUDFFinder.java?rev=1452060&view=auto
==
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/IndexedUDFFinder.java 
(added)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/IndexedUDFFinder.java 
Sun Mar  3 16:16:12 2013
@@ -0,0 +1,37 @@
+/*
+ *  
+ *Licensed to the Apache Software Foundation (ASF) under one or more
+ *contributor license agreements.  See the NOTICE file distributed with
+ *this work for additional information regarding copyright ownership.
+ *The ASF licenses this file to You under the Apache License, Version 2.0
+ *(the "License"); you may not use this file except in compliance with
+ *the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing, software
+ *distributed under the License is distributed on an "AS IS" BASIS,
+ *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *See the License for the specific language governing permissions and
+ *limitations under the License.
+ * =

svn commit: r1451886 - in /poi/trunk: src/java/org/apache/poi/ss/formula/eval/ src/java/org/apache/poi/ss/formula/functions/ src/testcases/org/apache/poi/ss/formula/functions/ test-data/spreadsheet/

2013-03-02 Thread yegor
Author: yegor
Date: Sat Mar  2 13:17:53 2013
New Revision: 1451886

URL: http://svn.apache.org/r1451886
Log:
Bugzilla 54469 - Support for financial functions IPMT and PPMT

Added:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Finance.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/IPMT.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/PPMT.java
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestIPMT.java
  - copied, changed from r1451872, 
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestSumifs.java
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestPPMT.java
poi/trunk/test-data/spreadsheet/finance.xls   (with props)
Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java
poi/trunk/test-data/spreadsheet/FormulaEvalTestData.xls

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java?rev=1451886&r1=1451885&r2=1451886&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java Sat Mar 
 2 13:17:53 2013
@@ -161,6 +161,8 @@ public final class FunctionEval {
 
retval[ID.INDIRECT] = null; // Indirect.evaluate has different 
signature
 retval[162] = TextFunction.CLEAN;  //Aniket Banerjee
+retval[167] = new IPMT();
+retval[168] = new PPMT();
retval[169] = new Counta();
 
retval[183] = AggregateFunction.PRODUCT;

Added: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Finance.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Finance.java?rev=1451886&view=auto
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Finance.java (added)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Finance.java Sat Mar 
 2 13:17:53 2013
@@ -0,0 +1,155 @@
+package org.apache.poi.ss.formula.functions;
+
+
+/**
+  * Implementation of the financial functions pmt, fv, ppmt, ipmt.
+  * 
+  * @author Mike Argyriou mich...@gmail.com
+  */
+public class Finance {
+
+   /**
+ * Emulates Excel/Calc's PMT(interest_rate, number_payments, PV, FV, Type)
+ * function, which calculates the payments for a loan or the future value 
of an investment
+ * 
+ * @param r
+ *- periodic interest rate represented as a decimal.
+ * @param nper
+ *- number of total payments / periods.
+ * @param pv
+ *- present value -- borrowed or invested principal.
+ * @param fv
+ *- future value of loan or annuity.
+ * @param type
+ *- when payment is made: beginning of period is 1; end, 0.
+ * @return double representing periodic payment amount.
+ */
+   // http://arachnoid.com/lutusp/finance.html
+   static public double pmt(double r, int nper, double pv, double fv, int 
type) {
+   double pmt = -r * (pv * Math.pow(1 + r, nper) + fv) / ((1 + r*type) 
* (Math.pow(1 + r, nper) - 1));
+   return pmt;
+   }
+
+
+   /**
+ * Overloaded pmt() call omitting type, which defaults to 0.
+ * 
+ * @see #pmt(double, int, double, double, int)
+ */
+   static public double pmt(double r, int nper, double pv, double fv) {
+   return pmt(r, nper, pv, fv, 0);
+   }
+   
+   /**
+ * Overloaded pmt() call omitting fv and type, which both default to 0.
+ * 
+ * @see #pmt(double, int, double, double, int)
+ */
+   static public double pmt(double r, int nper, double pv) {
+   return pmt(r, nper, pv, 0);
+   }
+   
+   
+   /**
+ * Emulates Excel/Calc's IPMT(interest_rate, period, number_payments, PV,
+ * FV, Type) function, which calculates the portion of the payment at a
+ * given period that is the interest on previous balance.
+ * 
+ * @param r
+ *- periodic interest rate represented as a decimal.
+ * @param per
+ *- period (payment number) to check value at.
+ * @param nper
+ *- number of total payments / periods.
+ * @param pv
+ *- present value -- borrowed or invested principal.
+ * @param fv
+ *- future value of loan or annuity.
+ * @param type
+ *- when payment is made: beginning of period is 1; end, 0.
+ * @return double representing interest portion of payment.
+ * 
+ * @see #pmt(double, int, double, double, int)
+ * @see #fv(double, int, double, double, int)
+ */
+   // 
http://doc.optadata.com/en/dokumentation/applic

svn commit: r1451875 - in /poi/trunk: src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java src/resources/main/org/apache/poi/ss/formula/function/functionMetadata.txt test-data/spreadshe

2013-03-02 Thread yegor
Author: yegor
Date: Sat Mar  2 11:38:09 2013
New Revision: 1451875

URL: http://svn.apache.org/r1451875
Log:
Bugzilla 54436: Fixed metadata for GETPIVOTDATA function

Added:
poi/trunk/test-data/spreadsheet/54436.xlsx   (with props)
Modified:

poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java

poi/trunk/src/resources/main/org/apache/poi/ss/formula/function/functionMetadata.txt

Modified: 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java?rev=1451875&r1=1451874&r2=1451875&view=diff
==
--- 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java 
(original)
+++ 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java 
Sat Mar  2 11:38:09 2013
@@ -26,6 +26,10 @@ import org.apache.poi.hssf.usermodel.HSS
 import org.apache.poi.openxml4j.opc.OPCPackage;
 import org.apache.poi.openxml4j.opc.PackagePart;
 import org.apache.poi.openxml4j.opc.PackagingURIHelper;
+import org.apache.poi.ss.formula.WorkbookEvaluator;
+import org.apache.poi.ss.formula.eval.ErrorEval;
+import org.apache.poi.ss.formula.eval.ValueEval;
+import org.apache.poi.ss.formula.functions.Function;
 import org.apache.poi.ss.usermodel.BaseTestBugzillaIssues;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.CellStyle;
@@ -1339,4 +1343,17 @@ public final class TestXSSFBugs extends 
 assertEquals(259.0, a1Value, 0.0);
 }
 
+public void test54436(){
+Workbook workbook = 
XSSFTestDataSamples.openSampleWorkbook("54436.xlsx");
+
if(!WorkbookEvaluator.getSupportedFunctionNames().contains("GETPIVOTDATA")){
+Function func = new Function() {
+public ValueEval evaluate(ValueEval[] args, int srcRowIndex, 
int srcColumnIndex) {
+return ErrorEval.NA;
+}
+};
+
+WorkbookEvaluator.registerFunction("GETPIVOTDATA", func);
+}
+workbook.getCreationHelper().createFormulaEvaluator().evaluateAll();
+}
 }

Modified: 
poi/trunk/src/resources/main/org/apache/poi/ss/formula/function/functionMetadata.txt
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/resources/main/org/apache/poi/ss/formula/function/functionMetadata.txt?rev=1451875&r1=1451874&r2=1451875&view=diff
==
--- 
poi/trunk/src/resources/main/org/apache/poi/ss/formula/function/functionMetadata.txt
 (original)
+++ 
poi/trunk/src/resources/main/org/apache/poi/ss/formula/function/functionMetadata.txt
 Sat Mar  2 11:38:09 2013
@@ -271,13 +271,13 @@
 350ISPMT   4   4   V   V V V V 
 351DATEDIF 3   3   V   V V V   
 352DATESTRING  1   1   V   V   
-353NUMBERSTRING2   2   V   V V 
-354ROMAN   1   2   V   V V 
-# New Built-In Sheet Functions in BIFF8
-358GETPIVOTDATA2   30  
-359HYPERLINK   1   2   V   V V 
-360PHONETIC1   1   V   R   
-361AVERAGEA1   30  V   R ...   
+353NUMBERSTRING2   2   V   V V 
+354ROMAN   1   2   V   V V 
+# New Built-In Sheet Functions in BIFF8
+358GETPIVOTDATA2   30  V   V R ... 
+359HYPERLINK   1   2   V   V V 
+360PHONETIC1   1   V   R   
+361AVERAGEA1   30  V   R ...   
 362MAXA1   30  V   R ...   
 363MINA1   30  V   R ...   
 364STDEVPA 1   30  V   R ...   

Added: poi/trunk/test-data/spreadsheet/54436.xlsx
URL: 
http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/54436.xlsx?rev=1451875&view=auto
==
Binary file - no diff available.

Propchange: poi/trunk/test-data/spreadsheet/54436.xlsx
--
svn:mime-type = application/vnd.ms-excel



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1437306 - /poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java

2013-01-23 Thread yegor
Author: yegor
Date: Wed Jan 23 09:14:14 2013
New Revision: 1437306

URL: http://svn.apache.org/viewvc?rev=1437306&view=rev
Log:
one more fix related to Bugzilla 54407

Modified:
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java?rev=1437306&r1=1437305&r2=1437306&view=diff
==
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java Wed 
Jan 23 09:14:14 2013
@@ -346,6 +346,7 @@ public abstract class XSLFSheet extends 
 _spTree = null;
 _drawing = null;
 _spTree = null;
+_placeholders = null;
 
 // recursively update each shape
 List tgtShapes = getShapeList();



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1436913 - in /poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel: XSLFGraphicFrame.java XSLFSheet.java

2013-01-22 Thread yegor
Author: yegor
Date: Tue Jan 22 13:37:14 2013
New Revision: 1436913

URL: http://svn.apache.org/viewvc?rev=1436913&view=rev
Log:
Bugzilla 54407 - Avoid XmlValueDisconnectedException when merging slides 

Modified:
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java?rev=1436913&r1=1436912&r2=1436913&view=diff
==
--- 
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java 
(original)
+++ 
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java 
Tue Jan 22 13:37:14 2013
@@ -19,13 +19,21 @@
 
 package org.apache.poi.xslf.usermodel;
 
+import org.apache.poi.POIXMLException;
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
+import org.apache.poi.openxml4j.opc.PackagePart;
+import org.apache.poi.openxml4j.opc.PackageRelationship;
 import org.apache.poi.util.Beta;
 import org.apache.poi.util.Units;
+import org.apache.xmlbeans.XmlCursor;
+import org.apache.xmlbeans.XmlObject;
+import org.openxmlformats.schemas.drawingml.x2006.main.CTGraphicalObjectData;
 import org.openxmlformats.schemas.drawingml.x2006.main.CTPoint2D;
 import org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D;
 import org.openxmlformats.schemas.drawingml.x2006.main.CTTransform2D;
 import 
org.openxmlformats.schemas.presentationml.x2006.main.CTGraphicalObjectFrame;
 
+import javax.xml.namespace.QName;
 import java.awt.Graphics2D;
 import java.awt.geom.Rectangle2D;
 
@@ -151,5 +159,54 @@ public class XSLFGraphicFrame extends XS
 
 }
 
+@Override
+void copy(XSLFShape sh){
+super.copy(sh);
+
+CTGraphicalObjectData data = _shape.getGraphic().getGraphicData();
+String uri = data.getUri();
+
if(uri.equals("http://schemas.openxmlformats.org/drawingml/2006/diagram";)){
+copyDiagram(data, (XSLFGraphicFrame)sh);
+} else {
+// TODO  support other types of objects
+
+}
+}
+
+// TODO should be moved to a sub-class
+private void copyDiagram(CTGraphicalObjectData objData, XSLFGraphicFrame 
srcShape){
+String xpath = "declare namespace 
dgm='http://schemas.openxmlformats.org/drawingml/2006/diagram' 
$this//dgm:relIds";
+XmlObject[] obj = objData.selectPath(xpath);
+if(obj != null && obj.length == 1){
+XmlCursor c = obj[0].newCursor();
+
+XSLFSheet sheet = srcShape.getSheet();
+try {
+String dm = c.getAttributeText(new 
QName("http://schemas.openxmlformats.org/officeDocument/2006/relationships";, 
"dm"));
+PackageRelationship dmRel = 
sheet.getPackagePart().getRelationship(dm);
+PackagePart dmPart = 
sheet.getPackagePart().getRelatedPart(dmRel);
+_sheet.importPart(dmRel, dmPart);
+
+String lo = c.getAttributeText(new 
QName("http://schemas.openxmlformats.org/officeDocument/2006/relationships";, 
"lo"));
+PackageRelationship loRel = 
sheet.getPackagePart().getRelationship(lo);
+PackagePart loPart = 
sheet.getPackagePart().getRelatedPart(loRel);
+_sheet.importPart(loRel, loPart);
+
+String qs = c.getAttributeText(new 
QName("http://schemas.openxmlformats.org/officeDocument/2006/relationships";, 
"qs"));
+PackageRelationship qsRel = 
sheet.getPackagePart().getRelationship(qs);
+PackagePart qsPart = 
sheet.getPackagePart().getRelatedPart(qsRel);
+_sheet.importPart(qsRel, qsPart);
+
+String cs = c.getAttributeText(new 
QName("http://schemas.openxmlformats.org/officeDocument/2006/relationships";, 
"cs"));
+PackageRelationship csRel = 
sheet.getPackagePart().getRelationship(cs);
+PackagePart csPart = 
sheet.getPackagePart().getRelatedPart(csRel);
+_sheet.importPart(csRel, csPart);
+
+} catch (InvalidFormatException e){
+throw new POIXMLException(e);
+}
+c.dispose();
+}
+}
 
 }
\ No newline at end of file

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java?rev=1436913&r1=1436912&r2=1436913&view=diff
==
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java 
(original)
+++ poi/trunk/src/ooxm

svn commit: r1436888 - in /poi/trunk/src/java/org/apache/poi/ss/formula/functions: Intercept.java Slope.java

2013-01-22 Thread yegor
Author: yegor
Date: Tue Jan 22 13:02:39 2013
New Revision: 1436888

URL: http://svn.apache.org/viewvc?rev=1436888&view=rev
Log:
keep javac on JDK 1.5 happy

Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Intercept.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Slope.java

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Intercept.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Intercept.java?rev=1436888&r1=1436887&r2=1436888&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Intercept.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Intercept.java Tue 
Jan 22 13:02:39 2013
@@ -40,7 +40,6 @@ public final class Intercept extends Fix
func = new LinearRegressionFunction(FUNCTION.INTERCEPT);
}

-   @Override
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex,
ValueEval arg0, ValueEval arg1) {
return func.evaluate(srcRowIndex, srcColumnIndex, arg0, arg1);

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Slope.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Slope.java?rev=1436888&r1=1436887&r2=1436888&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Slope.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Slope.java Tue Jan 
22 13:02:39 2013
@@ -40,7 +40,6 @@ public final class Slope extends Fixed2A
func = new LinearRegressionFunction(FUNCTION.SLOPE);
}

-   @Override
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex,
ValueEval arg0, ValueEval arg1) {
return func.evaluate(srcRowIndex, srcColumnIndex, arg0, arg1);



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1436819 - /poi/trunk/src/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java

2013-01-22 Thread yegor
Author: yegor
Date: Tue Jan 22 09:35:39 2013
New Revision: 1436819

URL: http://svn.apache.org/viewvc?rev=1436819&view=rev
Log:
keep javac on JDK 1.5 happy

Modified:

poi/trunk/src/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java

Modified: 
poi/trunk/src/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java?rev=1436819&r1=1436818&r2=1436819&view=diff
==
--- 
poi/trunk/src/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java
 (original)
+++ 
poi/trunk/src/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java
 Tue Jan 22 09:35:39 2013
@@ -47,7 +47,7 @@ public final class LinearRegressionFunct
protected ValueArray(int size) {
_size = size;
}
-   @Override
+
public ValueEval getItem(int index) {
if (index < 0 || index > _size) {
throw new IllegalArgumentException("Specified 
index " + index
@@ -56,7 +56,7 @@ public final class LinearRegressionFunct
return getItemInternal(index);
}
protected abstract ValueEval getItemInternal(int index);
-   @Override
+
public final int getSize() {
return _size;
}
@@ -110,7 +110,6 @@ public final class LinearRegressionFunct
this.function = function;
}

-   @Override
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex,
ValueEval arg0, ValueEval arg1) {
double result;



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1436608 - in /poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel: XSLFPictureData.java XSLFPictureShape.java XSLFRelation.java

2013-01-21 Thread yegor
Author: yegor
Date: Mon Jan 21 20:46:32 2013
New Revision: 1436608

URL: http://svn.apache.org/viewvc?rev=1436608&view=rev
Log:
fix exception when calling importContent, see Bugzilla 54407

Modified:
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFRelation.java

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java?rev=1436608&r1=1436607&r2=1436608&view=diff
==
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java 
Mon Jan 21 20:46:32 2013
@@ -93,12 +93,17 @@ public final class XSLFPictureData exten
 public static final int PICTURE_TYPE_WPG = 12;
 
 /**
+ * Microsoft Windows Media Photo image (.wdp)
+ */
+public static final int PICTURE_TYPE_WDP = 13;
+
+/**
  * Relationships for each known picture type
  */
 protected static final POIXMLRelation[] RELATIONS;
 
 static {
-RELATIONS = new POIXMLRelation[13];
+RELATIONS = new POIXMLRelation[14];
 RELATIONS[PICTURE_TYPE_EMF] = XSLFRelation.IMAGE_EMF;
 RELATIONS[PICTURE_TYPE_WMF] = XSLFRelation.IMAGE_WMF;
 RELATIONS[PICTURE_TYPE_PICT] = XSLFRelation.IMAGE_PICT;
@@ -110,6 +115,7 @@ public final class XSLFPictureData exten
 RELATIONS[PICTURE_TYPE_EPS] = XSLFRelation.IMAGE_EPS;
 RELATIONS[PICTURE_TYPE_BMP] = XSLFRelation.IMAGE_BMP;
 RELATIONS[PICTURE_TYPE_WPG] = XSLFRelation.IMAGE_WPG;
+RELATIONS[PICTURE_TYPE_WDP] = XSLFRelation.IMAGE_WDP;
 }
 
 private Long checksum = null;

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java?rev=1436608&r1=1436607&r2=1436608&view=diff
==
--- 
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java 
(original)
+++ 
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java 
Mon Jan 21 20:46:32 2013
@@ -23,17 +23,15 @@ import org.apache.poi.POIXMLException;
 import org.apache.poi.openxml4j.opc.PackagePart;
 import org.apache.poi.openxml4j.opc.PackageRelationship;
 import org.apache.poi.util.Beta;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTBlip;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTBlipFillProperties;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTPresetGeometry2D;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties;
-import org.openxmlformats.schemas.drawingml.x2006.main.STShapeType;
+import org.apache.xmlbeans.XmlCursor;
+import org.apache.xmlbeans.XmlObject;
+import org.openxmlformats.schemas.drawingml.x2006.main.*;
 import 
org.openxmlformats.schemas.presentationml.x2006.main.CTApplicationNonVisualDrawingProps;
 import org.openxmlformats.schemas.presentationml.x2006.main.CTPicture;
 import org.openxmlformats.schemas.presentationml.x2006.main.CTPictureNonVisual;
 
 import javax.imageio.ImageIO;
+import javax.xml.namespace.QName;
 import java.awt.Graphics2D;
 import java.awt.geom.Rectangle2D;
 import java.awt.image.BufferedImage;
@@ -153,6 +151,21 @@ public class XSLFPictureShape extends XS
 // discard any custom tags associated with the picture being copied
 nvPr.unsetCustDataLst();
 }
+if(blip.isSetExtLst()) {
+
+CTOfficeArtExtensionList extLst = blip.getExtLst();
+for(CTOfficeArtExtension ext : extLst.getExtList()){
+String xpath = "declare namespace 
a14='http://schemas.microsoft.com/office/drawing/2010/main' 
$this//a14:imgProps/a14:imgLayer";
+XmlObject[] obj = ext.selectPath(xpath);
+if(obj != null && obj.length == 1){
+XmlCursor c = obj[0].newCursor();
+String id = c.getAttributeText(new 
QName("http://schemas.openxmlformats.org/officeDocument/2006/relationships";, 
"embed"));//selectPath("declare namespace 
r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' 
$this//[@embed]");
+String newId = getSheet().importBlip(id, 
p.getSheet().getPackagePart());
+c.setAttributeText(new 
QName("http://schemas.openxmlformats.org/officeDocument/2006/relationships";, 
"embed"), newI

svn commit: r1435633 - in /poi/trunk/src: java/org/apache/poi/ss/formula/eval/ java/org/apache/poi/ss/formula/functions/ testcases/org/apache/poi/ss/formula/functions/

2013-01-19 Thread yegor
Author: yegor
Date: Sat Jan 19 18:33:34 2013
New Revision: 1435633

URL: http://svn.apache.org/viewvc?rev=1435633&view=rev
Log:
Bugzilla 54356 - Support of statistical function SLOPE

Added:

poi/trunk/src/java/org/apache/poi/ss/formula/functions/LinearRegressionFunction.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Slope.java
poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestSlope.java
Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Intercept.java

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java?rev=1435633&r1=1435632&r2=1435633&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java Sat Jan 
19 18:33:34 2013
@@ -28,7 +28,7 @@ import java.util.TreeSet;
 
 /**
  * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
- * @author Johan Karlsteen - added Intercept
+ * @author Johan Karlsteen - added Intercept and Slope
  */
 public final class FunctionEval {
/**
@@ -210,6 +210,7 @@ public final class FunctionEval {
retval[305] = new Sumx2py2();
 
retval[311] = new Intercept();
+   retval[315] = new Slope();
 
retval[318] = AggregateFunction.DEVSQ;
 

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Intercept.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Intercept.java?rev=1435633&r1=1435632&r2=1435633&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Intercept.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Intercept.java Sat 
Jan 19 18:33:34 2013
@@ -19,13 +19,8 @@
 
 package org.apache.poi.ss.formula.functions;
 
-import org.apache.poi.ss.formula.TwoDEval;
-import org.apache.poi.ss.formula.eval.ErrorEval;
-import org.apache.poi.ss.formula.eval.EvaluationException;
-import org.apache.poi.ss.formula.eval.NumberEval;
-import org.apache.poi.ss.formula.eval.RefEval;
 import org.apache.poi.ss.formula.eval.ValueEval;
-import org.apache.poi.ss.formula.functions.LookupUtils.ValueVector;
+import org.apache.poi.ss.formula.functions.LinearRegressionFunction.FUNCTION;
 
 /**
  * Implementation of Excel function INTERCEPT()
@@ -40,184 +35,15 @@ import org.apache.poi.ss.formula.functio
  */
 public final class Intercept extends Fixed2ArgFunction {
 
-   private static abstract class ValueArray implements ValueVector {
-   private final int _size;
-   protected ValueArray(int size) {
-   _size = size;
-   }
-
-   public ValueEval getItem(int index) {
-   if (index < 0 || index > _size) {
-   throw new IllegalArgumentException("Specified 
index " + index
-   + " is outside range (0.." + 
(_size - 1) + ")");
-   }
-   return getItemInternal(index);
-   }
-   protected abstract ValueEval getItemInternal(int index);
-
-   public final int getSize() {
-   return _size;
-   }
-   }
-
-   private static final class SingleCellValueArray extends ValueArray {
-   private final ValueEval _value;
-   public SingleCellValueArray(ValueEval value) {
-   super(1);
-   _value = value;
-   }
-   @Override
-   protected ValueEval getItemInternal(int index) {
-   return _value;
-   }
-   }
-
-   private static final class RefValueArray extends ValueArray {
-   private final RefEval _ref;
-   public RefValueArray(RefEval ref) {
-   super(1);
-   _ref = ref;
-   }
-   @Override
-   protected ValueEval getItemInternal(int index) {
-   return _ref.getInnerValueEval();
-   }
-   }
-
-   private static final class AreaValueArray extends ValueArray {
-   private final TwoDEval _ae;
-   private final int _width;
-
-   public AreaValueArray(TwoDEval ae) {
-   super(ae.getWidth() * ae.getHeight());
-   _ae = ae;
-   _width = ae.getWidth();
-   }
-   @Override
-   protected ValueEval getItemIn

svn commit: r1426485 - in /poi/trunk: src/documentation/content/xdocs/ src/java/org/apache/poi/ss/formula/eval/ src/java/org/apache/poi/ss/formula/functions/ src/testcases/org/apache/poi/ss/formula/fu

2012-12-28 Thread yegor
Author: yegor
Date: Fri Dec 28 12:50:15 2012
New Revision: 1426485

URL: http://svn.apache.org/viewvc?rev=1426485&view=rev
Log:
Bugzilla 54356: Support of statistical function INTERCEPT

Added:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Intercept.java

poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestIntercept.java
poi/trunk/test-data/spreadsheet/intercept.xls   (with props)
Modified:
poi/trunk/src/documentation/content/xdocs/status.xml
poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=1426485&r1=1426484&r2=1426485&view=diff
==
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Fri Dec 28 12:50:15 
2012
@@ -34,6 +34,7 @@
 
 
 
+  54356 - Support for 
INTERCEPT function
   54282 - Improve the 
performance of ColumnHelper addCleanColIntoCols, speeds up some .xlsx file 
loading
   53650 - Prevent unreadable 
content and disalow to overwrite rows from input template in SXSSF
   54228,53672 - Fixed XSSF to 
read cells with missing R attribute

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java?rev=1426485&r1=1426484&r2=1426485&view=diff
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java 
(original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java Fri Dec 
28 12:50:15 2012
@@ -28,6 +28,7 @@ import java.util.TreeSet;
 
 /**
  * @author Amol S. Deshmukh < amolweb at ya hoo dot com >
+ * @author Johan Karlsteen - added Intercept
  */
 public final class FunctionEval {
/**
@@ -208,6 +209,8 @@ public final class FunctionEval {
retval[304] = new Sumx2my2();
retval[305] = new Sumx2py2();
 
+   retval[311] = new Intercept();
+
retval[318] = AggregateFunction.DEVSQ;
 
retval[321] = AggregateFunction.SUMSQ;

Added: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Intercept.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Intercept.java?rev=1426485&view=auto
==
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Intercept.java 
(added)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Intercept.java Fri 
Dec 28 12:50:15 2012
@@ -0,0 +1,223 @@
+/*
+ *  
+ *Licensed to the Apache Software Foundation (ASF) under one or more
+ *contributor license agreements.  See the NOTICE file distributed with
+ *this work for additional information regarding copyright ownership.
+ *The ASF licenses this file to You under the Apache License, Version 2.0
+ *(the "License"); you may not use this file except in compliance with
+ *the License.  You may obtain a copy of the License at
+ *
+ *http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *Unless required by applicable law or agreed to in writing, software
+ *distributed under the License is distributed on an "AS IS" BASIS,
+ *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *See the License for the specific language governing permissions and
+ *limitations under the License.
+ * 
+ */
+
+package org.apache.poi.ss.formula.functions;
+
+import org.apache.poi.ss.formula.TwoDEval;
+import org.apache.poi.ss.formula.eval.ErrorEval;
+import org.apache.poi.ss.formula.eval.EvaluationException;
+import org.apache.poi.ss.formula.eval.NumberEval;
+import org.apache.poi.ss.formula.eval.RefEval;
+import org.apache.poi.ss.formula.eval.ValueEval;
+import org.apache.poi.ss.formula.functions.LookupUtils.ValueVector;
+
+/**
+ * Implementation of Excel function INTERCEPT()
+ *
+ * Calculates the INTERCEPT of the linear regression line that is used to 
predict y values from x values
+ * (http://introcs.cs.princeton.edu/java/97data/LinearRegression.java.html)
+ * Syntax:
+ * INTERCEPT(arrayX, arrayY)
+ *
+ *
+ * @author Johan Karlsteen
+ */
+public final class Intercept extends Fixed2ArgFunction {
+
+   private static abstract class ValueArray implements ValueVector {
+   private final int _size;
+   protected ValueArray(int size) {
+   _size = size;
+   }
+
+   public ValueEval getItem(int index

svn commit: r1424438 - in /poi/site/publish/apidocs/org/apache/poi/hwpf: ./ class-use/ converter/ converter/class-use/ dev/ dev/class-use/ extractor/ extractor/class-use/ model/ model/class-use/ model

2012-12-20 Thread yegor
Author: yegor
Date: Thu Dec 20 12:46:31 2012
New Revision: 1424438

URL: http://svn.apache.org/viewvc?rev=1424438&view=rev
Log:
javadocs part 8


[This commit notification would consist of 107 parts, 
which exceeds the limit of 50 ones, so it was shortened to the summary.]

-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1424405 - in /poi/site/publish/apidocs/org/apache/poi/xssf: ./ dev/ dev/class-use/ eventusermodel/ eventusermodel/class-use/ extractor/ extractor/class-use/ model/ model/class-use/ stream

2012-12-20 Thread yegor
Author: yegor
Date: Thu Dec 20 11:12:28 2012
New Revision: 1424405

URL: http://svn.apache.org/viewvc?rev=1424405&view=rev
Log:
javadocs part 7


[This commit notification would consist of 58 parts, 
which exceeds the limit of 50 ones, so it was shortened to the summary.]

-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1424361 - in /poi/site/publish/apidocs/org/apache/poi/hssf: ./ class-use/ converter/ converter/class-use/ dev/ dev/class-use/ eventmodel/ eventmodel/class-use/ eventusermodel/ eventusermo

2012-12-20 Thread yegor
Author: yegor
Date: Thu Dec 20 08:08:01 2012
New Revision: 1424361

URL: http://svn.apache.org/viewvc?rev=1424361&view=rev
Log:
javadocs part 5


[This commit notification would consist of 211 parts, 
which exceeds the limit of 50 ones, so it was shortened to the summary.]

-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1423976 - in /poi/site/publish/apidocs/org/apache/poi/hslf: ./ blip/ blip/class-use/ class-use/ dev/ dev/class-use/ exceptions/ exceptions/class-use/ extractor/ extractor/class-use/ model

2012-12-19 Thread yegor
Author: yegor
Date: Wed Dec 19 17:40:16 2012
New Revision: 1423976

URL: http://svn.apache.org/viewvc?rev=1423976&view=rev
Log:
javadocs part 4


[This commit notification would consist of 80 parts, 
which exceeds the limit of 50 ones, so it was shortened to the summary.]

-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1423852 - in /poi/site/publish/apidocs/org/apache/poi/ss: ./ class-use/ extractor/ extractor/class-use/ format/ format/class-use/ formula/ formula/atp/ formula/atp/class-use/ formula/clas

2012-12-19 Thread yegor
Author: yegor
Date: Wed Dec 19 13:05:10 2012
New Revision: 1423852

URL: http://svn.apache.org/viewvc?rev=1423852&view=rev
Log:
javadocs part 3


[This commit notification would consist of 142 parts, 
which exceeds the limit of 50 ones, so it was shortened to the summary.]

-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1423835 - in /poi/site: ./ publish/apidocs/org/apache/poi/hmef/ publish/apidocs/org/apache/poi/hmef/attribute/ publish/apidocs/org/apache/poi/hmef/attribute/class-use/ publish/apidocs/org

2012-12-19 Thread yegor
Author: yegor
Date: Wed Dec 19 11:42:58 2012
New Revision: 1423835

URL: http://svn.apache.org/viewvc?rev=1423835&view=rev
Log:
javadocs part 2


[This commit notification would consist of 71 parts, 
which exceeds the limit of 50 ones, so it was shortened to the summary.]

-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1423826 - in /poi/site/publish/apidocs: ./ org/ org/apache/ org/apache/poi/ org/apache/poi/class-use/ org/apache/poi/common/ org/apache/poi/common/usermodel/ org/apache/poi/common/usermod

2012-12-19 Thread yegor
Author: yegor
Date: Wed Dec 19 11:18:01 2012
New Revision: 1423826

URL: http://svn.apache.org/viewvc?rev=1423826&view=rev
Log:
poi web site - apidocs


[This commit notification would consist of 149 parts, 
which exceeds the limit of 50 ones, so it was shortened to the summary.]

-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1423782 [6/6] - in /poi/site/src: ./ documentation/ documentation/content/ documentation/content/xdocs/ documentation/content/xdocs/dtd/ documentation/content/xdocs/entity/ documentation/

2012-12-19 Thread yegor
Propchange: 
poi/site/src/documentation/resources/images/simple-xls-with-function.jpg
--
svn:executable = *

Propchange: 
poi/site/src/documentation/resources/images/simple-xls-with-function.jpg
--
svn:mime-type = image/jpeg

Added: poi/site/src/documentation/resources/images/ss-features.png
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/resources/images/ss-features.png?rev=1423782&view=auto
==
Binary file - no diff available.

Propchange: poi/site/src/documentation/resources/images/ss-features.png
--
svn:executable = *

Propchange: poi/site/src/documentation/resources/images/ss-features.png
--
svn:mime-type = image/png

Added: poi/site/src/documentation/resources/images/timesheet.jpg
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/resources/images/timesheet.jpg?rev=1423782&view=auto
==
Binary file - no diff available.

Propchange: poi/site/src/documentation/resources/images/timesheet.jpg
--
svn:executable = *

Propchange: poi/site/src/documentation/resources/images/timesheet.jpg
--
svn:mime-type = image/jpeg

Added: poi/site/src/documentation/resources/images/unknown.jpg
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/resources/images/unknown.jpg?rev=1423782&view=auto
==
Binary file - no diff available.

Propchange: poi/site/src/documentation/resources/images/unknown.jpg
--
svn:executable = *

Propchange: poi/site/src/documentation/resources/images/unknown.jpg
--
svn:mime-type = image/jpeg

Added: poi/site/src/documentation/resources/images/update.jpg
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/resources/images/update.jpg?rev=1423782&view=auto
==
Binary file - no diff available.

Propchange: poi/site/src/documentation/resources/images/update.jpg
--
svn:executable = *

Propchange: poi/site/src/documentation/resources/images/update.jpg
--
svn:mime-type = image/jpeg

Added: poi/site/src/documentation/resources/images/usermodel.gif
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/resources/images/usermodel.gif?rev=1423782&view=auto
==
Binary file - no diff available.

Propchange: poi/site/src/documentation/resources/images/usermodel.gif
--
svn:executable = *

Propchange: poi/site/src/documentation/resources/images/usermodel.gif
--
svn:mime-type = image/gif

Added: poi/site/src/documentation/resources/images/utilClasses.gif
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/resources/images/utilClasses.gif?rev=1423782&view=auto
==
Binary file - no diff available.

Propchange: poi/site/src/documentation/resources/images/utilClasses.gif
--
svn:executable = *

Propchange: poi/site/src/documentation/resources/images/utilClasses.gif
--
svn:mime-type = image/gif

Added: poi/site/src/documentation/resources/images/vba-example.jpg
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/resources/images/vba-example.jpg?rev=1423782&view=auto
==
Binary file - no diff available.

Propchange: poi/site/src/documentation/resources/images/vba-example.jpg
--
svn:executable = *

Propchange: poi/site/src/documentation/resources/images/vba-example.jpg
--
svn:mime-type = image/jpeg

Added: poi/site/src/documentation/skinconf.xml
URL: 
http://svn.apache.org/viewvc/p

svn commit: r1423782 [3/6] - in /poi/site/src: ./ documentation/ documentation/content/ documentation/content/xdocs/ documentation/content/xdocs/dtd/ documentation/content/xdocs/entity/ documentation/

2012-12-19 Thread yegor
Added: poi/site/src/documentation/content/xdocs/entity/ISOnum.pen
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/entity/ISOnum.pen?rev=1423782&view=auto
==
--- poi/site/src/documentation/content/xdocs/entity/ISOnum.pen (added)
+++ poi/site/src/documentation/content/xdocs/entity/ISOnum.pen Wed Dec 19 
08:14:44 2012
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+"  >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Propchange: poi/site/src/documentation/content/xdocs/entity/ISOnum.pen
--
svn:executable = *

Added: poi/site/src/documentation/content/xdocs/entity/ISOpub.pen
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/entity/ISOpub.pen?rev=1423782&view=auto
==
--- poi/site/src/documentation/content/xdocs/entity/ISOpub.pen (added)
+++ poi/site/src/documentation/content/xdocs/entity/ISOpub.pen Wed Dec 19 
08:14:44 2012
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Propchange: poi/site/src/documentation/content/xdocs/entity/ISOpub.pen
--
svn:executable = *

Added: poi/site/src/documentation/content/xdocs/entity/ISOtech.pen
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/entity/ISOtech.pen?rev=1423782&view=auto
==
--- poi/site/src/documentation/content/xdocs/entity/ISOtech.pen (added)
+++ poi/site/src/documentation/content/xdocs/entity/ISOtech.pen Wed Dec 19 
08:14:44 2012
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Propchange: poi/site/src/documentation/content/xdocs/entity/ISOtech.pen
--
svn:executable = *

Added: poi/site/src/documentation/content/xdocs/faq.xml
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/faq.xml?rev=1423782&view=auto
==
Binary file - no diff available.

Propchange: poi/site/src/documentation/content/xdocs/faq.xml
--
svn:executable = *

Propchange: poi/site/src/documentation/content/xdocs/faq.xml
--
svn:mime-type = application/xml

Added: poi/site/src/documentation/content/xdocs/guidelines.xml
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/guidelines.xml?rev=1423782&view=auto
==
Binary file - no diff available.

Propchange: poi/site/src/documentation/content/xdocs/guidelines.xml
--
svn:executable = *

Propchange: poi/site/src/documentation/content/xdocs/guidelines.xml
--
svn:mime-type = application/xml

Added: poi/site/src/documentation/content/xdocs/hdgf/book.xml
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/hdgf/book.xml?rev=1423782&view=auto
==
Binary file - no diff available.

Propchange: poi/site/src/documentation/content/xdocs/hdgf/book.xml
--
svn:executable = *

Propchange: poi/site/src/documentation/content/xdocs/hdgf/book.xml
--
svn:mime-type = application/xml

Added: poi/site/src/documentation/content/xdocs/hdgf/index.xml
URL: 
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/hdgf/index.xml?rev=1423782&view=auto
==
Binary file - no diff available.

Propchange: poi/site/src/documentation/content/xdocs/hdgf/index.xml
--
svn:executable = *

Propchange: poi/site/src/documentation/content/xdocs/hdgf/index.xml
--
svn:mime-type = application/xml

Added: poi/site/src/documentation/content/xdocs/historyandfuture.xml
URL: 
htt

svn commit: r1423305 - /poi/site/

2012-12-17 Thread yegor
Author: yegor
Date: Tue Dec 18 07:42:35 2012
New Revision: 1423305

URL: http://svn.apache.org/viewvc?rev=1423305&view=rev
Log:
new home for POI docs

Added:
poi/site/


-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1418446 - /poi/trunk/src/documentation/content/xdocs/download.xml

2012-12-07 Thread yegor
Author: yegor
Date: Fri Dec  7 19:14:31 2012
New Revision: 1418446

URL: http://svn.apache.org/viewvc?rev=1418446&view=rev
Log:
updated sha1 and md5 checksums on the downloads page

Modified:
poi/trunk/src/documentation/content/xdocs/download.xml

Modified: poi/trunk/src/documentation/content/xdocs/download.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/download.xml?rev=1418446&r1=1418445&r2=1418446&view=diff
==
--- poi/trunk/src/documentation/content/xdocs/download.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/download.xml Fri Dec  7 19:14:31 
2012
@@ -62,16 +62,16 @@
 http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.9-20121203.tar.gz";>poi-bin-3.9-20121203.tar.gz
 (
   16MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.tar.gz.asc";>signed)
   
-  MD5 checksum: 7f094e58310a1dff6963e5d7812acda6 
+  MD5 checksum: 09c4dfd63317bb9eb37fe12d6febea74 
   
-  SHA1 checksum: 0840b38316eeb247f208117a838a6e400715f0b3 
+  SHA1 checksum: 5e5747efebd65623bed5b8562b30fae24f75b198 
 
 http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.9-20121203.zip";>poi-bin-3.9-20121203.zip
 (
   23MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.zip.asc";>signed)
   
-  MD5 checksum: 8b8c46bb8edf39bb5755b9033aab508d 
+  MD5 checksum: 24aea12578d5745dfb8eba9d185b9136 
   
-  SHA1 checksum: 53ff3ee220824a1f8b9267dee305eaa30429e28b 
+  SHA1 checksum: 231e738b40175a40c51af5549c82d554bf13f97e 
 
   
   
@@ -80,16 +80,16 @@
 http://www.apache.org/dyn/closer.cgi/poi/release/src/poi-src-3.9-20121203.tar.gz";>poi-src-3.9-20121203.tar.gz
 (
   48MB, http://www.apache.org/dist/poi/release/src/poi-src-3.9-20121203.tar.gz.asc";>signed)
   
-  MD5 checksum: 23529f68f6055d6f9ee36a4f7fadfee4 
+  MD5 checksum: fe12cf4620340f61dd42e43f6087a336 
   
-  SHA1 checksum: 971a6177d19badc5ef87717dc04816d43cf3665b 
+  SHA1 checksum: 3a8660b9c99111b72365269e23fefae5e6bdcf4b 
 
 http://www.apache.org/dyn/closer.cgi/poi/release/src/poi-src-3.9-20121203.zip";>poi-src-3.9-20121203.zip
 (
   58MB, http://www.apache.org/dist/poi/release/src/poi-src-3.9-20121203.zip.asc";>signed)
   
-  MD5 checksum: 4d1c7d0428fc04f8c3bc53af761d4013 
+  MD5 checksum: c08d4bf7a7f63a29bedcb2b5b2d61efa 
   
-  SHA1 checksum: 94cc79f45c84274730c30f3a4198d7042d3d47f1 
+  SHA1 checksum: 8bdb2cac1b3bfd7dd816ba574b0f20c52a8092ed 
 
   
   



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1418264 - in /poi/trunk/src: documentation/content/xdocs/ ooxml/java/org/apache/poi/xssf/streaming/ ooxml/testcases/org/apache/poi/xssf/streaming/

2012-12-07 Thread yegor
Author: yegor
Date: Fri Dec  7 10:36:16 2012
New Revision: 1418264

URL: http://svn.apache.org/viewvc?rev=1418264&view=rev
Log:
Bug 53650  - Prevent unreadable content and disalow to overwrite rows in user 
templates

Modified:
poi/trunk/src/documentation/content/xdocs/status.xml
poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java

poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFSheet.java

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=1418264&r1=1418263&r2=1418264&view=diff
==
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Fri Dec  7 10:36:16 
2012
@@ -34,6 +34,7 @@
 
 
 
+  53650 - Prevent unreadable 
content and disalow to overwrite rows from input template in SXSSF
   54228,53672 - Fixed XSSF to 
read cells with missing R attribute
   54206 - Ensure that shared 
formuals are updated when shifting rows in a spreadsheet
   Synchronize table headers 
with parent sheet in XSSF

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java?rev=1418264&r1=1418263&r2=1418264&view=diff
==
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java Fri 
Dec  7 10:36:16 2012
@@ -106,6 +106,20 @@ public class SXSSFSheet implements Sheet
 + ") outside allowable range (0.." + maxrow + ")");
 }
 
+// attempt to overwrite a row that is already flushed to disk
+if(rownum <= _writer.getLastFlushedRow() ) {
+throw new IllegalArgumentException(
+"Attempting to write a row["+rownum+"] " +
+"in the range [0," + _writer.getLastFlushedRow() + "] that 
is already written to disk.");
+}
+
+// attempt to overwrite a existing row in the input template
+if(_sh.getPhysicalNumberOfRows() > 0 && rownum <= _sh.getLastRowNum() 
) {
+throw new IllegalArgumentException(
+"Attempting to write a row["+rownum+"] " +
+"in the range [0," + _sh.getLastRowNum() + "] that 
is already written to disk.");
+}
+
 //Make the initial allocation as big as the row above.
 Row previousRow=rownum>0?getRow(rownum-1):null;
 int initialAllocationSize=0;

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java?rev=1418264&r1=1418263&r2=1418264&view=diff
==
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java 
Fri Dec  7 10:36:16 2012
@@ -44,6 +44,7 @@ public class SheetDataWriter {
 int _numberOfFlushedRows;
 int _lowestIndexOfFlushedRows; // meaningful only of _numberOfFlushedRows>0
 int _numberOfCellsOfLastFlushedRow; // meaningful only of 
_numberOfFlushedRows>0
+int _numberLastFlushedRow = -1; // meaningful only of 
_numberOfFlushedRows>0
 
 public SheetDataWriter() throws IOException {
 _fd = createTempFile();
@@ -105,6 +106,10 @@ public class SheetDataWriter {
 return _lowestIndexOfFlushedRows;
 }
 
+public int getLastFlushedRow() {
+return _numberLastFlushedRow;
+}
+
 protected void finalize() throws Throwable {
 _fd.delete();
 }
@@ -118,6 +123,7 @@ public class SheetDataWriter {
 public void writeRow(int rownum, SXSSFRow row) throws IOException {
 if (_numberOfFlushedRows == 0)
 _lowestIndexOfFlushedRows = rownum;
+_numberLastFlushedRow = Math.max(rownum, _numberLastFlushedRow);
 _numberOfCellsOfLastFlushedRow = row.getLastCellNum();
 _numberOfFlushedRows++;
 beginRow(rownum, row);

Modified: 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFSheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFSheet.java?rev=1418264&r1=1418263&r2=1418264&view=diff
===

svn commit: r1059 - /release/poi/release/RELEASE-NOTES.txt

2012-12-06 Thread yegor
Author: yegor
Date: Thu Dec  6 15:11:22 2012
New Revision: 1059

Log:
remove old release notes for poi-3.8

Removed:
release/poi/release/RELEASE-NOTES.txt


-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1058 - /dev/poi/bin/ /dev/poi/src/ /release/poi/release/bin/ /release/poi/release/src/

2012-12-06 Thread yegor
Author: yegor
Date: Thu Dec  6 15:09:47 2012
New Revision: 1058

Log:
move staging files to the release area

Added:
release/poi/release/bin/
  - copied from r1057, dev/poi/bin/
release/poi/release/src/
  - copied from r1057, dev/poi/src/
Removed:
dev/poi/bin/
dev/poi/src/


-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1057 - in /release/poi/release: bin/ src/

2012-12-06 Thread yegor
Author: yegor
Date: Thu Dec  6 15:07:59 2012
New Revision: 1057

Log:
remove poi-3.8 files

Removed:
release/poi/release/bin/
release/poi/release/src/


-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1056 - in /release/poi/dev: bin/ src/

2012-12-06 Thread yegor
Author: yegor
Date: Thu Dec  6 15:06:47 2012
New Revision: 1056

Log:
remove old poi-3.8-beta5 release 

Removed:
release/poi/dev/bin/
release/poi/dev/src/


-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1417379 - in /poi/trunk: src/documentation/content/xdocs/ src/ooxml/java/org/apache/poi/xssf/usermodel/ src/ooxml/testcases/org/apache/poi/xssf/usermodel/ test-data/spreadsheet/

2012-12-05 Thread yegor
Author: yegor
Date: Wed Dec  5 12:21:08 2012
New Revision: 1417379

URL: http://svn.apache.org/viewvc?rev=1417379&view=rev
Log:
Bugs 54228,53672 - Fixed XSSF to read cells with missing R attribute

Added:
poi/trunk/test-data/spreadsheet/54288-ref.xlsx   (with props)
poi/trunk/test-data/spreadsheet/54288.xlsx   (with props)
Modified:
poi/trunk/src/documentation/content/xdocs/status.xml
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java

poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=1417379&r1=1417378&r2=1417379&view=diff
==
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Wed Dec  5 12:21:08 
2012
@@ -34,6 +34,7 @@
 
 
 
+  54228,53672 - Fixed XSSF to 
read cells with missing R attribute
   54206 - Ensure that shared 
formuals are updated when shifting rows in a spreadsheet
   Synchronize table headers 
with parent sheet in XSSF
   54210 - Fixed rendering text 
in flipped shapes in PPT2PNG and PPTX2PNG

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java?rev=1417379&r1=1417378&r2=1417379&view=diff
==
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java Wed 
Dec  5 12:21:08 2012
@@ -104,6 +104,11 @@ public final class XSSFCell implements C
 _row = row;
 if (cell.getR() != null) {
 _cellNum = new CellReference(cell.getR()).getCol();
+} else {
+int prevNum = row.getLastCellNum();
+if(prevNum != -1){
+_cellNum = row.getCell(prevNum-1).getColumnIndex() + 1;
+}
 }
 _sharedStringSource = 
row.getSheet().getWorkbook().getSharedStringSource();
 _stylesSource = row.getSheet().getWorkbook().getStylesSource();
@@ -468,7 +473,11 @@ public final class XSSFCell implements C
  * @return A1 style reference to the location of this cell
  */
 public String getReference() {
-return _cell.getR();
+String ref = _cell.getR();
+if(ref == null) {
+return new CellReference(this).formatAsString();
+}
+return ref;
 }
 
 /**
@@ -685,7 +694,7 @@ public final class XSSFCell implements C
  * Sets this cell as the active cell for the worksheet.
  */
 public void setAsActiveCell() {
-getSheet().setActiveCell(_cell.getR());
+getSheet().setActiveCell(getReference());
 }
 
 /**
@@ -889,7 +898,7 @@ public final class XSSFCell implements C
 public void removeCellComment() {
 XSSFComment comment = getCellComment();
 if(comment != null){
-String ref = _cell.getR();
+String ref = getReference();
 XSSFSheet sh = getSheet();
 sh.getCommentsTable(false).removeComment(ref);
 sh.getVMLDrawing(false).removeCommentShape(getRowIndex(), 
getColumnIndex());
@@ -1009,7 +1018,7 @@ public final class XSSFCell implements C
 public CellRangeAddress getArrayFormulaRange() {
 XSSFCell cell = getSheet().getFirstCellInArrayFormula(this);
 if (cell == null) {
-throw new IllegalStateException("Cell " + _cell.getR()
+throw new IllegalStateException("Cell " + getReference()
 + " is not part of an array formula.");
 }
 String formulaRef = cell._cell.getF().getRef();

Modified: 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java?rev=1417379&r1=1417378&r2=1417379&view=diff
==
--- 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java 
(original)
+++ 
poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java 
Wed Dec  5 12:21:08 2012
@@ -23,6 +23,9 @@ import org.apache.poi.xssf.model.SharedS
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.STCellType;
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCell;
 
+import java.io.FileOutputStream;
+import java.io.IOException;
+
 /**
  * @author Yegor Kozlov
  */
@@ -182,4 +185,96 @@ public final class TestXSSFCell extends 
 
wb.getCreationHelper().createFormulaEvaluator().evalu

svn commit: r1416917 - in /poi/trunk: src/documentation/content/xdocs/ src/java/org/apache/poi/hssf/record/aggregates/ src/ooxml/java/org/apache/poi/xssf/usermodel/ src/ooxml/java/org/apache/poi/xssf/

2012-12-04 Thread yegor
Author: yegor
Date: Tue Dec  4 12:44:33 2012
New Revision: 1416917

URL: http://svn.apache.org/viewvc?rev=1416917&view=rev
Log:
Bug 54206: ValueRecordsAggregate.updateFormulasAfterRowShift doesn't update 
shared formulas

Added:
poi/trunk/test-data/spreadsheet/54206.xls   (with props)
poi/trunk/test-data/spreadsheet/54206.xlsx   (with props)
Modified:
poi/trunk/src/documentation/content/xdocs/status.xml

poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java

poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java

poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=1416917&r1=1416916&r2=1416917&view=diff
==
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Tue Dec  4 12:44:33 
2012
@@ -34,6 +34,7 @@
 
 
 
+  54206 - Ensure that shared 
formuals are updated when shifting rows in a spreadsheet
   Synchronize table headers 
with parent sheet in XSSF
   54210 - Fixed rendering text 
in flipped shapes in PPT2PNG and PPTX2PNG
 

Modified: 
poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java?rev=1416917&r1=1416916&r2=1416917&view=diff
==
--- 
poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java
 (original)
+++ 
poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java
 Tue Dec  4 12:44:33 2012
@@ -292,12 +292,14 @@ public final class ValueRecordsAggregate
for (int j = 0; j < rowCells.length; j++) {
CellValueRecordInterface cell = rowCells[j];
if (cell instanceof FormulaRecordAggregate) {
-   FormulaRecord fr = 
((FormulaRecordAggregate)cell).getFormulaRecord();
-   Ptg[] ptgs = fr.getParsedExpression(); 
// needs clone() inside this getter?
-   if (shifter.adjustFormula(ptgs, 
currentExternSheetIndex)) {
-   fr.setParsedExpression(ptgs);
-   }
-   }
+FormulaRecordAggregate fra = (FormulaRecordAggregate)cell;
+Ptg[] ptgs = fra.getFormulaTokens(); // needs clone() 
inside this getter?
+Ptg[] ptgs2 = 
((FormulaRecordAggregate)cell).getFormulaRecord().getParsedExpression(); // 
needs clone() inside this getter?
+
+if (shifter.adjustFormula(ptgs, currentExternSheetIndex)) {
+fra.setParsedExpression(ptgs);
+}
+}
}
}
}

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java?rev=1416917&r1=1416916&r2=1416917&view=diff
==
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java Tue 
Dec  4 12:44:33 2012
@@ -2617,7 +2617,8 @@ public class XSSFSheet extends POIXMLDoc
  * @param sid shared group index
  * @return a CTCellFormula bean holding shared formula or 
null if not found
  */
-CTCellFormula getSharedFormula(int sid){
+@Internal
+public CTCellFormula getSharedFormula(int sid){
 return sharedFormulas.get(sid);
 }
 

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java?rev=1416917&r1=1416916&r2=1416917&view=diff
==
--- 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java
 (original)
+++ 
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java
 Tue Dec  4 12:44:33 2012
@@ -28,10 +28,7 @@ import org.apache.poi.ss.formula.Formula
 import org.apache.poi.ss.formula.ptg.Ptg;
 import org.apache.poi.ss.formula.ptg.AreaPt

svn commit: r1416166 - /poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java

2012-12-02 Thread yegor
Author: yegor
Date: Sun Dec  2 12:28:32 2012
New Revision: 1416166

URL: http://svn.apache.org/viewvc?rev=1416166&view=rev
Log:
sync table headers with worksheet on save

Modified:
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java?rev=1416166&r1=1416165&r2=1416166&view=diff
==
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java Sun 
Dec  2 12:28:32 2012
@@ -47,7 +47,7 @@ import org.openxmlformats.schemas.spread
  * @author Roberto Manicardi
  */
 public class XSSFTable extends POIXMLDocumentPart {
-   
+
private CTTable ctTable;
private List xmlColumnPr;
private CellReference startCellReference;
@@ -81,7 +81,9 @@ public class XSSFTable extends POIXMLDoc
}
 
public void writeTo(OutputStream out) throws IOException {
-   TableDocument doc = TableDocument.Factory.newInstance();
+updateHeaders();
+
+TableDocument doc = TableDocument.Factory.newInstance();
doc.setTable(ctTable);
doc.save(out, DEFAULT_XML_OPTIONS);
}
@@ -234,9 +236,11 @@ public class XSSFTable extends POIXMLDoc

if(startCellReference==null){   
String ref = ctTable.getRef();
-   String[] boundaries = ref.split(":");
-   String from = boundaries[0];
-   startCellReference = new CellReference(from);
+if(ref != null) {
+String[] boundaries = ref.split(":");
+String from = boundaries[0];
+startCellReference = new CellReference(from);
+}
}
return startCellReference;
}
@@ -275,4 +279,28 @@ public class XSSFTable extends POIXMLDoc
}
return rowCount;
}
+
+/**
+ * Synchronize table headers with cell values in the parent sheet.
+ * Headers must be in sync, otherwise Excel will display a
+ * "Found unreadable content" message on startup.
+ */
+public void updateHeaders(){
+XSSFSheet sheet = (XSSFSheet)getParent();
+CellReference ref = getStartCellReference();
+if(ref == null) return;
+
+int headerRow = ref.getRow();
+int firstHeaderColumn = ref.getCol();
+XSSFRow row = sheet.getRow(headerRow);
+
+if(row != null) for(CTTableColumn col : 
getCTTable().getTableColumns().getTableColumnList()){
+int colIdx = (int)col.getId() - 1 + firstHeaderColumn;
+XSSFCell cell = row.getCell(colIdx);
+if(cell != null) {
+col.setName(cell.getStringCellValue());
+}
+}
+
+}
 }



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1416165 - in /poi/trunk/src: documentation/content/xdocs/status.xml ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextShape.java scratchpad/src/org/apache/poi/hslf/model/TextPainter.java

2012-12-02 Thread yegor
Author: yegor
Date: Sun Dec  2 12:24:55 2012
New Revision: 1416165

URL: http://svn.apache.org/viewvc?rev=1416165&view=rev
Log:
Bug 54210 - Fixed rendering text in flipped shapes in PPT2PNG and PPTX2PNG

Modified:
poi/trunk/src/documentation/content/xdocs/status.xml
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextShape.java
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextPainter.java

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=1416165&r1=1416164&r2=1416165&view=diff
==
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Sun Dec  2 12:24:55 
2012
@@ -34,6 +34,8 @@
 
 
 
+  Synchronize table headers 
with parent sheet in XSSF
+  54210 - Fixed rendering text 
in flipped shapes in PPT2PNG and PPTX2PNG
 
 
   54188 - Avoid NPE in 
PPT2PNG

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextShape.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextShape.java?rev=1416165&r1=1416164&r2=1416165&view=diff
==
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextShape.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextShape.java 
Sun Dec  2 12:24:55 2012
@@ -37,6 +37,7 @@ import org.openxmlformats.schemas.presen
 import org.openxmlformats.schemas.presentationml.x2006.main.STPlaceholderType;
 
 import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
 import java.awt.geom.Rectangle2D;
 import java.awt.image.BufferedImage;
 import java.util.ArrayList;
@@ -493,6 +494,36 @@ public abstract class XSLFTextShape exte
 double x = anchor.getX() + getLeftInset();
 double y = anchor.getY();
 
+// remember the initial transform
+AffineTransform tx = graphics.getTransform();
+
+// Transform of text in flipped shapes is special.
+// At this point the flip and rotation transform is already applied
+// (see XSLFShape#applyTransform ), but we need to restore it to avoid 
painting "upside down".
+// See Bugzilla 54210.
+
+if(getFlipVertical()){
+graphics.translate(anchor.getX(), anchor.getY() + 
anchor.getHeight());
+graphics.scale(1, -1);
+graphics.translate(-anchor.getX(), -anchor.getY());
+
+// text in vertically flipped shapes is rotated by 180 degrees
+double centerX = anchor.getX() + anchor.getWidth()/2;
+double centerY = anchor.getY() + anchor.getHeight()/2;
+graphics.translate(centerX, centerY);
+graphics.rotate(Math.toRadians(180));
+graphics.translate(-centerX, -centerY);
+}
+
+// Horizontal flipping applies only to shape outline and not to the 
text in the shape.
+// Applying flip second time restores the original not-flipped 
transform
+if(getFlipHorizontal()){
+graphics.translate(anchor.getX() + anchor.getWidth(), 
anchor.getY());
+graphics.scale(-1, 1);
+graphics.translate(-anchor.getX() , -anchor.getY());
+}
+
+
 // first dry-run to calculate the total height of the text
 double textHeight = getTextHeight();
 
@@ -512,11 +543,14 @@ public abstract class XSLFTextShape exte
 }
 
 drawParagraphs(graphics, x, y);
+
+// restore the transform
+graphics.setTransform(tx);
 }
 
 
 /**
- * pain the paragraphs starting from top left (x,y)
+ * paint the paragraphs starting from top left (x,y)
  *
  * @return  the vertical advance, i.e. the cumulative space occupied by 
the text
  */

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextPainter.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextPainter.java?rev=1416165&r1=1416164&r2=1416165&view=diff
==
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextPainter.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/TextPainter.java Sun 
Dec  2 12:24:55 2012
@@ -24,6 +24,7 @@ import java.awt.font.FontRenderContext;
 import java.awt.font.LineBreakMeasurer;
 import java.awt.font.TextAttribute;
 import java.awt.font.TextLayout;
+import java.awt.geom.AffineTransform;
 import java.awt.geom.Point2D;
 import java.awt.geom.Rectangle2D;
 import java.text.AttributedCharacterIterator;
@@ -94,6 +95,8 @@ public final class TextPainter {
 }
 
 public void paint(Graphics2D graphics){
+

svn commit: r1033 - in /dev/poi: bin/ maven/ src/

2012-11-26 Thread yegor
Author: yegor
Date: Mon Nov 26 14:38:50 2012
New Revision: 1033

Log:
POI-3.9 files, take 2

Modified:
dev/poi/bin/poi-bin-3.9-20121203.tar.gz
dev/poi/bin/poi-bin-3.9-20121203.tar.gz.asc
dev/poi/bin/poi-bin-3.9-20121203.tar.gz.md5
dev/poi/bin/poi-bin-3.9-20121203.tar.gz.sha1
dev/poi/bin/poi-bin-3.9-20121203.zip
dev/poi/bin/poi-bin-3.9-20121203.zip.asc
dev/poi/bin/poi-bin-3.9-20121203.zip.md5
dev/poi/bin/poi-bin-3.9-20121203.zip.sha1
dev/poi/maven/poi-3.9-20121203.jar
dev/poi/maven/poi-3.9-20121203.jar.asc
dev/poi/maven/poi-3.9-20121203.jar.md5
dev/poi/maven/poi-3.9-20121203.jar.sha1
dev/poi/maven/poi-3.9-sources-20121203.jar
dev/poi/maven/poi-3.9-sources-20121203.jar.asc
dev/poi/maven/poi-3.9-sources-20121203.jar.md5
dev/poi/maven/poi-3.9-sources-20121203.jar.sha1
dev/poi/maven/poi-3.9.pom.asc
dev/poi/maven/poi-examples-3.9-20121203.jar
dev/poi/maven/poi-examples-3.9-20121203.jar.asc
dev/poi/maven/poi-examples-3.9-20121203.jar.md5
dev/poi/maven/poi-examples-3.9-20121203.jar.sha1
dev/poi/maven/poi-examples-3.9-sources-20121203.jar
dev/poi/maven/poi-examples-3.9-sources-20121203.jar.asc
dev/poi/maven/poi-examples-3.9-sources-20121203.jar.md5
dev/poi/maven/poi-examples-3.9-sources-20121203.jar.sha1
dev/poi/maven/poi-examples-3.9.pom.asc
dev/poi/maven/poi-excelant-3.9-20121203.jar
dev/poi/maven/poi-excelant-3.9-20121203.jar.asc
dev/poi/maven/poi-excelant-3.9-20121203.jar.md5
dev/poi/maven/poi-excelant-3.9-20121203.jar.sha1
dev/poi/maven/poi-excelant-3.9-sources-20121203.jar
dev/poi/maven/poi-excelant-3.9-sources-20121203.jar.asc
dev/poi/maven/poi-excelant-3.9-sources-20121203.jar.md5
dev/poi/maven/poi-excelant-3.9-sources-20121203.jar.sha1
dev/poi/maven/poi-excelant-3.9.pom.asc
dev/poi/maven/poi-ooxml-3.9-20121203.jar
dev/poi/maven/poi-ooxml-3.9-20121203.jar.asc
dev/poi/maven/poi-ooxml-3.9-20121203.jar.md5
dev/poi/maven/poi-ooxml-3.9-20121203.jar.sha1
dev/poi/maven/poi-ooxml-3.9-sources-20121203.jar
dev/poi/maven/poi-ooxml-3.9-sources-20121203.jar.asc
dev/poi/maven/poi-ooxml-3.9-sources-20121203.jar.md5
dev/poi/maven/poi-ooxml-3.9-sources-20121203.jar.sha1
dev/poi/maven/poi-ooxml-3.9.pom.asc
dev/poi/maven/poi-ooxml-schemas-3.9-20121203.jar
dev/poi/maven/poi-ooxml-schemas-3.9-20121203.jar.asc
dev/poi/maven/poi-ooxml-schemas-3.9-20121203.jar.md5
dev/poi/maven/poi-ooxml-schemas-3.9-20121203.jar.sha1
dev/poi/maven/poi-ooxml-schemas-3.9.pom.asc
dev/poi/maven/poi-scratchpad-3.9-20121203.jar
dev/poi/maven/poi-scratchpad-3.9-20121203.jar.asc
dev/poi/maven/poi-scratchpad-3.9-20121203.jar.md5
dev/poi/maven/poi-scratchpad-3.9-20121203.jar.sha1
dev/poi/maven/poi-scratchpad-3.9-sources-20121203.jar
dev/poi/maven/poi-scratchpad-3.9-sources-20121203.jar.asc
dev/poi/maven/poi-scratchpad-3.9-sources-20121203.jar.md5
dev/poi/maven/poi-scratchpad-3.9-sources-20121203.jar.sha1
dev/poi/maven/poi-scratchpad-3.9.pom.asc
dev/poi/src/poi-src-3.9-20121203.tar.gz
dev/poi/src/poi-src-3.9-20121203.tar.gz.asc
dev/poi/src/poi-src-3.9-20121203.tar.gz.md5
dev/poi/src/poi-src-3.9-20121203.tar.gz.sha1
dev/poi/src/poi-src-3.9-20121203.zip
dev/poi/src/poi-src-3.9-20121203.zip.asc
dev/poi/src/poi-src-3.9-20121203.zip.md5
dev/poi/src/poi-src-3.9-20121203.zip.sha1

Modified: dev/poi/bin/poi-bin-3.9-20121203.tar.gz
==
Binary files - no diff available.

Modified: dev/poi/bin/poi-bin-3.9-20121203.tar.gz.asc
==
Binary files - no diff available.

Modified: dev/poi/bin/poi-bin-3.9-20121203.tar.gz.md5
==
--- dev/poi/bin/poi-bin-3.9-20121203.tar.gz.md5 (original)
+++ dev/poi/bin/poi-bin-3.9-20121203.tar.gz.md5 Mon Nov 26 14:38:50 2012
@@ -1 +1 @@
-7f094e58310a1dff6963e5d7812acda6 *poi-bin-3.9-20121203.tar.gz
+09c4dfd63317bb9eb37fe12d6febea74 *poi-bin-3.9-20121203.tar.gz

Modified: dev/poi/bin/poi-bin-3.9-20121203.tar.gz.sha1
==
--- dev/poi/bin/poi-bin-3.9-20121203.tar.gz.sha1 (original)
+++ dev/poi/bin/poi-bin-3.9-20121203.tar.gz.sha1 Mon Nov 26 14:38:50 2012
@@ -1 +1 @@
-0840b38316eeb247f208117a838a6e400715f0b3 *poi-bin-3.9-20121203.tar.gz
+5e5747efebd65623bed5b8562b30fae24f75b198 *poi-bin-3.9-20121203.tar.gz

Modified: dev/poi/bin/poi-bin-3.9-20121203.zip
==
Binary files - no diff available.

Modified: dev/poi/bin/poi-bin-3.9-20121203.zip.asc
==
Binary files - no diff available.

Modified: dev/poi/bin/poi-bin-3.9-20121203.zip.md5

svn commit: r1413631 - /poi/tags/REL_3_9/KEYS

2012-11-26 Thread yegor
Author: yegor
Date: Mon Nov 26 14:10:51 2012
New Revision: 1413631

URL: http://svn.apache.org/viewvc?rev=1413631&view=rev
Log:
updated my GPG key

Modified:
poi/tags/REL_3_9/KEYS

Modified: poi/tags/REL_3_9/KEYS
URL: 
http://svn.apache.org/viewvc/poi/tags/REL_3_9/KEYS?rev=1413631&r1=1413630&r2=1413631&view=diff
==
--- poi/tags/REL_3_9/KEYS (original)
+++ poi/tags/REL_3_9/KEYS Mon Nov 26 14:10:51 2012
@@ -868,14 +868,14 @@ PsnsMnIHlxboIe4iFG7JOxG7GwUAniGlU9WWfXiP
 -END PGP PUBLIC KEY BLOCK-
 
 
-pub   1024D/F5BB52CD 2007-06-18 [expires: 2012-06-16]
+pub   1024D/F5BB52CD 2007-06-18
+uid      Yegor Kozlov 
 uid      Yegor Kozlov 
 uid      Yegor Kozlov 
-uid      Yegor Kozlov 
-sub   4096g/7B45A98A 2007-06-18 [expires: 2012-06-16]
+sub   4096g/7B45A98A 2007-06-18
 
 -BEGIN PGP PUBLIC KEY BLOCK-
-Version: GnuPG v1.4.5 (Cygwin)
+Version: GnuPG v1.4.9 (Cygwin)
 
 mQGiBEZ2p+oRBACNjPpUsJ6ZXK72LZCEnd+eWLBtsAbf9Gm7+NSxvxCZCdIcJZIR
 OVji/IHKa9BfsI3F3nZ2381k0Ri2qK6ZDVRZFLCFxmUjwC/oVReDNiOFVHVNZkR8
@@ -885,94 +885,93 @@ MQi4uA90RnQPJ4LJ1cg5a0nsUcctqi+kHsa58/Fd
 kqw96Wka2C1CUrsGNsAVYmTvCWyAgPJWv+Ytsn2idzIWLhyqgAVqr7bqEjiv+tr6
 aTyKA/40RzPaZNmCfWrEZUMcN02P99sm5pP0M+1w59Uvj4HssjCfM4yffp7CNMhO
 1UuXdoZMAvv2G1L8OcwPoxBqN1reo1VgjAf5LZalas8EzyOZpWWerkzpeCld9V62
-WwpTEDgcVq14jjtYFYmrtlb/WJVCqoj/oq16BbeAleNBVL6hLLQdWWVnb3IgS296
-bG92IDx5ZWdvckBkaW5vbS5ydT6IZgQTEQIAJgUCRqHo5gIbAwUJCWYBgAYLCQgH
-AwIEFQIIAwQWAgMBAh4BAheAAAoJEGk0CgL1u1LNi0cAnjlwrBi04S1AsOCBvlt8
-0y7WAHw4AJ9QCh+nf4ZFw8PsYwkgF9t3Mz7ukohGBBARAgAGBQJHO8fuAAoJEFuW
-gBDgT5qJy/MAn0ua7QAu+Pby+haQvmFAXyySEHiYAKCGDHu4I8Rd4vs5iSXYZwuG
-0n9tG4hGBBARAgAGBQJHPQeNAAoJEAC+ZrSHgCJukKwAn2FDXX6q7Ot5pKOf5SJa
-4mcslIBBAKCE3lvgkNGpwdcDw2buDHx/gDkk64hGBBARAgAGBQJHPRXwAAoJECzW
-qAMgRtD1u6cAnRmqNtY4hKCgaBGLqfV/B2sj6PcOAKCKRULmm3oScWnskoK4oOUw
-oJYLA4hGBBARAgAGBQJHPSjoAAoJEBGI6Nw6uFmLCqkAoIKIdQoiE2cNeKRWP+Rh
-ZIBsSXejAJwPSpgpyYuTFKNTksxBpVZEsq9KyIhGBBARAgAGBQJHP2FzAAoJEDk1
-+i5v0F5J4RQAn3bZUYX8/dmeven6sAoquN/eunipAJ0eap0C8URE0C2hM46EL5Ve
-Vj3C3ohGBBARAgAGBQJHQISmAAoJENbd8DHrUfu6v2kAn3fCbONV7WDjErIgzEm0
-Rnno4WsBAJ48DC3YiIVd8/PP4hGINDT7SMG+MYhxBBARAgAxBQJHPNClKhxIZW5u
-aW5nIFNjaG1pZWRlaGF1c2VuIDxocHNAaW50ZXJtZXRhLmRlPgAKCRAyhk5BnIUi
-Kw1vAJ0Sxd4DbukKcs9NFmnKLYen3MADVwCfSZMv1Bf1SjammtoROsLDdd632wiJ
-ARwEEAECAAYFAkc8ut8ACgkQGWWFUMMRBhH9dwgAoGzDlL8zFdC1q/S/HS+fkya1
-s7pBs59btEJIktaYr0fcRNPnED3UmsGfRZEqGFxpu3y7Ns/ATT+EO7092bE6bp8h
-J82PRkbvfOdEbLWOrDfFaKwMloYsibvSVHvcxHS+QxmwptrnQGo1dgLINIUdtdQp
-AH/ZpMOOmDeCr0vj/6AFLHlOWztLvTa5yh6dFkxn57TIc4JdkzIRIoo2VlhjjjJ8
-3chWj73tr7iAd6dJkJnUunhtTtpX/n1Z8ISNbZ2YtxTIa+k1de329a+8mvZHVjqS
-+bP1I+xOe/nVI4saKwl+NUA4t9XDzCzRorMt3hqhSSkuMskjGEg1Omn6QtnDWrQf
-WWVnb3IgS296bG92IDx5ZWdvckBhcGFjaGUub3JnPohlBBMRAgAmBQJGdqfqAhsD
-BQkJZgGABgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQaTQKAvW7Us2yGwCfaNfL
-l1jKr0/JgaVAk6qCaaX+5AMAmNBD6VHDE7EiulCNZm2oZB71M4aIRQQQEQIABgUC
-RzvH7gAKCRBbloAQ4E+aiX5BAJwORwD7KB4ifKRpsm3c482MsFNkowCVEtFSOLD5
-+f4R9t0QXJbrdN9cHohGBBARAgAGBQJHPQeNAAoJEAC+ZrSHgCJuqMkAniwpCGlm
-S60/zxC2oVZZGs2cNK98AKCnfV6THbOq3NjdOrrIo/6/bG4TCohGBBARAgAGBQJH
-PRXwAAoJECzWqAMgRtD1ugIAoKRUaOV2MLBXRhb52AT7IKAv7byHAKCfTU7ner/o
-yQJ+z2cK1hWBtbxUk4hGBBARAgAGBQJHPSjoAAoJEBGI6Nw6uFmL664AoKrDLjcq
-kCfELiNTTIhsaek1M3yyAJ9xD5jRKW9zGpQIjIH4s9mid9GX74hGBBARAgAGBQJH
-P2FzAAoJEDk1+i5v0F5JomAAn2xPtH7HdCE2axiUoAa1fdzYA6vtAJ9KaJwsSnCf
-9/3Y2s3AABWqcdToOohGBBARAgAGBQJHQISmAAoJENbd8DHrUfu6cvwAoKUTeXxT
-pWEdW926csuFX+jzNgULAJ0el3P9Z12xC3zbdXvS0R6J3BDkdYhxBBARAgAxBQJH
-PNClKhxIZW5uaW5nIFNjaG1pZWRlaGF1c2VuIDxocHNAaW50ZXJtZXRhLmRlPgAK
-CRAyhk5BnIUiKw1vAJ0Sxd4DbukKcs9NFmnKLYen3MADVwCfSZMv1Bf1SjammtoR
-OsLDdd632wiJARwEEAECAAYFAkc8ut8ACgkQGWWFUMMRBhHktggAjtp76nlIMXpr
-Jt04QpvMyI8J79ukY7hBN8er6UIZy2Q4i9y/AgUWF6qb3ssSoWPOABIZolhIupTC
-1CXTMVtiHYfFxpOIr1dStUvhxMGf6/lp7cjjNheKkoc4QzUHfKIWs5vAvN7qUA3d
-sq2L2JcFoasP8floWTXNpTReE2kEWkNhx0yyZWOG6YvmcIYDhB3eOO+ei0yPosTQ
-0VObrHhAH58eo/ONpqNGrauOtN8HEFq06lvozJl/T5zHE79wGayVrL7Rv3bVwnpS
-y5caTNHOAiD1VrayZzpuAMOz82E6MkbQ2YpVnX5lMTkaOXIuSc3U8cu3BHYDVpnP
-3K6sNRAIM7QlWWVnb3IgS296bG92IDx5ZWdvci5rb3psb3ZAZ21haWwuY29tPohm
-BBMRAgAmBQJHHOl/AhsDBQkJZgGABgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQ
-aTQKAvW7Us0VFQCbBhpBk7/cGrFN79SkgpyqBg6ttcEAnRHxRQ7COT4c9m1GBWir
-DuaMBPpBiEYEEBECAAYFAkc7x+kACgkQW5aAEOBPmok4+wCggbJpCeaTzQ8cORgx
-3nvaF52hrmoAn2WJluH7qjuvJ68yt9kaLuPm/wa2iEYEEBECAAYFAkc81RkACgkQ
-r9WcwWXV45qWYACeN1qluJ4cGMN+1vLRSMjmWCGzFKYAnRO/7iuMiM/3CJPQ85mE
-dlNZJ6MiiEYEEBECAAYFAkc9B40ACgkQAL5mtIeAIm677gCgnFp8wUVuMss0cgb8
-6rttjL5vbHMAn1kEGh+sANT9Kd+mofcGpryQPyFCiEYEEBECAAYFAkc9Cx8ACgkQ
-wT0w2KecbhhHPgCgtQXQrZ7Tbq3wcDTQWnVIZSIluPkAnAvzwLC4JL7y/5QyhoUo
-GCT31XYviEYEEBECAAYFAkc9FfAACgkQLNaoAyBG0PX0bwCfWGjRnBwSDVTaJzCj
-BcVXA3KOKdgAnjeg2zn/QpGP8akqrIYYg727GBQUiEYEEBECAAYFAkc/YXMACgkQ
-OTX6Lm/QXkmLoQCdHkNDnW3yQCSEm/7AZsq5KAKp5GwAniCHiB/ZXHDpWJw9dlKh
-Uxoh0o1oiEYEEBECAAYFAkdAhJwACgkQ1t3wMetR+7qRCACc

svn commit: r1413629 - /poi/trunk/KEYS

2012-11-26 Thread yegor
Author: yegor
Date: Mon Nov 26 14:10:10 2012
New Revision: 1413629

URL: http://svn.apache.org/viewvc?rev=1413629&view=rev
Log:
updated my GPG key

Modified:
poi/trunk/KEYS

Modified: poi/trunk/KEYS
URL: 
http://svn.apache.org/viewvc/poi/trunk/KEYS?rev=1413629&r1=1413628&r2=1413629&view=diff
==
--- poi/trunk/KEYS (original)
+++ poi/trunk/KEYS Mon Nov 26 14:10:10 2012
@@ -868,14 +868,14 @@ PsnsMnIHlxboIe4iFG7JOxG7GwUAniGlU9WWfXiP
 -END PGP PUBLIC KEY BLOCK-
 
 
-pub   1024D/F5BB52CD 2007-06-18 [expires: 2012-06-16]
+pub   1024D/F5BB52CD 2007-06-18
+uid      Yegor Kozlov 
 uid      Yegor Kozlov 
 uid      Yegor Kozlov 
-uid      Yegor Kozlov 
-sub   4096g/7B45A98A 2007-06-18 [expires: 2012-06-16]
+sub   4096g/7B45A98A 2007-06-18
 
 -BEGIN PGP PUBLIC KEY BLOCK-
-Version: GnuPG v1.4.5 (Cygwin)
+Version: GnuPG v1.4.9 (Cygwin)
 
 mQGiBEZ2p+oRBACNjPpUsJ6ZXK72LZCEnd+eWLBtsAbf9Gm7+NSxvxCZCdIcJZIR
 OVji/IHKa9BfsI3F3nZ2381k0Ri2qK6ZDVRZFLCFxmUjwC/oVReDNiOFVHVNZkR8
@@ -885,94 +885,93 @@ MQi4uA90RnQPJ4LJ1cg5a0nsUcctqi+kHsa58/Fd
 kqw96Wka2C1CUrsGNsAVYmTvCWyAgPJWv+Ytsn2idzIWLhyqgAVqr7bqEjiv+tr6
 aTyKA/40RzPaZNmCfWrEZUMcN02P99sm5pP0M+1w59Uvj4HssjCfM4yffp7CNMhO
 1UuXdoZMAvv2G1L8OcwPoxBqN1reo1VgjAf5LZalas8EzyOZpWWerkzpeCld9V62
-WwpTEDgcVq14jjtYFYmrtlb/WJVCqoj/oq16BbeAleNBVL6hLLQdWWVnb3IgS296
-bG92IDx5ZWdvckBkaW5vbS5ydT6IZgQTEQIAJgUCRqHo5gIbAwUJCWYBgAYLCQgH
-AwIEFQIIAwQWAgMBAh4BAheAAAoJEGk0CgL1u1LNi0cAnjlwrBi04S1AsOCBvlt8
-0y7WAHw4AJ9QCh+nf4ZFw8PsYwkgF9t3Mz7ukohGBBARAgAGBQJHO8fuAAoJEFuW
-gBDgT5qJy/MAn0ua7QAu+Pby+haQvmFAXyySEHiYAKCGDHu4I8Rd4vs5iSXYZwuG
-0n9tG4hGBBARAgAGBQJHPQeNAAoJEAC+ZrSHgCJukKwAn2FDXX6q7Ot5pKOf5SJa
-4mcslIBBAKCE3lvgkNGpwdcDw2buDHx/gDkk64hGBBARAgAGBQJHPRXwAAoJECzW
-qAMgRtD1u6cAnRmqNtY4hKCgaBGLqfV/B2sj6PcOAKCKRULmm3oScWnskoK4oOUw
-oJYLA4hGBBARAgAGBQJHPSjoAAoJEBGI6Nw6uFmLCqkAoIKIdQoiE2cNeKRWP+Rh
-ZIBsSXejAJwPSpgpyYuTFKNTksxBpVZEsq9KyIhGBBARAgAGBQJHP2FzAAoJEDk1
-+i5v0F5J4RQAn3bZUYX8/dmeven6sAoquN/eunipAJ0eap0C8URE0C2hM46EL5Ve
-Vj3C3ohGBBARAgAGBQJHQISmAAoJENbd8DHrUfu6v2kAn3fCbONV7WDjErIgzEm0
-Rnno4WsBAJ48DC3YiIVd8/PP4hGINDT7SMG+MYhxBBARAgAxBQJHPNClKhxIZW5u
-aW5nIFNjaG1pZWRlaGF1c2VuIDxocHNAaW50ZXJtZXRhLmRlPgAKCRAyhk5BnIUi
-Kw1vAJ0Sxd4DbukKcs9NFmnKLYen3MADVwCfSZMv1Bf1SjammtoROsLDdd632wiJ
-ARwEEAECAAYFAkc8ut8ACgkQGWWFUMMRBhH9dwgAoGzDlL8zFdC1q/S/HS+fkya1
-s7pBs59btEJIktaYr0fcRNPnED3UmsGfRZEqGFxpu3y7Ns/ATT+EO7092bE6bp8h
-J82PRkbvfOdEbLWOrDfFaKwMloYsibvSVHvcxHS+QxmwptrnQGo1dgLINIUdtdQp
-AH/ZpMOOmDeCr0vj/6AFLHlOWztLvTa5yh6dFkxn57TIc4JdkzIRIoo2VlhjjjJ8
-3chWj73tr7iAd6dJkJnUunhtTtpX/n1Z8ISNbZ2YtxTIa+k1de329a+8mvZHVjqS
-+bP1I+xOe/nVI4saKwl+NUA4t9XDzCzRorMt3hqhSSkuMskjGEg1Omn6QtnDWrQf
-WWVnb3IgS296bG92IDx5ZWdvckBhcGFjaGUub3JnPohlBBMRAgAmBQJGdqfqAhsD
-BQkJZgGABgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQaTQKAvW7Us2yGwCfaNfL
-l1jKr0/JgaVAk6qCaaX+5AMAmNBD6VHDE7EiulCNZm2oZB71M4aIRQQQEQIABgUC
-RzvH7gAKCRBbloAQ4E+aiX5BAJwORwD7KB4ifKRpsm3c482MsFNkowCVEtFSOLD5
-+f4R9t0QXJbrdN9cHohGBBARAgAGBQJHPQeNAAoJEAC+ZrSHgCJuqMkAniwpCGlm
-S60/zxC2oVZZGs2cNK98AKCnfV6THbOq3NjdOrrIo/6/bG4TCohGBBARAgAGBQJH
-PRXwAAoJECzWqAMgRtD1ugIAoKRUaOV2MLBXRhb52AT7IKAv7byHAKCfTU7ner/o
-yQJ+z2cK1hWBtbxUk4hGBBARAgAGBQJHPSjoAAoJEBGI6Nw6uFmL664AoKrDLjcq
-kCfELiNTTIhsaek1M3yyAJ9xD5jRKW9zGpQIjIH4s9mid9GX74hGBBARAgAGBQJH
-P2FzAAoJEDk1+i5v0F5JomAAn2xPtH7HdCE2axiUoAa1fdzYA6vtAJ9KaJwsSnCf
-9/3Y2s3AABWqcdToOohGBBARAgAGBQJHQISmAAoJENbd8DHrUfu6cvwAoKUTeXxT
-pWEdW926csuFX+jzNgULAJ0el3P9Z12xC3zbdXvS0R6J3BDkdYhxBBARAgAxBQJH
-PNClKhxIZW5uaW5nIFNjaG1pZWRlaGF1c2VuIDxocHNAaW50ZXJtZXRhLmRlPgAK
-CRAyhk5BnIUiKw1vAJ0Sxd4DbukKcs9NFmnKLYen3MADVwCfSZMv1Bf1SjammtoR
-OsLDdd632wiJARwEEAECAAYFAkc8ut8ACgkQGWWFUMMRBhHktggAjtp76nlIMXpr
-Jt04QpvMyI8J79ukY7hBN8er6UIZy2Q4i9y/AgUWF6qb3ssSoWPOABIZolhIupTC
-1CXTMVtiHYfFxpOIr1dStUvhxMGf6/lp7cjjNheKkoc4QzUHfKIWs5vAvN7qUA3d
-sq2L2JcFoasP8floWTXNpTReE2kEWkNhx0yyZWOG6YvmcIYDhB3eOO+ei0yPosTQ
-0VObrHhAH58eo/ONpqNGrauOtN8HEFq06lvozJl/T5zHE79wGayVrL7Rv3bVwnpS
-y5caTNHOAiD1VrayZzpuAMOz82E6MkbQ2YpVnX5lMTkaOXIuSc3U8cu3BHYDVpnP
-3K6sNRAIM7QlWWVnb3IgS296bG92IDx5ZWdvci5rb3psb3ZAZ21haWwuY29tPohm
-BBMRAgAmBQJHHOl/AhsDBQkJZgGABgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQ
-aTQKAvW7Us0VFQCbBhpBk7/cGrFN79SkgpyqBg6ttcEAnRHxRQ7COT4c9m1GBWir
-DuaMBPpBiEYEEBECAAYFAkc7x+kACgkQW5aAEOBPmok4+wCggbJpCeaTzQ8cORgx
-3nvaF52hrmoAn2WJluH7qjuvJ68yt9kaLuPm/wa2iEYEEBECAAYFAkc81RkACgkQ
-r9WcwWXV45qWYACeN1qluJ4cGMN+1vLRSMjmWCGzFKYAnRO/7iuMiM/3CJPQ85mE
-dlNZJ6MiiEYEEBECAAYFAkc9B40ACgkQAL5mtIeAIm677gCgnFp8wUVuMss0cgb8
-6rttjL5vbHMAn1kEGh+sANT9Kd+mofcGpryQPyFCiEYEEBECAAYFAkc9Cx8ACgkQ
-wT0w2KecbhhHPgCgtQXQrZ7Tbq3wcDTQWnVIZSIluPkAnAvzwLC4JL7y/5QyhoUo
-GCT31XYviEYEEBECAAYFAkc9FfAACgkQLNaoAyBG0PX0bwCfWGjRnBwSDVTaJzCj
-BcVXA3KOKdgAnjeg2zn/QpGP8akqrIYYg727GBQUiEYEEBECAAYFAkc/YXMACgkQ
-OTX6Lm/QXkmLoQCdHkNDnW3yQCSEm/7AZsq5KAKp5GwAniCHiB/ZXHDpWJw9dlKh
-Uxoh0o1oiEYEEBECAAYFAkdAhJwACgkQ1t3wMetR+7qRCACc

svn commit: r1032 - in /dev/poi: bin/ maven/ src/

2012-11-26 Thread yegor
Author: yegor
Date: Mon Nov 26 13:30:57 2012
New Revision: 1032

Log:
gpg signatures for POI-3.9

Added:
dev/poi/bin/poi-bin-3.9-20121203.tar.gz.asc   (with props)
dev/poi/bin/poi-bin-3.9-20121203.zip.asc   (with props)
dev/poi/maven/poi-3.9-20121203.jar.asc   (with props)
dev/poi/maven/poi-3.9-sources-20121203.jar.asc   (with props)
dev/poi/maven/poi-3.9.pom.asc   (with props)
dev/poi/maven/poi-examples-3.9-20121203.jar.asc   (with props)
dev/poi/maven/poi-examples-3.9-sources-20121203.jar.asc   (with props)
dev/poi/maven/poi-examples-3.9.pom.asc   (with props)
dev/poi/maven/poi-excelant-3.9-20121203.jar.asc   (with props)
dev/poi/maven/poi-excelant-3.9-sources-20121203.jar.asc   (with props)
dev/poi/maven/poi-excelant-3.9.pom.asc   (with props)
dev/poi/maven/poi-ooxml-3.9-20121203.jar.asc   (with props)
dev/poi/maven/poi-ooxml-3.9-sources-20121203.jar.asc   (with props)
dev/poi/maven/poi-ooxml-3.9.pom.asc   (with props)
dev/poi/maven/poi-ooxml-schemas-3.9-20121203.jar.asc   (with props)
dev/poi/maven/poi-ooxml-schemas-3.9.pom.asc   (with props)
dev/poi/maven/poi-scratchpad-3.9-20121203.jar.asc   (with props)
dev/poi/maven/poi-scratchpad-3.9-sources-20121203.jar.asc   (with props)
dev/poi/maven/poi-scratchpad-3.9.pom.asc   (with props)
dev/poi/src/poi-src-3.9-20121203.tar.gz.asc   (with props)
dev/poi/src/poi-src-3.9-20121203.zip.asc   (with props)

Added: dev/poi/bin/poi-bin-3.9-20121203.tar.gz.asc
==
Binary file - no diff available.

Propchange: dev/poi/bin/poi-bin-3.9-20121203.tar.gz.asc
--
svn:executable = *

Propchange: dev/poi/bin/poi-bin-3.9-20121203.tar.gz.asc
--
svn:mime-type = application/pgp-signature

Added: dev/poi/bin/poi-bin-3.9-20121203.zip.asc
==
Binary file - no diff available.

Propchange: dev/poi/bin/poi-bin-3.9-20121203.zip.asc
--
svn:executable = *

Propchange: dev/poi/bin/poi-bin-3.9-20121203.zip.asc
--
svn:mime-type = application/pgp-signature

Added: dev/poi/maven/poi-3.9-20121203.jar.asc
==
Binary file - no diff available.

Propchange: dev/poi/maven/poi-3.9-20121203.jar.asc
--
svn:executable = *

Propchange: dev/poi/maven/poi-3.9-20121203.jar.asc
--
svn:mime-type = application/pgp-signature

Added: dev/poi/maven/poi-3.9-sources-20121203.jar.asc
==
Binary file - no diff available.

Propchange: dev/poi/maven/poi-3.9-sources-20121203.jar.asc
--
svn:executable = *

Propchange: dev/poi/maven/poi-3.9-sources-20121203.jar.asc
--
svn:mime-type = application/pgp-signature

Added: dev/poi/maven/poi-3.9.pom.asc
==
Binary file - no diff available.

Propchange: dev/poi/maven/poi-3.9.pom.asc
--
svn:executable = *

Propchange: dev/poi/maven/poi-3.9.pom.asc
--
svn:mime-type = application/pgp-signature

Added: dev/poi/maven/poi-examples-3.9-20121203.jar.asc
==
Binary file - no diff available.

Propchange: dev/poi/maven/poi-examples-3.9-20121203.jar.asc
--
svn:executable = *

Propchange: dev/poi/maven/poi-examples-3.9-20121203.jar.asc
--
svn:mime-type = application/pgp-signature

Added: dev/poi/maven/poi-examples-3.9-sources-20121203.jar.asc
==
Binary file - no diff available.

Propchange: dev/poi/maven/poi-examples-3.9-sources-20121203.jar.asc
--
svn:executable = *

Propchange: dev/poi/maven/poi-examples-3.9-sources-20121203.jar.asc
--
svn:mime-type = application/pgp-signature

Added: dev/poi

svn commit: r1031 - /dev/poi/RELEASE-NOTES.txt

2012-11-26 Thread yegor
Author: yegor
Date: Mon Nov 26 13:11:55 2012
New Revision: 1031

Log:
updated release notes for POI-3.9

Modified:
dev/poi/RELEASE-NOTES.txt

Modified: dev/poi/RELEASE-NOTES.txt
==
--- dev/poi/RELEASE-NOTES.txt (original)
+++ dev/poi/RELEASE-NOTES.txt Mon Nov 26 13:11:55 2012
@@ -16,22 +16,6 @@
 
 Apache POI 3.9 is an incremental feature release, it is considered stable and 
recommended for production use.
 
-Release highlights:
-
-* NPOIFS:  NIO driven API to read OLE2 filesystems with low memory footprint.  
-* SXSSF:  a low-memory footprint  API built on top of XSSF that can be used 
when very large spreadsheets have to be produced, and heap space is limited
-* poi-excelant: Ant tasks for running POI against a workbook
-* Supported evaluation of new Excel formulas: 
IRR,NPV,MROUND,VAR,VARP,CLEAN,CHAR,ADDRESS,HOUR,MINUTE,SECOND,RATE,WORKDAY,NETWORKDAYS,SUMIFS,RANK
-* XSLF usermodel API:  POI's implementation of the PowerPoint 2007 OOXML 
(.xlsx) file format. XSLF provides a rich usermodel API and a PPTX2PNG utility 
to export slides to images.
-* WordToFO, WordToHtml and WordToText converters: utilities to export MS Word 
.doc files into XSL-FO, html and text files. Output from WordToFO can be used 
to convert .doc files to pdf using Apache FOP.
-
-Other notable changes:
-* Numerous improvements and refactorings in HWPF, Java API for MS Word .doc 
files: support for reading 
-  footnotes, endnotes and bookmarks, improved support for hadlings tables, 
paragraphs, text runs and much more...
-* Initial support for charts in XSSF
-* support for OOXML Agile Encryption
-
-
 A full list of changes is available in the change log: 
http://poi.apache.org/changes.html. 
 People interested should also follow the dev mailing list to track further 
progress.
 
@@ -40,8 +24,8 @@
 
 This release comes in two forms:
  - pre-built binaries containing compiled versions of all Apache POI 
components and documentation 
-   (poi-bin-3.8-20120326.zip or poi-bin-3.8-20120326.tar.gz)
- - source archive you can build POI from (poi-src-3.8-20120326.zip or 
poi-src-3.8-20120326.tar.gz)
+   (poi-bin-3.9-20121203.zip or poi-bin-3.9-20121203.tar.gz)
+ - source archive you can build POI from (poi-src-3.9-20121203.zip or 
poi-src-3.9-20121203.tar.gz)
   Unpack the archive and use  the following command to build all POI 
components with Apache Ant 1.6+ and JDK 1.5 or higher:
 
   ant jar



-
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org



svn commit: r1029 - in /dev/poi: ./ bin/ maven/ src/

2012-11-26 Thread yegor
Author: yegor
Date: Mon Nov 26 08:15:45 2012
New Revision: 1029

Log:
POI-3.9 staging files

Added:
dev/poi/RELEASE-NOTES.txt   (with props)
dev/poi/bin/
dev/poi/bin/poi-bin-3.9-20121203.tar.gz   (with props)
dev/poi/bin/poi-bin-3.9-20121203.tar.gz.md5   (with props)
dev/poi/bin/poi-bin-3.9-20121203.tar.gz.sha1   (with props)
dev/poi/bin/poi-bin-3.9-20121203.zip   (with props)
dev/poi/bin/poi-bin-3.9-20121203.zip.md5   (with props)
dev/poi/bin/poi-bin-3.9-20121203.zip.sha1   (with props)
dev/poi/maven/poi-3.9-20121203.jar   (with props)
dev/poi/maven/poi-3.9-20121203.jar.md5   (with props)
dev/poi/maven/poi-3.9-20121203.jar.sha1   (with props)
dev/poi/maven/poi-3.9-sources-20121203.jar   (with props)
dev/poi/maven/poi-3.9-sources-20121203.jar.md5   (with props)
dev/poi/maven/poi-3.9-sources-20121203.jar.sha1   (with props)
dev/poi/maven/poi-3.9.pom   (with props)
dev/poi/maven/poi-3.9.pom.md5   (with props)
dev/poi/maven/poi-3.9.pom.sha1   (with props)
dev/poi/maven/poi-examples-3.9-20121203.jar   (with props)
dev/poi/maven/poi-examples-3.9-20121203.jar.md5   (with props)
dev/poi/maven/poi-examples-3.9-20121203.jar.sha1   (with props)
dev/poi/maven/poi-examples-3.9-sources-20121203.jar   (with props)
dev/poi/maven/poi-examples-3.9-sources-20121203.jar.md5   (with props)
dev/poi/maven/poi-examples-3.9-sources-20121203.jar.sha1   (with props)
dev/poi/maven/poi-examples-3.9.pom   (with props)
dev/poi/maven/poi-examples-3.9.pom.md5   (with props)
dev/poi/maven/poi-examples-3.9.pom.sha1   (with props)
dev/poi/maven/poi-excelant-3.9-20121203.jar   (with props)
dev/poi/maven/poi-excelant-3.9-20121203.jar.md5   (with props)
dev/poi/maven/poi-excelant-3.9-20121203.jar.sha1   (with props)
dev/poi/maven/poi-excelant-3.9-sources-20121203.jar   (with props)
dev/poi/maven/poi-excelant-3.9-sources-20121203.jar.md5   (with props)
dev/poi/maven/poi-excelant-3.9-sources-20121203.jar.sha1   (with props)
dev/poi/maven/poi-excelant-3.9.pom   (with props)
dev/poi/maven/poi-excelant-3.9.pom.md5   (with props)
dev/poi/maven/poi-excelant-3.9.pom.sha1   (with props)
dev/poi/maven/poi-ooxml-3.9-20121203.jar   (with props)
dev/poi/maven/poi-ooxml-3.9-20121203.jar.md5   (with props)
dev/poi/maven/poi-ooxml-3.9-20121203.jar.sha1   (with props)
dev/poi/maven/poi-ooxml-3.9-sources-20121203.jar   (with props)
dev/poi/maven/poi-ooxml-3.9-sources-20121203.jar.md5   (with props)
dev/poi/maven/poi-ooxml-3.9-sources-20121203.jar.sha1   (with props)
dev/poi/maven/poi-ooxml-3.9.pom   (with props)
dev/poi/maven/poi-ooxml-3.9.pom.md5   (with props)
dev/poi/maven/poi-ooxml-3.9.pom.sha1   (with props)
dev/poi/maven/poi-ooxml-schemas-3.9-20121203.jar   (with props)
dev/poi/maven/poi-ooxml-schemas-3.9-20121203.jar.md5   (with props)
dev/poi/maven/poi-ooxml-schemas-3.9-20121203.jar.sha1   (with props)
dev/poi/maven/poi-ooxml-schemas-3.9.pom   (with props)
dev/poi/maven/poi-ooxml-schemas-3.9.pom.md5   (with props)
dev/poi/maven/poi-ooxml-schemas-3.9.pom.sha1   (with props)
dev/poi/maven/poi-scratchpad-3.9-20121203.jar   (with props)
dev/poi/maven/poi-scratchpad-3.9-20121203.jar.md5   (with props)
dev/poi/maven/poi-scratchpad-3.9-20121203.jar.sha1   (with props)
dev/poi/maven/poi-scratchpad-3.9-sources-20121203.jar   (with props)
dev/poi/maven/poi-scratchpad-3.9-sources-20121203.jar.md5   (with props)
dev/poi/maven/poi-scratchpad-3.9-sources-20121203.jar.sha1   (with props)
dev/poi/maven/poi-scratchpad-3.9.pom   (with props)
dev/poi/maven/poi-scratchpad-3.9.pom.md5   (with props)
dev/poi/maven/poi-scratchpad-3.9.pom.sha1   (with props)
dev/poi/src/
dev/poi/src/poi-src-3.9-20121203.tar.gz   (with props)
dev/poi/src/poi-src-3.9-20121203.tar.gz.md5   (with props)
dev/poi/src/poi-src-3.9-20121203.tar.gz.sha1   (with props)
dev/poi/src/poi-src-3.9-20121203.zip   (with props)
dev/poi/src/poi-src-3.9-20121203.zip.md5   (with props)
dev/poi/src/poi-src-3.9-20121203.zip.sha1   (with props)
Removed:
dev/poi/README.html

Added: dev/poi/RELEASE-NOTES.txt
==
--- dev/poi/RELEASE-NOTES.txt (added)
+++ dev/poi/RELEASE-NOTES.txt Mon Nov 26 08:15:45 2012
@@ -0,0 +1,57 @@
+
+The Apache POI is pleased to announce the release of POI 3.9.  The release is 
available for download at:
+
+http://poi.apache.org/download.html
+
+See the full release notes below for details about this release.
+
+Release Notes -- Apache POI -- Version 3.9
+
+Introduction
+
+
+Apache POI is well-known in the Java field as a library for reading and
+writing Microsoft Office file formats, such as Excel, PowerPoint, Visio and
+Word. See http://poi.apache.org/ for more details
+
+Apache POI 3.9 is an incremental feature release, it is considered stable

svn commit: r1413362 - in /poi/trunk: build.xml src/documentation/content/xdocs/download.xml src/documentation/content/xdocs/index.xml src/documentation/content/xdocs/status.xml

2012-11-25 Thread yegor
Author: yegor
Date: Sun Nov 25 15:22:15 2012
New Revision: 1413362

URL: http://svn.apache.org/viewvc?rev=1413362&view=rev
Log:
updated version.id and release date of POI-3.9

Modified:
poi/trunk/build.xml
poi/trunk/src/documentation/content/xdocs/download.xml
poi/trunk/src/documentation/content/xdocs/index.xml
poi/trunk/src/documentation/content/xdocs/status.xml

Modified: poi/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/build.xml?rev=1413362&r1=1413361&r2=1413362&view=diff
==
--- poi/trunk/build.xml (original)
+++ poi/trunk/build.xml Sun Nov 25 15:22:15 2012
@@ -51,7 +51,7 @@ under the License.
 
 The Apache POI project Ant build.
 
-
+
 
 
 

Modified: poi/trunk/src/documentation/content/xdocs/download.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/download.xml?rev=1413362&r1=1413361&r2=1413362&view=diff
==
--- poi/trunk/src/documentation/content/xdocs/download.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/download.xml Sun Nov 25 15:22:15 
2012
@@ -33,7 +33,7 @@
the project homepage.
   
   
-  The latest stable release is 
Apache POI 3.8
+  The latest stable release is 
Apache POI 3.9
   Archives of all prior 
releases
   
   
@@ -46,8 +46,8 @@
   
 
 
-26 March 2012 - POI 3.8 available
-  The Apache POI team is pleased to announce the release of 3.8. 
+3 December 2012 - POI 3.9 available
+  The Apache POI team is pleased to announce the release of 3.9. 
  This includes a large number of bug fixes and enhancements. 
   
   A full list of changes is available in the change log. 
@@ -55,41 +55,41 @@
   
 The POI source release as well as the pre-built binary deployment 
packages are listed below. 
 Pre-built versions of all POI 
components are available in the central Maven repository
-under Group ID "org.apache.poi" and Version "3.8".
+under Group ID "org.apache.poi" and Version "3.9".
   
   Binary Distribution
   
-http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.8-20120326.tar.gz";>poi-bin-3.8-20120326.tar.gz
 (
-  16MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.8-20120326.tar.gz.asc";>signed)
+http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.9-20121203.tar.gz";>poi-bin-3.9-20121203.tar.gz
 (
+  16MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.tar.gz.asc";>signed)
   
-  MD5 checksum: b9278ad8aed53eeb672fec66c764e371 
+  MD5 checksum: 7f094e58310a1dff6963e5d7812acda6 
   
-  SHA1 checksum: 65569f306c54a215431e8143a7a444314ce11788 
+  SHA1 checksum: 0840b38316eeb247f208117a838a6e400715f0b3 
 
-http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.8-20120326.zip";>poi-bin-3.8-20120326.zip
 (
-  23MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.8-20120326.zip.asc";>signed)
+http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.9-20121203.zip";>poi-bin-3.9-20121203.zip
 (
+  23MB, http://www.apache.org/dist/poi/release/bin/poi-bin-3.9-20121203.zip.asc";>signed)
   
-  MD5 checksum: 4f0e518baff9af70c792d86d4f21804b 
+  MD5 checksum: 8b8c46bb8edf39bb5755b9033aab508d 
   
-  SHA1 checksum: 1b9685032f7a8766cd75f061735ec4136cda1084 
+  SHA1 checksum: 53ff3ee220824a1f8b9267dee305eaa30429e28b 
 
   
   
   Source Distribution
   
-http://www.apache.org/dyn/closer.cgi/poi/release/src/poi-src-3.8-20120326.tar.gz";>poi-src-3.8-20120326.tar.gz
 (
-  43MB, http://www.apache.org/dist/poi/release/src/poi-src-3.8-20120326.tar.gz.asc";>signed)
+http://www.apache.org/dyn/closer.cgi/poi/release/src/poi-src-3.9-20121203.tar.gz";>poi-src-3.9-20121203.tar.gz
 (
+  48MB, http://www.apache.org/dist/poi/release/src/poi-src-3.9-20121203.tar.gz.asc";>signed)
   
-  MD5 checksum: 95df053d6a9f71292f2689a0170c28f6 
+  MD5 checksum: 23529f68f6055d6f9ee36a4f7fadfee4 
   
-  SHA1 checksum: 7808a30cf3600310040e451c65fc2752a1223098 
+  SHA1 checksum: 971a6177d19badc5ef87717dc04816d43cf3665b 
 
-http://www.apache.org/dyn/closer.cgi/poi/release/src/poi-src-3.8-20120326.zip";>poi-src-3.8-20120326.zip
 (
-  53MB, http://www.apache.org/dist/poi/release/src/poi-src-3.8-20120326.zip.asc";>signed)
+http://www.apache.org/dyn/closer.cgi/poi/release/src/poi-src-3.9-20121203.zip";>poi-src-

  1   2   3   4   5   6   7   8   9   10   >