summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/rtfimport/data/fdo70221.rtfbin0 -> 3714 bytes
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx10
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx1
3 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo70221.rtf b/sw/qa/extras/rtfimport/data/fdo70221.rtf
new file mode 100644
index 000000000000..1ca7939c64c1
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo70221.rtf
Binary files differ
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index e79d282c1625..687baacc6f48 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -160,6 +160,7 @@ public:
void testFdo68076();
void testFdo68291();
void testFdo69384();
+ void testFdo70221();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -304,6 +305,7 @@ void Test::run()
{"fdo68076.rtf", &Test::testFdo68076},
{"fdo68291.odt", &Test::testFdo68291},
{"hello.rtf", &Test::testFdo69384},
+ {"fdo70221.rtf", &Test::testFdo70221},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1478,6 +1480,14 @@ void Test::testFdo69384()
getStyles("ParagraphStyles")->getByName("Text body justified");
}
+void Test::testFdo70221()
+{
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
+ // The picture was imported twice.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xDraws->getCount());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 59e138bdbfd2..5e7ea2ac984f 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3727,6 +3727,7 @@ int RTFDocumentImpl::pushState()
case DESTINATION_SHAPETEXT:
case DESTINATION_FORMFIELD:
case DESTINATION_FIELDINSTRUCTION:
+ case DESTINATION_PICT:
m_aStates.top().nDestinationState = DESTINATION_NORMAL;
break;
case DESTINATION_MNUM: