summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-08-12 17:47:20 +0200
committerDavid Tardon <dtardon@redhat.com>2014-08-14 03:21:17 -0500
commitfe7d0f8b60c7a99d150b32eb5530a4a530267fab (patch)
tree746242c426b3a14375fb619b63d88b2d40a3e7d5 /sw
parent3dc29ff5846160060587d41f22868486ffd4e96e (diff)
fdo#82165: ODF import: clear all shapes when removing header content
Shapes anchored to the first or last paragraph survive setString("") so need to be deleted with some ruse. (regression from b8499fc3dcf474050f026b8d5cd1d9037bbe42b7) Change-Id: I00a8132583c45d1953c207932cc7f02f3065ae77 (cherry picked from commit 555c988f3b896e16afc7bdd1bd98e48229599637) Reviewed-on: https://gerrit.libreoffice.org/10894 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/odfimport/data/fdo82165.odtbin0 -> 10663 bytes
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/odfimport/data/fdo82165.odt b/sw/qa/extras/odfimport/data/fdo82165.odt
new file mode 100644
index 000000000000..65a4084b704a
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/fdo82165.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 299fea7ae161..8cd4b09b1064 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -345,6 +345,16 @@ DECLARE_ODFIMPORT_TEST(testFdo68839, "fdo68839.odt")
getProperty<OUString>(xFrame2, "ChainNextName"));
}
+DECLARE_ODFIMPORT_TEST(testFdo82165, "fdo82165.odt")
+{
+ // there was a duplicate shape in the left header
+ lcl_CheckShape(getShape(1), "Picture 9");
+ try {
+ uno::Reference<drawing::XShape> xShape = getShape(2);
+ CPPUNIT_FAIL("IndexOutOfBoundsException expected");
+ } catch (lang::IndexOutOfBoundsException const&) { }
+}
+
DECLARE_ODFIMPORT_TEST(testFdo37606, "fdo37606.odt")
{
SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());