Provide more output when failing range-checks on HSL2RGB-construction
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1694960 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
750558d8d9
commit
e7f4d132f1
@ -97,7 +97,7 @@ public class XSLFFileHandler extends AbstractFileHandler {
|
|||||||
// a test-case to test this locally without executing the full TestAllFiles
|
// a test-case to test this locally without executing the full TestAllFiles
|
||||||
@Test
|
@Test
|
||||||
public void test() throws Exception {
|
public void test() throws Exception {
|
||||||
InputStream stream = new FileInputStream("test-data/slideshow/SampleShow.pptx");
|
InputStream stream = new FileInputStream("test-data/slideshow/ae.ac.uaeu.faculty_nafaachbili_GeomLec1.pptx");
|
||||||
try {
|
try {
|
||||||
handleFile(stream);
|
handleFile(stream);
|
||||||
} finally {
|
} finally {
|
||||||
@ -105,10 +105,9 @@ public class XSLFFileHandler extends AbstractFileHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// a test-case to test this locally without executing the full TestAllFiles
|
// a test-case to test this locally without executing the full TestAllFiles
|
||||||
@Test
|
@Test
|
||||||
public void testExtractor() throws Exception {
|
public void testExtractor() throws Exception {
|
||||||
handleExtracting(new File("test-data/slideshow/testPPT.thmx"));
|
handleExtracting(new File("test-data/slideshow/ae.ac.uaeu.faculty_nafaachbili_GeomLec1.pptx"));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -357,17 +357,17 @@ public class DrawPaint {
|
|||||||
*/
|
*/
|
||||||
private static Color HSL2RGB(double h, double s, double l, double alpha) {
|
private static Color HSL2RGB(double h, double s, double l, double alpha) {
|
||||||
if (s <0.0f || s > 100.0f) {
|
if (s <0.0f || s > 100.0f) {
|
||||||
String message = "Color parameter outside of expected range - Saturation";
|
String message = "Color parameter outside of expected range - Saturation: " + s;
|
||||||
throw new IllegalArgumentException( message );
|
throw new IllegalArgumentException( message );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (l <0.0f || l > 100.0f) {
|
if (l <0.0f || l > 100.0f) {
|
||||||
String message = "Color parameter outside of expected range - Luminance";
|
String message = "Color parameter outside of expected range - Luminance: " + l;
|
||||||
throw new IllegalArgumentException( message );
|
throw new IllegalArgumentException( message );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (alpha <0.0f || alpha > 1.0f) {
|
if (alpha <0.0f || alpha > 1.0f) {
|
||||||
String message = "Color parameter outside of expected range - Alpha";
|
String message = "Color parameter outside of expected range - Alpha: " + alpha;
|
||||||
throw new IllegalArgumentException( message );
|
throw new IllegalArgumentException( message );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user