diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-08-05 11:13:40 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-08-05 11:19:21 +0200 |
commit | 7dff8a91f9f8b2366d2e6bb18e50d7a25f3b9f72 (patch) | |
tree | 9230b1c9be91287f76639369dba57cd7e7719471 /qadevOOo | |
parent | 5b0ac8149d574058b6218fc4badd587d4fb6d87b (diff) |
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
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/runner/util/ValueChanger.java | 12 |
1 files changed, 12 insertions, 0 deletions
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(); |