]> source.dussan.org Git - poi.git/commitdiff
[bug-64691] rename field
authorPJ Fanning <fanningpj@apache.org>
Thu, 27 Aug 2020 09:19:43 +0000 (09:19 +0000)
committerPJ Fanning <fanningpj@apache.org>
Thu, 27 Aug 2020 09:19:43 +0000 (09:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1881237 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDataValidation.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataValidation.java

index cd180d031c814c34b1074fda886843fab0e2dab4..ca451a5d336abd46fe51bec1f5fb3778898ec92d 100644 (file)
@@ -38,7 +38,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.STDataValidationOpera
 public class XSSFDataValidation implements DataValidation {
     private static final int MAX_TEXT_LENGTH = 255;
 
-    private CTDataValidation ctDdataValidation;
+    private CTDataValidation ctDataValidation;
     private XSSFDataValidationConstraint validationConstraint;
     private CellRangeAddressList regions;
 
@@ -90,12 +90,12 @@ public class XSSFDataValidation implements DataValidation {
     public XSSFDataValidation(XSSFDataValidationConstraint constraint,CellRangeAddressList regions,CTDataValidation ctDataValidation) {
         super();
         this.validationConstraint = constraint;
-        this.ctDdataValidation = ctDataValidation;
+        this.ctDataValidation = ctDataValidation;
         this.regions = regions;
     }
  
-    CTDataValidation getCtDdataValidation() {
-        return ctDdataValidation;
+    CTDataValidation getCtDataValidation() {
+        return ctDataValidation;
     }
 
 
@@ -111,8 +111,8 @@ public class XSSFDataValidation implements DataValidation {
         if(text != null && text.length() > MAX_TEXT_LENGTH) {
             throw new IllegalStateException("Error-text cannot be longer than 255 characters, but had: " + text);
         }
-        ctDdataValidation.setErrorTitle(encodeUtf(title));
-        ctDdataValidation.setError(encodeUtf(text));
+        ctDataValidation.setErrorTitle(encodeUtf(title));
+        ctDataValidation.setError(encodeUtf(text));
     }
 
     /* (non-Javadoc)
@@ -126,8 +126,8 @@ public class XSSFDataValidation implements DataValidation {
         if(text != null && text.length() > MAX_TEXT_LENGTH) {
             throw new IllegalStateException("Error-text cannot be longer than 255 characters, but had: " + text);
         }
-        ctDdataValidation.setPromptTitle(encodeUtf(title));
-        ctDdataValidation.setPrompt(encodeUtf(text));
+        ctDataValidation.setPromptTitle(encodeUtf(title));
+        ctDataValidation.setPrompt(encodeUtf(text));
     }
 
     /**
@@ -165,63 +165,63 @@ public class XSSFDataValidation implements DataValidation {
      * @see org.apache.poi.ss.usermodel.DataValidation#getEmptyCellAllowed()
      */
     public boolean getEmptyCellAllowed() {
-        return ctDdataValidation.getAllowBlank();
+        return ctDataValidation.getAllowBlank();
     }
 
     /* (non-Javadoc)
      * @see org.apache.poi.ss.usermodel.DataValidation#getErrorBoxText()
      */
     public String getErrorBoxText() {
-        return ctDdataValidation.getError();
+        return ctDataValidation.getError();
     }
 
     /* (non-Javadoc)
      * @see org.apache.poi.ss.usermodel.DataValidation#getErrorBoxTitle()
      */
     public String getErrorBoxTitle() {
-        return ctDdataValidation.getErrorTitle();
+        return ctDataValidation.getErrorTitle();
     }
 
     /* (non-Javadoc)
      * @see org.apache.poi.ss.usermodel.DataValidation#getErrorStyle()
      */
     public int getErrorStyle() {
-        return reverseErrorStyleMappings.get(ctDdataValidation.getErrorStyle());
+        return reverseErrorStyleMappings.get(ctDataValidation.getErrorStyle());
     }
 
     /* (non-Javadoc)
      * @see org.apache.poi.ss.usermodel.DataValidation#getPromptBoxText()
      */
     public String getPromptBoxText() {
-        return ctDdataValidation.getPrompt();
+        return ctDataValidation.getPrompt();
     }
 
     /* (non-Javadoc)
      * @see org.apache.poi.ss.usermodel.DataValidation#getPromptBoxTitle()
      */
     public String getPromptBoxTitle() {
-        return ctDdataValidation.getPromptTitle();
+        return ctDataValidation.getPromptTitle();
     }
 
     /* (non-Javadoc)
      * @see org.apache.poi.ss.usermodel.DataValidation#getShowErrorBox()
      */
     public boolean getShowErrorBox() {
-        return ctDdataValidation.getShowErrorMessage();
+        return ctDataValidation.getShowErrorMessage();
     }
 
     /* (non-Javadoc)
      * @see org.apache.poi.ss.usermodel.DataValidation#getShowPromptBox()
      */
     public boolean getShowPromptBox() {
-        return ctDdataValidation.getShowInputMessage();
+        return ctDataValidation.getShowInputMessage();
     }
 
     /* (non-Javadoc)
      * @see org.apache.poi.ss.usermodel.DataValidation#getSuppressDropDownArrow()
      */
     public boolean getSuppressDropDownArrow() {
-        return !ctDdataValidation.getShowDropDown();
+        return !ctDataValidation.getShowDropDown();
     }
 
     /* (non-Javadoc)
@@ -235,28 +235,28 @@ public class XSSFDataValidation implements DataValidation {
      * @see org.apache.poi.ss.usermodel.DataValidation#setEmptyCellAllowed(boolean)
      */
     public void setEmptyCellAllowed(boolean allowed) {
-        ctDdataValidation.setAllowBlank(allowed);
+        ctDataValidation.setAllowBlank(allowed);
     }
 
     /* (non-Javadoc)
      * @see org.apache.poi.ss.usermodel.DataValidation#setErrorStyle(int)
      */
     public void setErrorStyle(int errorStyle) {
-        ctDdataValidation.setErrorStyle(errorStyleMappings.get(errorStyle));
+        ctDataValidation.setErrorStyle(errorStyleMappings.get(errorStyle));
     }
 
     /* (non-Javadoc)
      * @see org.apache.poi.ss.usermodel.DataValidation#setShowErrorBox(boolean)
      */
     public void setShowErrorBox(boolean show) {
-        ctDdataValidation.setShowErrorMessage(show);
+        ctDataValidation.setShowErrorMessage(show);
     }
 
     /* (non-Javadoc)
      * @see org.apache.poi.ss.usermodel.DataValidation#setShowPromptBox(boolean)
      */
     public void setShowPromptBox(boolean show) {
-        ctDdataValidation.setShowInputMessage(show);
+        ctDataValidation.setShowInputMessage(show);
     }
 
     /* (non-Javadoc)
@@ -264,7 +264,7 @@ public class XSSFDataValidation implements DataValidation {
      */
     public void setSuppressDropDownArrow(boolean suppress) {
         if (validationConstraint.getValidationType()==ValidationType.LIST) {
-            ctDdataValidation.setShowDropDown(!suppress);
+            ctDataValidation.setShowDropDown(!suppress);
         }
     }
 
index 954803bb86b6bb2197a2858dc68d85af082c78b9..cce5bb2b90bfe13ea00a222fe42ab134545966fb 100644 (file)
@@ -4037,7 +4037,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet  {
         }
         int currentCount = dataValidations.sizeOfDataValidationArray();
         CTDataValidation newval = dataValidations.addNewDataValidation();
-        newval.set(xssfDataValidation.getCtDdataValidation());
+        newval.set(xssfDataValidation.getCtDataValidation());
         dataValidations.setCount(currentCount + 1L);
 
     }
index 8a6e791b45396516c866b528fc9af24c40f07012..8e59366351647f222234704640856a6df3d87649 100644 (file)
@@ -325,7 +325,7 @@ public class TestXSSFDataValidation extends BaseTestDataValidation {
             sheet.addValidationData(validation);
 
             final List<XSSFDataValidation> dataValidations = sheet.getDataValidations();
-            assertTrue(dataValidations.get(0).getCtDdataValidation().getAllowBlank());
+            assertTrue(dataValidations.get(0).getCtDataValidation().getAllowBlank());
         }
     }
 
@@ -335,12 +335,12 @@ public class TestXSSFDataValidation extends BaseTestDataValidation {
             XSSFSheet sheet = wb.createSheet();
 
             final XSSFDataValidation validation = createValidation(sheet);
-            validation.getCtDdataValidation().setAllowBlank(false);
+            validation.getCtDataValidation().setAllowBlank(false);
 
             sheet.addValidationData(validation);
 
             final List<XSSFDataValidation> dataValidations = sheet.getDataValidations();
-            assertFalse(dataValidations.get(0).getCtDdataValidation().getAllowBlank());
+            assertFalse(dataValidations.get(0).getCtDataValidation().getAllowBlank());
         }
     }
 
@@ -350,12 +350,12 @@ public class TestXSSFDataValidation extends BaseTestDataValidation {
             XSSFSheet sheet = wb.createSheet();
 
             final XSSFDataValidation validation = createValidation(sheet);
-            validation.getCtDdataValidation().setAllowBlank(true);
+            validation.getCtDataValidation().setAllowBlank(true);
 
             sheet.addValidationData(validation);
 
             final List<XSSFDataValidation> dataValidations = sheet.getDataValidations();
-            assertTrue(dataValidations.get(0).getCtDdataValidation().getAllowBlank());
+            assertTrue(dataValidations.get(0).getCtDataValidation().getAllowBlank());
         }
     }