summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2020-11-14 19:37:31 +0800
committerXisco Fauli <xiscofauli@libreoffice.org>2020-11-23 10:26:13 +0100
commit9db952d2e793577f44df7a4a5b98c19ea87c8db0 (patch)
treed13b8256ace6da5c6c930401c0890c5a7662d73c /sw
parent986f39e24901b8056ba365f81f76cb5139f8573f (diff)
tdf#138210 check if CustomShapeGeometry exist first.
CustomShapeGeometry does not exist for a text frame. Getting the property throws an Exception and cause a general IO error. Change-Id: I0e31780292d45211bfd1250d0d359c72def50583 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105834 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com> (cherry picked from commit 8c14adfa76956e76bac98330ce67f080c90af184) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106237 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rwxr-xr-xsw/qa/extras/rtfexport/data/tdf138210.rtfbin0 -> 1281 bytes
-rw-r--r--sw/qa/extras/rtfexport/rtfexport5.cxx9
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/tdf138210.rtf b/sw/qa/extras/rtfexport/data/tdf138210.rtf
new file mode 100755
index 000000000000..d91a87d901e6
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tdf138210.rtf
Binary files differ
diff --git a/sw/qa/extras/rtfexport/rtfexport5.cxx b/sw/qa/extras/rtfexport/rtfexport5.cxx
index e005ce674b92..25cd2ee423bb 100644
--- a/sw/qa/extras/rtfexport/rtfexport5.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport5.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/text/XPageCursor.hpp>
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
+#include <com/sun/star/text/XTextFramesSupplier.hpp>
#include <com/sun/star/text/XTextTable.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
@@ -1253,6 +1254,14 @@ DECLARE_RTFEXPORT_TEST(testTdf129513, "tdf129513.rtf")
CPPUNIT_ASSERT_EQUAL(OUString("In table"), xCell->getString());
}
+DECLARE_RTFEXPORT_TEST(testTdf138210, "tdf138210.rtf")
+{
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */