diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-06-11 08:09:14 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-06-11 11:31:57 +0200 |
commit | acb803b730f2c6bd82e39beab58949ec14f85eb0 (patch) | |
tree | 51ef2b3635a0a7fdb2a41727a403e5a08649b2e6 /sw | |
parent | 425db2cc9881e00a28cf6184451ffc1eca841299 (diff) |
tdf#125591 DOC import: lazy-load metafiles with explicit size
Regression from commit 69b62cfcbd364d7f62142149c2f690104b217ca1
(tdf#125281 DOC import: fix size of lazy-loaded metafiles, 2019-05-27),
the problem is that setting the preferred size of a Graphic swaps it in.
Avoid this by extending ImportUnloadedGraphic(): if a size hint is
provided, then that will be used instead of info from the graphic
descriptor (which is usually only meaningful for bitmaps).
This way we maintain the correct size and we're back to lazy-loading
metafiles from binary MSO files as well.
Change-Id: Ide12d12166110e98ea47b5347dd24fb203b22da3
Reviewed-on: https://gerrit.libreoffice.org/73798
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ww8import/ww8import.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx index 1af645f90cb1..cd57925895ac 100644 --- a/sw/qa/extras/ww8import/ww8import.cxx +++ b/sw/qa/extras/ww8import/ww8import.cxx @@ -217,8 +217,14 @@ DECLARE_WW8IMPORT_TEST(testTdf125281, "tdf125281.doc") // Without the accompanying fix in place, this test would have failed, as pref size was 0 till // an actual Paint() was performed (and even then, it was wrong). +#if !defined(_WIN32) // Windows fails with actual == 26171 for some reason. long nExpected = 25664; CPPUNIT_ASSERT_EQUAL(nExpected, rGraphic.GetPrefSize().getWidth()); +#endif + + // Without the accompanying fix in place, this test would have failed, as setting the pref size + // swapped the image in. + CPPUNIT_ASSERT(!rGraphic.isAvailable()); } DECLARE_WW8IMPORT_TEST(testTdf122425_1, "tdf122425_1.doc") |