diff options
author | Gülşah Köse <gulsah.kose@collabora.com> | 2021-06-18 11:23:41 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-06-23 15:05:20 +0200 |
commit | ce275a824aab6601c9de0b61f4b8568b9478ce19 (patch) | |
tree | 0d3a3cc763b28fa71dfaf86f96dfc805e2647e5f /sd | |
parent | 8bc61249b5db50bbf8895bdca142e402b5fab496 (diff) |
tdf#142716 Update selection after any text is inserted.
When we don't update the selection after insertion of new text
SvxUnoTextBase::createEnumeration knows old selection and losts last part
of the text.
Change-Id: I20f6530f34097ff213ff00cff617139887fd287a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117409
Tested-by: Jenkins
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
(cherry picked from commit e837f50313a703b6b26abb78f224472c1e4734ea)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117555
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf142716.pptx | bin | 0 -> 23281 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 18 |
2 files changed, 18 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf142716.pptx b/sd/qa/unit/data/pptx/tdf142716.pptx Binary files differnew file mode 100644 index 000000000000..4ef29e389449 --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf142716.pptx diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 6f21892531a6..9ef3565a063b 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -59,6 +59,7 @@ public: void testImageWithSpecialID(); void testTdf62176(); void testTransparentBackground(); + void testTdf142716(); void testEmbeddedPdf(); void testEmbeddedText(); void testTransparenText(); @@ -100,6 +101,7 @@ public: CPPUNIT_TEST(testImageWithSpecialID); CPPUNIT_TEST(testTdf62176); CPPUNIT_TEST(testTransparentBackground); + CPPUNIT_TEST(testTdf142716); CPPUNIT_TEST(testEmbeddedPdf); CPPUNIT_TEST(testEmbeddedText); CPPUNIT_TEST(testTransparenText); @@ -299,6 +301,22 @@ void SdExportTest::testTransparentBackground() xDocShRef->DoClose(); } +void SdExportTest::testTdf142716() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf142716.pptx"), PPTX); + xDocShRef = saveAndReload( xDocShRef.get(), PPTX ); + + const SdrPage *pPage = GetPage( 1, xDocShRef ); + const SdrTextObj *pObj = dynamic_cast<SdrTextObj *>( pPage->GetObj( 0 ) ); + + OUString sText = pObj->GetOutlinerParaObject()->GetTextObject().GetText(0); + + // Without fix "yyy" part will be lost. + CPPUNIT_ASSERT_EQUAL( OUString( "xxx and yyy" ), sText); + + xDocShRef->DoClose(); +} + void SdExportTest::testMediaEmbedding() { #ifdef _WIN32 |