summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-08-13 14:39:40 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-08-13 14:45:59 +0200
commit37ecf082378a94d28d90b6f7639b0815484d9e3e (patch)
tree378e150a7eabc92035d644838bcf2a2a07c52958 /sw
parent3c491f05d566b7c327f536a94b4b78f6cb9b91de (diff)
RTF import: fix handling of RTF_SHPFBLWTXT
Commit 6cac123a8de8357cf11d9b5f818233889d729939 (fdo#45183 import RTF_SHPFBLWTXT, 2012-12-27) fixed this already once in the past -- fix it again, this time with a testcase. Change-Id: I0cbbfb1ba4eef42b2ee32f6f77065afaad3ddc1b
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtfimport/data/behind-doc.rtf19
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx9
2 files changed, 28 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/behind-doc.rtf b/sw/qa/extras/rtfimport/data/behind-doc.rtf
new file mode 100644
index 000000000000..d9996bc104aa
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/behind-doc.rtf
@@ -0,0 +1,19 @@
+{\rtf1
+{\shp
+{\*\shpinst\shpleft-7\shptop-7\shpright1274\shpbottom1274\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt1\shpz0\shplid1026
+{\sp
+{\sn shapeType}
+{\sv 75}
+}
+{\sp
+{\sn pib}
+{\sv
+{\pict\picscalex100\picscaley100\piccropl0\piccropr0\piccropt0\piccropb0\picw2258\pich2258\picwgoal1280\pichgoal1280\pngblip\bliptag1974568719
+{\*\blipuid 75b1870fd12614068d19954c8cfee5d1}
+47494638396110001000d5ff00000000ffffffc0c0c0555f00ffffaafcfcfcf6f6f6eaeaeae6e6e6e4e4e4e3e3e3c2c2c2c1c1c1bcbcbcb5b5b5b3b3b3b0b0b0adadada5a5a5a2a2a2a1a1a19f9f9f9494948a8a8a8888888686867b7b7b6c6c6c5c5c5c4e4e4e4b4b4b4747474646463d3d3d3c3c3c2e2e2e2525251b1b1b18181810101009090906060603030300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021f90401000002002c0000000010001000000684408170482c0a06c8a4728924389f506833b281302a8e6b164b18103024c52111504cca67332102e0042e9a40d9319f8300a343c1200f54e47f7e2a00001e0b0a7d0d728a010d838400261a7c0d94947784252700127e9d159f6c8411140019080ea7a9a85f842122281612b1b3b25d6b1f29291d0fbbbdbc5d5e51c34e4cc64a46c94341003b}
+}
+}
+}
+}
+aaa\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 2dc99cec8391..36b29c7c41e5 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1893,6 +1893,15 @@ DECLARE_RTFIMPORT_TEST(testFdo82106, "fdo82106.rtf")
getParagraph(2, "before\tafter");
}
+DECLARE_RTFIMPORT_TEST(testBehindDoc, "behind-doc.rtf")
+{
+ // The problem was that "behind doc" didn't result in the shape being in the background, only in being wrapped as "through".
+ uno::Reference<drawing::XShape> xShape = getShape(1);
+ CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_THROUGHT, getProperty<text::WrapTextMode>(xShape, "Surround"));
+ // This was true.
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xShape, "Opaque"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */