pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1865249 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDDefaultAppearanceString.java
Date Thu, 15 Aug 2019 17:29:30 GMT
Author: tilman
Date: Thu Aug 15 17:29:30 2019
New Revision: 1865249

URL: http://svn.apache.org/viewvc?rev=1865249&view=rev
Log:
PDFBOX-4071: use constants

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDDefaultAppearanceString.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDDefaultAppearanceString.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDDefaultAppearanceString.java?rev=1865249&r1=1865248&r2=1865249&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDDefaultAppearanceString.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDDefaultAppearanceString.java
Thu Aug 15 17:29:30 2019
@@ -22,6 +22,7 @@ import java.util.Arrays;
 import java.util.List;
 
 import org.apache.pdfbox.contentstream.operator.Operator;
+import org.apache.pdfbox.contentstream.operator.OperatorName;
 import org.apache.pdfbox.cos.COSArray;
 import org.apache.pdfbox.cos.COSBase;
 import org.apache.pdfbox.cos.COSName;
@@ -127,12 +128,12 @@ class PDDefaultAppearanceString
     {
         switch (operator.getName())
         {
-            case "Tf":
+            case OperatorName.SET_FONT_AND_SIZE:
                 processSetFont(operands);
                 break;
-            case "g":
-            case "rg":
-            case "k":
+            case OperatorName.NON_STROKING_GRAY:
+            case OperatorName.NON_STROKING_RGB:
+            case OperatorName.NON_STROKING_CMYK:
                 processSetFontColor(operands);
                 break;
             default:



Mime
View raw message