sw/qa/extras/globalfilter/globalfilter.cxx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
New commits: commit ab61d71c8b59facc0910016dc098cdf78ebd47b4 Author: Kohei Yoshida <kohei.yosh...@collabora.com> Date: Mon Dec 8 10:46:01 2014 -0500 Build fix (for gcc 4.7). Change-Id: Ib52cfc8ba45361277ef8e0b6021a03c3ff8ae668 diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx index c4b9811..43b213b 100644 --- a/sw/qa/extras/globalfilter/globalfilter.cxx +++ b/sw/qa/extras/globalfilter/globalfilter.cxx @@ -186,7 +186,7 @@ void Test::testImageWithSpecialID() // Check how LO handles when the imported graphic's ID is different from that one // which is generated by LO. - const OUString aFilterNames[] = { + const char* aFilterNames[] = { "writer8", "Rich Text Format", "MS Word 97", @@ -208,7 +208,7 @@ void Test::testImageWithSpecialID() 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(); @@ -221,8 +221,7 @@ void Test::testImageWithSpecialID() 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: ") - + OUStringToOString(aFilterNames[nFilter], RTL_TEXTENCODING_ASCII_US); + const OString sFailedMessage = OString("Failed on filter: ") + aFilterNames[nFilter]; CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), static_cast<sal_Int32>(2), xDraws->getCount()); uno::Reference<drawing::XShape> xImage = getShape(1); @@ -268,7 +267,7 @@ void Test::testGraphicShape() // There are two kind of images in Writer: 1) Writer specific handled by SwGrfNode and // 2) graphic shape handled by SdrGrafObj (e.g. after copy&paste from Impress). - const OUString aFilterNames[] = { + const char* aFilterNames[] = { "writer8", "Rich Text Format", "MS Word 97", @@ -290,7 +289,7 @@ void Test::testGraphicShape() 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(); @@ -303,8 +302,7 @@ void Test::testGraphicShape() 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: ") - + OUStringToOString(aFilterNames[nFilter], RTL_TEXTENCODING_ASCII_US); + const OString sFailedMessage = OString("Failed on filter: ") + aFilterNames[nFilter]; CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), static_cast<sal_Int32>(2), xDraws->getCount()); uno::Reference<drawing::XShape> xImage = getShape(1); @@ -327,7 +325,7 @@ void Test::testGraphicShape() } // MS filters make this kind of linked images broken !? - if( aFilterNames[nFilter] != "writer8" ) + if( OUString::createFromAscii(aFilterNames[nFilter]) != OUString("writer8") ) return; // Second image is a linked one _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits