[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - wizards/com

Lionel Elie Mamane lionel at mamane.lu
Wed Jan 7 09:20:48 PST 2015


 wizards/com/sun/star/wizards/document/TimeStampControl.java |   18 ------------
 1 file changed, 1 insertion(+), 17 deletions(-)

New commits:
commit 0a804204a87d631a67f850a7b5c5d63b5e5a6a94
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Fri Dec 19 22:01:19 2014 +0100

    xShapeGroup *is* the control's global xShape, so use it as such
    
    this allows the rest of the code to automagically do the right stuff:
     - get&set position
     - group this control with its label
     - set the label property to the label control
     - ...
    
    Conflicts:
    	wizards/com/sun/star/wizards/document/TimeStampControl.java
    
    Change-Id: Ibf3cb0ae82ba5c8a23fde05f6466f8eec8308186
    Reviewed-on: https://gerrit.libreoffice.org/13555
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/wizards/com/sun/star/wizards/document/TimeStampControl.java b/wizards/com/sun/star/wizards/document/TimeStampControl.java
index c2a5c4a..1ba0734 100644
--- a/wizards/com/sun/star/wizards/document/TimeStampControl.java
+++ b/wizards/com/sun/star/wizards/document/TimeStampControl.java
@@ -44,7 +44,6 @@ public class TimeStampControl extends DatabaseControl
     int nTimeWidth;
     int nDBWidth;
     int nDateWidth;
-    XShape xShapeGroup;
 
     public TimeStampControl(Resource _oResource, FormHandler _oFormHandler, XNameContainer _xFormName, String _curFieldName, Point _aPoint)
     {
@@ -61,8 +60,7 @@ public class TimeStampControl extends DatabaseControl
         nDBWidth = nDateWidth + nTimeWidth + 10;
         xShapes.add(oDateControl.xShape);
         xShapes.add(oTimeControl.xShape);
-        xShapeGroup = _oFormHandler.xShapeGrouper.group(xShapes);
-        xShapeGroup = UnoRuntime.queryInterface(XShape.class, xShapeGroup);
+        xShape = _oFormHandler.xShapeGrouper.group(xShapes);
         nreldatewidth = 1.0 / ((double) getSize().Width / (double) nDateWidth);
         nreltimewidth = 1.0 - nreldatewidth;
     }
@@ -127,20 +125,6 @@ public class TimeStampControl extends DatabaseControl
         return new Size(ncontrolwidth, oDateControl.xShape.getSize().Height);
     }
 
-    public Point getPosition()
-    {
-        return xShapeGroup.getPosition();
-    }
-
-    public void setPosition(Point _aPoint)
-    {
-        // --> TESTING
-        Point aBeforePt = xShapeGroup.getPosition();
-        xShapeGroup.setPosition(_aPoint);
-        // --> TESTING
-        Point aAfterPt = xShapeGroup.getPosition();
-    }
-
     public int getControlType()
     {
         return FormHandler.SODATETIMECONTROL;


More information about the Libreoffice-commits mailing list