[Libreoffice-commits] .: wizards/com
wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java | 45 +++--- 1 file changed, 32 insertions(+), 13 deletions(-) New commits: commit ab6273ecece70432f3da35807b5484d9bfe91fdd Author: Szabolcs Dezsi dezsisz...@hotmail.com Date: Sun Mar 4 00:57:53 2012 +0100 Dropdown list in Letter Wizard are now ordered alphabetically diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java index 736233c..55a1a0e 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java @@ -27,6 +27,8 @@ / package com.sun.star.wizards.letter; +import java.util.Collections; +import java.util.Comparator; import java.util.Vector; import com.sun.star.lang.IllegalArgumentException; import com.sun.star.lang.WrappedTargetException; @@ -65,6 +67,20 @@ import com.sun.star.wizards.common.Helper; public class LetterWizardDialogImpl extends LetterWizardDialog { +private class Strings +{ + public String Norm; + public String NormPath; + public String LanguageLabel; + + public Strings(String norm, String normPath, String languageLabel) + { + Norm = norm; + NormPath = normPath; + LanguageLabel = languageLabel; + } +} + protected void enterStep(int OldStep, int NewStep) { } @@ -1163,9 +1179,8 @@ public class LetterWizardDialogImpl extends LetterWizardDialog e.printStackTrace(); } -Vector NormsVector = new Vector(); -Vector NormsPathVector = new Vector(); -Vector LanguageLabelsVector = new Vector(); + Vector StringsVector = new Vector(); + String[] LanguageLabels; boolean found = false; @@ -1202,21 +1217,25 @@ public class LetterWizardDialogImpl extends LetterWizardDialog if (found) { -NormsVector.add(cIsoCode); -NormsPathVector.add(nameList[i]); -LanguageLabelsVector.add(lc.getLanguageString(MSID)); + StringsVector.add(new Strings(cIsoCode, (String)nameList[i], lc.getLanguageString(MSID))); } } + Collections.sort(StringsVector, new Comparator() { + public int compare(Object a, Object b) { + return ((Strings)a).LanguageLabel.compareTo(((Strings)b).LanguageLabel); + } + }); -Norms = new String[NormsVector.size()]; -NormsVector.toArray(Norms); - -NormPaths = new String[NormsPathVector.size()]; -NormsPathVector.toArray(NormPaths); +Norms = new String[StringsVector.size()]; +NormPaths = new String[StringsVector.size()]; +LanguageLabels = new String[StringsVector.size()]; -LanguageLabels = new String[LanguageLabelsVector.size()]; -LanguageLabelsVector.toArray(LanguageLabels); + for(int i = 0; iStringsVector.size(); i++) { + Norms[i] = ((Strings)StringsVector.elementAt(i)).Norm; + NormPaths[i] = ((Strings)StringsVector.elementAt(i)).NormPath; + LanguageLabels[i] = ((Strings)StringsVector.elementAt(i)).LanguageLabel; + } setControlProperty(lstLetterNorm, PropertyNames.STRING_ITEM_LIST, LanguageLabels); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: wizards/com
wizards/com/sun/star/wizards/ui/ControlScroller.java |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit bad98a1aa71e1a76c6ca4033f82168fe5b098b64 Author: Julien Nabet serval2...@yahoo.fr Date: Thu Feb 23 20:00:40 2012 +0100 fdo#46339: Fix Query Wizard by putting the right ElementName diff --git a/wizards/com/sun/star/wizards/ui/ControlScroller.java b/wizards/com/sun/star/wizards/ui/ControlScroller.java index a04d1c1..037a3ee 100644 --- a/wizards/com/sun/star/wizards/ui/ControlScroller.java +++ b/wizards/com/sun/star/wizards/ui/ControlScroller.java @@ -111,7 +111,7 @@ public abstract class ControlScroller iStartPosY = iCompPosY + SORELFIRSTPOSY; int ScrollHeight = iCompHeight - 2; nlineincrement = 1; -sIncSuffix = com.sun.star.wizards.common.Desktop.getIncrementSuffix(CurUnoDialog.getDlgNameAccess(), imgBackground); +sIncSuffix = com.sun.star.wizards.common.Desktop.getIncrementSuffix(CurUnoDialog.getDlgNameAccess(), TitleScrollBar); xScrollBar = CurUnoDialog.insertScrollBar(TitleScrollBar + sIncSuffix, 0, new AdjustmentListenerImpl(), new String[] ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: wizards/com
wizards/com/sun/star/wizards/ui/ControlScroller.java | 23 --- 1 file changed, 23 deletions(-) New commits: commit 03e17a141fbb4e1242de9d9979b5b699e6840454 Author: Jan Holesovsky ke...@suse.cz Date: Tue Jan 31 17:10:26 2012 +0100 Fix fdo#42543: Don't paint a frame around the list of edit boxes. This conflicts with commit efc6b840a0423099d6c3e0d33c14d34637fbba4c that reorders painting of windows when they overlap; and in this case, the frame image paints over the controls. The sideeffect is that the dialog looks nicer ;-) diff --git a/wizards/com/sun/star/wizards/ui/ControlScroller.java b/wizards/com/sun/star/wizards/ui/ControlScroller.java index c9aeee6..a04d1c1 100644 --- a/wizards/com/sun/star/wizards/ui/ControlScroller.java +++ b/wizards/com/sun/star/wizards/ui/ControlScroller.java @@ -39,7 +39,6 @@ public abstract class ControlScroller protected WizardDialog CurUnoDialog; protected XMultiServiceFactory xMSF; -private Object oImgControl; protected int ncurfieldcount; protected int nblockincrement; private int nlineincrement; @@ -113,17 +112,6 @@ public abstract class ControlScroller int ScrollHeight = iCompHeight - 2; nlineincrement = 1; sIncSuffix = com.sun.star.wizards.common.Desktop.getIncrementSuffix(CurUnoDialog.getDlgNameAccess(), imgBackground); -oImgControl = CurUnoDialog.insertControlModel(com.sun.star.awt.UnoControlImageControlModel, imgBackground + sIncSuffix, -new String[] -{ -PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH -}, -new Object[] -{ -new Short(1), new Integer(iCompHeight), ICompPosX, new Integer(iCompPosY), IStep, ICompWidth -}); -oImgControl = CurUnoDialog.xDlgContainer.getControl(imgBackground + sIncSuffix); -setComponentMouseTransparent(); xScrollBar = CurUnoDialog.insertScrollBar(TitleScrollBar + sIncSuffix, 0, new AdjustmentListenerImpl(), new String[] @@ -143,17 +131,6 @@ public abstract class ControlScroller } } -public void setComponentMouseTransparent() -{ -CurUnoDialog.getPeerConfiguration().setPeerProperties(oImgControl, new String[] -{ -MouseTransparent -}, new Boolean[] -{ -Boolean.TRUE -}); -} - protected void setScrollBarOrientationHorizontal() { Helper.setUnoPropertyValue(xScrollBar, PropertyNames.ORIENTATION, new Integer(ScrollBarOrientation.HORIZONTAL)); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: wizards/com
wizards/com/sun/star/wizards/ui/event/DataAware.java| 11 --- wizards/com/sun/star/wizards/ui/event/MethodInvocation.java | 11 +++ 2 files changed, 7 insertions(+), 15 deletions(-) New commits: commit 504b384dd1c74838f34d5caa27f3e916bb309a8c Author: Ivan Timofeev timofeev@gmail.com Date: Fri Nov 4 13:08:38 2011 +0400 suppress warnings about inexact argument type diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.java b/wizards/com/sun/star/wizards/ui/event/DataAware.java index be7260d..608203c 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.java @@ -291,15 +291,12 @@ public abstract class DataAware { * @param obj the object which contains the property. * @return the get method reflection object. */ -private static Class[] EMPTY_ARRAY = new Class[0]; - protected Method createGetMethod(String propName, Object obj) { Method m = null; try { //try to get a get method. - -m = obj.getClass().getMethod(get + propName, EMPTY_ARRAY); +m = obj.getClass().getMethod(get + propName, (Class[]) null); } catch (NoSuchMethodException ex1) { @@ -307,13 +304,13 @@ public abstract class DataAware { } return m; } - + /* (non-Javadoc) * @see com.sun.star.wizards.ui.event.DataAware.Value#get(java.lang.Object) */ public Object get(Object target) { try { -return getMethod.invoke(target, EMPTY_ARRAY); +return getMethod.invoke(target, (Object[]) null); } catch (IllegalAccessException ex1) { ex1.printStackTrace(); } catch (InvocationTargetException ex2) { @@ -329,7 +326,7 @@ public abstract class DataAware { return new short[0]; } return null; - + } protected Method createSetMethod(String propName, Object obj, Class paramClass) { diff --git a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java index adea073..621158e 100644 --- a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java +++ b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java @@ -42,10 +42,6 @@ import java.lang.reflect.Method; */ public class MethodInvocation { - -static final Class[] EMPTY_ARRAY = -{ -}; //the method to invoke. Method mMethod; //the object to invoke the method on. @@ -66,7 +62,7 @@ public class MethodInvocation public MethodInvocation(String methodName, Object obj, Class paramClass) throws NoSuchMethodException { -this(paramClass == null ? obj.getClass().getMethod(methodName, null) : obj.getClass().getMethod(methodName, new Class[] +this(paramClass == null ? obj.getClass().getMethod(methodName, (Class[]) null) : obj.getClass().getMethod(methodName, new Class[] { paramClass }), obj, paramClass); @@ -86,12 +82,11 @@ public class MethodInvocation { if (mWithParam) { -return mMethod.invoke(mObject, (Object) param -); +return mMethod.invoke(mObject, (Object) param); } else { -return mMethod.invoke(mObject, EMPTY_ARRAY); +return mMethod.invoke(mObject, (Object[]) null); } } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits