Kaydet (Commit) 9f374ac7 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

fdo#70674 adapt wizard code to incompatible Date/Time API change

Change-Id: I0338777bf46c10f6082c7eb3886883e92952eb99
üst 91d88ff8
...@@ -34,6 +34,8 @@ import com.sun.star.uno.UnoRuntime; ...@@ -34,6 +34,8 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.AnyConverter; import com.sun.star.uno.AnyConverter;
import com.sun.star.drawing.XShapes; import com.sun.star.drawing.XShapes;
import com.sun.star.lang.IllegalArgumentException; import com.sun.star.lang.IllegalArgumentException;
import com.sun.star.util.Date;
import com.sun.star.util.Time;
public class Control extends Shape public class Control extends Shape
{ {
...@@ -304,13 +306,22 @@ public class Control extends Shape ...@@ -304,13 +306,22 @@ public class Control extends Shape
} }
else if (getControlType() == FormHandler.SODATECONTROL) else if (getControlType() == FormHandler.SODATECONTROL)
{ {
xPropertySet.setPropertyValue("Date", 4711); //TODO find a better date Date d = new Date();
d.Day = 30;
d.Month = 12;
d.Year = 9999;
xPropertySet.setPropertyValue("Date", d);
aPreferredSize = getPeer().getPreferredSize(); aPreferredSize = getPeer().getPreferredSize();
xPropertySet.setPropertyValue("Date", com.sun.star.uno.Any.VOID); xPropertySet.setPropertyValue("Date", com.sun.star.uno.Any.VOID);
} }
else if (getControlType() == FormHandler.SOTIMECONTROL) else if (getControlType() == FormHandler.SOTIMECONTROL)
{ {
xPropertySet.setPropertyValue("Time", 47114); //TODO find a better time Time t = new Time();
t.NanoSeconds = 999999999;
t.Seconds = 59;
t.Minutes = 59;
t.Hours = 22;
xPropertySet.setPropertyValue("Time", t);
aPreferredSize = getPeer().getPreferredSize(); aPreferredSize = getPeer().getPreferredSize();
xPropertySet.setPropertyValue("Time", com.sun.star.uno.Any.VOID); xPropertySet.setPropertyValue("Time", com.sun.star.uno.Any.VOID);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment