[Libreoffice-commits] core.git: 3 commits - oox/source sd/qa sd/source
oox/source/ppt/slidetransition.cxx|8 oox/source/ppt/slidetransitioncontext.cxx |2 ++ sd/qa/unit/data/AllTransitions.odp|binary sd/qa/unit/export-tests.cxx | 12 ++-- sd/source/filter/eppt/pptx-epptooxml.cxx | 24 5 files changed, 44 insertions(+), 2 deletions(-) New commits: commit c24fbd8c8a4f00c4eeaa97528832afa67d4af1e7 Author: Tomaž VajngerlDate: Mon Nov 9 10:59:32 2015 +0100 pptx: import "Vortex" and "Ripple" transition + test Change-Id: I29d71e9c07c4964275c13772cdb6042624550acb diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx index 2c130dd..e623558 100644 --- a/oox/source/ppt/slidetransition.cxx +++ b/oox/source/ppt/slidetransition.cxx @@ -405,6 +405,14 @@ namespace oox { namespace ppt { else mnTransitionSubType = TransitionSubType::CORNERSOUT; break; +case P14_TOKEN(vortex): +mnTransitionType = TransitionType::MISCSHAPEWIPE; +mnTransitionSubType = TransitionSubType::VERTICAL; +break; +case P14_TOKEN(ripple): +mnTransitionType = TransitionType::MISCSHAPEWIPE; +mnTransitionSubType = TransitionSubType::HORIZONTAL; +break; default: mnTransitionType = 0; break; diff --git a/oox/source/ppt/slidetransitioncontext.cxx b/oox/source/ppt/slidetransitioncontext.cxx index 78d7825..4a9c996 100644 --- a/oox/source/ppt/slidetransitioncontext.cxx +++ b/oox/source/ppt/slidetransitioncontext.cxx @@ -129,6 +129,8 @@ SlideTransitionContext::~SlideTransitionContext() throw() case PPT_TOKEN( plus ): case PPT_TOKEN( random ): case PPT_TOKEN( wedge ): +case P14_TOKEN( vortex ): +case P14_TOKEN( ripple ): // CT_Empty if (!mbHasTransition) { diff --git a/sd/qa/unit/data/AllTransitions.odp b/sd/qa/unit/data/AllTransitions.odp index fa2eced..35b7a49 100644 Binary files a/sd/qa/unit/data/AllTransitions.odp and b/sd/qa/unit/data/AllTransitions.odp differ diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index bba730a..f16e9e9 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -173,13 +173,15 @@ public: CPPUNIT_TEST(testBulletMarginAndIndentation); CPPUNIT_TEST(testParaMarginAndindentation); CPPUNIT_TEST(testTransparentBackground); -CPPUNIT_TEST(testExportTransitionsPPTX); CPPUNIT_TEST(testTdf91378); #if !defined WNT CPPUNIT_TEST(testBnc822341); #endif CPPUNIT_TEST(testTdf80224); + +CPPUNIT_TEST(testExportTransitionsPPTX); + CPPUNIT_TEST_SUITE_END(); }; @@ -1413,8 +1415,14 @@ void SdExportTest::testExportTransitionsPPTX() // INSIDE TURNING CUBE CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 60, TransitionType::MISCSHAPEWIPE, TransitionSubType::CORNERSIN)); +// VORTEX +CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 70, TransitionType::MISCSHAPEWIPE, TransitionSubType::VERTICAL)); + +// RIPPLE +CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 71, TransitionType::MISCSHAPEWIPE, TransitionSubType::HORIZONTAL)); + // NEWSFLASH -CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 71, TransitionType::ZOOM, TransitionSubType::ROTATEIN)); +CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 72, TransitionType::ZOOM, TransitionSubType::ROTATEIN)); } CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest); commit 733846f20c43588478d01c448f622cc9854bc59e Author: Tomaž Vajngerl Date: Mon Nov 9 10:51:06 2015 +0100 pptx: export "Ripple" and "Vortex" transition Change-Id: I7e6683e8d4b461f193f64e2b1f077a5936008c1f diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 7862bc2..9d412f7 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -560,6 +560,16 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS ) pDirection14 = "r"; bOOXmlSpecificTransition = true; break; +case animations::TransitionSubType::VERTICAL: // Vortex +nTransition = XML_fade; +nTransition14 = XML_vortex; +bOOXmlSpecificTransition = true; +break; +case animations::TransitionSubType::HORIZONTAL: // Ripple +nTransition = XML_fade; +nTransition14 = XML_ripple; +bOOXmlSpecificTransition = true; +break; case animations::TransitionSubType::CORNERSIN: pInverted = "true"; case animations::TransitionSubType::CORNERSOUT: commit b3120fd7c408ef0d2f35c2b0a905f5db65eaa294 Author:
[Libreoffice-commits] core.git: 3 commits - oox/source sd/qa
oox/source/drawingml/table/tablecell.cxx |8 ++- oox/source/drawingml/table/tableproperties.cxx |2 sd/qa/unit/data/pptx/bnc887225.pptx|binary sd/qa/unit/import-tests.cxx| 51 + 4 files changed, 58 insertions(+), 3 deletions(-) New commits: commit 3d76a540f64f1f55f35863f18eed4b315e0d1e64 Author: Matúš Kukan matus.ku...@collabora.com Date: Tue Jul 15 14:01:01 2014 +0200 Unit test for cell properties, where lastRow is used in table (bnc#887225) Change-Id: Ia11dadcbedf6acc035b2d86da39a115bdb298591 diff --git a/sd/qa/unit/data/pptx/bnc887225.pptx b/sd/qa/unit/data/pptx/bnc887225.pptx new file mode 100755 index 000..e5c528f Binary files /dev/null and b/sd/qa/unit/data/pptx/bnc887225.pptx differ diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 01aade4..e8e148f 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -29,6 +29,7 @@ #include svx/svdogrp.hxx #include svx/svdomedia.hxx #include svx/svdoole2.hxx +#include svx/svdotable.hxx #include svx/xflclit.hxx #include animations/animationnodehelper.hxx @@ -69,6 +70,7 @@ public: void testN862510_2(); void testN862510_4(); void testBnc870237(); +void testBnc887225(); CPPUNIT_TEST_SUITE(SdFiltersTest); CPPUNIT_TEST(testDocumentLayout); @@ -87,6 +89,7 @@ public: CPPUNIT_TEST(testN862510_2); CPPUNIT_TEST(testN862510_4); CPPUNIT_TEST(testBnc870237); +CPPUNIT_TEST(testBnc887225); CPPUNIT_TEST_SUITE_END(); }; @@ -550,6 +553,54 @@ void SdFiltersTest::testBnc870237() xDocShRef-DoClose(); } +void SdFiltersTest::testBnc887225() +{ +::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc(/sd/qa/unit/data/pptx/bnc887225.pptx) ); +// In the document, lastRow and lastCol table properties are used. +// Make sure styles are set properly for individual cells. + +SdDrawDocument *pDoc = xDocShRef-GetDoc(); +CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL ); +const SdrPage *pPage = pDoc-GetPage(1); +CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL ); + +sdr::table::SdrTableObj *pTableObj = dynamic_castsdr::table::SdrTableObj*(pPage-GetObj(2)); +CPPUNIT_ASSERT( pTableObj ); +uno::Reference table::XCellRange xTable(pTableObj-getTable(), uno::UNO_QUERY_THROW); +uno::Reference beans::XPropertySet xCell; +sal_Int32 nColor; + +xCell.set(xTable-getCellByPosition(0, 0), uno::UNO_QUERY_THROW); +xCell-getPropertyValue(FillColor) = nColor; +CPPUNIT_ASSERT_EQUAL(sal_Int32(6003669), nColor); + +xCell.set(xTable-getCellByPosition(0, 1), uno::UNO_QUERY_THROW); +xCell-getPropertyValue(FillColor) = nColor; +CPPUNIT_ASSERT_EQUAL(sal_Int32(6003669), nColor); + +xCell.set(xTable-getCellByPosition(1, 1), uno::UNO_QUERY_THROW); +xCell-getPropertyValue(FillColor) = nColor; +CPPUNIT_ASSERT_EQUAL(sal_Int32(13754095), nColor); + +xCell.set(xTable-getCellByPosition(1, 2), uno::UNO_QUERY_THROW); +xCell-getPropertyValue(FillColor) = nColor; +CPPUNIT_ASSERT_EQUAL(sal_Int32(15331319), nColor); + +xCell.set(xTable-getCellByPosition(1, 4), uno::UNO_QUERY_THROW); +xCell-getPropertyValue(FillColor) = nColor; +CPPUNIT_ASSERT_EQUAL(sal_Int32(6003669), nColor); + +xCell.set(xTable-getCellByPosition(3, 2), uno::UNO_QUERY_THROW); +xCell-getPropertyValue(FillColor) = nColor; +CPPUNIT_ASSERT_EQUAL(sal_Int32(6003669), nColor); + +xCell.set(xTable-getCellByPosition(3, 4), uno::UNO_QUERY_THROW); +xCell-getPropertyValue(FillColor) = nColor; +CPPUNIT_ASSERT_EQUAL(sal_Int32(6003669), nColor); + +xDocShRef-DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest); CPPUNIT_PLUGIN_IMPLEMENT(); commit 5d2f12a44d2af3e42e0c3a17ff556f5ada27b1b8 Author: Matúš Kukan matus.ku...@collabora.com Date: Tue Jul 15 11:28:30 2014 +0200 Do not prefer bandRow over firstCol/lastCol, nor the same with bandCol. Change-Id: I0c573d721212c870e9ecc99ba5e8494073e09aaf diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx index 6862594..e91f5b8 100644 --- a/oox/source/drawingml/table/tablecell.cxx +++ b/oox/source/drawingml/table/tablecell.cxx @@ -228,7 +228,9 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase rFilterBase, ::oo if ( rProperties.isBandRow() ) { if ( ( !rProperties.isFirstRow() || ( nRow != 0 ) ) -( !rProperties.isLastRow() || ( nRow != nMaxRow ) ) ) +( !rProperties.isLastRow() || ( nRow != nMaxRow ) ) +( !rProperties.isFirstCol() || ( nColumn != 0 ) ) +( !rProperties.isLastCol() || ( nColumn != nMaxColumn ) ) ) { sal_Int32 nBand = nRow; if ( rProperties.isFirstRow() ) @@ -303,7 +305,9 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase rFilterBase, ::oo } if (
[Libreoffice-commits] core.git: 3 commits - oox/source sd/qa
oox/source/export/drawingml.cxx | 13 + sd/qa/unit/import-tests.cxx | 21 - sd/qa/unit/sdmodeltestbase.hxx | 32 3 files changed, 57 insertions(+), 9 deletions(-) New commits: commit 08a52b17cb2e8c4c2a8c1ad7b95d2cfc5a9e844e Author: Muthu Subramanian sumu...@collabora.com Date: Wed Nov 13 20:54:46 2013 +0530 n#828390: Export subscript text. diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 7a75d88..3f5731b 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -697,6 +697,7 @@ void DrawingML::WriteRunProperties( Reference XPropertySet rRun, sal_Bool bIs const char* italic = NULL; const char* underline = NULL; sal_Int32 nSize = 1800; +sal_Int32 nCharEscapement = 0; if( GETAD( CharHeight ) ) nSize = (sal_Int32) (100*(*((float*) mAny.getValue(; @@ -777,12 +778,24 @@ void DrawingML::WriteRunProperties( Reference XPropertySet rRun, sal_Bool bIs usLanguage = aLanguageTag.getBcp47(); } +if( GETAD( CharEscapement ) ) +mAny = nCharEscapement; + +if( nCharEscapement GETAD( CharEscapementHeight ) ) { +sal_uInt32 nCharEscapementHeight; +mAny = nCharEscapementHeight; +nSize = (nSize * nCharEscapementHeight) / 100; +// MSO uses default ~58% size +nSize = (nSize / 0.58); +} + mpFS-startElementNS( XML_a, XML_rPr, XML_b, bold, XML_i, italic, XML_lang, usLanguage.isEmpty() ? NULL : USS( usLanguage ), XML_sz, nSize == 1800 ? NULL : IS( nSize ), XML_u, underline, + XML_baseline, nCharEscapement == 0 ? NULL : IS( nCharEscapement*1000 ), FSEND ); // mso doesn't like text color to be placed after typeface commit 5656393f02ddd501d60673b0686688156336f0ee Author: Muthu Subramanian sumu...@collabora.com Date: Wed Nov 13 20:45:18 2013 +0530 Add export unit test helper to testDocumentLayout. diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 2a7de2d..6862815 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -88,16 +88,17 @@ the test, and re-running; it should break. */ void SdFiltersTest::testDocumentLayout() { -struct { const char *pInput, *pDump; } aFilesToCompare[] = +struct { const char *pInput, *pDump; sal_Int32 nExportType; } aFilesToCompare[] = { -{ odp/shapes-test.odp, xml/shapes-test_page }, -{ pptx/fdo47434-all.pptx, pptx/xml/fdo47434_page }, -{ n758621.ppt, xml/n758621_ }, -{ fdo64586.ppt, xml/fdo64586_ }, -{ n819614.pptx, xml/n819614_ }, -{ n820786.pptx, xml/n820786_ }, -{ n762695.pptx, xml/n762695_ }, -{ n593612.pptx, xml/n593612_ }, +{ odp/shapes-test.odp, xml/shapes-test_page, -1 }, +{ pptx/fdo47434-all.pptx, pptx/xml/fdo47434_page, -1 }, +{ n758621.ppt, xml/n758621_, -1 }, +{ fdo64586.ppt, xml/fdo64586_, -1 }, +{ n819614.pptx, xml/n819614_, -1 }, +{ n820786.pptx, xml/n820786_, -1 }, +{ n762695.pptx, xml/n762695_, -1 }, +{ n593612.pptx, xml/n593612_, -1 }, +// { pptx/n828390.pptx, pptx/xml/n828390_, PPTX }, // Example }; for ( int i = 0; i static_cast int ( SAL_N_ELEMENTS( aFilesToCompare ) ); ++i ) @@ -105,6 +106,8 @@ void SdFiltersTest::testDocumentLayout() int nUpdateMe = -1; // index of test we want to update; supposedly only when the test is created ::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc( /sd/qa/unit/data/ ) + OUString::createFromAscii( aFilesToCompare[i].pInput ) ); +if( aFilesToCompare[i].nExportType = 0 ) +xDocShRef = saveAndReload( xDocShRef, aFilesToCompare[i].nExportType ); compareWithShapesDump( xDocShRef, getPathFromSrc( /sd/qa/unit/data/ ) + OUString::createFromAscii( aFilesToCompare[i].pDump ), i == nUpdateMe ); diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx index 6c05ffa..00b5892 100644 --- a/sd/qa/unit/sdmodeltestbase.hxx +++ b/sd/qa/unit/sdmodeltestbase.hxx @@ -120,10 +120,10 @@ protected: return xDocShRef; } -::sd::DrawDocShellRef saveAndReload( ::sd::DrawDocShell *pShell, sal_uLong nExportType ) +::sd::DrawDocShellRef saveAndReload( ::sd::DrawDocShell *pShell, sal_Int32 nExportType ) { FileFormat *pFmt = aFileFormats[0]; -if( nExportType SAL_N_ELEMENTS( aFileFormats ) ) +if( ( (sal_uInt32) nExportType ) SAL_N_ELEMENTS( aFileFormats ) ) pFmt = aFileFormats[ nExportType ]; OUString aExt = OUString( . ) + OUString::createFromAscii( pFmt-pName ); utl::TempFile aTempFile( OUString(), aExt );