summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-09-08 13:12:11 +0000
committerOliver Bolte <obo@openoffice.org>2004-09-08 13:12:11 +0000
commitcd4e793218d5a4ae85320ac54e7081874268b8e7 (patch)
treefffd63ec85ff5009e434cb7d5f7abfe73243f443
parentd017221a38e1d52bc0700211e0abf6532dc4861a (diff)
INTEGRATION: CWS qwizards2 (1.2.2); FILE MERGED
2004/07/19 13:46:28 rpiterman 1.2.2.2: Bugfix: dialog now returns null (instead of crushing) when "none" is selected. 2004/06/11 15:40:27 rpiterman 1.2.2.1: renderer changed to return "" when object given is null. Issue number: 116967 Submitted by: rpiterman
-rw-r--r--wizards/com/sun/star/wizards/web/IconsDialog.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/wizards/com/sun/star/wizards/web/IconsDialog.java b/wizards/com/sun/star/wizards/web/IconsDialog.java
index 8c38174284e3..766813b10462 100644
--- a/wizards/com/sun/star/wizards/web/IconsDialog.java
+++ b/wizards/com/sun/star/wizards/web/IconsDialog.java
@@ -2,9 +2,9 @@
*
* $RCSfile: IconsDialog.java,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: kz $ $Date: 2004-05-19 13:12:06 $
+ * last change: $Author: obo $ $Date: 2004-09-08 14:12:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -132,7 +132,10 @@ public class IconsDialog extends ImageListDialog implements ImageList.ImageRende
public String getIconset() {
- return (String) set.getKey( ((Number)getSelected()).intValue() / icons.length );
+ if (getSelected() == null)
+ return null;
+ else
+ return (String) set.getKey( ((Number)getSelected()).intValue() / icons.length );
}
public void setIconset(String iconset) {
@@ -182,6 +185,8 @@ public class IconsDialog extends ImageListDialog implements ImageList.ImageRende
* @see com.sun.star.wizards.common.Renderer#render(java.lang.Object)
*/
public String render(Object object) {
+ if (object == null)
+ return "";
int i = ((Number)object).intValue();
int iset = getIconsetNum(i);
return getIconset(iset).cp_Name;