+++ /dev/null
-/* ====================================================================
- 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.hssf.util;
-
-import org.apache.poi.ss.SpreadsheetVersion;
-
-/**
- * @deprecated POI 3.15 beta 3. Use {@link org.apache.poi.ss.util.AreaReference} instead.
- */
-@Deprecated
-public final class AreaReference extends org.apache.poi.ss.util.AreaReference {
- /**
- * Create an area ref from a string representation. Sheet names containing special characters should be
- * delimited and escaped as per normal syntax rules for formulas.<br>
- * The area reference must be contiguous (i.e. represent a single rectangle, not a union of rectangles)
- */
- public AreaReference(String reference) {
- super(reference, SpreadsheetVersion.EXCEL97);
- }
-
- /**
- * Creates an area ref from a pair of Cell References.
- * Also normalises such that the top-left
- */
- public AreaReference(CellReference topLeft, CellReference botRight) {
- super(topLeft, botRight);
- }
-}
/**
* Various utility functions that make working with a region of cells easier.
- * @deprecated POI 3.18
+ * @deprecated POI 4.0.0
* @see RegionUtil
*/
-@Removal(version="3.20")
+@Removal(version="4.2")
public final class HSSFRegionUtil {
private HSSFRegionUtil() {
+++ /dev/null
-/* ====================================================================
- 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.hssf.util;
-
-/**
- * Holds information regarding a split plane or freeze plane for a sheet.
- * @deprecated POI 3.15 beta 3. Use {@link org.apache.poi.ss.util.PaneInformation} instead.
- */
-public class PaneInformation extends org.apache.poi.ss.util.PaneInformation
-{
- public PaneInformation(short x, short y, short top, short left, byte active, boolean frozen) {
- super(x, y, top, left, active, frozen);
- }
-
-}
package org.apache.poi.ss.formula.ptg;
-import org.apache.poi.ss.SpreadsheetVersion;
import org.apache.poi.ss.util.AreaReference;
import org.apache.poi.util.LittleEndianInput;
-import org.apache.poi.util.Removal;
/**
* Specifies a rectangular area of cells A1:A4 for instance.
public AreaPtg(LittleEndianInput in) {
super(in);
}
-
- /**
- * @deprecated use {@link #AreaPtg(AreaReference)} instead
- */
- @Deprecated()
- @Removal(version="3.19")
- public AreaPtg(String arearef) {
- this(new AreaReference(arearef, SpreadsheetVersion.EXCEL97));
- }
public AreaPtg(AreaReference arearef) {
super(arearef);
import java.util.StringTokenizer;
import org.apache.poi.ss.SpreadsheetVersion;
-import org.apache.poi.util.Removal;
public class AreaReference {
}
return true;
}
-
- /**
- * Creates an area ref from a pair of Cell References.
- * @deprecated use {@link #AreaReference(CellReference, CellReference, SpreadsheetVersion)} instead
- */
- @Deprecated
- @Removal(version="3.19")
- public AreaReference(CellReference topLeft, CellReference botRight) {
- this(topLeft, botRight, DEFAULT_SPREADSHEET_VERSION);
- }
/**
* Creates an area ref from a pair of Cell References.
return isWholeColumnReference(_version, _firstCell, _lastCell);
}
- /**
- * Takes a non-contiguous area reference, and returns an array of contiguous area references
- * @return an array of contiguous area references.
- * @deprecated use {@link #generateContiguous(SpreadsheetVersion, String)} instead
- */
- @Deprecated
- @Removal(version="3.19")
- public static AreaReference[] generateContiguous(String reference) {
- return generateContiguous(DEFAULT_SPREADSHEET_VERSION, reference);
- }
-
/**
* Takes a non-contiguous area reference, and returns an array of contiguous area references
* @return an array of contiguous area references.
package org.apache.poi.xssf.usermodel;
import org.apache.poi.ss.usermodel.Shape;
-import org.apache.poi.util.Removal;
import org.apache.poi.util.Units;
import org.openxmlformats.schemas.drawingml.x2006.main.CTLineProperties;
import org.openxmlformats.schemas.drawingml.x2006.main.CTNoFillProperties;
* Represents a shape in a SpreadsheetML drawing.
*/
public abstract class XSSFShape implements Shape {
- /**
- * @deprecated POI 3.17 beta 1
- * @see Units#EMU_PER_PIXEL
- */
- @Removal(version="3.19")
- public static final int EMU_PER_PIXEL = Units.EMU_PER_PIXEL;
-
- /**
- * @deprecated POI 3.17 beta 1
- * @see Units#EMU_PER_POINT
- */
- @Removal(version="3.19")
- public static final int EMU_PER_POINT = Units.EMU_PER_POINT;
-
- /**
- * @deprecated POI 3.17 beta 1
- * @see Units#POINT_DPI
- */
- @Removal(version="3.19")
- public static final int POINT_DPI = Units.POINT_DPI;
-
- /**
- * @deprecated POI 3.17 beta 1
- * @see Units#PIXEL_DPI
- */
- @Removal(version="3.19")
- public static final int PIXEL_DPI = Units.PIXEL_DPI;
/**
* Parent drawing
confirmWholeColumnRef("AD:$AE", 29, 30, false, true);
}
- @SuppressWarnings("deprecation")
- public void testDeprecatedMethod() {
- String refSimple = "$C$10:$C$10";
- AreaReference[] arefs1 = AreaReference.generateContiguous(SpreadsheetVersion.EXCEL97, refSimple);
- AreaReference[] arefs2 = AreaReference.generateContiguous(refSimple);
- assertEquals(1, arefs1.length);
- assertEquals(arefs1.length, arefs2.length);
- assertEquals(arefs1[0].formatAsString(), arefs2[0].formatAsString());
- }
-
private static void confirmWholeColumnRef(String ref, int firstCol, int lastCol, boolean firstIsAbs, boolean lastIsAbs) {
AreaReference ar = new AreaReference(ref, SpreadsheetVersion.EXCEL97);
confirmCell(ar.getFirstCell(), 0, firstCol, true, firstIsAbs);
import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
+import org.apache.poi.ss.SpreadsheetVersion;
import org.apache.poi.ss.formula.ptg.AreaPtg;
import org.apache.poi.ss.formula.functions.EvalFactory;
+import org.apache.poi.ss.util.AreaReference;
/**
* Tests for <tt>AreaEval</tt>
public void testGetValue_bug44950() {
// TODO - this test probably isn't testing much anymore
- AreaPtg ptg = new AreaPtg("B2:D3");
+ AreaPtg ptg = new AreaPtg(new AreaReference("B2:D3", SpreadsheetVersion.EXCEL97));
NumberEval one = new NumberEval(1);
ValueEval[] values = {
one,
package org.apache.poi.ss.formula.functions;
+import org.apache.poi.ss.SpreadsheetVersion;
import org.apache.poi.ss.formula.TwoDEval;
import org.apache.poi.ss.formula.eval.AreaEval;
import org.apache.poi.ss.formula.eval.AreaEvalBase;
import org.apache.poi.ss.formula.ptg.AreaPtg;
import org.apache.poi.ss.formula.ptg.Ref3DPtg;
import org.apache.poi.ss.formula.ptg.RefPtg;
+import org.apache.poi.ss.util.AreaReference;
/**
* Test helper class for creating mock <code>Eval</code> objects
* @param values empty (<code>null</code>) entries in this array will be converted to NumberEval.ZERO
*/
public static AreaEval createAreaEval(String areaRefStr, ValueEval[] values) {
- AreaPtg areaPtg = new AreaPtg(areaRefStr);
+ AreaPtg areaPtg = new AreaPtg(new AreaReference(areaRefStr, SpreadsheetVersion.EXCEL2007));
return createAreaEval(areaPtg, values);
}
import org.apache.poi.hssf.model.HSSFFormulaParser;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.SpreadsheetVersion;
+import org.apache.poi.ss.util.AreaReference;
/**
* Tests for {@link AreaPtg}.
}
public static void testSortTopLeftToBottomRight() {
- AreaPtg ptg = new AreaPtg("A$1:$B5");
+ AreaPtg ptg = new AreaPtg(new AreaReference("A$1:$B5", SpreadsheetVersion.EXCEL2007));
assertEquals("A$1:$B5", ptg.toFormulaString());
ptg.setFirstColumn(3);
assertEquals("Area Ptg should not implicitly re-sort itself (except during construction)",