oox/source/export/drawingml.cxx | 5 ++++- sd/qa/unit/data/odp/tdf93883.odp |binary sd/qa/unit/export-tests.cxx | 12 ++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-)
New commits: commit 005ae2fa195bddd1073f3d883cf041d9ac80fad1 Author: Mark Hung <mark...@gmail.com> Date: Tue May 31 01:22:11 2016 +0800 tdf#93883 don't add space to empty paragraph when bullet is turned off. Change-Id: Ia1bad61cb5585dae0501e8cd657fc84bfea60ab2 Reviewed-on: https://gerrit.libreoffice.org/25679 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index a3c40fb..c9566bf 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1583,6 +1583,9 @@ void DrawingML::WriteRun( const Reference< XTextRange >& rRun ) sal_Int16 nLevel = -1; GET( nLevel, NumberingLevel ); + bool bNumberingIsNumber = true; + GET( bNumberingIsNumber, NumberingIsNumber ); + bool bIsURLField = false; OUString sFieldValue = GetFieldValue( rRun, bIsURLField ); bool bWriteField = !( sFieldValue.isEmpty() || bIsURLField ); @@ -1590,7 +1593,7 @@ void DrawingML::WriteRun( const Reference< XTextRange >& rRun ) OUString sText = rRun->getString(); //if there is no text following the bullet, add a space after the bullet - if (nLevel !=-1 && sText.isEmpty() ) + if (nLevel !=-1 && bNumberingIsNumber && sText.isEmpty() ) sText=" "; if ( bIsURLField ) diff --git a/sd/qa/unit/data/odp/tdf93883.odp b/sd/qa/unit/data/odp/tdf93883.odp new file mode 100755 index 0000000..54d589c Binary files /dev/null and b/sd/qa/unit/data/odp/tdf93883.odp differ diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index bdaefa8..a80617c 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -130,6 +130,7 @@ public: void testTableCellBorder(); void testBulletColor(); void testTdf62176(); + void testTdf93883(); void testBulletCharAndFont(); void testBulletMarginAndIndentation(); void testParaMarginAndindentation(); @@ -185,6 +186,7 @@ public: CPPUNIT_TEST(testTableCellBorder); CPPUNIT_TEST(testBulletColor); CPPUNIT_TEST(testTdf62176); + CPPUNIT_TEST(testTdf93883); CPPUNIT_TEST(testBulletCharAndFont); CPPUNIT_TEST(testBulletMarginAndIndentation); CPPUNIT_TEST(testParaMarginAndindentation); @@ -1070,6 +1072,16 @@ void SdExportTest::testTdf62176() xDocShRef->DoClose(); } +void SdExportTest::testTdf93883() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf93883.odp"), ODP); + xDocShRef = saveAndReload( xDocShRef, PPTX ); + uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) ); + uno::Reference<text::XTextRange> const xParagraph( getParagraphFromShape( 0, xShape ) ); + uno::Reference< beans::XPropertySet > xPropSet( xParagraph, uno::UNO_QUERY_THROW ); + CPPUNIT_ASSERT(!xPropSet->getPropertyValue("NumberingLevel").hasValue()); +} + void SdExportTest::testBulletCharAndFont() { ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/odp/bulletCharAndFont.odp"), ODP); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits