summaryrefslogtreecommitdiff
path: root/sw/qa/extras/odfimport/odfimport.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-04-07 22:20:49 +0200
committerMichael Stahl <mstahl@redhat.com>2015-04-07 22:55:26 +0200
commitdb1d278dcc308c73eb5edebc20481c96e7f479d8 (patch)
tree255401e09027f22bbe0ec35a592f8d50654de191 /sw/qa/extras/odfimport/odfimport.cxx
parent8f2209b1ebcb053c9f6fa8cb2c39041bec08f9f8 (diff)
tdf#89802: xmloff: fix ODF import of frame with empty style name ref
draw:fill-gradient-name="" in the graphic properties now causes BaseFrameProperties_Impl::FillBaseProperties() to fail and prevent insertion of the SwXTextFrame. (regression from 6e61ecd09679a66060f932835622821d39e92f01) Change-Id: I9b4f3ddb0f0e1b3a80e86bbdc1af2dade1c8edf7
Diffstat (limited to 'sw/qa/extras/odfimport/odfimport.cxx')
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 7c6e2e257137..a4b467e327a4 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -400,6 +400,18 @@ DECLARE_ODFIMPORT_TEST(testFdo82165, "fdo82165.odt")
} catch (lang::IndexOutOfBoundsException const&) { }
}
+DECLARE_ODFIMPORT_TEST(testTdf89802, "tdf89802.fodt")
+{
+ // the text frame was dropped during import
+ uno::Reference<text::XTextFramesSupplier> const xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> const xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ uno::Reference<beans::XPropertySet> const xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ sal_Int32 nValue(0);
+ xFrame->getPropertyValue("BackColor") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0x3f004586), nValue);
+}
+
DECLARE_ODFIMPORT_TEST(testFdo37606, "fdo37606.odt")
{
SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());