summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2015-03-25 12:01:04 +0300
committerCaolán McNamara <caolanm@redhat.com>2015-03-26 14:27:31 +0000
commited1605c1ea01c8b8d7809e3682d5c2104c16fa41 (patch)
tree12ff6492690d8efb8bb25ef9f232eff17da94718 /sw
parent77cb94613be6315b618783b2aa76226ad3107163 (diff)
tdf#89496 fixed crash on rtf shape group parsing
Fix is actually partial revert of my changes done for tdf#49893 (commit 2c411e4487f24968d6a62958fec85e4e3e1fda93): shape groups were not taken into account Change-Id: Ieb442265ac7c0087c3a402a9f1b09e6b3dcbcac1 Reviewed-on: https://gerrit.libreoffice.org/14997 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtfimport/data/fdo89496.rtf18
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx7
2 files changed, 25 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo89496.rtf b/sw/qa/extras/rtfimport/data/fdo89496.rtf
new file mode 100644
index 000000000000..761966d2c5de
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo89496.rtf
@@ -0,0 +1,18 @@
+{\rtf1
+
+{\shpgrp{\*\shpinst\shpleft6834\shptop109\shpright10578\shpbottom6825\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz30\shplid1057
+{\sp{\sn groupLeft}{\sv 7401}}{\sp{\sn groupTop}{\sv 7617}}{\sp{\sn groupRight}{\sv 11145}}{\sp{\sn groupBottom}{\sv 14333}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn lidRegroup}{\sv 0}}{\sp{\sn posh}{\sv 0}}{\sp{\sn posv}{\sv 0}}
+{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fPseudoInline}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}
+
+{\shp{\*\shpinst\shplid1058{\sp{\sn relLeft}{\sv 7401}}{\sp{\sn relTop}{\sv 8181}}{\sp{\sn relRight}{\sv 10551}}
+{\sp{\sn relBottom}{\sv 14333}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 75}}{\sp{\sn pib}{\sv {\pict\picscalex63\picscaley48\piccropl0\piccropr0\piccropt0\piccropb0
+\picw8812\pich22500\picwgoal4996\pichgoal12756\pngblip
+47494638396110001000d5ff00000000ffffffc0c0c0555f00ffffaafcfcfcf6f6f6eaeaeae6e6e6e4e4e4e3e3e3c2c2c2c1c1c1bcbcbcb5b5b5b3b3b3b0b0b0adadada5a5a5a2a2a2a1a1a19f9f9f9494948a8a8a8888888686867b7b7b6c6c6c5c5c5c4e4e4e4b4b4b4747474646463d3d3d3c3c3c2e2e2e2525251b1b1b18181810101009090906060603030300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021f90401000002002c0000000010001000000684408170482c0a06c8a4728924389f506833b281302a8e6b164b18103024c52111504cca67332102e0042e9a40d9319f8300a343c1200f54e47f7e2a00001e0b0a7d0d728a010d838400261a7c0d94947784252700127e9d159f6c8411140019080ea7a9a85f842122281612b1b3b25d6b1f29291d0fbbbdbc5d5e51c34e4cc64a46c94341003b
+}}}{\sp{\sn fRecolorFillAsPicture}{\sv 0}}{\sp{\sn fUseShapeAnchor}{\sv 0}}
+{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fBehindDocument}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1
+}}}}
+
+}
+}
+
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 5cffa27215bb..7be90d95f710 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -2219,6 +2219,13 @@ DECLARE_RTFIMPORT_TEST(testFdo49893_2, "fdo49893-2.rtf")
CPPUNIT_ASSERT_EQUAL(OUString("HEADER"), parseDump("/root/page[3]/header/txt/text()"));
}
+DECLARE_RTFIMPORT_TEST(testFdo89496, "fdo89496.rtf")
+{
+ // Just ensure that document is loaded and shape exists
+ uno::Reference<drawing::XShape> xShape(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xShape.is());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */