From 7dff8a91f9f8b2366d2e6bb18e50d7a25f3b9f72 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 5 Aug 2013 11:13:40 +0200 Subject: Add cases for css.uno.Date/Time to ValueChanger ...needed since 8ee69b0ba13f74d1515fac71df92947eb6328ab1 "fdo#67235 adapt form control code to time nanosecond API change, step 3." Change-Id: Id561151ac4b57b972761ec19f0e8943b8d25a54f --- qadevOOo/runner/util/ValueChanger.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'qadevOOo') diff --git a/qadevOOo/runner/util/ValueChanger.java b/qadevOOo/runner/util/ValueChanger.java index 6e18ee84c4a5..8df2feea3ffd 100644 --- a/qadevOOo/runner/util/ValueChanger.java +++ b/qadevOOo/runner/util/ValueChanger.java @@ -806,6 +806,12 @@ public class ValueChanger { newVal.Value = changePValue(((PropertyValue)oldValue).Value); newValue = newVal; } else + if (oldValue instanceof com.sun.star.util.Date) { + com.sun.star.util.Date oldD = (com.sun.star.util.Date) oldValue; + com.sun.star.util.Date newD = new com.sun.star.util.Date(); + newD.Day = (short) (oldD.Day+(short) 1); + newValue = newD; + } else if (oldValue instanceof com.sun.star.util.DateTime) { com.sun.star.util.DateTime oldDT = (com.sun.star.util.DateTime) oldValue; com.sun.star.util.DateTime newDT = new com.sun.star.util.DateTime(); @@ -813,6 +819,12 @@ public class ValueChanger { newDT.Hours = (short) (oldDT.Hours+(short) 1); newValue = newDT; } else + if (oldValue instanceof com.sun.star.util.Time) { + com.sun.star.util.Time oldT = (com.sun.star.util.Time) oldValue; + com.sun.star.util.Time newT = new com.sun.star.util.Time(); + newT.Hours = (short) (oldT.Hours+(short) 1); + newValue = newT; + } else if (oldValue instanceof com.sun.star.text.TableColumnSeparator) { com.sun.star.text.TableColumnSeparator oldTCS = (com.sun.star.text.TableColumnSeparator) oldValue; com.sun.star.text.TableColumnSeparator newTCS = new com.sun.star.text.TableColumnSeparator(); -- cgit