[Libreoffice-commits] core.git: sd/qa
Stephan Bergmann
sbergman at redhat.com
Fri Jul 1 10:32:47 UTC 2016
sd/qa/unit/export-tests-ooxml1.cxx | 57 -------------------------------------
sd/qa/unit/export-tests.cxx | 16 ----------
2 files changed, 73 deletions(-)
New commits:
commit eeb852ea1ecb77c2980d44075429b06e7d420c3a
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jul 1 12:31:38 2016 +0200
loplugin:unreffun
...after recently splitting up the test .cxx files
Change-Id: I11542454188b3636ef880beb7f28f2638828e99e
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index 80af08d..14d29d9 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -165,22 +165,6 @@ public:
reinterpret_cast<xmlChar const *>(namespaces[i].pURI));
}
}
-
- xmlDocPtr parseExport(utl::TempFile & rTempFile, OUString const& rStreamName)
- {
- OUString const url(rTempFile.GetURL());
- uno::Reference<packages::zip::XZipFileAccess2> const xZipNames(
- packages::zip::ZipFileAccess::createWithURL(
- comphelper::getComponentContext(m_xSFactory), url));
- uno::Reference<io::XInputStream> const xInputStream(
- xZipNames->getByName(rStreamName), uno::UNO_QUERY);
- std::unique_ptr<SvStream> const pStream(
- utl::UcbStreamHelper::CreateStream(xInputStream, true));
- xmlDocPtr const pXmlDoc = parseXmlStream(pStream.get());
- pXmlDoc->name = reinterpret_cast<char *>(xmlStrdup(
- reinterpret_cast<xmlChar const *>(OUStringToOString(url, RTL_TEXTENCODING_UTF8).getStr())));
- return pXmlDoc;
- }
};
namespace {
@@ -799,47 +783,6 @@ void SdOOXMLExportTest1::testTableCellBorder()
xDocShRef->DoClose();
}
-bool checkTransitionOnPage(uno::Reference<drawing::XDrawPagesSupplier> xDoc, sal_Int32 nSlideNumber,
- sal_Int16 nExpectedTransitionType, sal_Int16 nExpectedTransitionSubType,
- bool bExpectedDirection = true)
-{
- sal_Int32 nSlideIndex = nSlideNumber - 1;
-
- CPPUNIT_ASSERT_MESSAGE("Slide/Page index out of range", nSlideIndex < xDoc->getDrawPages()->getCount());
-
- uno::Reference<drawing::XDrawPage> xPage(xDoc->getDrawPages()->getByIndex(nSlideIndex), uno::UNO_QUERY_THROW);
- uno::Reference<beans::XPropertySet> xPropSet(xPage, uno::UNO_QUERY);
-
- sal_Int16 nTransitionType = 0;
- xPropSet->getPropertyValue("TransitionType") >>= nTransitionType;
-
- if (nExpectedTransitionType != nTransitionType)
- {
- std::cerr << "Transition type: " << nTransitionType << " " << nExpectedTransitionType << std::endl;
- return false;
- }
-
- sal_Int16 nTransitionSubtype = 0;
- xPropSet->getPropertyValue("TransitionSubtype") >>= nTransitionSubtype;
- if (nExpectedTransitionSubType != nTransitionSubtype)
- {
- std::cerr << "Transition Subtype: " << nTransitionSubtype << " " << nExpectedTransitionSubType << std::endl;
- return false;
- }
-
- bool bDirection = false;
- xPropSet->getPropertyValue("TransitionDirection") >>= bDirection;
-
- if (bExpectedDirection != bDirection)
- {
- std::cerr << "Transition Direction: " << (bExpectedDirection ? "normal" : "reversed")
- << " " << (bDirection ? "normal" : "reversed") << std::endl;
- return false;
- }
-
- return true;
-}
-
CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest1);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index bdf888e..ad1b168 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -133,22 +133,6 @@ public:
reinterpret_cast<xmlChar const *>(namespaces[i].pURI));
}
}
-
- xmlDocPtr parseExport(utl::TempFile & rTempFile, OUString const& rStreamName)
- {
- OUString const url(rTempFile.GetURL());
- uno::Reference<packages::zip::XZipFileAccess2> const xZipNames(
- packages::zip::ZipFileAccess::createWithURL(
- comphelper::getComponentContext(m_xSFactory), url));
- uno::Reference<io::XInputStream> const xInputStream(
- xZipNames->getByName(rStreamName), uno::UNO_QUERY);
- std::unique_ptr<SvStream> const pStream(
- utl::UcbStreamHelper::CreateStream(xInputStream, true));
- xmlDocPtr const pXmlDoc = parseXmlStream(pStream.get());
- pXmlDoc->name = reinterpret_cast<char *>(xmlStrdup(
- reinterpret_cast<xmlChar const *>(OUStringToOString(url, RTL_TEXTENCODING_UTF8).getStr())));
- return pXmlDoc;
- }
};
void SdExportTest::testN821567()
More information about the Libreoffice-commits
mailing list