/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
CPPUNIT_TEST_FIXTURE(Test, testSaveOnThread)
{ // Given an embedded object which hosts mspaint data: if (Application::GetDefaultDevice()->GetDPIX() != 96)
{ return;
}
// When saving that document on a thread:
OdtExportThread aThread(mxComponent, maTempFile.GetURL());
aThread.create();
{
SolarMutexReleaser r; while (aThread.isRunning())
{
SolarMutexGuard g;
Application::Reschedule(/*bHandleAllCurrentEvents=*/true);
}
}
// Then make sure its visible area's width is correct.
xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); // 16 pixels, assuming 96 DPI. // Without the accompanying fix in place, this test would have failed with: // - Expected: 0.1665in // - Actual : 1.9685in // i.e. we wrote a hardcoded 5cm width, not the real one.
assertXPath(pXmlDoc, "//style:graphic-properties", "visible-area-width", u"0.1665in");
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.