diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-08-18 02:27:27 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-08-18 02:27:27 +0200 |
commit | 57272eaaf5776f673b5141354a1d1e1af080d575 (patch) | |
tree | 9241d5523e03af24cd7ba2e45dd8b0951a9fdeb1 /wizards/com/sun/star/wizards/ui/UnoDialog2.java | |
parent | 1df024d97cc44155566f8db279e8cdba37e95fcf (diff) | |
parent | f9d40c2b591215b57ece4ba6e623b7808a7ae717 (diff) |
Merge commit 'f9d40c2b591215b57ece4ba6e623b7808a7ae717' into feature/gsoc2011_wizards
Conflicts:
wizards/com/sun/star/wizards/common/Resource.java
merged resolved as per:
e52421bc118e9c5f3fce5a32ba9efdcad7627d92
9e91dbca08056fc31f388f5642fdfa3d2b910990
in the old components repository merging the corresponding commit
3b4fe490441f9f77829bc6c1ae30d79a4d50255b there
Diffstat (limited to 'wizards/com/sun/star/wizards/ui/UnoDialog2.java')
-rw-r--r-- | wizards/com/sun/star/wizards/ui/UnoDialog2.java | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java b/wizards/com/sun/star/wizards/ui/UnoDialog2.java index 0769e1d23b38..9f3a4027e56f 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -134,7 +134,7 @@ public class UnoDialog2 extends UnoDialog implements EventNames } if (textChanged != null) { - XTextComponent xTextComponent = (XTextComponent) UnoRuntime.queryInterface(XTextComponent.class, xComboBox); + XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, xComboBox); xTextComponent.addTextListener((XTextListener) guiEventListener); guiEventListener.add(sName, EVENT_TEXT_CHANGED, textChanged, eventTarget); } @@ -186,7 +186,7 @@ public class UnoDialog2 extends UnoDialog implements EventNames public XControl insertTitledBox(String sName, String[] sPropNames, Object[] oPropValues) { Object oTitledBox = insertControlModel2("com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues); - return (XControl) UnoRuntime.queryInterface(XControl.class, oTitledBox); + return UnoRuntime.queryInterface(XControl.class, oTitledBox); } public XTextComponent insertTextField(String sName, String sTextChanged, Object eventTarget, String[] sPropNames, Object[] oPropValues) @@ -209,11 +209,11 @@ public class UnoDialog2 extends UnoDialog implements EventNames XControl xImgControl = insertImage(Desktop.getUniqueName(getDlgNameAccess(), "imgHint"), new String[] { - "Border", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH + PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_WIDTH }, new Object[] { - new Short((short) 0), new Integer(10), UIConsts.INFOIMAGEURL, new Integer(_posx), new Integer(_posy), Boolean.FALSE, new Integer(_iStep), new Integer(10) + new Short((short) 0), 10, UIConsts.INFOIMAGEURL, new Integer(_posx), new Integer(_posy), Boolean.FALSE, new Integer(_iStep), 10 }); super.getPeerConfiguration().setImageUrl(getModel(xImgControl), UIConsts.INFOIMAGEURL, UIConsts.INFOIMAGEURL_HC); return xImgControl; @@ -307,25 +307,25 @@ public class UnoDialog2 extends UnoDialog implements EventNames public XControl insertFixedLine(String sName, String[] sPropNames, Object[] oPropValues) { Object oLine = insertControlModel2("com.sun.star.awt.UnoControlFixedLineModel", sName, sPropNames, oPropValues); - return (XControl) UnoRuntime.queryInterface(XControl.class, oLine); + return UnoRuntime.queryInterface(XControl.class, oLine); } public XScrollBar insertScrollBar(String sName, String[] sPropNames, Object[] oPropValues) { Object oScrollBar = insertControlModel2("com.sun.star.awt.UnoControlScrollBarModel", sName, sPropNames, oPropValues); - return (XScrollBar) UnoRuntime.queryInterface(XScrollBar.class, oScrollBar); + return UnoRuntime.queryInterface(XScrollBar.class, oScrollBar); } public XProgressBar insertProgressBar(String sName, String[] sPropNames, Object[] oPropValues) { Object oProgressBar = insertControlModel2("com.sun.star.awt.UnoControlProgressBarModel", sName, sPropNames, oPropValues); - return (XProgressBar) UnoRuntime.queryInterface(XProgressBar.class, oProgressBar); + return UnoRuntime.queryInterface(XProgressBar.class, oProgressBar); } public XControl insertGroupBox(String sName, String[] sPropNames, Object[] oPropValues) { Object oGroupBox = insertControlModel2("com.sun.star.awt.UnoControlGroupBoxModel", sName, sPropNames, oPropValues); - return (XControl) UnoRuntime.queryInterface(XControl.class, oGroupBox); + return UnoRuntime.queryInterface(XControl.class, oGroupBox); } public Object insertControlModel2(String serviceName, String componentName, String[] sPropNames, Object[] oPropValues) @@ -347,8 +347,7 @@ public class UnoDialog2 extends UnoDialog implements EventNames { ex.printStackTrace(); } - final Object aObj = xDlgContainer.getControl(componentName); - return aObj; + return xDlgContainer.getControl(componentName); } private void setControlPropertiesDebug(Object model, String[] names, Object[] values) @@ -369,13 +368,12 @@ public class UnoDialog2 extends UnoDialog implements EventNames public String translateURL(String relativeURL) { - return ""; + return PropertyNames.EMPTY_STRING; } public static Object getControlModel(Object unoControl) { - Object obj = ((XControl) UnoRuntime.queryInterface(XControl.class, unoControl)).getModel(); - return obj; + return UnoRuntime.queryInterface(XControl.class, unoControl).getModel(); } public int showMessageBox(String windowServiceName, int windowAttribute, String MessageText) |