提交 40482472 编写于 作者: J jgodinez

7022228: JPRT failure: RuntimeException in SupportedMedia regression test

Reviewed-by: igor, prr
上级 abcef7b4
......@@ -273,6 +273,20 @@ public class Win32PrintService implements PrintService, AttributeUpdater,
return DMPAPER_B6_JIS;
}
}
// If not found in predefined Windows ID, then we search through
// the returned IDs of the driver because they can define their own
// unique IDs.
initMedia();
if ((idList != null) && (mediaSizes != null) &&
(idList.size() == mediaSizes.length)) {
for (int i=0; i< idList.size(); i++) {
if (mediaSizes[i].getMediaSizeName() == msn) {
return ((Integer)idList.get(i)).intValue();
}
}
}
return 0;
}
......@@ -439,7 +453,7 @@ public class Win32PrintService implements PrintService, AttributeUpdater,
if (mediaName != null) {
int defPaper = findPaperID(mediaName);
float[] prnArea = getMediaPrintableArea(printer, defPaper);
float[] prnArea = (defPaper != 0) ? getMediaPrintableArea(printer, defPaper) : null;
MediaPrintableArea printableArea = null;
if (prnArea != null) {
try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册