pdfbox-commits mailing list archives

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

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

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

Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDDefaultAppearanceString.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDDefaultAppearanceString.java?rev=1865250&r1=1865249&r2=1865250&view=diff
==============================================================================
--- pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDDefaultAppearanceString.java
(original)
+++ pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDDefaultAppearanceString.java
Thu Aug 15 17:29:35 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,19 +128,19 @@ class PDDefaultAppearanceString
     {
         String name = operator.getName();
         
-        if ("Tf".equals(name))
+        if (OperatorName.SET_FONT_AND_SIZE.equals(name))
         {
             processSetFont(operands);
         }
-        else if ("g".equals(name))
+        else if (OperatorName.NON_STROKING_GRAY.equals(name))
         {
             processSetFontColor(operands);
         }
-        else if ("rg".equals(name))
+        else if (OperatorName.NON_STROKING_RGB.equals(name))
         {
             processSetFontColor(operands);
         }
-        else if ("k".equals(name))
+        else if (OperatorName.NON_STROKING_CMYK.equals(name))
         {
             processSetFontColor(operands);
         }



Mime
View raw message