summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/util
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-10-15 15:35:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-10-15 15:36:25 +0200
commitd3465703c9d6f7a6277398337a5e9df3a8df0d19 (patch)
tree0cb14e78faf5cc05969cbafd2fdf3fadc52c46ca /qadevOOo/runner/util
parentad05955de0710a2b76fe6423d37a0a58243f1355 (diff)
com.sun.star.lang.Locale does not override Object.equals
Change-Id: I4a443ce900252b171bd028e945971818fb2cc7ef
Diffstat (limited to 'qadevOOo/runner/util')
-rw-r--r--qadevOOo/runner/util/ValueChanger.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/qadevOOo/runner/util/ValueChanger.java b/qadevOOo/runner/util/ValueChanger.java
index df54d5b06b3c..4afac0a665c0 100644
--- a/qadevOOo/runner/util/ValueChanger.java
+++ b/qadevOOo/runner/util/ValueChanger.java
@@ -107,10 +107,14 @@ public class ValueChanger {
else
newValue = OR1;
} else if (oldValue instanceof com.sun.star.lang.Locale) {
- Object Loc1 = new com.sun.star.lang.Locale("en", "US", "");
- Object Loc2 = new com.sun.star.lang.Locale("de", "DE", "");
-
- if (oldValue.equals(Loc1))
+ com.sun.star.lang.Locale Loc1 = new com.sun.star.lang.Locale(
+ "en", "US", "");
+ com.sun.star.lang.Locale Loc2 = new com.sun.star.lang.Locale(
+ "de", "DE", "");
+ com.sun.star.lang.Locale old = (com.sun.star.lang.Locale) oldValue;
+ if (old.Language.equals(Loc1.Language)
+ && old.Country.equals(Loc1.Country)
+ && old.Variant.equals(Loc1.Variant))
newValue = Loc2;
else
newValue = Loc1;