summaryrefslogtreecommitdiff
path: root/vcl/qa
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/qa')
-rw-r--r--vcl/qa/cppunit/GraphicDescriptorTest.cxx8
-rw-r--r--vcl/qa/cppunit/GraphicTest.cxx18
-rw-r--r--vcl/qa/cppunit/graphicfilter/filters-test.cxx10
3 files changed, 18 insertions, 18 deletions
diff --git a/vcl/qa/cppunit/GraphicDescriptorTest.cxx b/vcl/qa/cppunit/GraphicDescriptorTest.cxx
index eec8f49f94f0..13f51262c233 100644
--- a/vcl/qa/cppunit/GraphicDescriptorTest.cxx
+++ b/vcl/qa/cppunit/GraphicDescriptorTest.cxx
@@ -42,7 +42,7 @@ BitmapEx createBitmap()
return BitmapEx(aBitmap);
}
-void createBitmapAndExportForType(SvStream& rStream, OUString const& sType)
+void createBitmapAndExportForType(SvStream& rStream, std::u16string_view sType)
{
BitmapEx aBitmapEx = createBitmap();
@@ -57,7 +57,7 @@ void createBitmapAndExportForType(SvStream& rStream, OUString const& sType)
void GraphicDescriptorTest::testDetectPNG()
{
SvMemoryStream aStream;
- createBitmapAndExportForType(aStream, "png");
+ createBitmapAndExportForType(aStream, u"png");
GraphicDescriptor aDescriptor(aStream, nullptr);
aDescriptor.Detect(true);
@@ -71,7 +71,7 @@ void GraphicDescriptorTest::testDetectPNG()
void GraphicDescriptorTest::testDetectJPG()
{
SvMemoryStream aStream;
- createBitmapAndExportForType(aStream, "jpg");
+ createBitmapAndExportForType(aStream, u"jpg");
GraphicDescriptor aDescriptor(aStream, nullptr);
aDescriptor.Detect(true);
@@ -85,7 +85,7 @@ void GraphicDescriptorTest::testDetectJPG()
void GraphicDescriptorTest::testDetectGIF()
{
SvMemoryStream aStream;
- createBitmapAndExportForType(aStream, "gif");
+ createBitmapAndExportForType(aStream, u"gif");
GraphicDescriptor aDescriptor(aStream, nullptr);
aDescriptor.Detect(true);
diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index fd669c4d347a..50ff4a133f86 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -90,7 +90,7 @@ BitmapEx createBitmap(bool alpha = false)
}
}
-void createBitmapAndExportForType(SvStream& rStream, OUString const& sType, bool alpha)
+void createBitmapAndExportForType(SvStream& rStream, std::u16string_view sType, bool alpha)
{
BitmapEx aBitmapEx = createBitmap(alpha);
@@ -102,7 +102,7 @@ void createBitmapAndExportForType(SvStream& rStream, OUString const& sType, bool
rStream.Seek(STREAM_SEEK_TO_BEGIN);
}
-Graphic makeUnloadedGraphic(OUString const& sType, bool alpha = false)
+Graphic makeUnloadedGraphic(std::u16string_view sType, bool alpha = false)
{
SvMemoryStream aStream;
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
@@ -181,7 +181,7 @@ char const PDFEXPORT_DATA_DIRECTORY[] = "/vcl/qa/cppunit/pdfexport/data/";
void GraphicTest::testUnloadedGraphic()
{
// make unloaded test graphic
- Graphic aGraphic = makeUnloadedGraphic("png");
+ Graphic aGraphic = makeUnloadedGraphic(u"png");
Graphic aGraphic2 = aGraphic;
// check available
@@ -193,7 +193,7 @@ void GraphicTest::testUnloadedGraphic()
CPPUNIT_ASSERT_EQUAL(true, aGraphic2.isAvailable());
// check GetSizePixel doesn't load graphic
- aGraphic = makeUnloadedGraphic("png");
+ aGraphic = makeUnloadedGraphic(u"png");
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
CPPUNIT_ASSERT_EQUAL(tools::Long(120), aGraphic.GetSizePixel().Width());
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetSizePixel().Height());
@@ -210,7 +210,7 @@ void GraphicTest::testUnloadedGraphic()
CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
//check Type
- aGraphic = makeUnloadedGraphic("png");
+ aGraphic = makeUnloadedGraphic(u"png");
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
CPPUNIT_ASSERT_EQUAL(GraphicType::Bitmap, aGraphic.GetType());
CPPUNIT_ASSERT_EQUAL(true, aGraphic.makeAvailable());
@@ -245,7 +245,7 @@ void GraphicTest::testUnloadedGraphicWmf()
BitmapEx aBitmapEx = createBitmap();
SvMemoryStream aStream;
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
- sal_uInt16 nFilterFormat = rGraphicFilter.GetExportFormatNumberForShortName("wmf");
+ sal_uInt16 nFilterFormat = rGraphicFilter.GetExportFormatNumberForShortName(u"wmf");
Graphic aGraphic(aBitmapEx);
aGraphic.SetPrefSize(Size(99, 99));
aGraphic.SetPrefMapMode(MapMode(MapUnit::Map100thMM));
@@ -267,14 +267,14 @@ void GraphicTest::testUnloadedGraphicWmf()
void GraphicTest::testUnloadedGraphicAlpha()
{
// make unloaded test graphic with alpha
- Graphic aGraphic = makeUnloadedGraphic("png", true);
+ Graphic aGraphic = makeUnloadedGraphic(u"png", true);
CPPUNIT_ASSERT_EQUAL(true, aGraphic.IsAlpha());
CPPUNIT_ASSERT_EQUAL(true, aGraphic.IsTransparent());
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
// make unloaded test graphic without alpha
- aGraphic = makeUnloadedGraphic("png", false);
+ aGraphic = makeUnloadedGraphic(u"png", false);
CPPUNIT_ASSERT_EQUAL(false, aGraphic.IsAlpha());
CPPUNIT_ASSERT_EQUAL(false, aGraphic.IsTransparent());
@@ -301,7 +301,7 @@ void GraphicTest::testUnloadedGraphicSizeUnit()
void GraphicTest::testSwapping()
{
// Prepare Graphic from a PNG image first
- Graphic aGraphic = makeUnloadedGraphic("png");
+ Graphic aGraphic = makeUnloadedGraphic(u"png");
CPPUNIT_ASSERT_EQUAL(GraphicType::Bitmap, aGraphic.GetType());
CPPUNIT_ASSERT_EQUAL(true, aGraphic.makeAvailable());
diff --git a/vcl/qa/cppunit/graphicfilter/filters-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
index 8020848b6e38..fe7485e3944a 100644
--- a/vcl/qa/cppunit/graphicfilter/filters-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
@@ -39,7 +39,7 @@ public:
const OUString &rURL, const OUString &,
SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
- void checkExportImport(const OUString& aFilterShortName);
+ void checkExportImport(std::u16string_view aFilterShortName);
/**
* Ensure CVEs remain unbroken
@@ -103,7 +103,7 @@ void VclFiltersTest::testScaling()
}
}
-void VclFiltersTest::checkExportImport(const OUString& aFilterShortName)
+void VclFiltersTest::checkExportImport(std::u16string_view aFilterShortName)
{
Bitmap aBitmap( Size( 100, 100 ), 24 );
aBitmap.Erase(COL_WHITE);
@@ -139,11 +139,11 @@ void VclFiltersTest::checkExportImport(const OUString& aFilterShortName)
void VclFiltersTest::testExportImport()
{
fprintf(stderr, "Check ExportImport JPG\n");
- checkExportImport("jpg");
+ checkExportImport(u"jpg");
fprintf(stderr, "Check ExportImport PNG\n");
- checkExportImport("png");
+ checkExportImport(u"png");
fprintf(stderr, "Check ExportImport BMP\n");
- checkExportImport("bmp");
+ checkExportImport(u"bmp");
}
void VclFiltersTest::testCVEs()