diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2016-03-20 01:12:56 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2016-03-20 01:12:56 +0100 |
commit | 3445fb9326fb632498cf2123aa1213be40e789c1 (patch) | |
tree | e4465f3e97c017128c2002abe2ef5d42a5033fc7 /sd/qa | |
parent | 1d5767c6e464b914812867aac5c3ccd0745dd1ea (diff) |
Revert "tdf#93124: Fix incorrect text fit in imported PPT"
Change broke autofit feature, see bugreport.
This reverts commit 5ca1f04976930c6fd656ebf89d667c80e2466897.
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/unit/data/ppt/tdf93124.ppt | bin | 85504 -> 0 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 51 |
2 files changed, 0 insertions, 51 deletions
diff --git a/sd/qa/unit/data/ppt/tdf93124.ppt b/sd/qa/unit/data/ppt/tdf93124.ppt Binary files differdeleted file mode 100644 index fad847898cc6..000000000000 --- a/sd/qa/unit/data/ppt/tdf93124.ppt +++ /dev/null diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 29bcc05024be..b1023968ebe6 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -41,11 +41,9 @@ #include <animations/animationnodehelper.hxx> #include <sax/tools/converter.hxx> -#include <comphelper/processfactory.hxx> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> #include <com/sun/star/drawing/XDrawPage.hpp> #include <com/sun/star/drawing/XDrawPagesSupplier.hpp> -#include <com/sun/star/drawing/GraphicExportFilter.hpp> #include <com/sun/star/animations/XAnimationNodeSupplier.hpp> #include <com/sun/star/animations/XAnimationNode.hpp> #include <com/sun/star/animations/XAnimate.hpp> @@ -64,8 +62,6 @@ #include <com/sun/star/table/XTableRows.hpp> #include <stlpool.hxx> -#include <vcl/pngread.hxx> -#include <vcl/bitmapaccess.hxx> using namespace ::com::sun::star; @@ -114,7 +110,6 @@ public: void testTdf93097(); void testTdf62255(); void testTdf89927(); - void testTdf93124(); CPPUNIT_TEST_SUITE(SdImportTest); @@ -159,7 +154,6 @@ public: CPPUNIT_TEST(testTdf93097); CPPUNIT_TEST(testTdf62255); CPPUNIT_TEST(testTdf89927); - CPPUNIT_TEST(testTdf93124); CPPUNIT_TEST_SUITE_END(); }; @@ -1225,51 +1219,6 @@ void SdImportTest::testTdf89927() xDocShRef->DoClose(); } -void SdImportTest::testTdf93124() -{ - sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf93124.ppt"), PPT); - uno::Reference < uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); - uno::Reference< drawing::XGraphicExportFilter > xGraphicExporter = drawing::GraphicExportFilter::create(xContext); - - uno::Sequence< beans::PropertyValue > aFilterData(2); - aFilterData[0].Name = "PixelWidth"; - aFilterData[0].Value <<= (sal_Int32)(320); - aFilterData[1].Name = "PixelHeight"; - aFilterData[1].Value <<= (sal_Int32)(180); - - utl::TempFile aTempFile; - aTempFile.EnableKillingFile(); - - uno::Sequence< beans::PropertyValue > aDescriptor(3); - aDescriptor[0].Name = "URL"; - aDescriptor[0].Value <<= aTempFile.GetURL(); - aDescriptor[1].Name = "FilterName"; - aDescriptor[1].Value <<= OUString("PNG"); - aDescriptor[2].Name = "FilterData"; - aDescriptor[2].Value <<= aFilterData; - - uno::Reference< lang::XComponent > xPage(getPage(0, xDocShRef), uno::UNO_QUERY); - xGraphicExporter->setSourceDocument(xPage); - xGraphicExporter->filter(aDescriptor); - - SvFileStream aFileStream(aTempFile.GetURL(), StreamMode::READ); - vcl::PNGReader aPNGReader(aFileStream); - BitmapEx aBMPEx = aPNGReader.Read(); - Bitmap aBMP = aBMPEx.GetBitmap(); - BitmapReadAccess* pRead = aBMP.AcquireReadAccess(); - int nNonWhiteCount = 0; - // The word "Top" should be in rectangle 34,4 - 76,30. If text alignment is wrong, the rectangle will be white. - for (long nX = 34; nX < (34 + 43); ++nX) - for (long nY = 4; nY < (4 + 26); ++nY) - { - const Color aColor = pRead->GetColor(nY, nX); - if ((aColor.GetRed() != 0xff) || (aColor.GetGreen() != 0xff) || (aColor.GetBlue() != 0xff)) - ++nNonWhiteCount; - } - CPPUNIT_ASSERT_MESSAGE("Tdf93124: vertical alignment of text is incorrect!", nNonWhiteCount>100); - xDocShRef->DoClose(); -} - CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); |