summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-06-29 09:58:42 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-06-29 10:37:43 +0200
commita4780b3c8b45261e59ed3cbb34c4463d58ad8079 (patch)
treecb7b2db56d6e8461f7e817f907afe4e74d387b7b /sd
parent6a1c5619be878d2ea7a38ec98d53c36fe3d416f6 (diff)
Revert "tdf#99729: fix text alignment (no autofit & no full width)"
This reverts commit 0cb200d000fad8ba31c7400e08cd031823f27308. Even if it was verified by Jenkins, it broke CppunitTest_sd_import_tests on a number of tinderboxes. Need to at least find out how to reliably trigger the crash and fix it before it goes in again. Change-Id: I7ed52cae559648ec101b7a343046a7d74a7c48d3
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/odp/tdf99729-legacy.odpbin11064 -> 0 bytes
-rw-r--r--sd/qa/unit/data/odp/tdf99729-new.odpbin11149 -> 0 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx76
-rw-r--r--sd/source/ui/docshell/docshel4.cxx7
4 files changed, 0 insertions, 83 deletions
diff --git a/sd/qa/unit/data/odp/tdf99729-legacy.odp b/sd/qa/unit/data/odp/tdf99729-legacy.odp
deleted file mode 100644
index 899b55c09c54..000000000000
--- a/sd/qa/unit/data/odp/tdf99729-legacy.odp
+++ /dev/null
Binary files differ
diff --git a/sd/qa/unit/data/odp/tdf99729-new.odp b/sd/qa/unit/data/odp/tdf99729-new.odp
deleted file mode 100644
index 1c5a9cd5adea..000000000000
--- a/sd/qa/unit/data/odp/tdf99729-new.odp
+++ /dev/null
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 538fdd0e2acf..6e321f4fef75 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -68,9 +68,6 @@
#include <comphelper/processfactory.hxx>
#include <vcl/pngread.hxx>
#include <vcl/bitmapaccess.hxx>
-#include <sfx2/frame.hxx>
-#include <com/sun/star/frame/XModel2.hpp>
-#include <com/sun/star/frame/XController2.hpp>
using namespace ::com::sun::star;
@@ -120,7 +117,6 @@ public:
void testTdf93097();
void testTdf62255();
void testTdf93124();
- void testTdf99729();
void testTdf89927();
void testTdf93868();
void testTdf95932();
@@ -171,7 +167,6 @@ public:
CPPUNIT_TEST(testTdf93097);
CPPUNIT_TEST(testTdf62255);
CPPUNIT_TEST(testTdf93124);
- CPPUNIT_TEST(testTdf99729);
CPPUNIT_TEST(testTdf89927);
CPPUNIT_TEST(testTdf93868);
CPPUNIT_TEST(testTdf95932);
@@ -1324,77 +1319,6 @@ void SdImportTest::testTdf93124()
xDocShRef->DoClose();
}
-void SdImportTest::testTdf99729()
-{
- const char* filenames[] = { "/sd/qa/unit/data/odp/tdf99729-new.odp", "/sd/qa/unit/data/odp/tdf99729-legacy.odp" };
- int nonwhitecounts[] = { 0, 0 };
- for (unsigned int i = 0; i < sizeof(filenames)/sizeof(filenames[0]); ++i)
- {
- // 1st check for new behaviour - having AnchoredTextOverflowLegacy compatibility flag set to false in settings.xml
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(filenames[i]), ODP);
-
- const css::uno::Reference< css::frame::XFrame > xFrame = SfxFrame::CreateBlankFrame();
- CPPUNIT_ASSERT(xFrame.is());
- const css::uno::Reference< css::frame::XModel2 > xModel(xDocShRef->GetModel(), css::uno::UNO_QUERY);
- CPPUNIT_ASSERT(xModel.is());
- const css::uno::Reference< css::frame::XController2 > xController(xModel->createViewController(
- "Default",
- css::uno::Sequence< css::beans::PropertyValue >(),
- xFrame
- ), css::uno::UNO_QUERY);
- CPPUNIT_ASSERT(xController.is());
- xController->attachModel(xModel.get());
- xModel->connectController(xController.get());
- xFrame->setComponent(xController->getComponentWindow(), xController.get());
- xController->attachFrame(xFrame);
- xModel->setCurrentController(xController.get());
-
- uno::Reference < uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- CPPUNIT_ASSERT(xContext.is());
- uno::Reference< drawing::XGraphicExportFilter > xGraphicExporter = drawing::GraphicExportFilter::create(xContext);
- CPPUNIT_ASSERT(xGraphicExporter.is());
-
- 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)(240);
-
- 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();
- for (long nX = 154; nX < (154 + 12); ++nX)
- for (long nY = 16; nY < (16 + 96); ++nY)
- {
- const Color aColor = pRead->GetColor(nY, nX);
- if ((aColor.GetRed() != 0xff) || (aColor.GetGreen() != 0xff) || (aColor.GetBlue() != 0xff))
- ++nonwhitecounts[i];
- }
- }
- // The numbers 1-9 should be above the Text Box in rectangle 154,16 - 170,112.
- // If text alignment is wrong, the rectangle will be white.
- CPPUNIT_ASSERT_MESSAGE("Tdf99729: vertical alignment of text is incorrect!", nonwhitecounts[0]>200); // it was 245 at my testing
- // The numbers 1-9 should be below the Text Box -> rectangle 154,16 - 170,112 should be white.
- CPPUNIT_ASSERT_MESSAGE("Tdf99729: legacy vertical alignment of text is incorrect!", nonwhitecounts[1] == 0);
-}
-
void SdImportTest::testTdf89927()
{
sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf89927.pptx"), PPTX);
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 5fa120462fa4..844548ff00a0 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -264,13 +264,6 @@ bool DrawDocShell::Load( SfxMedium& rMedium )
{
mbNewDocument = false;
- // If this is an ODF file being loaded, then by default, use legacy processing
- // for tdf#99729 (if required, it will be overriden in *::ReadUserDataSequence())
- if (IsOwnStorageFormat(rMedium))
- {
- mpDoc->SetAnchoredTextOverflowLegacy(true);
- }
-
bool bRet = false;
bool bStartPresentation = false;
ErrCode nError = ERRCODE_NONE;