diff options
author | Balazs Varga <balazs.varga991@gmail.com> | 2020-10-27 21:19:36 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-11-30 12:32:46 +0100 |
commit | 1aacd856ab0cf7217e2435c2e8c84d2e00963cb2 (patch) | |
tree | 9117725b6409fc53880c4c6625ab81b88ea72d38 /sw | |
parent | d5e786d78d2f72a39f02746d6e0faa04da72c60a (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>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106853
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/layout/layout2.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index 4223724a2ab5..90990ffd6cd3 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 <fmtanchr.hxx> @@ -47,6 +49,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/"; @@ -2561,8 +2564,12 @@ 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()); - // Before the patch it failled, because the text appeared 2 times on each other. + 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. } CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf135035) |