summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsw/qa/extras/ooxmlexport/data/tdf138739.docxbin0 -> 16780 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport15.cxx7
-rw-r--r--sw/source/core/doc/textboxhelper.cxx7
3 files changed, 8 insertions, 6 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf138739.docx b/sw/qa/extras/ooxmlexport/data/tdf138739.docx
new file mode 100755
index 000000000000..7b5bb302bfa1
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf138739.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index 7dd4feae324a..c875d560e592 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -240,6 +240,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf136404, "tdf136404.fodt")
CPPUNIT_ASSERT_EQUAL(OUString("8"), xEnumerationAccess7->getPresentation(false).trim());
}
+DECLARE_OOXMLEXPORT_TEST(testTdf138739, "tdf138739.docx")
+{
+ uno::Reference<beans::XPropertySet> xParaProps(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Font type name does not match!", OUString("Comic Sans MS"),
+ xParaProps->getPropertyValue("CharFontName").get<OUString>());
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf123390, "tdf123390.fodt")
{
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index 5457b8b5d317..4d44d1c35ff8 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -92,12 +92,7 @@ void SwTextBoxHelper::create(SwFrameFormat* pShape, bool bCopyText)
}
catch (uno::Exception&)
{
- // Before the textframe was appended now it is inserted to the begin of the doc in order
- // to prevent crash when someone removes the para where the textframe anchored:
- uno::Reference<text::XTextCursor> xCursor = xTextDocument->getText()->createTextCursor();
- xCursor->gotoStart(false);
- xTextContentAppend->insertTextContentWithProperties(
- xTextFrame, uno::Sequence<beans::PropertyValue>(), xCursor->getStart());
+ xTextContentAppend->appendTextContent(xTextFrame, uno::Sequence<beans::PropertyValue>());
}
// Link FLY and DRAW formats, so it becomes a text box (needed for syncProperty calls).
uno::Reference<text::XTextFrame> xRealTextFrame(xTextFrame, uno::UNO_QUERY);