[Libreoffice-commits] core.git: sc/qa sw/qa

Jan Holesovsky kendy at collabora.com
Mon Nov 10 01:37:03 PST 2014


 sc/qa/unit/subsequent_export-test.cxx      |    5 ++---
 sw/qa/extras/globalfilter/globalfilter.cxx |    9 ++++-----
 2 files changed, 6 insertions(+), 8 deletions(-)

New commits:
commit e49725438d34df305e7a4730c72034144994306d
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Nov 10 10:24:35 2014 +0100

    Fix build.
    
    Change-Id: I91599766e607b26d2c71006c9543a2bd952e228a

diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 87a5f21..8aff9e1 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -2265,7 +2265,7 @@ void ScExportTest::testFunctionsExcel2010ODS()
 
 void ScExportTest::testSwappedOutImageExport()
 {
-    const OUString aFilterNames[] = {
+    const char* aFilterNames[] = {
         "calc8",
         "MS Excel 97",
         "Calc Office Open XML",
@@ -2282,8 +2282,7 @@ void ScExportTest::testSwappedOutImageExport()
         // Check whether the export code swaps in the image which was swapped out before.
         ScDocShellRef xDocSh = loadDoc("document_with_two_images.", ODS);
 
-        const OString sFailedMessage = OString("Failed on filter: ")
-                                       + OUStringToOString(aFilterNames[nFilter], RTL_TEXTENCODING_ASCII_US);
+        const OString sFailedMessage = OString("Failed on filter: ") + aFilterNames[nFilter];
         CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xDocSh.Is());
 
         // Export the document and import again for a check
diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx
index 9f7d603..a08c916 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -33,7 +33,7 @@ public:
 
 void Test::testSwappedOutImageExport()
 {
-    const OUString aFilterNames[] = {
+    const char* aFilterNames[] = {
         "writer8",
         "Rich Text Format",
         "MS Word 97",
@@ -53,14 +53,11 @@ void Test::testSwappedOutImageExport()
             mxComponent->dispose();
         mxComponent = loadFromDesktop(getURLFromSrc("/sw/qa/extras/globalfilter/data/document_with_two_images.odt"), "com.sun.star.text.TextDocument");
 
-        const OString sFailedMessage = OString("Failed on filter: ")
-                                       + OUStringToOString(aFilterNames[nFilter], RTL_TEXTENCODING_ASCII_US);
-
         // Export the document and import again for a check
         uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
 
         utl::MediaDescriptor aMediaDescriptor;
-        aMediaDescriptor["FilterName"] <<= aFilterNames[nFilter];
+        aMediaDescriptor["FilterName"] <<= OUString::createFromAscii(aFilterNames[nFilter]);
 
         utl::TempFile aTempFile;
         aTempFile.EnableKillingFile();
@@ -72,6 +69,8 @@ void Test::testSwappedOutImageExport()
         // Check whether graphic exported well after it was swapped out
         uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
         uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
+
+        const OString sFailedMessage = OString("Failed on filter: ") + aFilterNames[nFilter];
         CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), static_cast<sal_Int32>(2), xDraws->getCount());
 
         // First image


More information about the Libreoffice-commits mailing list