diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-06-10 09:36:54 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-06-10 10:04:31 -0400 |
commit | b72371aeb34288e40cdd082e387cf54593c8d111 (patch) | |
tree | f25794c7cb2aae75ce864f6c9382fb06b600329b /qadevOOo | |
parent | 215ccea6a5085096540a9a14f6c6c9c06a84bf95 (diff) |
fdo#79676: Fix the Java UNO API test with regard to chart tests.
The Java tests rely on the "undocumented" behavior that, when loading an empty
chart document, the chart automaticallly created a "default chart" which is a
column chart with many of its properties filled. Unfortunately this behavior
caused ugly side effects when loading documents with charts via flat ODF
filter.
I believe fixing the test this way is the right fix.
Change-Id: If3e6c8979da9d0731346ebeedc23c0d3363e83fd
(cherry picked from commit d44b58beed743871df03909e7d9545e488f3d7c8)
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/runner/util/SOfficeFactory.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qadevOOo/runner/util/SOfficeFactory.java b/qadevOOo/runner/util/SOfficeFactory.java index 4e0c676ce03b..f464ea88e6c8 100644 --- a/qadevOOo/runner/util/SOfficeFactory.java +++ b/qadevOOo/runner/util/SOfficeFactory.java @@ -225,7 +225,12 @@ public class SOfficeFactory { if (oDoc != null) { DesktopTools.bringWindowToFront(oDoc); - return UnoRuntime.queryInterface(XChartDocument.class, oDoc); + XChartDocument xChartDoc = UnoRuntime.queryInterface(XChartDocument.class, oDoc); + // Create a default chart which many chart tests rely on. + com.sun.star.chart2.XChartDocument xCD2 = + UnoRuntime.queryInterface(com.sun.star.chart2.XChartDocument.class, oDoc); + xCD2.createDefaultChart(); + return xChartDoc; } else { return null; } |