Skip to content

Commit 4549b99

Browse files
committed
Remove deprecated code in kernel module
DEVSIX-7279
1 parent 51bd796 commit 4549b99

File tree

6 files changed

+1
-351
lines changed

6 files changed

+1
-351
lines changed

kernel/src/main/java/com/itextpdf/kernel/exceptions/KernelExceptionMessageConstant.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,12 +353,8 @@ public final class KernelExceptionMessageConstant {
353353
public static final String UNBALANCED_SAVE_RESTORE_STATE_OPERATORS = "Unbalanced save restore state operators.";
354354
public static final String UNEXPECTED_CHARACTER_FOUND_AFTER_ID_IN_INLINE_IMAGE = "Unexpected character {0} "
355355
+ "found after ID in inline image.";
356-
@Deprecated
357-
public static final String UNEXPECTED_CLOSE_BRACKET = "Unexpected close bracket.";
358356
public static final String UNEXPECTED_COLOR_SPACE = "Unexpected ColorSpace: {0}.";
359357
public static final String UNEXPECTED_END_OF_FILE = "Unexpected end of file.";
360-
@Deprecated
361-
public static final String UNEXPECTED_GT_GT = "unexpected >>.";
362358
public static final String UNEXPECTED_TOKEN = "unexpected {0} was encountered.";
363359
public static final String UNEXPECTED_SHADING_TYPE = "Unexpected shading type.";
364360
public static final String UNKNOWN_ENCRYPTION_TYPE_R = "Unknown encryption type R == {0}.";

kernel/src/main/java/com/itextpdf/kernel/font/PdfType0Font.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -258,33 +258,6 @@ public static String getUniMapFromOrdering(String ordering, boolean horizontal)
258258
return result + 'V';
259259
}
260260

261-
/**
262-
* Get Unicode mapping name from ordering.
263-
* @param ordering the text ordering to base to unicode mapping on
264-
*
265-
* @return Unicode mapping name
266-
*
267-
* @deprecated Replaced by {@link #getUniMapFromOrdering(String, boolean)}
268-
* for proper handling of IDENTITY_V encoding.
269-
*/
270-
@Deprecated
271-
public static String getUniMapFromOrdering(String ordering) {
272-
switch (ordering) {
273-
case "CNS1":
274-
return "UniCNS-UTF16-H";
275-
case "Japan1":
276-
return "UniJIS-UTF16-H";
277-
case "Korea1":
278-
return "UniKS-UTF16-H";
279-
case "GB1":
280-
return "UniGB-UTF16-H";
281-
case "Identity":
282-
return "Identity-H";
283-
default:
284-
return null;
285-
}
286-
}
287-
288261
@Override
289262
public Glyph getGlyph(int unicode) {
290263
// TODO handle unicode value with cmap and use only glyphByCode

kernel/src/main/java/com/itextpdf/kernel/pdf/PdfDocument.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,21 +1936,6 @@ protected void initTagStructureContext() {
19361936
tagStructureContext = new TagStructureContext(this);
19371937
}
19381938

1939-
1940-
/**
1941-
* Save the link annotation in a temporary storage for further copying.
1942-
* Save destinations in a temporary storage for further copying.
1943-
*
1944-
* @param page just copied {@link PdfPage} link annotation belongs to.
1945-
* @param annotation {@link PdfLinkAnnotation} itself.
1946-
*
1947-
* @deprecated will be removed in next major version, it is being replaced with
1948-
* storeDestinationToReaddress
1949-
*/
1950-
@Deprecated
1951-
protected void storeLinkAnnotation(PdfPage page, PdfLinkAnnotation annotation) {
1952-
}
1953-
19541939
/**
19551940
* Save destinations in a temporary storage for further copying.
19561941
*

kernel/src/main/java/com/itextpdf/kernel/pdf/canvas/PdfCanvas.java

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,28 +2038,6 @@ public PdfCanvas addXObjectAt(PdfXObject xObject, float x, float y) {
20382038
}
20392039
}
20402040

2041-
/**
2042-
* Adds {@link PdfXObject} to the specified position in the case of {@link PdfImageXObject}
2043-
* or moves to the specified offset in the case of {@link PdfFormXObject}.
2044-
*
2045-
* @param xObject the xObject to add
2046-
* @param x the horizontal offset of the formXObject position or the horizontal position of the imageXObject
2047-
* @param y the vertical offset of the formXObject position or the vertical position of the imageXObject
2048-
* @return the current canvas
2049-
* @deprecated will be removed in 7.2, use {@link #addXObjectAt(PdfXObject, float, float)} instead
2050-
*/
2051-
@Deprecated
2052-
//TODO DEVSIX-5729 Remove deprecated api in PdfCanvas
2053-
public PdfCanvas addXObject(PdfXObject xObject, float x, float y) {
2054-
if (xObject instanceof PdfFormXObject) {
2055-
return addForm((PdfFormXObject) xObject, x, y);
2056-
} else if (xObject instanceof PdfImageXObject) {
2057-
return addImageAt((PdfImageXObject) xObject, x, y);
2058-
} else {
2059-
throw new IllegalArgumentException("PdfFormXObject or PdfImageXObject expected.");
2060-
}
2061-
}
2062-
20632041
/**
20642042
* Adds {@link PdfXObject} fitted into specific rectangle on canvas.
20652043
*
@@ -2332,21 +2310,6 @@ private PdfCanvas addFormAt(PdfFormXObject form, float x, float y) {
23322310
return addFormWithTransformationMatrix(form, result[0], result[1], result[2], result[3], result[4], result[5], false);
23332311
}
23342312

2335-
/**
2336-
* Adds {@link PdfFormXObject} to the canvas and moves to the specified offset.
2337-
*
2338-
* @param form the formXObject to add
2339-
* @param x the horizontal offset of the formXObject position
2340-
* @param y the vertical offset of the formXObject position
2341-
* @return the current canvas
2342-
* @deprecated will be removed in 7.2, use {@link #addFormAt(PdfFormXObject, float, float)} instead
2343-
*/
2344-
@Deprecated
2345-
//TODO DEVSIX-5729 Remove deprecated api in PdfCanvas
2346-
private PdfCanvas addForm(PdfFormXObject form, float x, float y) {
2347-
return addFormWithTransformationMatrix(form, 1, 0, 0, 1, x, y, true);
2348-
}
2349-
23502313
/**
23512314
* Adds {@link PdfFormXObject} fitted into specific rectangle on canvas.
23522315
*

kernel/src/main/java/com/itextpdf/kernel/pdf/function/PdfFunction.java

Lines changed: 0 additions & 267 deletions
This file was deleted.

kernel/src/main/java/com/itextpdf/kernel/xmp/options/IteratorOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public final class IteratorOptions extends Options
4646
public static final int JUST_LEAFNODES = 0x0200;
4747
/** Return just the leaf part of the path, default is the full path. */
4848
public static final int JUST_LEAFNAME = 0x0400;
49-
// /** Include aliases, default is just actual properties. <em>Note:</em> Not supported.
49+
// /** Include aliases, default is just actual properties. <em>Note:</em> Not supported.
5050
// * @deprecated it is commonly preferred to work with the base properties */
5151
// public static final int INCLUDE_ALIASES = 0x0800;
5252
/** Omit all qualifiers. */

0 commit comments

Comments
 (0)