aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml/testcases/org/apache/poi
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2011-03-04 14:38:13 +0000
committerNick Burch <nick@apache.org>2011-03-04 14:38:13 +0000
commit5185ad3b5a22e5dc1161dd00f853c299f128e01a (patch)
tree5f8c645bb9646e9522e24f42930a1f2417cf1e63 /src/ooxml/testcases/org/apache/poi
parent3d5c4eed5c7c804aa502910bd44130b2a7af425a (diff)
downloadpoi-5185ad3b5a22e5dc1161dd00f853c299f128e01a.tar.gz
poi-5185ad3b5a22e5dc1161dd00f853c299f128e01a.zip
Hopefully fix bug #50846 - Improve how XSSFColor inherits from Themes, by pushing the logic out of XSSFCellStyle and into ThemesTable + make it easier to call
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1077968 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/testcases/org/apache/poi')
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java13
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java4
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFColor.java14
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/extensions/TestXSSFBorder.java2
4 files changed, 16 insertions, 17 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
index 3b17b9ac0d..465d164c26 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
@@ -726,6 +726,19 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
}
/**
+ * If the border colours are set with themes, then we
+ * should still be able to get colours
+ */
+ public void test50846() throws Exception {
+ // TODO Get file and test
+ //Workbook wb = XSSFTestDataSamples.openSampleWorkbook("50846.xlsx");
+
+ // Check the style that is theme based
+
+ // Check the one that isn't
+ }
+
+ /**
* Fonts where their colours come from the theme rather
* then being set explicitly still should allow the
* fetching of the RGB.
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java
index 02b34ae85e..83edc8f2f4 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCellStyle.java
@@ -59,11 +59,11 @@ public class TestXSSFCellStyle extends TestCase {
ctStylesheet = stylesTable.getCTStylesheet();
ctBorderA = CTBorder.Factory.newInstance();
- XSSFCellBorder borderA = new XSSFCellBorder(ctBorderA);
+ XSSFCellBorder borderA = new XSSFCellBorder(ctBorderA, null);
long borderId = stylesTable.putBorder(borderA);
assertEquals(1, borderId);
- XSSFCellBorder borderB = new XSSFCellBorder();
+ XSSFCellBorder borderB = new XSSFCellBorder(null);
assertEquals(1, stylesTable.putBorder(borderB));
ctFill = CTFill.Factory.newInstance();
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFColor.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFColor.java
index 17b1d0d547..60dfb4f97d 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFColor.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFColor.java
@@ -19,21 +19,7 @@ package org.apache.poi.xssf.usermodel;
import junit.framework.TestCase;
-import org.apache.poi.ss.usermodel.*;
-import org.apache.poi.xssf.XSSFITestDataProvider;
import org.apache.poi.xssf.XSSFTestDataSamples;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTBooleanProperty;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColor;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontName;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontScheme;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFontSize;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTIntProperty;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTUnderlineProperty;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTVerticalAlignFontProperty;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.STFontScheme;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.STUnderlineValues;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.STVerticalAlignRun;
public final class TestXSSFColor extends TestCase {
public void testIndexedColour() throws Exception {
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/extensions/TestXSSFBorder.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/extensions/TestXSSFBorder.java
index e7233c227e..46af27d59d 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/extensions/TestXSSFBorder.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/extensions/TestXSSFBorder.java
@@ -40,7 +40,7 @@ public class TestXSSFBorder extends TestCase {
right.setStyle(STBorderStyle.NONE);
bottom.setStyle(STBorderStyle.THIN);
- XSSFCellBorder cellBorderStyle = new XSSFCellBorder(border);
+ XSSFCellBorder cellBorderStyle = new XSSFCellBorder(border, null);
assertEquals("DASH_DOT", cellBorderStyle.getBorderStyle(BorderSide.TOP).toString());
assertEquals("NONE", cellBorderStyle.getBorderStyle(BorderSide.RIGHT).toString());