summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/document/Control.java
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/com/sun/star/wizards/document/Control.java')
-rw-r--r--wizards/com/sun/star/wizards/document/Control.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/wizards/com/sun/star/wizards/document/Control.java b/wizards/com/sun/star/wizards/document/Control.java
index 3ed03e47b1ee..fb4191277b8c 100644
--- a/wizards/com/sun/star/wizards/document/Control.java
+++ b/wizards/com/sun/star/wizards/document/Control.java
@@ -33,6 +33,7 @@ import com.sun.star.awt.XControlModel;
import com.sun.star.awt.XLayoutConstrains;
import com.sun.star.awt.XWindowPeer;
import com.sun.star.beans.XPropertySet;
+import com.sun.star.beans.XPropertySetInfo;
import com.sun.star.container.XNameAccess;
import com.sun.star.container.XNameContainer;
import com.sun.star.container.XNamed;
@@ -97,8 +98,13 @@ public class Control extends Shape
icontroltype = _icontroltype;
sServiceName = oFormHandler.sModelServices[getControlType()];
Object oControlModel = oFormHandler.xMSFDoc.createInstance(sServiceName);
- xControlModel = (XControlModel) UnoRuntime.queryInterface(XControlModel.class, oControlModel);
- xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, oControlModel);
+ xControlModel = UnoRuntime.queryInterface( XControlModel.class, oControlModel );
+ xPropertySet = UnoRuntime.queryInterface( XPropertySet.class, oControlModel );
+
+ XPropertySetInfo xPSI = xPropertySet.getPropertySetInfo();
+ if ( xPSI.hasPropertyByName( "MouseWheelBehavior" ) )
+ xPropertySet.setPropertyValue( "MouseWheelBehavior", new Short( com.sun.star.awt.MouseWheelBehavior.SCROLL_DISABLED ) );
+
insertControlInContainer(_FieldName);
xControlShape.setControl(xControlModel);
if (_xGroupShapes == null)
@@ -110,7 +116,7 @@ public class Control extends Shape
_xGroupShapes.add(xShape);
}
xControl = oFormHandler.xControlAccess.getControl(xControlModel);
- xControlPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControl);
+ xControlPropertySet = UnoRuntime.queryInterface( XPropertySet.class, xControl );
xWindowPeer = xControl.getPeer();
}
catch (Exception e)