summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-10-22 12:47:12 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-10-22 12:53:28 +0200
commite971c88efcacc8b34c76c2de431d6cf9b4b6506f (patch)
treee9bc30ce2861dac3f1aa7ad43d5220c741a9a912 /qadevOOo
parent0fee8f241bd4c5e032e92e10619bc405cb5a5daf (diff)
Fix the test for resValue != oldValue
When the property type is e.g. a UNO sequence or struct type, !equals would trivially be always true (as the UNO bridge creates fresh instances of such value types on the fly), masking failures where the tested code didn't change the property value at all. And one such masked failure was sw.CharacterStyle::com::sun::star::style::CharacterProperties in JunitTest_sw_unoapi_1 not changing any of the CharLeft/Right/Bottom/TopBorder properties, as SvxBorderLine::GuessLinesWidths (editeng/source/items/borderline.cxx) appears to only work properly if nStyle is DOUBLE, so work around that for now by explicitly setting that BorderLineStyle in the ValueChanger for BorderLine2. Change-Id: If9536822c5db04cbd01e6d760b5b63da04c4cf5b
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/lib/MultiPropertyTest.java2
-rw-r--r--qadevOOo/runner/util/ValueChanger.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/qadevOOo/runner/lib/MultiPropertyTest.java b/qadevOOo/runner/lib/MultiPropertyTest.java
index ac17634e03fc..38bf2ccfb17d 100644
--- a/qadevOOo/runner/lib/MultiPropertyTest.java
+++ b/qadevOOo/runner/lib/MultiPropertyTest.java
@@ -408,7 +408,7 @@ public class MultiPropertyTest extends MultiMethodTest
}
if (resValue != null)
{
- if ((!compare(resValue, oldValue)) || (!resValue.equals(oldValue)))
+ if (!compare(resValue, oldValue))
{
log.println("But it has changed.");
tRes.tested(propName, true);
diff --git a/qadevOOo/runner/util/ValueChanger.java b/qadevOOo/runner/util/ValueChanger.java
index 7a803b08a50d..008b98295f8d 100644
--- a/qadevOOo/runner/util/ValueChanger.java
+++ b/qadevOOo/runner/util/ValueChanger.java
@@ -612,6 +612,10 @@ public class ValueChanger {
_newValue.InnerLineWidth += 2;
_newValue.LineDistance += 2;
_newValue.OuterLineWidth += 3;
+ if (_newValue instanceof com.sun.star.table.BorderLine2) {
+ ((com.sun.star.table.BorderLine2) _newValue).LineStyle
+ = com.sun.star.table.BorderLineStyle.DOUBLE;
+ }
newValue = _newValue;
} else if (oldValue instanceof com.sun.star.text.XTextColumns) {
com.sun.star.text.XTextColumns _newValue = (com.sun.star.text.XTextColumns) oldValue;