summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-19 16:21:46 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-19 16:22:04 +0000
commit843e2a9dd6127bf7b5b9adde2ef01451449f0ba3 (patch)
tree6805800cee1cef78cd22022f672c3817618380e0 /wizards/com/sun/star/wizards/ui
parent9e82befc72c5af36cf093f68eab31f837657ea1c (diff)
get rid of second hicontrast argument
Change-Id: If68b6c8dac5ea4ff50edf90f2b1b8dbc2e0383b4
Diffstat (limited to 'wizards/com/sun/star/wizards/ui')
-rw-r--r--wizards/com/sun/star/wizards/ui/ButtonList.java18
-rw-r--r--wizards/com/sun/star/wizards/ui/ImageList.py16
2 files changed, 11 insertions, 23 deletions
diff --git a/wizards/com/sun/star/wizards/ui/ButtonList.java b/wizards/com/sun/star/wizards/ui/ButtonList.java
index f2aa6eabd094..3bb1489f36ae 100644
--- a/wizards/com/sun/star/wizards/ui/ButtonList.java
+++ b/wizards/com/sun/star/wizards/ui/ButtonList.java
@@ -288,17 +288,10 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
Object oObj = getObjectFor(i);
if (oObj == null)
continue;
- Object[] oResources = renderer.getImageUrls(oObj);
- if (oResources == null)
+ Object oResource = renderer.getImageUrl(oObj);
+ if (oResource == null)
continue;
- if (oResources.length == 1)
- {
- Helper.setUnoPropertyValue(m_aButtons[i].getModel(), PropertyNames.PROPERTY_IMAGEURL, oResources[0]);
- }
- else if (oResources.length == 2)
- {
- oUnoDialog.getPeerConfiguration().setImageUrl(m_aButtons[i].getModel(), oResources[0]);
- }
+ oUnoDialog.getPeerConfiguration().setImageUrl(m_aButtons[i].getModel(), oResource);
boolean bTabStop = Boolean.TRUE; // focusable ? Boolean.TRUE : Boolean.FALSE;
Helper.setUnoPropertyValue(m_aButtons[i].getModel(), "Tabstop", bTabStop);
if (refreshOverNull)
@@ -533,10 +526,9 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener
{
/**
- * @return two resource ids for an image referenced in the imaglist resourcefile of the
- * wizards project; The second one of them is designed to be used for High Contrast Mode.
+ * @return a resource ids for an image referenced in the resourcefile of the wizards project
*/
- Object[] getImageUrls(Object listItem);
+ Object getImageUrl(Object listItem);
}
private static class SimpleCounterRenderer implements IRenderer
diff --git a/wizards/com/sun/star/wizards/ui/ImageList.py b/wizards/com/sun/star/wizards/ui/ImageList.py
index 5d7dd792299e..2e65eec55dae 100644
--- a/wizards/com/sun/star/wizards/ui/ImageList.py
+++ b/wizards/com/sun/star/wizards/ui/ImageList.py
@@ -224,13 +224,10 @@ class ImageList(ListDataListener):
focusable = True
for index, item in enumerate(self.m_aImages):
- oResources = self.renderer.getImageUrls(self.getObjectFor(index))
- if oResources is not None:
- if len(oResources) == 1:
- item.Model.ImageURL = oResources[0]
- elif len(oResources) == 2:
- self.oUnoDialog.getPeerConfiguration().setImageUrl(
- item.Model, oResources[0])
+ oResource = self.renderer.getImageUrl(self.getObjectFor(index))
+ if oResource is not None:
+ self.oUnoDialog.getPeerConfiguration().setImageUrl(
+ item.Model, oResource)
item.Model.Tabstop = bool(focusable)
if self.refreshOverNull:
@@ -450,10 +447,9 @@ class ImageList(ListDataListener):
class IImageRenderer(IRenderer):
# @param listItem
- # @return two resource ids for an image referenced in the imaglist resourcefile of the
- # wizards project; The second one of them is designed to be used for High Contrast Mode.
+ # @return resource id for an image referenced in the resourcefile of the wizards project
@abstractmethod
- def getImageUrls(self, listItem):
+ def getImageUrl(self, listItem):
pass
class SimpleCounterRenderer(IRenderer):