diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2020-10-27 21:19:36 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-11-27 13:09:33 +0100 |
commit | 71b66b0039819f38c935b4eb5d5951ceaf6e8468 (patch) | |
tree | eab56b348ec04845057e0fb65e4e7db5d59bcc31 /sw/qa/extras/layout | |
parent | 5951a867b87cbb88886968c1e2059f2cf461d11c (diff) |
tdf#138307 Chart import: fix lost custom shape text
Do not set empty text to SdrOutliner, if it is already set.
Note: Also fix the missing custom shape problem in
tdf#72776 and tdf#93641. The wrong position (X:0, Y:0) of
these shapes is another problem.
Regression from commit 6f62a5c4ee2c1b7654c7fcaa618fb495e0d32f0a
(tdf#128985: ODP: Style text directions revert to RTL on save and re-open)
Change-Id: I07d8cb12836daf15db347f6bb19c17ed9373189e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104909
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras/layout')
-rw-r--r-- | sw/qa/extras/layout/layout2.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index 3d0066d25339..b52ff9ecdb6c 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -21,6 +21,8 @@ #include <editeng/fhgtitem.hxx> #include <editeng/postitem.hxx> #include <editeng/unolingu.hxx> +#include <editeng/outlobj.hxx> +#include <editeng/editobj.hxx> #include <comphelper/sequence.hxx> #include <fmtfsize.hxx> @@ -45,6 +47,7 @@ #include <unoframe.hxx> #include <drawdoc.hxx> #include <svx/svdpage.hxx> +#include <svx/svdotext.hxx> #include <dcontact.hxx> char const DATA_DIRECTORY[] = "/sw/qa/extras/layout/data/"; @@ -2562,7 +2565,11 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf137185) auto xTextFrame = SwXTextFrame::CreateXTextFrame(*pFormat->GetDoc(), pFormat); CPPUNIT_ASSERT_EQUAL(OUString("Align me!"), xTextFrame->getText()->getString()); - CPPUNIT_ASSERT_EQUAL(OUString(), xTxt->getText()->getString()); + SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>(pObj); + CPPUNIT_ASSERT(pTextObj); + auto aOutStr = pTextObj->GetOutlinerParaObject()->GetTextObject(); + + CPPUNIT_ASSERT(aOutStr.GetText(0).isEmpty()); // Before the patch it failed, because the text appeared 2 times on each other. } |