summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/backendtest/GraphicsRenderTests.cxx440
-rw-r--r--vcl/backendtest/VisualBackendTest.cxx4
-rw-r--r--vcl/backendtest/outputdevice/text.cxx4
-rw-r--r--vcl/headless/svpframe.cxx2
-rw-r--r--vcl/headless/svpprn.cxx4
-rw-r--r--vcl/inc/font/FontSelectPattern.hxx2
-rw-r--r--vcl/inc/headless/SvpGraphicsBackend.hxx2
-rw-r--r--vcl/inc/qt5/QtGraphics.hxx2
-rw-r--r--vcl/inc/qt5/QtSvpGraphics.hxx2
-rw-r--r--vcl/inc/salinst.hxx2
-rw-r--r--vcl/inc/skia/gdiimpl.hxx2
-rw-r--r--vcl/inc/unx/gtk/gtkgdi.hxx2
-rw-r--r--vcl/inc/vclstatuslistener.hxx2
-rw-r--r--vcl/jsdialog/executor.cxx76
-rw-r--r--vcl/jsdialog/jsdialogbuilder.cxx26
-rw-r--r--vcl/qa/api/XGraphicTest.cxx42
-rw-r--r--vcl/qa/cppunit/BackendTest.cxx234
-rw-r--r--vcl/qa/cppunit/BitmapFilterTest.cxx18
-rw-r--r--vcl/qa/cppunit/BitmapScaleTest.cxx18
-rw-r--r--vcl/qa/cppunit/FontFeatureTest.cxx34
-rw-r--r--vcl/qa/cppunit/GraphicFormatDetectorTest.cxx86
-rw-r--r--vcl/qa/cppunit/GraphicTest.cxx34
-rw-r--r--vcl/qa/cppunit/PDFiumLibraryTest.cxx32
-rw-r--r--vcl/qa/cppunit/VectorGraphicSearchTest.cxx32
-rw-r--r--vcl/qa/cppunit/app/test_IconThemeInfo.cxx6
-rw-r--r--vcl/qa/cppunit/app/test_IconThemeScanner.cxx8
-rw-r--r--vcl/qa/cppunit/app/test_IconThemeSelector.cxx34
-rw-r--r--vcl/qa/cppunit/blocklistparsertest.cxx34
-rw-r--r--vcl/qa/cppunit/cjktext.cxx14
-rw-r--r--vcl/qa/cppunit/complextext.cxx22
-rw-r--r--vcl/qa/cppunit/errorhandler.cxx4
-rw-r--r--vcl/qa/cppunit/filter/ipdf/ipdf.cxx11
-rw-r--r--vcl/qa/cppunit/font.cxx8
-rw-r--r--vcl/qa/cppunit/gen/gen.cxx4
-rw-r--r--vcl/qa/cppunit/graphicfilter/filters-pict-test.cxx8
-rw-r--r--vcl/qa/cppunit/graphicfilter/filters-test.cxx6
-rw-r--r--vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx2
-rw-r--r--vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx6
-rw-r--r--vcl/qa/cppunit/jpeg/JpegWriterTest.cxx2
-rw-r--r--vcl/qa/cppunit/logicalfontinstance.cxx2
-rw-r--r--vcl/qa/cppunit/mnemonic.cxx34
-rw-r--r--vcl/qa/cppunit/outdev.cxx4
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx88
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport2.cxx261
-rw-r--r--vcl/qa/cppunit/physicalfontcollection.cxx101
-rw-r--r--vcl/qa/cppunit/physicalfontface.cxx42
-rw-r--r--vcl/qa/cppunit/physicalfontfamily.cxx38
-rw-r--r--vcl/qa/cppunit/png/PngFilterTest.cxx40
-rw-r--r--vcl/qa/cppunit/text.cxx70
-rw-r--r--vcl/qa/cppunit/textlayout.cxx12
-rw-r--r--vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx16
-rw-r--r--vcl/qt5/QtClipboard.cxx7
-rw-r--r--vcl/qt5/QtDragAndDrop.cxx20
-rw-r--r--vcl/qt5/QtFilePicker.cxx14
-rw-r--r--vcl/qt5/QtFrame.cxx8
-rw-r--r--vcl/qt5/QtInstance.cxx2
-rw-r--r--vcl/skia/SkiaHelper.cxx22
-rw-r--r--vcl/source/accessibility/AccessibleTextAttributeHelper.cxx32
-rw-r--r--vcl/source/app/IconThemeSelector.cxx4
-rw-r--r--vcl/source/app/brand.cxx4
-rw-r--r--vcl/source/app/salplug.cxx4
-rw-r--r--vcl/source/app/salvtables.cxx40
-rw-r--r--vcl/source/app/session.cxx4
-rw-r--r--vcl/source/app/settings.cxx26
-rw-r--r--vcl/source/app/svapp.cxx6
-rw-r--r--vcl/source/app/svdata.cxx2
-rw-r--r--vcl/source/app/svmain.cxx2
-rw-r--r--vcl/source/app/weldutils.cxx6
-rw-r--r--vcl/source/cnttype/mcnttfactory.cxx4
-rw-r--r--vcl/source/components/dtranscomp.cxx24
-rw-r--r--vcl/source/components/fontident.cxx4
-rw-r--r--vcl/source/control/NotebookbarPopup.cxx4
-rw-r--r--vcl/source/control/WeldedTabbedNotebookbar.cxx4
-rw-r--r--vcl/source/control/button.cxx8
-rw-r--r--vcl/source/control/calendar.cxx18
-rw-r--r--vcl/source/control/edit.cxx2
-rw-r--r--vcl/source/control/field2.cxx2
-rw-r--r--vcl/source/control/imivctl1.cxx2
-rw-r--r--vcl/source/control/managedmenubutton.cxx8
-rw-r--r--vcl/source/control/menubtn.cxx6
-rw-r--r--vcl/source/control/notebookbar.cxx6
-rw-r--r--vcl/source/control/roadmap.cxx6
-rw-r--r--vcl/source/control/roadmapwizard.cxx4
-rw-r--r--vcl/source/control/tabctrl.cxx2
-rw-r--r--vcl/source/control/throbber.cxx2
-rw-r--r--vcl/source/control/wizardmachine.cxx10
-rw-r--r--vcl/source/edit/texteng.cxx4
-rw-r--r--vcl/source/edit/textview.cxx2
-rw-r--r--vcl/source/filter/FilterConfigCache.cxx6
-rw-r--r--vcl/source/filter/FilterConfigItem.cxx6
-rw-r--r--vcl/source/filter/GraphicNativeTransform.cxx6
-rw-r--r--vcl/source/filter/bmp/BmpWriter.cxx4
-rw-r--r--vcl/source/filter/egif/egif.cxx2
-rw-r--r--vcl/source/filter/eps/eps.cxx10
-rw-r--r--vcl/source/filter/graphicfilter.cxx22
-rw-r--r--vcl/source/filter/ieps/ieps.cxx38
-rw-r--r--vcl/source/filter/imet/ios2met.cxx4
-rw-r--r--vcl/source/filter/ipcd/ipcd.cxx2
-rw-r--r--vcl/source/filter/jpeg/JpegWriter.cxx6
-rw-r--r--vcl/source/filter/webp/writer.cxx6
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx2
-rw-r--r--vcl/source/font/PhysicalFontCollection.cxx4
-rw-r--r--vcl/source/gdi/FileDefinitionWidgetDraw.cxx8
-rw-r--r--vcl/source/gdi/embeddedfontshelper.cxx8
-rw-r--r--vcl/source/gdi/formpdfexport.cxx38
-rw-r--r--vcl/source/gdi/gdimtf.cxx2
-rw-r--r--vcl/source/gdi/mtfxmldump.cxx252
-rw-r--r--vcl/source/gdi/oldprintadaptor.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx10
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx14
-rw-r--r--vcl/source/gdi/print3.cxx106
-rw-r--r--vcl/source/gdi/vectorgraphicdata.cxx4
-rw-r--r--vcl/source/gdi/virdev.cxx2
-rw-r--r--vcl/source/graphic/GraphicObject.cxx8
-rw-r--r--vcl/source/graphic/UnoGraphic.cxx4
-rw-r--r--vcl/source/graphic/UnoGraphicDescriptor.cxx24
-rw-r--r--vcl/source/graphic/UnoGraphicMapper.cxx4
-rw-r--r--vcl/source/graphic/UnoGraphicObject.cxx4
-rw-r--r--vcl/source/graphic/UnoGraphicProvider.cxx4
-rw-r--r--vcl/source/helper/canvasbitmap.cxx4
-rw-r--r--vcl/source/helper/commandinfoprovider.cxx20
-rw-r--r--vcl/source/helper/driverblocklist.cxx22
-rw-r--r--vcl/source/image/Image.cxx2
-rw-r--r--vcl/source/image/ImplImageTree.cxx2
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx14
-rw-r--r--vcl/source/outdev/font.cxx2
-rw-r--r--vcl/source/outdev/outdev.cxx4
-rw-r--r--vcl/source/outdev/text.cxx4
-rw-r--r--vcl/source/pdf/PDFiumTools.cxx2
-rw-r--r--vcl/source/printer/Options.cxx33
-rw-r--r--vcl/source/treelist/iconview.cxx2
-rw-r--r--vcl/source/treelist/imap.cxx2
-rw-r--r--vcl/source/treelist/imap2.cxx4
-rw-r--r--vcl/source/treelist/transfer.cxx4
-rw-r--r--vcl/source/treelist/transfer2.cxx4
-rw-r--r--vcl/source/treelist/treelistbox.cxx2
-rw-r--r--vcl/source/treelist/uiobject.cxx28
-rw-r--r--vcl/source/uitest/logger.cxx6
-rw-r--r--vcl/source/uitest/uiobject.cxx254
-rw-r--r--vcl/source/uitest/uitest.cxx6
-rw-r--r--vcl/source/uitest/uno/uiobject_uno.cxx4
-rw-r--r--vcl/source/uitest/uno/uitest_uno.cxx8
-rw-r--r--vcl/source/window/EnumContext.cxx104
-rw-r--r--vcl/source/window/builder.cxx126
-rw-r--r--vcl/source/window/cursor.cxx8
-rw-r--r--vcl/source/window/dialog.cxx20
-rw-r--r--vcl/source/window/dockwin.cxx10
-rw-r--r--vcl/source/window/floatwin.cxx6
-rw-r--r--vcl/source/window/keycod.cxx2
-rw-r--r--vcl/source/window/layout.cxx14
-rw-r--r--vcl/source/window/menu.cxx2
-rw-r--r--vcl/source/window/paint.cxx2
-rw-r--r--vcl/source/window/printdlg.cxx194
-rw-r--r--vcl/source/window/status.cxx4
-rw-r--r--vcl/source/window/toolbox2.cxx4
-rw-r--r--vcl/source/window/window.cxx8
-rw-r--r--vcl/unx/generic/app/geninst.cxx2
-rw-r--r--vcl/unx/generic/app/gensys.cxx6
-rw-r--r--vcl/unx/generic/app/i18n_im.cxx2
-rw-r--r--vcl/unx/generic/app/saldata.cxx2
-rw-r--r--vcl/unx/generic/app/salinst.cxx2
-rw-r--r--vcl/unx/generic/app/wmadaptor.cxx4
-rw-r--r--vcl/unx/generic/desktopdetect/desktopdetector.cxx2
-rw-r--r--vcl/unx/generic/dtrans/X11_clipboard.cxx6
-rw-r--r--vcl/unx/generic/dtrans/X11_droptarget.cxx2
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.cxx46
-rw-r--r--vcl/unx/generic/dtrans/X11_service.cxx8
-rw-r--r--vcl/unx/generic/dtrans/X11_transferable.cxx4
-rw-r--r--vcl/unx/generic/fontmanager/fontconfig.cxx4
-rw-r--r--vcl/unx/generic/fontmanager/helper.cxx6
-rw-r--r--vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx2
-rw-r--r--vcl/unx/generic/print/genprnpsp.cxx36
-rw-r--r--vcl/unx/generic/print/prtsetup.cxx60
-rw-r--r--vcl/unx/generic/printer/cpdmgr.cxx18
-rw-r--r--vcl/unx/generic/printer/cupsmgr.cxx20
-rw-r--r--vcl/unx/generic/printer/jobdata.cxx4
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx38
-rw-r--r--vcl/unx/generic/printer/printerinfomanager.cxx10
-rw-r--r--vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx6
-rw-r--r--vcl/unx/gtk3/fpicker/SalGtkFolderPicker.cxx2
-rw-r--r--vcl/unx/gtk3/fpicker/SalGtkPicker.cxx2
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx50
-rw-r--r--vcl/unx/kf5/KFFilePicker.cxx10
-rw-r--r--vcl/workben/fftester.cxx10
-rw-r--r--vcl/workben/icontest.cxx2
-rw-r--r--vcl/workben/listfonts.cxx170
-rw-r--r--vcl/workben/listglyphs.cxx2
-rw-r--r--vcl/workben/mtfdemo.cxx10
-rw-r--r--vcl/workben/svdem.cxx4
-rw-r--r--vcl/workben/svpclient.cxx8
-rw-r--r--vcl/workben/svptest.cxx6
-rw-r--r--vcl/workben/vcldemo.cxx36
192 files changed, 2234 insertions, 2221 deletions
diff --git a/vcl/backendtest/GraphicsRenderTests.cxx b/vcl/backendtest/GraphicsRenderTests.cxx
index 575a863e04e4..6f384d498ce8 100644
--- a/vcl/backendtest/GraphicsRenderTests.cxx
+++ b/vcl/backendtest/GraphicsRenderTests.cxx
@@ -84,7 +84,7 @@ public:
{
vcl::test::setActiveGraphicsRenderTest(OUString::Concat("GraphicsRenderTest__") + name);
}
- ~GraphicsTestZone() { vcl::test::setActiveGraphicsRenderTest(""); }
+ ~GraphicsTestZone() { vcl::test::setActiveGraphicsRenderTest(u""_ustr); }
};
}
@@ -93,25 +93,25 @@ OUString GraphicsRenderTests::returnTestStatus(vcl::test::TestResult const resul
switch (result)
{
case vcl::test::TestResult::Passed:
- return "PASSED";
+ return u"PASSED"_ustr;
case vcl::test::TestResult::PassedWithQuirks:
- return "QUIRKY";
+ return u"QUIRKY"_ustr;
case vcl::test::TestResult::Failed:
- return "FAILED";
+ return u"FAILED"_ustr;
}
- return "SKIPPED";
+ return u"SKIPPED"_ustr;
}
void GraphicsRenderTests::testDrawRectWithRectangle()
{
- OUString aTestName = "testDrawRectWithRectangle";
+ OUString aTestName = u"testDrawRectWithRectangle"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestRect aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
m_aCurGraphicsBackend = aOutDevTest.getRenderBackendName();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -126,13 +126,13 @@ void GraphicsRenderTests::testDrawRectWithRectangle()
void GraphicsRenderTests::testDrawRectWithPixel()
{
- OUString aTestName = "testDrawRectWithPixel";
+ OUString aTestName = u"testDrawRectWithPixel"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPixel aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -147,13 +147,13 @@ void GraphicsRenderTests::testDrawRectWithPixel()
void GraphicsRenderTests::testDrawRectWithLine()
{
- OUString aTestName = "testDrawRectWithLine";
+ OUString aTestName = u"testDrawRectWithLine"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -168,13 +168,13 @@ void GraphicsRenderTests::testDrawRectWithLine()
void GraphicsRenderTests::testDrawRectWithPolygon()
{
- OUString aTestName = "testDrawRectWithPolygon";
+ OUString aTestName = u"testDrawRectWithPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -189,13 +189,13 @@ void GraphicsRenderTests::testDrawRectWithPolygon()
void GraphicsRenderTests::testDrawRectWithPolyLine()
{
- OUString aTestName = "testDrawRectWithPolyLine";
+ OUString aTestName = u"testDrawRectWithPolyLine"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -210,13 +210,13 @@ void GraphicsRenderTests::testDrawRectWithPolyLine()
void GraphicsRenderTests::testDrawRectWithPolyLineB2D()
{
- OUString aTestName = "testDrawRectWithPolyLineB2D";
+ OUString aTestName = u"testDrawRectWithPolyLineB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -231,13 +231,13 @@ void GraphicsRenderTests::testDrawRectWithPolyLineB2D()
void GraphicsRenderTests::testDrawRectWithPolyPolygon()
{
- OUString aTestName = "testDrawRectWithPolyPolygon";
+ OUString aTestName = u"testDrawRectWithPolyPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -252,13 +252,13 @@ void GraphicsRenderTests::testDrawRectWithPolyPolygon()
void GraphicsRenderTests::testDrawRectWithPolyPolygonB2D()
{
- OUString aTestName = "testDrawRectWithPolyPolygonB2D";
+ OUString aTestName = u"testDrawRectWithPolyPolygonB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -273,13 +273,13 @@ void GraphicsRenderTests::testDrawRectWithPolyPolygonB2D()
void GraphicsRenderTests::testDrawRectAAWithRectangle()
{
- OUString aTestName = "testDrawRectAAWithRectangle";
+ OUString aTestName = u"testDrawRectAAWithRectangle"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestRect aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
@@ -294,13 +294,13 @@ void GraphicsRenderTests::testDrawRectAAWithRectangle()
void GraphicsRenderTests::testDrawRectAAWithPixel()
{
- OUString aTestName = "testDrawRectAAWithPixel";
+ OUString aTestName = u"testDrawRectAAWithPixel"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPixel aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
@@ -315,13 +315,13 @@ void GraphicsRenderTests::testDrawRectAAWithPixel()
void GraphicsRenderTests::testDrawRectAAWithLine()
{
- OUString aTestName = "testDrawRectAAWithLine";
+ OUString aTestName = u"testDrawRectAAWithLine"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
@@ -336,13 +336,13 @@ void GraphicsRenderTests::testDrawRectAAWithLine()
void GraphicsRenderTests::testDrawRectAAWithPolygon()
{
- OUString aTestName = "testDrawRectAAWithPolygon";
+ OUString aTestName = u"testDrawRectAAWithPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
@@ -357,13 +357,13 @@ void GraphicsRenderTests::testDrawRectAAWithPolygon()
void GraphicsRenderTests::testDrawRectAAWithPolyLine()
{
- OUString aTestName = "testDrawRectAAWithPolyLine";
+ OUString aTestName = u"testDrawRectAAWithPolyLine"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
@@ -378,13 +378,13 @@ void GraphicsRenderTests::testDrawRectAAWithPolyLine()
void GraphicsRenderTests::testDrawRectAAWithPolyLineB2D()
{
- OUString aTestName = "testDrawRectAAWithPolyLineB2D";
+ OUString aTestName = u"testDrawRectAAWithPolyLineB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
@@ -399,13 +399,13 @@ void GraphicsRenderTests::testDrawRectAAWithPolyLineB2D()
void GraphicsRenderTests::testDrawRectAAWithPolyPolygon()
{
- OUString aTestName = "testDrawRectAAWithPolyPolygon";
+ OUString aTestName = u"testDrawRectAAWithPolyPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
@@ -420,13 +420,13 @@ void GraphicsRenderTests::testDrawRectAAWithPolyPolygon()
void GraphicsRenderTests::testDrawRectAAWithPolyPolygonB2D()
{
- OUString aTestName = "testDrawRectAAWithPolyPolygonB2D";
+ OUString aTestName = u"testDrawRectAAWithPolyPolygonB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
@@ -441,13 +441,13 @@ void GraphicsRenderTests::testDrawRectAAWithPolyPolygonB2D()
void GraphicsRenderTests::testDrawFilledRectWithRectangle()
{
- OUString aTestName = "testDrawFilledRectWithRectangle";
+ OUString aTestName = u"testDrawFilledRectWithRectangle"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestRect aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupFilledRectangle(false);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -473,13 +473,13 @@ void GraphicsRenderTests::testDrawFilledRectWithRectangle()
void GraphicsRenderTests::testDrawFilledRectWithPolygon()
{
- OUString aTestName = "testDrawFilledRectWithPolygon";
+ OUString aTestName = u"testDrawFilledRectWithPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupFilledRectangle(false);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -505,13 +505,13 @@ void GraphicsRenderTests::testDrawFilledRectWithPolygon()
void GraphicsRenderTests::testDrawFilledRectWithPolyPolygon()
{
- OUString aTestName = "testDrawFilledRectWithPolyPolygon";
+ OUString aTestName = u"testDrawFilledRectWithPolyPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupFilledRectangle(false);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -537,13 +537,13 @@ void GraphicsRenderTests::testDrawFilledRectWithPolyPolygon()
void GraphicsRenderTests::testDrawFilledRectWithPolyPolygon2D()
{
- OUString aTestName = "testDrawFilledRectWithPolyPolygon2D";
+ OUString aTestName = u"testDrawFilledRectWithPolyPolygon2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupFilledRectangle(false);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -569,13 +569,13 @@ void GraphicsRenderTests::testDrawFilledRectWithPolyPolygon2D()
void GraphicsRenderTests::testDrawDiamondWithPolygon()
{
- OUString aTestName = "testDrawDiamondWithPolygon";
+ OUString aTestName = u"testDrawDiamondWithPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDiamond();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkDiamond(aBitmap);
@@ -590,13 +590,13 @@ void GraphicsRenderTests::testDrawDiamondWithPolygon()
void GraphicsRenderTests::testDrawDiamondWithLine()
{
- OUString aTestName = "testDrawDiamondWithLine";
+ OUString aTestName = u"testDrawDiamondWithLine"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDiamond();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkDiamond(aBitmap);
@@ -611,13 +611,13 @@ void GraphicsRenderTests::testDrawDiamondWithLine()
void GraphicsRenderTests::testDrawDiamondWithPolyline()
{
- OUString aTestName = "testDrawDiamondWithPolyline";
+ OUString aTestName = u"testDrawDiamondWithPolyline"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDiamond();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkDiamond(aBitmap);
@@ -632,13 +632,13 @@ void GraphicsRenderTests::testDrawDiamondWithPolyline()
void GraphicsRenderTests::testDrawDiamondWithPolylineB2D()
{
- OUString aTestName = "testDrawDiamondWithPolylineB2D";
+ OUString aTestName = u"testDrawDiamondWithPolylineB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDiamond();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkDiamond(aBitmap);
@@ -653,13 +653,13 @@ void GraphicsRenderTests::testDrawDiamondWithPolylineB2D()
void GraphicsRenderTests::testDrawInvertWithRectangle()
{
- OUString aTestName = "testDrawInvertWithRectangle";
+ OUString aTestName = u"testDrawInvertWithRectangle"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestRect aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupInvert_NONE();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -675,13 +675,13 @@ void GraphicsRenderTests::testDrawInvertWithRectangle()
void GraphicsRenderTests::testDrawInvertN50WithRectangle()
{
- OUString aTestName = "testDrawInvertN50WithRectangle";
+ OUString aTestName = u"testDrawInvertN50WithRectangle"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestRect aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupInvert_N50();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -697,13 +697,13 @@ void GraphicsRenderTests::testDrawInvertN50WithRectangle()
void GraphicsRenderTests::testDrawInvertTrackFrameWithRectangle()
{
- OUString aTestName = "testDrawInvertTrackFrameWithRectangle";
+ OUString aTestName = u"testDrawInvertTrackFrameWithRectangle"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestRect aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupInvert_TrackFrame();
if (!(SHOULD_ASSERT && aOutDevTest.getRenderBackendName() != "svp"))
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -719,13 +719,13 @@ void GraphicsRenderTests::testDrawInvertTrackFrameWithRectangle()
void GraphicsRenderTests::testDrawDropShapeWithPolyline()
{
- OUString aTestName = "testDrawDropShapeWithPolyline";
+ OUString aTestName = u"testDrawDropShapeWithPolyline"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDropShape();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkDropShape(aBitmap);
@@ -740,13 +740,13 @@ void GraphicsRenderTests::testDrawDropShapeWithPolyline()
void GraphicsRenderTests::testDrawDropShapeAAWithPolyline()
{
- OUString aTestName = "testDrawDropShapeAAWithPolyline";
+ OUString aTestName = u"testDrawDropShapeAAWithPolyline"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupAADropShape();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -762,13 +762,13 @@ void GraphicsRenderTests::testDrawDropShapeAAWithPolyline()
void GraphicsRenderTests::testDrawBezierWithPolylineB2D()
{
- OUString aTestName = "testDrawBezierWithPolylineB2D";
+ OUString aTestName = u"testDrawBezierWithPolylineB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupBezier();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkBezier(aBitmap);
@@ -783,13 +783,13 @@ void GraphicsRenderTests::testDrawBezierWithPolylineB2D()
void GraphicsRenderTests::testDrawBezierAAWithPolylineB2D()
{
- OUString aTestName = "testDrawBezierAAWithPolylineB2D";
+ OUString aTestName = u"testDrawBezierAAWithPolylineB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupAABezier();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkBezier(aBitmap);
@@ -804,13 +804,13 @@ void GraphicsRenderTests::testDrawBezierAAWithPolylineB2D()
void GraphicsRenderTests::testDrawDropShapeWithPolygon()
{
- OUString aTestName = "testDrawDropShapeWithPolygon";
+ OUString aTestName = u"testDrawDropShapeWithPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDropShape();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkDropShape(aBitmap);
@@ -825,13 +825,13 @@ void GraphicsRenderTests::testDrawDropShapeWithPolygon()
void GraphicsRenderTests::testDrawDropShapeAAWithPolygon()
{
- OUString aTestName = "testDrawDropShapeAAWithPolygon";
+ OUString aTestName = u"testDrawDropShapeAAWithPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupAADropShape();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -847,13 +847,13 @@ void GraphicsRenderTests::testDrawDropShapeAAWithPolygon()
void GraphicsRenderTests::testDrawBitmap24bpp()
{
- OUString aTestName = "testDrawBitmap24bpp";
+ OUString aTestName = u"testDrawBitmap24bpp"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawBitmap(vcl::PixelFormat::N24_BPP);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -869,13 +869,13 @@ void GraphicsRenderTests::testDrawBitmap24bpp()
void GraphicsRenderTests::testDrawTransformedBitmap24bpp()
{
- OUString aTestName = "testDrawTransformedBitmap24bpp";
+ OUString aTestName = u"testDrawTransformedBitmap24bpp"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawTransformedBitmap(vcl::PixelFormat::N24_BPP);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -891,13 +891,13 @@ void GraphicsRenderTests::testDrawTransformedBitmap24bpp()
void GraphicsRenderTests::testComplexDrawTransformedBitmap24bpp()
{
- OUString aTestName = "testComplexDrawTransformedBitmap24bpp";
+ OUString aTestName = u"testComplexDrawTransformedBitmap24bpp"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupComplexDrawTransformedBitmap(vcl::PixelFormat::N24_BPP);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -913,13 +913,13 @@ void GraphicsRenderTests::testComplexDrawTransformedBitmap24bpp()
void GraphicsRenderTests::testDrawBitmapExWithAlpha24bpp()
{
- OUString aTestName = "testDrawBitmapExWithAlpha24bpp";
+ OUString aTestName = u"testDrawBitmapExWithAlpha24bpp"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawBitmapExWithAlpha(vcl::PixelFormat::N24_BPP);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -935,13 +935,13 @@ void GraphicsRenderTests::testDrawBitmapExWithAlpha24bpp()
void GraphicsRenderTests::testDrawMask24bpp()
{
- OUString aTestName = "testDrawMask24bpp";
+ OUString aTestName = u"testDrawMask24bpp"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawMask(vcl::PixelFormat::N24_BPP);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestBitmap::checkMask(aBitmap);
@@ -956,13 +956,13 @@ void GraphicsRenderTests::testDrawMask24bpp()
void GraphicsRenderTests::testDrawBlend24bpp()
{
- OUString aTestName = "testDrawBlend24bpp";
+ OUString aTestName = u"testDrawBlend24bpp"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestBitmap aOutDevTest;
BitmapEx aBitmapEx = aOutDevTest.setupDrawBlend(vcl::PixelFormat::N24_BPP);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestBitmap::checkBlend(aBitmapEx);
@@ -976,13 +976,13 @@ void GraphicsRenderTests::testDrawBlend24bpp()
void GraphicsRenderTests::testDrawXor()
{
- OUString aTestName = "testDrawXor";
+ OUString aTestName = u"testDrawXor"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestAnotherOutDev aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupXOR();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestAnotherOutDev::checkXOR(aBitmap);
@@ -997,13 +997,13 @@ void GraphicsRenderTests::testDrawXor()
void GraphicsRenderTests::testClipRectangle()
{
- OUString aTestName = "testClipRectangle";
+ OUString aTestName = u"testClipRectangle"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestClip aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupClipRectangle();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestClip::checkClip(aBitmap);
@@ -1018,13 +1018,13 @@ void GraphicsRenderTests::testClipRectangle()
void GraphicsRenderTests::testClipPolygon()
{
- OUString aTestName = "testClipPolygon";
+ OUString aTestName = u"testClipPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestClip aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupClipPolygon();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestClip::checkClip(aBitmap);
@@ -1039,13 +1039,13 @@ void GraphicsRenderTests::testClipPolygon()
void GraphicsRenderTests::testClipPolyPolygon()
{
- OUString aTestName = "testClipPolyPolygon";
+ OUString aTestName = u"testClipPolyPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestClip aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupClipPolyPolygon();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestClip::checkClip(aBitmap);
@@ -1060,13 +1060,13 @@ void GraphicsRenderTests::testClipPolyPolygon()
void GraphicsRenderTests::testClipB2DPolyPolygon()
{
- OUString aTestName = "testClipB2DPolyPolygon";
+ OUString aTestName = u"testClipB2DPolyPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestClip aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupClipB2DPolyPolygon();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestClip::checkClip(aBitmap);
@@ -1081,13 +1081,13 @@ void GraphicsRenderTests::testClipB2DPolyPolygon()
void GraphicsRenderTests::testDrawOutDev()
{
- OUString aTestName = "testDrawOutDev";
+ OUString aTestName = u"testDrawOutDev"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestAnotherOutDev aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawOutDev();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1103,13 +1103,13 @@ void GraphicsRenderTests::testDrawOutDev()
void GraphicsRenderTests::testDrawOutDevScaledClipped()
{
- OUString aTestName = "testDrawOutDevScaledClipped";
+ OUString aTestName = u"testDrawOutDevScaledClipped"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestAnotherOutDev aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawOutDevScaledClipped();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1125,13 +1125,13 @@ void GraphicsRenderTests::testDrawOutDevScaledClipped()
void GraphicsRenderTests::testDrawOutDevSelf()
{
- OUString aTestName = "testDrawOutDevSelf";
+ OUString aTestName = u"testDrawOutDevSelf"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestAnotherOutDev aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawOutDevSelf();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1147,13 +1147,13 @@ void GraphicsRenderTests::testDrawOutDevSelf()
void GraphicsRenderTests::testDashedLine()
{
- OUString aTestName = "testDashedLine";
+ OUString aTestName = u"testDashedLine"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDashedLine();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkDashedLine(aBitmap);
@@ -1168,13 +1168,13 @@ void GraphicsRenderTests::testDashedLine()
void GraphicsRenderTests::testLinearGradient()
{
- OUString aTestName = "testLinearGradient";
+ OUString aTestName = u"testLinearGradient"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestGradient aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLinearGradient();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1190,13 +1190,13 @@ void GraphicsRenderTests::testLinearGradient()
void GraphicsRenderTests::testLinearGradientAngled()
{
- OUString aTestName = "testLinearGradientAngled";
+ OUString aTestName = u"testLinearGradientAngled"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestGradient aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLinearGradientAngled();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1212,13 +1212,13 @@ void GraphicsRenderTests::testLinearGradientAngled()
void GraphicsRenderTests::testLinearGradientBorder()
{
- OUString aTestName = "testLinearGradientBorder";
+ OUString aTestName = u"testLinearGradientBorder"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestGradient aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLinearGradientBorder();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1234,13 +1234,13 @@ void GraphicsRenderTests::testLinearGradientBorder()
void GraphicsRenderTests::testLinearGradientIntensity()
{
- OUString aTestName = "testLinearGradientIntensity";
+ OUString aTestName = u"testLinearGradientIntensity"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestGradient aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLinearGradientIntensity();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1256,13 +1256,13 @@ void GraphicsRenderTests::testLinearGradientIntensity()
void GraphicsRenderTests::testLinearGradientSteps()
{
- OUString aTestName = "testLinearGradientSteps";
+ OUString aTestName = u"testLinearGradientSteps"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestGradient aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLinearGradientSteps();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1278,13 +1278,13 @@ void GraphicsRenderTests::testLinearGradientSteps()
void GraphicsRenderTests::testAxialGradient()
{
- OUString aTestName = "testAxialGradient";
+ OUString aTestName = u"testAxialGradient"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestGradient aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupAxialGradient();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1300,13 +1300,13 @@ void GraphicsRenderTests::testAxialGradient()
void GraphicsRenderTests::testRadialGradient()
{
- OUString aTestName = "testRadialGradient";
+ OUString aTestName = u"testRadialGradient"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestGradient aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRadialGradient();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1322,13 +1322,13 @@ void GraphicsRenderTests::testRadialGradient()
void GraphicsRenderTests::testRadialGradientOfs()
{
- OUString aTestName = "testRadialGradientOfs";
+ OUString aTestName = u"testRadialGradientOfs"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestGradient aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRadialGradientOfs();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1339,13 +1339,13 @@ void GraphicsRenderTests::testRadialGradientOfs()
void GraphicsRenderTests::testLineJoinBevel()
{
- OUString aTestName = "testLineJoinBevel";
+ OUString aTestName = u"testLineJoinBevel"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLineJoinBevel();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkLineJoinBevel(aBitmap);
@@ -1360,13 +1360,13 @@ void GraphicsRenderTests::testLineJoinBevel()
void GraphicsRenderTests::testLineJoinRound()
{
- OUString aTestName = "testLineJoinRound";
+ OUString aTestName = u"testLineJoinRound"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLineJoinRound();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkLineJoinRound(aBitmap);
@@ -1381,13 +1381,13 @@ void GraphicsRenderTests::testLineJoinRound()
void GraphicsRenderTests::testLineJoinMiter()
{
- OUString aTestName = "testLineJoinMiter";
+ OUString aTestName = u"testLineJoinMiter"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLineJoinMiter();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkLineJoinMiter(aBitmap);
@@ -1402,13 +1402,13 @@ void GraphicsRenderTests::testLineJoinMiter()
void GraphicsRenderTests::testLineJoinNone()
{
- OUString aTestName = "testLineJoinNone";
+ OUString aTestName = u"testLineJoinNone"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLineJoinNone();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkLineJoinNone(aBitmap);
@@ -1423,13 +1423,13 @@ void GraphicsRenderTests::testLineJoinNone()
void GraphicsRenderTests::testLineCapRound()
{
- OUString aTestName = "testLineCapRound";
+ OUString aTestName = u"testLineCapRound"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLineCapRound();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkLineCapRound(aBitmap);
@@ -1444,13 +1444,13 @@ void GraphicsRenderTests::testLineCapRound()
void GraphicsRenderTests::testLineCapSquare()
{
- OUString aTestName = "testLineCapSquare";
+ OUString aTestName = u"testLineCapSquare"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLineCapSquare();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkLineCapSquare(aBitmap);
@@ -1465,13 +1465,13 @@ void GraphicsRenderTests::testLineCapSquare()
void GraphicsRenderTests::testLineCapButt()
{
- OUString aTestName = "testLineCapButt";
+ OUString aTestName = u"testLineCapButt"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLineCapButt();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkLineCapButt(aBitmap);
@@ -1486,13 +1486,13 @@ void GraphicsRenderTests::testLineCapButt()
void GraphicsRenderTests::testHalfEllipseWithPolyLine()
{
- OUString aTestName = "testHalfEllipseWithPolyLine";
+ OUString aTestName = u"testHalfEllipseWithPolyLine"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupHalfEllipse();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkHalfEllipse(aBitmap);
@@ -1507,13 +1507,13 @@ void GraphicsRenderTests::testHalfEllipseWithPolyLine()
void GraphicsRenderTests::testHalfEllipseAAWithPolyLine()
{
- OUString aTestName = "testHalfEllipseAAWithPolyLine";
+ OUString aTestName = u"testHalfEllipseAAWithPolyLine"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupHalfEllipse(true);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1529,13 +1529,13 @@ void GraphicsRenderTests::testHalfEllipseAAWithPolyLine()
void GraphicsRenderTests::testHalfEllipseWithPolyLineB2D()
{
- OUString aTestName = "testHalfEllipseWithPolyLineB2D";
+ OUString aTestName = u"testHalfEllipseWithPolyLineB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupHalfEllipse();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkHalfEllipse(aBitmap);
@@ -1550,13 +1550,13 @@ void GraphicsRenderTests::testHalfEllipseWithPolyLineB2D()
void GraphicsRenderTests::testHalfEllipseAAWithPolyLineB2D()
{
- OUString aTestName = "testHalfEllipseAAWithPolyLineB2D";
+ OUString aTestName = u"testHalfEllipseAAWithPolyLineB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupHalfEllipse(true);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1572,13 +1572,13 @@ void GraphicsRenderTests::testHalfEllipseAAWithPolyLineB2D()
void GraphicsRenderTests::testHalfEllipseWithPolygon()
{
- OUString aTestName = "testHalfEllipseWithPolygon";
+ OUString aTestName = u"testHalfEllipseWithPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupHalfEllipse();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkHalfEllipse(aBitmap);
@@ -1593,13 +1593,13 @@ void GraphicsRenderTests::testHalfEllipseWithPolygon()
void GraphicsRenderTests::testClosedBezierWithPolyline()
{
- OUString aTestName = "testClosedBezierWithPolyline";
+ OUString aTestName = u"testClosedBezierWithPolyline"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupClosedBezier();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkClosedBezier(aBitmap);
@@ -1614,13 +1614,13 @@ void GraphicsRenderTests::testClosedBezierWithPolyline()
void GraphicsRenderTests::testClosedBezierWithPolygon()
{
- OUString aTestName = "testClosedBezierWithPolygon";
+ OUString aTestName = u"testClosedBezierWithPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupClosedBezier();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkClosedBezier(aBitmap);
@@ -1635,13 +1635,13 @@ void GraphicsRenderTests::testClosedBezierWithPolygon()
void GraphicsRenderTests::testHalfEllipseAAWithPolygon()
{
- OUString aTestName = "testHalfEllipseAAWithPolygon";
+ OUString aTestName = u"testHalfEllipseAAWithPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupHalfEllipse(true);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1657,7 +1657,7 @@ void GraphicsRenderTests::testHalfEllipseAAWithPolygon()
void GraphicsRenderTests::testFilledAsymmetricalDropShape()
{
- OUString aTestName = "testFilledAsymmetricalDropShape";
+ OUString aTestName = u"testFilledAsymmetricalDropShape"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupFilledAsymmetricalDropShape();
@@ -1674,13 +1674,13 @@ void GraphicsRenderTests::testFilledAsymmetricalDropShape()
void GraphicsRenderTests::testTextDrawing()
{
- OUString aTestName = "testTextDrawing";
+ OUString aTestName = u"testTextDrawing"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestText aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupTextBitmap();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestLine::checkTextLocation(aBitmap);
@@ -1695,13 +1695,13 @@ void GraphicsRenderTests::testTextDrawing()
void GraphicsRenderTests::testEvenOddRuleInIntersectingRectsWithPolyPolygon()
{
- OUString aTestName = "testEvenOddRuleInIntersectingRectsWithPolyPolygon";
+ OUString aTestName = u"testEvenOddRuleInIntersectingRectsWithPolyPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupIntersectingRectangles();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1717,13 +1717,13 @@ void GraphicsRenderTests::testEvenOddRuleInIntersectingRectsWithPolyPolygon()
void GraphicsRenderTests::testEvenOddRuleInIntersectingRectsWithPolyPolygonB2D()
{
- OUString aTestName = "testEvenOddRuleInIntersectingRectsWithPolyPolygonB2D";
+ OUString aTestName = u"testEvenOddRuleInIntersectingRectsWithPolyPolygonB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupIntersectingRectangles();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1739,13 +1739,13 @@ void GraphicsRenderTests::testEvenOddRuleInIntersectingRectsWithPolyPolygonB2D()
void GraphicsRenderTests::testDrawBitmap8bppGreyScale()
{
- OUString aTestName = "testDrawBitmap8bppGreyScale";
+ OUString aTestName = u"testDrawBitmap8bppGreyScale"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawBitmap(vcl::PixelFormat::N8_BPP, true);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1761,13 +1761,13 @@ void GraphicsRenderTests::testDrawBitmap8bppGreyScale()
void GraphicsRenderTests::testDrawTransformedBitmap8bppGreyScale()
{
- OUString aTestName = "testDrawTransformedBitmap8bppGreyScale";
+ OUString aTestName = u"testDrawTransformedBitmap8bppGreyScale"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawTransformedBitmap(vcl::PixelFormat::N8_BPP, true);
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1783,13 +1783,13 @@ void GraphicsRenderTests::testDrawTransformedBitmap8bppGreyScale()
void GraphicsRenderTests::testDrawBitmap32bpp()
{
- OUString aTestName = "testDrawBitmap32bpp";
+ OUString aTestName = u"testDrawBitmap32bpp"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawBitmap(vcl::PixelFormat::N32_BPP);
if (!SHOULD_ASSERT || !is32bppSupported())
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1805,13 +1805,13 @@ void GraphicsRenderTests::testDrawBitmap32bpp()
void GraphicsRenderTests::testDrawTransformedBitmap32bpp()
{
- OUString aTestName = "testDrawTransformedBitmap32bpp";
+ OUString aTestName = u"testDrawTransformedBitmap32bpp"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawTransformedBitmap(vcl::PixelFormat::N32_BPP);
if (!SHOULD_ASSERT || !is32bppSupported())
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1827,13 +1827,13 @@ void GraphicsRenderTests::testDrawTransformedBitmap32bpp()
void GraphicsRenderTests::testDrawBitmapExWithAlpha32bpp()
{
- OUString aTestName = "testDrawBitmapExWithAlpha32bpp";
+ OUString aTestName = u"testDrawBitmapExWithAlpha32bpp"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawBitmapExWithAlpha(vcl::PixelFormat::N32_BPP);
if (!SHOULD_ASSERT || !is32bppSupported())
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult
@@ -1849,13 +1849,13 @@ void GraphicsRenderTests::testDrawBitmapExWithAlpha32bpp()
void GraphicsRenderTests::testDrawMask32bpp()
{
- OUString aTestName = "testDrawMask32bpp";
+ OUString aTestName = u"testDrawMask32bpp"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawMask(vcl::PixelFormat::N32_BPP);
if (!SHOULD_ASSERT || !is32bppSupported())
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestBitmap::checkMask(aBitmap);
@@ -1870,13 +1870,13 @@ void GraphicsRenderTests::testDrawMask32bpp()
void GraphicsRenderTests::testDrawBlend32bpp()
{
- OUString aTestName = "testDrawBlend32bpp";
+ OUString aTestName = u"testDrawBlend32bpp"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestBitmap aOutDevTest;
BitmapEx aBitmapEx = aOutDevTest.setupDrawBlend(vcl::PixelFormat::N32_BPP);
if (!SHOULD_ASSERT || !is32bppSupported())
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestBitmap::checkBlend(aBitmapEx);
@@ -1890,14 +1890,14 @@ void GraphicsRenderTests::testDrawBlend32bpp()
void GraphicsRenderTests::testDrawRectangleOnSize1028WithRect()
{
- OUString aTestName = "testDrawRectangleOnSize1028WithRect";
+ OUString aTestName = u"testDrawRectangleOnSize1028WithRect"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestRect aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
m_aCurGraphicsBackend = aOutDevTest.getRenderBackendName();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -1912,14 +1912,14 @@ void GraphicsRenderTests::testDrawRectangleOnSize1028WithRect()
void GraphicsRenderTests::testDrawRectangleOnSize4096WithRect()
{
- OUString aTestName = "testDrawRectangleOnSize4096WithRect";
+ OUString aTestName = u"testDrawRectangleOnSize4096WithRect"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestRect aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
m_aCurGraphicsBackend = aOutDevTest.getRenderBackendName();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -1934,13 +1934,13 @@ void GraphicsRenderTests::testDrawRectangleOnSize4096WithRect()
void GraphicsRenderTests::testDrawRectangleOnSize1028WithPixel()
{
- OUString aTestName = "testDrawRectangleOnSize1028WithPixel";
+ OUString aTestName = u"testDrawRectangleOnSize1028WithPixel"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPixel aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -1955,13 +1955,13 @@ void GraphicsRenderTests::testDrawRectangleOnSize1028WithPixel()
void GraphicsRenderTests::testDrawRectangleOnSize4096WithPixel()
{
- OUString aTestName = "testDrawRectangleOnSize4096WithPixel";
+ OUString aTestName = u"testDrawRectangleOnSize4096WithPixel"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPixel aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -1976,13 +1976,13 @@ void GraphicsRenderTests::testDrawRectangleOnSize4096WithPixel()
void GraphicsRenderTests::testDrawRectangleOnSize1028WithLine()
{
- OUString aTestName = "testDrawRectangleOnSize1028WithLine";
+ OUString aTestName = u"testDrawRectangleOnSize1028WithLine"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -1997,13 +1997,13 @@ void GraphicsRenderTests::testDrawRectangleOnSize1028WithLine()
void GraphicsRenderTests::testDrawRectangleOnSize4096WithLine()
{
- OUString aTestName = "testDrawRectangleOnSize4096WithLine";
+ OUString aTestName = u"testDrawRectangleOnSize4096WithLine"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -2018,13 +2018,13 @@ void GraphicsRenderTests::testDrawRectangleOnSize4096WithLine()
void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolyLine()
{
- OUString aTestName = "testDrawRectangleOnSize1028WithPolyLine";
+ OUString aTestName = u"testDrawRectangleOnSize1028WithPolyLine"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -2039,13 +2039,13 @@ void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolyLine()
void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolyLine()
{
- OUString aTestName = "testDrawRectangleOnSize4096WithPolyLine";
+ OUString aTestName = u"testDrawRectangleOnSize4096WithPolyLine"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -2060,13 +2060,13 @@ void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolyLine()
void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolygon()
{
- OUString aTestName = "testDrawRectangleOnSize1028WithPolygon";
+ OUString aTestName = u"testDrawRectangleOnSize1028WithPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -2081,13 +2081,13 @@ void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolygon()
void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolygon()
{
- OUString aTestName = "testDrawRectangleOnSize4096WithPolygon";
+ OUString aTestName = u"testDrawRectangleOnSize4096WithPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -2102,13 +2102,13 @@ void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolygon()
void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolyLineB2D()
{
- OUString aTestName = "testDrawRectangleOnSize1028WithPolyLineB2D";
+ OUString aTestName = u"testDrawRectangleOnSize1028WithPolyLineB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -2123,13 +2123,13 @@ void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolyLineB2D()
void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolyLineB2D()
{
- OUString aTestName = "testDrawRectangleOnSize4096WithPolyLineB2D";
+ OUString aTestName = u"testDrawRectangleOnSize4096WithPolyLineB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -2144,13 +2144,13 @@ void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolyLineB2D()
void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolyPolygon()
{
- OUString aTestName = "testDrawRectangleOnSize1028WithPolyPolygon";
+ OUString aTestName = u"testDrawRectangleOnSize1028WithPolyPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -2165,13 +2165,13 @@ void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolyPolygon()
void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolyPolygon()
{
- OUString aTestName = "testDrawRectangleOnSize4096WithPolyPolygon";
+ OUString aTestName = u"testDrawRectangleOnSize4096WithPolyPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -2186,13 +2186,13 @@ void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolyPolygon()
void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolyPolygonB2D()
{
- OUString aTestName = "testDrawRectangleOnSize1028WithPolyPolygonB2D";
+ OUString aTestName = u"testDrawRectangleOnSize1028WithPolyPolygonB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangleOnSize1028();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -2207,13 +2207,13 @@ void GraphicsRenderTests::testDrawRectangleOnSize1028WithPolyPolygonB2D()
void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolygonPolygonB2D()
{
- OUString aTestName = "testDrawRectangleOnSize4096WithPolygonPolygonB2D";
+ OUString aTestName = u"testDrawRectangleOnSize4096WithPolygonPolygonB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangleOnSize4096();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
@@ -2228,13 +2228,13 @@ void GraphicsRenderTests::testDrawRectangleOnSize4096WithPolygonPolygonB2D()
void GraphicsRenderTests::testDrawOpenPolygonWithPolyLine()
{
- OUString aTestName = "testDrawOpenPolygonWithPolyLine";
+ OUString aTestName = u"testDrawOpenPolygonWithPolyLine"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupOpenPolygon();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkOpenPolygon(aBitmap);
@@ -2249,13 +2249,13 @@ void GraphicsRenderTests::testDrawOpenPolygonWithPolyLine()
void GraphicsRenderTests::testDrawOpenPolygonWithPolyLineB2D()
{
- OUString aTestName = "testDrawOpenPolygonWithPolyLineB2D";
+ OUString aTestName = u"testDrawOpenPolygonWithPolyLineB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupOpenPolygon();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkOpenPolygon(aBitmap);
@@ -2270,13 +2270,13 @@ void GraphicsRenderTests::testDrawOpenPolygonWithPolyLineB2D()
void GraphicsRenderTests::testDrawOpenPolygonWithPolygon()
{
- OUString aTestName = "testDrawOpenPolygonWithPolygon";
+ OUString aTestName = u"testDrawOpenPolygonWithPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupOpenPolygon();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkOpenPolygon(aBitmap);
@@ -2291,13 +2291,13 @@ void GraphicsRenderTests::testDrawOpenPolygonWithPolygon()
void GraphicsRenderTests::testDrawOpenPolygonWithPolyPolygon()
{
- OUString aTestName = "testDrawOpenPolygonWithPolyPolygon";
+ OUString aTestName = u"testDrawOpenPolygonWithPolyPolygon"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupOpenPolygon();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkOpenPolygon(aBitmap);
@@ -2312,13 +2312,13 @@ void GraphicsRenderTests::testDrawOpenPolygonWithPolyPolygon()
void GraphicsRenderTests::testDrawOpenPolygonWithPolyPolygonB2D()
{
- OUString aTestName = "testDrawOpenPolygonWithPolyPolygonB2D";
+ OUString aTestName = u"testDrawOpenPolygonWithPolyPolygonB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupOpenPolygon();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkOpenPolygon(aBitmap);
@@ -2333,13 +2333,13 @@ void GraphicsRenderTests::testDrawOpenPolygonWithPolyPolygonB2D()
void GraphicsRenderTests::testDrawOpenBezierWithPolyLine()
{
- OUString aTestName = "testDrawOpenBezierWithPolyLine";
+ OUString aTestName = u"testDrawOpenBezierWithPolyLine"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupOpenBezier();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkOpenBezier(aBitmap);
@@ -2354,13 +2354,13 @@ void GraphicsRenderTests::testDrawOpenBezierWithPolyLine()
void GraphicsRenderTests::testDrawOpenBezierWithPolyLineB2D()
{
- OUString aTestName = "testDrawOpenBezierWithPolyLineB2D";
+ OUString aTestName = u"testDrawOpenBezierWithPolyLineB2D"_ustr;
GraphicsTestZone zone(aTestName);
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupOpenBezier();
if (!SHOULD_ASSERT)
{
- appendTestResult(aTestName, "SKIPPED");
+ appendTestResult(aTestName, u"SKIPPED"_ustr);
return;
}
vcl::test::TestResult eResult = vcl::test::OutputDeviceTestCommon::checkOpenBezier(aBitmap);
@@ -2556,9 +2556,9 @@ void GraphicsRenderTests::run(bool storeResultBitmap)
aTests[tests.getStatus()].push_back(tests.getTestName());
}
OUString writeResult = getResultString() + "\n---Name of the tests that failed---\n";
- if (static_cast<int>(aTests["FAILED"].size()) > 0)
+ if (static_cast<int>(aTests[u"FAILED"_ustr].size()) > 0)
{
- for (const class OUString& tests : aTests["FAILED"])
+ for (const class OUString& tests : aTests[u"FAILED"_ustr])
{
writeResult += tests + "\n";
}
@@ -2568,9 +2568,9 @@ void GraphicsRenderTests::run(bool storeResultBitmap)
writeResult += "No test has been failed.\n";
}
writeResult += "\n---Name of the tests that were Quirky---\n";
- if (static_cast<int>(aTests["QUIRKY"].size()) > 0)
+ if (static_cast<int>(aTests[u"QUIRKY"_ustr].size()) > 0)
{
- for (const class OUString& tests : aTests["QUIRKY"])
+ for (const class OUString& tests : aTests[u"QUIRKY"_ustr])
{
writeResult += tests + "\n";
}
@@ -2580,9 +2580,9 @@ void GraphicsRenderTests::run(bool storeResultBitmap)
writeResult += "No test was Quirky.\n";
}
writeResult += "\n---Name of the tests that were Skipped---\n";
- if (static_cast<int>(aTests["SKIPPED"].size()) > 0)
+ if (static_cast<int>(aTests[u"SKIPPED"_ustr].size()) > 0)
{
- for (const class OUString& tests : aTests["SKIPPED"])
+ for (const class OUString& tests : aTests[u"SKIPPED"_ustr])
{
writeResult += tests + "\n";
}
diff --git a/vcl/backendtest/VisualBackendTest.cxx b/vcl/backendtest/VisualBackendTest.cxx
index 221f18254389..55fdd16712cc 100644
--- a/vcl/backendtest/VisualBackendTest.cxx
+++ b/vcl/backendtest/VisualBackendTest.cxx
@@ -830,7 +830,7 @@ public:
{
ScopedVclPtrInstance<VisualBackendTestWindow> aMainWindow;
- aMainWindow->SetText("VCL Test");
+ aMainWindow->SetText(u"VCL Test"_ustr);
aMainWindow->Show();
Application::Execute();
@@ -857,7 +857,7 @@ protected:
uno::Reference<lang::XMultiServiceFactory> xMSF(xComponentContext->getServiceManager(), uno::UNO_QUERY);
if (!xMSF.is())
- Application::Abort("Bootstrap failure - no service manager");
+ Application::Abort(u"Bootstrap failure - no service manager"_ustr);
comphelper::setProcessServiceFactory(xMSF);
}
diff --git a/vcl/backendtest/outputdevice/text.cxx b/vcl/backendtest/outputdevice/text.cxx
index 5e53d900babd..bdb78fca184b 100644
--- a/vcl/backendtest/outputdevice/text.cxx
+++ b/vcl/backendtest/outputdevice/text.cxx
@@ -22,12 +22,12 @@ Bitmap OutputDeviceTestText::setupTextBitmap()
tools::Long midX = (maVDRectangle.Right() - maVDRectangle.Left()) / 2.0;
tools::Long midY = (maVDRectangle.Bottom() - maVDRectangle.Top()) / 2.0;
- vcl::Font Font("DejaVu Sans", "Book", Size(0, 10));
+ vcl::Font Font(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 10));
mpVirtualDevice->Erase();
mpVirtualDevice->SetFont(Font);
mpVirtualDevice->SetTextColor(COL_LIGHTRED);
- mpVirtualDevice->DrawText(Point(midX, midY - midY / 2), "I");
+ mpVirtualDevice->DrawText(Point(midX, midY - midY / 2), u"I"_ustr);
return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize());
}
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index c31ae5e89970..bae2312f2478 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -416,7 +416,7 @@ void SvpSalFrame::UpdateSettings( AllSettings& rSettings )
vcl::Font aStdFont( FAMILY_SWISS, Size( 0, 14 ) );
aStdFont.SetCharSet( osl_getThreadTextEncoding() );
aStdFont.SetWeight( WEIGHT_NORMAL );
- aStdFont.SetFamilyName( "Liberation Sans" );
+ aStdFont.SetFamilyName( u"Liberation Sans"_ustr );
aStyleSettings.BatchSetFonts( aStdFont, aStdFont );
aStdFont.SetFontSize(Size(0, 12));
diff --git a/vcl/headless/svpprn.cxx b/vcl/headless/svpprn.cxx
index 4d81b7c3fd1a..07321db86e9b 100644
--- a/vcl/headless/svpprn.cxx
+++ b/vcl/headless/svpprn.cxx
@@ -98,7 +98,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
pJobSetup->SetPaperBin( 0xffff );
if( rData.m_pParser )
- pKey = rData.m_pParser->getKey( "InputSlot" );
+ pKey = rData.m_pParser->getKey( u"InputSlot"_ustr );
if( pKey )
pValue = rData.m_aContext.getValue( pKey );
if( pKey && pValue )
@@ -120,7 +120,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
pJobSetup->SetDuplexMode( DuplexMode::Unknown );
if( rData.m_pParser )
- pKey = rData.m_pParser->getKey( "Duplex" );
+ pKey = rData.m_pParser->getKey( u"Duplex"_ustr );
if( pKey )
pValue = rData.m_aContext.getValue( pKey );
if( pKey && pValue )
diff --git a/vcl/inc/font/FontSelectPattern.hxx b/vcl/inc/font/FontSelectPattern.hxx
index 8e21cf5696bc..d95cc36ae07f 100644
--- a/vcl/inc/font/FontSelectPattern.hxx
+++ b/vcl/inc/font/FontSelectPattern.hxx
@@ -77,7 +77,7 @@ template< typename charT, typename traits >
inline std::basic_ostream<charT, traits> & operator <<(
std::basic_ostream<charT, traits> & stream, const vcl::font::FontSelectPattern & rFSP)
{
- stream << (rFSP.maTargetName.isEmpty() ? "<default>" : rFSP.maTargetName)
+ stream << (rFSP.maTargetName.isEmpty() ? u"<default>"_ustr : rFSP.maTargetName)
<< " (" << rFSP.maSearchName << ") w: " << rFSP.mnWidth << " h: "
<< rFSP.mnHeight << " alias: " << rFSP.mbNonAntialiased;
return stream;
diff --git a/vcl/inc/headless/SvpGraphicsBackend.hxx b/vcl/inc/headless/SvpGraphicsBackend.hxx
index c193fbee4465..4475216148c0 100644
--- a/vcl/inc/headless/SvpGraphicsBackend.hxx
+++ b/vcl/inc/headless/SvpGraphicsBackend.hxx
@@ -38,7 +38,7 @@ public:
void freeResources() override;
- OUString getRenderBackendName() const override { return "svp"; }
+ OUString getRenderBackendName() const override { return u"svp"_ustr; }
void setClipRegion(vcl::Region const& rRegion) override;
void ResetClipRegion() override;
diff --git a/vcl/inc/qt5/QtGraphics.hxx b/vcl/inc/qt5/QtGraphics.hxx
index fce2b0d9b56d..5277fba33923 100644
--- a/vcl/inc/qt5/QtGraphics.hxx
+++ b/vcl/inc/qt5/QtGraphics.hxx
@@ -67,7 +67,7 @@ public:
void freeResources() override {}
- OUString getRenderBackendName() const override { return "qt5"; }
+ OUString getRenderBackendName() const override { return u"qt5"_ustr; }
void setClipRegion(vcl::Region const& rRegion) override;
void ResetClipRegion() override;
diff --git a/vcl/inc/qt5/QtSvpGraphics.hxx b/vcl/inc/qt5/QtSvpGraphics.hxx
index da3786eee165..f3e3de3394dd 100644
--- a/vcl/inc/qt5/QtSvpGraphics.hxx
+++ b/vcl/inc/qt5/QtSvpGraphics.hxx
@@ -48,7 +48,7 @@ public:
virtual void GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) override;
- virtual OUString getRenderBackendName() const override { return "qt5svp"; }
+ virtual OUString getRenderBackendName() const override { return u"qt5svp"_ustr; }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index 124118f4e609..ca6a6920bf76 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -203,7 +203,7 @@ public:
virtual void releaseMainThread() {}
/// get information about underlying versions
- virtual OUString getOSVersion() { return "-"; }
+ virtual OUString getOSVersion() { return u"-"_ustr; }
virtual const cairo_font_options_t* GetCairoFontOptions() { return nullptr; }
diff --git a/vcl/inc/skia/gdiimpl.hxx b/vcl/inc/skia/gdiimpl.hxx
index 71f5cce8aae6..0cd1a61b3ced 100644
--- a/vcl/inc/skia/gdiimpl.hxx
+++ b/vcl/inc/skia/gdiimpl.hxx
@@ -45,7 +45,7 @@ public:
virtual void DeInit() override;
- virtual OUString getRenderBackendName() const override { return "skia"; }
+ virtual OUString getRenderBackendName() const override { return u"skia"_ustr; }
const vcl::Region& getClipRegion() const;
virtual void setClipRegion(const vcl::Region&) override;
diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx
index 9d8bb26ce787..d6430d2bb6e0 100644
--- a/vcl/inc/unx/gtk/gtkgdi.hxx
+++ b/vcl/inc/unx/gtk/gtkgdi.hxx
@@ -127,7 +127,7 @@ public:
virtual void GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) override;
- virtual OUString getRenderBackendName() const override { return "gtk3svp"; }
+ virtual OUString getRenderBackendName() const override { return u"gtk3svp"_ustr; }
GtkStyleContext* createStyleContext(GtkControlPart ePart);
#if !GTK_CHECK_VERSION(4, 0, 0)
diff --git a/vcl/inc/vclstatuslistener.hxx b/vcl/inc/vclstatuslistener.hxx
index bc10456650b0..bea222ef83dd 100644
--- a/vcl/inc/vclstatuslistener.hxx
+++ b/vcl/inc/vclstatuslistener.hxx
@@ -61,7 +61,7 @@ void VclStatusListener<T>::startListening()
if (!xDispatchProvider.is())
return;
- mxDispatch = xDispatchProvider->queryDispatch(maCommandURL, "", 0);
+ mxDispatch = xDispatchProvider->queryDispatch(maCommandURL, u""_ustr, 0);
if (mxDispatch.is())
mxDispatch->addStatusListener(this, maCommandURL);
}
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 3eebd350ef88..9df655b979a2 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -54,8 +54,8 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
{
weld::Widget* pWidget = JSInstanceBuilder::FindWeldWidgetsMap(nWindowId, rWidget);
- OUString sControlType = rData["type"];
- OUString sAction = rData["cmd"];
+ OUString sControlType = rData[u"type"_ustr];
+ OUString sAction = rData[u"cmd"_ustr];
if (sControlType == "responsebutton")
{
@@ -63,7 +63,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
if (pWidget == nullptr || (pButton && !pButton->is_custom_handler_set()))
{
// welded wrapper not found - use response code instead
- pWidget = JSInstanceBuilder::FindWeldWidgetsMap(nWindowId, "__DIALOG__");
+ pWidget = JSInstanceBuilder::FindWeldWidgetsMap(nWindowId, u"__DIALOG__"_ustr);
sControlType = "dialog";
sAction = "response";
}
@@ -89,7 +89,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
{
if (sAction == "selecttab")
{
- sal_Int32 page = o3tl::toInt32(rData["data"]);
+ sal_Int32 page = o3tl::toInt32(rData[u"data"_ustr]);
OUString aCurrentPage = pNotebook->get_current_page_ident();
LOKTrigger::leave_page(*pNotebook, aCurrentPage);
@@ -107,7 +107,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
{
if (sAction == "selected")
{
- OUString sSelectedData = rData["data"];
+ OUString sSelectedData = rData[u"data"_ustr];
int separatorPos = sSelectedData.indexOf(';');
if (separatorPos > 0)
{
@@ -123,9 +123,9 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
// it might be other class than JSComboBox
auto pJSCombobox = dynamic_cast<JSComboBox*>(pWidget);
if (pJSCombobox)
- pJSCombobox->set_entry_text_without_notify(rData["data"]);
+ pJSCombobox->set_entry_text_without_notify(rData[u"data"_ustr]);
else
- pCombobox->set_entry_text(rData["data"]);
+ pCombobox->set_entry_text(rData[u"data"_ustr]);
LOKTrigger::trigger_changed(*pCombobox);
return true;
}
@@ -135,7 +135,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
if (pJSCombobox)
{
// pos;dpix;dpiy
- const OUString& sParams = rData["data"];
+ const OUString& sParams = rData[u"data"_ustr];
const OUString aPos = sParams.getToken(0, ';');
const OUString aDpiScaleX = sParams.getToken(1, ';');
const OUString aDpiScaleY = sParams.getToken(2, ';');
@@ -196,7 +196,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
}
else if (sAction == "select")
{
- LOKTrigger::trigger_selected(*pButton, rData["data"]);
+ LOKTrigger::trigger_selected(*pButton, rData[u"data"_ustr]);
return true;
}
}
@@ -208,7 +208,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
{
if (sAction == "change")
{
- bool bChecked = rData["data"] == "true";
+ bool bChecked = rData[u"data"_ustr] == "true";
pCheckButton->set_state(bChecked ? TRISTATE_TRUE : TRISTATE_FALSE);
LOKTrigger::trigger_toggled(*static_cast<weld::Toggleable*>(pCheckButton));
return true;
@@ -223,7 +223,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
if (sAction == "click" || sAction == "dblclick" || sAction == "mousemove"
|| sAction == "mousedown" || sAction == "mouseup")
{
- OUString sClickData = rData["data"];
+ OUString sClickData = rData[u"data"_ustr];
int nSeparatorPos = sClickData.indexOf(';');
if (nSeparatorPos > 0)
{
@@ -260,14 +260,14 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
}
else if (sAction == "keypress")
{
- sal_uInt32 nKeyNo = rData["data"].toUInt32();
+ sal_uInt32 nKeyNo = rData[u"data"_ustr].toUInt32();
LOKTrigger::trigger_key_press(*pArea, KeyEvent(nKeyNo, vcl::KeyCode(nKeyNo)));
LOKTrigger::trigger_key_release(*pArea, KeyEvent(nKeyNo, vcl::KeyCode(nKeyNo)));
return true;
}
else if (sAction == "textselection")
{
- OUString sTextData = rData["data"];
+ OUString sTextData = rData[u"data"_ustr];
int nSeparatorPos = sTextData.indexOf(';');
if (nSeparatorPos <= 0)
return true;
@@ -335,14 +335,14 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
{
if (sAction == "change" || sAction == "value")
{
- if (rData["data"] == "undefined")
+ if (rData[u"data"_ustr] == "undefined")
return true;
// The Document will not scroll if that is in focus
// maybe we could send a message with: sAction == "grab_focus"
pWidget->grab_focus();
- double nValue = o3tl::toDouble(rData["data"]);
+ double nValue = o3tl::toDouble(rData[u"data"_ustr]);
pSpinField->set_value(nValue
* weld::SpinButton::Power10(pSpinField->get_digits()));
LOKTrigger::trigger_value_changed(*pSpinField);
@@ -367,7 +367,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
{
if (sAction == "change")
{
- pFormattedField->set_text(rData["data"]);
+ pFormattedField->set_text(rData[u"data"_ustr]);
LOKTrigger::trigger_changed(*pFormattedField);
LOKTrigger::trigger_value_changed(*pFormattedField);
return true;
@@ -381,24 +381,24 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
{
if (sAction == "click")
{
- LOKTrigger::trigger_clicked(*pToolbar, rData["data"]);
+ LOKTrigger::trigger_clicked(*pToolbar, rData[u"data"_ustr]);
return true;
}
else if (sAction == "togglemenu")
{
- const OUString& sId = rData["data"];
+ const OUString& sId = rData[u"data"_ustr];
bool bIsActive = pToolbar->get_menu_item_active(sId);
pToolbar->set_menu_item_active(sId, !bIsActive);
return true;
}
else if (sAction == "closemenu")
{
- pToolbar->set_menu_item_active(rData["data"], false);
+ pToolbar->set_menu_item_active(rData[u"data"_ustr], false);
return true;
}
else if (sAction == "openmenu")
{
- pToolbar->set_menu_item_active(rData["data"], true);
+ pToolbar->set_menu_item_active(rData[u"data"_ustr], true);
return true;
}
}
@@ -410,7 +410,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
{
if (sAction == "change")
{
- pEdit->set_text_without_notify(rData["data"]);
+ pEdit->set_text_without_notify(rData[u"data"_ustr]);
LOKTrigger::trigger_changed(*pEdit);
return true;
}
@@ -423,7 +423,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
{
int rStartPos, rEndPos;
pTextView->get_selection_bounds(rStartPos, rEndPos);
- pTextView->set_text_without_notify(rData["data"]);
+ pTextView->set_text_without_notify(rData[u"data"_ustr]);
pTextView->select_region(rStartPos, rEndPos);
LOKTrigger::trigger_changed(*pTextView);
return true;
@@ -431,7 +431,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
else if (sAction == "textselection")
{
// start;end
- OUString sTextData = rData["data"];
+ OUString sTextData = rData[u"data"_ustr];
int nSeparatorPos = sTextData.indexOf(';');
if (nSeparatorPos <= 0)
return true;
@@ -460,13 +460,13 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
if (sAction == "change")
{
OUString sDataJSON = rtl::Uri::decode(
- rData["data"], rtl_UriDecodeMechanism::rtl_UriDecodeWithCharset,
+ rData[u"data"_ustr], rtl_UriDecodeMechanism::rtl_UriDecodeWithCharset,
RTL_TEXTENCODING_UTF8);
StringMap aMap(jsonToStringMap(
OUStringToOString(sDataJSON, RTL_TEXTENCODING_ASCII_US).getStr()));
- sal_Int32 nRow = o3tl::toInt32(aMap["row"]);
- bool bValue = aMap["value"] == "true";
+ sal_Int32 nRow = o3tl::toInt32(aMap[u"row"_ustr]);
+ bool bValue = aMap[u"value"_ustr] == "true";
pTreeView->set_toggle(nRow, bValue ? TRISTATE_TRUE : TRISTATE_FALSE);
@@ -474,7 +474,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
}
else if (sAction == "select")
{
- sal_Int32 nAbsPos = o3tl::toInt32(rData["data"]);
+ sal_Int32 nAbsPos = o3tl::toInt32(rData[u"data"_ustr]);
pTreeView->unselect_all();
@@ -493,7 +493,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
}
else if (sAction == "activate")
{
- sal_Int32 nRow = o3tl::toInt32(rData["data"]);
+ sal_Int32 nRow = o3tl::toInt32(rData[u"data"_ustr]);
pTreeView->unselect_all();
std::unique_ptr<weld::TreeIter> itEntry(pTreeView->make_iterator());
@@ -512,7 +512,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
}
else if (sAction == "expand")
{
- sal_Int32 nAbsPos = o3tl::toInt32(rData["data"]);
+ sal_Int32 nAbsPos = o3tl::toInt32(rData[u"data"_ustr]);
std::unique_ptr<weld::TreeIter> itEntry(pTreeView->make_iterator());
if (pTreeView->get_iter_abs_pos(*itEntry, nAbsPos))
{
@@ -527,7 +527,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
}
else if (sAction == "collapse")
{
- sal_Int32 nAbsPos = o3tl::toInt32(rData["data"]);
+ sal_Int32 nAbsPos = o3tl::toInt32(rData[u"data"_ustr]);
std::unique_ptr<weld::TreeIter> itEntry(pTreeView->make_iterator());
if (pTreeView->get_iter_abs_pos(*itEntry, nAbsPos))
{
@@ -542,7 +542,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
}
else if (sAction == "dragstart")
{
- sal_Int32 nRow = o3tl::toInt32(rData["data"]);
+ sal_Int32 nRow = o3tl::toInt32(rData[u"data"_ustr]);
pTreeView->select(nRow);
pTreeView->drag_start();
@@ -563,7 +563,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
{
if (sAction == "select")
{
- sal_Int32 nPos = o3tl::toInt32(rData["data"]);
+ sal_Int32 nPos = o3tl::toInt32(rData[u"data"_ustr]);
pIconView->select(nPos);
LOKTrigger::trigger_changed(*pIconView);
@@ -572,7 +572,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
}
else if (sAction == "activate")
{
- sal_Int32 nPos = o3tl::toInt32(rData["data"]);
+ sal_Int32 nPos = o3tl::toInt32(rData[u"data"_ustr]);
pIconView->select(nPos);
LOKTrigger::trigger_changed(*pIconView);
@@ -606,7 +606,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
}
else if (sAction == "response")
{
- sal_Int32 nResponse = o3tl::toInt32(rData["data"]);
+ sal_Int32 nResponse = o3tl::toInt32(rData[u"data"_ustr]);
pDialog->response(nResponse);
return true;
}
@@ -631,7 +631,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
{
if (sAction == "change")
{
- bool bChecked = rData["data"] == "true";
+ bool bChecked = rData[u"data"_ustr] == "true";
pRadioButton->set_state(bChecked ? TRISTATE_TRUE : TRISTATE_FALSE);
LOKTrigger::trigger_toggled(*static_cast<weld::Toggleable*>(pRadioButton));
return true;
@@ -645,14 +645,14 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
{
if (sAction == "scrollv")
{
- sal_Int32 nValue = o3tl::toInt32(rData["data"]);
+ sal_Int32 nValue = o3tl::toInt32(rData[u"data"_ustr]);
pScrolledWindow->vadjustment_set_value_no_notification(nValue);
LOKTrigger::trigger_scrollv(*pScrolledWindow);
return true;
}
else if (sAction == "scrollh")
{
- sal_Int32 nValue = o3tl::toInt32(rData["data"]);
+ sal_Int32 nValue = o3tl::toInt32(rData[u"data"_ustr]);
pScrolledWindow->hadjustment_set_value_no_notification(nValue);
LOKTrigger::trigger_scrollh(*pScrolledWindow);
return true;
@@ -665,7 +665,7 @@ bool ExecuteAction(const OUString& nWindowId, const OUString& rWidget, StringMap
if (pCalendar && sAction == "selectdate")
{
// MM/DD/YYYY
- OUString aDate = rData["data"];
+ OUString aDate = rData[u"data"_ustr];
if (aDate.getLength() < 10)
return false;
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index d4767a4f3311..634dc54d8c04 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -439,7 +439,7 @@ void JSDropTarget::setDefaultActions(sal_Int8 /*actions*/) {}
OUString JSDropTarget::getImplementationName()
{
- return "com.sun.star.datatransfer.dnd.JSDropTarget";
+ return u"com.sun.star.datatransfer.dnd.JSDropTarget"_ustr;
}
sal_Bool JSDropTarget::supportsService(OUString const& ServiceName)
@@ -449,7 +449,7 @@ sal_Bool JSDropTarget::supportsService(OUString const& ServiceName)
css::uno::Sequence<OUString> JSDropTarget::getSupportedServiceNames()
{
- css::uno::Sequence<OUString> aRet{ "com.sun.star.datatransfer.dnd.JSDropTarget" };
+ css::uno::Sequence<OUString> aRet{ u"com.sun.star.datatransfer.dnd.JSDropTarget"_ustr };
return aRet;
}
@@ -495,7 +495,7 @@ JSInstanceBuilder::JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIR
, m_nWindowId(0)
, m_aParentDialog(nullptr)
, m_aContentWindow(nullptr)
- , m_sTypeOfJSON("dialog")
+ , m_sTypeOfJSON(u"dialog"_ustr)
, m_bHasTopLevelDialog(false)
, m_bIsNotebookbar(false)
, m_bSentInitialUpdate(false)
@@ -529,7 +529,7 @@ JSInstanceBuilder::JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIR
, m_nWindowId(nLOKWindowId)
, m_aParentDialog(nullptr)
, m_aContentWindow(nullptr)
- , m_sTypeOfJSON("sidebar")
+ , m_sTypeOfJSON(u"sidebar"_ustr)
, m_bHasTopLevelDialog(false)
, m_bIsNotebookbar(false)
, m_bSentInitialUpdate(false)
@@ -573,7 +573,7 @@ JSInstanceBuilder::JSInstanceBuilder(vcl::Window* pParent, const OUString& rUIRo
, m_nWindowId(0)
, m_aParentDialog(nullptr)
, m_aContentWindow(nullptr)
- , m_sTypeOfJSON("notebookbar")
+ , m_sTypeOfJSON(u"notebookbar"_ustr)
, m_bHasTopLevelDialog(false)
, m_bIsNotebookbar(false)
, m_bSentInitialUpdate(false)
@@ -604,7 +604,7 @@ JSInstanceBuilder::JSInstanceBuilder(vcl::Window* pParent, const OUString& rUIRo
, m_nWindowId(nLOKWindowId)
, m_aParentDialog(nullptr)
, m_aContentWindow(nullptr)
- , m_sTypeOfJSON("formulabar")
+ , m_sTypeOfJSON(u"formulabar"_ustr)
, m_bHasTopLevelDialog(false)
, m_bIsNotebookbar(false)
, m_bSentInitialUpdate(false)
@@ -663,7 +663,7 @@ JSInstanceBuilder::~JSInstanceBuilder()
// tab page closed -> refresh parent window
if (m_bIsNestedBuilder && m_sTypeOfJSON == "dialog")
{
- jsdialog::SendFullUpdate(OUString::number(m_nWindowId), "__DIALOG__");
+ jsdialog::SendFullUpdate(OUString::number(m_nWindowId), u"__DIALOG__"_ustr);
}
if (m_sTypeOfJSON == "popup")
@@ -838,7 +838,7 @@ std::unique_ptr<weld::Dialog> JSInstanceBuilder::weld_dialog(const OUString& id)
pRet.reset(new JSDialog(this, pDialog, this, false));
- RememberWidget("__DIALOG__", pRet.get());
+ RememberWidget(u"__DIALOG__"_ustr, pRet.get());
initializeSender(GetNotifierWindow(), GetContentWindow(), GetTypeOfJSON());
m_bSentInitialUpdate = true;
@@ -866,7 +866,7 @@ std::unique_ptr<weld::Assistant> JSInstanceBuilder::weld_assistant(const OUStrin
pRet.reset(new JSAssistant(this, pDialog, this, false));
- RememberWidget("__DIALOG__", pRet.get());
+ RememberWidget(u"__DIALOG__"_ustr, pRet.get());
initializeSender(GetNotifierWindow(), GetContentWindow(), GetTypeOfJSON());
m_bSentInitialUpdate = true;
@@ -899,7 +899,7 @@ std::unique_ptr<weld::MessageDialog> JSInstanceBuilder::weld_message_dialog(cons
pRet.reset(pMessageDialog ? new JSMessageDialog(this, pMessageDialog, this, false) : nullptr);
if (pRet)
- RememberWidget("__DIALOG__", pRet.get());
+ RememberWidget(u"__DIALOG__"_ustr, pRet.get());
return pRet;
}
@@ -1223,7 +1223,7 @@ std::unique_ptr<weld::Popover> JSInstanceBuilder::weld_popover(const OUString& i
}
if (pWeldWidget)
- RememberWidget("__POPOVER__", pWeldWidget.get());
+ RememberWidget(u"__POPOVER__"_ustr, pWeldWidget.get());
return pWeldWidget;
}
@@ -1800,7 +1800,7 @@ JSMessageDialog::JSMessageDialog(::MessageDialog* pDialog, SalInstanceBuilder* p
bool bTakeOwnership)
: JSWidget<SalInstanceMessageDialog, ::MessageDialog>(nullptr, pDialog, pBuilder,
bTakeOwnership)
- , m_pOwnedSender(new JSDialogSender(pDialog, pDialog, "dialog"))
+ , m_pOwnedSender(new JSDialogSender(pDialog, pDialog, u"dialog"_ustr))
{
m_pSender = m_pOwnedSender.get();
@@ -2318,7 +2318,7 @@ void JSPopover::popup_at_rect(weld::Widget* pParent, const tools::Rectangle& rRe
weld::Placement ePlace)
{
SalInstancePopover::popup_at_rect(pParent, rRect, ePlace);
- sendPopup(getWidget()->GetChild(0), "_POPOVER_", "_POPOVER_");
+ sendPopup(getWidget()->GetChild(0), u"_POPOVER_"_ustr, u"_POPOVER_"_ustr);
}
void JSPopover::popdown()
diff --git a/vcl/qa/api/XGraphicTest.cxx b/vcl/qa/api/XGraphicTest.cxx
index df05c05f9f4c..0e567902d561 100644
--- a/vcl/qa/api/XGraphicTest.cxx
+++ b/vcl/qa/api/XGraphicTest.cxx
@@ -74,44 +74,44 @@ void XGraphicTest::testGraphicDescriptor()
//[property] byte GraphicType;
sal_Int8 nType;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("GraphicType") >>= nType);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"GraphicType"_ustr) >>= nType);
CPPUNIT_ASSERT_EQUAL(graphic::GraphicType::PIXEL, nType);
//[property] string MimeType;
OUString sMimeType;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("MimeType") >>= sMimeType);
- CPPUNIT_ASSERT_EQUAL(OUString("image/x-vclgraphic"), sMimeType);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"MimeType"_ustr) >>= sMimeType);
+ CPPUNIT_ASSERT_EQUAL(u"image/x-vclgraphic"_ustr, sMimeType);
//[optional, property] ::com::sun::star::awt::Size SizePixel;
awt::Size aSizePixel;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("SizePixel") >>= aSizePixel);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"SizePixel"_ustr) >>= aSizePixel);
CPPUNIT_ASSERT_EQUAL(sal_Int32(100), aSizePixel.Width);
CPPUNIT_ASSERT_EQUAL(sal_Int32(50), aSizePixel.Height);
//[optional, property] ::com::sun::star::awt::Size Size100thMM;
awt::Size aSize100thMM;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("Size100thMM") >>= aSize100thMM);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"Size100thMM"_ustr) >>= aSize100thMM);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aSize100thMM.Width);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aSize100thMM.Height);
//[optional, property] byte BitsPerPixel;
sal_Int8 nBitsPerPixel;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("BitsPerPixel") >>= nBitsPerPixel);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"BitsPerPixel"_ustr) >>= nBitsPerPixel);
CPPUNIT_ASSERT_EQUAL(sal_Int8(24), nBitsPerPixel);
//[optional, property] boolean Transparent;
bool bTransparent;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("Transparent") >>= bTransparent);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"Transparent"_ustr) >>= bTransparent);
CPPUNIT_ASSERT_EQUAL(false, bTransparent);
//[optional, property] boolean Alpha;
bool bAlpha;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("Alpha") >>= bAlpha);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"Alpha"_ustr) >>= bAlpha);
CPPUNIT_ASSERT_EQUAL(false, bAlpha);
//[optional, property] boolean Animated;
bool bAnimated;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("Animated") >>= bAnimated);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"Animated"_ustr) >>= bAnimated);
CPPUNIT_ASSERT_EQUAL(false, bAnimated);
}
@@ -139,20 +139,20 @@ void XGraphicTest::testGraphicProvider()
uno::Reference<beans::XPropertySet> xGraphicDescriptor(xGraphic, uno::UNO_QUERY_THROW);
sal_Int8 nType;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("GraphicType") >>= nType);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"GraphicType"_ustr) >>= nType);
CPPUNIT_ASSERT_EQUAL(graphic::GraphicType::PIXEL, nType);
awt::Size aSizePixel;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("SizePixel") >>= aSizePixel);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"SizePixel"_ustr) >>= aSizePixel);
CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aSizePixel.Width);
CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aSizePixel.Height);
bool bLinked;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("Linked") >>= bLinked);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"Linked"_ustr) >>= bLinked);
CPPUNIT_ASSERT_EQUAL(false, bLinked);
OUString sOriginURL;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("OriginURL") >>= sOriginURL);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"OriginURL"_ustr) >>= sOriginURL);
CPPUNIT_ASSERT_EQUAL(OUString(), sOriginURL);
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
@@ -178,20 +178,20 @@ void XGraphicTest::testGraphicProvider()
uno::Reference<beans::XPropertySet> xGraphicDescriptor(xGraphic, uno::UNO_QUERY_THROW);
sal_Int8 nType;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("GraphicType") >>= nType);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"GraphicType"_ustr) >>= nType);
CPPUNIT_ASSERT_EQUAL(graphic::GraphicType::PIXEL, nType);
awt::Size aSizePixel;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("SizePixel") >>= aSizePixel);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"SizePixel"_ustr) >>= aSizePixel);
CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aSizePixel.Width);
CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aSizePixel.Height);
bool bLinked;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("Linked") >>= bLinked);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"Linked"_ustr) >>= bLinked);
CPPUNIT_ASSERT_EQUAL(true, bLinked);
OUString sOriginURL;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("OriginURL") >>= sOriginURL);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"OriginURL"_ustr) >>= sOriginURL);
CPPUNIT_ASSERT_EQUAL(aGraphicURL, sOriginURL);
}
@@ -216,20 +216,20 @@ void XGraphicTest::testGraphicProvider()
uno::Reference<beans::XPropertySet> xGraphicDescriptor(xGraphic, uno::UNO_QUERY_THROW);
sal_Int8 nType;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("GraphicType") >>= nType);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"GraphicType"_ustr) >>= nType);
CPPUNIT_ASSERT_EQUAL(graphic::GraphicType::PIXEL, nType);
awt::Size aSizePixel;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("SizePixel") >>= aSizePixel);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"SizePixel"_ustr) >>= aSizePixel);
CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aSizePixel.Width);
CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aSizePixel.Height);
bool bLinked;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("Linked") >>= bLinked);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"Linked"_ustr) >>= bLinked);
CPPUNIT_ASSERT_EQUAL(true, bLinked);
OUString sOriginURL;
- CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue("OriginURL") >>= sOriginURL);
+ CPPUNIT_ASSERT(xGraphicDescriptor->getPropertyValue(u"OriginURL"_ustr) >>= sOriginURL);
CPPUNIT_ASSERT_EQUAL(aGraphicURL, sOriginURL);
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
diff --git a/vcl/qa/cppunit/BackendTest.cxx b/vcl/qa/cppunit/BackendTest.cxx
index a5b1a158ecc4..c785d056a22d 100644
--- a/vcl/qa/cppunit/BackendTest.cxx
+++ b/vcl/qa/cppunit/BackendTest.cxx
@@ -113,7 +113,7 @@ public:
vcl::test::OutputDeviceTestRect aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
- exportImage("01-01_rectangle_test-rectangle.png", aBitmap);
+ exportImage(u"01-01_rectangle_test-rectangle.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
@@ -126,7 +126,7 @@ public:
vcl::test::OutputDeviceTestPixel aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
- exportImage("01-02_rectangle_test-pixel.png", aBitmap);
+ exportImage(u"01-02_rectangle_test-pixel.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
@@ -139,7 +139,7 @@ public:
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
- exportImage("01-03_rectangle_test-line.png", aBitmap);
+ exportImage(u"01-03_rectangle_test-line.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
@@ -152,7 +152,7 @@ public:
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
- exportImage("01-04_rectangle_test-polygon.png", aBitmap);
+ exportImage(u"01-04_rectangle_test-polygon.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -164,7 +164,7 @@ public:
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
- exportImage("01-05_rectangle_test-polyline.png", aBitmap);
+ exportImage(u"01-05_rectangle_test-polyline.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -176,7 +176,7 @@ public:
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
- exportImage("01-06_rectangle_test-polyline_b2d.png", aBitmap);
+ exportImage(u"01-06_rectangle_test-polyline_b2d.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -188,7 +188,7 @@ public:
vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
- exportImage("01-07_rectangle_test-polypolygon.png", aBitmap);
+ exportImage(u"01-07_rectangle_test-polypolygon.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -200,7 +200,7 @@ public:
vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangles(aBitmap);
- exportImage("01-08_rectangle_test-polypolygon_b2d.png", aBitmap);
+ exportImage(u"01-08_rectangle_test-polypolygon_b2d.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -212,7 +212,7 @@ public:
vcl::test::OutputDeviceTestRect aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
- exportImage("02-01_rectangle_AA_test-rectangle.png", aBitmap);
+ exportImage(u"02-01_rectangle_AA_test-rectangle.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -224,7 +224,7 @@ public:
vcl::test::OutputDeviceTestPixel aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
- exportImage("02-02_rectangle_AA_test-pixel.png", aBitmap);
+ exportImage(u"02-02_rectangle_AA_test-pixel.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -236,7 +236,7 @@ public:
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
- exportImage("02-03_rectangle_AA_test-line.png", aBitmap);
+ exportImage(u"02-03_rectangle_AA_test-line.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -248,7 +248,7 @@ public:
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
- exportImage("02-04_rectangle_AA_test-polygon.png", aBitmap);
+ exportImage(u"02-04_rectangle_AA_test-polygon.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -260,7 +260,7 @@ public:
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
- exportImage("02-05_rectangle_AA_test-polyline.png", aBitmap);
+ exportImage(u"02-05_rectangle_AA_test-polyline.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -272,7 +272,7 @@ public:
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
- exportImage("02-06_rectangle_AA_test-polyline_b2d.png", aBitmap);
+ exportImage(u"02-06_rectangle_AA_test-polyline_b2d.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -284,7 +284,7 @@ public:
vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
- exportImage("02-07_rectangle_AA_test-polypolygon.png", aBitmap);
+ exportImage(u"02-07_rectangle_AA_test-polypolygon.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -296,7 +296,7 @@ public:
vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
- exportImage("02-08_rectangle_AA_test-polypolygon_b2d.png", aBitmap);
+ exportImage(u"02-08_rectangle_AA_test-polypolygon_b2d.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -308,12 +308,12 @@ public:
vcl::test::OutputDeviceTestRect aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupFilledRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap, false);
- exportImage("03-01_filled_rectangle_test-rectangle_noline.png", aBitmap);
+ exportImage(u"03-01_filled_rectangle_test-rectangle_noline.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
aBitmap = aOutDevTest.setupFilledRectangle(true);
eResult = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap, true);
- exportImage("03-01_filled_rectangle_test-rectangle_line.png", aBitmap);
+ exportImage(u"03-01_filled_rectangle_test-rectangle_line.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -325,12 +325,12 @@ public:
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupFilledRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap, false);
- exportImage("03-02_filled_rectangle_test-polygon_noline.png", aBitmap);
+ exportImage(u"03-02_filled_rectangle_test-polygon_noline.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
aBitmap = aOutDevTest.setupFilledRectangle(true);
eResult = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap, true);
- exportImage("03-02_filled_rectangle_test-polygon_line.png", aBitmap);
+ exportImage(u"03-02_filled_rectangle_test-polygon_line.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -342,12 +342,12 @@ public:
vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupFilledRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap, false);
- exportImage("03-03_filled_rectangle_test-polypolygon_noline.png", aBitmap);
+ exportImage(u"03-03_filled_rectangle_test-polypolygon_noline.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
aBitmap = aOutDevTest.setupFilledRectangle(true);
eResult = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap, true);
- exportImage("03-03_filled_rectangle_test-polypolygon_line.png", aBitmap);
+ exportImage(u"03-03_filled_rectangle_test-polypolygon_line.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -359,12 +359,12 @@ public:
vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupFilledRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap, false);
- exportImage("03-04_filled_rectangle_test-polypolygon_b2d_noline.png", aBitmap);
+ exportImage(u"03-04_filled_rectangle_test-polypolygon_b2d_noline.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
aBitmap = aOutDevTest.setupFilledRectangle(true);
eResult = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap, true);
- exportImage("03-04_filled_rectangle_test-polypolygon_b2d_line.png", aBitmap);
+ exportImage(u"03-04_filled_rectangle_test-polypolygon_b2d_line.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -374,7 +374,7 @@ public:
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDiamond();
auto eResult = vcl::test::OutputDeviceTestCommon::checkDiamond(aBitmap);
- exportImage("04-01_diamond_test-polygon.png", aBitmap);
+ exportImage(u"04-01_diamond_test-polygon.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -384,7 +384,7 @@ public:
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDiamond();
auto eResult = vcl::test::OutputDeviceTestCommon::checkDiamond(aBitmap);
- exportImage("04-02_diamond_test-line.png", aBitmap);
+ exportImage(u"04-02_diamond_test-line.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -394,7 +394,7 @@ public:
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDiamond();
auto eResult = vcl::test::OutputDeviceTestCommon::checkDiamond(aBitmap);
- exportImage("04-03_diamond_test-polyline.png", aBitmap);
+ exportImage(u"04-03_diamond_test-polyline.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -404,7 +404,7 @@ public:
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDiamond();
auto eResult = vcl::test::OutputDeviceTestCommon::checkDiamond(aBitmap);
- exportImage("04-04_diamond_test-polyline_b2d.png", aBitmap);
+ exportImage(u"04-04_diamond_test-polyline_b2d.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -414,7 +414,7 @@ public:
vcl::test::OutputDeviceTestRect aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupInvert_NONE();
auto eResult = vcl::test::OutputDeviceTestCommon::checkInvertRectangle(aBitmap);
- exportImage("05-01_invert_test-rectangle.png", aBitmap);
+ exportImage(u"05-01_invert_test-rectangle.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -424,7 +424,7 @@ public:
vcl::test::OutputDeviceTestRect aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupInvert_N50();
auto eResult = vcl::test::OutputDeviceTestCommon::checkInvertN50Rectangle(aBitmap);
- exportImage("05-02_invert_N50_test-rectangle.png", aBitmap);
+ exportImage(u"05-02_invert_N50_test-rectangle.png"_ustr, aBitmap);
if (SHOULD_ASSERT && aOutDevTest.getRenderBackendName() != "svp")
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -434,7 +434,7 @@ public:
vcl::test::OutputDeviceTestRect aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupInvert_TrackFrame();
auto eResult = vcl::test::OutputDeviceTestCommon::checkInvertTrackFrameRectangle(aBitmap);
- exportImage("05-03_invert_TrackFrame_test-rectangle.png", aBitmap);
+ exportImage(u"05-03_invert_TrackFrame_test-rectangle.png"_ustr, aBitmap);
if (SHOULD_ASSERT && aOutDevTest.getRenderBackendName() != "svp")
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -446,7 +446,7 @@ public:
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupBezier();
auto eResult = vcl::test::OutputDeviceTestCommon::checkBezier(aBitmap);
- exportImage("06-01_bezier_test-polyline_b2d.png", aBitmap);
+ exportImage(u"06-01_bezier_test-polyline_b2d.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -458,7 +458,7 @@ public:
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupAABezier();
auto eResult = vcl::test::OutputDeviceTestCommon::checkBezier(aBitmap);
- exportImage("07-01_bezier_AA_test-polyline_b2d.png", aBitmap);
+ exportImage(u"07-01_bezier_AA_test-polyline_b2d.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -469,7 +469,7 @@ public:
return;
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawBitmap(vcl::PixelFormat::N24_BPP);
- exportImage("08-01_bitmap_test_24bpp.png", aBitmap);
+ exportImage(u"08-01_bitmap_test_24bpp.png"_ustr, aBitmap);
auto eResult = vcl::test::OutputDeviceTestBitmap::checkTransformedBitmap(aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
@@ -482,7 +482,7 @@ public:
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawTransformedBitmap(vcl::PixelFormat::N24_BPP);
auto eResult = vcl::test::OutputDeviceTestBitmap::checkTransformedBitmap(aBitmap);
- exportImage("08-02_transformed_bitmap_test_24bpp.png", aBitmap);
+ exportImage(u"08-02_transformed_bitmap_test_24bpp.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -494,7 +494,7 @@ public:
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupComplexDrawTransformedBitmap(vcl::PixelFormat::N24_BPP);
auto eResult = vcl::test::OutputDeviceTestBitmap::checkComplexTransformedBitmap(aBitmap);
- exportImage("08-03_transformed_bitmap_test_24bpp.png", aBitmap);
+ exportImage(u"08-03_transformed_bitmap_test_24bpp.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -506,7 +506,7 @@ public:
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawBitmapExWithAlpha(vcl::PixelFormat::N24_BPP);
auto eResult = vcl::test::OutputDeviceTestBitmap::checkBitmapExWithAlpha(aBitmap);
- exportImage("08-04_bitmapex_with_alpha_test_24bpp.png", aBitmap);
+ exportImage(u"08-04_bitmapex_with_alpha_test_24bpp.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -518,7 +518,7 @@ public:
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawMask(vcl::PixelFormat::N24_BPP);
auto eResult = vcl::test::OutputDeviceTestBitmap::checkMask(aBitmap);
- exportImage("08-05_mask_test_24bpp.png", aBitmap);
+ exportImage(u"08-05_mask_test_24bpp.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -530,7 +530,7 @@ public:
vcl::test::OutputDeviceTestBitmap aOutDevTest;
BitmapEx aBitmapEx = aOutDevTest.setupDrawBlend(vcl::PixelFormat::N24_BPP);
auto eResult = vcl::test::OutputDeviceTestBitmap::checkBlend(aBitmapEx);
- exportImage("08-06_blend_test_24bpp.png", aBitmapEx);
+ exportImage(u"08-06_blend_test_24bpp.png"_ustr, aBitmapEx);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -541,7 +541,7 @@ public:
return;
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawBitmap(vcl::PixelFormat::N32_BPP);
- exportImage("09-01_bitmap_test_32bpp.png", aBitmap);
+ exportImage(u"09-01_bitmap_test_32bpp.png"_ustr, aBitmap);
auto eResult = vcl::test::OutputDeviceTestBitmap::checkTransformedBitmap(aBitmap);
if (SHOULD_ASSERT && is32bppSupported())
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
@@ -554,7 +554,7 @@ public:
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawTransformedBitmap(vcl::PixelFormat::N32_BPP);
auto eResult = vcl::test::OutputDeviceTestBitmap::checkTransformedBitmap(aBitmap);
- exportImage("09-02_transformed_bitmap_test_32bpp.png", aBitmap);
+ exportImage(u"09-02_transformed_bitmap_test_32bpp.png"_ustr, aBitmap);
if (SHOULD_ASSERT && is32bppSupported())
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -566,7 +566,7 @@ public:
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawBitmapExWithAlpha(vcl::PixelFormat::N32_BPP);
auto eResult = vcl::test::OutputDeviceTestBitmap::checkBitmapExWithAlpha(aBitmap);
- exportImage("09-03_bitmapex_with_alpha_test_32bpp.png", aBitmap);
+ exportImage(u"09-03_bitmapex_with_alpha_test_32bpp.png"_ustr, aBitmap);
if (SHOULD_ASSERT && is32bppSupported())
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -578,7 +578,7 @@ public:
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawMask(vcl::PixelFormat::N32_BPP);
auto eResult = vcl::test::OutputDeviceTestBitmap::checkMask(aBitmap);
- exportImage("09-04_mask_test_32bpp.png", aBitmap);
+ exportImage(u"09-04_mask_test_32bpp.png"_ustr, aBitmap);
if (SHOULD_ASSERT && is32bppSupported())
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -590,7 +590,7 @@ public:
vcl::test::OutputDeviceTestBitmap aOutDevTest;
BitmapEx aBitmapEx = aOutDevTest.setupDrawBlend(vcl::PixelFormat::N32_BPP);
auto eResult = vcl::test::OutputDeviceTestBitmap::checkBlend(aBitmapEx);
- exportImage("09-05_blend_test_32bpp.png", aBitmapEx);
+ exportImage(u"09-05_blend_test_32bpp.png"_ustr, aBitmapEx);
if (SHOULD_ASSERT && is32bppSupported())
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -601,7 +601,7 @@ public:
return;
vcl::test::OutputDeviceTestBitmap aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawBitmap(vcl::PixelFormat::N8_BPP, true);
- exportImage("010-01_bitmap_test_8bpp_greyscale.png", aBitmap);
+ exportImage(u"010-01_bitmap_test_8bpp_greyscale.png"_ustr, aBitmap);
auto eResult
= vcl::test::OutputDeviceTestBitmap::checkTransformedBitmap8bppGreyScale(aBitmap);
if (SHOULD_ASSERT)
@@ -616,7 +616,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupDrawTransformedBitmap(vcl::PixelFormat::N8_BPP, true);
auto eResult
= vcl::test::OutputDeviceTestBitmap::checkTransformedBitmap8bppGreyScale(aBitmap);
- exportImage("010-02_transformed_bitmap_test_8bpp_greyscale.png", aBitmap);
+ exportImage(u"010-02_transformed_bitmap_test_8bpp_greyscale.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -628,7 +628,7 @@ public:
vcl::test::OutputDeviceTestAnotherOutDev aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupXOR();
auto eResult = vcl::test::OutputDeviceTestAnotherOutDev::checkXOR(aBitmap);
- exportImage("08-06_xor_test.png", aBitmap);
+ exportImage(u"08-06_xor_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -682,7 +682,7 @@ public:
vcl::test::OutputDeviceTestClip aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupClipRectangle();
auto eResult = vcl::test::OutputDeviceTestClip::checkClip(aBitmap);
- exportImage("09-01_clip_rectangle_test.png", aBitmap);
+ exportImage(u"09-01_clip_rectangle_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -694,7 +694,7 @@ public:
vcl::test::OutputDeviceTestClip aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupClipPolygon();
auto eResult = vcl::test::OutputDeviceTestClip::checkClip(aBitmap);
- exportImage("09-02_clip_polygon_test.png", aBitmap);
+ exportImage(u"09-02_clip_polygon_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -706,7 +706,7 @@ public:
vcl::test::OutputDeviceTestClip aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupClipPolyPolygon();
auto eResult = vcl::test::OutputDeviceTestClip::checkClip(aBitmap);
- exportImage("09-03_clip_polypolygon_test.png", aBitmap);
+ exportImage(u"09-03_clip_polypolygon_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -718,7 +718,7 @@ public:
vcl::test::OutputDeviceTestClip aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupClipB2DPolyPolygon();
auto eResult = vcl::test::OutputDeviceTestClip::checkClip(aBitmap);
- exportImage("09-04_clip_b2dpolypolygon_test.png", aBitmap);
+ exportImage(u"09-04_clip_b2dpolypolygon_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -730,7 +730,7 @@ public:
vcl::test::OutputDeviceTestAnotherOutDev aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawOutDev();
auto eResult = vcl::test::OutputDeviceTestAnotherOutDev::checkDrawOutDev(aBitmap);
- exportImage("10-01_draw_out_dev_test.png", aBitmap);
+ exportImage(u"10-01_draw_out_dev_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -743,7 +743,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupDrawOutDevScaledClipped();
auto eResult
= vcl::test::OutputDeviceTestAnotherOutDev::checkDrawOutDevScaledClipped(aBitmap);
- exportImage("10-02_draw_out_dev_scaled_clipped_test.png", aBitmap);
+ exportImage(u"10-02_draw_out_dev_scaled_clipped_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -755,7 +755,7 @@ public:
vcl::test::OutputDeviceTestAnotherOutDev aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDrawOutDevSelf();
auto eResult = vcl::test::OutputDeviceTestAnotherOutDev::checkDrawOutDevSelf(aBitmap);
- exportImage("10-03_draw_out_dev_self_test.png", aBitmap);
+ exportImage(u"10-03_draw_out_dev_self_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -767,7 +767,7 @@ public:
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDashedLine();
auto eResult = vcl::test::OutputDeviceTestLine::checkDashedLine(aBitmap);
- exportImage("11-01_dashed_line_test.png", aBitmap);
+ exportImage(u"11-01_dashed_line_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -784,21 +784,21 @@ public:
// Erase with white, check it's white.
device->SetBackground(Wallpaper(COL_WHITE));
device->Erase();
- exportDevice("12-01_erase.png", device);
+ exportDevice(u"12-01_erase.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(0, 0)));
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(9, 9)));
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(5, 5)));
// Erase with black, check it's black.
device->SetBackground(Wallpaper(COL_BLACK));
device->Erase();
- exportDevice("12-02_erase.png", device);
+ exportDevice(u"12-02_erase.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_BLACK, device->GetPixel(Point(0, 0)));
CPPUNIT_ASSERT_EQUAL(COL_BLACK, device->GetPixel(Point(9, 9)));
CPPUNIT_ASSERT_EQUAL(COL_BLACK, device->GetPixel(Point(5, 5)));
// Erase with cyan, check it's cyan.
device->SetBackground(Wallpaper(COL_CYAN));
device->Erase();
- exportDevice("12-03_erase.png", device);
+ exportDevice(u"12-03_erase.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_CYAN, device->GetPixel(Point(0, 0)));
CPPUNIT_ASSERT_EQUAL(COL_CYAN, device->GetPixel(Point(9, 9)));
CPPUNIT_ASSERT_EQUAL(COL_CYAN, device->GetPixel(Point(5, 5)));
@@ -811,28 +811,28 @@ public:
// Erase with white, check it's white.
device->SetBackground(Wallpaper(COL_WHITE));
device->Erase();
- exportDevice("12-04_erase.png", device);
+ exportDevice(u"12-04_erase.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(0, 0)));
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(9, 9)));
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(5, 5)));
// Erase with black, check it's black.
device->SetBackground(Wallpaper(COL_BLACK));
device->Erase();
- exportDevice("12-05_erase.png", device);
+ exportDevice(u"12-05_erase.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_BLACK, device->GetPixel(Point(0, 0)));
CPPUNIT_ASSERT_EQUAL(COL_BLACK, device->GetPixel(Point(9, 9)));
CPPUNIT_ASSERT_EQUAL(COL_BLACK, device->GetPixel(Point(5, 5)));
// Erase with cyan, check it's cyan.
device->SetBackground(Wallpaper(COL_CYAN));
device->Erase();
- exportDevice("12-06_erase.png", device);
+ exportDevice(u"12-06_erase.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_CYAN, device->GetPixel(Point(0, 0)));
CPPUNIT_ASSERT_EQUAL(COL_CYAN, device->GetPixel(Point(9, 9)));
CPPUNIT_ASSERT_EQUAL(COL_CYAN, device->GetPixel(Point(5, 5)));
// Erase with transparent, check it's transparent.
device->SetBackground(Wallpaper(COL_TRANSPARENT));
device->Erase();
- exportDevice("12-07_erase.png", device);
+ exportDevice(u"12-07_erase.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(sal_uInt8(0), device->GetPixel(Point(0, 0)).GetAlpha());
CPPUNIT_ASSERT_EQUAL(sal_uInt8(0), device->GetPixel(Point(9, 9)).GetAlpha());
CPPUNIT_ASSERT_EQUAL(sal_uInt8(0), device->GetPixel(Point(5, 5)).GetAlpha());
@@ -846,7 +846,7 @@ public:
vcl::test::OutputDeviceTestGradient aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLinearGradient();
auto eResult = vcl::test::OutputDeviceTestGradient::checkLinearGradient(aBitmap);
- exportImage("13-01_linear_gradient_test.png", aBitmap);
+ exportImage(u"13-01_linear_gradient_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -858,7 +858,7 @@ public:
vcl::test::OutputDeviceTestGradient aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLinearGradientAngled();
auto eResult = vcl::test::OutputDeviceTestGradient::checkLinearGradientAngled(aBitmap);
- exportImage("13-02_linear_gradient_angled_test.png", aBitmap);
+ exportImage(u"13-02_linear_gradient_angled_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -868,7 +868,7 @@ public:
vcl::test::OutputDeviceTestGradient aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLinearGradientBorder();
auto eResult = vcl::test::OutputDeviceTestGradient::checkLinearGradientBorder(aBitmap);
- exportImage("13-03_linear_gradient_border_test.png", aBitmap);
+ exportImage(u"13-03_linear_gradient_border_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -880,7 +880,7 @@ public:
vcl::test::OutputDeviceTestGradient aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLinearGradientIntensity();
auto eResult = vcl::test::OutputDeviceTestGradient::checkLinearGradientIntensity(aBitmap);
- exportImage("13-04_linear_gradient_intensity_test.png", aBitmap);
+ exportImage(u"13-04_linear_gradient_intensity_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -892,7 +892,7 @@ public:
vcl::test::OutputDeviceTestGradient aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLinearGradientSteps();
auto eResult = vcl::test::OutputDeviceTestGradient::checkLinearGradientSteps(aBitmap);
- exportImage("13-05_linear_gradient_steps_test.png", aBitmap);
+ exportImage(u"13-05_linear_gradient_steps_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -904,7 +904,7 @@ public:
vcl::test::OutputDeviceTestGradient aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupAxialGradient();
auto eResult = vcl::test::OutputDeviceTestGradient::checkAxialGradient(aBitmap);
- exportImage("13-06_axial_gradient_test.png", aBitmap);
+ exportImage(u"13-06_axial_gradient_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -916,7 +916,7 @@ public:
vcl::test::OutputDeviceTestGradient aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRadialGradient();
auto eResult = vcl::test::OutputDeviceTestGradient::checkRadialGradient(aBitmap);
- exportImage("13-07_radial_gradient_test.png", aBitmap);
+ exportImage(u"13-07_radial_gradient_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -926,7 +926,7 @@ public:
vcl::test::OutputDeviceTestGradient aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupRadialGradientOfs();
auto eResult = vcl::test::OutputDeviceTestGradient::checkRadialGradientOfs(aBitmap);
- exportImage("13-08_radial_gradient_ofs_test.png", aBitmap);
+ exportImage(u"13-08_radial_gradient_ofs_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -936,7 +936,7 @@ public:
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLineJoinBevel();
auto eResult = vcl::test::OutputDeviceTestLine::checkLineJoinBevel(aBitmap);
- exportImage("14-01_line_join_bevel_test.png", aBitmap);
+ exportImage(u"14-01_line_join_bevel_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -946,7 +946,7 @@ public:
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLineJoinRound();
auto eResult = vcl::test::OutputDeviceTestLine::checkLineJoinRound(aBitmap);
- exportImage("14-02_line_join_round_test.png", aBitmap);
+ exportImage(u"14-02_line_join_round_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -956,7 +956,7 @@ public:
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLineJoinMiter();
auto eResult = vcl::test::OutputDeviceTestLine::checkLineJoinMiter(aBitmap);
- exportImage("14-03_line_join_miter_test.png", aBitmap);
+ exportImage(u"14-03_line_join_miter_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -966,7 +966,7 @@ public:
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLineJoinNone();
auto eResult = vcl::test::OutputDeviceTestLine::checkLineJoinNone(aBitmap);
- exportImage("14-04_line_join_none_test.png", aBitmap);
+ exportImage(u"14-04_line_join_none_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -976,7 +976,7 @@ public:
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLineCapRound();
auto eResult = vcl::test::OutputDeviceTestLine::checkLineCapRound(aBitmap);
- exportImage("14-05_line_cap_round_test.png", aBitmap);
+ exportImage(u"14-05_line_cap_round_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -986,7 +986,7 @@ public:
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLineCapSquare();
auto eResult = vcl::test::OutputDeviceTestLine::checkLineCapSquare(aBitmap);
- exportImage("14-06_line_cap_square_test.png", aBitmap);
+ exportImage(u"14-06_line_cap_square_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -996,7 +996,7 @@ public:
vcl::test::OutputDeviceTestLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupLineCapButt();
auto eResult = vcl::test::OutputDeviceTestLine::checkLineCapButt(aBitmap);
- exportImage("14-07_line_cap_butt_test.png", aBitmap);
+ exportImage(u"14-07_line_cap_butt_test.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1006,7 +1006,7 @@ public:
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDropShape();
auto eResult = vcl::test::OutputDeviceTestCommon::checkDropShape(aBitmap);
- exportImage("15-01_drop_shape_test-polyline.png", aBitmap);
+ exportImage(u"15-01_drop_shape_test-polyline.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1016,7 +1016,7 @@ public:
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupAADropShape();
auto eResult = vcl::test::OutputDeviceTestCommon::checkDropShape(aBitmap, true);
- exportImage("15-02_drop_shape_AA_test-polyline.png", aBitmap);
+ exportImage(u"15-02_drop_shape_AA_test-polyline.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1026,7 +1026,7 @@ public:
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupDropShape();
auto eResult = vcl::test::OutputDeviceTestCommon::checkDropShape(aBitmap);
- exportImage("16-01_drop_shape_test-polygon.png", aBitmap);
+ exportImage(u"16-01_drop_shape_test-polygon.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1036,7 +1036,7 @@ public:
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupAADropShape();
auto eResult = vcl::test::OutputDeviceTestCommon::checkDropShape(aBitmap, true);
- exportImage("16-02_drop_shape_AA_test-polygon.png", aBitmap);
+ exportImage(u"16-02_drop_shape_AA_test-polygon.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1046,7 +1046,7 @@ public:
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupHalfEllipse();
auto eResult = vcl::test::OutputDeviceTestCommon::checkHalfEllipse(aBitmap);
- exportImage("17-01_half_ellipse_test-polyline.png", aBitmap);
+ exportImage(u"17-01_half_ellipse_test-polyline.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1056,7 +1056,7 @@ public:
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupHalfEllipse(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkHalfEllipse(aBitmap, true);
- exportImage("17-02_half_ellipse_AA_test-polyline.png", aBitmap);
+ exportImage(u"17-02_half_ellipse_AA_test-polyline.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1066,7 +1066,7 @@ public:
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupHalfEllipse();
auto eResult = vcl::test::OutputDeviceTestCommon::checkHalfEllipse(aBitmap);
- exportImage("17-03_half_ellipse_test-polylineb2d.png", aBitmap);
+ exportImage(u"17-03_half_ellipse_test-polylineb2d.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1076,7 +1076,7 @@ public:
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupHalfEllipse(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkHalfEllipse(aBitmap, true);
- exportImage("17-03_half_ellipse_AA_test-polylineb2d.png", aBitmap);
+ exportImage(u"17-03_half_ellipse_AA_test-polylineb2d.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1086,7 +1086,7 @@ public:
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupHalfEllipse();
auto eResult = vcl::test::OutputDeviceTestCommon::checkHalfEllipse(aBitmap);
- exportImage("17-04_half_ellipse_test-polygon.png", aBitmap);
+ exportImage(u"17-04_half_ellipse_test-polygon.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1096,7 +1096,7 @@ public:
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupHalfEllipse(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkHalfEllipse(aBitmap, true);
- exportImage("17-05_half_ellipse_AA_test-polygon.png", aBitmap);
+ exportImage(u"17-05_half_ellipse_AA_test-polygon.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1106,7 +1106,7 @@ public:
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupClosedBezier();
auto eResult = vcl::test::OutputDeviceTestCommon::checkClosedBezier(aBitmap);
- exportImage("18-01_closed_bezier-polyline.png", aBitmap);
+ exportImage(u"18-01_closed_bezier-polyline.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1116,7 +1116,7 @@ public:
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupClosedBezier();
auto eResult = vcl::test::OutputDeviceTestCommon::checkClosedBezier(aBitmap);
- exportImage("18-02_closed_bezier-polygon.png", aBitmap);
+ exportImage(u"18-02_closed_bezier-polygon.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1127,7 +1127,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupFilledAsymmetricalDropShape();
vcl::test::TestResult eResult
= vcl::test::OutputDeviceTestLine::checkFilledAsymmetricalDropShape(aBitmap);
- exportImage("19-01_filled_drop_shape-polygon.png", aBitmap);
+ exportImage(u"19-01_filled_drop_shape-polygon.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1153,7 +1153,7 @@ public:
// No alpha, this will actually call SalGraphics::DrawBitmap(), but still check
// the alpha of the device is handled correctly.
device->DrawBitmapEx(Point(2, 2), BitmapEx(bitmap));
- exportDevice("blend_extended_01.png", device);
+ exportDevice(u"blend_extended_01.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(2, 2)));
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(6, 6)));
// Check pixels outside of the bitmap aren't affected.
@@ -1164,14 +1164,14 @@ public:
AlphaMask alpha(Size(5, 5));
alpha.Erase(0); // opaque
device->DrawBitmapEx(Point(2, 2), BitmapEx(bitmap, alpha));
- exportDevice("blend_extended_02.png", device);
+ exportDevice(u"blend_extended_02.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(2, 2)));
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(6, 6)));
device->Erase();
alpha.Erase(255); // transparent
device->DrawBitmapEx(Point(2, 2), BitmapEx(bitmap, alpha));
- exportDevice("blend_extended_03.png", device);
+ exportDevice(u"blend_extended_03.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(2, 2)));
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(6, 6)));
@@ -1184,7 +1184,7 @@ public:
alphaWrite->SetPixelIndex(0, 0, 255); // opaque
alphaWrite.reset();
device->DrawBitmapEx(Point(2, 2), BitmapEx(bitmap, alpha));
- exportDevice("blend_extended_04.png", device);
+ exportDevice(u"blend_extended_04.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(2, 2)));
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(6, 6)));
}
@@ -1222,7 +1222,7 @@ public:
// Normal device.
device->DrawBitmapEx(Point(5, 5), Size(-4, -4), BitmapEx(bitmap));
device->DrawBitmapEx(Point(15, 15), Size(4, 4), BitmapEx(bitmap));
- exportDevice("draw_alpha_bitmap_mirrored_01.png", device);
+ exportDevice(u"draw_alpha_bitmap_mirrored_01.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, device->GetPixel(Point(18, 18)));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, device->GetPixel(Point(17, 18)));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, device->GetPixel(Point(2, 2)));
@@ -1230,7 +1230,7 @@ public:
device->Erase();
device->DrawBitmapEx(Point(5, 5), Size(-4, -4), BitmapEx(bitmap, alpha));
device->DrawBitmapEx(Point(15, 15), Size(4, 4), BitmapEx(bitmap, alpha));
- exportDevice("draw_alpha_bitmap_mirrored_02.png", device);
+ exportDevice(u"draw_alpha_bitmap_mirrored_02.png"_ustr, device);
CPPUNIT_ASSERT_EQUAL(COL_RED, device->GetPixel(Point(18, 18)));
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(17, 18)));
CPPUNIT_ASSERT_EQUAL(COL_RED, device->GetPixel(Point(2, 2)));
@@ -1239,7 +1239,7 @@ public:
// Now with alpha device.
alphaDevice->DrawBitmapEx(Point(5, 5), Size(-4, -4), BitmapEx(bitmap));
alphaDevice->DrawBitmapEx(Point(15, 15), Size(4, 4), BitmapEx(bitmap));
- exportDevice("draw_alpha_bitmap_mirrored_03.png", alphaDevice);
+ exportDevice(u"draw_alpha_bitmap_mirrored_03.png"_ustr, alphaDevice);
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, alphaDevice->GetPixel(Point(18, 18)));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, alphaDevice->GetPixel(Point(17, 18)));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, alphaDevice->GetPixel(Point(2, 2)));
@@ -1247,7 +1247,7 @@ public:
alphaDevice->Erase();
alphaDevice->DrawBitmapEx(Point(5, 5), Size(-4, -4), BitmapEx(bitmap, alpha));
alphaDevice->DrawBitmapEx(Point(15, 15), Size(4, 4), BitmapEx(bitmap, alpha));
- exportDevice("draw_alpha_bitmap_mirrored_04.png", alphaDevice);
+ exportDevice(u"draw_alpha_bitmap_mirrored_04.png"_ustr, alphaDevice);
CPPUNIT_ASSERT_EQUAL(COL_RED, alphaDevice->GetPixel(Point(18, 18)));
CPPUNIT_ASSERT_EQUAL(COL_BLUE, alphaDevice->GetPixel(Point(17, 18)));
CPPUNIT_ASSERT_EQUAL(COL_RED, alphaDevice->GetPixel(Point(2, 2)));
@@ -1261,7 +1261,7 @@ public:
vcl::test::OutputDeviceTestText aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupTextBitmap();
auto eResult = vcl::test::OutputDeviceTestCommon::checkTextLocation(aBitmap);
- exportImage("17-01_test_text_Drawing.png", aBitmap);
+ exportImage(u"17-01_test_text_Drawing.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
#endif
@@ -1273,7 +1273,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupIntersectingRectangles();
auto eResult
= vcl::test::OutputDeviceTestCommon::checkEvenOddRuleInIntersectingRecs(aBitmap);
- exportImage("18-01_test_Even-Odd-rule_intersecting_Recs.png", aBitmap);
+ exportImage(u"18-01_test_Even-Odd-rule_intersecting_Recs.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1283,7 +1283,7 @@ public:
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupOpenPolygon();
auto eResult = vcl::test::OutputDeviceTestCommon::checkOpenPolygon(aBitmap);
- exportImage("19-01_open_polygon-polyline.png", aBitmap);
+ exportImage(u"19-01_open_polygon-polyline.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1293,7 +1293,7 @@ public:
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupOpenPolygon();
auto eResult = vcl::test::OutputDeviceTestCommon::checkOpenPolygon(aBitmap);
- exportImage("19-02_open_polygon-polyline_b2d.png", aBitmap);
+ exportImage(u"19-02_open_polygon-polyline_b2d.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1303,7 +1303,7 @@ public:
vcl::test::OutputDeviceTestPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupOpenPolygon();
auto eResult = vcl::test::OutputDeviceTestCommon::checkOpenPolygon(aBitmap);
- exportImage("19-03_open_polygon-polygon.png", aBitmap);
+ exportImage(u"19-03_open_polygon-polygon.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1313,7 +1313,7 @@ public:
vcl::test::OutputDeviceTestPolyPolygon aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupOpenPolygon();
auto eResult = vcl::test::OutputDeviceTestCommon::checkOpenPolygon(aBitmap);
- exportImage("19-04_open_polygon-polypolygon.png", aBitmap);
+ exportImage(u"19-04_open_polygon-polypolygon.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1323,7 +1323,7 @@ public:
vcl::test::OutputDeviceTestPolyPolygonB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupOpenPolygon();
auto eResult = vcl::test::OutputDeviceTestCommon::checkOpenPolygon(aBitmap);
- exportImage("19-04_open_polygon-polypolygon_b2d.png", aBitmap);
+ exportImage(u"19-04_open_polygon-polypolygon_b2d.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1333,7 +1333,7 @@ public:
vcl::test::OutputDeviceTestPolyLine aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupOpenBezier();
auto eResult = vcl::test::OutputDeviceTestCommon::checkOpenBezier(aBitmap);
- exportImage("19-01_open_bezier-polyline.png", aBitmap);
+ exportImage(u"19-01_open_bezier-polyline.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1343,7 +1343,7 @@ public:
vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
Bitmap aBitmap = aOutDevTest.setupOpenBezier();
auto eResult = vcl::test::OutputDeviceTestCommon::checkOpenBezier(aBitmap);
- exportImage("19-01_open_bezier-polyline_b2d.png", aBitmap);
+ exportImage(u"19-01_open_bezier-polyline_b2d.png"_ustr, aBitmap);
if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -1370,7 +1370,7 @@ public:
CPPUNIT_ASSERT(device->DrawPolyLineDirect(matrix,
basegfx::B2DPolygon{ { 50, 50 }, { 50, 100 } },
100, 0, nullptr, basegfx::B2DLineJoin::Miter));
- exportDevice("tdf124848-1.png", device);
+ exportDevice(u"tdf124848-1.png"_ustr, device);
// 100px wide line should fill the entire width of the upper half
CPPUNIT_ASSERT_EQUAL(COL_BLACK, device->GetPixel(Point(2, 2)));
@@ -1379,7 +1379,7 @@ public:
CPPUNIT_ASSERT(device->DrawPolyLineDirect(matrix,
basegfx::B2DPolygon{ { 50, 50 }, { 50, 100 } }, 0,
0, nullptr, basegfx::B2DLineJoin::Miter));
- exportDevice("tdf124848-2.png", device);
+ exportDevice(u"tdf124848-2.png"_ustr, device);
// 1px wide
CPPUNIT_ASSERT_EQUAL(COL_BLACK, device->GetPixel(Point(50, 20)));
CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(49, 20)));
@@ -1404,7 +1404,7 @@ public:
// Draw a blue bitmap to the device. The bug was that there was no alpha, but OutputDevice::DrawTransformBitmapExDirect()
// supplied a fully opaque alpha done with Erase() on the alpha bitmap, and Skia backend didn't handle such alpha correctly.
device->DrawTransformedBitmapEx(matrix, BitmapEx(bitmap));
- exportDevice("tdf136171.png", device);
+ exportDevice(u"tdf136171.png"_ustr, device);
// The whole virtual device content now should be blue.
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(0, 0)));
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(9, 0)));
@@ -1436,7 +1436,7 @@ public:
= VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device2->SetOutputSizePixel(Size(100, 100));
device2->DrawOutDev(Point(0, 0), Size(100, 100), Point(0, 0), Size(100, 100), *device1);
- exportDevice("tdf145811-1.png", device2);
+ exportDevice(u"tdf145811-1.png"_ustr, device2);
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device2->GetPixel(Point(0, 0)));
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, device2->GetPixel(Point(1, 1)));
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, device2->GetPixel(Point(98, 98)));
@@ -1451,7 +1451,7 @@ public:
// Copy device1->device2 offset by 10,10.
graphics2->CopyBits(SalTwoRect(0, 0, 100, 100, 10, 10, 100, 100), *graphics1, *device2,
*device1);
- exportDevice("tdf145811-2.png", device2);
+ exportDevice(u"tdf145811-2.png"_ustr, device2);
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device2->GetPixel(Point(0, 0))); // unmodified
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, device2->GetPixel(Point(9, 9)));
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device2->GetPixel(Point(10, 10)));
@@ -1461,7 +1461,7 @@ public:
device2->DrawOutDev(Point(0, 0), Size(100, 100), Point(0, 0), Size(100, 100), *device1);
// Copy area of device2 offset by 10,10.
graphics2->CopyArea(10, 10, 0, 0, 100, 100, *device1);
- exportDevice("tdf145811-3.png", device2);
+ exportDevice(u"tdf145811-3.png"_ustr, device2);
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device2->GetPixel(Point(0, 0))); // unmodified
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, device2->GetPixel(Point(9, 9)));
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device2->GetPixel(Point(10, 10)));
@@ -1472,7 +1472,7 @@ public:
// Copy device1->device2 offset by -20,-20.
graphics2->CopyBits(SalTwoRect(0, 0, 100, 100, -20, -20, 100, 100), *graphics1, *device2,
*device1);
- exportDevice("tdf145811-4.png", device2);
+ exportDevice(u"tdf145811-4.png"_ustr, device2);
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, device2->GetPixel(Point(0, 0)));
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, device2->GetPixel(Point(78, 78)));
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device2->GetPixel(Point(79, 79)));
@@ -1482,7 +1482,7 @@ public:
device2->DrawOutDev(Point(0, 0), Size(100, 100), Point(0, 0), Size(100, 100), *device1);
// Copy area of device2 offset by -20,-20.
graphics2->CopyArea(-20, -20, 0, 0, 100, 100, *device1);
- exportDevice("tdf145811-5.png", device2);
+ exportDevice(u"tdf145811-5.png"_ustr, device2);
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, device2->GetPixel(Point(0, 0)));
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, device2->GetPixel(Point(78, 78)));
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device2->GetPixel(Point(79, 79)));
@@ -1494,7 +1494,7 @@ public:
// (i.e. outside in all directions).
graphics2->CopyBits(SalTwoRect(-20, -20, 150, 150, -30, -30, 150, 150), *graphics1,
*device2, *device1);
- exportDevice("tdf145811-6.png", device2);
+ exportDevice(u"tdf145811-6.png"_ustr, device2);
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, device2->GetPixel(Point(0, 0)));
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, device2->GetPixel(Point(88, 88)));
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device2->GetPixel(Point(89, 89)));
@@ -1504,7 +1504,7 @@ public:
// Copy area of device2 offset by -10,-10 starting from -20,-20 at 150x150 size
// (i.e. outside in all directions).
graphics2->CopyArea(-30, -30, -20, -20, 150, 150, *device1);
- exportDevice("tdf145811-7.png", device2);
+ exportDevice(u"tdf145811-7.png"_ustr, device2);
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, device2->GetPixel(Point(0, 0)));
CPPUNIT_ASSERT_EQUAL(COL_YELLOW, device2->GetPixel(Point(88, 88)));
CPPUNIT_ASSERT_EQUAL(COL_BLUE, device2->GetPixel(Point(89, 89)));
diff --git a/vcl/qa/cppunit/BitmapFilterTest.cxx b/vcl/qa/cppunit/BitmapFilterTest.cxx
index d59cd331d467..e492b963f48d 100644
--- a/vcl/qa/cppunit/BitmapFilterTest.cxx
+++ b/vcl/qa/cppunit/BitmapFilterTest.cxx
@@ -124,7 +124,7 @@ void BitmapFilterTest::testBlurCorrectness()
if (constWriteResultBitmap)
{
- savePNG("~/blurBefore.png", aBitmap24Bit);
+ savePNG(u"~/blurBefore.png"_ustr, aBitmap24Bit);
}
// Perform blur
@@ -135,7 +135,7 @@ void BitmapFilterTest::testBlurCorrectness()
if (constWriteResultBitmap)
{
- savePNG("~/blurAfter.png", aBitmap24Bit);
+ savePNG(u"~/blurAfter.png"_ustr, aBitmap24Bit);
}
// Check blurred bitmap parameters
@@ -166,21 +166,21 @@ void BitmapFilterTest::testBasicMorphology()
BitmapEx aTransformBitmap = aOrigBitmap;
BitmapFilter::Filter(aTransformBitmap, BitmapDilateFilter(1));
if (constWriteResultBitmap)
- savePNG("~/Dilated1.png", aTransformBitmap);
+ savePNG(u"~/Dilated1.png"_ustr, aTransformBitmap);
CPPUNIT_ASSERT_EQUAL(aRefBitmapDilated1.GetChecksum(), aTransformBitmap.GetChecksum());
BitmapFilter::Filter(aTransformBitmap, BitmapErodeFilter(1));
if (constWriteResultBitmap)
- savePNG("~/Dilated1Eroded1.png", aTransformBitmap);
+ savePNG(u"~/Dilated1Eroded1.png"_ustr, aTransformBitmap);
CPPUNIT_ASSERT_EQUAL(aRefBitmapDilated1Eroded1.GetChecksum(), aTransformBitmap.GetChecksum());
aTransformBitmap = aOrigBitmap;
BitmapFilter::Filter(aTransformBitmap, BitmapDilateFilter(2));
if (constWriteResultBitmap)
- savePNG("~/Dilated2.png", aTransformBitmap);
+ savePNG(u"~/Dilated2.png"_ustr, aTransformBitmap);
CPPUNIT_ASSERT_EQUAL(aRefBitmapDilated2.GetChecksum(), aTransformBitmap.GetChecksum());
BitmapFilter::Filter(aTransformBitmap, BitmapErodeFilter(1));
if (constWriteResultBitmap)
- savePNG("~/Dilated2Eroded1.png", aTransformBitmap);
+ savePNG(u"~/Dilated2Eroded1.png"_ustr, aTransformBitmap);
CPPUNIT_ASSERT_EQUAL(aRefBitmapDilated2Eroded1.GetChecksum(), aTransformBitmap.GetChecksum());
}
@@ -218,12 +218,12 @@ void BitmapFilterTest::testPerformance()
if (constWriteResultBitmap)
{
- std::unique_ptr<SvFileStream> pStream(
- new SvFileStream("~/BlurBigPerformance.png", StreamMode::WRITE | StreamMode::TRUNC));
+ std::unique_ptr<SvFileStream> pStream(new SvFileStream(
+ u"~/BlurBigPerformance.png"_ustr, StreamMode::WRITE | StreamMode::TRUNC));
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
rFilter.compressAsPNG(BitmapEx(aResult), *pStream);
- pStream.reset(new SvFileStream("~/BlurBigPerformance.txt", StreamMode::WRITE));
+ pStream.reset(new SvFileStream(u"~/BlurBigPerformance.txt"_ustr, StreamMode::WRITE));
pStream->WriteOString("Blur average time: ");
pStream->WriteOString(OString::number(
std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count()));
diff --git a/vcl/qa/cppunit/BitmapScaleTest.cxx b/vcl/qa/cppunit/BitmapScaleTest.cxx
index 9bb6a48e4872..4559b1d3eef3 100644
--- a/vcl/qa/cppunit/BitmapScaleTest.cxx
+++ b/vcl/qa/cppunit/BitmapScaleTest.cxx
@@ -132,14 +132,16 @@ void BitmapScaleTest::testScale()
}
if (bExportBitmap)
{
- SvFileStream aStream("~/scale_before.png", StreamMode::WRITE | StreamMode::TRUNC);
+ SvFileStream aStream(u"~/scale_before.png"_ustr,
+ StreamMode::WRITE | StreamMode::TRUNC);
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
rFilter.compressAsPNG(BitmapEx(bitmap), aStream);
}
CPPUNIT_ASSERT(bitmap.Scale(scaleSize.destSize, scaleMethod));
if (bExportBitmap)
{
- SvFileStream aStream("~/scale_after.png", StreamMode::WRITE | StreamMode::TRUNC);
+ SvFileStream aStream(u"~/scale_after.png"_ustr,
+ StreamMode::WRITE | StreamMode::TRUNC);
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
rFilter.compressAsPNG(BitmapEx(bitmap), aStream);
}
@@ -201,7 +203,7 @@ void BitmapScaleTest::testScale2()
if (bExportBitmap)
{
- SvFileStream aStream("scale_before.png", StreamMode::WRITE | StreamMode::TRUNC);
+ SvFileStream aStream(u"scale_before.png"_ustr, StreamMode::WRITE | StreamMode::TRUNC);
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
rFilter.compressAsPNG(BitmapEx(aBitmap24Bit), aStream);
}
@@ -214,7 +216,7 @@ void BitmapScaleTest::testScale2()
if (bExportBitmap)
{
- SvFileStream aStream("scale_after_65x65.png", StreamMode::WRITE | StreamMode::TRUNC);
+ SvFileStream aStream(u"scale_after_65x65.png"_ustr, StreamMode::WRITE | StreamMode::TRUNC);
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
rFilter.compressAsPNG(BitmapEx(aScaledBitmap), aStream);
}
@@ -231,7 +233,7 @@ void BitmapScaleTest::testScale2()
if (bExportBitmap)
{
- SvFileStream aStream("scale_after_64x64.png", StreamMode::WRITE | StreamMode::TRUNC);
+ SvFileStream aStream(u"scale_after_64x64.png"_ustr, StreamMode::WRITE | StreamMode::TRUNC);
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
rFilter.compressAsPNG(BitmapEx(aScaledBitmap), aStream);
}
@@ -248,7 +250,7 @@ void BitmapScaleTest::testScale2()
if (bExportBitmap)
{
- SvFileStream aStream("scale_after_63x63.png", StreamMode::WRITE | StreamMode::TRUNC);
+ SvFileStream aStream(u"scale_after_63x63.png"_ustr, StreamMode::WRITE | StreamMode::TRUNC);
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
rFilter.compressAsPNG(BitmapEx(aScaledBitmap), aStream);
}
@@ -283,7 +285,7 @@ void BitmapScaleTest::testScaleSymmetry()
if (bExportBitmap)
{
- SvFileStream aStream("~/scale_before.png", StreamMode::WRITE | StreamMode::TRUNC);
+ SvFileStream aStream(u"~/scale_before.png"_ustr, StreamMode::WRITE | StreamMode::TRUNC);
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
rFilter.compressAsPNG(BitmapEx(aBitmap24Bit), aStream);
}
@@ -299,7 +301,7 @@ void BitmapScaleTest::testScaleSymmetry()
if (bExportBitmap)
{
- SvFileStream aStream("~/scale_after.png", StreamMode::WRITE | StreamMode::TRUNC);
+ SvFileStream aStream(u"~/scale_after.png"_ustr, StreamMode::WRITE | StreamMode::TRUNC);
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
rFilter.compressAsPNG(BitmapEx(aBitmap24Bit), aStream);
}
diff --git a/vcl/qa/cppunit/FontFeatureTest.cxx b/vcl/qa/cppunit/FontFeatureTest.cxx
index 9d47ceb17063..1b8dd40213b6 100644
--- a/vcl/qa/cppunit/FontFeatureTest.cxx
+++ b/vcl/qa/cppunit/FontFeatureTest.cxx
@@ -45,7 +45,7 @@ void FontFeatureTest::testGetFontFeaturesGraphite()
DeviceFormat::WITH_ALPHA);
aVDev->SetOutputSizePixel(Size(10, 10));
- OUString aFontName("Linux Libertine G");
+ OUString aFontName(u"Linux Libertine G"_ustr);
CPPUNIT_ASSERT(aVDev->IsFontAvailable(aFontName));
vcl::Font aFont = aVDev->GetFont();
@@ -66,13 +66,13 @@ void FontFeatureTest::testGetFontFeaturesGraphite()
CPPUNIT_ASSERT_EQUAL(size_t(53), rFontFeatures.size());
- CPPUNIT_ASSERT_EQUAL(OUString("c2sc case dlig fina frac hlig liga lnum "
- "locl onum pnum sa01 sa02 sa03 sa04 sa05 "
- "sa06 sa07 sa08 salt sinf smcp ss01 ss02 "
- "ss03 sups tnum zero ingl cpsp lith litt "
- "itlc para algn arti circ dash dbls foot "
- "frsp grkn hang lng minu nfsp name quot "
- "texm thou vari caps ligc "),
+ CPPUNIT_ASSERT_EQUAL(u"c2sc case dlig fina frac hlig liga lnum "
+ "locl onum pnum sa01 sa02 sa03 sa04 sa05 "
+ "sa06 sa07 sa08 salt sinf smcp ss01 ss02 "
+ "ss03 sups tnum zero ingl cpsp lith litt "
+ "itlc para algn arti circ dash dbls foot "
+ "frsp grkn hang lng minu nfsp name quot "
+ "texm thou vari caps ligc "_ustr,
aFeaturesString);
// Check C2SC feature
@@ -129,7 +129,7 @@ void FontFeatureTest::testGetFontFeaturesOpenType()
DeviceFormat::WITH_ALPHA);
aVDev->SetOutputSizePixel(Size(10, 10));
- OUString aFontName("Amiri");
+ OUString aFontName(u"Amiri"_ustr);
CPPUNIT_ASSERT(aVDev->IsFontAvailable(aFontName));
vcl::Font aFont = aVDev->GetFont();
@@ -148,9 +148,9 @@ void FontFeatureTest::testGetFontFeaturesOpenType()
CPPUNIT_ASSERT_EQUAL(size_t(17), rFontFeatures.size());
- CPPUNIT_ASSERT_EQUAL(OUString("calt calt dnom liga numr pnum ss01 ss02 "
- "ss03 ss04 ss05 ss06 ss07 ss08 kern kern "
- "ss05 "),
+ CPPUNIT_ASSERT_EQUAL(u"calt calt dnom liga numr pnum ss01 ss02 "
+ "ss03 ss04 ss05 ss06 ss07 ss08 kern kern "
+ "ss05 "_ustr,
aFeaturesString);
// Check ss01 feature
@@ -160,7 +160,7 @@ void FontFeatureTest::testGetFontFeaturesOpenType()
vcl::font::FeatureDefinition& rFeatureDefinition = rFeature.m_aDefinition;
CPPUNIT_ASSERT_EQUAL(vcl::font::featureCode("ss01"), rFeatureDefinition.getCode());
- CPPUNIT_ASSERT_EQUAL(OUString("Low Baa dot following a Raa or Waw"),
+ CPPUNIT_ASSERT_EQUAL(u"Low Baa dot following a Raa or Waw"_ustr,
rFeatureDefinition.getDescription());
CPPUNIT_ASSERT_EQUAL(vcl::font::FeatureParameterType::BOOL, rFeatureDefinition.getType());
@@ -178,7 +178,7 @@ void FontFeatureTest::testGetFontFeaturesOpenTypeEnum()
DeviceFormat::WITH_ALPHA);
aVDev->SetOutputSizePixel(Size(10, 10));
- OUString aFontName("Reem Kufi");
+ OUString aFontName(u"Reem Kufi"_ustr);
CPPUNIT_ASSERT(aVDev->IsFontAvailable(aFontName));
vcl::Font aFont = aVDev->GetFont();
@@ -197,8 +197,8 @@ void FontFeatureTest::testGetFontFeaturesOpenTypeEnum()
CPPUNIT_ASSERT_EQUAL(size_t(10), rFontFeatures.size());
- CPPUNIT_ASSERT_EQUAL(OUString("aalt case cv01 cv02 cv03 frac ordn sups "
- "zero kern "),
+ CPPUNIT_ASSERT_EQUAL(u"aalt case cv01 cv02 cv03 frac ordn sups "
+ "zero kern "_ustr,
aFeaturesString);
// Check aalt feature
@@ -430,7 +430,7 @@ void FontFeatureTest::testParseFeature()
CPPUNIT_ASSERT_EQUAL(vcl::font::featureCode("abcd"), aFeatures[0].m_nTag);
CPPUNIT_ASSERT_EQUAL(uint32_t(1), aFeatures[0].m_nValue);
- CPPUNIT_ASSERT_EQUAL(OUString("slo"), aParser.getLanguage());
+ CPPUNIT_ASSERT_EQUAL(u"slo"_ustr, aParser.getLanguage());
}
}
diff --git a/vcl/qa/cppunit/GraphicFormatDetectorTest.cxx b/vcl/qa/cppunit/GraphicFormatDetectorTest.cxx
index 13c612e46e05..fb36f40c4791 100644
--- a/vcl/qa/cppunit/GraphicFormatDetectorTest.cxx
+++ b/vcl/qa/cppunit/GraphicFormatDetectorTest.cxx
@@ -86,7 +86,7 @@ class GraphicFormatDetectorTest : public test::BootstrapFixtureBase
void GraphicFormatDetectorTest::testDetectMET()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.met"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "MET");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"MET"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkMET());
@@ -95,13 +95,13 @@ void GraphicFormatDetectorTest::testDetectMET()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("MET"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"MET"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectBMP()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.bmp"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "BMP");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"BMP"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkBMP());
@@ -110,13 +110,13 @@ void GraphicFormatDetectorTest::testDetectBMP()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("BMP"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"BMP"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectWMF()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.wmf"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "WMF");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"WMF"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkWMF());
@@ -125,13 +125,13 @@ void GraphicFormatDetectorTest::testDetectWMF()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("WMF"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"WMF"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectWMZ()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.wmz"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "WMZ");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"WMZ"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkWMF());
@@ -140,13 +140,13 @@ void GraphicFormatDetectorTest::testDetectWMZ()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("WMZ"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"WMZ"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectPCX()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.pcx"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "PCX");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"PCX"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkPCX());
@@ -155,13 +155,13 @@ void GraphicFormatDetectorTest::testDetectPCX()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("PCX"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"PCX"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectJPG()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.jpg"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "JPG");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"JPG"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkJPG());
@@ -170,13 +170,13 @@ void GraphicFormatDetectorTest::testDetectJPG()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("JPG"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"JPG"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectPNG()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.png"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "PNG");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"PNG"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkPNG());
@@ -185,13 +185,13 @@ void GraphicFormatDetectorTest::testDetectPNG()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("PNG"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"PNG"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectAPNG()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.apng"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "APNG");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"APNG"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkAPNG());
@@ -200,13 +200,13 @@ void GraphicFormatDetectorTest::testDetectAPNG()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("APNG"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"APNG"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectGIF()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.gif"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "GIF");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"GIF"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkGIF());
@@ -215,13 +215,13 @@ void GraphicFormatDetectorTest::testDetectGIF()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("GIF"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"GIF"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectPSD()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.psd"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "PSD");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"PSD"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkPSD());
@@ -230,28 +230,28 @@ void GraphicFormatDetectorTest::testDetectPSD()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("PSD"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"PSD"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectTGA()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.tga"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "TGA");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"TGA"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkTGA());
aFileStream.Seek(aDetector.mnStreamPosition);
- OUString rFormatExtension("TGA"); // detection is based on extension only
+ OUString rFormatExtension(u"TGA"_ustr); // detection is based on extension only
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("TGA"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"TGA"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectTIF()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.tif"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "TIF");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"TIF"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkTIF());
@@ -260,13 +260,13 @@ void GraphicFormatDetectorTest::testDetectTIF()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("TIF"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"TIF"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectXBM()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.xbm"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "XBM");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"XBM"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkXBM());
@@ -275,13 +275,13 @@ void GraphicFormatDetectorTest::testDetectXBM()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("XBM"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"XBM"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectXPM()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.xpm"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "XPM");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"XPM"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkXPM());
@@ -290,13 +290,13 @@ void GraphicFormatDetectorTest::testDetectXPM()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("XPM"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"XPM"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectSVG()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.svg"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "SVG");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"SVG"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkSVG());
@@ -305,13 +305,13 @@ void GraphicFormatDetectorTest::testDetectSVG()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("SVG"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"SVG"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectSVGZ()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.svgz"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "SVGZ");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"SVGZ"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkSVG());
@@ -320,13 +320,13 @@ void GraphicFormatDetectorTest::testDetectSVGZ()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("SVGZ"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"SVGZ"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectPDF()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.pdf"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "PDF");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"PDF"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkPDF());
@@ -335,13 +335,13 @@ void GraphicFormatDetectorTest::testDetectPDF()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("PDF"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"PDF"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectEPS()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.eps"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "EPS");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"EPS"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkEPS());
@@ -350,13 +350,13 @@ void GraphicFormatDetectorTest::testDetectEPS()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("EPS"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"EPS"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectWEBP()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.webp"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "WEBP");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"WEBP"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkWEBP());
@@ -365,13 +365,13 @@ void GraphicFormatDetectorTest::testDetectWEBP()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("WEBP"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"WEBP"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectEMF()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.emf"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "EMF");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"EMF"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkEMF());
@@ -380,13 +380,13 @@ void GraphicFormatDetectorTest::testDetectEMF()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("EMF"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"EMF"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testDetectEMZ()
{
SvFileStream aFileStream(getFullUrl(u"TypeDetectionExample.emz"), StreamMode::READ);
- vcl::GraphicFormatDetector aDetector(aFileStream, "EMZ");
+ vcl::GraphicFormatDetector aDetector(aFileStream, u"EMZ"_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkEMF());
@@ -395,7 +395,7 @@ void GraphicFormatDetectorTest::testDetectEMZ()
OUString rFormatExtension;
CPPUNIT_ASSERT(vcl::peekGraphicFormat(aFileStream, rFormatExtension, false));
- CPPUNIT_ASSERT_EQUAL(OUString("EMZ"), rFormatExtension);
+ CPPUNIT_ASSERT_EQUAL(u"EMZ"_ustr, rFormatExtension);
}
void GraphicFormatDetectorTest::testMatchArray()
diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index f3ec0cdcb566..1130a05708e1 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -480,7 +480,7 @@ CPPUNIT_TEST_FIXTURE(GraphicTest, testEmfToWmfConversion)
// - Expected: WMF
// - Actual : EMF
// i.e. EMF data was requested to be converted to WMF, but the output was still EMF.
- CPPUNIT_ASSERT_EQUAL(OUString("WMF"),
+ CPPUNIT_ASSERT_EQUAL(u"WMF"_ustr,
vcl::getImportFormatShortName(aDetector.getMetadata().mnFormat));
// Import the WMF result and check for traces of EMF+ in it.
@@ -638,8 +638,8 @@ CPPUNIT_TEST_FIXTURE(GraphicTest, testSwappingGraphicProperties_PNG_WithGfxLink)
CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
// Origin URL
- aGraphic.setOriginURL("Origin URL");
- CPPUNIT_ASSERT_EQUAL(OUString("Origin URL"), aGraphic.getOriginURL());
+ aGraphic.setOriginURL(u"Origin URL"_ustr);
+ CPPUNIT_ASSERT_EQUAL(u"Origin URL"_ustr, aGraphic.getOriginURL());
//Set PrefMapMode
CPPUNIT_ASSERT_EQUAL(MapUnit::Map100thMM, aGraphic.GetPrefMapMode().GetMapUnit());
@@ -660,7 +660,7 @@ CPPUNIT_TEST_FIXTURE(GraphicTest, testSwappingGraphicProperties_PNG_WithGfxLink)
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
// Check properties
- CPPUNIT_ASSERT_EQUAL(OUString("Origin URL"), aGraphic.getOriginURL());
+ CPPUNIT_ASSERT_EQUAL(u"Origin URL"_ustr, aGraphic.getOriginURL());
CPPUNIT_ASSERT_EQUAL(MapUnit::MapTwip, aGraphic.GetPrefMapMode().GetMapUnit());
CPPUNIT_ASSERT_EQUAL(tools::Long(200), aGraphic.GetPrefSize().Width());
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetPrefSize().Height());
@@ -672,7 +672,7 @@ CPPUNIT_TEST_FIXTURE(GraphicTest, testSwappingGraphicProperties_PNG_WithGfxLink)
CPPUNIT_ASSERT_EQUAL(false, aGraphic.ImplGetImpGraphic()->isSwappedOut());
// Check properties
- CPPUNIT_ASSERT_EQUAL(OUString("Origin URL"), aGraphic.getOriginURL());
+ CPPUNIT_ASSERT_EQUAL(u"Origin URL"_ustr, aGraphic.getOriginURL());
CPPUNIT_ASSERT_EQUAL(MapUnit::MapTwip, aGraphic.GetPrefMapMode().GetMapUnit());
CPPUNIT_ASSERT_EQUAL(tools::Long(200), aGraphic.GetPrefSize().Width());
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetPrefSize().Height());
@@ -688,8 +688,8 @@ CPPUNIT_TEST_FIXTURE(GraphicTest, testSwappingGraphicProperties_PNG_WithoutGfxLi
CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
// Origin URL
- aGraphic.setOriginURL("Origin URL");
- CPPUNIT_ASSERT_EQUAL(OUString("Origin URL"), aGraphic.getOriginURL());
+ aGraphic.setOriginURL(u"Origin URL"_ustr);
+ CPPUNIT_ASSERT_EQUAL(u"Origin URL"_ustr, aGraphic.getOriginURL());
//Set PrefMapMode
CPPUNIT_ASSERT_EQUAL(MapUnit::Map100thMM, aGraphic.GetPrefMapMode().GetMapUnit());
@@ -710,7 +710,7 @@ CPPUNIT_TEST_FIXTURE(GraphicTest, testSwappingGraphicProperties_PNG_WithoutGfxLi
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
// Check properties
- CPPUNIT_ASSERT_EQUAL(OUString("Origin URL"), aGraphic.getOriginURL());
+ CPPUNIT_ASSERT_EQUAL(u"Origin URL"_ustr, aGraphic.getOriginURL());
CPPUNIT_ASSERT_EQUAL(MapUnit::MapTwip, aGraphic.GetPrefMapMode().GetMapUnit());
CPPUNIT_ASSERT_EQUAL(tools::Long(200), aGraphic.GetPrefSize().Width());
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetPrefSize().Height());
@@ -722,7 +722,7 @@ CPPUNIT_TEST_FIXTURE(GraphicTest, testSwappingGraphicProperties_PNG_WithoutGfxLi
CPPUNIT_ASSERT_EQUAL(false, aGraphic.ImplGetImpGraphic()->isSwappedOut());
// Check properties
- CPPUNIT_ASSERT_EQUAL(OUString("Origin URL"), aGraphic.getOriginURL());
+ CPPUNIT_ASSERT_EQUAL(u"Origin URL"_ustr, aGraphic.getOriginURL());
CPPUNIT_ASSERT_EQUAL(MapUnit::MapTwip, aGraphic.GetPrefMapMode().GetMapUnit());
CPPUNIT_ASSERT_EQUAL(tools::Long(200), aGraphic.GetPrefSize().Width());
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetPrefSize().Height());
@@ -890,8 +890,8 @@ CPPUNIT_TEST_FIXTURE(GraphicTest, testSwappingGraphicProperties_SVG_WithGfxLink)
CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
// Origin URL
- aGraphic.setOriginURL("Origin URL");
- CPPUNIT_ASSERT_EQUAL(OUString("Origin URL"), aGraphic.getOriginURL());
+ aGraphic.setOriginURL(u"Origin URL"_ustr);
+ CPPUNIT_ASSERT_EQUAL(u"Origin URL"_ustr, aGraphic.getOriginURL());
// Check size in pixels
CPPUNIT_ASSERT_EQUAL(tools::Long(51), aGraphic.GetSizePixel().Width());
@@ -911,7 +911,7 @@ CPPUNIT_TEST_FIXTURE(GraphicTest, testSwappingGraphicProperties_SVG_WithGfxLink)
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
// Check properties
- CPPUNIT_ASSERT_EQUAL(OUString("Origin URL"), aGraphic.getOriginURL());
+ CPPUNIT_ASSERT_EQUAL(u"Origin URL"_ustr, aGraphic.getOriginURL());
CPPUNIT_ASSERT_EQUAL(tools::Long(200), aGraphic.GetPrefSize().Width());
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetPrefSize().Height());
CPPUNIT_ASSERT_EQUAL(tools::Long(51), aGraphic.GetSizePixel().Width());
@@ -924,7 +924,7 @@ CPPUNIT_TEST_FIXTURE(GraphicTest, testSwappingGraphicProperties_SVG_WithGfxLink)
CPPUNIT_ASSERT_EQUAL(false, aGraphic.ImplGetImpGraphic()->isSwappedOut());
// Check properties
- CPPUNIT_ASSERT_EQUAL(OUString("Origin URL"), aGraphic.getOriginURL());
+ CPPUNIT_ASSERT_EQUAL(u"Origin URL"_ustr, aGraphic.getOriginURL());
CPPUNIT_ASSERT_EQUAL(tools::Long(200), aGraphic.GetPrefSize().Width());
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetPrefSize().Height());
CPPUNIT_ASSERT_EQUAL(tools::Long(51), aGraphic.GetSizePixel().Width());
@@ -957,8 +957,8 @@ CPPUNIT_TEST_FIXTURE(GraphicTest, testSwappingGraphicProperties_SVG_WithoutGfxLi
CPPUNIT_ASSERT_EQUAL(false, aGraphic.ImplGetImpGraphic()->isSwappedOut());
// Origin URL
- aGraphic.setOriginURL("Origin URL");
- CPPUNIT_ASSERT_EQUAL(OUString("Origin URL"), aGraphic.getOriginURL());
+ aGraphic.setOriginURL(u"Origin URL"_ustr);
+ CPPUNIT_ASSERT_EQUAL(u"Origin URL"_ustr, aGraphic.getOriginURL());
// Check size in pixels
CPPUNIT_ASSERT_EQUAL(tools::Long(51), aGraphic.GetSizePixel().Width());
@@ -977,7 +977,7 @@ CPPUNIT_TEST_FIXTURE(GraphicTest, testSwappingGraphicProperties_SVG_WithoutGfxLi
CPPUNIT_ASSERT_EQUAL(true, aGraphic.ImplGetImpGraphic()->isSwappedOut());
CPPUNIT_ASSERT_EQUAL(false, aGraphic.isAvailable());
- CPPUNIT_ASSERT_EQUAL(OUString("Origin URL"), aGraphic.getOriginURL());
+ CPPUNIT_ASSERT_EQUAL(u"Origin URL"_ustr, aGraphic.getOriginURL());
CPPUNIT_ASSERT_EQUAL(tools::Long(200), aGraphic.GetPrefSize().Width());
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetPrefSize().Height());
@@ -990,7 +990,7 @@ CPPUNIT_TEST_FIXTURE(GraphicTest, testSwappingGraphicProperties_SVG_WithoutGfxLi
CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
CPPUNIT_ASSERT_EQUAL(false, aGraphic.ImplGetImpGraphic()->isSwappedOut());
- CPPUNIT_ASSERT_EQUAL(OUString("Origin URL"), aGraphic.getOriginURL());
+ CPPUNIT_ASSERT_EQUAL(u"Origin URL"_ustr, aGraphic.getOriginURL());
CPPUNIT_ASSERT_EQUAL(tools::Long(200), aGraphic.GetPrefSize().Width());
CPPUNIT_ASSERT_EQUAL(tools::Long(100), aGraphic.GetPrefSize().Height());
diff --git a/vcl/qa/cppunit/PDFiumLibraryTest.cxx b/vcl/qa/cppunit/PDFiumLibraryTest.cxx
index 966c44a3f568..172af6829b45 100644
--- a/vcl/qa/cppunit/PDFiumLibraryTest.cxx
+++ b/vcl/qa/cppunit/PDFiumLibraryTest.cxx
@@ -137,12 +137,12 @@ void PDFiumLibraryTest::testPageObjects()
CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFPageObjectType::Text, pPageObject->getType());
- CPPUNIT_ASSERT_EQUAL(OUString("The quick, brown fox jumps over a lazy dog. DJs flock by when "
- "MTV ax quiz prog. Junk MTV quiz "),
+ CPPUNIT_ASSERT_EQUAL(u"The quick, brown fox jumps over a lazy dog. DJs flock by when "
+ "MTV ax quiz prog. Junk MTV quiz "_ustr,
pPageObject->getText(pTextPage));
CPPUNIT_ASSERT_EQUAL(12.0, pPageObject->getFontSize());
- CPPUNIT_ASSERT_EQUAL(OUString("Liberation Serif"), pPageObject->getFontName());
+ CPPUNIT_ASSERT_EQUAL(u"Liberation Serif"_ustr, pPageObject->getFontName());
CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFTextRenderMode::Fill, pPageObject->getTextRenderMode());
CPPUNIT_ASSERT_EQUAL(COL_BLACK, pPageObject->getFillColor());
CPPUNIT_ASSERT_EQUAL(COL_BLACK, pPageObject->getStrokeColor());
@@ -191,10 +191,10 @@ void PDFiumLibraryTest::testAnnotationsMadeInEvince()
CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::Text, pAnnotation->getSubType());
OUString aPopupString = pAnnotation->getString(vcl::pdf::constDictionaryKeyTitle);
- CPPUNIT_ASSERT_EQUAL(OUString("quikee"), aPopupString);
+ CPPUNIT_ASSERT_EQUAL(u"quikee"_ustr, aPopupString);
OUString aContentsString = pAnnotation->getString(vcl::pdf::constDictionaryKeyContents);
- CPPUNIT_ASSERT_EQUAL(OUString("Annotation test"), aContentsString);
+ CPPUNIT_ASSERT_EQUAL(u"Annotation test"_ustr, aContentsString);
CPPUNIT_ASSERT_EQUAL(true, pAnnotation->hasKey(vcl::pdf::constDictionaryKeyPopup));
auto pPopupAnnotation = pAnnotation->getLinked(vcl::pdf::constDictionaryKeyPopup);
@@ -205,7 +205,7 @@ void PDFiumLibraryTest::testAnnotationsMadeInEvince()
OUString sDateTimeString
= pAnnotation->getString(vcl::pdf::constDictionaryKeyModificationDate);
- CPPUNIT_ASSERT_EQUAL(OUString("D:20200612201322+02'00"), sDateTimeString);
+ CPPUNIT_ASSERT_EQUAL(u"D:20200612201322+02'00"_ustr, sDateTimeString);
}
{
@@ -247,10 +247,10 @@ void PDFiumLibraryTest::testAnnotationsMadeInAcrobat()
CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::Text, pAnnotation->getSubType());
OUString aPopupString = pAnnotation->getString(vcl::pdf::constDictionaryKeyTitle);
- CPPUNIT_ASSERT_EQUAL(OUString("quikee"), aPopupString);
+ CPPUNIT_ASSERT_EQUAL(u"quikee"_ustr, aPopupString);
OUString aContentsString = pAnnotation->getString(vcl::pdf::constDictionaryKeyContents);
- CPPUNIT_ASSERT_EQUAL(OUString("YEEEY"), aContentsString);
+ CPPUNIT_ASSERT_EQUAL(u"YEEEY"_ustr, aContentsString);
CPPUNIT_ASSERT_EQUAL(true, pAnnotation->hasKey(vcl::pdf::constDictionaryKeyPopup));
auto pPopupAnnotation = pAnnotation->getLinked(vcl::pdf::constDictionaryKeyPopup);
@@ -272,10 +272,10 @@ void PDFiumLibraryTest::testAnnotationsMadeInAcrobat()
CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::Text, pAnnotation->getSubType());
OUString aPopupString = pAnnotation->getString(vcl::pdf::constDictionaryKeyTitle);
- CPPUNIT_ASSERT_EQUAL(OUString("quikee"), aPopupString);
+ CPPUNIT_ASSERT_EQUAL(u"quikee"_ustr, aPopupString);
OUString aContentsString = pAnnotation->getString(vcl::pdf::constDictionaryKeyContents);
- CPPUNIT_ASSERT_EQUAL(OUString("Note"), aContentsString);
+ CPPUNIT_ASSERT_EQUAL(u"Note"_ustr, aContentsString);
CPPUNIT_ASSERT_EQUAL(true, pAnnotation->hasKey(vcl::pdf::constDictionaryKeyPopup));
auto pPopupAnnotation = pAnnotation->getLinked(vcl::pdf::constDictionaryKeyPopup);
@@ -359,7 +359,7 @@ void PDFiumLibraryTest::testAnnotationsDifferentTypes()
CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::FreeText, pAnnotation->getSubType());
CPPUNIT_ASSERT_EQUAL(0, pAnnotation->getObjectCount());
OUString aContentsString = pAnnotation->getString(vcl::pdf::constDictionaryKeyContents);
- CPPUNIT_ASSERT_EQUAL(OUString("Inline Note"), aContentsString);
+ CPPUNIT_ASSERT_EQUAL(u"Inline Note"_ustr, aContentsString);
auto const& rLineGeometry = pAnnotation->getLineGeometry();
CPPUNIT_ASSERT_EQUAL(true, rLineGeometry.empty());
}
@@ -370,7 +370,7 @@ void PDFiumLibraryTest::testAnnotationsDifferentTypes()
CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::Ink, pAnnotation->getSubType());
CPPUNIT_ASSERT_EQUAL(0, pAnnotation->getObjectCount());
OUString aContentsString = pAnnotation->getString(vcl::pdf::constDictionaryKeyContents);
- CPPUNIT_ASSERT_EQUAL(OUString("Freehand Text"), aContentsString);
+ CPPUNIT_ASSERT_EQUAL(u"Freehand Text"_ustr, aContentsString);
CPPUNIT_ASSERT_EQUAL(size_t(1), pAnnotation->getInkStrokes().size());
auto const& aInkStrokes = pAnnotation->getInkStrokes();
auto const& aPoints = aInkStrokes[0];
@@ -386,7 +386,7 @@ void PDFiumLibraryTest::testAnnotationsDifferentTypes()
CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::Line, pAnnotation->getSubType());
CPPUNIT_ASSERT_EQUAL(0, pAnnotation->getObjectCount());
OUString aContentsString = pAnnotation->getString(vcl::pdf::constDictionaryKeyContents);
- CPPUNIT_ASSERT_EQUAL(OUString("Line Text"), aContentsString);
+ CPPUNIT_ASSERT_EQUAL(u"Line Text"_ustr, aContentsString);
auto const& rLineGeometry = pAnnotation->getLineGeometry();
CPPUNIT_ASSERT_EQUAL(false, rLineGeometry.empty());
}
@@ -398,7 +398,7 @@ void PDFiumLibraryTest::testAnnotationsDifferentTypes()
CPPUNIT_ASSERT_EQUAL(0, pAnnotation->getObjectCount());
CPPUNIT_ASSERT_EQUAL(true, pAnnotation->hasKey("Vertices"_ostr));
OUString aContentsString = pAnnotation->getString(vcl::pdf::constDictionaryKeyContents);
- CPPUNIT_ASSERT_EQUAL(OUString("Polygon Text"), aContentsString);
+ CPPUNIT_ASSERT_EQUAL(u"Polygon Text"_ustr, aContentsString);
auto const& aVertices = pAnnotation->getVertices();
CPPUNIT_ASSERT_EQUAL(size_t(3), aVertices.size());
CPPUNIT_ASSERT_DOUBLES_EQUAL(2.0f, pAnnotation->getBorderWidth(), 1E-2);
@@ -412,7 +412,7 @@ void PDFiumLibraryTest::testAnnotationsDifferentTypes()
CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::Circle, pAnnotation->getSubType());
CPPUNIT_ASSERT_EQUAL(0, pAnnotation->getObjectCount());
OUString aContentsString = pAnnotation->getString(vcl::pdf::constDictionaryKeyContents);
- CPPUNIT_ASSERT_EQUAL(OUString("Ellipse Text"), aContentsString);
+ CPPUNIT_ASSERT_EQUAL(u"Ellipse Text"_ustr, aContentsString);
auto const& rLineGeometry = pAnnotation->getLineGeometry();
CPPUNIT_ASSERT_EQUAL(true, rLineGeometry.empty());
}
@@ -423,7 +423,7 @@ void PDFiumLibraryTest::testAnnotationsDifferentTypes()
CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFAnnotationSubType::Square, pAnnotation->getSubType());
CPPUNIT_ASSERT_EQUAL(0, pAnnotation->getObjectCount());
OUString aContentsString = pAnnotation->getString(vcl::pdf::constDictionaryKeyContents);
- CPPUNIT_ASSERT_EQUAL(OUString("Rectangle Text"), aContentsString);
+ CPPUNIT_ASSERT_EQUAL(u"Rectangle Text"_ustr, aContentsString);
CPPUNIT_ASSERT_EQUAL(Color(0xFF, 0xE0, 0x00), pAnnotation->getColor());
CPPUNIT_ASSERT_EQUAL(false, pAnnotation->hasKey(vcl::pdf::constDictionaryKeyInteriorColor));
auto const& rLineGeometry = pAnnotation->getLineGeometry();
diff --git a/vcl/qa/cppunit/VectorGraphicSearchTest.cxx b/vcl/qa/cppunit/VectorGraphicSearchTest.cxx
index 59ce0fed5e67..7b72d5e273d2 100644
--- a/vcl/qa/cppunit/VectorGraphicSearchTest.cxx
+++ b/vcl/qa/cppunit/VectorGraphicSearchTest.cxx
@@ -53,7 +53,7 @@ void VectorGraphicSearchTest::test()
aGraphic.makeAvailable();
VectorGraphicSearch aSearch(aGraphic);
- CPPUNIT_ASSERT_EQUAL(true, aSearch.search("lazy"));
+ CPPUNIT_ASSERT_EQUAL(true, aSearch.search(u"lazy"_ustr));
CPPUNIT_ASSERT_EQUAL(true, aSearch.next());
CPPUNIT_ASSERT_EQUAL(34, aSearch.index());
@@ -105,7 +105,7 @@ void VectorGraphicSearchTest::testNextPrevious()
{ // Start from the beginning of the page
VectorGraphicSearch aSearch(aGraphic);
- CPPUNIT_ASSERT_EQUAL(true, aSearch.search("lazy"));
+ CPPUNIT_ASSERT_EQUAL(true, aSearch.search(u"lazy"_ustr));
// no previous - we are at the begin
CPPUNIT_ASSERT_EQUAL(false, aSearch.previous());
@@ -138,8 +138,8 @@ void VectorGraphicSearchTest::testNextPrevious()
{ // Start from the end of the page
VectorGraphicSearch aSearch(aGraphic);
- CPPUNIT_ASSERT_EQUAL(true,
- aSearch.search("lazy", { SearchStartPosition::End, false, false }));
+ CPPUNIT_ASSERT_EQUAL(
+ true, aSearch.search(u"lazy"_ustr, { SearchStartPosition::End, false, false }));
// no next - we are at the end
CPPUNIT_ASSERT_EQUAL(false, aSearch.next());
@@ -182,7 +182,7 @@ void VectorGraphicSearchTest::testSearchStringChange()
VectorGraphicSearch aSearch(aGraphic);
// Set search to "lazy"
- CPPUNIT_ASSERT_EQUAL(true, aSearch.search("lazy"));
+ CPPUNIT_ASSERT_EQUAL(true, aSearch.search(u"lazy"_ustr));
CPPUNIT_ASSERT_EQUAL(true, aSearch.next());
CPPUNIT_ASSERT_EQUAL(34, aSearch.index());
@@ -191,13 +191,13 @@ void VectorGraphicSearchTest::testSearchStringChange()
CPPUNIT_ASSERT_EQUAL(817, aSearch.index());
// Change search to "fox"
- CPPUNIT_ASSERT_EQUAL(true, aSearch.search("fox"));
+ CPPUNIT_ASSERT_EQUAL(true, aSearch.search(u"fox"_ustr));
CPPUNIT_ASSERT_EQUAL(true, aSearch.next());
CPPUNIT_ASSERT_EQUAL(822, aSearch.index());
// Change search to "Quick"
- CPPUNIT_ASSERT_EQUAL(true, aSearch.search("Quick"));
+ CPPUNIT_ASSERT_EQUAL(true, aSearch.search(u"Quick"_ustr));
CPPUNIT_ASSERT_EQUAL(true, aSearch.previous());
CPPUNIT_ASSERT_EQUAL(784, aSearch.index());
}
@@ -213,14 +213,14 @@ void VectorGraphicSearchTest::testSearchMatchWholeWord()
{
VectorGraphicSearch aSearch(aGraphic);
// Search, whole word disabled - "Flummoxed" - found
- CPPUNIT_ASSERT_EQUAL(true, aSearch.search("Flummoxed"));
+ CPPUNIT_ASSERT_EQUAL(true, aSearch.search(u"Flummoxed"_ustr));
CPPUNIT_ASSERT_EQUAL(true, aSearch.next());
CPPUNIT_ASSERT_EQUAL(618, aSearch.index());
}
{
VectorGraphicSearch aSearch(aGraphic);
// Search, whole word disabled - "Flummo" - found
- CPPUNIT_ASSERT_EQUAL(true, aSearch.search("Flummo"));
+ CPPUNIT_ASSERT_EQUAL(true, aSearch.search(u"Flummo"_ustr));
CPPUNIT_ASSERT_EQUAL(true, aSearch.next());
CPPUNIT_ASSERT_EQUAL(618, aSearch.index());
}
@@ -228,15 +228,15 @@ void VectorGraphicSearchTest::testSearchMatchWholeWord()
VectorGraphicSearch aSearch(aGraphic);
// Search, whole word enabled - "Flummoxed" - found
CPPUNIT_ASSERT_EQUAL(
- true, aSearch.search("Flummoxed", { SearchStartPosition::Begin, false, true }));
+ true, aSearch.search(u"Flummoxed"_ustr, { SearchStartPosition::Begin, false, true }));
CPPUNIT_ASSERT_EQUAL(true, aSearch.next());
CPPUNIT_ASSERT_EQUAL(618, aSearch.index());
}
{
VectorGraphicSearch aSearch(aGraphic);
// Search, whole word enabled - "Flummo" - not found
- CPPUNIT_ASSERT_EQUAL(true,
- aSearch.search("Flummo", { SearchStartPosition::Begin, false, true }));
+ CPPUNIT_ASSERT_EQUAL(
+ true, aSearch.search(u"Flummo"_ustr, { SearchStartPosition::Begin, false, true }));
CPPUNIT_ASSERT_EQUAL(false, aSearch.next());
}
}
@@ -252,7 +252,7 @@ void VectorGraphicSearchTest::testSearchMatchCase()
{
VectorGraphicSearch aSearch(aGraphic);
// Search "Flummoxed" - case insensitive - found
- CPPUNIT_ASSERT_EQUAL(true, aSearch.search("Flummoxed"));
+ CPPUNIT_ASSERT_EQUAL(true, aSearch.search(u"Flummoxed"_ustr));
CPPUNIT_ASSERT_EQUAL(true, aSearch.next());
CPPUNIT_ASSERT_EQUAL(618, aSearch.index());
}
@@ -260,7 +260,7 @@ void VectorGraphicSearchTest::testSearchMatchCase()
{
VectorGraphicSearch aSearch(aGraphic);
// Search "FLUMMOXED" - case insensitive - found
- CPPUNIT_ASSERT_EQUAL(true, aSearch.search("FLUMMOXED"));
+ CPPUNIT_ASSERT_EQUAL(true, aSearch.search(u"FLUMMOXED"_ustr));
CPPUNIT_ASSERT_EQUAL(true, aSearch.next());
CPPUNIT_ASSERT_EQUAL(618, aSearch.index());
}
@@ -269,7 +269,7 @@ void VectorGraphicSearchTest::testSearchMatchCase()
VectorGraphicSearch aSearch(aGraphic);
// Search "Flummoxed" - case sensitive - found
CPPUNIT_ASSERT_EQUAL(
- true, aSearch.search("Flummoxed", { SearchStartPosition::Begin, true, false }));
+ true, aSearch.search(u"Flummoxed"_ustr, { SearchStartPosition::Begin, true, false }));
CPPUNIT_ASSERT_EQUAL(true, aSearch.next());
CPPUNIT_ASSERT_EQUAL(618, aSearch.index());
}
@@ -278,7 +278,7 @@ void VectorGraphicSearchTest::testSearchMatchCase()
VectorGraphicSearch aSearch(aGraphic);
// Search to "FLUMMOXED" - case sensitive - not found
CPPUNIT_ASSERT_EQUAL(
- true, aSearch.search("FLUMMOXED", { SearchStartPosition::Begin, true, false }));
+ true, aSearch.search(u"FLUMMOXED"_ustr, { SearchStartPosition::Begin, true, false }));
CPPUNIT_ASSERT_EQUAL(false, aSearch.next());
}
}
diff --git a/vcl/qa/cppunit/app/test_IconThemeInfo.cxx b/vcl/qa/cppunit/app/test_IconThemeInfo.cxx
index ff1ad985b156..f05405677162 100644
--- a/vcl/qa/cppunit/app/test_IconThemeInfo.cxx
+++ b/vcl/qa/cppunit/app/test_IconThemeInfo.cxx
@@ -54,8 +54,8 @@ class IconThemeInfoTest : public CppUnit::TestFixture
void
IconThemeInfoTest::UpperCaseDisplayNameIsReturnedForNonDefaultId()
{
- OUString displayName = vcl::IconThemeInfo::ThemeIdToDisplayName("katze");
- CPPUNIT_ASSERT_EQUAL_MESSAGE("theme id is properly uppercased", OUString("Katze"), displayName);
+ OUString displayName = vcl::IconThemeInfo::ThemeIdToDisplayName(u"katze"_ustr);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("theme id is properly uppercased", u"Katze"_ustr, displayName);
}
void
@@ -76,7 +76,7 @@ void
IconThemeInfoTest::ThemeIdIsDetectedFromFileNameWithUnderscore()
{
OUString sname = vcl::IconThemeInfo::FileNameToThemeId(u"images_colibre.zip");
- CPPUNIT_ASSERT_EQUAL_MESSAGE("'colibre' theme id is returned for 'images_colibre.zip'", OUString("colibre"), sname);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("'colibre' theme id is returned for 'images_colibre.zip'", u"colibre"_ustr, sname);
}
void
diff --git a/vcl/qa/cppunit/app/test_IconThemeScanner.cxx b/vcl/qa/cppunit/app/test_IconThemeScanner.cxx
index d02fe752ce51..d0eb13402e9a 100644
--- a/vcl/qa/cppunit/app/test_IconThemeScanner.cxx
+++ b/vcl/qa/cppunit/app/test_IconThemeScanner.cxx
@@ -42,7 +42,7 @@ void
IconThemeScannerTest::AddedThemeIsFoundById()
{
vcl::IconThemeScanner scanner;
- scanner.AddIconThemeByPath("file:://images_katze.zip");
+ scanner.AddIconThemeByPath(u"file:://images_katze.zip"_ustr);
OUString id = vcl::IconThemeInfo::FileNameToThemeId(u"images_katze.zip");
bool found = scanner.IconThemeIsInstalled(id);
CPPUNIT_ASSERT_EQUAL_MESSAGE("icon theme could be added by url", true, found);
@@ -52,7 +52,7 @@ void
IconThemeScannerTest::AddedThemeInfoIsReturned()
{
vcl::IconThemeScanner scanner;
- OUString theme("file:://images_katze.zip");
+ OUString theme(u"file:://images_katze.zip"_ustr);
scanner.AddIconThemeByPath(theme);
OUString id = vcl::IconThemeInfo::FileNameToThemeId(u"images_katze.zip");
const vcl::IconThemeInfo& info = scanner.GetIconThemeInfo(id);
@@ -63,11 +63,11 @@ void
IconThemeScannerTest::ExceptionIsThrownIfInvalidInfoIsRequested()
{
vcl::IconThemeScanner scanner;
- scanner.AddIconThemeByPath("file:://images_katze.zip");
+ scanner.AddIconThemeByPath(u"file:://images_katze.zip"_ustr);
bool thrown = false;
try
{
- scanner.GetIconThemeInfo("hund");
+ scanner.GetIconThemeInfo(u"hund"_ustr);
}
catch (const std::runtime_error&)
{
diff --git a/vcl/qa/cppunit/app/test_IconThemeSelector.cxx b/vcl/qa/cppunit/app/test_IconThemeSelector.cxx
index 7e053ffd1e4d..e60ac7061f5f 100644
--- a/vcl/qa/cppunit/app/test_IconThemeSelector.cxx
+++ b/vcl/qa/cppunit/app/test_IconThemeSelector.cxx
@@ -75,8 +75,8 @@ IconThemeSelectorTest::BreezeIsReturnedForKde5Desktop()
{
std::vector<vcl::IconThemeInfo> themes = GetFakeInstalledThemes();
vcl::IconThemeSelector s;
- OUString r = s.SelectIconThemeForDesktopEnvironment(themes, "plasma5");
- CPPUNIT_ASSERT_EQUAL_MESSAGE("'breeze' theme is returned for Plasma 5 desktop", OUString("breeze"), r);
+ OUString r = s.SelectIconThemeForDesktopEnvironment(themes, u"plasma5"_ustr);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("'breeze' theme is returned for Plasma 5 desktop", u"breeze"_ustr, r);
}
void
@@ -84,18 +84,18 @@ IconThemeSelectorTest::ElementaryIsReturnedForGnomeDesktop()
{
std::vector<vcl::IconThemeInfo> themes = GetFakeInstalledThemes();
vcl::IconThemeSelector s;
- OUString r = s.SelectIconThemeForDesktopEnvironment(themes, "gnome");
- CPPUNIT_ASSERT_EQUAL_MESSAGE("'elementary' theme is returned for gnome desktop", OUString("elementary"), r);
+ OUString r = s.SelectIconThemeForDesktopEnvironment(themes, u"gnome"_ustr);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("'elementary' theme is returned for gnome desktop", u"elementary"_ustr, r);
}
void
IconThemeSelectorTest::ThemeIsOverriddenByPreferredTheme()
{
vcl::IconThemeSelector s;
- OUString preferred("breeze");
+ OUString preferred(u"breeze"_ustr);
s.SetPreferredIconTheme(preferred, false);
std::vector<vcl::IconThemeInfo> themes = GetFakeInstalledThemes();
- OUString selected = s.SelectIconThemeForDesktopEnvironment(themes, "gnome");
+ OUString selected = s.SelectIconThemeForDesktopEnvironment(themes, u"gnome"_ustr);
CPPUNIT_ASSERT_EQUAL_MESSAGE("'elementary' theme is overridden by breeze", preferred, selected);
}
@@ -105,23 +105,23 @@ IconThemeSelectorTest::ThemeIsOverriddenByHighContrastMode()
vcl::IconThemeSelector s;
s.SetUseHighContrastTheme(true);
std::vector<vcl::IconThemeInfo> themes = GetFakeInstalledThemes();
- OUString selected = s.SelectIconTheme(themes, "breeze");
+ OUString selected = s.SelectIconTheme(themes, u"breeze"_ustr);
bool sifr = selected.startsWith("sifr");
CPPUNIT_ASSERT_EQUAL_MESSAGE("'breeze' theme is overridden by high contrast mode", true, sifr);
s.SetUseHighContrastTheme(false);
- selected = s.SelectIconTheme(themes, "breeze");
+ selected = s.SelectIconTheme(themes, u"breeze"_ustr);
CPPUNIT_ASSERT_EQUAL_MESSAGE("'breeze' theme is no longer overridden by high contrast mode",
- OUString("breeze"), selected);
+ u"breeze"_ustr, selected);
}
void
IconThemeSelectorTest::NotInstalledThemeDoesNotOverride()
{
vcl::IconThemeSelector s;
- s.SetPreferredIconTheme("breeze_foo", false);
+ s.SetPreferredIconTheme(u"breeze_foo"_ustr, false);
std::vector<vcl::IconThemeInfo> themes = GetFakeInstalledThemes();
- OUString selected = s.SelectIconTheme(themes, "colibre");
- CPPUNIT_ASSERT_EQUAL_MESSAGE("'colibre' theme is not overridden by 'breeze_foo'", OUString("colibre"), selected);
+ OUString selected = s.SelectIconTheme(themes, u"colibre"_ustr);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("'colibre' theme is not overridden by 'breeze_foo'", u"colibre"_ustr, selected);
}
void
@@ -129,8 +129,8 @@ IconThemeSelectorTest::InstalledThemeIsFound()
{
vcl::IconThemeSelector s;
std::vector<vcl::IconThemeInfo> themes = GetFakeInstalledThemes();
- OUString selected = s.SelectIconTheme(themes, "colibre");
- CPPUNIT_ASSERT_EQUAL_MESSAGE("'colibre' theme is found", OUString("colibre"), selected);
+ OUString selected = s.SelectIconTheme(themes, u"colibre"_ustr);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("'colibre' theme is found", u"colibre"_ustr, selected);
}
void
@@ -138,7 +138,7 @@ IconThemeSelectorTest::FirstThemeIsReturnedIfRequestedThemeIsNotFound()
{
vcl::IconThemeSelector s;
std::vector<vcl::IconThemeInfo> themes = GetFakeInstalledThemes();
- OUString selected = s.SelectIconTheme(themes, "breeze_foo");
+ OUString selected = s.SelectIconTheme(themes, u"breeze_foo"_ustr);
CPPUNIT_ASSERT_EQUAL_MESSAGE("'breeze' theme is found", themes.front().GetThemeId(), selected);
}
@@ -146,7 +146,7 @@ void
IconThemeSelectorTest::FallbackThemeIsReturnedForEmptyInput()
{
vcl::IconThemeSelector s;
- OUString selected = s.SelectIconTheme(std::vector<vcl::IconThemeInfo>(), "colibre");
+ OUString selected = s.SelectIconTheme(std::vector<vcl::IconThemeInfo>(), u"colibre"_ustr);
CPPUNIT_ASSERT_EQUAL_MESSAGE("fallback is returned for empty input",
vcl::IconThemeSelector::FALLBACK_LIGHT_ICON_THEME_ID, selected);
}
@@ -167,7 +167,7 @@ IconThemeSelectorTest::DifferentPreferredThemesAreInequal()
{
vcl::IconThemeSelector s1;
vcl::IconThemeSelector s2;
- s1.SetPreferredIconTheme("breeze", false);
+ s1.SetPreferredIconTheme(u"breeze"_ustr, false);
s2.SetUseHighContrastTheme(true);
bool equal = (s1 == s2);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Different preferred themes are detected as inequal", false, equal);
diff --git a/vcl/qa/cppunit/blocklistparsertest.cxx b/vcl/qa/cppunit/blocklistparsertest.cxx
index 689e8d9c9e24..1cef4dfbfbc7 100644
--- a/vcl/qa/cppunit/blocklistparsertest.cxx
+++ b/vcl/qa/cppunit/blocklistparsertest.cxx
@@ -69,7 +69,7 @@ void BlocklistParserTest::testParse()
aDriveInfo = aDriveInfos[i++];
CPPUNIT_ASSERT_EQUAL(bIsAllowlisted, aDriveInfo.mbAllowlisted);
- CPPUNIT_ASSERT_EQUAL(OUString("0xcafe"), aDriveInfo.maAdapterVendor);
+ CPPUNIT_ASSERT_EQUAL(u"0xcafe"_ustr, aDriveInfo.maAdapterVendor);
CPPUNIT_ASSERT_EQUAL(VersionComparisonOp::DRIVER_NOT_EQUAL, aDriveInfo.meComparisonOp);
aDriveInfo = aDriveInfos[i++];
@@ -109,39 +109,39 @@ void BlocklistParserTest::testEvaluate()
// Check OS
CPPUNIT_ASSERT_EQUAL(false, FindBlocklistedDeviceInList(
- aDriveInfos, VersionType::OpenGL, u"10.20.30.40", vendorNVIDIA, "all", DRIVER_OS_WINDOWS_7));
+ aDriveInfos, VersionType::OpenGL, u"10.20.30.40", vendorNVIDIA, u"all"_ustr, DRIVER_OS_WINDOWS_7));
CPPUNIT_ASSERT_EQUAL(false, FindBlocklistedDeviceInList(
- aDriveInfos, VersionType::OpenGL, u"10.20.30.40", vendorNVIDIA, "all", DRIVER_OS_WINDOWS_8));
+ aDriveInfos, VersionType::OpenGL, u"10.20.30.40", vendorNVIDIA, u"all"_ustr, DRIVER_OS_WINDOWS_8));
CPPUNIT_ASSERT_EQUAL(false, FindBlocklistedDeviceInList(
- aDriveInfos, VersionType::OpenGL, u"10.20.30.40", vendorNVIDIA, "all", DRIVER_OS_WINDOWS_10));
+ aDriveInfos, VersionType::OpenGL, u"10.20.30.40", vendorNVIDIA, u"all"_ustr, DRIVER_OS_WINDOWS_10));
// Check generic OS
CPPUNIT_ASSERT_EQUAL(false, FindBlocklistedDeviceInList(
- aDriveInfos, VersionType::OpenGL, u"10.20.30.50", vendorMicrosoft, "all", DRIVER_OS_WINDOWS_10));
+ aDriveInfos, VersionType::OpenGL, u"10.20.30.50", vendorMicrosoft, u"all"_ustr, DRIVER_OS_WINDOWS_10));
CPPUNIT_ASSERT_EQUAL(true, FindBlocklistedDeviceInList(
- aDriveInfos, VersionType::OpenGL, u"10.20.30.50", vendorMicrosoft, "all", DRIVER_OS_LINUX));
+ aDriveInfos, VersionType::OpenGL, u"10.20.30.50", vendorMicrosoft, u"all"_ustr, DRIVER_OS_LINUX));
CPPUNIT_ASSERT_EQUAL(true, FindBlocklistedDeviceInList(
- aDriveInfos, VersionType::OpenGL, u"10.20.30.50", vendorMicrosoft, "all", DRIVER_OS_OSX_10_7));
+ aDriveInfos, VersionType::OpenGL, u"10.20.30.50", vendorMicrosoft, u"all"_ustr, DRIVER_OS_OSX_10_7));
CPPUNIT_ASSERT_EQUAL(true, FindBlocklistedDeviceInList(
- aDriveInfos, VersionType::OpenGL, u"10.20.30.50", vendorMicrosoft, "all", DRIVER_OS_OSX_10_8));
+ aDriveInfos, VersionType::OpenGL, u"10.20.30.50", vendorMicrosoft, u"all"_ustr, DRIVER_OS_OSX_10_8));
// Check Vendors
CPPUNIT_ASSERT_EQUAL(true, FindBlocklistedDeviceInList(
- aDriveInfos, VersionType::OpenGL, u"10.20.30.40", vendorMicrosoft, "all", DRIVER_OS_WINDOWS_7));
+ aDriveInfos, VersionType::OpenGL, u"10.20.30.40", vendorMicrosoft, u"all"_ustr, DRIVER_OS_WINDOWS_7));
CPPUNIT_ASSERT_EQUAL(true, FindBlocklistedDeviceInList(
- aDriveInfos, VersionType::OpenGL, u"10.20.30.40", vendorMicrosoft, "all", DRIVER_OS_WINDOWS_10));
+ aDriveInfos, VersionType::OpenGL, u"10.20.30.40", vendorMicrosoft, u"all"_ustr, DRIVER_OS_WINDOWS_10));
// Check Versions
CPPUNIT_ASSERT_EQUAL(true, FindBlocklistedDeviceInList(
- aDriveInfos, VersionType::OpenGL, u"10.20.30.39", vendorAMD, "all", DRIVER_OS_WINDOWS_7));
+ aDriveInfos, VersionType::OpenGL, u"10.20.30.39", vendorAMD, u"all"_ustr, DRIVER_OS_WINDOWS_7));
CPPUNIT_ASSERT_EQUAL(false, FindBlocklistedDeviceInList(
- aDriveInfos, VersionType::OpenGL, u"10.20.30.40", vendorAMD, "all", DRIVER_OS_WINDOWS_7));
+ aDriveInfos, VersionType::OpenGL, u"10.20.30.40", vendorAMD, u"all"_ustr, DRIVER_OS_WINDOWS_7));
CPPUNIT_ASSERT_EQUAL(false, FindBlocklistedDeviceInList(
- aDriveInfos, VersionType::OpenGL, u"10.20.30.41", vendorAMD, "all", DRIVER_OS_WINDOWS_7));
+ aDriveInfos, VersionType::OpenGL, u"10.20.30.41", vendorAMD, u"all"_ustr, DRIVER_OS_WINDOWS_7));
// Check
CPPUNIT_ASSERT_EQUAL(true, FindBlocklistedDeviceInList(
- aDriveInfos, VersionType::OpenGL, u"9.17.10.4229", vendorIntel, "all", DRIVER_OS_WINDOWS_7));
+ aDriveInfos, VersionType::OpenGL, u"9.17.10.4229", vendorIntel, u"all"_ustr, DRIVER_OS_WINDOWS_7));
}
@@ -158,11 +158,11 @@ void BlocklistParserTest::testVulkan()
// Check Versions
CPPUNIT_ASSERT_EQUAL(false, FindBlocklistedDeviceInList(
- aDriveInfos, VersionType::Vulkan, u"1.2.3", vendorAMD, "all", DRIVER_OS_ALL));
+ aDriveInfos, VersionType::Vulkan, u"1.2.3", vendorAMD, u"all"_ustr, DRIVER_OS_ALL));
CPPUNIT_ASSERT_EQUAL(true, FindBlocklistedDeviceInList(
- aDriveInfos, VersionType::Vulkan, u"1.2.2", vendorAMD, "all", DRIVER_OS_ALL));
+ aDriveInfos, VersionType::Vulkan, u"1.2.2", vendorAMD, u"all"_ustr, DRIVER_OS_ALL));
CPPUNIT_ASSERT_EQUAL(false, FindBlocklistedDeviceInList(
- aDriveInfos, VersionType::Vulkan, u"1.2.20", vendorAMD, "all", DRIVER_OS_ALL));
+ aDriveInfos, VersionType::Vulkan, u"1.2.20", vendorAMD, u"all"_ustr, DRIVER_OS_ALL));
}
} // namespace
diff --git a/vcl/qa/cppunit/cjktext.cxx b/vcl/qa/cppunit/cjktext.cxx
index 8dbed792b97c..ad00de2e8893 100644
--- a/vcl/qa/cppunit/cjktext.cxx
+++ b/vcl/qa/cppunit/cjktext.cxx
@@ -135,7 +135,7 @@ void VclCjkTextTest::testVerticalText()
OUString fontName = OUString::fromUtf8(ptrfontName);
if (!device->IsFontAvailable(fontName))
continue;
- baseFont = vcl::Font(fontName, "Book", Size(0, 36));
+ baseFont = vcl::Font(fontName, u"Book"_ustr, Size(0, 36));
baseFont.SetLanguage(LANGUAGE_JAPANESE);
baseFont.SetVertical(true);
baseFont.SetOrientation(2700_deg10);
@@ -157,7 +157,7 @@ void VclCjkTextTest::testVerticalText()
device->Erase();
device->SetFont(font);
device->DrawText(Point(90, 10), text);
- exportDevice("vertical-text-36.png", device);
+ exportDevice(u"vertical-text-36.png"_ustr, device);
// Height of U+30E8 with font 36 size should be roughly 28 pixels,
// but since we don't know which font will be used, allow even more range.
tools::Long height36 = getCharacterRightSideHeight(device, Point(99, 22));
@@ -172,7 +172,7 @@ void VclCjkTextTest::testVerticalText()
device->Erase();
device->SetFont(font);
device->DrawText(Point(10, 10), text);
- exportDevice("vertical-text-36-0deg.png", device);
+ exportDevice(u"vertical-text-36-0deg.png"_ustr, device);
// Here width and height should be the same, since the glyphs actually
// not rotated compared to the vertical writing.
tools::Long height36Rotated = getCharacterRightSideHeight(device, Point(99, 35));
@@ -185,7 +185,7 @@ void VclCjkTextTest::testVerticalText()
device->Erase();
device->SetFont(font);
device->DrawText(Point(90, 10), text);
- exportDevice("vertical-text-72.png", device);
+ exportDevice(u"vertical-text-72.png"_ustr, device);
// Font size is doubled, so pixel sizes should also roughly double.
tools::Long height72 = getCharacterRightSideHeight(device, Point(99, 35));
CPPUNIT_ASSERT_DOUBLES_EQUAL(height36 * 2, height72, 4);
@@ -197,7 +197,7 @@ void VclCjkTextTest::testVerticalText()
device->Erase();
device->SetFont(font);
device->DrawText(Point(10, 10), text);
- exportDevice("vertical-text-72-0deg.png", device);
+ exportDevice(u"vertical-text-72-0deg.png"_ustr, device);
tools::Long height72Rotated = getCharacterRightSideHeight(device, Point(99, 60));
CPPUNIT_ASSERT_DOUBLES_EQUAL(height72, height72Rotated, 1);
tools::Long width72Rotated = getCharacterTopWidth(device, Point(45, 0));
@@ -219,7 +219,7 @@ void VclCjkTextTest::testVerticalText()
device->SetFont(font);
device->DrawText(Point(90, 10), text);
// Double "width" with vertical text makes the height doubled.
- exportDevice("vertical-text-36-200pct.png", device);
+ exportDevice(u"vertical-text-36-200pct.png"_ustr, device);
tools::Long height36pct200 = getCharacterRightSideHeight(device, Point(99, 35));
CPPUNIT_ASSERT_DOUBLES_EQUAL(height36 * 2, height36pct200, 4);
tools::Long width36pct200 = getCharacterTopWidth(device, Point(65, 0));
@@ -234,7 +234,7 @@ void VclCjkTextTest::testVerticalText()
device->Erase();
device->SetFont(font);
device->DrawText(Point(90, 10), text);
- exportDevice("vertical-text-36-50pct.png", device);
+ exportDevice(u"vertical-text-36-50pct.png"_ustr, device);
tools::Long height36pct50 = getCharacterRightSideHeight(device, Point(99, 16));
CPPUNIT_ASSERT_DOUBLES_EQUAL(height36 / 2, height36pct50, 2);
tools::Long width36pct50 = getCharacterTopWidth(device, Point(65, 0));
diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index f7cc6393b02c..3d267df078c9 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -75,7 +75,7 @@ CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testArabic)
#if HAVE_MORE_FONTS
OUString aOneTwoThree(u"واحِدْ إثٍنين ثلاثةٌ"_ustr);
- vcl::Font aFont("DejaVu Sans", "Book", Size(0, 2048));
+ vcl::Font aFont(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 2048));
ScopedVclPtrInstance<VirtualDevice> pOutDev;
pOutDev->SetFont( aFont );
@@ -188,11 +188,11 @@ static void testCachedGlyphs( const OUString& aText, const OUString& aFontName )
CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testCaching)
{
// Just something basic, no font fallback.
- testCachedGlyphs( "test", "Dejavu Sans" );
+ testCachedGlyphs( u"test"_ustr, u"Dejavu Sans"_ustr );
// This font does not have latin characters, will need fallback.
- testCachedGlyphs( "test", "Noto Kufi Arabic" );
+ testCachedGlyphs( u"test"_ustr, u"Noto Kufi Arabic"_ustr );
// see tdf#103492
- testCachedGlyphs( u"يوسف My name is"_ustr, "Liberation Sans");
+ testCachedGlyphs( u"يوسف My name is"_ustr, u"Liberation Sans"_ustr);
}
static void testCachedGlyphsSubstring( const OUString& aText, const OUString& aFontName, bool rtl )
@@ -234,14 +234,14 @@ static void testCachedGlyphsSubstring( const OUString& aText, const OUString& aF
CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testCachingSubstring)
{
// Just something basic.
- testCachedGlyphsSubstring( "test", "Dejavu Sans", false );
+ testCachedGlyphsSubstring( u"test"_ustr, u"Dejavu Sans"_ustr, false );
// And complex arabic text, taken from tdf104649.docx .
OUString text(u"فصل (پاره 2): درخواست حاجت از ديگران و برآوردن حاجت ديگران 90"_ustr);
- testCachedGlyphsSubstring( text, "Dejavu Sans", true );
+ testCachedGlyphsSubstring( text, u"Dejavu Sans"_ustr, true );
// The text is RTL, but Writer will sometimes try to lay it out as LTR, for whatever reason
// (tdf#149264)./ So make sure that gets handled properly too (SalLayoutGlyphsCache should
// not use glyph subsets in that case).
- testCachedGlyphsSubstring( text, "Dejavu Sans", false );
+ testCachedGlyphsSubstring( text, u"Dejavu Sans"_ustr, false );
}
CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testCaret)
@@ -250,7 +250,7 @@ CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testCaret)
// Test caret placement in fonts *without* ligature carets in GDEF table.
// Set font size to its UPEM to decrease rounding issues
- vcl::Font aFont("DejaVu Sans", "Book", Size(0, 2048));
+ vcl::Font aFont(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 2048));
ScopedVclPtrInstance<VirtualDevice> pOutDev;
pOutDev->SetFont( aFont );
@@ -331,7 +331,7 @@ CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testGdefCaret)
// A. RTL text
// Set font size to its UPEM to decrease rounding issues
- aFont = vcl::Font("Noto Sans Arabic", "Regular", Size(0, 1000));
+ aFont = vcl::Font(u"Noto Sans Arabic"_ustr, u"Regular"_ustr, Size(0, 1000));
pOutDev->SetFont(aFont);
aText = u"لا بلا"_ustr;
@@ -369,7 +369,7 @@ CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testGdefCaret)
// B. LTR text
// Set font size to its UPEM to decrease rounding issues
- aFont = vcl::Font("Amiri", "Regular", Size(0, 1000));
+ aFont = vcl::Font(u"Amiri"_ustr, u"Regular"_ustr, Size(0, 1000));
pOutDev->SetFont(aFont);
aText = u"fi ffi fl ffl fb ffb"_ustr;
@@ -507,7 +507,7 @@ CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testMixedCJKLatinScript_glyph_advanceme
vcl::Font aFont(u"Source Han Sans"_ustr, u"Regular"_ustr, Size(0, 72));
pOutDev->SetFont( aFont );
- vcl::Font aFallbackFont("DejaVu Sans", "Book", Size(0, 72));
+ vcl::Font aFallbackFont(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 72));
pOutDev->ForceFallbackFont(aFallbackFont);
// absolute character widths AKA text array.
diff --git a/vcl/qa/cppunit/errorhandler.cxx b/vcl/qa/cppunit/errorhandler.cxx
index eaa62c7f5d88..4a8fe9c067bf 100644
--- a/vcl/qa/cppunit/errorhandler.cxx
+++ b/vcl/qa/cppunit/errorhandler.cxx
@@ -51,12 +51,12 @@ void ErrorHandlerTest::testGetErrorString()
!ErrorHandler::GetErrorString(ERRCODE_ABORT, aErrStr));
// normally protected, but MockErrorHandler is a friend of this class
aErrHdlr.CreateString(ERRCODE_ABORT, aErrStr);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("error message should be non-dynamic", OUString("Non-dynamic error"), aErrStr);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("error message should be non-dynamic", u"Non-dynamic error"_ustr, aErrStr);
CPPUNIT_ASSERT_MESSAGE("GetErrorString(ERRCODE_NONE, aErrStr) should return false",
!ErrorHandler::GetErrorString(ERRCODE_NONE, aErrStr));
aErrHdlr.CreateString(ERRCODE_NONE, aErrStr);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("error message should be non-dynamic", OUString("Non-dynamic error"), aErrStr);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("error message should be non-dynamic", u"Non-dynamic error"_ustr, aErrStr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ErrorHandlerTest);
diff --git a/vcl/qa/cppunit/filter/ipdf/ipdf.cxx b/vcl/qa/cppunit/filter/ipdf/ipdf.cxx
index ad2354b00eb8..1c0b0625ce68 100644
--- a/vcl/qa/cppunit/filter/ipdf/ipdf.cxx
+++ b/vcl/qa/cppunit/filter/ipdf/ipdf.cxx
@@ -35,7 +35,7 @@ private:
public:
VclFilterIpdfTest()
- : UnoApiTest("/vcl/qa/cppunit/filter/ipdf/data/")
+ : UnoApiTest(u"/vcl/qa/cppunit/filter/ipdf/data/"_ustr)
{
}
@@ -49,7 +49,7 @@ public:
void VclFilterIpdfTest::setUp()
{
UnoApiTest::setUp();
- MacrosTest::setUpX509(m_directories, "vcl_filter_ipdf");
+ MacrosTest::setUpX509(m_directories, u"vcl_filter_ipdf"_ustr);
mxSEInitializer = xml::crypto::SEInitializer::create(mxComponentContext);
mxSecurityContext = mxSEInitializer->createSecurityContext(OUString());
@@ -65,9 +65,10 @@ CPPUNIT_TEST_FIXTURE(VclFilterIpdfTest, testPDFAddVisibleSignatureLastPage)
createTempCopy(u"add-visible-signature-last-page.pdf");
// Open it.
- uno::Sequence<beans::PropertyValue> aArgs = { comphelper::makePropertyValue("ReadOnly", true) };
+ uno::Sequence<beans::PropertyValue> aArgs
+ = { comphelper::makePropertyValue(u"ReadOnly"_ustr, true) };
mxComponent
- = loadFromDesktop(maTempFile.GetURL(), "com.sun.star.drawing.DrawingDocument", aArgs);
+ = loadFromDesktop(maTempFile.GetURL(), u"com.sun.star.drawing.DrawingDocument"_ustr, aArgs);
SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
CPPUNIT_ASSERT(pBaseModel);
SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
@@ -76,7 +77,7 @@ CPPUNIT_TEST_FIXTURE(VclFilterIpdfTest, testPDFAddVisibleSignatureLastPage)
// Add a signature line to the 2nd page.
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape(
- xFactory->createInstance("com.sun.star.drawing.GraphicObjectShape"), uno::UNO_QUERY);
+ xFactory->createInstance(u"com.sun.star.drawing.GraphicObjectShape"_ustr), uno::UNO_QUERY);
xShape->setPosition(awt::Point(1000, 15000));
xShape->setSize(awt::Size(10000, 10000));
uno::Reference<drawing::XDrawPagesSupplier> xSupplier(mxComponent, uno::UNO_QUERY);
diff --git a/vcl/qa/cppunit/font.cxx b/vcl/qa/cppunit/font.cxx
index 25550a95f6b0..ce49723169fd 100644
--- a/vcl/qa/cppunit/font.cxx
+++ b/vcl/qa/cppunit/font.cxx
@@ -58,10 +58,10 @@ void VclFontTest::testName()
CPPUNIT_ASSERT_MESSAGE( "Family name should be empty", aFont.GetFamilyName().isEmpty());
CPPUNIT_ASSERT_MESSAGE( "Style name should be empty", aFont.GetStyleName().isEmpty());
- aFont.SetFamilyName("Test family name");
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "Family name should not be empty", OUString("Test family name"), aFont.GetFamilyName());
- aFont.SetStyleName("Test style name");
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "Style name should not be empty", OUString("Test style name"), aFont.GetStyleName());
+ aFont.SetFamilyName(u"Test family name"_ustr);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Family name should not be empty", u"Test family name"_ustr, aFont.GetFamilyName());
+ aFont.SetStyleName(u"Test style name"_ustr);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Style name should not be empty", u"Test style name"_ustr, aFont.GetStyleName());
}
void VclFontTest::testWeight()
diff --git a/vcl/qa/cppunit/gen/gen.cxx b/vcl/qa/cppunit/gen/gen.cxx
index 6be7abb68098..6690111ac630 100644
--- a/vcl/qa/cppunit/gen/gen.cxx
+++ b/vcl/qa/cppunit/gen/gen.cxx
@@ -23,7 +23,7 @@ class GenTest : public UnoApiTest
{
public:
GenTest()
- : UnoApiTest("/vcl/qa/cppunit/gen/data/")
+ : UnoApiTest(u"/vcl/qa/cppunit/gen/data/"_ustr)
{
}
@@ -84,7 +84,7 @@ CPPUNIT_TEST_FIXTURE(GenTest, testTdf107966)
Color aPixel(pAccess->GetPixel(0, 0));
// Without the accompanying fix in place, this test would have failed with 'Expected: 000000;
// Actual: ffffff', i.e. the top left pixel was white, not black.
- CPPUNIT_ASSERT_EQUAL(OUString("000000"), aPixel.AsRGBHexString());
+ CPPUNIT_ASSERT_EQUAL(u"000000"_ustr, aPixel.AsRGBHexString());
}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/vcl/qa/cppunit/graphicfilter/filters-pict-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-pict-test.cxx
index ebce81f9ab0c..555b1c0ffa13 100644
--- a/vcl/qa/cppunit/graphicfilter/filters-pict-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-pict-test.cxx
@@ -81,10 +81,10 @@ void PictFilterTest::testDontClipTooMuch()
CPPUNIT_ASSERT (pDoc);
- assertXPath(pDoc, "/metafile/clipregion[5]"_ostr, "top"_ostr, "0");
- assertXPath(pDoc, "/metafile/clipregion[5]"_ostr, "left"_ostr, "0");
- assertXPath(pDoc, "/metafile/clipregion[5]"_ostr, "bottom"_ostr, "empty");
- assertXPath(pDoc, "/metafile/clipregion[5]"_ostr, "right"_ostr, "empty");
+ assertXPath(pDoc, "/metafile/clipregion[5]"_ostr, "top"_ostr, u"0"_ustr);
+ assertXPath(pDoc, "/metafile/clipregion[5]"_ostr, "left"_ostr, u"0"_ustr);
+ assertXPath(pDoc, "/metafile/clipregion[5]"_ostr, "bottom"_ostr, u"empty"_ustr);
+ assertXPath(pDoc, "/metafile/clipregion[5]"_ostr, "right"_ostr, u"empty"_ustr);
}
CPPUNIT_TEST_SUITE_REGISTRATION(PictFilterTest);
diff --git a/vcl/qa/cppunit/graphicfilter/filters-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
index e065cf6b5d09..343ae0a62775 100644
--- a/vcl/qa/cppunit/graphicfilter/filters-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-test.cxx
@@ -113,9 +113,9 @@ void VclFiltersTest::checkExportImport(std::u16string_view aFilterShortName)
aStream.SetVersion( SOFFICE_FILEFORMAT_CURRENT );
css::uno::Sequence< css::beans::PropertyValue > aFilterData{
- comphelper::makePropertyValue("Interlaced", sal_Int32(0)),
- comphelper::makePropertyValue("Compression", sal_Int32(1)),
- comphelper::makePropertyValue("Quality", sal_Int32(90))
+ comphelper::makePropertyValue(u"Interlaced"_ustr, sal_Int32(0)),
+ comphelper::makePropertyValue(u"Compression"_ustr, sal_Int32(1)),
+ comphelper::makePropertyValue(u"Quality"_ustr, sal_Int32(90))
};
sal_uInt16 aFilterType = mpGraphicFilter->GetExportFormatNumberForShortName(aFilterShortName);
diff --git a/vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx
index 4e7585398e19..0f96717c7a1c 100644
--- a/vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx
@@ -231,7 +231,7 @@ void TiffFilterTest::testRoundtrip()
}
aStream.Seek(STREAM_SEEK_TO_BEGIN);
- vcl::GraphicFormatDetector aDetector(aStream, "");
+ vcl::GraphicFormatDetector aDetector(aStream, u""_ustr);
CPPUNIT_ASSERT_EQUAL(true, aDetector.detect());
CPPUNIT_ASSERT_EQUAL(true, aDetector.checkTIF());
diff --git a/vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx
index cbc23315ca30..7c2c88a983ca 100644
--- a/vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx
@@ -108,8 +108,8 @@ void WebpFilterTest::testRoundtrip(bool lossy)
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
sal_uInt16 nFilterFormat = rFilter.GetExportFormatNumberForShortName(u"webp");
css::uno::Sequence<css::beans::PropertyValue> aFilterData{
- comphelper::makePropertyValue("Lossless", !lossy),
- comphelper::makePropertyValue("Quality", sal_Int32(100))
+ comphelper::makePropertyValue(u"Lossless"_ustr, !lossy),
+ comphelper::makePropertyValue(u"Quality"_ustr, sal_Int32(100))
};
rFilter.ExportGraphic(Graphic(aBitmapEx), u"none", aStream, nFilterFormat, &aFilterData);
aStream.Seek(STREAM_SEEK_TO_BEGIN);
@@ -148,7 +148,7 @@ void WebpFilterTest::testRoundtrip(bool lossy)
}
aStream.Seek(STREAM_SEEK_TO_BEGIN);
- vcl::GraphicFormatDetector aDetector(aStream, "");
+ vcl::GraphicFormatDetector aDetector(aStream, u""_ustr);
CPPUNIT_ASSERT_EQUAL(true, aDetector.detect());
CPPUNIT_ASSERT_EQUAL(true, aDetector.checkWEBP());
diff --git a/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx b/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx
index c20dd9e8bcdb..875be15e7e9d 100644
--- a/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx
+++ b/vcl/qa/cppunit/jpeg/JpegWriterTest.cxx
@@ -64,7 +64,7 @@ BitmapEx JpegWriterTest::roundtripJPG(const BitmapEx& bitmap)
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
//Detect the magic bytes - we need to be sure the file is actually a JPEG
aStream.Seek(0);
- vcl::GraphicFormatDetector aDetector(aStream, "");
+ vcl::GraphicFormatDetector aDetector(aStream, u""_ustr);
CPPUNIT_ASSERT(aDetector.detect());
CPPUNIT_ASSERT(aDetector.checkJPG());
// IMPORT JPEG
diff --git a/vcl/qa/cppunit/logicalfontinstance.cxx b/vcl/qa/cppunit/logicalfontinstance.cxx
index eb803ed40363..a25bbfc174dd 100644
--- a/vcl/qa/cppunit/logicalfontinstance.cxx
+++ b/vcl/qa/cppunit/logicalfontinstance.cxx
@@ -39,7 +39,7 @@ void VclLogicalFontInstanceTest::testglyphboundrect()
{
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
- vcl::Font font("Liberation Sans", Size(0, 110));
+ vcl::Font font(u"Liberation Sans"_ustr, Size(0, 110));
device->SetFont(font);
const LogicalFontInstance* pFontInstance = device->GetFontInstance();
diff --git a/vcl/qa/cppunit/mnemonic.cxx b/vcl/qa/cppunit/mnemonic.cxx
index 9b6ce7d073ac..fe58ddbe5493 100644
--- a/vcl/qa/cppunit/mnemonic.cxx
+++ b/vcl/qa/cppunit/mnemonic.cxx
@@ -62,7 +62,7 @@ void VclMnemonicTest::testMnemonic()
{
static constexpr OUString TEST = u"\u4E00"_ustr;
OUString sResult = aGenerator.CreateMnemonic(TEST);
- CPPUNIT_ASSERT_EQUAL(OUString("(~C)"), sResult.copy(sResult.getLength() - 4));
+ CPPUNIT_ASSERT_EQUAL(u"(~C)"_ustr, sResult.copy(sResult.getLength() - 4));
sResult = MnemonicGenerator::EraseAllMnemonicChars(sResult);
CPPUNIT_ASSERT_EQUAL(TEST, sResult);
}
@@ -71,56 +71,60 @@ void VclMnemonicTest::testMnemonic()
void VclMnemonicTest::testRemoveMnemonicFromString()
{
sal_Int32 nMnemonicIndex;
- OUString sNonMnemonicString = removeMnemonicFromString("this is a ~test", nMnemonicIndex);
- CPPUNIT_ASSERT_EQUAL(OUString("this is a test"), sNonMnemonicString);
+ OUString sNonMnemonicString = removeMnemonicFromString(u"this is a ~test"_ustr, nMnemonicIndex);
+ CPPUNIT_ASSERT_EQUAL(u"this is a test"_ustr, sNonMnemonicString);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(10), nMnemonicIndex);
}
void VclMnemonicTest::testRemoveDoubleMarkedMnemonicFromString()
{
sal_Int32 nMnemonicIndex;
- OUString sNonMnemonicString = removeMnemonicFromString("this ~~is a test", nMnemonicIndex);
- CPPUNIT_ASSERT_EQUAL(OUString("this ~is a test"), sNonMnemonicString);
+ OUString sNonMnemonicString
+ = removeMnemonicFromString(u"this ~~is a test"_ustr, nMnemonicIndex);
+ CPPUNIT_ASSERT_EQUAL(u"this ~is a test"_ustr, sNonMnemonicString);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-1), nMnemonicIndex);
}
void VclMnemonicTest::testRemoveMultipleMnemonicsFromString()
{
sal_Int32 nMnemonicIndex;
- OUString sNonMnemonicString = removeMnemonicFromString("t~his is a ~test", nMnemonicIndex);
- CPPUNIT_ASSERT_EQUAL(OUString("this is a test"), sNonMnemonicString);
+ OUString sNonMnemonicString
+ = removeMnemonicFromString(u"t~his is a ~test"_ustr, nMnemonicIndex);
+ CPPUNIT_ASSERT_EQUAL(u"this is a test"_ustr, sNonMnemonicString);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nMnemonicIndex);
}
void VclMnemonicTest::testRemoveDoubleMarkingsThenMnemonicFromString()
{
sal_Int32 nMnemonicIndex;
- OUString sNonMnemonicString = removeMnemonicFromString("t~~his is a ~test", nMnemonicIndex);
- CPPUNIT_ASSERT_EQUAL(OUString("t~his is a test"), sNonMnemonicString);
+ OUString sNonMnemonicString
+ = removeMnemonicFromString(u"t~~his is a ~test"_ustr, nMnemonicIndex);
+ CPPUNIT_ASSERT_EQUAL(u"t~his is a test"_ustr, sNonMnemonicString);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(11), nMnemonicIndex);
}
void VclMnemonicTest::testRemoveMnemonicThenDoubleMarkingsFromString()
{
sal_Int32 nMnemonicIndex;
- OUString sNonMnemonicString = removeMnemonicFromString("t~his is a ~~test", nMnemonicIndex);
- CPPUNIT_ASSERT_EQUAL(OUString("this is a ~test"), sNonMnemonicString);
+ OUString sNonMnemonicString
+ = removeMnemonicFromString(u"t~his is a ~~test"_ustr, nMnemonicIndex);
+ CPPUNIT_ASSERT_EQUAL(u"this is a ~test"_ustr, sNonMnemonicString);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), nMnemonicIndex);
}
void VclMnemonicTest::testRemoveMnemonicFromEndOfString()
{
sal_Int32 nMnemonicIndex;
- OUString sNonMnemonicString = removeMnemonicFromString("this is a test~", nMnemonicIndex);
- CPPUNIT_ASSERT_EQUAL(OUString("this is a test~"), sNonMnemonicString);
+ OUString sNonMnemonicString = removeMnemonicFromString(u"this is a test~"_ustr, nMnemonicIndex);
+ CPPUNIT_ASSERT_EQUAL(u"this is a test~"_ustr, sNonMnemonicString);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-1), nMnemonicIndex);
}
void VclMnemonicTest::testRemoveNoMnemonicFromString()
{
sal_Int32 nMnemonicIndex;
- OUString sNonMnemonicString = removeMnemonicFromString("this is a test", nMnemonicIndex);
- CPPUNIT_ASSERT_EQUAL(OUString("this is a test"), sNonMnemonicString);
+ OUString sNonMnemonicString = removeMnemonicFromString(u"this is a test"_ustr, nMnemonicIndex);
+ CPPUNIT_ASSERT_EQUAL(u"this is a test"_ustr, sNonMnemonicString);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-1), nMnemonicIndex);
}
diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx
index 491869f8af0d..9fc9ec533a2a 100644
--- a/vcl/qa/cppunit/outdev.cxx
+++ b/vcl/qa/cppunit/outdev.cxx
@@ -610,7 +610,7 @@ CPPUNIT_TEST_FIXTURE(VclOutdevTest, testFont)
// Use Dejavu fonts, they are shipped with LO, so they should be ~always available.
// Use Sans variant for simpler glyph shapes (no serifs).
- vcl::Font font("DejaVu Sans", "Book", Size(0, 36));
+ vcl::Font font(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 36));
font.SetColor(COL_BLACK);
font.SetFillColor(COL_RED);
@@ -657,7 +657,7 @@ CPPUNIT_TEST_FIXTURE(VclOutdevTest, testTransparentFont)
// Use Dejavu fonts, they are shipped with LO, so they should be ~always available.
// Use Sans variant for simpler glyph shapes (no serifs).
- vcl::Font font("DejaVu Sans", "Book", Size(0, 36));
+ vcl::Font font(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 36));
font.SetColor(COL_TRANSPARENT);
GDIMetaFile aMtf;
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index e9a8530c3cce..50a4f7041017 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -39,7 +39,7 @@ protected:
public:
PdfExportTest()
- : UnoApiTest("/vcl/qa/cppunit/pdfexport/data/")
+ : UnoApiTest(u"/vcl/qa/cppunit/pdfexport/data/"_ustr)
{
}
@@ -59,10 +59,10 @@ void PdfExportTest::saveAsPDF(std::u16string_view rFile)
void PdfExportTest::load(std::u16string_view rFile, vcl::filter::PDFDocument& rDocument,
bool bUseTaggedPDF)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "UseTaggedPDF", uno::Any(bUseTaggedPDF) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(rFile);
// Parse the export result.
@@ -74,11 +74,11 @@ void PdfExportTest::load(std::u16string_view rFile, vcl::filter::PDFDocument& rD
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106059)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Explicitly enable the usage of the reference XObject markup.
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "UseReferenceXObject", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"tdf106059.odt");
// Parse the export result.
@@ -155,7 +155,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106693)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf105461)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf105461.odp");
// Parse the export result with pdfium.
@@ -311,7 +311,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106206)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf127217)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf127217.odt");
// Parse the export result with pdfium.
@@ -549,7 +549,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf107018)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf148706)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf148706.odt");
// Parse the export result with pdfium.
@@ -571,13 +571,13 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf148706)
// Without the fix in place, this test would have failed with
// - Expected: 1821.84
// - Actual :
- CPPUNIT_ASSERT_EQUAL(OUString("1821.84"), aV);
+ CPPUNIT_ASSERT_EQUAL(u"1821.84"_ustr, aV);
CPPUNIT_ASSERT(pAnnot->hasKey("DV"_ostr));
CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFObjectType::String, pAnnot->getValueType("DV"_ostr));
OUString aDV = pAnnot->getString("DV"_ostr);
- CPPUNIT_ASSERT_EQUAL(OUString("1821.84"), aDV);
+ CPPUNIT_ASSERT_EQUAL(u"1821.84"_ustr, aDV);
}
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf107089)
@@ -714,7 +714,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf99680_2)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf108963)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf108963.odp");
// Parse the export result with pdfium.
@@ -791,11 +791,11 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf108963)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testAlternativeText)
{
- aMediaDescriptor["FilterName"] <<= OUString("impress_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"impress_pdf_Export"_ustr;
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "UseTaggedPDF", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"alternativeText.fodp");
// Parse the export result.
@@ -1136,7 +1136,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115117_1a)
{
#if HAVE_MORE_FONTS
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf115117-1.odt");
// Parse the export result with pdfium.
@@ -1160,7 +1160,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115117_1a)
for (int i = 0; i < nChars; i++)
aChars[i] = pPdfTextPage->getUnicode(i);
OUString aActualText(aChars.data(), aChars.size());
- CPPUNIT_ASSERT_EQUAL(OUString("ti ti test ti\r\nti test fi fl ffi ffl test fi"), aActualText);
+ CPPUNIT_ASSERT_EQUAL(u"ti ti test ti\r\nti test fi fl ffi ffl test fi"_ustr, aActualText);
#endif
}
@@ -1171,7 +1171,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115117_2a)
// See the comments in testTdf115117_1a() for explanation.
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf115117-2.odt");
// Parse the export result with pdfium.
@@ -1201,7 +1201,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf154549)
{
// FIXME: On Windows, the number of chars is 4 instead of 3
#ifndef _WIN32
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf154549.odt");
// Parse the export result with pdfium.
@@ -1234,7 +1234,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf150846)
{
// Without the fix in place, this test would have failed with
// An uncaught exception of type com.sun.star.io.IOException
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf150846.txt");
// Parse the export result with pdfium.
@@ -1261,7 +1261,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf150846)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf103492)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf103492.odt");
// Parse the export result with pdfium.
@@ -1308,7 +1308,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf103492)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf145274)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf145274.docx");
// Parse the export result with pdfium.
@@ -1343,7 +1343,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf145274)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf156685)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf156685.docx");
// Parse the export result with pdfium.
@@ -1666,11 +1666,11 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_3)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf105954)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
uno::Sequence<beans::PropertyValue> aFilterData(comphelper::InitPropertySequence(
{ { "ReduceImageResolution", uno::Any(true) },
{ "MaxImageResolution", uno::Any(static_cast<sal_Int32>(300)) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"tdf105954.odt");
// Parse the export result with pdfium.
@@ -1696,7 +1696,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf105954)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157679)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("impress_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"impress_pdf_Export"_ustr;
saveAsPDF(u"tdf157679.pptx");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
@@ -1724,7 +1724,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157679)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf128445)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("impress_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"impress_pdf_Export"_ustr;
saveAsPDF(u"tdf128445.odp");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
@@ -1748,7 +1748,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf128630)
return;
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("impress_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"impress_pdf_Export"_ustr;
saveAsPDF(u"tdf128630.odp");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
@@ -1781,7 +1781,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf128630)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106702)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf106702.odt");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
@@ -1828,7 +1828,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106702)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf113143)
{
- aMediaDescriptor["FilterName"] <<= OUString("impress_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"impress_pdf_Export"_ustr;
uno::Sequence<beans::PropertyValue> aFilterData(comphelper::InitPropertySequence({
{ "ExportNotesPages", uno::Any(true) },
// ReduceImageResolution is on by default and that hides the bug we
@@ -1837,7 +1837,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf113143)
// Set a custom PDF version.
{ "SelectPdfVersion", uno::Any(static_cast<sal_Int32>(16)) },
}));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"tdf113143.odp");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
@@ -1888,34 +1888,34 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf113143)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testForcePoint71)
{
// I just care it doesn't crash
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"forcepoint71.key");
}
CPPUNIT_TEST_FIXTURE(PdfExportTest, testForcePoint80)
{
// printing asserted in SwCellFrame::FindStartEndOfRowSpanCell
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"forcepoint80-1.rtf");
}
CPPUNIT_TEST_FIXTURE(PdfExportTest, testForcePoint3)
{
// printing asserted in SwFrame::GetNextSctLeaf()
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"flowframe_null_ptr_deref.sample");
}
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf84283)
{
// Without the fix in place, this test would have crashed
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf84283.doc");
}
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115262)
{
- aMediaDescriptor["FilterName"] <<= OUString("calc_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"calc_pdf_Export"_ustr;
saveAsPDF(u"tdf115262.ods");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
CPPUNIT_ASSERT_EQUAL(8, pPdfDocument->getPageCount());
@@ -1954,7 +1954,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115262)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf121962)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf121962.odt");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
@@ -1978,7 +1978,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf121962)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf139065)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf139065.odt");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
@@ -1993,12 +1993,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf139065)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157816)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"tdf157816.fodt");
vcl::filter::PDFDocument aDocument;
@@ -2393,12 +2393,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157816)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157816Link)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"LinkWithFly.fodt");
vcl::filter::PDFDocument aDocument;
@@ -2777,12 +2777,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf142133)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf142806)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"LinkPages.fodt");
vcl::filter::PDFDocument aDocument;
@@ -3384,7 +3384,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf142806)
CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115967)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf115967.odt");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
@@ -3406,7 +3406,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115967)
OUString sChar = pPageObject->getText(pTextPage);
sText += o3tl::trim(sChar);
}
- CPPUNIT_ASSERT_EQUAL(OUString("m=750abc"), sText);
+ CPPUNIT_ASSERT_EQUAL(u"m=750abc"_ustr, sText);
}
} // end anonymous namespace
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
index 96e34cc8c208..b4f561ba23e0 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
@@ -61,7 +61,7 @@ protected:
public:
PdfExportTest2()
- : UnoApiTest("/vcl/qa/cppunit/pdfexport/data/")
+ : UnoApiTest(u"/vcl/qa/cppunit/pdfexport/data/"_ustr)
{
}
@@ -81,10 +81,10 @@ void PdfExportTest2::saveAsPDF(std::u16string_view rFile)
void PdfExportTest2::load(std::u16string_view rFile, vcl::filter::PDFDocument& rDocument,
bool bUseTaggedPDF)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "UseTaggedPDF", uno::Any(bUseTaggedPDF) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(rFile);
// Parse the export result.
@@ -289,7 +289,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTocLink)
xToc->refresh();
// Save as PDF.
- save("writer_pdf_Export");
+ save(u"writer_pdf_Export"_ustr);
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
@@ -306,7 +306,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTocLink)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testReduceSmallImage)
{
// Load the Writer document.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"reduce-small-image.fodt");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
@@ -331,7 +331,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testReduceSmallImage)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf114256)
{
- aMediaDescriptor["FilterName"] <<= OUString("calc_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"calc_pdf_Export"_ustr;
saveAsPDF(u"tdf114256.ods");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
@@ -346,7 +346,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf114256)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf150931)
{
- aMediaDescriptor["FilterName"] <<= OUString("calc_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"calc_pdf_Export"_ustr;
saveAsPDF(u"tdf150931.ods");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
@@ -396,7 +396,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf147027)
return;
// Load the Calc document.
- aMediaDescriptor["FilterName"] <<= OUString("calc_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"calc_pdf_Export"_ustr;
saveAsPDF(u"tdf147027.ods");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
@@ -412,7 +412,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf147027)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf135346)
{
// Load the Calc document.
- aMediaDescriptor["FilterName"] <<= OUString("calc_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"calc_pdf_Export"_ustr;
saveAsPDF(u"tdf135346.ods");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
@@ -427,7 +427,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf135346)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf147164)
{
- aMediaDescriptor["FilterName"] <<= OUString("impress_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"impress_pdf_Export"_ustr;
saveAsPDF(u"tdf147164.odp");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
CPPUNIT_ASSERT_EQUAL(2, pPdfDocument->getPageCount());
@@ -448,7 +448,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testReduceImage)
// Save as PDF.
uno::Reference<css::lang::XMultiServiceFactory> xFactory = getMultiServiceFactory();
uno::Reference<document::XFilter> xFilter(
- xFactory->createInstance("com.sun.star.document.PDFFilter"), uno::UNO_QUERY);
+ xFactory->createInstance(u"com.sun.star.document.PDFFilter"_ustr), uno::UNO_QUERY);
uno::Reference<document::XExporter> xExporter(xFilter, uno::UNO_QUERY);
xExporter->setSourceDocument(mxComponent);
@@ -460,7 +460,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testReduceImage)
// This is intentionally in an "unlucky" order, output stream comes before filter data.
uno::Sequence<beans::PropertyValue> aDescriptor(comphelper::InitPropertySequence({
- { "FilterName", uno::Any(OUString("writer_pdf_Export")) },
+ { "FilterName", uno::Any(u"writer_pdf_Export"_ustr) },
{ "OutputStream", uno::Any(xOutputStream) },
{ "FilterData", uno::Any(aFilterData) },
}));
@@ -492,7 +492,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testReduceImage)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testLinkWrongPage)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("impress_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"impress_pdf_Export"_ustr;
saveAsPDF(u"link-wrong-page.odp");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
@@ -518,10 +518,10 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testLinkWrongPagePartial)
// Given a Draw document with 3 pages, a link on the 2nd page:
// When exporting that the 2nd and 3rd page to pdf:
uno::Sequence<beans::PropertyValue> aFilterData = {
- comphelper::makePropertyValue("PageRange", OUString("2-3")),
+ comphelper::makePropertyValue(u"PageRange"_ustr, u"2-3"_ustr),
};
- aMediaDescriptor["FilterName"] <<= OUString("draw_pdf_Export");
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"draw_pdf_Export"_ustr;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"link-wrong-page-partial.odg");
// Then make sure the we have a link on the 1st page, but not on the 2nd one:
@@ -541,9 +541,9 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPageRange)
{
// Given a document with 3 pages:
// When exporting that document to PDF, skipping the first page:
- aMediaDescriptor["FilterName"] <<= OUString("draw_pdf_Export");
- aMediaDescriptor["FilterOptions"]
- <<= OUString("{\"PageRange\":{\"type\":\"string\",\"value\":\"2-\"}}");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"draw_pdf_Export"_ustr;
+ aMediaDescriptor[u"FilterOptions"_ustr]
+ <<= u"{\"PageRange\":{\"type\":\"string\",\"value\":\"2-\"}}"_ustr;
saveAsPDF(u"link-wrong-page-partial.odg");
// Then make sure the resulting PDF has 2 pages:
@@ -558,7 +558,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPageRange)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testLargePage)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("draw_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"draw_pdf_Export"_ustr;
saveAsPDF(u"6m-wide.odg");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
@@ -576,7 +576,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testLargePage)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageResourceInlineXObjectRef)
{
// Create an empty document.
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
@@ -584,9 +584,9 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageResourceInlineXObjectRef)
// Insert the PDF image.
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xGraphicObject(
- xFactory->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY);
+ xFactory->createInstance(u"com.sun.star.text.TextGraphicObject"_ustr), uno::UNO_QUERY);
OUString aURL = createFileURL(u"pdf-image-resource-inline-xobject-ref.pdf");
- xGraphicObject->setPropertyValue("GraphicURL", uno::Any(aURL));
+ xGraphicObject->setPropertyValue(u"GraphicURL"_ustr, uno::Any(aURL));
uno::Reference<drawing::XShape> xShape(xGraphicObject, uno::UNO_QUERY);
xShape->setSize(awt::Size(1000, 1000));
uno::Reference<text::XTextContent> xTextContent(xGraphicObject, uno::UNO_QUERY);
@@ -594,7 +594,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageResourceInlineXObjectRef)
// Save as PDF.
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
// Parse the export result.
@@ -641,11 +641,11 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageResourceInlineXObjectRef)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testDefaultVersion)
{
// Create an empty document.
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
// Save as PDF.
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
// Parse the export result.
@@ -657,14 +657,14 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testDefaultVersion)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testVersion15)
{
// Create an empty document.
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
// Save as PDF.
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aFilterData(comphelper::InitPropertySequence(
{ { "SelectPdfVersion", uno::Any(static_cast<sal_Int32>(15)) } }));
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
// Parse the export result.
@@ -813,7 +813,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testMultiPagePDF)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testFormFontName)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"form-font-name.odt");
// Parse the export result with pdfium.
@@ -838,7 +838,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testFormFontName)
// - Actual : 0 0 0 rg /F2 12 Tf
// i.e. Liberation Serif was exposed as a form font as-is, without picking the closest built-in
// font.
- CPPUNIT_ASSERT_EQUAL(OUString("0 0 0 rg /TiRo 12 Tf"), aDA);
+ CPPUNIT_ASSERT_EQUAL(u"0 0 0 rg /TiRo 12 Tf"_ustr, aDA);
}
// Check we don't have duplicated objects when we reexport the PDF multiple
@@ -1188,12 +1188,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testReexportDocumentWithComplexResources)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfUaMetadata)
{
// Import a basic document (document doesn't really matter)
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"BrownFoxLazyDog.odt");
// Parse the export result.
@@ -1266,13 +1266,13 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfUaMetadata)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf139736)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) },
{ "SelectPdfVersion", uno::Any(sal_Int32(17)) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"tdf139736-1.odt");
vcl::filter::PDFDocument aDocument;
@@ -1372,14 +1372,14 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf139736)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf152231)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) },
{ "ExportNotesInMargin", uno::Any(true) },
{ "SelectPdfVersion", uno::Any(sal_Int32(17)) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"tdf152231.fodt");
vcl::filter::PDFDocument aDocument;
@@ -1482,16 +1482,16 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf152231)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf152235)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(comphelper::InitPropertySequence(
{ { "PDFUACompliance", uno::Any(true) },
- { "Watermark", uno::Any(OUString("kendy")) },
+ { "Watermark", uno::Any(u"kendy"_ustr) },
// need to set a font to avoid assertions about missing "Helvetica"
- { "WatermarkFontName", uno::Any(OUString("Liberation Sans")) },
+ { "WatermarkFontName", uno::Any(u"Liberation Sans"_ustr) },
{ "SelectPdfVersion", uno::Any(sal_Int32(17)) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
- mxComponent = loadFromDesktop("private:factory/swriter");
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
@@ -1572,12 +1572,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf152235)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf149140)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"TableTH_test_LibreOfficeWriter7.3.3_HeaderRow-HeadersInTopRow.fodt");
vcl::filter::PDFDocument aDocument;
@@ -1630,12 +1630,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf149140)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testNestedSection)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"nestedsection.fodt");
vcl::filter::PDFDocument aDocument;
@@ -1775,12 +1775,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testNestedSection)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf157817)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"SimpleTOC.fodt");
vcl::filter::PDFDocument aDocument;
@@ -1948,12 +1948,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf157817)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf135638)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"image-shape.fodt");
vcl::filter::PDFDocument aDocument;
@@ -2042,12 +2042,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf135638)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf157703)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"LO_Lbl_Lbody_bug_report.fodt");
vcl::filter::PDFDocument aDocument;
@@ -2120,12 +2120,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf157703)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testSpans)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"spanlist.fodt");
vcl::filter::PDFDocument aDocument;
@@ -2636,14 +2636,14 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testSpans)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf157182)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
uno::Sequence<beans::PropertyValue> aFilterData(comphelper::InitPropertySequence({
{ "PDFUACompliance", uno::Any(true) },
// only happens with PDF/A-1
{ "SelectPdfVersion", uno::Any(static_cast<sal_Int32>(1)) },
}));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"transparentshape.fodp");
@@ -2652,12 +2652,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf157182)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf57423)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"Description PDF Export test .odt");
vcl::filter::PDFDocument aDocument;
@@ -2755,12 +2755,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf57423)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf154982)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"tdf154982.odt");
vcl::filter::PDFDocument aDocument;
@@ -2833,12 +2833,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf154982)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf157397)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"PDF_export_with_formcontrol.fodt");
vcl::filter::PDFDocument aDocument;
@@ -3162,12 +3162,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf157397)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf135192)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"tdf135192-1.fodp");
vcl::filter::PDFDocument aDocument;
@@ -3293,12 +3293,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf135192)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf154955)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"grouped-shape.fodt");
vcl::filter::PDFDocument aDocument;
@@ -3426,12 +3426,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf154955)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf155190)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"tdf155190.odt");
@@ -3494,7 +3494,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf155190)
auto pAlt = dynamic_cast<vcl::filter::PDFHexStringElement*>(
pObject3->Lookup("Alt"_ostr));
CPPUNIT_ASSERT_EQUAL(
- OUString("Picture of apples"),
+ u"Picture of apples"_ustr,
::vcl::filter::PDFDocument::DecodeHexStringUTF16BE(*pAlt));
auto pKids3 = dynamic_cast<vcl::filter::PDFArrayElement*>(
pObject3->Lookup("K"_ostr));
@@ -3515,12 +3515,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf155190)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testMediaShapeAnnot)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"vid.odt");
@@ -3562,14 +3562,14 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testMediaShapeAnnot)
CPPUNIT_ASSERT(pD);
auto pDesc = dynamic_cast<vcl::filter::PDFHexStringElement*>(pD->LookupElement("Desc"_ostr));
CPPUNIT_ASSERT(pDesc);
- CPPUNIT_ASSERT_EQUAL(OUString("alternativloser text\nand some description"),
+ CPPUNIT_ASSERT_EQUAL(u"alternativloser text\nand some description"_ustr,
::vcl::filter::PDFDocument::DecodeHexStringUTF16BE(*pDesc));
auto pAlt = dynamic_cast<vcl::filter::PDFArrayElement*>(pC->LookupElement("Alt"_ostr));
CPPUNIT_ASSERT(pAlt);
auto pLang = dynamic_cast<vcl::filter::PDFLiteralStringElement*>(pAlt->GetElement(0));
CPPUNIT_ASSERT_EQUAL(""_ostr, pLang->GetValue());
auto pAltText = dynamic_cast<vcl::filter::PDFHexStringElement*>(pAlt->GetElement(1));
- CPPUNIT_ASSERT_EQUAL(OUString("alternativloser text\nand some description"),
+ CPPUNIT_ASSERT_EQUAL(u"alternativloser text\nand some description"_ustr,
::vcl::filter::PDFDocument::DecodeHexStringUTF16BE(*pAltText));
auto pStructParent
@@ -3624,7 +3624,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testMediaShapeAnnot)
auto pS = dynamic_cast<vcl::filter::PDFNameElement*>(pStructElem->Lookup("S"_ostr));
CPPUNIT_ASSERT_EQUAL("Annot"_ostr, pS->GetValue());
auto pSEAlt = dynamic_cast<vcl::filter::PDFHexStringElement*>(pStructElem->Lookup("Alt"_ostr));
- CPPUNIT_ASSERT_EQUAL(OUString("alternativloser text - and some description"),
+ CPPUNIT_ASSERT_EQUAL(u"alternativloser text - and some description"_ustr,
::vcl::filter::PDFDocument::DecodeHexStringUTF16BE(*pSEAlt));
auto pKids = dynamic_cast<vcl::filter::PDFArrayElement*>(pStructElem->Lookup("K"_ostr));
int nMCID(0);
@@ -3654,12 +3654,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testMediaShapeAnnot)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testFlyFrameHyperlinkAnnot)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"image-hyperlink-alttext.fodt");
@@ -3691,7 +3691,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testFlyFrameHyperlinkAnnot)
auto pContents
= dynamic_cast<vcl::filter::PDFHexStringElement*>(pAnnot->Lookup("Contents"_ostr));
- CPPUNIT_ASSERT_EQUAL(OUString("Image2"),
+ CPPUNIT_ASSERT_EQUAL(u"Image2"_ustr,
::vcl::filter::PDFDocument::DecodeHexStringUTF16BE(*pContents));
auto pStructParent
@@ -3781,18 +3781,18 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testFlyFrameHyperlinkAnnot)
auto pParentS = dynamic_cast<vcl::filter::PDFNameElement*>(pParent->Lookup("S"_ostr));
CPPUNIT_ASSERT_EQUAL("Figure"_ostr, pParentS->GetValue());
auto pAlt = dynamic_cast<vcl::filter::PDFHexStringElement*>(pParent->Lookup("Alt"_ostr));
- CPPUNIT_ASSERT_EQUAL(OUString("Ship drawing - Very cute"),
+ CPPUNIT_ASSERT_EQUAL(u"Ship drawing - Very cute"_ustr,
::vcl::filter::PDFDocument::DecodeHexStringUTF16BE(*pAlt));
}
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testFormControlAnnot)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "PDFUACompliance", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"formcontrol.fodt");
@@ -3826,7 +3826,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testFormControlAnnot)
CPPUNIT_ASSERT_EQUAL("Check Box 1"_ostr, pT->GetValue());
auto pTU = dynamic_cast<vcl::filter::PDFHexStringElement*>(pAnnot->Lookup("TU"_ostr));
CPPUNIT_ASSERT(pTU);
- CPPUNIT_ASSERT_EQUAL(OUString("helpful text"),
+ CPPUNIT_ASSERT_EQUAL(u"helpful text"_ustr,
::vcl::filter::PDFDocument::DecodeHexStringUTF16BE(*pTU));
auto pStructParent
@@ -3881,7 +3881,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testFormControlAnnot)
auto pS = dynamic_cast<vcl::filter::PDFNameElement*>(pStructElem->Lookup("S"_ostr));
CPPUNIT_ASSERT_EQUAL("Form"_ostr, pS->GetValue());
auto pAlt = dynamic_cast<vcl::filter::PDFHexStringElement*>(pStructElem->Lookup("Alt"_ostr));
- CPPUNIT_ASSERT_EQUAL(OUString("textuelle alternative - a box to check"),
+ CPPUNIT_ASSERT_EQUAL(u"textuelle alternative - a box to check"_ustr,
::vcl::filter::PDFDocument::DecodeHexStringUTF16BE(*pAlt));
auto pA = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pStructElem->Lookup("A"_ostr));
CPPUNIT_ASSERT(pA);
@@ -3922,15 +3922,15 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf142129)
loadFromFile(u"master.odm");
// update linked section
- dispatchCommand(mxComponent, ".uno:UpdateAllLinks", {});
+ dispatchCommand(mxComponent, u".uno:UpdateAllLinks"_ustr, {});
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable Outlines export
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "ExportBookmarks", uno::Any(true) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
// Parse the export result.
@@ -4005,7 +4005,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf142129)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageRotate180)
{
// Create an empty document.
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
@@ -4013,9 +4013,9 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageRotate180)
// Insert the PDF image.
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xGraphicObject(
- xFactory->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY);
+ xFactory->createInstance(u"com.sun.star.text.TextGraphicObject"_ustr), uno::UNO_QUERY);
OUString aURL = createFileURL(u"pdf-image-rotate-180.pdf");
- xGraphicObject->setPropertyValue("GraphicURL", uno::Any(aURL));
+ xGraphicObject->setPropertyValue(u"GraphicURL"_ustr, uno::Any(aURL));
uno::Reference<drawing::XShape> xShape(xGraphicObject, uno::UNO_QUERY);
xShape->setSize(awt::Size(1000, 1000));
uno::Reference<text::XTextContent> xTextContent(xGraphicObject, uno::UNO_QUERY);
@@ -4023,7 +4023,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageRotate180)
// Save as PDF.
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
// Parse the export result.
@@ -4107,7 +4107,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf144222)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf145873)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("impress_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"impress_pdf_Export"_ustr;
saveAsPDF(u"tdf145873.pptx");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
@@ -4141,7 +4141,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf145873)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageHyperlink)
{
// Given a Draw file, containing a PDF image, which has a hyperlink in it:
- aMediaDescriptor["FilterName"] <<= OUString("draw_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"draw_pdf_Export"_ustr;
// When saving to PDF:
saveAsPDF(u"pdf-image-hyperlink.odg");
@@ -4201,36 +4201,36 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testURIs)
OString out;
bool relativeFsys;
} URIs[] = { {
- "http://example.com/",
+ u"http://example.com/"_ustr,
"http://example.com/"_ostr,
true,
},
{
- "file://localfile.odt/",
+ u"file://localfile.odt/"_ustr,
"file://localfile.odt/"_ostr,
true,
},
{
// tdf 143216
- "http://username:password@example.com",
+ u"http://username:password@example.com"_ustr,
"http://username:password@example.com"_ostr,
true,
},
{
- "git://git.example.org/project/example",
+ u"git://git.example.org/project/example"_ustr,
"git://git.example.org/project/example"_ostr,
true,
},
{
// The odt/pdf gets substituted due to 'ConvertOOoTargetToPDFTarget'
- "filebypath.odt",
+ u"filebypath.odt"_ustr,
"filebypath.pdf"_ostr,
true,
},
{
// The odt/pdf gets substituted due to 'ConvertOOoTargetToPDFTarget'
// but this time with ExportLinksRelativeFsys off the path is added
- "filebypath.odt",
+ u"filebypath.odt"_ustr,
OUStringToOString(utl::GetTempNameBaseDirectory(), RTL_TEXTENCODING_UTF8)
+ "filebypath.pdf",
false,
@@ -4245,11 +4245,11 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testURIs)
// Create an empty document.
// Note: The test harness gets very upset if we try and create multiple
// documents, or recreate it; so reuse one instance for all the links
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
- xText->insertString(xCursor, "Test pdf", /*bAbsorb=*/false);
+ xText->insertString(xCursor, u"Test pdf"_ustr, /*bAbsorb=*/false);
// Set the name so it can do relative name replacement
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
@@ -4262,17 +4262,17 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testURIs)
{ "ExportLinksRelativeFsys", uno::Any(URIs[i].relativeFsys) },
{ "ConvertOOoTargetToPDFTarget", uno::Any(true) },
}));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
// Add a link (based on testNestedHyperlink in rtfexport3)
xCursor->gotoStart(/*bExpand=*/false);
xCursor->gotoEnd(/*bExpand=*/true);
uno::Reference<beans::XPropertySet> xCursorProps(xCursor, uno::UNO_QUERY);
- xCursorProps->setPropertyValue("HyperLinkURL", uno::Any(URIs[i].in));
+ xCursorProps->setPropertyValue(u"HyperLinkURL"_ustr, uno::Any(URIs[i].in));
// Save as PDF.
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
// Use the filter rather than the pdfium route, as per the tdf105093 test, it's
@@ -4312,17 +4312,16 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testURIs)
// Check it matches
CPPUNIT_ASSERT_EQUAL(URIs[i].out, pURIElem->GetValue());
// tdf#148934 check a11y
- CPPUNIT_ASSERT_EQUAL(
- OUString("Test pdf"),
- ::vcl::filter::PDFDocument::DecodeHexStringUTF16BE(
- *dynamic_cast<vcl::filter::PDFHexStringElement*>(pAnnot->Lookup("Contents"_ostr))));
+ CPPUNIT_ASSERT_EQUAL(u"Test pdf"_ustr, ::vcl::filter::PDFDocument::DecodeHexStringUTF16BE(
+ *dynamic_cast<vcl::filter::PDFHexStringElement*>(
+ pAnnot->Lookup("Contents"_ostr))));
}
}
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageAnnots)
{
// Given a document with a PDF image that has 2 comments (popup, text) and a hyperlink:
- aMediaDescriptor["FilterName"] <<= OUString("draw_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"draw_pdf_Export"_ustr;
// When saving to PDF:
saveAsPDF(u"pdf-image-annots.odg");
@@ -4341,15 +4340,15 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageAnnots)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageEncryption)
{
// Given an empty document, with an inserted PDF image:
- mxComponent = loadFromDesktop("private:factory/swriter");
+ mxComponent = loadFromDesktop(u"private:factory/swriter"_ustr);
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextDocument->getText();
uno::Reference<text::XTextCursor> xCursor = xText->createTextCursor();
uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xGraphicObject(
- xFactory->createInstance("com.sun.star.text.TextGraphicObject"), uno::UNO_QUERY);
+ xFactory->createInstance(u"com.sun.star.text.TextGraphicObject"_ustr), uno::UNO_QUERY);
OUString aURL = createFileURL(u"rectangles.pdf");
- xGraphicObject->setPropertyValue("GraphicURL", uno::Any(aURL));
+ xGraphicObject->setPropertyValue(u"GraphicURL"_ustr, uno::Any(aURL));
uno::Reference<drawing::XShape> xShape(xGraphicObject, uno::UNO_QUERY);
xShape->setSize(awt::Size(1000, 1000));
uno::Reference<text::XTextContent> xTextContent(xGraphicObject, uno::UNO_QUERY);
@@ -4357,12 +4356,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testPdfImageEncryption)
// When saving as encrypted PDF:
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
uno::Sequence<beans::PropertyValue> aFilterData = {
- comphelper::makePropertyValue("EncryptFile", true),
- comphelper::makePropertyValue("DocumentOpenPassword", OUString("secret")),
+ comphelper::makePropertyValue(u"EncryptFile"_ustr, true),
+ comphelper::makePropertyValue(u"DocumentOpenPassword"_ustr, u"secret"_ustr),
};
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
// Then make sure that the image is not lost:
@@ -4389,7 +4388,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testBitmapScaledown)
return;
// Given a document with an upscaled and rotated barcode bitmap in it:
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// When saving as PDF:
saveAsPDF(u"bitmap-scaledown.odt");
@@ -4421,7 +4420,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testBitmapScaledown)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf139627)
{
#if HAVE_MORE_FONTS
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"justified-arabic-kashida.odt");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
@@ -4498,11 +4497,11 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testRexportRefToKids)
if (getenv("LO_IMPORT_USE_PDFIUM") == nullptr)
{
bResetEnvVar = true;
- osl_setEnvironment(OUString("LO_IMPORT_USE_PDFIUM").pData, OUString("1").pData);
+ osl_setEnvironment(u"LO_IMPORT_USE_PDFIUM"_ustr.pData, u"1"_ustr.pData);
}
comphelper::ScopeGuard aPDFiumEnvVarGuard([&]() {
if (bResetEnvVar)
- osl_clearEnvironment(OUString("LO_IMPORT_USE_PDFIUM").pData);
+ osl_clearEnvironment(u"LO_IMPORT_USE_PDFIUM"_ustr.pData);
});
// Load the PDF and save as PDF
@@ -4534,11 +4533,11 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testRexportFilterSingletonArray)
if (getenv("LO_IMPORT_USE_PDFIUM") == nullptr)
{
bResetEnvVar = true;
- osl_setEnvironment(OUString("LO_IMPORT_USE_PDFIUM").pData, OUString("1").pData);
+ osl_setEnvironment(u"LO_IMPORT_USE_PDFIUM"_ustr.pData, u"1"_ustr.pData);
}
comphelper::ScopeGuard aPDFiumEnvVarGuard([&]() {
if (bResetEnvVar)
- osl_clearEnvironment(OUString("LO_IMPORT_USE_PDFIUM").pData);
+ osl_clearEnvironment(u"LO_IMPORT_USE_PDFIUM"_ustr.pData);
});
// Load the PDF and save as PDF
@@ -4585,11 +4584,11 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testRexportMediaBoxOrigin)
if (getenv("LO_IMPORT_USE_PDFIUM") == nullptr)
{
bResetEnvVar = true;
- osl_setEnvironment(OUString("LO_IMPORT_USE_PDFIUM").pData, OUString("1").pData);
+ osl_setEnvironment(u"LO_IMPORT_USE_PDFIUM"_ustr.pData, u"1"_ustr.pData);
}
comphelper::ScopeGuard aPDFiumEnvVarGuard([&]() {
if (bResetEnvVar)
- osl_clearEnvironment(OUString("LO_IMPORT_USE_PDFIUM").pData);
+ osl_clearEnvironment(u"LO_IMPORT_USE_PDFIUM"_ustr.pData);
});
// Load the PDF and save as PDF
@@ -4649,11 +4648,11 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testRexportResourceItemReference)
if (getenv("LO_IMPORT_USE_PDFIUM") == nullptr)
{
bResetEnvVar = true;
- osl_setEnvironment(OUString("LO_IMPORT_USE_PDFIUM").pData, OUString("1").pData);
+ osl_setEnvironment(u"LO_IMPORT_USE_PDFIUM"_ustr.pData, u"1"_ustr.pData);
}
comphelper::ScopeGuard aPDFiumEnvVarGuard([&]() {
if (bResetEnvVar)
- osl_clearEnvironment(OUString("LO_IMPORT_USE_PDFIUM").pData);
+ osl_clearEnvironment(u"LO_IMPORT_USE_PDFIUM"_ustr.pData);
});
// Load the PDF and save as PDF
@@ -4691,7 +4690,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testRexportResourceItemReference)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf152246)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"content-control-rtl.docx");
// Parse the export result.
@@ -4785,7 +4784,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf155161)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf48707_1)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf48707-1.fodt");
// Parse the export result with pdfium.
@@ -4816,7 +4815,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf48707_1)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf48707_2)
{
// Import the bugdoc and export as PDF.
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"tdf48707-2.fodt");
// Parse the export result with pdfium.
@@ -4849,7 +4848,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf48707_2)
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf156528)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
saveAsPDF(u"wide_page1.fodt");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
@@ -4916,7 +4915,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf113866)
rDocAccess.setPrintData(aDocPrintData);
// Export to pdf
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
@@ -4948,12 +4947,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf113866)
// Form controls coordinates scrambled when exporting to pdf with unchecked form creation in Writer
CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf159817)
{
- aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ aMediaDescriptor[u"FilterName"_ustr] <<= u"writer_pdf_Export"_ustr;
// Enable PDF/UA
uno::Sequence<beans::PropertyValue> aFilterData(
comphelper::InitPropertySequence({ { "ExportFormFields", uno::Any(false) } }));
- aMediaDescriptor["FilterData"] <<= aFilterData;
+ aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
saveAsPDF(u"tdf159817.fodt");
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
diff --git a/vcl/qa/cppunit/physicalfontcollection.cxx b/vcl/qa/cppunit/physicalfontcollection.cxx
index bff91d021f62..01c0e4f1086f 100644
--- a/vcl/qa/cppunit/physicalfontcollection.cxx
+++ b/vcl/qa/cppunit/physicalfontcollection.cxx
@@ -100,17 +100,17 @@ void VclPhysicalFontCollectionTest::testShouldCreateAndAddFontFamilyToCollection
// please note that fonts created this way are NOT normalized and will not be found if you search for them in the collection
vcl::font::PhysicalFontFamily* pFontFamily
- = aFontCollection.FindOrCreateFontFamily("Test Font Family Name");
+ = aFontCollection.FindOrCreateFontFamily(u"Test Font Family Name"_ustr);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Does not have only one font family in collection",
static_cast<int>(1), aFontCollection.Count());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Font family name not correct", OUString("Test Font Family Name"),
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Font family name not correct", u"Test Font Family Name"_ustr,
pFontFamily->GetSearchName());
vcl::font::PhysicalFontFamily* pFontFamily2
- = aFontCollection.FindOrCreateFontFamily("Test Font Family Name");
+ = aFontCollection.FindOrCreateFontFamily(u"Test Font Family Name"_ustr);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Still only one font family in collection", static_cast<int>(1),
aFontCollection.Count());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Font family name not correct", OUString("Test Font Family Name"),
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Font family name not correct", u"Test Font Family Name"_ustr,
pFontFamily2->GetSearchName());
}
@@ -193,7 +193,7 @@ void VclPhysicalFontCollectionTest::testShouldNotFindCJKFamily()
vcl::font::PhysicalFontCollection aFontCollection;
vcl::font::PhysicalFontFamily* pFontFamily
= aFontCollection.FindOrCreateFontFamily(GetEnglishSearchFontName(u"No CJK characters"));
- AddNormalFontFace(pFontFamily, "No CJK characters");
+ AddNormalFontFace(pFontFamily, u"No CJK characters"_ustr);
CPPUNIT_ASSERT_MESSAGE("family found",
!aFontCollection.FindFontFamilyByAttributes(
@@ -204,15 +204,15 @@ void VclPhysicalFontCollectionTest::testShouldFindStarsymbolFamily()
{
vcl::font::PhysicalFontCollection aFontCollection;
vcl::font::PhysicalFontFamily* pFontFamily
- = aFontCollection.FindOrCreateFontFamily("starsymbol");
- AddNormalFontFace(pFontFamily, "starsymbol");
+ = aFontCollection.FindOrCreateFontFamily(u"starsymbol"_ustr);
+ AddNormalFontFace(pFontFamily, u"starsymbol"_ustr);
CPPUNIT_ASSERT_MESSAGE("starsymbol created", pFontFamily);
vcl::font::PhysicalFontFamily* pStarsymbolFamily = aFontCollection.FindFontFamilyByAttributes(
ImplFontAttrs::Symbol, WEIGHT_NORMAL, WIDTH_NORMAL, ITALIC_NORMAL, u"");
CPPUNIT_ASSERT_MESSAGE("family not found", pStarsymbolFamily);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("starsymbol family not found", OUString("starsymbol"),
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("starsymbol family not found", u"starsymbol"_ustr,
pStarsymbolFamily->GetSearchName());
}
@@ -221,17 +221,17 @@ void VclPhysicalFontCollectionTest::testShouldFindOpensymbolFamilyWithMultipleSy
vcl::font::PhysicalFontCollection aFontCollection;
vcl::font::PhysicalFontFamily* pOpenSymbolFamily
- = aFontCollection.FindOrCreateFontFamily("opensymbol");
- AddNormalFontFace(pOpenSymbolFamily, "opensymbol");
+ = aFontCollection.FindOrCreateFontFamily(u"opensymbol"_ustr);
+ AddNormalFontFace(pOpenSymbolFamily, u"opensymbol"_ustr);
vcl::font::PhysicalFontFamily* pWingDingsFontFamily
- = aFontCollection.FindOrCreateFontFamily("wingdings");
- AddNormalFontFace(pWingDingsFontFamily, "wingdings");
+ = aFontCollection.FindOrCreateFontFamily(u"wingdings"_ustr);
+ AddNormalFontFace(pWingDingsFontFamily, u"wingdings"_ustr);
vcl::font::PhysicalFontFamily* pStarsymbolFamily = aFontCollection.FindFontFamilyByAttributes(
ImplFontAttrs::Symbol, WEIGHT_NORMAL, WIDTH_NORMAL, ITALIC_NORMAL, u"");
CPPUNIT_ASSERT_MESSAGE("family not found", pStarsymbolFamily);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("opensymbol family not found", OUString("opensymbol"),
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("opensymbol family not found", u"opensymbol"_ustr,
pStarsymbolFamily->GetSearchName());
}
@@ -239,14 +239,14 @@ void VclPhysicalFontCollectionTest::testShouldFindSymboltypeFamily()
{
vcl::font::PhysicalFontCollection aFontCollection;
vcl::font::PhysicalFontFamily* pFontFamily
- = aFontCollection.FindOrCreateFontFamily("testsymbol");
+ = aFontCollection.FindOrCreateFontFamily(u"testsymbol"_ustr);
- AddNormalFontFace(pFontFamily, "testsymbol");
+ AddNormalFontFace(pFontFamily, u"testsymbol"_ustr);
vcl::font::PhysicalFontFamily* pSymbolFamily = aFontCollection.FindFontFamilyByAttributes(
ImplFontAttrs::Symbol, WEIGHT_NORMAL, WIDTH_NORMAL, ITALIC_NORMAL, u"");
CPPUNIT_ASSERT_MESSAGE("family not found", pSymbolFamily);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("test symbol family not found", OUString("testsymbol"),
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("test symbol family not found", u"testsymbol"_ustr,
pSymbolFamily->GetSearchName());
}
@@ -255,10 +255,11 @@ void VclPhysicalFontCollectionTest::testShouldFindSymbolFamilyByMatchType()
// TODO: figure out how to test matchtype with ImplFontAttrs::Full
vcl::font::PhysicalFontCollection aFontCollection;
- vcl::font::PhysicalFontFamily* pFontFamily = aFontCollection.FindOrCreateFontFamily("symbols");
+ vcl::font::PhysicalFontFamily* pFontFamily
+ = aFontCollection.FindOrCreateFontFamily(u"symbols"_ustr);
FontAttributes aFontAttr;
- aFontAttr.SetFamilyName("symbols");
+ aFontAttr.SetFamilyName(u"symbols"_ustr);
aFontAttr.SetMicrosoftSymbolEncoded(true);
aFontAttr.SetWeight(WEIGHT_NORMAL);
pFontFamily->AddFontFace(new TestFontFace(aFontAttr, FONTID));
@@ -266,7 +267,7 @@ void VclPhysicalFontCollectionTest::testShouldFindSymbolFamilyByMatchType()
vcl::font::PhysicalFontFamily* pSymbolFamily = aFontCollection.FindFontFamilyByAttributes(
ImplFontAttrs::Symbol, WEIGHT_NORMAL, WIDTH_NORMAL, ITALIC_NORMAL, u"");
CPPUNIT_ASSERT_MESSAGE("family not found", pSymbolFamily);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("test symbol family not found", OUString("symbols"),
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("test symbol family not found", u"symbols"_ustr,
pSymbolFamily->GetSearchName());
}
@@ -274,10 +275,10 @@ void VclPhysicalFontCollectionTest::testImpossibleSymbolFamily()
{
vcl::font::PhysicalFontCollection aFontCollection;
vcl::font::PhysicalFontFamily* pFontFamily
- = aFontCollection.FindOrCreateFontFamily("testsymbolfamily");
+ = aFontCollection.FindOrCreateFontFamily(u"testsymbolfamily"_ustr);
FontAttributes aFontAttr;
- aFontAttr.SetFamilyName("testsymbolfamily");
+ aFontAttr.SetFamilyName(u"testsymbolfamily"_ustr);
aFontAttr.SetMicrosoftSymbolEncoded(true);
aFontAttr.SetWeight(WEIGHT_NORMAL);
TestFontFace* pFontFace = new TestFontFace(aFontAttr, FONTID);
@@ -292,8 +293,9 @@ void VclPhysicalFontCollectionTest::testImpossibleSymbolFamily()
void VclPhysicalFontCollectionTest::testShouldNotFindSymbolFamily()
{
vcl::font::PhysicalFontCollection aFontCollection;
- vcl::font::PhysicalFontFamily* pFontFamily = aFontCollection.FindOrCreateFontFamily("symbol");
- AddNormalFontFace(pFontFamily, "symbol");
+ vcl::font::PhysicalFontFamily* pFontFamily
+ = aFontCollection.FindOrCreateFontFamily(u"symbol"_ustr);
+ AddNormalFontFace(pFontFamily, u"symbol"_ustr);
CPPUNIT_ASSERT_MESSAGE(
"Family found", !aFontCollection.FindFontFamilyByAttributes(
@@ -319,8 +321,9 @@ void VclPhysicalFontCollectionTest::testShouldMatchFamilyName()
void VclPhysicalFontCollectionTest::testShouldMatchBrushScriptFamily()
{
vcl::font::PhysicalFontCollection aFontCollection;
- vcl::font::PhysicalFontFamily* pFontFamily = aFontCollection.FindOrCreateFontFamily("script");
- AddNormalFontFace(pFontFamily, "script");
+ vcl::font::PhysicalFontFamily* pFontFamily
+ = aFontCollection.FindOrCreateFontFamily(u"script"_ustr);
+ AddNormalFontFace(pFontFamily, u"script"_ustr);
CPPUNIT_ASSERT_MESSAGE("Brush script family not found",
aFontCollection.FindFontFamilyByAttributes(ImplFontAttrs::BrushScript,
@@ -332,8 +335,8 @@ void VclPhysicalFontCollectionTest::testShouldNotMatchBrushScriptFamily()
{
vcl::font::PhysicalFontCollection aFontCollection;
vcl::font::PhysicalFontFamily* pFontFamily
- = aFontCollection.FindOrCreateFontFamily("testfamily");
- AddNormalFontFace(pFontFamily, "testfamily");
+ = aFontCollection.FindOrCreateFontFamily(u"testfamily"_ustr);
+ AddNormalFontFace(pFontFamily, u"testfamily"_ustr);
CPPUNIT_ASSERT_MESSAGE("Brush script family found",
!aFontCollection.FindFontFamilyByAttributes(ImplFontAttrs::BrushScript,
@@ -388,10 +391,11 @@ void VclPhysicalFontCollectionTest::testShouldNotMatchFixedFamily()
void VclPhysicalFontCollectionTest::testShouldMatchSerifFamily()
{
vcl::font::PhysicalFontCollection aFontCollection;
- vcl::font::PhysicalFontFamily* pFontFamily = aFontCollection.FindOrCreateFontFamily("serif");
+ vcl::font::PhysicalFontFamily* pFontFamily
+ = aFontCollection.FindOrCreateFontFamily(u"serif"_ustr);
FontAttributes aFontAttr;
- aFontAttr.SetFamilyName("serif");
+ aFontAttr.SetFamilyName(u"serif"_ustr);
aFontAttr.SetFamilyType(FAMILY_ROMAN);
aFontAttr.SetWeight(WEIGHT_NORMAL);
TestFontFace* pFontFace = new TestFontFace(aFontAttr, FONTID);
@@ -406,10 +410,10 @@ void VclPhysicalFontCollectionTest::testShouldNotMatchSerifFamily()
{
vcl::font::PhysicalFontCollection aFontCollection;
vcl::font::PhysicalFontFamily* pFontFamily
- = aFontCollection.FindOrCreateFontFamily("sansseriftest");
+ = aFontCollection.FindOrCreateFontFamily(u"sansseriftest"_ustr);
FontAttributes aFontAttr;
- aFontAttr.SetFamilyName("sansseriftest");
+ aFontAttr.SetFamilyName(u"sansseriftest"_ustr);
aFontAttr.SetFamilyType(FAMILY_SWISS);
aFontAttr.SetWeight(WEIGHT_NORMAL);
TestFontFace* pFontFace = new TestFontFace(aFontAttr, FONTID);
@@ -424,10 +428,10 @@ void VclPhysicalFontCollectionTest::testShouldMatchSansSerifFamily()
{
vcl::font::PhysicalFontCollection aFontCollection;
vcl::font::PhysicalFontFamily* pFontFamily
- = aFontCollection.FindOrCreateFontFamily("sansserif");
+ = aFontCollection.FindOrCreateFontFamily(u"sansserif"_ustr);
FontAttributes aFontAttr;
- aFontAttr.SetFamilyName("sansserif");
+ aFontAttr.SetFamilyName(u"sansserif"_ustr);
aFontAttr.SetFamilyType(FAMILY_SWISS);
aFontAttr.SetWeight(WEIGHT_NORMAL);
TestFontFace* pFontFace = new TestFontFace(aFontAttr, FONTID);
@@ -442,10 +446,11 @@ void VclPhysicalFontCollectionTest::testShouldMatchSansSerifFamily()
void VclPhysicalFontCollectionTest::testShouldNotMatchSansSerifFamily()
{
vcl::font::PhysicalFontCollection aFontCollection;
- vcl::font::PhysicalFontFamily* pFontFamily = aFontCollection.FindOrCreateFontFamily("serif");
+ vcl::font::PhysicalFontFamily* pFontFamily
+ = aFontCollection.FindOrCreateFontFamily(u"serif"_ustr);
FontAttributes aFontAttr;
- aFontAttr.SetFamilyName("serif");
+ aFontAttr.SetFamilyName(u"serif"_ustr);
aFontAttr.SetFamilyType(FAMILY_ROMAN);
aFontAttr.SetWeight(WEIGHT_NORMAL);
TestFontFace* pFontFace = new TestFontFace(aFontAttr, FONTID);
@@ -460,10 +465,10 @@ void VclPhysicalFontCollectionTest::testShouldMatchDecorativeFamily()
{
vcl::font::PhysicalFontCollection aFontCollection;
vcl::font::PhysicalFontFamily* pFontFamily
- = aFontCollection.FindOrCreateFontFamily("decorative");
+ = aFontCollection.FindOrCreateFontFamily(u"decorative"_ustr);
FontAttributes aFontAttr;
- aFontAttr.SetFamilyName("decorative");
+ aFontAttr.SetFamilyName(u"decorative"_ustr);
aFontAttr.SetFamilyType(FAMILY_DECORATIVE);
aFontAttr.SetWeight(WEIGHT_MEDIUM);
TestFontFace* pFontFace = new TestFontFace(aFontAttr, FONTID);
@@ -479,8 +484,8 @@ void VclPhysicalFontCollectionTest::testShouldFindTitlingFamily()
{
vcl::font::PhysicalFontCollection aFontCollection;
vcl::font::PhysicalFontFamily* pFontFamily
- = aFontCollection.FindOrCreateFontFamily("testtitling");
- AddNormalFontFace(pFontFamily, "testtitling");
+ = aFontCollection.FindOrCreateFontFamily(u"testtitling"_ustr);
+ AddNormalFontFace(pFontFamily, u"testtitling"_ustr);
CPPUNIT_ASSERT_MESSAGE("Titling family not found", aFontCollection.FindFontFamilyByAttributes(
ImplFontAttrs::Titling, WEIGHT_NORMAL,
@@ -490,8 +495,9 @@ void VclPhysicalFontCollectionTest::testShouldFindTitlingFamily()
void VclPhysicalFontCollectionTest::testShouldFindCapitalsFamily()
{
vcl::font::PhysicalFontCollection aFontCollection;
- vcl::font::PhysicalFontFamily* pFontFamily = aFontCollection.FindOrCreateFontFamily("testcaps");
- AddNormalFontFace(pFontFamily, "testcaps");
+ vcl::font::PhysicalFontFamily* pFontFamily
+ = aFontCollection.FindOrCreateFontFamily(u"testcaps"_ustr);
+ AddNormalFontFace(pFontFamily, u"testcaps"_ustr);
CPPUNIT_ASSERT_MESSAGE("All-caps family not found", aFontCollection.FindFontFamilyByAttributes(
ImplFontAttrs::Capitals, WEIGHT_NORMAL,
@@ -515,8 +521,8 @@ void VclPhysicalFontCollectionTest::testShouldFindOtherStyleFamily()
{
vcl::font::PhysicalFontCollection aFontCollection;
vcl::font::PhysicalFontFamily* pFontFamily
- = aFontCollection.FindOrCreateFontFamily("testoldstyle");
- AddNormalFontFace(pFontFamily, "testoldstyle");
+ = aFontCollection.FindOrCreateFontFamily(u"testoldstyle"_ustr);
+ AddNormalFontFace(pFontFamily, u"testoldstyle"_ustr);
CPPUNIT_ASSERT_MESSAGE("Did not find font name", aFontCollection.FindFontFamilyByAttributes(
ImplFontAttrs::OtherStyle, WEIGHT_NORMAL,
@@ -526,8 +532,9 @@ void VclPhysicalFontCollectionTest::testShouldFindOtherStyleFamily()
void VclPhysicalFontCollectionTest::testShouldNotFindOtherStyleFamily()
{
vcl::font::PhysicalFontCollection aFontCollection;
- vcl::font::PhysicalFontFamily* pFontFamily = aFontCollection.FindOrCreateFontFamily("monotype");
- AddNormalFontFace(pFontFamily, "monotype");
+ vcl::font::PhysicalFontFamily* pFontFamily
+ = aFontCollection.FindOrCreateFontFamily(u"monotype"_ustr);
+ AddNormalFontFace(pFontFamily, u"monotype"_ustr);
CPPUNIT_ASSERT_MESSAGE("Found font name", !aFontCollection.FindFontFamilyByAttributes(
ImplFontAttrs::OtherStyle, WEIGHT_NORMAL,
@@ -538,8 +545,8 @@ void VclPhysicalFontCollectionTest::testShouldFindSchoolbookFamily()
{
vcl::font::PhysicalFontCollection aFontCollection;
vcl::font::PhysicalFontFamily* pFontFamily
- = aFontCollection.FindOrCreateFontFamily("testschoolbook");
- AddNormalFontFace(pFontFamily, "testschoolbook");
+ = aFontCollection.FindOrCreateFontFamily(u"testschoolbook"_ustr);
+ AddNormalFontFace(pFontFamily, u"testschoolbook"_ustr);
CPPUNIT_ASSERT_MESSAGE("Did not find font name", aFontCollection.FindFontFamilyByAttributes(
ImplFontAttrs::Schoolbook, WEIGHT_NORMAL,
diff --git a/vcl/qa/cppunit/physicalfontface.cxx b/vcl/qa/cppunit/physicalfontface.cxx
index 87fdc382bcfa..d824416f1942 100644
--- a/vcl/qa/cppunit/physicalfontface.cxx
+++ b/vcl/qa/cppunit/physicalfontface.cxx
@@ -167,13 +167,13 @@ void VclPhysicalFontFaceTest::testShouldCompareAsGreaterFontFaceWitHigherAlphabe
FontAttributes aFontAttrs1;
aFontAttrs1.SetWidthType(WIDTH_NORMAL);
aFontAttrs1.SetWeight(WEIGHT_NORMAL);
- aFontAttrs1.SetFamilyName("B family");
+ aFontAttrs1.SetFamilyName(u"B family"_ustr);
rtl::Reference<TestFontFace> aTestedFontFace(new TestFontFace(aFontAttrs1, FONTID));
FontAttributes aFontAttrs2;
aFontAttrs2.SetWidthType(WIDTH_NORMAL);
aFontAttrs2.SetWeight(WEIGHT_NORMAL);
- aFontAttrs2.SetFamilyName("A Family");
+ aFontAttrs2.SetFamilyName(u"A Family"_ustr);
rtl::Reference<TestFontFace> aComparedToFontFace(new TestFontFace(aFontAttrs2, FONTID));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1),
@@ -185,13 +185,13 @@ void VclPhysicalFontFaceTest::testShouldCompareAsGreaterFontFaceWitLesserAlphabe
FontAttributes aFontAttrs1;
aFontAttrs1.SetWidthType(WIDTH_NORMAL);
aFontAttrs1.SetWeight(WEIGHT_NORMAL);
- aFontAttrs1.SetFamilyName("A family");
+ aFontAttrs1.SetFamilyName(u"A family"_ustr);
rtl::Reference<TestFontFace> aTestedFontFace(new TestFontFace(aFontAttrs1, FONTID));
FontAttributes aFontAttrs2;
aFontAttrs2.SetWidthType(WIDTH_NORMAL);
aFontAttrs2.SetWeight(WEIGHT_NORMAL);
- aFontAttrs2.SetFamilyName("B Family");
+ aFontAttrs2.SetFamilyName(u"B Family"_ustr);
rtl::Reference<TestFontFace> aComparedToFontFace(new TestFontFace(aFontAttrs2, FONTID));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-1),
@@ -203,15 +203,15 @@ void VclPhysicalFontFaceTest::testShouldCompareAsGreaterFontFaceWithHigherAlphab
FontAttributes aFontAttrs1;
aFontAttrs1.SetWidthType(WIDTH_NORMAL);
aFontAttrs1.SetWeight(WEIGHT_NORMAL);
- aFontAttrs1.SetFamilyName("DejaVu Sans");
- aFontAttrs1.SetStyleName("B Style");
+ aFontAttrs1.SetFamilyName(u"DejaVu Sans"_ustr);
+ aFontAttrs1.SetStyleName(u"B Style"_ustr);
rtl::Reference<TestFontFace> aTestedFontFace(new TestFontFace(aFontAttrs1, FONTID));
FontAttributes aFontAttrs2;
aFontAttrs2.SetWidthType(WIDTH_NORMAL);
aFontAttrs2.SetWeight(WEIGHT_NORMAL);
- aFontAttrs2.SetFamilyName("DejaVu Sans");
- aFontAttrs2.SetStyleName("A Style");
+ aFontAttrs2.SetFamilyName(u"DejaVu Sans"_ustr);
+ aFontAttrs2.SetStyleName(u"A Style"_ustr);
rtl::Reference<TestFontFace> aComparedToFontFace(new TestFontFace(aFontAttrs2, FONTID));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1),
@@ -223,15 +223,15 @@ void VclPhysicalFontFaceTest::testShouldCompareAsGreaterFontFaceWithLesserAlphab
FontAttributes aFontAttrs1;
aFontAttrs1.SetWidthType(WIDTH_NORMAL);
aFontAttrs1.SetWeight(WEIGHT_NORMAL);
- aFontAttrs1.SetFamilyName("DejaVu Sans");
- aFontAttrs1.SetStyleName("A Style");
+ aFontAttrs1.SetFamilyName(u"DejaVu Sans"_ustr);
+ aFontAttrs1.SetStyleName(u"A Style"_ustr);
rtl::Reference<TestFontFace> aTestedFontFace(new TestFontFace(aFontAttrs1, FONTID));
FontAttributes aFontAttrs2;
aFontAttrs2.SetWidthType(WIDTH_NORMAL);
aFontAttrs2.SetWeight(WEIGHT_NORMAL);
- aFontAttrs2.SetFamilyName("DejaVu Sans");
- aFontAttrs2.SetStyleName("B Style");
+ aFontAttrs2.SetFamilyName(u"DejaVu Sans"_ustr);
+ aFontAttrs2.SetStyleName(u"B Style"_ustr);
rtl::Reference<TestFontFace> aComparedToFontFace(new TestFontFace(aFontAttrs2, FONTID));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-1),
@@ -243,15 +243,15 @@ void VclPhysicalFontFaceTest::testShouldCompareAsSameFontFace()
FontAttributes aFontAttrs1;
aFontAttrs1.SetWidthType(WIDTH_NORMAL);
aFontAttrs1.SetWeight(WEIGHT_NORMAL);
- aFontAttrs1.SetFamilyName("DejaVu Sans");
- aFontAttrs1.SetStyleName("Style");
+ aFontAttrs1.SetFamilyName(u"DejaVu Sans"_ustr);
+ aFontAttrs1.SetStyleName(u"Style"_ustr);
rtl::Reference<TestFontFace> aTestedFontFace(new TestFontFace(aFontAttrs1, FONTID));
FontAttributes aFontAttrs2;
aFontAttrs2.SetWidthType(WIDTH_NORMAL);
aFontAttrs2.SetWeight(WEIGHT_NORMAL);
- aFontAttrs2.SetFamilyName("DejaVu Sans");
- aFontAttrs2.SetStyleName("Style");
+ aFontAttrs2.SetFamilyName(u"DejaVu Sans"_ustr);
+ aFontAttrs2.SetStyleName(u"Style"_ustr);
rtl::Reference<TestFontFace> aComparedToFontFace(new TestFontFace(aFontAttrs2, FONTID));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
@@ -261,19 +261,19 @@ void VclPhysicalFontFaceTest::testShouldCompareAsSameFontFace()
void VclPhysicalFontFaceTest::testMatchStatusValue()
{
FontAttributes aFontAttrs;
- aFontAttrs.SetFamilyName("DejaVu Sans");
- aFontAttrs.SetStyleName("Book");
+ aFontAttrs.SetFamilyName(u"DejaVu Sans"_ustr);
+ aFontAttrs.SetStyleName(u"Book"_ustr);
aFontAttrs.SetPitch(FontPitch::PITCH_VARIABLE);
aFontAttrs.SetWidthType(WIDTH_NORMAL);
aFontAttrs.SetWeight(WEIGHT_BOLD);
rtl::Reference<TestFontFace> aTestedFontFace(new TestFontFace(aFontAttrs, FONTID));
- std::unique_ptr<OUString> pTargetStyleName(new OUString("Book"));
+ std::unique_ptr<OUString> pTargetStyleName(new OUString(u"Book"_ustr));
vcl::font::FontMatchStatus aFontMatchStatus = { 0, pTargetStyleName.get() };
- vcl::Font aTestFont("DejaVu Sans", "Book", Size(0, 36));
+ vcl::Font aTestFont(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 36));
- vcl::font::FontSelectPattern aFSP(aTestFont, "DejaVu Sans", Size(0, 36), 36, true);
+ vcl::font::FontSelectPattern aFSP(aTestFont, u"DejaVu Sans"_ustr, Size(0, 36), 36, true);
aFSP.mbEmbolden = false;
aFSP.mnOrientation = Degree10(10);
aFSP.SetWeight(WEIGHT_BOLD);
diff --git a/vcl/qa/cppunit/physicalfontfamily.cxx b/vcl/qa/cppunit/physicalfontfamily.cxx
index a720cda0c568..b6763d7226e8 100644
--- a/vcl/qa/cppunit/physicalfontfamily.cxx
+++ b/vcl/qa/cppunit/physicalfontfamily.cxx
@@ -47,15 +47,14 @@ public:
void VclPhysicalFontFamilyTest::testCreateFontFamily()
{
- PhysicalFontFamily aFamily("Test font face");
+ PhysicalFontFamily aFamily(u"Test font face"_ustr);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Family name", OUString(""), aFamily.GetFamilyName());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Search name", OUString("Test font face"),
- aFamily.GetSearchName());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Family name", u""_ustr, aFamily.GetFamilyName());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Search name", u"Test font face"_ustr, aFamily.GetSearchName());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Min quality", -1, aFamily.GetMinQuality());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Type faces", FontTypeFaces::NONE, aFamily.GetTypeFaces());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Match family name", OUString(""), aFamily.GetMatchFamilyName());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Match family name", u""_ustr, aFamily.GetMatchFamilyName());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Match type", ImplFontAttrs::None, aFamily.GetMatchType());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Match weight", WEIGHT_DONTKNOW, aFamily.GetMatchWeight());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Match width", WIDTH_DONTKNOW, aFamily.GetMatchWidth());
@@ -63,13 +62,12 @@ void VclPhysicalFontFamilyTest::testCreateFontFamily()
void VclPhysicalFontFamilyTest::testAddFontFace_Default()
{
- PhysicalFontFamily aFamily("Test font face");
+ PhysicalFontFamily aFamily(u"Test font face"_ustr);
aFamily.AddFontFace(new TestFontFace(1));
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Family name", OUString(""), aFamily.GetFamilyName());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Search name", OUString("Test font face"),
- aFamily.GetSearchName());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Family name", u""_ustr, aFamily.GetFamilyName());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Search name", u"Test font face"_ustr, aFamily.GetSearchName());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Min quality", 0, aFamily.GetMinQuality());
FontTypeFaces eTypeFace
= FontTypeFaces::Scalable | FontTypeFaces::NoneSymbol | FontTypeFaces::NoneItalic;
@@ -78,10 +76,10 @@ void VclPhysicalFontFamilyTest::testAddFontFace_Default()
void VclPhysicalFontFamilyTest::testAddOneFontFace()
{
- PhysicalFontFamily aFamily("Test font face");
+ PhysicalFontFamily aFamily(u"Test font face"_ustr);
FontAttributes aFontAttrs;
- aFontAttrs.SetFamilyName("Test font face");
+ aFontAttrs.SetFamilyName(u"Test font face"_ustr);
aFontAttrs.SetFamilyType(FontFamily::FAMILY_ROMAN);
aFontAttrs.SetPitch(FontPitch::PITCH_VARIABLE);
aFontAttrs.SetItalic(FontItalic::ITALIC_NONE);
@@ -91,10 +89,8 @@ void VclPhysicalFontFamilyTest::testAddOneFontFace()
aFamily.AddFontFace(new TestFontFace(aFontAttrs, 1));
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Family name", OUString("Test font face"),
- aFamily.GetFamilyName());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Search name", OUString("Test font face"),
- aFamily.GetSearchName());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Family name", u"Test font face"_ustr, aFamily.GetFamilyName());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Search name", u"Test font face"_ustr, aFamily.GetSearchName());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Min quality", 10, aFamily.GetMinQuality());
FontTypeFaces eTypeFace = FontTypeFaces::Scalable | FontTypeFaces::NoneSymbol
| FontTypeFaces::Bold | FontTypeFaces::NoneItalic;
@@ -103,10 +99,10 @@ void VclPhysicalFontFamilyTest::testAddOneFontFace()
void VclPhysicalFontFamilyTest::testAddTwoFontFaces()
{
- PhysicalFontFamily aFamily("Test font face");
+ PhysicalFontFamily aFamily(u"Test font face"_ustr);
FontAttributes aFontAttrs;
- aFontAttrs.SetFamilyName("Test font face");
+ aFontAttrs.SetFamilyName(u"Test font face"_ustr);
aFontAttrs.SetFamilyType(FontFamily::FAMILY_ROMAN);
aFontAttrs.SetPitch(FontPitch::PITCH_VARIABLE);
aFontAttrs.SetItalic(FontItalic::ITALIC_NONE);
@@ -116,7 +112,7 @@ void VclPhysicalFontFamilyTest::testAddTwoFontFaces()
aFamily.AddFontFace(new TestFontFace(aFontAttrs, 1));
- aFontAttrs.SetFamilyName("Test font face");
+ aFontAttrs.SetFamilyName(u"Test font face"_ustr);
aFontAttrs.SetFamilyType(FontFamily::FAMILY_ROMAN);
aFontAttrs.SetPitch(FontPitch::PITCH_VARIABLE);
aFontAttrs.SetItalic(FontItalic::ITALIC_NORMAL);
@@ -126,10 +122,8 @@ void VclPhysicalFontFamilyTest::testAddTwoFontFaces()
aFamily.AddFontFace(new TestFontFace(aFontAttrs, 2));
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Family name", OUString("Test font face"),
- aFamily.GetFamilyName());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Search name", OUString("Test font face"),
- aFamily.GetSearchName());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Family name", u"Test font face"_ustr, aFamily.GetFamilyName());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Search name", u"Test font face"_ustr, aFamily.GetSearchName());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Min quality", 5, aFamily.GetMinQuality());
FontTypeFaces eTypeFace = FontTypeFaces::Scalable | FontTypeFaces::NoneSymbol
| FontTypeFaces::Light | FontTypeFaces::Bold
diff --git a/vcl/qa/cppunit/png/PngFilterTest.cxx b/vcl/qa/cppunit/png/PngFilterTest.cxx
index 2e900ec41d4c..b9160d1602f7 100644
--- a/vcl/qa/cppunit/png/PngFilterTest.cxx
+++ b/vcl/qa/cppunit/png/PngFilterTest.cxx
@@ -165,7 +165,7 @@ class PngFilterTest : public test::BootstrapFixture
public:
PngFilterTest()
: BootstrapFixture(true, false)
- , maDataUrl("/vcl/qa/cppunit/png/data/")
+ , maDataUrl(u"/vcl/qa/cppunit/png/data/"_ustr)
{
}
@@ -198,7 +198,7 @@ public:
void PngFilterTest::testPng()
{
- for (const OUString& aFileName : { OUString("rect-1bit-pal.png") })
+ for (const OUString& aFileName : { u"rect-1bit-pal.png"_ustr })
{
SvFileStream aFileStream(getFullUrl(aFileName), StreamMode::READ);
@@ -240,9 +240,9 @@ void PngFilterTest::testPng()
}
OUString aFilenames[] = {
- OUString("color-rect-8bit-RGB.png"),
- OUString("color-rect-8bit-RGB-interlaced.png"),
- OUString("color-rect-4bit-pal.png"),
+ u"color-rect-8bit-RGB.png"_ustr,
+ u"color-rect-8bit-RGB-interlaced.png"_ustr,
+ u"color-rect-4bit-pal.png"_ustr,
};
for (const OUString& aFileName : aFilenames)
@@ -284,7 +284,7 @@ void PngFilterTest::testPng()
}
}
}
- for (const OUString& aFileName : { OUString("alpha-rect-8bit-RGBA.png") })
+ for (const OUString& aFileName : { u"alpha-rect-8bit-RGBA.png"_ustr })
{
SvFileStream aFileStream(getFullUrl(aFileName), StreamMode::READ);
@@ -1729,20 +1729,20 @@ void PngFilterTest::testPngSuite()
}
OUString aCorruptedFilenames[] = {
- "xs1n0g01.png", // signature byte 1 MSBit reset to zero
- "xs2n0g01.png", // signature byte 2 is a 'Q'
- "xs4n0g01.png", // signature byte 4 lowercase
- "xs7n0g01.png", // 7th byte a space instead of control-Z
- "xcrn0g04.png", // added cr bytes
- "xlfn0g04.png", // added lf bytes
- "xhdn0g08.png", // incorrect IHDR checksum
- "xc1n0g08.png", // color type 1
- "xc9n2c08.png", // color type 9
- "xd0n2c08.png", // bit-depth 0
- "xd3n2c08.png", // bit-depth 3
- "xd9n2c08.png", // bit-depth 99
- "xdtn0g01.png", // missing IDAT chunk
- "xcsn0g01.png", // incorrect IDAT checksum
+ u"xs1n0g01.png"_ustr, // signature byte 1 MSBit reset to zero
+ u"xs2n0g01.png"_ustr, // signature byte 2 is a 'Q'
+ u"xs4n0g01.png"_ustr, // signature byte 4 lowercase
+ u"xs7n0g01.png"_ustr, // 7th byte a space instead of control-Z
+ u"xcrn0g04.png"_ustr, // added cr bytes
+ u"xlfn0g04.png"_ustr, // added lf bytes
+ u"xhdn0g08.png"_ustr, // incorrect IHDR checksum
+ u"xc1n0g08.png"_ustr, // color type 1
+ u"xc9n2c08.png"_ustr, // color type 9
+ u"xd0n2c08.png"_ustr, // bit-depth 0
+ u"xd3n2c08.png"_ustr, // bit-depth 3
+ u"xd9n2c08.png"_ustr, // bit-depth 99
+ u"xdtn0g01.png"_ustr, // missing IDAT chunk
+ u"xcsn0g01.png"_ustr, // incorrect IDAT checksum
};
for (const auto& aFilename : aCorruptedFilenames)
diff --git a/vcl/qa/cppunit/text.cxx b/vcl/qa/cppunit/text.cxx
index 776522641f1e..6d1785f647b5 100644
--- a/vcl/qa/cppunit/text.cxx
+++ b/vcl/qa/cppunit/text.cxx
@@ -128,7 +128,7 @@ static tools::Long getCharacterLeftSideHeight(VirtualDevice* device, const Point
// IMPORTANT: If you modify this, check also the VclCjkTextTest::testVerticalText().
CPPUNIT_TEST_FIXTURE(VclTextTest, testSimpleText)
{
- OUString text("L");
+ OUString text(u"L"_ustr);
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(100, 100));
device->SetBackground(Wallpaper(COL_WHITE));
@@ -147,11 +147,11 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testSimpleText)
// Use Dejavu fonts, they are shipped with LO, so they should be ~always available.
// Use Sans variant for simpler glyph shapes (no serifs).
- vcl::Font font("DejaVu Sans", "Book", Size(0, 36));
+ vcl::Font font(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 36));
device->Erase();
device->SetFont(font);
device->DrawText(Point(10, 10), text);
- exportDevice("simple-text-36.png", device);
+ exportDevice(u"simple-text-36.png"_ustr, device);
// Height of 'L' with font 36 size should be roughly 28 pixels.
// Use the 'doubles' variant of the test, since that one allows
// a delta, and allow several pixels of delta to account
@@ -165,18 +165,18 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testSimpleText)
device->Erase();
device->SetFont(font);
device->DrawText(Point(90, 10), text);
- exportDevice("simple-text-36-270deg.png", device);
+ exportDevice(u"simple-text-36-270deg.png"_ustr, device);
// Width and height here should be swapped, again allowing for some imprecisions.
tools::Long height36Rotated = getCharacterLeftSideHeight(device, Point(0, 20));
CPPUNIT_ASSERT_DOUBLES_EQUAL(width36, height36Rotated, 2);
tools::Long width36Rotated = getCharacterTopWidth(device, Point(70, 0));
CPPUNIT_ASSERT_DOUBLES_EQUAL(height36, width36Rotated, 2);
- font = vcl::Font("DejaVu Sans", "Book", Size(0, 72));
+ font = vcl::Font(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 72));
device->Erase();
device->SetFont(font);
device->DrawText(Point(10, 10), text);
- exportDevice("simple-text-72.png", device);
+ exportDevice(u"simple-text-72.png"_ustr, device);
// Font size is doubled, so pixel sizes should also roughly double.
tools::Long height72 = getCharacterLeftSideHeight(device, Point(0, 30));
CPPUNIT_ASSERT_DOUBLES_EQUAL(height36 * 2, height72, 4);
@@ -187,14 +187,14 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testSimpleText)
device->Erase();
device->SetFont(font);
device->DrawText(Point(90, 10), text);
- exportDevice("simple-text-72-270deg.png", device);
+ exportDevice(u"simple-text-72-270deg.png"_ustr, device);
tools::Long height72Rotated = getCharacterLeftSideHeight(device, Point(0, 35));
CPPUNIT_ASSERT_DOUBLES_EQUAL(width72, height72Rotated, 2);
tools::Long width72Rotated = getCharacterTopWidth(device, Point(50, 0));
CPPUNIT_ASSERT_DOUBLES_EQUAL(height72, width72Rotated, 2);
// Test width scaled to 200%.
- font = vcl::Font("DejaVu Sans", "Book", Size(72, 36));
+ font = vcl::Font(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(72, 36));
#ifdef _WIN32
// TODO: What is the proper way to draw 200%-wide text? This is needed on Windows
// but it breaks Linux.
@@ -203,21 +203,21 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testSimpleText)
device->Erase();
device->SetFont(font);
device->DrawText(Point(10, 10), text);
- exportDevice("simple-text-36-200pct.png", device);
+ exportDevice(u"simple-text-36-200pct.png"_ustr, device);
tools::Long height36pct200 = getCharacterLeftSideHeight(device, Point(0, 30));
CPPUNIT_ASSERT_DOUBLES_EQUAL(height36, height36pct200, 2);
tools::Long width36pct200 = getCharacterBaseWidth(device, Point(20, 99));
CPPUNIT_ASSERT_DOUBLES_EQUAL(width36 * 2, width36pct200, 5);
// Test width scaled to 50%.
- font = vcl::Font("DejaVu Sans", "Book", Size(18, 36));
+ font = vcl::Font(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(18, 36));
#ifdef _WIN32
font.SetAverageFontWidth(0.5 * font.GetOrCalculateAverageFontWidth());
#endif
device->Erase();
device->SetFont(font);
device->DrawText(Point(10, 10), text);
- exportDevice("simple-text-36-50pct.png", device);
+ exportDevice(u"simple-text-36-50pct.png"_ustr, device);
tools::Long height36pct50 = getCharacterLeftSideHeight(device, Point(0, 40));
CPPUNIT_ASSERT_DOUBLES_EQUAL(height36, height36pct50, 2);
tools::Long width36pct50 = getCharacterBaseWidth(device, Point(15, 99));
@@ -228,7 +228,7 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testSimpleTextFontSpecificKerning)
{
OUString aAV(u"AV"_ustr);
- vcl::Font aFont("DejaVu Sans", "Book", Size(0, 2048));
+ vcl::Font aFont(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 2048));
ScopedVclPtrInstance<VirtualDevice> pOutDev;
pOutDev->SetFont(aFont);
@@ -276,7 +276,7 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testSimpleTextNoKerning)
{
OUString aAV(u"AV"_ustr);
- vcl::Font aFont("DejaVu Sans", "Book", Size(0, 2048));
+ vcl::Font aFont(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 2048));
aFont.SetKerning(FontKerning::NONE);
ScopedVclPtrInstance<VirtualDevice> pOutDev;
@@ -610,7 +610,7 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testImplLayoutArgsRightAlign)
CPPUNIT_TEST_FIXTURE(VclTextTest, testImplLayoutArgs_PrepareFallback_precalculatedglyphs)
{
// this font has no Cyrillic characters and thus needs fallback
- const vcl::Font aFont("Amiri", Size(0, 36));
+ const vcl::Font aFont(u"Amiri"_ustr, Size(0, 36));
ScopedVclPtrInstance<VirtualDevice> pVirDev;
pVirDev->SetFont(aFont);
@@ -658,7 +658,7 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testGetStringWithCenterEllpsis)
{
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
- device->SetFont(vcl::Font("DejaVu Sans", "Book", Size(0, 11)));
+ device->SetFont(vcl::Font(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 11)));
CPPUNIT_ASSERT_EQUAL(
u"a b c d ...v w x y z"_ustr,
@@ -670,7 +670,7 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testGetStringWithEndEllpsis)
{
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
- device->SetFont(vcl::Font("DejaVu Sans", "Book", Size(0, 11)));
+ device->SetFont(vcl::Font(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 11)));
CPPUNIT_ASSERT_EQUAL(u"a"_ustr, device->GetEllipsisString(u"abcde. f g h i j ..."_ustr, 10,
DrawTextFlags::EndEllipsis));
@@ -689,7 +689,7 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testGetStringWithNewsEllpsis)
{
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
- device->SetFont(vcl::Font("DejaVu Sans", "Book", Size(0, 11)));
+ device->SetFont(vcl::Font(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 11)));
CPPUNIT_ASSERT_EQUAL(u"a"_ustr, device->GetEllipsisString(u"abcde. f g h i j ..."_ustr, 10,
DrawTextFlags::NewsEllipsis));
@@ -723,11 +723,11 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testGetTextBreak_invalid_index)
{
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
- device->SetFont(vcl::Font("DejaVu Sans", "Book", Size(0, 11)));
+ device->SetFont(vcl::Font(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 11)));
const OUString sTestStr(u"textline_ text_"_ustr);
const auto nLen = sTestStr.getLength();
- const auto nTextWidth = device->GetTextWidth("text");
+ const auto nTextWidth = device->GetTextWidth(u"text"_ustr);
const auto nInvalidIndex = sTestStr.getLength() + 2;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-1),
@@ -738,11 +738,11 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testGetTextBreak)
{
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
- device->SetFont(vcl::Font("DejaVu Sans", "Book", Size(0, 11)));
+ device->SetFont(vcl::Font(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 11)));
const OUString sTestStr(u"textline_ text_"_ustr);
const auto nLen = sTestStr.getLength();
- const auto nTextWidth = device->GetTextWidth("text");
+ const auto nTextWidth = device->GetTextWidth(u"text"_ustr);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4),
device->GetTextBreak(sTestStr, nTextWidth, 0, nLen));
@@ -762,22 +762,22 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testGetSingleLineTextRect)
{
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
- device->SetFont(vcl::Font("Liberation Sans", Size(0, 11)));
+ device->SetFont(vcl::Font(u"Liberation Sans"_ustr, Size(0, 11)));
CPPUNIT_ASSERT_EQUAL(
tools::Rectangle(Point(), Size(75, 12)),
- device->GetTextRect(tools::Rectangle(Point(), Point(100, 100)), "This is test text"));
+ device->GetTextRect(tools::Rectangle(Point(), Point(100, 100)), u"This is test text"_ustr));
}
CPPUNIT_TEST_FIXTURE(VclTextTest, testGetSingleLineTextRectWithEndEllipsis)
{
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
- device->SetFont(vcl::Font("Liberation Sans", Size(0, 11)));
+ device->SetFont(vcl::Font(u"Liberation Sans"_ustr, Size(0, 11)));
CPPUNIT_ASSERT_EQUAL(
tools::Rectangle(Point(), Size(52, 12)),
- device->GetTextRect(tools::Rectangle(Point(), Point(50, 50)), "This is test text",
+ device->GetTextRect(tools::Rectangle(Point(), Point(50, 50)), u"This is test text"_ustr,
DrawTextFlags::WordBreak | DrawTextFlags::EndEllipsis));
}
@@ -785,11 +785,11 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testGetRightBottomAlignedSingleLineTextRect)
{
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
- device->SetFont(vcl::Font("Liberation Sans", Size(0, 11)));
+ device->SetFont(vcl::Font(u"Liberation Sans"_ustr, Size(0, 11)));
CPPUNIT_ASSERT_EQUAL(tools::Rectangle(Point(926, 989), Size(75, 12)),
device->GetTextRect(tools::Rectangle(Point(), Point(1000, 1000)),
- "This is test text",
+ u"This is test text"_ustr,
DrawTextFlags::Right | DrawTextFlags::Bottom));
}
@@ -797,7 +797,7 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testGetRotatedSingleLineTextRect)
{
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
- device->SetFont(vcl::Font("Liberation Sans", Size(0, 11)));
+ device->SetFont(vcl::Font(u"Liberation Sans"_ustr, Size(0, 11)));
vcl::Font aFont(device->GetFont());
aFont.SetOrientation(45_deg10);
@@ -805,18 +805,18 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testGetRotatedSingleLineTextRect)
CPPUNIT_ASSERT_EQUAL(
tools::Rectangle(Point(0, -3), Size(75, 18)),
- device->GetTextRect(tools::Rectangle(Point(), Point(100, 100)), "This is test text"));
+ device->GetTextRect(tools::Rectangle(Point(), Point(100, 100)), u"This is test text"_ustr));
}
CPPUNIT_TEST_FIXTURE(VclTextTest, testGetMultiLineTextRect)
{
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
- device->SetFont(vcl::Font("Liberation Sans", Size(0, 11)));
+ device->SetFont(vcl::Font(u"Liberation Sans"_ustr, Size(0, 11)));
CPPUNIT_ASSERT_EQUAL(tools::Rectangle(Point(), Size(75, 12)),
device->GetTextRect(tools::Rectangle(Point(), Point(100, 100)),
- "This is test text",
+ u"This is test text"_ustr,
DrawTextFlags::WordBreak | DrawTextFlags::MultiLine));
}
@@ -824,11 +824,11 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testGetMultiLineTextRectWithEndEllipsis)
{
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
- device->SetFont(vcl::Font("Liberation Sans", Size(0, 11)));
+ device->SetFont(vcl::Font(u"Liberation Sans"_ustr, Size(0, 11)));
CPPUNIT_ASSERT_EQUAL(tools::Rectangle(Point(), Size(52, 48)),
device->GetTextRect(tools::Rectangle(Point(), Point(50, 50)),
- "This is test text xyzabc123abcdefghijk",
+ u"This is test text xyzabc123abcdefghijk"_ustr,
DrawTextFlags::WordBreak | DrawTextFlags::EndEllipsis
| DrawTextFlags::MultiLine));
}
@@ -837,11 +837,11 @@ CPPUNIT_TEST_FIXTURE(VclTextTest, testGetRightBottomAlignedMultiLineTextRect)
{
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
- device->SetFont(vcl::Font("Liberation Sans", Size(0, 11)));
+ device->SetFont(vcl::Font(u"Liberation Sans"_ustr, Size(0, 11)));
CPPUNIT_ASSERT_EQUAL(tools::Rectangle(Point(926, 989), Size(75, 12)),
device->GetTextRect(tools::Rectangle(Point(), Point(1000, 1000)),
- "This is test text",
+ u"This is test text"_ustr,
DrawTextFlags::Right | DrawTextFlags::Bottom
| DrawTextFlags::MultiLine));
}
diff --git a/vcl/qa/cppunit/textlayout.cxx b/vcl/qa/cppunit/textlayout.cxx
index 36129aec6920..1274eb24a181 100644
--- a/vcl/qa/cppunit/textlayout.cxx
+++ b/vcl/qa/cppunit/textlayout.cxx
@@ -34,12 +34,12 @@ CPPUNIT_TEST_FIXTURE(VclTextLayoutTest, testBreakLines_invalid_softbreak)
{
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
- device->SetFont(vcl::Font("DejaVu Sans", "Book", Size(0, 11)));
+ device->SetFont(vcl::Font(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 11)));
vcl::DefaultTextLayout aTextLayout(*device);
const OUString sTestStr = u"textline_ text_"_ustr;
- const auto nTextWidth = device->GetTextWidth("text");
+ const auto nTextWidth = device->GetTextWidth(u"text"_ustr);
css::uno::Reference<css::linguistic2::XHyphenator> xHyph;
css::uno::Reference<css::i18n::XBreakIterator> xBI = vcl::unohelper::CreateBreakIterator();
@@ -59,12 +59,12 @@ CPPUNIT_TEST_FIXTURE(VclTextLayoutTest, testBreakLines_hyphens)
{
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
- device->SetFont(vcl::Font("DejaVu Sans", "Book", Size(0, 11)));
+ device->SetFont(vcl::Font(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 11)));
vcl::DefaultTextLayout aTextLayout(*device);
const OUString sTestStr = u"textline text-moretext"_ustr;
- const auto nTextWidth = device->GetTextWidth("textline text-moretex");
+ const auto nTextWidth = device->GetTextWidth(u"textline text-moretex"_ustr);
css::uno::Reference<css::uno::XComponentContext> xContext(
comphelper::getProcessComponentContext());
@@ -85,12 +85,12 @@ CPPUNIT_TEST_FIXTURE(VclTextLayoutTest, testBreakLines_hyphen_word_under_two_cha
{
ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
device->SetOutputSizePixel(Size(1000, 1000));
- device->SetFont(vcl::Font("DejaVu Sans", "Book", Size(0, 11)));
+ device->SetFont(vcl::Font(u"DejaVu Sans"_ustr, u"Book"_ustr, Size(0, 11)));
vcl::DefaultTextLayout aTextLayout(*device);
const OUString sTestStr = u"textline text-moretext"_ustr;
- const auto nTextWidth = device->GetTextWidth("te-moretex");
+ const auto nTextWidth = device->GetTextWidth(u"te-moretex"_ustr);
css::uno::Reference<css::uno::XComponentContext> xContext(
comphelper::getProcessComponentContext());
diff --git a/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx b/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx
index 2665508ee433..a3f329c95562 100644
--- a/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx
+++ b/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx
@@ -81,15 +81,13 @@ void WidgetDefinitionReaderTest::testRead()
vcl::WidgetDefinitionReader aReader(getFullUrl(u"definition1.xml"), getFullUrl(u""));
CPPUNIT_ASSERT(aReader.read(aDefinition));
- CPPUNIT_ASSERT_EQUAL(OUString("123456"), aDefinition.mpStyle->maFaceColor.AsRGBHexString());
- CPPUNIT_ASSERT_EQUAL(OUString("234567"), aDefinition.mpStyle->maCheckedColor.AsRGBHexString());
- CPPUNIT_ASSERT_EQUAL(OUString("345678"), aDefinition.mpStyle->maLightColor.AsRGBHexString());
-
- CPPUNIT_ASSERT_EQUAL(OUString("ffffff"),
- aDefinition.mpStyle->maVisitedLinkColor.AsRGBHexString());
- CPPUNIT_ASSERT_EQUAL(OUString("ffffff"), aDefinition.mpStyle->maToolTextColor.AsRGBHexString());
- CPPUNIT_ASSERT_EQUAL(OUString("ffffff"),
- aDefinition.mpStyle->maWindowTextColor.AsRGBHexString());
+ CPPUNIT_ASSERT_EQUAL(u"123456"_ustr, aDefinition.mpStyle->maFaceColor.AsRGBHexString());
+ CPPUNIT_ASSERT_EQUAL(u"234567"_ustr, aDefinition.mpStyle->maCheckedColor.AsRGBHexString());
+ CPPUNIT_ASSERT_EQUAL(u"345678"_ustr, aDefinition.mpStyle->maLightColor.AsRGBHexString());
+
+ CPPUNIT_ASSERT_EQUAL(u"ffffff"_ustr, aDefinition.mpStyle->maVisitedLinkColor.AsRGBHexString());
+ CPPUNIT_ASSERT_EQUAL(u"ffffff"_ustr, aDefinition.mpStyle->maToolTextColor.AsRGBHexString());
+ CPPUNIT_ASSERT_EQUAL(u"ffffff"_ustr, aDefinition.mpStyle->maWindowTextColor.AsRGBHexString());
// Pushbutton
{
diff --git a/vcl/qt5/QtClipboard.cxx b/vcl/qt5/QtClipboard.cxx
index ea05784bbfb2..f49a51710fc5 100644
--- a/vcl/qt5/QtClipboard.cxx
+++ b/vcl/qt5/QtClipboard.cxx
@@ -189,11 +189,14 @@ void QtClipboard::handleChanged(QClipboard::Mode aMode)
listener->changedContents(aEv);
}
-OUString QtClipboard::getImplementationName() { return "com.sun.star.datatransfer.QtClipboard"; }
+OUString QtClipboard::getImplementationName()
+{
+ return u"com.sun.star.datatransfer.QtClipboard"_ustr;
+}
css::uno::Sequence<OUString> QtClipboard::getSupportedServiceNames()
{
- return { "com.sun.star.datatransfer.clipboard.SystemClipboard" };
+ return { u"com.sun.star.datatransfer.clipboard.SystemClipboard"_ustr };
}
sal_Bool QtClipboard::supportsService(const OUString& ServiceName)
diff --git a/vcl/qt5/QtDragAndDrop.cxx b/vcl/qt5/QtDragAndDrop.cxx
index ffabc1bbbaaa..2e4550983488 100644
--- a/vcl/qt5/QtDragAndDrop.cxx
+++ b/vcl/qt5/QtDragAndDrop.cxx
@@ -35,8 +35,8 @@ void QtDragSource::initialize(const css::uno::Sequence<css::uno::Any>& rArgument
{
if (rArguments.getLength() < 2)
{
- throw uno::RuntimeException("DragSource::initialize: Cannot install window event handler",
- getXWeak());
+ throw uno::RuntimeException(
+ u"DragSource::initialize: Cannot install window event handler"_ustr, getXWeak());
}
sal_IntPtr nFrame = 0;
@@ -44,7 +44,7 @@ void QtDragSource::initialize(const css::uno::Sequence<css::uno::Any>& rArgument
if (!nFrame)
{
- throw uno::RuntimeException("DragSource::initialize: missing SalFrame", getXWeak());
+ throw uno::RuntimeException(u"DragSource::initialize: missing SalFrame"_ustr, getXWeak());
}
m_pFrame = reinterpret_cast<QtFrame*>(nFrame);
@@ -91,7 +91,7 @@ void QtDragSource::fire_dragEnd(sal_Int8 nAction, bool bDropSuccessful)
OUString SAL_CALL QtDragSource::getImplementationName()
{
- return "com.sun.star.datatransfer.dnd.VclQtDragSource";
+ return u"com.sun.star.datatransfer.dnd.VclQtDragSource"_ustr;
}
sal_Bool SAL_CALL QtDragSource::supportsService(OUString const& ServiceName)
@@ -101,7 +101,7 @@ sal_Bool SAL_CALL QtDragSource::supportsService(OUString const& ServiceName)
css::uno::Sequence<OUString> SAL_CALL QtDragSource::getSupportedServiceNames()
{
- return { "com.sun.star.datatransfer.dnd.QtDragSource" };
+ return { u"com.sun.star.datatransfer.dnd.QtDragSource"_ustr };
}
QtDropTarget::QtDropTarget()
@@ -114,7 +114,7 @@ QtDropTarget::QtDropTarget()
OUString SAL_CALL QtDropTarget::getImplementationName()
{
- return "com.sun.star.datatransfer.dnd.VclQtDropTarget";
+ return u"com.sun.star.datatransfer.dnd.VclQtDropTarget"_ustr;
}
sal_Bool SAL_CALL QtDropTarget::supportsService(OUString const& ServiceName)
@@ -124,7 +124,7 @@ sal_Bool SAL_CALL QtDropTarget::supportsService(OUString const& ServiceName)
css::uno::Sequence<OUString> SAL_CALL QtDropTarget::getSupportedServiceNames()
{
- return { "com.sun.star.datatransfer.dnd.QtDropTarget" };
+ return { u"com.sun.star.datatransfer.dnd.QtDropTarget"_ustr };
}
QtDropTarget::~QtDropTarget() {}
@@ -139,8 +139,8 @@ void QtDropTarget::initialize(const uno::Sequence<uno::Any>& rArguments)
{
if (rArguments.getLength() < 2)
{
- throw uno::RuntimeException("DropTarget::initialize: Cannot install window event handler",
- getXWeak());
+ throw uno::RuntimeException(
+ u"DropTarget::initialize: Cannot install window event handler"_ustr, getXWeak());
}
sal_IntPtr nFrame = 0;
@@ -148,7 +148,7 @@ void QtDropTarget::initialize(const uno::Sequence<uno::Any>& rArguments)
if (!nFrame)
{
- throw uno::RuntimeException("DropTarget::initialize: missing SalFrame", getXWeak());
+ throw uno::RuntimeException(u"DropTarget::initialize: missing SalFrame"_ustr, getXWeak());
}
m_nDropAction = datatransfer::dnd::DNDConstants::ACTION_NONE;
diff --git a/vcl/qt5/QtFilePicker.cxx b/vcl/qt5/QtFilePicker.cxx
index 2af28b29a36d..3193f9901db5 100644
--- a/vcl/qt5/QtFilePicker.cxx
+++ b/vcl/qt5/QtFilePicker.cxx
@@ -80,8 +80,9 @@ namespace
{
uno::Sequence<OUString> FilePicker_getSupportedServiceNames()
{
- return { "com.sun.star.ui.dialogs.FilePicker", "com.sun.star.ui.dialogs.SystemFilePicker",
- "com.sun.star.ui.dialogs.QtFilePicker" };
+ return { u"com.sun.star.ui.dialogs.FilePicker"_ustr,
+ u"com.sun.star.ui.dialogs.SystemFilePicker"_ustr,
+ u"com.sun.star.ui.dialogs.QtFilePicker"_ustr };
}
}
@@ -733,14 +734,15 @@ void SAL_CALL QtFilePicker::initialize(const uno::Sequence<uno::Any>& args)
// parameter checking
uno::Any arg;
if (args.getLength() == 0)
- throw lang::IllegalArgumentException("no arguments", static_cast<XFilePicker2*>(this), 1);
+ throw lang::IllegalArgumentException(u"no arguments"_ustr, static_cast<XFilePicker2*>(this),
+ 1);
arg = args[0];
if ((arg.getValueType() != cppu::UnoType<sal_Int16>::get())
&& (arg.getValueType() != cppu::UnoType<sal_Int8>::get()))
{
- throw lang::IllegalArgumentException("invalid argument type",
+ throw lang::IllegalArgumentException(u"invalid argument type"_ustr,
static_cast<XFilePicker2*>(this), 1);
}
@@ -839,7 +841,7 @@ void SAL_CALL QtFilePicker::initialize(const uno::Sequence<uno::Any>& args)
break;
default:
- throw lang::IllegalArgumentException("Unknown template",
+ throw lang::IllegalArgumentException(u"Unknown template"_ustr,
static_cast<XFilePicker2*>(this), 1);
}
@@ -913,7 +915,7 @@ void SAL_CALL QtFilePicker::notifyTermination(const css::lang::EventObject&)
OUString SAL_CALL QtFilePicker::getImplementationName()
{
- return "com.sun.star.ui.dialogs.QtFilePicker";
+ return u"com.sun.star.ui.dialogs.QtFilePicker"_ustr;
}
sal_Bool SAL_CALL QtFilePicker::supportsService(const OUString& ServiceName)
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index 6aff814aacd2..d4a43fc7a544 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -1036,10 +1036,10 @@ static bool toVclFont(const QFont& rQFont, const css::lang::Locale& rLocale, vcl
QtFontFace::fillAttributesFromQFont(rQFont, aFA);
bool bFound = psp::PrintFontManager::get().matchFont(aFA, rLocale);
- SAL_INFO("vcl.qt", "font match result for '"
- << rQFont.family() << "': "
- << (bFound ? OUString::Concat("'") + aFA.GetFamilyName() + "'"
- : OUString("failed")));
+ SAL_INFO("vcl.qt",
+ "font match result for '"
+ << rQFont.family() << "': "
+ << (bFound ? OUString::Concat("'") + aFA.GetFamilyName() + "'" : u"failed"_ustr));
if (!bFound)
return false;
diff --git a/vcl/qt5/QtInstance.cxx b/vcl/qt5/QtInstance.cxx
index 2801601115ec..6872fb0fe1a3 100644
--- a/vcl/qt5/QtInstance.cxx
+++ b/vcl/qt5/QtInstance.cxx
@@ -556,7 +556,7 @@ QtInstance::CreateClipboard(const css::uno::Sequence<css::uno::Any>& arguments)
}
else if (arguments.getLength() != 1 || !(arguments[0] >>= sel))
{
- throw css::lang::IllegalArgumentException("bad QtInstance::CreateClipboard arguments",
+ throw css::lang::IllegalArgumentException(u"bad QtInstance::CreateClipboard arguments"_ustr,
css::uno::Reference<css::uno::XInterface>(), -1);
}
diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx
index d59b865a0751..b9c69a27519d 100644
--- a/vcl/skia/SkiaHelper.cxx
+++ b/vcl/skia/SkiaHelper.cxx
@@ -98,8 +98,8 @@ namespace SkiaHelper
{
static OUString getCacheFolder()
{
- OUString url("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
- "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/");
+ OUString url(u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
+ "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/"_ustr);
rtl::Bootstrap::expandMacros(url);
osl::Directory::create(url);
return url;
@@ -135,7 +135,7 @@ static void writeToLog(SvStream& stream, const char* key, std::u16string_view va
static OUString getDenylistFile()
{
- OUString url("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER);
+ OUString url(u"$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER ""_ustr);
rtl::Bootstrap::expandMacros(url);
return url + "/skia/skia_denylist_vulkan.xml";
@@ -167,14 +167,14 @@ static bool isVulkanDenylisted(const VkPhysicalDeviceProperties& props)
OUString apiVersion = versionAsString(props.apiVersion);
const char* deviceType = types[std::min<unsigned>(props.deviceType, SAL_N_ELEMENTS(types) - 1)];
- CrashReporter::addKeyValue("VulkanVendor", vendorIdStr, CrashReporter::AddItem);
- CrashReporter::addKeyValue("VulkanDevice", deviceIdStr, CrashReporter::AddItem);
- CrashReporter::addKeyValue("VulkanAPI", apiVersion, CrashReporter::AddItem);
- CrashReporter::addKeyValue("VulkanDriver", driverVersionString, CrashReporter::AddItem);
- CrashReporter::addKeyValue("VulkanDeviceType", OUString::createFromAscii(deviceType),
+ CrashReporter::addKeyValue(u"VulkanVendor"_ustr, vendorIdStr, CrashReporter::AddItem);
+ CrashReporter::addKeyValue(u"VulkanDevice"_ustr, deviceIdStr, CrashReporter::AddItem);
+ CrashReporter::addKeyValue(u"VulkanAPI"_ustr, apiVersion, CrashReporter::AddItem);
+ CrashReporter::addKeyValue(u"VulkanDriver"_ustr, driverVersionString, CrashReporter::AddItem);
+ CrashReporter::addKeyValue(u"VulkanDeviceType"_ustr, OUString::createFromAscii(deviceType),
CrashReporter::AddItem);
- CrashReporter::addKeyValue("VulkanDeviceName", OUString::createFromAscii(props.deviceName),
- CrashReporter::Write);
+ CrashReporter::addKeyValue(u"VulkanDeviceName"_ustr,
+ OUString::createFromAscii(props.deviceName), CrashReporter::Write);
SvFileStream logFile(getCacheFolder() + "/skia.log", StreamMode::WRITE | StreamMode::TRUNC);
writeToLog(logFile, "RenderMethod", "vulkan");
@@ -409,7 +409,7 @@ bool isVCLSkiaEnabled()
if (bRet)
WatchdogThread::start();
- CrashReporter::addKeyValue("UseSkia", OUString::boolean(bRet), CrashReporter::Write);
+ CrashReporter::addKeyValue(u"UseSkia"_ustr, OUString::boolean(bRet), CrashReporter::Write);
return bRet;
}
diff --git a/vcl/source/accessibility/AccessibleTextAttributeHelper.cxx b/vcl/source/accessibility/AccessibleTextAttributeHelper.cxx
index 39a77d2476b4..23f3d66c990d 100644
--- a/vcl/source/accessibility/AccessibleTextAttributeHelper.cxx
+++ b/vcl/source/accessibility/AccessibleTextAttributeHelper.cxx
@@ -35,11 +35,11 @@ namespace
OUString lcl_ConvertCharEscapement(sal_Int16 nEscapement)
{
if (nEscapement > 0)
- return "super";
+ return u"super"_ustr;
if (nEscapement < 0)
- return "sub";
+ return u"sub"_ustr;
- return "baseline";
+ return u"baseline"_ustr;
}
OUString lcl_ConverCharStrikeout(sal_Int16 nStrikeout)
@@ -92,24 +92,24 @@ OUString lcl_ConverCharStrikeout(sal_Int16 nStrikeout)
OUString lcl_convertFontWeight(double fontWeight)
{
if (fontWeight == css::awt::FontWeight::THIN || fontWeight == css::awt::FontWeight::ULTRALIGHT)
- return "100";
+ return u"100"_ustr;
if (fontWeight == css::awt::FontWeight::LIGHT)
- return "200";
+ return u"200"_ustr;
if (fontWeight == css::awt::FontWeight::SEMILIGHT)
- return "300";
+ return u"300"_ustr;
if (fontWeight == css::awt::FontWeight::NORMAL)
- return "normal";
+ return u"normal"_ustr;
if (fontWeight == css::awt::FontWeight::SEMIBOLD)
- return "500";
+ return u"500"_ustr;
if (fontWeight == css::awt::FontWeight::BOLD)
- return "bold";
+ return u"bold"_ustr;
if (fontWeight == css::awt::FontWeight::ULTRABOLD)
- return "800";
+ return u"800"_ustr;
if (fontWeight == css::awt::FontWeight::BLACK)
- return "900";
+ return u"900"_ustr;
// awt::FontWeight::DONTKNOW || fontWeight == awt::FontWeight::NORMAL
- return "normal";
+ return u"normal"_ustr;
}
OUString lcl_ConvertFontSlant(css::awt::FontSlant eFontSlant)
@@ -117,17 +117,17 @@ OUString lcl_ConvertFontSlant(css::awt::FontSlant eFontSlant)
switch (eFontSlant)
{
case css::awt::FontSlant::FontSlant_NONE:
- return "normal";
+ return u"normal"_ustr;
case css::awt::FontSlant::FontSlant_OBLIQUE:
case css::awt::FontSlant::FontSlant_REVERSE_OBLIQUE:
- return "oblique";
+ return u"oblique"_ustr;
case css::awt::FontSlant::FontSlant_ITALIC:
case css::awt::FontSlant::FontSlant_REVERSE_ITALIC:
- return "italic";
+ return u"italic"_ustr;
case css::awt::FontSlant::FontSlant_DONTKNOW:
case css::awt::FontSlant::FontSlant_MAKE_FIXED_SIZE:
default:
- return "";
+ return u""_ustr;
}
}
diff --git a/vcl/source/app/IconThemeSelector.cxx b/vcl/source/app/IconThemeSelector.cxx
index ae3af74b3da2..eeea0227e603 100644
--- a/vcl/source/app/IconThemeSelector.cxx
+++ b/vcl/source/app/IconThemeSelector.cxx
@@ -56,9 +56,9 @@ IconThemeSelector::GetIconThemeForDesktopEnvironment(const OUString& desktopEnvi
if (comphelper::LibreOfficeKit::isActive())
{
if (!bPreferDarkIconTheme)
- return "colibre";
+ return u"colibre"_ustr;
else
- return "colibre_dark";
+ return u"colibre_dark"_ustr;
}
#ifdef _WIN32
diff --git a/vcl/source/app/brand.cxx b/vcl/source/app/brand.cxx
index 4ab1608d53e6..78493d58eb30 100644
--- a/vcl/source/app/brand.cxx
+++ b/vcl/source/app/brand.cxx
@@ -56,10 +56,10 @@ bool Application::LoadBrandBitmap (std::u16string_view pName, BitmapEx &rBitmap)
{
// TODO - if we want more flexibility we could add a branding path
// in an rc file perhaps fallback to "about.bmp"
- OUString aBaseDir( "$BRAND_BASE_DIR");
+ OUString aBaseDir( u"$BRAND_BASE_DIR"_ustr);
rtl::Bootstrap::expandMacros( aBaseDir );
OUString aBaseName(OUStringChar('/') + pName);
- OUString aPng( ".png" );
+ OUString aPng( u".png"_ustr );
rtl_Locale *pLoc = nullptr;
osl_getProcessLocale (&pLoc);
diff --git a/vcl/source/app/salplug.cxx b/vcl/source/app/salplug.cxx
index feb31dea77d4..ed23b18ffa2a 100644
--- a/vcl/source/app/salplug.cxx
+++ b/vcl/source/app/salplug.cxx
@@ -284,7 +284,7 @@ bool IsHeadlessModeRequested()
SalInstance *CreateSalInstance()
{
OUString aUsePlugin;
- rtl::Bootstrap::get("SAL_USE_VCLPLUGIN", aUsePlugin);
+ rtl::Bootstrap::get(u"SAL_USE_VCLPLUGIN"_ustr, aUsePlugin);
SAL_INFO_IF(!aUsePlugin.isEmpty(), "vcl.plugadapt", "Requested VCL plugin: " << aUsePlugin);
if (Application::IsBitmapRendering() || (aUsePlugin.isEmpty() && IsHeadlessModeRequested()))
@@ -402,7 +402,7 @@ void SalAbort( const OUString& rErrorText, bool bDumpCore )
std::fprintf( stderr, "Unspecified Application Error\n" );
else
{
- CrashReporter::addKeyValue("AbortMessage", rErrorText, CrashReporter::Write);
+ CrashReporter::addKeyValue(u"AbortMessage"_ustr, rErrorText, CrashReporter::Write);
std::fprintf( stderr, "%s\n", OUStringToOString(rErrorText, osl_getThreadTextEncoding()).getStr() );
}
#endif
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 36312092e419..4df7d6ad38fa 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1668,11 +1668,11 @@ void SalInstanceWindow::change_default_widget(weld::Widget* pOld, weld::Widget*
SalInstanceWidget* pVclOld = dynamic_cast<SalInstanceWidget*>(pOld);
vcl::Window* pWidgetOld = pVclOld ? pVclOld->getWidget() : nullptr;
if (pWidgetOld)
- pWidgetOld->set_property("has-default", OUString::boolean(false));
+ pWidgetOld->set_property(u"has-default"_ustr, OUString::boolean(false));
else
recursively_unset_default_buttons();
if (pWidgetNew)
- pWidgetNew->set_property("has-default", OUString::boolean(true));
+ pWidgetNew->set_property(u"has-default"_ustr, OUString::boolean(true));
}
bool SalInstanceWindow::is_default_widget(const weld::Widget* pCandidate) const
@@ -1894,19 +1894,19 @@ void SalInstanceDialog::add_button(const OUString& rText, int nResponse, const O
switch (nResponse)
{
case RET_OK:
- xButton->set_id("ok");
+ xButton->set_id(u"ok"_ustr);
break;
case RET_CLOSE:
- xButton->set_id("close");
+ xButton->set_id(u"close"_ustr);
break;
case RET_CANCEL:
- xButton->set_id("cancel");
+ xButton->set_id(u"cancel"_ustr);
break;
case RET_YES:
- xButton->set_id("yes");
+ xButton->set_id(u"yes"_ustr);
break;
case RET_NO:
- xButton->set_id("no");
+ xButton->set_id(u"no"_ustr);
break;
}
@@ -1943,7 +1943,7 @@ IMPL_LINK(SalInstanceDialog, PopupScreenShotMenuHdl, const CommandEvent&, rCEvt,
aMenu->InsertItem(nLocalID, VclResId(SV_BUTTONTEXT_SCREENSHOT));
aMenu->SetHelpText(nLocalID, VclResId(SV_HELPTEXT_SCREENSHOT));
- aMenu->SetHelpId(nLocalID, "InteractiveScreenshotMode");
+ aMenu->SetHelpId(nLocalID, u"InteractiveScreenshotMode"_ustr);
aMenu->EnableItem(nLocalID);
const sal_uInt16 nId(aMenu->Execute(m_xDialog, aMenuPos));
@@ -2716,7 +2716,7 @@ void SalInstanceNotebook::set_tab_label_text(const OUString& rIdent, const OUStr
void SalInstanceNotebook::set_show_tabs(bool bShow)
{
- m_xNotebook->set_property("show-tabs", OUString::boolean(bShow));
+ m_xNotebook->set_property(u"show-tabs"_ustr, OUString::boolean(bShow));
}
SalInstanceNotebook::~SalInstanceNotebook()
@@ -2812,7 +2812,7 @@ void SalInstanceVerticalNotebook::insert_page(const OUString& rIdent, const OUSt
VclPtrInstance<VclGrid> xGrid(m_xNotebook->GetPageParent());
xGrid->set_hexpand(true);
xGrid->set_vexpand(true);
- m_xNotebook->InsertPage(rIdent, rLabel, Image(), "", xGrid, nPos);
+ m_xNotebook->InsertPage(rIdent, rLabel, Image(), u""_ustr, xGrid, nPos);
if (nPos != -1)
{
@@ -3674,7 +3674,7 @@ void SalInstanceTreeView::do_insert(const weld::TreeIter* pParent, int pos, cons
pEntry->SetFlags(pEntry->GetFlags() | SvTLEntryFlags::IS_SEPARATOR);
if (m_xTreeView->nTreeFlags & SvTreeFlags::CHKBTN)
- AddStringItem(pEntry, "", -1);
+ AddStringItem(pEntry, u""_ustr, -1);
if (pIconName || pImageSurface)
{
@@ -3700,7 +3700,7 @@ void SalInstanceTreeView::do_insert(const weld::TreeIter* pParent, int pos, cons
if (bChildrenOnDemand)
{
SvTreeListEntry* pPlaceHolder
- = m_xTreeView->InsertEntry("<dummy>", pEntry, false, 0, nullptr);
+ = m_xTreeView->InsertEntry(u"<dummy>"_ustr, pEntry, false, 0, nullptr);
SvViewDataEntry* pViewData = m_xTreeView->GetViewDataEntry(pPlaceHolder);
pViewData->SetSelectable(false);
}
@@ -3796,7 +3796,7 @@ void SalInstanceTreeView::set_toggle(SvTreeListEntry* pEntry, TriState eState, i
// blank out missing entries
for (int i = pEntry->ItemCount(); i < col; ++i)
- AddStringItem(pEntry, "", i - 1);
+ AddStringItem(pEntry, u""_ustr, i - 1);
if (static_cast<size_t>(col) == pEntry->ItemCount())
{
@@ -4051,7 +4051,7 @@ void SalInstanceTreeView::bulk_insert_for_each(
{
aVclIter.iter = new SvTreeListEntry;
if (bHasAutoCheckButton)
- AddStringItem(aVclIter.iter, "", -1);
+ AddStringItem(aVclIter.iter, u""_ustr, -1);
aVclIter.iter->AddItem(std::make_unique<SvLBoxContextBmp>(aDummy, aDummy, false));
m_xTreeView->Insert(aVclIter.iter, pVclParent, TREELIST_APPEND);
func(aVclIter, i);
@@ -4263,7 +4263,7 @@ void SalInstanceTreeView::set_text(SvTreeListEntry* pEntry, const OUString& rTex
// blank out missing entries
for (int i = pEntry->ItemCount(); i < col; ++i)
- AddStringItem(pEntry, "", i - 1);
+ AddStringItem(pEntry, u""_ustr, i - 1);
if (static_cast<size_t>(col) == pEntry->ItemCount())
{
@@ -4507,7 +4507,7 @@ void SalInstanceTreeView::set_image(SvTreeListEntry* pEntry, const Image& rImage
// blank out missing entries
for (int i = pEntry->ItemCount(); i < col; ++i)
- AddStringItem(pEntry, "", i - 1);
+ AddStringItem(pEntry, u""_ustr, i - 1);
if (static_cast<size_t>(col) == pEntry->ItemCount())
{
@@ -4801,7 +4801,7 @@ void SalInstanceTreeView::set_children_on_demand(const weld::TreeIter& rIter,
if (bChildrenOnDemand && !pPlaceHolder)
{
- pPlaceHolder = m_xTreeView->InsertEntry("<dummy>", rVclIter.iter, false, 0, nullptr);
+ pPlaceHolder = m_xTreeView->InsertEntry(u"<dummy>"_ustr, rVclIter.iter, false, 0, nullptr);
SvViewDataEntry* pViewData = m_xTreeView->GetViewDataEntry(pPlaceHolder);
pViewData->SetSelectable(false);
}
@@ -5113,7 +5113,7 @@ void SalInstanceTreeView::vadjustment_set_value(int nValue)
void SalInstanceTreeView::set_show_expanders(bool bShow)
{
- m_xTreeView->set_property("show-expanders", OUString::boolean(bShow));
+ m_xTreeView->set_property(u"show-expanders"_ustr, OUString::boolean(bShow));
}
bool SalInstanceTreeView::changed_by_hover() const { return m_xTreeView->IsSelectDueToHover(); }
@@ -5353,7 +5353,7 @@ bool SalInstanceTreeView::ExpandRow(const SalInstanceTreeIter& rIter)
//expand disallowed, restore placeholder
if (!bRet)
{
- pPlaceHolder = m_xTreeView->InsertEntry("<dummy>", pEntry, false, 0, nullptr);
+ pPlaceHolder = m_xTreeView->InsertEntry(u"<dummy>"_ustr, pEntry, false, 0, nullptr);
SvViewDataEntry* pViewData = m_xTreeView->GetViewDataEntry(pPlaceHolder);
pViewData->SetSelectable(false);
}
@@ -7406,7 +7406,7 @@ std::unique_ptr<weld::SizeGroup> SalInstanceBuilder::create_size_group()
OUString SalInstanceBuilder::get_current_page_help_id() const
{
- vcl::Window* pCtrl = m_xBuilder->get("tabcontrol");
+ vcl::Window* pCtrl = m_xBuilder->get(u"tabcontrol"_ustr);
if (!pCtrl)
return {};
VclPtr<vcl::Window> xTabPage;
diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx
index 3f1ff9cb2f9b..b742fc948ba0 100644
--- a/vcl/source/app/session.cxx
+++ b/vcl/source/app/session.cxx
@@ -87,7 +87,7 @@ class VCLSession:
virtual sal_Bool SAL_CALL cancelShutdown() override;
OUString SAL_CALL getImplementationName() override {
- return "com.sun.star.frame.VCLSessionManagerClient";
+ return u"com.sun.star.frame.VCLSessionManagerClient"_ustr;
}
sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override {
@@ -95,7 +95,7 @@ class VCLSession:
}
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override {
- return {"com.sun.star.frame.SessionManagerClient"};
+ return {u"com.sun.star.frame.SessionManagerClient"_ustr};
}
void disposing(std::unique_lock<std::mutex>& rGuard) override;
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 6cf975f50d52..4716d56bc784 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -643,9 +643,9 @@ void ImplStyleData::SetStandardStyles()
aStdFont.SetCharSet( osl_getThreadTextEncoding() );
aStdFont.SetWeight( WEIGHT_NORMAL );
if (!comphelper::IsFuzzing())
- aStdFont.SetFamilyName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en")));
+ aStdFont.SetFamilyName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag(u"en"_ustr)));
else
- aStdFont.SetFamilyName("Liberation Sans");
+ aStdFont.SetFamilyName(u"Liberation Sans"_ustr);
maAppFont = aStdFont;
maHelpFont = aStdFont;
maMenuFont = aStdFont;
@@ -2446,7 +2446,7 @@ static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFoot
if ( !aName.isEmpty() )
{
- OUString gallery("");
+ OUString gallery(u""_ustr);
// try the gallery first, then the program path:
if ( aPersona == "own" && !aPersonaSettings.startsWith( "vnd.sun.star.expand" ) )
{
@@ -2469,8 +2469,8 @@ static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFoot
if( rHeaderFooterBitmap.IsEmpty() )
{
std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
- officecfg::Office::Common::Misc::Persona::set( "no", batch );
- officecfg::Office::Common::Misc::PersonaSettings::set( "", batch );
+ officecfg::Office::Common::Misc::Persona::set( u"no"_ustr, batch );
+ officecfg::Office::Common::Misc::PersonaSettings::set( u""_ustr, batch );
batch->commit();
}
}
@@ -2685,8 +2685,8 @@ bool MiscSettings::GetDisablePrinting() const
{
OUString aEnable =
vcl::SettingsConfigItem::get()->
- getValue( "DesktopManagement",
- "DisablePrinting" );
+ getValue( u"DesktopManagement"_ustr,
+ u"DisablePrinting"_ustr );
mxData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
}
@@ -2751,8 +2751,8 @@ bool MiscSettings::GetEnableATToolSupport() const
{
OUString aEnable =
vcl::SettingsConfigItem::get()->
- getValue( "Accessibility",
- "EnableATToolSupport" );
+ getValue( u"Accessibility"_ustr,
+ u"EnableATToolSupport"_ustr );
mxData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? TRISTATE_TRUE : TRISTATE_FALSE;
}
else
@@ -3100,7 +3100,7 @@ namespace
nUIMirroring = 0; // ask configuration only once
utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithComponentContext(
comphelper::getProcessComponentContext(),
- "org.openoffice.Office.Common/I18N/CTL" ); // note: case sensitive !
+ u"org.openoffice.Office.Common/I18N/CTL"_ustr ); // note: case sensitive !
if ( aNode.isValid() )
{
bool bTmp = bool();
@@ -3146,7 +3146,7 @@ const LanguageTag& AllSettings::GetLanguageTag() const
{
if (comphelper::IsFuzzing())
{
- static LanguageTag aRet("en-US");
+ static LanguageTag aRet(u"en-US"_ustr);
return aRet;
}
@@ -3164,7 +3164,7 @@ const LanguageTag& AllSettings::GetUILanguageTag() const
{
if (comphelper::IsFuzzing())
{
- static LanguageTag aRet("en-US");
+ static LanguageTag aRet(u"en-US"_ustr);
return aRet;
}
@@ -3198,7 +3198,7 @@ const LocaleDataWrapper& AllSettings::GetNeutralLocaleDataWrapper() const
{
if ( !mxData->mpNeutralLocaleDataWrapper )
const_cast<AllSettings*>(this)->mxData->mpNeutralLocaleDataWrapper.reset( new LocaleDataWrapper(
- comphelper::getProcessComponentContext(), LanguageTag("en-US") ) );
+ comphelper::getProcessComponentContext(), LanguageTag(u"en-US"_ustr) ) );
return *mxData->mpNeutralLocaleDataWrapper;
}
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 21de9dfc0f16..8bfcb5e03d66 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -153,7 +153,7 @@ Application* GetpApp()
Application::Application()
{
// useful for themes at least, perhaps extensions too
- OUString aVar("LIBO_VERSION"), aValue(LIBO_VERSION_DOTTED);
+ OUString aVar(u"LIBO_VERSION"_ustr), aValue(u"" LIBO_VERSION_DOTTED ""_ustr);
osl_setEnvironment(aVar.pData, aValue.pData);
ImplGetSVData()->mpApp = this;
@@ -273,7 +273,7 @@ void Application::Exception( ExceptionCategory nCategory )
case ExceptionCategory::UserInterface:
break;
default:
- Abort("Unknown Error");
+ Abort(u"Unknown Error"_ustr);
break;
}
}
@@ -1166,7 +1166,7 @@ static OUString Localize(TranslateId aId, const bool bLocalize)
if (bLocalize)
return VclResId(aId);
else
- return Translate::get(aId, Translate::Create("vcl", LanguageTag("en-US")));
+ return Translate::get(aId, Translate::Create("vcl", LanguageTag(u"en-US"_ustr)));
}
OUString Application::GetOSVersion()
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 26bf023ce848..a29a28c71701 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -233,7 +233,7 @@ vcl::Window *ImplGetDefaultContextWindow()
SAL_INFO( "vcl", "ImplGetDefaultWindow(): No AppWindow" );
pSVData->mpDefaultWin = VclPtr<WorkWindow>::Create(nullptr, WB_DEFAULTWIN);
- pSVData->mpDefaultWin->SetText( "VCL ImplGetDefaultWindow" );
+ pSVData->mpDefaultWin->SetText( u"VCL ImplGetDefaultWindow"_ustr );
}
catch (const css::uno::Exception&)
{
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 689b616e97d7..f046755863f1 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -371,7 +371,7 @@ bool InitVCL()
if (!aLocaleString.isEmpty())
{
MsLangId::getSystemUILanguage(); //call this now to pin what the system UI really was
- OUString envVar("LANGUAGE");
+ OUString envVar(u"LANGUAGE"_ustr);
osl_setEnvironment(envVar.pData, aLocaleString.pData);
}
}
diff --git a/vcl/source/app/weldutils.cxx b/vcl/source/app/weldutils.cxx
index 235e3140adca..6ab024953b01 100644
--- a/vcl/source/app/weldutils.cxx
+++ b/vcl/source/app/weldutils.cxx
@@ -493,8 +493,8 @@ int GetMinimumEditHeight()
{
// load this little .ui just to measure the height of an Entry
std::unique_ptr<weld::Builder> xBuilder(
- Application::CreateBuilder(nullptr, "cui/ui/namedialog.ui"));
- std::unique_ptr<weld::Entry> xEntry(xBuilder->weld_entry("name_entry"));
+ Application::CreateBuilder(nullptr, u"cui/ui/namedialog.ui"_ustr));
+ std::unique_ptr<weld::Entry> xEntry(xBuilder->weld_entry(u"name_entry"_ustr));
return xEntry->get_preferred_size().Height();
}
@@ -527,7 +527,7 @@ void WidgetStatusListener::startListening()
if (!xDispatchProvider.is())
return;
- mxDispatch = xDispatchProvider->queryDispatch(maCommandURL, "", 0);
+ mxDispatch = xDispatchProvider->queryDispatch(maCommandURL, u""_ustr, 0);
if (mxDispatch.is())
mxDispatch->addStatusListener(this, maCommandURL);
}
diff --git a/vcl/source/cnttype/mcnttfactory.cxx b/vcl/source/cnttype/mcnttfactory.cxx
index de8f3489d95a..1f396109b641 100644
--- a/vcl/source/cnttype/mcnttfactory.cxx
+++ b/vcl/source/cnttype/mcnttfactory.cxx
@@ -40,7 +40,7 @@ Reference< XMimeContentType > CMimeContentTypeFactory::createMimeContentType( co
OUString SAL_CALL CMimeContentTypeFactory::getImplementationName( )
{
- return "com.sun.star.datatransfer.MimeCntTypeFactory";
+ return u"com.sun.star.datatransfer.MimeCntTypeFactory"_ustr;
}
sal_Bool SAL_CALL CMimeContentTypeFactory::supportsService( const OUString& ServiceName )
@@ -50,7 +50,7 @@ sal_Bool SAL_CALL CMimeContentTypeFactory::supportsService( const OUString& Serv
Sequence< OUString > SAL_CALL CMimeContentTypeFactory::getSupportedServiceNames( )
{
- return { "com.sun.star.datatransfer.MimeContentTypeFactory" };
+ return { u"com.sun.star.datatransfer.MimeContentTypeFactory"_ustr };
}
diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx
index 92554d3fb75c..49cb61eb37fa 100644
--- a/vcl/source/components/dtranscomp.cxx
+++ b/vcl/source/components/dtranscomp.cxx
@@ -111,13 +111,13 @@ public:
Sequence< OUString > GenericClipboard::getSupportedServiceNames_static()
{
- Sequence< OUString > aRet { "com.sun.star.datatransfer.clipboard.SystemClipboard" };
+ Sequence< OUString > aRet { u"com.sun.star.datatransfer.clipboard.SystemClipboard"_ustr };
return aRet;
}
OUString GenericClipboard::getImplementationName()
{
- return "com.sun.star.datatransfer.VCLGenericClipboard";
+ return u"com.sun.star.datatransfer.VCLGenericClipboard"_ustr;
}
Sequence< OUString > GenericClipboard::getSupportedServiceNames()
@@ -161,7 +161,7 @@ void GenericClipboard::setContents(
OUString GenericClipboard::getName()
{
- return "CLIPBOARD";
+ return u"CLIPBOARD"_ustr;
}
sal_Int8 GenericClipboard::getRenderingCapabilities()
@@ -225,7 +225,7 @@ public:
virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) override;
OUString SAL_CALL getImplementationName() override
- { return "com.sun.star.datatransfer.dnd.VclGenericDragSource"; }
+ { return u"com.sun.star.datatransfer.dnd.VclGenericDragSource"_ustr; }
sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override
{ return cppu::supportsService(this, ServiceName); }
@@ -235,7 +235,7 @@ public:
static Sequence< OUString > getSupportedServiceNames_static()
{
- return { "com.sun.star.datatransfer.dnd.GenericDragSource" };
+ return { u"com.sun.star.datatransfer.dnd.GenericDragSource"_ustr };
}
};
@@ -277,7 +277,7 @@ Sequence< OUString > DragSource_getSupportedServiceNames()
#if defined MACOSX
return { "com.sun.star.datatransfer.dnd.OleDragSource" };
#elif defined UNX
- return { "com.sun.star.datatransfer.dnd.X11DragSource" };
+ return { u"com.sun.star.datatransfer.dnd.X11DragSource"_ustr };
#else
return { "com.sun.star.datatransfer.dnd.VclGenericDragSource" };
#endif
@@ -288,7 +288,7 @@ OUString DragSource_getImplementationName()
#if defined MACOSX
return "com.sun.star.comp.datatransfer.dnd.OleDragSource_V1";
#elif defined UNX
- return "com.sun.star.datatransfer.dnd.XdndSupport";
+ return u"com.sun.star.datatransfer.dnd.XdndSupport"_ustr;
#else
return "com.sun.star.datatransfer.dnd.VclGenericDragSource";
#endif
@@ -328,7 +328,7 @@ public:
virtual void SAL_CALL setDefaultActions( sal_Int8 actions ) override;
OUString SAL_CALL getImplementationName() override
- { return "com.sun.star.datatransfer.dnd.VclGenericDropTarget"; }
+ { return u"com.sun.star.datatransfer.dnd.VclGenericDropTarget"_ustr; }
sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override
{ return cppu::supportsService(this, ServiceName); }
@@ -338,7 +338,7 @@ public:
static Sequence< OUString > getSupportedServiceNames_static()
{
- return { "com.sun.star.datatransfer.dnd.GenericDropTarget" };
+ return { u"com.sun.star.datatransfer.dnd.GenericDropTarget"_ustr };
}
};
@@ -379,7 +379,7 @@ Sequence< OUString > DropTarget_getSupportedServiceNames()
#if defined MACOSX
return { "com.sun.star.datatransfer.dnd.OleDropTarget" };
#elif defined UNX
- return { "com.sun.star.datatransfer.dnd.X11DropTarget" };
+ return { u"com.sun.star.datatransfer.dnd.X11DropTarget"_ustr };
#else
return GenericDropTarget::getSupportedServiceNames_static();
#endif
@@ -391,7 +391,7 @@ OUString DropTarget_getImplementationName()
#if defined MACOSX
"com.sun.star.comp.datatransfer.dnd.OleDropTarget_V1"
#elif defined UNX
- "com.sun.star.datatransfer.dnd.XdndDropTarget"
+ u"com.sun.star.datatransfer.dnd.XdndDropTarget"_ustr
#else
"com.sun.star.datatransfer.dnd.VclGenericDropTarget"
#endif
@@ -414,7 +414,7 @@ Reference< XInterface > SalInstance::CreateClipboard( const Sequence< Any >& arg
{
if (arguments.hasElements()) {
throw css::lang::IllegalArgumentException(
- "non-empty SalInstance::CreateClipboard arguments", {}, -1);
+ u"non-empty SalInstance::CreateClipboard arguments"_ustr, {}, -1);
}
#ifdef IOS
return getXWeak(new vcl::GenericClipboard());
diff --git a/vcl/source/components/fontident.cxx b/vcl/source/components/fontident.cxx
index 104981ad4366..4b3353341c29 100644
--- a/vcl/source/components/fontident.cxx
+++ b/vcl/source/components/fontident.cxx
@@ -151,7 +151,7 @@ Any SAL_CALL FontIdentificator::getMaterial()
// XServiceInfo
OUString SAL_CALL FontIdentificator::getImplementationName()
{
- return "vcl::FontIdentificator";
+ return u"vcl::FontIdentificator"_ustr;
}
sal_Bool SAL_CALL FontIdentificator::supportsService( const OUString& i_rServiceName )
@@ -161,7 +161,7 @@ sal_Bool SAL_CALL FontIdentificator::supportsService( const OUString& i_rService
Sequence< OUString > SAL_CALL FontIdentificator::getSupportedServiceNames()
{
- return { "com.sun.star.awt.FontIdentificator" };
+ return { u"com.sun.star.awt.FontIdentificator"_ustr };
}
} // namespace vcl
diff --git a/vcl/source/control/NotebookbarPopup.cxx b/vcl/source/control/NotebookbarPopup.cxx
index 3cc21815ab84..2821a048843b 100644
--- a/vcl/source/control/NotebookbarPopup.cxx
+++ b/vcl/source/control/NotebookbarPopup.cxx
@@ -14,10 +14,10 @@
#include <NotebookbarPopup.hxx>
NotebookbarPopup::NotebookbarPopup(const VclPtr<VclHBox>& pParent)
- : FloatingWindow(pParent, "Popup", "sfx/ui/notebookbarpopup.ui")
+ : FloatingWindow(pParent, u"Popup"_ustr, u"sfx/ui/notebookbarpopup.ui"_ustr)
, m_pParent(pParent)
{
- m_pUIBuilder->get(m_pBox, "box");
+ m_pUIBuilder->get(m_pBox, u"box"_ustr);
m_pBox->SetSizePixel(Size(100, 75));
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
const BitmapEx& aPersona = rStyleSettings.GetPersonaHeader();
diff --git a/vcl/source/control/WeldedTabbedNotebookbar.cxx b/vcl/source/control/WeldedTabbedNotebookbar.cxx
index 1b9eef3756e0..056f19ce1d27 100644
--- a/vcl/source/control/WeldedTabbedNotebookbar.cxx
+++ b/vcl/source/control/WeldedTabbedNotebookbar.cxx
@@ -17,8 +17,8 @@ WeldedTabbedNotebookbar::WeldedTabbedNotebookbar(
: m_xBuilder(JSInstanceBuilder::CreateNotebookbarBuilder(
pContainerWindow, AllSettings::GetUIRootDir(), rUIFilePath, rFrame, nWindowId))
{
- m_xContainer = m_xBuilder->weld_container("NotebookBar");
- m_xWeldedToolbar = m_xBuilder->weld_toolbar("WeldedToolbar");
+ m_xContainer = m_xBuilder->weld_container(u"NotebookBar"_ustr);
+ m_xWeldedToolbar = m_xBuilder->weld_toolbar(u"WeldedToolbar"_ustr);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 138f17d0d4eb..4f8eafa7a144 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -241,7 +241,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
tools::Rectangle(Point(), Size(0x7fffffff, 0x7fffffff)), aText, nTextStyle);
// If the button text doesn't fit into it, put it into a tooltip (might happen in sidebar)
if (GetQuickHelpText()!= aText && mpButtonData->mbGeneratedTooltip)
- SetQuickHelpText("");
+ SetQuickHelpText(u""_ustr);
if (GetQuickHelpText().isEmpty() && textRect.getOpenWidth() > rSize.getWidth())
{
SetQuickHelpText(aText);
@@ -1786,7 +1786,7 @@ void PushButton::ShowFocus(const tools::Rectangle& rRect)
void OKButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
- set_id("ok");
+ set_id(u"ok"_ustr);
PushButton::ImplInit( pParent, nStyle );
SetText( GetStandardText( StandardButtonType::OK ) );
@@ -1833,7 +1833,7 @@ void OKButton::Click()
void CancelButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
- set_id("cancel");
+ set_id(u"cancel"_ustr);
PushButton::ImplInit( pParent, nStyle );
SetText( GetStandardText( StandardButtonType::Cancel ) );
@@ -1885,7 +1885,7 @@ CloseButton::CloseButton( vcl::Window* pParent )
void HelpButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
- set_id("help");
+ set_id(u"help"_ustr);
PushButton::ImplInit( pParent, nStyle | WB_NOPOINTERFOCUS );
SetText( GetStandardText( StandardButtonType::Help ) );
diff --git a/vcl/source/control/calendar.cxx b/vcl/source/control/calendar.cxx
index cce0bce63a3a..d147738e110a 100644
--- a/vcl/source/control/calendar.cxx
+++ b/vcl/source/control/calendar.cxx
@@ -84,7 +84,7 @@ void Calendar::ImplInit( WinBits nWinStyle )
mbPrevIn = false;
mbNextIn = false;
- OUString aGregorian( "gregorian");
+ OUString aGregorian( u"gregorian"_ustr);
maCalendarWrapper.loadCalendar( aGregorian,
Application::GetAppLocaleDataWrapper().getLanguageTag().getLocale());
if (maCalendarWrapper.getUniqueID() != aGregorian)
@@ -97,7 +97,7 @@ void Calendar::ImplInit( WinBits nWinStyle )
* rewrite would be necessary to internally replace use of class Date
* with proper class CalendarWrapper methods, get rid of fixed 12
* months, fixed 7 days, ... */
- maCalendarWrapper.loadCalendar( aGregorian, lang::Locale( "en", "US", ""));
+ maCalendarWrapper.loadCalendar( aGregorian, lang::Locale( u"en"_ustr, u"US"_ustr, u""_ustr));
}
SetFirstDate( maCurDate );
@@ -204,7 +204,7 @@ void Calendar::ImplFormat()
if ( (aOutSize.Width() <= 1) || (aOutSize.Height() <= 1) )
return;
- tools::Long n99TextWidth = GetTextWidth( "99" );
+ tools::Long n99TextWidth = GetTextWidth( u"99"_ustr );
tools::Long nTextHeight = GetTextHeight();
// calculate width and x-position
@@ -1503,7 +1503,7 @@ void Calendar::EndSelection()
Size Calendar::CalcWindowSizePixel() const
{
Size aSize;
- tools::Long n99TextWidth = GetTextWidth( "99" );
+ tools::Long n99TextWidth = GetTextWidth( u"99"_ustr );
tools::Long nTextHeight = GetTextHeight();
aSize.AdjustWidth((n99TextWidth+DAY_OFFX)*7);
@@ -1547,11 +1547,11 @@ namespace
public:
ImplCFieldFloat(vcl::Window* pContainer)
- : mxBuilder(Application::CreateInterimBuilder(pContainer, "svt/ui/calendar.ui", false))
- , mxContainer(mxBuilder->weld_container("Calendar"))
- , mxCalendar(mxBuilder->weld_calendar("date"))
- , mxTodayBtn(mxBuilder->weld_button("today"))
- , mxNoneBtn(mxBuilder->weld_button("none"))
+ : mxBuilder(Application::CreateInterimBuilder(pContainer, u"svt/ui/calendar.ui"_ustr, false))
+ , mxContainer(mxBuilder->weld_container(u"Calendar"_ustr))
+ , mxCalendar(mxBuilder->weld_calendar(u"date"_ustr))
+ , mxTodayBtn(mxBuilder->weld_button(u"today"_ustr))
+ , mxNoneBtn(mxBuilder->weld_button(u"none"_ustr))
{
}
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 0e75dc36b91c..c2a7c4c9ccf8 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2707,7 +2707,7 @@ namespace vcl
VclPtr<PopupMenu> Edit::CreatePopupMenu()
{
if (!mpUIBuilder)
- mpUIBuilder.reset(new VclBuilder(nullptr, AllSettings::GetUIRootDir(), "vcl/ui/editmenu.ui", ""));
+ mpUIBuilder.reset(new VclBuilder(nullptr, AllSettings::GetUIRootDir(), u"vcl/ui/editmenu.ui"_ustr, u""_ustr));
VclPtr<PopupMenu> pPopup = mpUIBuilder->get_menu(u"menu");
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
if (rStyleSettings.GetHideDisabledMenuItems())
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 8552d2510d24..15e994e48ff3 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -1294,7 +1294,7 @@ static sal_uInt16 ImplCutMonthFromString( OUString& rStr, OUString& rCalendarNam
static OUString ImplGetDateSep( const LocaleDataWrapper& rLocaleDataWrapper, ExtDateFieldFormat eFormat )
{
if ( ( eFormat == ExtDateFieldFormat::ShortYYMMDD_DIN5008 ) || ( eFormat == ExtDateFieldFormat::ShortYYYYMMDD_DIN5008 ) )
- return "-";
+ return u"-"_ustr;
else
return rLocaleDataWrapper.getDateSep();
}
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index 6508c4fe12c3..3071083494e1 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -2042,7 +2042,7 @@ void SvxIconChoiceCtrl_Impl::DeselectAllBut( SvxIconChoiceCtrlEntry const * pThi
Size SvxIconChoiceCtrl_Impl::GetMinGrid() const
{
- Size aTextSize( pView->GetTextWidth( "XXX" ), pView->GetTextHeight() );
+ Size aTextSize( pView->GetTextWidth( u"XXX"_ustr ), pView->GetTextHeight() );
if (nWinBits & WB_DETAILS)
return Size(aTextSize.Width(), aTextSize.Height());
diff --git a/vcl/source/control/managedmenubutton.cxx b/vcl/source/control/managedmenubutton.cxx
index 7545dba9b374..cdd0e5345c90 100644
--- a/vcl/source/control/managedmenubutton.cxx
+++ b/vcl/source/control/managedmenubutton.cxx
@@ -72,9 +72,9 @@ void ManagedMenuButton::PrepareExecute()
{}
css::uno::Sequence<css::uno::Any> aArgs {
- css::uno::Any(comphelper::makePropertyValue("ModuleIdentifier", aModuleName)),
- css::uno::Any(comphelper::makePropertyValue("Frame", css::uno::Any(xFrame))),
- css::uno::Any(comphelper::makePropertyValue("InToolbar", css::uno::Any(true)))
+ css::uno::Any(comphelper::makePropertyValue(u"ModuleIdentifier"_ustr, aModuleName)),
+ css::uno::Any(comphelper::makePropertyValue(u"Frame"_ustr, css::uno::Any(xFrame))),
+ css::uno::Any(comphelper::makePropertyValue(u"InToolbar"_ustr, css::uno::Any(true)))
};
const OUString aCommand(GetCommand());
@@ -91,7 +91,7 @@ void ManagedMenuButton::PrepareExecute()
// No registered controller found, use one the can handle arbitrary menus (e.g. defined in .ui file).
if (!m_xPopupController.is())
m_xPopupController.set(xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- "com.sun.star.comp.framework.ResourceMenuController", aArgs, xContext), css::uno::UNO_QUERY);
+ u"com.sun.star.comp.framework.ResourceMenuController"_ustr, aArgs, xContext), css::uno::UNO_QUERY);
if (m_xPopupController.is())
m_xPopupController->setPopupMenu(m_xPopupMenu);
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index 186340d8e047..28417879888d 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -106,7 +106,7 @@ void MenuButton::ExecuteMenu()
mnCurItemId = 0;
msCurItemIdent.clear();
}
- collectUIInformation(aID,"OPENLIST","","");
+ collectUIInformation(aID,u"OPENLIST"_ustr,u""_ustr,u""_ustr);
}
void MenuButton::CancelMenu()
@@ -125,7 +125,7 @@ void MenuButton::CancelMenu()
else
vcl::Window::GetDockingManager()->EndPopupMode(mpFloatingWindow);
}
- collectUIInformation(get_id(),"CLOSELIST","","");
+ collectUIInformation(get_id(),u"CLOSELIST"_ustr,u""_ustr,u""_ustr);
}
bool MenuButton::InPopupMode() const
@@ -235,7 +235,7 @@ void MenuButton::Activate()
void MenuButton::Select()
{
if (mnCurItemId)
- collectUIInformation(get_id(),"OPENFROMLIST","POS",OUString::number(mnCurItemId));
+ collectUIInformation(get_id(),u"OPENFROMLIST"_ustr,u"POS"_ustr,OUString::number(mnCurItemId));
maSelectHdl.Call( this );
}
diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx
index db336b1fe8f5..4b6da5c4b573 100644
--- a/vcl/source/control/notebookbar.cxx
+++ b/vcl/source/control/notebookbar.cxx
@@ -29,8 +29,8 @@
static OUString getCustomizedUIRootDir()
{
- OUString sShareLayer("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE(
- "bootstrap") ":UserInstallation}/user/config/soffice.cfg/");
+ OUString sShareLayer(u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE(
+ "bootstrap") ":UserInstallation}/user/config/soffice.cfg/"_ustr);
rtl::Bootstrap::expandMacros(sShareLayer);
return sShareLayer;
}
@@ -106,7 +106,7 @@ NotebookBar::NotebookBar(Window* pParent, const OUString& rID, const OUString& r
int i = 0;
do
{
- OUString aName = "ContextContainer";
+ OUString aName = u"ContextContainer"_ustr;
if (i)
aName += OUString::number(i);
diff --git a/vcl/source/control/roadmap.cxx b/vcl/source/control/roadmap.cxx
index a3d3251cea90..9216fb29a230 100644
--- a/vcl/source/control/roadmap.cxx
+++ b/vcl/source/control/roadmap.cxx
@@ -328,7 +328,7 @@ void ORoadmap::SetRoadmapComplete(bool _bComplete)
}
}
else if (bWasComplete)
- m_pImpl->InCompleteHyperLabel = InsertHyperLabel(m_pImpl->getItemCount(), "...", -1, true/*bEnabled*/, true/*bIncomplete*/ );
+ m_pImpl->InCompleteHyperLabel = InsertHyperLabel(m_pImpl->getItemCount(), u"..."_ustr, -1, true/*bEnabled*/, true/*bIncomplete*/ );
}
void ORoadmap::UpdatefollowingHyperLabels(ItemIndex _nIndex)
@@ -352,7 +352,7 @@ void ORoadmap::UpdatefollowingHyperLabels(ItemIndex _nIndex)
{
RoadmapItem* pOldItem = GetPreviousHyperLabel( m_pImpl->getItemCount() );
m_pImpl->InCompleteHyperLabel->SetPosition( pOldItem );
- m_pImpl->InCompleteHyperLabel->Update( m_pImpl->getItemCount(), "..." );
+ m_pImpl->InCompleteHyperLabel->Update( m_pImpl->getItemCount(), u"..."_ustr );
}
}
@@ -779,7 +779,7 @@ void RoadmapItem::ImplUpdatePosSize()
{
// calculate widths
tools::Long nIDWidth = mpID->GetTextWidth( mpID->GetText() );
- tools::Long nMaxIDWidth = mpID->GetTextWidth( "100." );
+ tools::Long nMaxIDWidth = mpID->GetTextWidth( u"100."_ustr );
nIDWidth = ::std::min( nIDWidth, nMaxIDWidth );
// check how many space the description would need
diff --git a/vcl/source/control/roadmapwizard.cxx b/vcl/source/control/roadmapwizard.cxx
index 1b3c9e96b477..1c9bc35c3c95 100644
--- a/vcl/source/control/roadmapwizard.cxx
+++ b/vcl/source/control/roadmapwizard.cxx
@@ -393,7 +393,7 @@ namespace vcl
int nPages = nRoadmapItems;
for (int i = nPages - 1; i >= nItemIndex; --i)
{
- m_xAssistant->set_page_title(m_xAssistant->get_page_ident(i), "");
+ m_xAssistant->set_page_title(m_xAssistant->get_page_ident(i), u""_ustr);
--nRoadmapItems;
}
break;
@@ -406,7 +406,7 @@ namespace vcl
WizardTypes::WizardState nRequiredState = rActivePath[ nItemIndex ];
if ( nPresentItemId != nRequiredState )
{
- m_xAssistant->set_page_title(OUString::number(nPresentItemId), "");
+ m_xAssistant->set_page_title(OUString::number(nPresentItemId), u""_ustr);
bInsertItem = true;
}
}
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index cafbae98623c..5d57fa23a6b9 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -259,7 +259,7 @@ Size TabControl::ImplGetItemSize( ImplTabItem* pItem, tools::Long nMaxWidth )
// shorten Text if needed
if ( aSize.Width()+4 >= nMaxWidth )
{
- OUString aAppendStr("...");
+ OUString aAppendStr(u"..."_ustr);
pItem->maFormatText += aAppendStr;
do
{
diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx
index 075e40d2de9b..01913d0023e1 100644
--- a/vcl/source/control/throbber.cxx
+++ b/vcl/source/control/throbber.cxx
@@ -80,7 +80,7 @@ namespace
for ( const auto& rImageURL : aImageURLs )
{
Reference< XGraphic > xGraphic;
- aMediaProperties.put( "URL", rImageURL );
+ aMediaProperties.put( u"URL"_ustr, rImageURL );
xGraphic = xGraphicProvider->queryGraphic( aMediaProperties.getPropertyValues() );
aImages.emplace_back( xGraphic );
}
diff --git a/vcl/source/control/wizardmachine.cxx b/vcl/source/control/wizardmachine.cxx
index a439059b906d..31e84ca37eb7 100644
--- a/vcl/source/control/wizardmachine.cxx
+++ b/vcl/source/control/wizardmachine.cxx
@@ -319,7 +319,7 @@ namespace vcl
m_pHelp= VclPtr<HelpButton>::Create(this, WB_TABSTOP);
m_pHelp->SetSizePixel(LogicToPixel(Size(50, 14), MapMode(MapUnit::MapAppFont)));
m_pHelp->Show();
- m_pHelp->set_id("help");
+ m_pHelp->set_id(u"help"_ustr);
AddButtonResponse(m_pHelp, RET_HELP);
AddButton( m_pHelp, WIZARDDIALOG_BUTTON_STDOFFSET_X);
}
@@ -332,7 +332,7 @@ namespace vcl
m_pPrevPage->SetSizePixel(LogicToPixel(Size(50, 14), MapMode(MapUnit::MapAppFont)));
m_pPrevPage->SetText(VclResId(STR_WIZDLG_PREVIOUS));
m_pPrevPage->Show();
- m_pPrevPage->set_id("previous");
+ m_pPrevPage->set_id(u"previous"_ustr);
if (_nButtonFlags & WizardButtonFlags::NEXT)
AddButton( m_pPrevPage, ( WIZARDDIALOG_BUTTON_SMALLSTDOFFSET_X) ); // half x-offset to the next button
@@ -350,7 +350,7 @@ namespace vcl
m_pNextPage->SetSizePixel(LogicToPixel(Size(50, 14), MapMode(MapUnit::MapAppFont)));
m_pNextPage->SetText(VclResId(STR_WIZDLG_NEXT));
m_pNextPage->Show();
- m_pNextPage->set_id("next");
+ m_pNextPage->set_id(u"next"_ustr);
AddButton( m_pNextPage, WIZARDDIALOG_BUTTON_STDOFFSET_X );
mpNextBtn = m_pNextPage;
@@ -364,7 +364,7 @@ namespace vcl
m_pFinish->SetSizePixel(LogicToPixel(Size(50, 14), MapMode(MapUnit::MapAppFont)));
m_pFinish->SetText(VclResId(STR_WIZDLG_FINISH));
m_pFinish->Show();
- m_pFinish->set_id("finish");
+ m_pFinish->set_id(u"finish"_ustr);
AddButton( m_pFinish, WIZARDDIALOG_BUTTON_STDOFFSET_X );
m_pFinish->SetClickHdl( LINK( this, RoadmapWizard, OnFinish ) );
@@ -802,7 +802,7 @@ namespace vcl
}
WizardMachine::WizardMachine(weld::Window* pParent, WizardButtonFlags nButtonFlags)
- : AssistantController(pParent, "vcl/ui/wizard.ui", "Wizard")
+ : AssistantController(pParent, u"vcl/ui/wizard.ui"_ustr, u"Wizard"_ustr)
, m_pCurTabPage(nullptr)
, m_nCurState(0)
, m_pFirstPage(nullptr)
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 697b4728369a..6ddbce0f6bdd 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -189,9 +189,9 @@ void TextEngine::SetFont( const vcl::Font& rFont )
maFont.SetAlignment( ALIGN_TOP );
mpRefDev->SetFont( maFont );
- mnDefTab = mpRefDev->GetTextWidth(" ");
+ mnDefTab = mpRefDev->GetTextWidth(u" "_ustr);
if ( !mnDefTab )
- mnDefTab = mpRefDev->GetTextWidth("XXXX");
+ mnDefTab = mpRefDev->GetTextWidth(u"XXXX"_ustr);
if ( !mnDefTab )
mnDefTab = 1;
mnCharHeight = mpRefDev->GetTextHeight();
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 331f69fb914d..53ed200ce870 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -2321,7 +2321,7 @@ void TextView::ToggleComment()
std::u16string_view sLine(sText);
if (o3tl::trim(sLine).length() > 0)
{
- pEngine->ImpInsertText(TextPaM(n, nCommentPos), "' ");
+ pEngine->ImpInsertText(TextPaM(n, nCommentPos), u"' "_ustr);
bChanged = true;
}
}
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx
index a00b7996f5ed..85020ec607a4 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -102,13 +102,13 @@ static Reference< XInterface > openConfig(const char* sPackage)
// define cfg path for open
aParam.Name = "nodepath";
if (rtl_str_compareIgnoreAsciiCase(sPackage, "types") == 0)
- aParam.Value <<= OUString( "/org.openoffice.TypeDetection.Types/Types" );
+ aParam.Value <<= u"/org.openoffice.TypeDetection.Types/Types"_ustr;
if (rtl_str_compareIgnoreAsciiCase(sPackage, "filters") == 0)
- aParam.Value <<= OUString( "/org.openoffice.TypeDetection.GraphicFilter/Filters" );
+ aParam.Value <<= u"/org.openoffice.TypeDetection.GraphicFilter/Filters"_ustr;
Sequence< Any > lParams{ Any(aParam) };
// get access to file
- xCfg = xConfigProvider->createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", lParams);
+ xCfg = xConfigProvider->createInstanceWithArguments(u"com.sun.star.configuration.ConfigurationAccess"_ustr, lParams);
}
catch(const RuntimeException&)
{ throw; }
diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx
index 5137a2f87016..8fefa8cb6d4c 100644
--- a/vcl/source/filter/FilterConfigItem.cxx
+++ b/vcl/source/filter/FilterConfigItem.cxx
@@ -53,7 +53,7 @@ static bool ImpIsTreeAvailable( Reference< XMultiServiceFactory > const & rXCfgP
++nIdx;
// creation arguments: nodepath
- PropertyValue aPathArgument = comphelper::makePropertyValue("nodepath",
+ PropertyValue aPathArgument = comphelper::makePropertyValue(u"nodepath"_ustr,
OUString(o3tl::getToken(rTree, 0, '/', nIdx)));
Sequence< Any > aArguments{ Any(aPathArgument) };
@@ -61,7 +61,7 @@ static bool ImpIsTreeAvailable( Reference< XMultiServiceFactory > const & rXCfgP
try
{
xReadAccess = rXCfgProv->createInstanceWithArguments(
- "com.sun.star.configuration.ConfigurationAccess",
+ u"com.sun.star.configuration.ConfigurationAccess"_ustr,
aArguments );
}
catch (const css::uno::Exception&)
@@ -117,7 +117,7 @@ void FilterConfigItem::ImpInitTree( std::u16string_view rSubTree )
try
{
xUpdatableView = xCfgProv->createInstanceWithArguments(
- "com.sun.star.configuration.ConfigurationUpdateAccess",
+ u"com.sun.star.configuration.ConfigurationUpdateAccess"_ustr,
aArguments );
if ( xUpdatableView.is() )
xPropSet.set( xUpdatableView, UNO_QUERY );
diff --git a/vcl/source/filter/GraphicNativeTransform.cxx b/vcl/source/filter/GraphicNativeTransform.cxx
index 792dd6a93a8f..7f2c2dfff645 100644
--- a/vcl/source/filter/GraphicNativeTransform.cxx
+++ b/vcl/source/filter/GraphicNativeTransform.cxx
@@ -94,9 +94,9 @@ bool GraphicNativeTransform::rotateGeneric(Degree10 aRotation, std::u16string_vi
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
css::uno::Sequence<css::beans::PropertyValue> aFilterData{
- comphelper::makePropertyValue("Interlaced", sal_Int32(0)),
- comphelper::makePropertyValue("Compression", sal_Int32(9)),
- comphelper::makePropertyValue("Quality", sal_Int32(90))
+ comphelper::makePropertyValue(u"Interlaced"_ustr, sal_Int32(0)),
+ comphelper::makePropertyValue(u"Compression"_ustr, sal_Int32(9)),
+ comphelper::makePropertyValue(u"Quality"_ustr, sal_Int32(90))
};
sal_uInt16 nFilterFormat = rFilter.GetExportFormatNumberForShortName(aType);
diff --git a/vcl/source/filter/bmp/BmpWriter.cxx b/vcl/source/filter/bmp/BmpWriter.cxx
index a5fcedec231a..7768259a5392 100644
--- a/vcl/source/filter/bmp/BmpWriter.cxx
+++ b/vcl/source/filter/bmp/BmpWriter.cxx
@@ -23,7 +23,7 @@
bool BmpWriter(SvStream& rStream, const Graphic& rGraphic, FilterConfigItem* pFilterConfigItem)
{
BitmapEx aBitmap = rGraphic.GetBitmapEx();
- sal_Int32 nColor = pFilterConfigItem->ReadInt32("Color", 0);
+ sal_Int32 nColor = pFilterConfigItem->ReadInt32(u"Color"_ustr, 0);
auto nColorRes = static_cast<BmpConversion>(nColor);
if (nColorRes != BmpConversion::NNONE && nColorRes <= BmpConversion::N24Bit)
@@ -31,7 +31,7 @@ bool BmpWriter(SvStream& rStream, const Graphic& rGraphic, FilterConfigItem* pFi
if (!aBitmap.Convert(nColorRes))
aBitmap = rGraphic.GetBitmapEx();
}
- bool bRleCoding = pFilterConfigItem->ReadBool("RLE_Coding", true);
+ bool bRleCoding = pFilterConfigItem->ReadBool(u"RLE_Coding"_ustr, true);
WriteDIB(aBitmap, rStream, bRleCoding);
return rStream.good();
diff --git a/vcl/source/filter/egif/egif.cxx b/vcl/source/filter/egif/egif.cxx
index 59ba24cf5ccf..8b57bac7aa1e 100644
--- a/vcl/source/filter/egif/egif.cxx
+++ b/vcl/source/filter/egif/egif.cxx
@@ -112,7 +112,7 @@ bool GIFWriter::WriteGIF(const Graphic& rGraphic, FilterConfigItem* pFilterConfi
m_pAcc.reset();
if ( pFilterConfigItem )
- nInterlaced = pFilterConfigItem->ReadInt32( "Interlaced", 0 );
+ nInterlaced = pFilterConfigItem->ReadInt32( u"Interlaced"_ustr, 0 );
m_rGIF.SetEndian( SvStreamEndian::LITTLE );
diff --git a/vcl/source/filter/eps/eps.cxx b/vcl/source/filter/eps/eps.cxx
index 046907a80927..22131a80a03e 100644
--- a/vcl/source/filter/eps/eps.cxx
+++ b/vcl/source/filter/eps/eps.cxx
@@ -304,20 +304,20 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
if ( pFilterConfigItem )
{
#ifdef UNX // don't put binary tiff preview ahead of postscript code by default on unix as ghostscript is unable to read it
- mnPreview = pFilterConfigItem->ReadInt32( "Preview", 0 );
+ mnPreview = pFilterConfigItem->ReadInt32( u"Preview"_ustr, 0 );
#else
mnPreview = pFilterConfigItem->ReadInt32( "Preview", 1 );
#endif
- mnLevel = pFilterConfigItem->ReadInt32( "Version", 2 );
+ mnLevel = pFilterConfigItem->ReadInt32( u"Version"_ustr, 2 );
if ( mnLevel != 1 )
mnLevel = 2;
- mbGrayScale = pFilterConfigItem->ReadInt32( "ColorFormat", 1 ) == 2;
+ mbGrayScale = pFilterConfigItem->ReadInt32( u"ColorFormat"_ustr, 1 ) == 2;
#ifdef UNX // don't compress by default on unix as ghostscript is unable to read LZW compressed eps
- mbCompression = pFilterConfigItem->ReadInt32( "CompressionMode", 0 ) != 0;
+ mbCompression = pFilterConfigItem->ReadInt32( u"CompressionMode"_ustr, 0 ) != 0;
#else
mbCompression = pFilterConfigItem->ReadInt32( "CompressionMode", 1 ) == 1;
#endif
- mnTextMode = pFilterConfigItem->ReadInt32( "TextMode", 0 );
+ mnTextMode = pFilterConfigItem->ReadInt32( u"TextMode"_ustr, 0 );
if ( mnTextMode > 2 )
mnTextMode = 0;
}
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 11612378fb8e..a7b125760107 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -180,7 +180,7 @@ ErrCode GraphicFilter::ImpTestOrFindFormat( std::u16string_view rPath, SvStream&
else if ( pConfig->GetImportFilterType( rFormat ).equalsIgnoreAsciiCase( "pcd_Photo_CD_Base16" ) )
nBase = 0;
FilterConfigItem aFilterConfigItem( u"Office.Common/Filter/Graphic/Import/PCD" );
- aFilterConfigItem.WriteInt32( "Resolution", nBase );
+ aFilterConfigItem.WriteInt32( u"Resolution"_ustr, nBase );
}
}
@@ -191,12 +191,12 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r
{
Graphic aGraphic;
- sal_Int32 nLogicalWidth = rConfigItem.ReadInt32( "LogicalWidth", 0 );
- sal_Int32 nLogicalHeight = rConfigItem.ReadInt32( "LogicalHeight", 0 );
+ sal_Int32 nLogicalWidth = rConfigItem.ReadInt32( u"LogicalWidth"_ustr, 0 );
+ sal_Int32 nLogicalHeight = rConfigItem.ReadInt32( u"LogicalHeight"_ustr, 0 );
if ( rGraphic.GetType() != GraphicType::NONE )
{
- sal_Int32 nMode = rConfigItem.ReadInt32( "ExportMode", -1 );
+ sal_Int32 nMode = rConfigItem.ReadInt32( u"ExportMode"_ustr, -1 );
if ( nMode == -1 ) // the property is not there, this is possible, if the graphic filter
{ // is called via UnoGraphicExporter and not from a graphic export Dialog
@@ -225,7 +225,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r
BitmapEx aBitmap( rGraphic.GetBitmapEx() );
MapMode aMap( MapUnit::Map100thInch );
- sal_Int32 nDPI = rConfigItem.ReadInt32( "Resolution", 75 );
+ sal_Int32 nDPI = rConfigItem.ReadInt32( u"Resolution"_ustr, 75 );
Fraction aFrac( 1, std::clamp( nDPI, sal_Int32(75), sal_Int32(600) ) );
aMap.SetScaleX( aFrac );
@@ -247,7 +247,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r
else
aGraphic = rGraphic;
- sal_Int32 nColors = rConfigItem.ReadInt32( "Color", 0 );
+ sal_Int32 nColors = rConfigItem.ReadInt32( u"Color"_ustr, 0 );
if ( nColors ) // graphic conversion necessary ?
{
BitmapEx aBmpEx( aGraphic.GetBitmapEx() );
@@ -317,7 +317,7 @@ void GraphicFilter::ImplInit()
if( bUseConfig )
{
- OUString url("$BRAND_BASE_DIR/" LIBO_LIB_FOLDER);
+ OUString url(u"$BRAND_BASE_DIR/" LIBO_LIB_FOLDER ""_ustr);
rtl::Bootstrap::expandMacros(url); //TODO: detect failure
osl::FileBase::getSystemPathFromFileURL(url, aFilterPath);
}
@@ -1230,7 +1230,7 @@ ErrCode GraphicFilter::readPCD(SvStream & rStream, Graphic & rGraphic)
std::unique_ptr<FilterConfigItem> pFilterConfigItem;
if (!comphelper::IsFuzzing())
{
- OUString aFilterConfigPath( "Office.Common/Filter/Graphic/Import/PCD" );
+ OUString aFilterConfigPath( u"Office.Common/Filter/Graphic/Import/PCD"_ustr );
pFilterConfigItem = std::make_unique<FilterConfigItem>(aFilterConfigPath);
}
@@ -1577,7 +1577,7 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, std::u16string_vi
}
else if( aFilterName.equalsIgnoreAsciiCase( EXP_SVMETAFILE ) )
{
- sal_Int32 nVersion = aConfigItem.ReadInt32( "Version", 0 ) ;
+ sal_Int32 nVersion = aConfigItem.ReadInt32( u"Version"_ustr, 0 ) ;
if ( nVersion )
rOStm.SetVersion( nVersion );
@@ -1753,7 +1753,7 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, std::u16string_vi
css::uno::Sequence< css::uno::Any > aArguments{ css::uno::Any(
aConfigItem.GetFilterData()) };
css::uno::Reference< css::svg::XSVGWriter > xSVGWriter(
- xContext->getServiceManager()->createInstanceWithArgumentsAndContext( "com.sun.star.svg.SVGWriter", aArguments, xContext),
+ xContext->getServiceManager()->createInstanceWithArgumentsAndContext( u"com.sun.star.svg.SVGWriter"_ustr, aArguments, xContext),
css::uno::UNO_QUERY );
if( xSaxWriter.is() && xSVGWriter.is() )
{
@@ -1952,7 +1952,7 @@ ErrCode GraphicFilter::LoadGraphic( const OUString &rPath, const OUString &rFilt
ErrCode GraphicFilter::compressAsPNG(const Graphic& rGraphic, SvStream& rOutputStream)
{
css::uno::Sequence< css::beans::PropertyValue > aFilterData{ comphelper::makePropertyValue(
- "Compression", sal_uInt32(9)) };
+ u"Compression"_ustr, sal_uInt32(9)) };
sal_uInt16 nFilterFormat = GetExportFormatNumberForShortName(u"PNG");
return ExportGraphic(rGraphic, u"", rOutputStream, nFilterFormat, &aFilterData);
diff --git a/vcl/source/filter/ieps/ieps.cxx b/vcl/source/filter/ieps/ieps.cxx
index 0a0b576924ac..d9d233ed77bf 100644
--- a/vcl/source/filter/ieps/ieps.cxx
+++ b/vcl/source/filter/ieps/ieps.cxx
@@ -225,9 +225,9 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r
//Under Linux, positioning of letters within pstoedit is very approximate.
//Using the -nfw option delegates the positioning to the reader, and we
//will do a proper job. The option is ignored on Windows.
- OUString arg1("-usebbfrominput"); //-usebbfrominput use the original ps bounding box
- OUString arg2("-f");
- OUString arg3("emf:-OO -drawbb -nfw"); //-drawbb mark out the bounding box extent with bg pixels
+ OUString arg1(u"-usebbfrominput"_ustr); //-usebbfrominput use the original ps bounding box
+ OUString arg2(u"-f"_ustr);
+ OUString arg3(u"emf:-OO -drawbb -nfw"_ustr); //-drawbb mark out the bounding box extent with bg pixels
//-nfw delegate letter placement to us
rtl_uString *args[] =
{
@@ -238,7 +238,7 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r
oslFileHandle pOut = nullptr;
oslFileHandle pErr = nullptr;
oslProcessError eErr = runProcessWithPathSearch(
- "pstoedit" EXESUFFIX,
+ u"pstoedit" EXESUFFIX ""_ustr,
args, SAL_N_ELEMENTS(args),
&aProcess, &pIn, &pOut, &pErr);
@@ -362,14 +362,14 @@ static bool RenderAsBMPThroughConvert(const sal_uInt8* pBuf, sal_uInt32 nBytesRe
Graphic &rGraphic)
{
// density in pixel/inch
- OUString arg1("-density");
+ OUString arg1(u"-density"_ustr);
// since the preview is also used for PDF-Export & printing on non-PS-printers,
// use some better quality - 300x300 should allow some resizing as well
- OUString arg2("300x300");
+ OUString arg2(u"300x300"_ustr);
// read eps from STDIN
- OUString arg3("eps:-");
+ OUString arg3(u"eps:-"_ustr);
// write bmp to STDOUT
- OUString arg4("bmp:-");
+ OUString arg4(u"bmp:-"_ustr);
rtl_uString *args[] =
{
arg1.pData, arg2.pData, arg3.pData, arg4.pData
@@ -383,17 +383,17 @@ static bool RenderAsBMPThroughConvert(const sal_uInt8* pBuf, sal_uInt32 nBytesRe
static bool RenderAsBMPThroughGS(const sal_uInt8* pBuf, sal_uInt32 nBytesRead,
Graphic &rGraphic)
{
- OUString arg1("-q");
- OUString arg2("-dBATCH");
- OUString arg3("-dNOPAUSE");
- OUString arg4("-dPARANOIDSAFER");
- OUString arg5("-dEPSCrop");
- OUString arg6("-dTextAlphaBits=4");
- OUString arg7("-dGraphicsAlphaBits=4");
- OUString arg8("-r300x300");
- OUString arg9("-sDEVICE=bmp16m");
- OUString arg10("-sOutputFile=-");
- OUString arg11("-");
+ OUString arg1(u"-q"_ustr);
+ OUString arg2(u"-dBATCH"_ustr);
+ OUString arg3(u"-dNOPAUSE"_ustr);
+ OUString arg4(u"-dPARANOIDSAFER"_ustr);
+ OUString arg5(u"-dEPSCrop"_ustr);
+ OUString arg6(u"-dTextAlphaBits=4"_ustr);
+ OUString arg7(u"-dGraphicsAlphaBits=4"_ustr);
+ OUString arg8(u"-r300x300"_ustr);
+ OUString arg9(u"-sDEVICE=bmp16m"_ustr);
+ OUString arg10(u"-sOutputFile=-"_ustr);
+ OUString arg11(u"-"_ustr);
rtl_uString *args[] =
{
arg1.pData, arg2.pData, arg3.pData, arg4.pData, arg5.pData,
diff --git a/vcl/source/filter/imet/ios2met.cxx b/vcl/source/filter/imet/ios2met.cxx
index e055ea83824a..ff6a54db253d 100644
--- a/vcl/source/filter/imet/ios2met.cxx
+++ b/vcl/source/filter/imet/ios2met.cxx
@@ -917,7 +917,7 @@ void OS2METReader::ReadRelLine(bool bGivenPos, sal_uInt16 nOrderLen)
}
else aP0=aAttr.aCurPos;
if (nOrderLen > pOS2MET->remainingSize())
- throw css::uno::Exception("attempt to read past end of input", nullptr);
+ throw css::uno::Exception(u"attempt to read past end of input"_ustr, nullptr);
nPolySize=nOrderLen/2;
if (nPolySize==0) return;
tools::Polygon aPolygon(nPolySize);
@@ -1061,7 +1061,7 @@ void OS2METReader::ReadChrStr(bool bGivenPos, bool bMove, bool bExtra, sal_uInt1
nLen = nOrderLen-4;
}
if (!pOS2MET->good() || nLen > pOS2MET->remainingSize())
- throw css::uno::Exception("attempt to read past end of input", nullptr);
+ throw css::uno::Exception(u"attempt to read past end of input"_ustr, nullptr);
std::unique_ptr<char[]> pChr(new char[nLen+1]);
for (sal_uInt16 i=0; i<nLen; i++)
pOS2MET->ReadChar( pChr[i] );
diff --git a/vcl/source/filter/ipcd/ipcd.cxx b/vcl/source/filter/ipcd/ipcd.cxx
index 220ac6111012..1bb0db542eca 100644
--- a/vcl/source/filter/ipcd/ipcd.cxx
+++ b/vcl/source/filter/ipcd/ipcd.cxx
@@ -111,7 +111,7 @@ bool PCDReader::ReadPCD( Graphic & rGraphic, FilterConfigItem* pConfigItem )
eResolution = PCDRES_BASE;
if ( pConfigItem )
{
- sal_Int32 nResolution = pConfigItem->ReadInt32( "Resolution", 2 );
+ sal_Int32 nResolution = pConfigItem->ReadInt32( u"Resolution"_ustr, 2 );
if ( nResolution == 1 )
eResolution = PCDRES_BASE4;
else if ( nResolution == 0 )
diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx
index ae644884c1f0..3a5776f8a6dc 100644
--- a/vcl/source/filter/jpeg/JpegWriter.cxx
+++ b/vcl/source/filter/jpeg/JpegWriter.cxx
@@ -120,9 +120,9 @@ JPEGWriter::JPEGWriter( SvStream& rStream, const css::uno::Sequence< css::beans:
mpExpWasGrey ( pExportWasGrey )
{
FilterConfigItem aConfigItem( pFilterData );
- mbGreys = aConfigItem.ReadInt32( "ColorMode", 0 ) != 0;
- mnQuality = aConfigItem.ReadInt32( "Quality", 75 );
- maChromaSubsampling = aConfigItem.ReadInt32( "ChromaSubsamplingMode", 0 );
+ mbGreys = aConfigItem.ReadInt32( u"ColorMode"_ustr, 0 ) != 0;
+ mnQuality = aConfigItem.ReadInt32( u"Quality"_ustr, 75 );
+ maChromaSubsampling = aConfigItem.ReadInt32( u"ChromaSubsamplingMode"_ustr, 0 );
if ( pFilterData )
{
diff --git a/vcl/source/filter/webp/writer.cxx b/vcl/source/filter/webp/writer.cxx
index c5249b5adf41..021947682a1c 100644
--- a/vcl/source/filter/webp/writer.cxx
+++ b/vcl/source/filter/webp/writer.cxx
@@ -195,10 +195,10 @@ bool ExportWebpGraphic(SvStream& rStream, const Graphic& rGraphic,
{
BitmapEx bitmap = rGraphic.GetBitmapEx();
// If lossless, neither presets nor quality matter.
- bool lossless = pFilterConfigItem->ReadBool("Lossless", true);
+ bool lossless = pFilterConfigItem->ReadBool(u"Lossless"_ustr, true);
// Preset is WebPPreset values.
- const OUString preset = pFilterConfigItem->ReadString("Preset", "");
- int quality = pFilterConfigItem->ReadInt32("Quality", 75);
+ const OUString preset = pFilterConfigItem->ReadString(u"Preset"_ustr, u""_ustr);
+ int quality = pFilterConfigItem->ReadInt32(u"Quality"_ustr, 75);
return writeWebp(rStream, bitmap, lossless, preset, quality);
}
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index f3e0ae81c9a0..3f975ec5e659 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -1692,7 +1692,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
}
comphelper::SequenceAsHashMap aMap(pFConfigItem->GetFilterData());
- auto it = aMap.find("EmbedEMF");
+ auto it = aMap.find(u"EmbedEMF"_ustr);
if (it != aMap.end())
{
it->second >>= bEmbedEMF;
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index c38fabb71ee6..6c3838772546 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -848,7 +848,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindFontFamilyOfDefaultFont() co
if (!comphelper::IsFuzzing())
{
const utl::DefaultFontConfiguration& rDefaults = utl::DefaultFontConfiguration::get();
- LanguageTag aLanguageTag("en");
+ LanguageTag aLanguageTag(u"en"_ustr);
OUString aFontname = rDefaults.getDefaultFont( aLanguageTag, DefaultFontType::SANS_UNICODE );
pFoundData = FindFontFamilyByTokenNames( aFontname );
@@ -1159,7 +1159,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily(FontSelectPattern& rF
// if a target symbol font is not available use a default symbol font
if( rFSD.IsMicrosoftSymbolEncoded() )
{
- LanguageTag aDefaultLanguageTag("en");
+ LanguageTag aDefaultLanguageTag(u"en"_ustr);
if (comphelper::IsFuzzing())
aSearchName = "OpenSymbol";
else
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
index 0be4c829ddf4..0caee37852b8 100644
--- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
+++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
@@ -47,7 +47,7 @@ namespace
{
OUString lcl_getThemeDefinitionPath()
{
- OUString sPath("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/theme_definitions/");
+ OUString sPath(u"$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/theme_definitions/"_ustr);
rtl::Bootstrap::expandMacros(sPath);
return sPath;
}
@@ -476,7 +476,7 @@ void munchDrawCommands(std::vector<std::shared_ptr<WidgetDrawAction>> const& rDr
{
SvFileStream aFileStream(rWidgetDraw.msSource, StreamMode::READ);
- vcl::bitmap::loadFromSvg(aFileStream, "", aBitmap, nScaleFactor);
+ vcl::bitmap::loadFromSvg(aFileStream, u""_ustr, aBitmap, nScaleFactor);
if (!aBitmap.IsEmpty())
{
rCacheImages.insert(std::make_pair(rCacheKey, aBitmap));
@@ -536,7 +536,7 @@ void munchDrawCommands(std::vector<std::shared_ptr<WidgetDrawAction>> const& rDr
uno::Reference<io::XInputStream> aInputStream(
new comphelper::SequenceInputStream(aData));
- uno::Any aAny = xSvgParser->getDrawCommands(aInputStream, "");
+ uno::Any aAny = xSvgParser->getDrawCommands(aInputStream, u""_ustr);
if (aAny.has<sal_uInt64>())
{
auto* pDrawRoot = reinterpret_cast<gfx::DrawRoot*>(aAny.get<sal_uInt64>());
@@ -1091,7 +1091,7 @@ bool FileDefinitionWidgetDraw::updateSettings(AllSettings& rSettings)
vcl::Font aFont(FAMILY_SWISS, Size(0, nFontSize));
aFont.SetCharSet(osl_getThreadTextEncoding());
aFont.SetWeight(WEIGHT_NORMAL);
- aFont.SetFamilyName("Liberation Sans");
+ aFont.SetFamilyName(u"Liberation Sans"_ustr);
aStyleSet.SetAppFont(aFont);
aStyleSet.SetHelpFont(aFont);
aStyleSet.SetMenuFont(aFont);
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx
index a8a4f7e983ba..1ac57ce1b59a 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -58,7 +58,7 @@ static void clearDir( const OUString& path )
void EmbeddedFontsHelper::clearTemporaryFontFiles()
{
- OUString path = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
+ OUString path = u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}"_ustr;
rtl::Bootstrap::expandMacros( path );
path += "/user/temp/embeddedfonts/";
clearDir( path + "fromdocs/" );
@@ -191,7 +191,7 @@ void EmbeddedFontsHelper::activateFonts()
OUString EmbeddedFontsHelper::fileUrlForTemporaryFont( const OUString& fontName, std::u16string_view extra )
{
- OUString path = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
+ OUString path = u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}"_ustr;
rtl::Bootstrap::expandMacros( path );
path += "/user/temp/embeddedfonts/fromdocs/";
osl::Directory::createPath( path );
@@ -242,7 +242,7 @@ bool EmbeddedFontsHelper::sufficientTTFRights( const void* data, tools::Long siz
OUString EmbeddedFontsHelper::fontFileUrl( std::u16string_view familyName, FontFamily family, FontItalic italic,
FontWeight weight, FontPitch pitch, FontRights rights )
{
- OUString path = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}";
+ OUString path = u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}"_ustr;
rtl::Bootstrap::expandMacros( path );
path += "/user/temp/embeddedfonts/fromsystem/";
osl::Directory::createPath( path );
@@ -357,7 +357,7 @@ OUString EmbeddedFontsHelper::fontFileUrl( std::u16string_view familyName, FontF
}
}
}
- return ok ? url : "";
+ return ok ? url : u""_ustr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/source/gdi/formpdfexport.cxx b/vcl/source/gdi/formpdfexport.cxx
index ac952491a26e..1d0151c98d4c 100644
--- a/vcl/source/gdi/formpdfexport.cxx
+++ b/vcl/source/gdi/formpdfexport.cxx
@@ -234,12 +234,12 @@ namespace toolkitform
{
xElement.set( xCurrentContainer->getByIndex( i ), UNO_QUERY_THROW );
Reference< XServiceInfo > xModelSI( xElement, UNO_QUERY_THROW );
- if ( xModelSI->supportsService("com.sun.star.awt.UnoControlRadioButtonModel") )
+ if ( xModelSI->supportsService(u"com.sun.star.awt.UnoControlRadioButtonModel"_ustr) )
{
Reference< XPropertySet > aProps( xElement, UNO_QUERY_THROW );
OUString sGroupName;
- aProps->getPropertyValue("GroupName") >>= sGroupName;
+ aProps->getPropertyValue(u"GroupName"_ustr) >>= sGroupName;
if ( !sGroupName.isEmpty() )
{
// map: unique key is the group name, so attempts to add a different ID value
@@ -301,7 +301,7 @@ namespace toolkitform
void getStringItemVector( const Reference< XPropertySet >& _rxModel, ::std::vector< OUString >& _rVector )
{
Sequence< OUString > aListEntries;
- if( ! (_rxModel->getPropertyValue( "StringItemList" ) >>= aListEntries) ) {
+ if( ! (_rxModel->getPropertyValue( u"StringItemList"_ustr ) >>= aListEntries) ) {
SAL_WARN("toolkit.helper", "getStringItemVector: unable to get property StringItemList");
}
_rVector.insert( _rVector.end(), std::cbegin(aListEntries), std::cend(aListEntries) );
@@ -342,7 +342,7 @@ namespace toolkitform
if( ! (xModelProps->getPropertyValue( FM_PROP_NAME ) >>= Descriptor->Name) ) {
SAL_WARN("toolkit.helper", "describePDFControl: unable to get property " << FM_PROP_NAME);
}
- if( ! (xModelProps->getPropertyValue( "HelpText" ) >>= Descriptor->Description) ) {
+ if( ! (xModelProps->getPropertyValue( u"HelpText"_ustr ) >>= Descriptor->Description) ) {
SAL_INFO("toolkit.helper", "describePDFControl: unable to get property HelpText");
}
Any aText;
@@ -384,7 +384,7 @@ namespace toolkitform
SAL_WARN("toolkit.helper", "describePDFControl: unable to get property " << FM_PROP_BORDER);
Descriptor->Border = ( nBorderType != 0 );
- OUString sBorderColorPropertyName( "BorderColor" );
+ OUString sBorderColorPropertyName( u"BorderColor"_ustr );
if ( xPSI->hasPropertyByName( sBorderColorPropertyName ) )
{
Color nBorderColor = COL_TRANSPARENT;
@@ -454,7 +454,7 @@ namespace toolkitform
// vertical alignment
{
- OUString sVertAlignPropertyName( "VerticalAlign" );
+ OUString sVertAlignPropertyName( u"VerticalAlign"_ustr );
if ( xPSI->hasPropertyByName( sVertAlignPropertyName ) )
{
VerticalAlignment nAlign = VerticalAlignment_MIDDLE;
@@ -481,7 +481,7 @@ namespace toolkitform
}
// tab order
- OUString aTabIndexString( "TabIndex" );
+ OUString aTabIndexString( u"TabIndex"_ustr );
if ( xPSI->hasPropertyByName( aTabIndexString ) )
{
sal_Int16 nIndex = -1;
@@ -502,7 +502,7 @@ namespace toolkitform
pEditWidget->MultiLine = bool( Descriptor->TextStyle & DrawTextFlags::MultiLine );
// password input
- OUString sEchoCharPropName( "EchoChar" );
+ OUString sEchoCharPropName( u"EchoChar"_ustr );
if ( xPSI->hasPropertyByName( sEchoCharPropName ) )
{
sal_Int16 nEchoChar = 0;
@@ -511,7 +511,7 @@ namespace toolkitform
}
// file select
- if ( xSI->supportsService( "com.sun.star.form.component.FileControl" ) )
+ if ( xSI->supportsService( u"com.sun.star.form.component.FileControl"_ustr ) )
pEditWidget->FileSelect = true;
// maximum text length
@@ -646,7 +646,7 @@ namespace toolkitform
{
vcl::PDFWriter::PushButtonWidget* pButtonWidget = static_cast< vcl::PDFWriter::PushButtonWidget* >( Descriptor.get() );
FormButtonType eButtonType = FormButtonType_PUSH;
- if( ! (xModelProps->getPropertyValue("ButtonType") >>= eButtonType) )
+ if( ! (xModelProps->getPropertyValue(u"ButtonType"_ustr) >>= eButtonType) )
SAL_WARN("toolkit.helper", "describePDFControl: unable to get property ButtonType");
static constexpr OUString FM_PROP_TARGET_URL = u"TargetURL"_ustr;
if ( eButtonType == FormButtonType_SUBMIT )
@@ -659,13 +659,13 @@ namespace toolkitform
if ( xParentProps.is() )
{
Reference< XServiceInfo > xParentSI( xParentProps, UNO_QUERY );
- if ( xParentSI.is() && xParentSI->supportsService("com.sun.star.form.component.HTMLForm") )
+ if ( xParentSI.is() && xParentSI->supportsService(u"com.sun.star.form.component.HTMLForm"_ustr) )
{
if( ! (xParentProps->getPropertyValue( FM_PROP_TARGET_URL ) >>= pButtonWidget->URL) )
SAL_WARN("toolkit.helper", "describePDFControl: unable to get property " << FM_PROP_TARGET_URL);
pButtonWidget->Submit = true;
FormSubmitMethod eMethod = FormSubmitMethod_POST;
- if( ! (xParentProps->getPropertyValue("SubmitMethod") >>= eMethod) )
+ if( ! (xParentProps->getPropertyValue(u"SubmitMethod"_ustr) >>= eMethod) )
SAL_WARN("toolkit.helper", "describePDFControl: unable to get property " << FM_PROP_TARGET_URL);
pButtonWidget->SubmitGet = (eMethod == FormSubmitMethod_GET);
}
@@ -721,7 +721,7 @@ namespace toolkitform
try
{
- xModelProps->getPropertyValue( "RefValue" ) >>= pCheckBoxWidget->OnValue;
+ xModelProps->getPropertyValue( u"RefValue"_ustr ) >>= pCheckBoxWidget->OnValue;
}
catch(...)
{
@@ -729,7 +729,7 @@ namespace toolkitform
try
{
- xModelProps->getPropertyValue( "SecondaryRefValue" ) >>= pCheckBoxWidget->OffValue;
+ xModelProps->getPropertyValue( u"SecondaryRefValue"_ustr ) >>= pCheckBoxWidget->OffValue;
}
catch(...)
{
@@ -748,7 +748,7 @@ namespace toolkitform
pRadioWidget->RadioGroup = determineRadioGroupId( xModelProps );
try
{
- xModelProps->getPropertyValue( "RefValue" ) >>= pRadioWidget->OnValue;
+ xModelProps->getPropertyValue( u"RefValue"_ustr ) >>= pRadioWidget->OnValue;
}
catch(...)
{
@@ -756,7 +756,7 @@ namespace toolkitform
try
{
- xModelProps->getPropertyValue( "SecondaryRefValue" ) >>= pRadioWidget->OffValue;
+ xModelProps->getPropertyValue( u"SecondaryRefValue"_ustr ) >>= pRadioWidget->OffValue;
}
catch(...)
{
@@ -770,11 +770,11 @@ namespace toolkitform
vcl::PDFWriter::ListBoxWidget* pListWidget = static_cast< vcl::PDFWriter::ListBoxWidget* >( Descriptor.get() );
// drop down
- if( ! (xModelProps->getPropertyValue( "Dropdown" ) >>= pListWidget->DropDown) )
+ if( ! (xModelProps->getPropertyValue( u"Dropdown"_ustr ) >>= pListWidget->DropDown) )
SAL_WARN("toolkit.helper", "describePDFControl: unable to get property Dropdown");
// multi selection
- if( ! (xModelProps->getPropertyValue("MultiSelection") >>= pListWidget->MultiSelect) )
+ if( ! (xModelProps->getPropertyValue(u"MultiSelection"_ustr) >>= pListWidget->MultiSelect) )
SAL_WARN("toolkit.helper", "describePDFControl: unable to get property MultiSelection");
// entries
@@ -782,7 +782,7 @@ namespace toolkitform
// get selected items
Sequence< sal_Int16 > aSelectIndices;
- if( ! (xModelProps->getPropertyValue("SelectedItems") >>= aSelectIndices) )
+ if( ! (xModelProps->getPropertyValue(u"SelectedItems"_ustr) >>= aSelectIndices) )
SAL_WARN("toolkit.helper", "describePDFControl: unable to get property SelectedItems");
if( aSelectIndices.hasElements() )
{
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 3979d3882b7c..31ca14215561 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2347,7 +2347,7 @@ void GDIMetaFile::UseCanvas( bool _bUseCanvas )
void GDIMetaFile::dumpAsXml(const char* pFileName) const
{
- SvFileStream aStream(pFileName ? OUString::fromUtf8(pFileName) : OUString("file:///tmp/metafile.xml"),
+ SvFileStream aStream(pFileName ? OUString::fromUtf8(pFileName) : u"file:///tmp/metafile.xml"_ustr,
StreamMode::STD_READWRITE | StreamMode::TRUNC);
assert(aStream.good());
MetafileXmlDump aDumper;
diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/mtfxmldump.cxx
index 2792297feeca..0f251f535d18 100644
--- a/vcl/source/gdi/mtfxmldump.cxx
+++ b/vcl/source/gdi/mtfxmldump.cxx
@@ -29,9 +29,9 @@ namespace
OUString collectPushFlags(vcl::PushFlags nFlags)
{
if ((nFlags & vcl::PushFlags::ALL) == vcl::PushFlags::ALL)
- return "PushAll";
+ return u"PushAll"_ustr;
else if ((nFlags & PUSH_ALLFONT) == PUSH_ALLFONT)
- return "PushAllFont";
+ return u"PushAllFont"_ustr;
std::vector<OUString> aStrings;
@@ -118,7 +118,7 @@ OUString convertDrawTextFlagsToString(DrawTextFlags eDrawTextFlags)
OUString aString;
if (aStrings.empty())
- return "None";
+ return u"None"_ustr;
aString = aStrings[0];
for (size_t i = 1; i < aStrings.size(); ++i)
@@ -132,11 +132,11 @@ OUString convertRopToString(RasterOp eRop)
{
switch (eRop)
{
- case RasterOp::OverPaint: return "overpaint";
- case RasterOp::Xor: return "xor";
- case RasterOp::N0: return "0";
- case RasterOp::N1: return "1";
- case RasterOp::Invert: return "invert";
+ case RasterOp::OverPaint: return u"overpaint"_ustr;
+ case RasterOp::Xor: return u"xor"_ustr;
+ case RasterOp::N0: return u"0"_ustr;
+ case RasterOp::N1: return u"1"_ustr;
+ case RasterOp::Invert: return u"invert"_ustr;
}
return OUString();
}
@@ -145,10 +145,10 @@ OUString convertTextAlignToString(TextAlign eAlign)
{
switch (eAlign)
{
- case ALIGN_BASELINE: return "baseline";
- case ALIGN_BOTTOM: return "bottom";
- case ALIGN_TOP: return "top";
- case TextAlign_FORCE_EQUAL_SIZE: return "equalsize";
+ case ALIGN_BASELINE: return u"baseline"_ustr;
+ case ALIGN_BOTTOM: return u"bottom"_ustr;
+ case ALIGN_TOP: return u"top"_ustr;
+ case TextAlign_FORCE_EQUAL_SIZE: return u"equalsize"_ustr;
}
return OUString();
}
@@ -163,9 +163,9 @@ OUString convertLineStyleToString(LineStyle eAlign)
{
switch (eAlign)
{
- case LineStyle::NONE: return "none";
- case LineStyle::Solid: return "solid";
- case LineStyle::Dash: return "dash";
+ case LineStyle::NONE: return u"none"_ustr;
+ case LineStyle::Solid: return u"solid"_ustr;
+ case LineStyle::Dash: return u"dash"_ustr;
default: break;
}
return OUString();
@@ -176,10 +176,10 @@ OUString convertLineJoinToString(basegfx::B2DLineJoin eJoin)
switch (eJoin)
{
default:
- case basegfx::B2DLineJoin::NONE: return "none";
- case basegfx::B2DLineJoin::Bevel: return "bevel";
- case basegfx::B2DLineJoin::Miter: return "miter";
- case basegfx::B2DLineJoin::Round: return "round";
+ case basegfx::B2DLineJoin::NONE: return u"none"_ustr;
+ case basegfx::B2DLineJoin::Bevel: return u"bevel"_ustr;
+ case basegfx::B2DLineJoin::Miter: return u"miter"_ustr;
+ case basegfx::B2DLineJoin::Round: return u"round"_ustr;
}
}
@@ -188,9 +188,9 @@ OUString convertLineCapToString(css::drawing::LineCap eCap)
switch (eCap)
{
default:
- case css::drawing::LineCap_BUTT: return "butt";
- case css::drawing::LineCap_ROUND: return "round";
- case css::drawing::LineCap_SQUARE: return "square";
+ case css::drawing::LineCap_BUTT: return u"butt"_ustr;
+ case css::drawing::LineCap_ROUND: return u"round"_ustr;
+ case css::drawing::LineCap_SQUARE: return u"square"_ustr;
}
}
@@ -199,10 +199,10 @@ OUString convertPolygonFlags(PolyFlags eFlags)
switch (eFlags)
{
default:
- case PolyFlags::Normal: return "normal";
- case PolyFlags::Control: return "control";
- case PolyFlags::Smooth: return "smooth";
- case PolyFlags::Symmetric: return "symmetric";
+ case PolyFlags::Normal: return u"normal"_ustr;
+ case PolyFlags::Control: return u"control"_ustr;
+ case PolyFlags::Smooth: return u"smooth"_ustr;
+ case PolyFlags::Symmetric: return u"symmetric"_ustr;
}
}
@@ -210,18 +210,18 @@ OUString convertFontWeightToString(FontWeight eFontWeight)
{
switch (eFontWeight)
{
- case WEIGHT_DONTKNOW: return "unknown";
- case WEIGHT_THIN: return "thin";
- case WEIGHT_ULTRALIGHT: return "ultralight";
- case WEIGHT_LIGHT: return "light";
- case WEIGHT_SEMILIGHT: return "semilight";
- case WEIGHT_NORMAL: return "normal";
- case WEIGHT_MEDIUM: return "medium";
- case WEIGHT_SEMIBOLD: return "semibold";
- case WEIGHT_BOLD: return "bold";
- case WEIGHT_ULTRABOLD: return "ultrabold";
- case WEIGHT_BLACK: return "black";
- case FontWeight_FORCE_EQUAL_SIZE: return "equalsize";
+ case WEIGHT_DONTKNOW: return u"unknown"_ustr;
+ case WEIGHT_THIN: return u"thin"_ustr;
+ case WEIGHT_ULTRALIGHT: return u"ultralight"_ustr;
+ case WEIGHT_LIGHT: return u"light"_ustr;
+ case WEIGHT_SEMILIGHT: return u"semilight"_ustr;
+ case WEIGHT_NORMAL: return u"normal"_ustr;
+ case WEIGHT_MEDIUM: return u"medium"_ustr;
+ case WEIGHT_SEMIBOLD: return u"semibold"_ustr;
+ case WEIGHT_BOLD: return u"bold"_ustr;
+ case WEIGHT_ULTRABOLD: return u"ultrabold"_ustr;
+ case WEIGHT_BLACK: return u"black"_ustr;
+ case FontWeight_FORCE_EQUAL_SIZE: return u"equalsize"_ustr;
}
return OUString();
}
@@ -230,14 +230,14 @@ OUString convertFontStrikeoutToString(FontStrikeout eFontStrikeout)
{
switch (eFontStrikeout)
{
- case STRIKEOUT_NONE: return "none";
- case STRIKEOUT_SINGLE: return "single";
- case STRIKEOUT_DOUBLE: return "double";
- case STRIKEOUT_DONTKNOW: return "dontknow";
- case STRIKEOUT_BOLD: return "bold";
- case STRIKEOUT_SLASH: return "slash";
- case STRIKEOUT_X: return "x";
- case FontStrikeout_FORCE_EQUAL_SIZE: return "equalsize";
+ case STRIKEOUT_NONE: return u"none"_ustr;
+ case STRIKEOUT_SINGLE: return u"single"_ustr;
+ case STRIKEOUT_DOUBLE: return u"double"_ustr;
+ case STRIKEOUT_DONTKNOW: return u"dontknow"_ustr;
+ case STRIKEOUT_BOLD: return u"bold"_ustr;
+ case STRIKEOUT_SLASH: return u"slash"_ustr;
+ case STRIKEOUT_X: return u"x"_ustr;
+ case FontStrikeout_FORCE_EQUAL_SIZE: return u"equalsize"_ustr;
}
return OUString();
}
@@ -246,26 +246,26 @@ OUString convertFontLineStyleToString(FontLineStyle eFontLineStyle)
{
switch (eFontLineStyle)
{
- case LINESTYLE_NONE: return "none";
- case LINESTYLE_SINGLE: return "single";
- case LINESTYLE_DOUBLE: return "double";
- case LINESTYLE_DOTTED: return "dotted";
- case LINESTYLE_DONTKNOW: return "dontknow";
- case LINESTYLE_DASH: return "dash";
- case LINESTYLE_LONGDASH: return "longdash";
- case LINESTYLE_DASHDOT: return "dashdot";
- case LINESTYLE_DASHDOTDOT: return "dashdotdot";
- case LINESTYLE_SMALLWAVE: return "smallwave";
- case LINESTYLE_WAVE: return "wave";
- case LINESTYLE_DOUBLEWAVE: return "doublewave";
- case LINESTYLE_BOLD: return "bold";
- case LINESTYLE_BOLDDOTTED: return "bolddotted";
- case LINESTYLE_BOLDDASH: return "bolddash";
- case LINESTYLE_BOLDLONGDASH: return "boldlongdash";
- case LINESTYLE_BOLDDASHDOT: return "bolddashdot";
- case LINESTYLE_BOLDDASHDOTDOT: return "bolddashdotdot";
- case LINESTYLE_BOLDWAVE: return "boldwave";
- case FontLineStyle_FORCE_EQUAL_SIZE: return "equalsize";
+ case LINESTYLE_NONE: return u"none"_ustr;
+ case LINESTYLE_SINGLE: return u"single"_ustr;
+ case LINESTYLE_DOUBLE: return u"double"_ustr;
+ case LINESTYLE_DOTTED: return u"dotted"_ustr;
+ case LINESTYLE_DONTKNOW: return u"dontknow"_ustr;
+ case LINESTYLE_DASH: return u"dash"_ustr;
+ case LINESTYLE_LONGDASH: return u"longdash"_ustr;
+ case LINESTYLE_DASHDOT: return u"dashdot"_ustr;
+ case LINESTYLE_DASHDOTDOT: return u"dashdotdot"_ustr;
+ case LINESTYLE_SMALLWAVE: return u"smallwave"_ustr;
+ case LINESTYLE_WAVE: return u"wave"_ustr;
+ case LINESTYLE_DOUBLEWAVE: return u"doublewave"_ustr;
+ case LINESTYLE_BOLD: return u"bold"_ustr;
+ case LINESTYLE_BOLDDOTTED: return u"bolddotted"_ustr;
+ case LINESTYLE_BOLDDASH: return u"bolddash"_ustr;
+ case LINESTYLE_BOLDLONGDASH: return u"boldlongdash"_ustr;
+ case LINESTYLE_BOLDDASHDOT: return u"bolddashdot"_ustr;
+ case LINESTYLE_BOLDDASHDOTDOT: return u"bolddashdotdot"_ustr;
+ case LINESTYLE_BOLDWAVE: return u"boldwave"_ustr;
+ case FontLineStyle_FORCE_EQUAL_SIZE: return u"equalsize"_ustr;
}
return OUString();
}
@@ -335,9 +335,9 @@ OString convertLineStyleToString(const MetaActionType nActionType)
OUString convertBitmapExTransparentType(BitmapEx const & rBitmapEx)
{
if (rBitmapEx.IsAlpha())
- return "bitmap";
+ return u"bitmap"_ustr;
else
- return "none";
+ return u"none"_ustr;
}
OUString convertMapUnitToString(MapUnit eUnit)
@@ -345,21 +345,21 @@ OUString convertMapUnitToString(MapUnit eUnit)
switch (eUnit)
{
default:
- case MapUnit::LASTENUMDUMMY: return "LASTENUMDUMMY";
- case MapUnit::Map1000thInch: return "Map1000thInch";
- case MapUnit::Map100thInch: return "Map100thInch";
- case MapUnit::Map100thMM: return "Map100thMM";
- case MapUnit::Map10thInch: return "Map10thInch";
- case MapUnit::Map10thMM: return "Map10thMM";
- case MapUnit::MapAppFont: return "MapAppFont";
- case MapUnit::MapCM: return "MapCM";
- case MapUnit::MapInch: return "MapInch";
- case MapUnit::MapMM: return "MapMM";
- case MapUnit::MapPixel: return "MapPixel";
- case MapUnit::MapPoint: return "MapPoint";
- case MapUnit::MapRelative: return "MapRelative";
- case MapUnit::MapSysFont: return "MapSysFont";
- case MapUnit::MapTwip: return "MapTwip";
+ case MapUnit::LASTENUMDUMMY: return u"LASTENUMDUMMY"_ustr;
+ case MapUnit::Map1000thInch: return u"Map1000thInch"_ustr;
+ case MapUnit::Map100thInch: return u"Map100thInch"_ustr;
+ case MapUnit::Map100thMM: return u"Map100thMM"_ustr;
+ case MapUnit::Map10thInch: return u"Map10thInch"_ustr;
+ case MapUnit::Map10thMM: return u"Map10thMM"_ustr;
+ case MapUnit::MapAppFont: return u"MapAppFont"_ustr;
+ case MapUnit::MapCM: return u"MapCM"_ustr;
+ case MapUnit::MapInch: return u"MapInch"_ustr;
+ case MapUnit::MapMM: return u"MapMM"_ustr;
+ case MapUnit::MapPixel: return u"MapPixel"_ustr;
+ case MapUnit::MapPoint: return u"MapPoint"_ustr;
+ case MapUnit::MapRelative: return u"MapRelative"_ustr;
+ case MapUnit::MapSysFont: return u"MapSysFont"_ustr;
+ case MapUnit::MapTwip: return u"MapTwip"_ustr;
}
}
@@ -376,13 +376,13 @@ OUString convertGradientStyleToOUString(css::awt::GradientStyle eStyle)
{
switch (eStyle)
{
- case css::awt::GradientStyle_LINEAR: return "Linear";
- case css::awt::GradientStyle_AXIAL: return "Axial";
- case css::awt::GradientStyle_RADIAL: return "Radial";
- case css::awt::GradientStyle_ELLIPTICAL: return "Elliptical";
- case css::awt::GradientStyle_SQUARE: return "Square";
- case css::awt::GradientStyle_RECT: return "Rect";
- case css::awt::GradientStyle::GradientStyle_MAKE_FIXED_SIZE: return "ForceEqualSize";
+ case css::awt::GradientStyle_LINEAR: return u"Linear"_ustr;
+ case css::awt::GradientStyle_AXIAL: return u"Axial"_ustr;
+ case css::awt::GradientStyle_RADIAL: return u"Radial"_ustr;
+ case css::awt::GradientStyle_ELLIPTICAL: return u"Elliptical"_ustr;
+ case css::awt::GradientStyle_SQUARE: return u"Square"_ustr;
+ case css::awt::GradientStyle_RECT: return u"Rect"_ustr;
+ case css::awt::GradientStyle::GradientStyle_MAKE_FIXED_SIZE: return u"ForceEqualSize"_ustr;
}
return OUString();
}
@@ -391,10 +391,10 @@ OUString convertHatchStyle(HatchStyle eStyle)
{
switch (eStyle)
{
- case HatchStyle::Single: return "Single";
- case HatchStyle::Double: return "Double";
- case HatchStyle::Triple: return "Triple";
- case HatchStyle::FORCE_EQUAL_SIZE: return "ForceEqualSize";
+ case HatchStyle::Single: return u"Single"_ustr;
+ case HatchStyle::Double: return u"Double"_ustr;
+ case HatchStyle::Triple: return u"Triple"_ustr;
+ case HatchStyle::FORCE_EQUAL_SIZE: return u"ForceEqualSize"_ustr;
}
return OUString();
}
@@ -410,19 +410,19 @@ OUString convertWallpaperStyleToString(WallpaperStyle eWallpaperStyle)
{
switch (eWallpaperStyle)
{
- case WallpaperStyle::NONE: return "NONE";
- case WallpaperStyle::Tile: return "Tile";
- case WallpaperStyle::Center: return "Center";
- case WallpaperStyle::Scale: return "Scale";
- case WallpaperStyle::TopLeft: return "TopLeft";
- case WallpaperStyle::Top: return "Top";
- case WallpaperStyle::TopRight: return "TopRight";
- case WallpaperStyle::Left: return "Left";
- case WallpaperStyle::Right: return "Right";
- case WallpaperStyle::BottomLeft: return "BottomLeft";
- case WallpaperStyle::Bottom: return "Bottom";
- case WallpaperStyle::BottomRight: return "BottomRight";
- case WallpaperStyle::ApplicationGradient: return "ApplicationGradient";
+ case WallpaperStyle::NONE: return u"NONE"_ustr;
+ case WallpaperStyle::Tile: return u"Tile"_ustr;
+ case WallpaperStyle::Center: return u"Center"_ustr;
+ case WallpaperStyle::Scale: return u"Scale"_ustr;
+ case WallpaperStyle::TopLeft: return u"TopLeft"_ustr;
+ case WallpaperStyle::Top: return u"Top"_ustr;
+ case WallpaperStyle::TopRight: return u"TopRight"_ustr;
+ case WallpaperStyle::Left: return u"Left"_ustr;
+ case WallpaperStyle::Right: return u"Right"_ustr;
+ case WallpaperStyle::BottomLeft: return u"BottomLeft"_ustr;
+ case WallpaperStyle::Bottom: return u"Bottom"_ustr;
+ case WallpaperStyle::BottomRight: return u"BottomRight"_ustr;
+ case WallpaperStyle::ApplicationGradient: return u"ApplicationGradient"_ustr;
}
return OUString();
}
@@ -431,10 +431,10 @@ OUString convertPixelFormatToString(vcl::PixelFormat ePixelFormat)
{
switch (ePixelFormat)
{
- case vcl::PixelFormat::INVALID: return "INVALID";
- case vcl::PixelFormat::N8_BPP: return "8BPP";
- case vcl::PixelFormat::N24_BPP: return "24BPP";
- case vcl::PixelFormat::N32_BPP: return "32BPP";
+ case vcl::PixelFormat::INVALID: return u"INVALID"_ustr;
+ case vcl::PixelFormat::N8_BPP: return u"8BPP"_ustr;
+ case vcl::PixelFormat::N24_BPP: return u"24BPP"_ustr;
+ case vcl::PixelFormat::N32_BPP: return u"32BPP"_ustr;
}
return OUString();
}
@@ -442,7 +442,7 @@ OUString convertPixelFormatToString(vcl::PixelFormat ePixelFormat)
OUString convertComplexTestLayoutFlags(vcl::text::ComplexTextLayoutFlags nFlags)
{
if (nFlags == vcl::text::ComplexTextLayoutFlags::Default)
- return "Default";
+ return u"Default"_ustr;
std::vector<OUString> aStrings;
@@ -472,20 +472,20 @@ OUString convertGfxLinkTypeToString(GfxLinkType eGfxLinkType)
{
switch(eGfxLinkType)
{
- case GfxLinkType::EpsBuffer: return "EpsBuffer";
- case GfxLinkType::NativeBmp: return "NativeBmp";
- case GfxLinkType::NativeGif: return "NativeGif";
- case GfxLinkType::NativeJpg: return "NativeJpg";
- case GfxLinkType::NativeMet: return "NativeMet";
- case GfxLinkType::NativeMov: return "NativeMov";
- case GfxLinkType::NativePct: return "NativePct";
- case GfxLinkType::NativePdf: return "NativePdf";
- case GfxLinkType::NativePng: return "NativePng";
- case GfxLinkType::NativeSvg: return "NativeSvg";
- case GfxLinkType::NativeTif: return "NativeTif";
- case GfxLinkType::NativeWmf: return "NativeWmf";
- case GfxLinkType::NativeWebp: return "NativeWebp";
- case GfxLinkType::NONE: return "None";
+ case GfxLinkType::EpsBuffer: return u"EpsBuffer"_ustr;
+ case GfxLinkType::NativeBmp: return u"NativeBmp"_ustr;
+ case GfxLinkType::NativeGif: return u"NativeGif"_ustr;
+ case GfxLinkType::NativeJpg: return u"NativeJpg"_ustr;
+ case GfxLinkType::NativeMet: return u"NativeMet"_ustr;
+ case GfxLinkType::NativeMov: return u"NativeMov"_ustr;
+ case GfxLinkType::NativePct: return u"NativePct"_ustr;
+ case GfxLinkType::NativePdf: return u"NativePdf"_ustr;
+ case GfxLinkType::NativePng: return u"NativePng"_ustr;
+ case GfxLinkType::NativeSvg: return u"NativeSvg"_ustr;
+ case GfxLinkType::NativeTif: return u"NativeTif"_ustr;
+ case GfxLinkType::NativeWmf: return u"NativeWmf"_ustr;
+ case GfxLinkType::NativeWebp: return u"NativeWebp"_ustr;
+ case GfxLinkType::NONE: return u"None"_ustr;
}
return OUString();
}
diff --git a/vcl/source/gdi/oldprintadaptor.cxx b/vcl/source/gdi/oldprintadaptor.cxx
index 7cdee7b0fa88..d42b02f866ce 100644
--- a/vcl/source/gdi/oldprintadaptor.cxx
+++ b/vcl/source/gdi/oldprintadaptor.cxx
@@ -93,7 +93,7 @@ Sequence< PropertyValue > OldStylePrintAdaptor::getPageParameters( int i_nPage )
css::awt::Size aSize;
if( i_nPage < int(mpData->maPages.size() ) )
aSize = mpData->maPages[i_nPage].maPageSize;
- return { comphelper::makePropertyValue("PageSize", css::uno::Any(aSize)) };
+ return { comphelper::makePropertyValue(u"PageSize"_ustr, css::uno::Any(aSize)) };
}
void OldStylePrintAdaptor::printPage( int i_nPage ) const
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index cf5a5fc39546..3474c94c8a72 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1260,7 +1260,7 @@ PDFWriterImpl::PDFWriterImpl( const PDFWriter::PDFWriterContext& rContext,
//m_StructElementStack.push(0);
Font aFont;
- aFont.SetFamilyName( "Times" );
+ aFont.SetFamilyName( u"Times"_ustr );
aFont.SetFontSize( Size( 0, 12 ) );
// tdf#150786 use the same settings for widgets regardless of theme
@@ -1738,7 +1738,7 @@ void PDFWriterImpl::endPage()
// reset the default font
Font aFont;
- aFont.SetFamilyName( "Times" );
+ aFont.SetFamilyName( u"Times"_ustr );
aFont.SetFontSize( Size( 0, 12 ) );
m_aCurrentPDFState = m_aGraphicsStack.front();
@@ -4174,7 +4174,7 @@ void PDFWriterImpl::createDefaultPushButtonAppearance( PDFWidget& rButton, const
// (that is before endRedirect())
OStringBuffer aDA( 256 );
appendNonStrokingColor( replaceColor( rWidget.TextColor, rSettings.GetButtonTextColor() ), aDA );
- Font aDummyFont( "Helvetica", aFont.GetFontSize() );
+ Font aDummyFont( u"Helvetica"_ustr, aFont.GetFontSize() );
sal_Int32 nDummyBuildin = getBestBuildinFont( aDummyFont );
aDA.append( ' ' );
aDA.append(pdf::BuildinFontFace::Get(nDummyBuildin).getNameObject());
@@ -4405,7 +4405,7 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
// being present, but our own OpenSymbol - N.B. PDF/A for good
// reasons require even the standard PS fonts to be embedded!
Push();
- SetFont( Font( OUString( "OpenSymbol" ), aFont.GetFontSize() ) );
+ SetFont( Font( u"OpenSymbol"_ustr, aFont.GetFontSize() ) );
const LogicalFontInstance* pFontInstance = GetFontInstance();
const vcl::font::PhysicalFontFace* pFace = pFontInstance->GetFontFace();
Pop();
@@ -7764,7 +7764,7 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, tools::Long nWidth, Fo
//See qadevOOo/testdocs/StrikeThrough.odt for examples if you need
//to tweak this
- OUString aStrikeoutChar = eStrikeout == STRIKEOUT_SLASH ? OUString( "/" ) : OUString( "X" );
+ OUString aStrikeoutChar = eStrikeout == STRIKEOUT_SLASH ? u"/"_ustr : u"X"_ustr;
OUString aStrikeout = aStrikeoutChar;
while( GetTextWidth( aStrikeout ) < nWidth )
aStrikeout += aStrikeout;
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index b83a41b2c556..0820e80c07d1 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -203,8 +203,8 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
Graphic aGraphic(BitmapEx(aBitmapEx.GetBitmap()));
Sequence< PropertyValue > aFilterData{
- comphelper::makePropertyValue("Quality", sal_Int32(i_rContext.m_nJPEGQuality)),
- comphelper::makePropertyValue("ColorMode", sal_Int32(0))
+ comphelper::makePropertyValue(u"Quality"_ustr, sal_Int32(i_rContext.m_nJPEGQuality)),
+ comphelper::makePropertyValue(u"ColorMode"_ustr, sal_Int32(0))
};
try
@@ -216,9 +216,9 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
uno::Reference< graphic::XGraphic > xGraphic( aGraphic.GetXGraphic() );
uno::Reference < io::XOutputStream > xOut( xStream->getOutputStream() );
uno::Sequence< beans::PropertyValue > aOutMediaProperties{
- comphelper::makePropertyValue("OutputStream", xOut),
- comphelper::makePropertyValue("MimeType", OUString("image/jpeg")),
- comphelper::makePropertyValue("FilterData", aFilterData)
+ comphelper::makePropertyValue(u"OutputStream"_ustr, xOut),
+ comphelper::makePropertyValue(u"MimeType"_ustr, u"image/jpeg"_ustr),
+ comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData)
};
xGraphicProvider->storeGraphic( xGraphic, aOutMediaProperties );
xOut->flush();
@@ -231,13 +231,13 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
pStrm->Seek( STREAM_SEEK_TO_END );
xSeekable->seek( 0 );
- Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue("InputStream",
+ Sequence< PropertyValue > aArgs{ comphelper::makePropertyValue(u"InputStream"_ustr,
xStream) };
uno::Reference< XPropertySet > xPropSet( xGraphicProvider->queryGraphicDescriptor( aArgs ) );
if ( xPropSet.is() )
{
sal_Int16 nBitsPerPixel = 24;
- if ( xPropSet->getPropertyValue("BitsPerPixel") >>= nBitsPerPixel )
+ if ( xPropSet->getPropertyValue(u"BitsPerPixel"_ustr) >>= nBitsPerPixel )
{
bTrueColorJPG = nBitsPerPixel != 8;
}
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 5f5e0e0327c9..1111c1e86143 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -272,15 +272,15 @@ static OUString queryFile( Printer const * pPrinter )
bPDF = false;
}
if( bPS )
- xFilePicker->appendFilter( "PostScript", "*.ps" );
+ xFilePicker->appendFilter( u"PostScript"_ustr, u"*.ps"_ustr );
if( bPDF )
- xFilePicker->appendFilter( "Portable Document Format", "*.pdf" );
+ xFilePicker->appendFilter( u"Portable Document Format"_ustr, u"*.pdf"_ustr );
#elif defined _WIN32
(void)pPrinter;
xFilePicker->appendFilter( "*.PRN", "*.prn" );
#endif
// add arbitrary files
- xFilePicker->appendFilter(VclResId(SV_STDTEXT_ALLFILETYPES), "*.*");
+ xFilePicker->appendFilter(VclResId(SV_STDTEXT_ALLFILETYPES), u"*.*"_ustr);
}
catch (const css::lang::IllegalArgumentException&)
{
@@ -325,7 +325,7 @@ void Printer::PrintJob(const std::shared_ptr<PrinterController>& i_xController,
const JobSetup& i_rInitSetup)
{
bool bSynchronous = false;
- css::beans::PropertyValue* pVal = i_xController->getValue( "Wait" );
+ css::beans::PropertyValue* pVal = i_xController->getValue( u"Wait"_ustr );
if( pVal )
pVal->Value >>= bSynchronous;
@@ -346,11 +346,11 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
{
if (xController->isShowDialogs())
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(xController->getWindow(), "vcl/ui/errornoprinterdialog.ui"));
- std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("ErrorNoPrinterDialog"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(xController->getWindow(), u"vcl/ui/errornoprinterdialog.ui"_ustr));
+ std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"ErrorNoPrinterDialog"_ustr));
xBox->run();
}
- xController->setValue( "IsDirect",
+ xController->setValue( u"IsDirect"_ustr,
css::uno::Any( false ) );
}
@@ -380,12 +380,12 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
// "Pages" attribute from API is now equivalent to "PageRange"
// AND "PrintContent" = 1 except calc where it is "PrintRange" = 1
// Argh ! That sure needs cleaning up
- css::beans::PropertyValue* pContentVal = xController->getValue("PrintRange");
+ css::beans::PropertyValue* pContentVal = xController->getValue(u"PrintRange"_ustr);
if( ! pContentVal )
- pContentVal = xController->getValue("PrintContent");
+ pContentVal = xController->getValue(u"PrintContent"_ustr);
// case 1: UNO API has set "Pages"
- css::beans::PropertyValue* pPagesVal = xController->getValue("Pages");
+ css::beans::PropertyValue* pPagesVal = xController->getValue(u"Pages"_ustr);
if( pPagesVal )
{
OUString aPagesVal;
@@ -398,7 +398,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
if( pContentVal )
{
pContentVal->Value <<= sal_Int32( 1 );
- xController->setValue("PageRange", pPagesVal->Value);
+ xController->setValue(u"PageRange"_ustr, pPagesVal->Value);
}
}
}
@@ -411,7 +411,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
if( nContent == 0 )
{
// do not overwrite PageRange if it is already set
- css::beans::PropertyValue* pRangeVal = xController->getValue("PageRange");
+ css::beans::PropertyValue* pRangeVal = xController->getValue(u"PageRange"_ustr);
OUString aRange;
if( pRangeVal )
pRangeVal->Value >>= aRange;
@@ -426,14 +426,14 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
{
aBuf.append( "-" + OUString::number( nPages ) );
}
- xController->setValue("PageRange", css::uno::Any(aBuf.makeStringAndClear()));
+ xController->setValue(u"PageRange"_ustr, css::uno::Any(aBuf.makeStringAndClear()));
}
}
}
}
}
- css::beans::PropertyValue* pReverseVal = xController->getValue("PrintReverse");
+ css::beans::PropertyValue* pReverseVal = xController->getValue(u"PrintReverse"_ustr);
if( pReverseVal )
{
bool bReverse = false;
@@ -441,7 +441,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
xController->setReversePrint( bReverse );
}
- css::beans::PropertyValue* pPapersizeFromSetupVal = xController->getValue("PapersizeFromSetup");
+ css::beans::PropertyValue* pPapersizeFromSetupVal = xController->getValue(u"PapersizeFromSetup"_ustr);
if( pPapersizeFromSetupVal )
{
bool bPapersizeFromSetup = false;
@@ -450,35 +450,35 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
}
// setup NUp printing from properties
- sal_Int32 nRows = xController->getIntProperty("NUpRows", 1);
- sal_Int32 nCols = xController->getIntProperty("NUpColumns", 1);
+ sal_Int32 nRows = xController->getIntProperty(u"NUpRows"_ustr, 1);
+ sal_Int32 nCols = xController->getIntProperty(u"NUpColumns"_ustr, 1);
if( nRows > 1 || nCols > 1 )
{
PrinterController::MultiPageSetup aMPS;
aMPS.nRows = std::max<sal_Int32>(nRows, 1);
aMPS.nColumns = std::max<sal_Int32>(nCols, 1);
- sal_Int32 nValue = xController->getIntProperty("NUpPageMarginLeft", aMPS.nLeftMargin);
+ sal_Int32 nValue = xController->getIntProperty(u"NUpPageMarginLeft"_ustr, aMPS.nLeftMargin);
if( nValue >= 0 )
aMPS.nLeftMargin = nValue;
- nValue = xController->getIntProperty("NUpPageMarginRight", aMPS.nRightMargin);
+ nValue = xController->getIntProperty(u"NUpPageMarginRight"_ustr, aMPS.nRightMargin);
if( nValue >= 0 )
aMPS.nRightMargin = nValue;
- nValue = xController->getIntProperty( "NUpPageMarginTop", aMPS.nTopMargin );
+ nValue = xController->getIntProperty( u"NUpPageMarginTop"_ustr, aMPS.nTopMargin );
if( nValue >= 0 )
aMPS.nTopMargin = nValue;
- nValue = xController->getIntProperty( "NUpPageMarginBottom", aMPS.nBottomMargin );
+ nValue = xController->getIntProperty( u"NUpPageMarginBottom"_ustr, aMPS.nBottomMargin );
if( nValue >= 0 )
aMPS.nBottomMargin = nValue;
- nValue = xController->getIntProperty( "NUpHorizontalSpacing", aMPS.nHorizontalSpacing );
+ nValue = xController->getIntProperty( u"NUpHorizontalSpacing"_ustr, aMPS.nHorizontalSpacing );
if( nValue >= 0 )
aMPS.nHorizontalSpacing = nValue;
- nValue = xController->getIntProperty( "NUpVerticalSpacing", aMPS.nVerticalSpacing );
+ nValue = xController->getIntProperty( u"NUpVerticalSpacing"_ustr, aMPS.nVerticalSpacing );
if( nValue >= 0 )
aMPS.nVerticalSpacing = nValue;
- aMPS.bDrawBorder = xController->getBoolProperty( "NUpDrawBorder", aMPS.bDrawBorder );
- aMPS.nOrder = static_cast<NupOrderType>(xController->getIntProperty( "NUpSubPageOrder", static_cast<sal_Int32>(aMPS.nOrder) ));
+ aMPS.bDrawBorder = xController->getBoolProperty( u"NUpDrawBorder"_ustr, aMPS.bDrawBorder );
+ aMPS.nOrder = static_cast<NupOrderType>(xController->getIntProperty( u"NUpSubPageOrder"_ustr, static_cast<sal_Int32>(aMPS.nOrder) ));
aMPS.aPaperSize = xController->getPrinter()->PixelToLogic( xController->getPrinter()->GetPaperSizePixel(), MapMode( MapUnit::Map100thMM ) );
- css::beans::PropertyValue* pPgSizeVal = xController->getValue( "NUpPaperSize" );
+ css::beans::PropertyValue* pPgSizeVal = xController->getValue( u"NUpPaperSize"_ustr );
css::awt::Size aSizeVal;
if( pPgSizeVal && (pPgSizeVal->Value >>= aSizeVal) )
{
@@ -495,8 +495,8 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
{
if( xController->getFilteredPageCount() == 0 )
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(xController->getWindow(), "vcl/ui/errornocontentdialog.ui"));
- std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog("ErrorNoContentDialog"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(xController->getWindow(), u"vcl/ui/errornocontentdialog.ui"_ustr));
+ std::unique_ptr<weld::MessageDialog> xBox(xBuilder->weld_message_dialog(u"ErrorNoContentDialog"_ustr));
xBox->run();
return false;
}
@@ -525,7 +525,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
xController->abortJob();
return false;
}
- xController->setValue( "LocalFileName",
+ xController->setValue( u"LocalFileName"_ustr,
css::uno::Any( aFile ) );
}
else if (aDlg.isSingleJobs())
@@ -555,7 +555,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
bool Printer::ExecutePrintJob(const std::shared_ptr<PrinterController>& xController)
{
OUString aJobName;
- css::beans::PropertyValue* pJobNameVal = xController->getValue( "JobName" );
+ css::beans::PropertyValue* pJobNameVal = xController->getValue( u"JobName"_ustr );
if( pJobNameVal )
pJobNameVal->Value >>= aJobName;
@@ -618,7 +618,7 @@ bool Printer::StartJob( const OUString& i_rJobName, std::shared_ptr<vcl::Printer
bool bSinglePrintJobs = i_xController->getPrinter()->IsSinglePrintJobs();
- css::beans::PropertyValue* pFileValue = i_xController->getValue("LocalFileName");
+ css::beans::PropertyValue* pFileValue = i_xController->getValue(u"LocalFileName"_ustr);
if( pFileValue )
{
OUString aFile;
@@ -778,8 +778,8 @@ bool Printer::StartJob( const OUString& i_rJobName, std::shared_ptr<vcl::Printer
if (i_xController->isShowDialogs() && !i_xController->isDirectPrint())
{
SettingsConfigItem* pItem = SettingsConfigItem::get();
- pItem->setValue( "PrintDialog",
- "LastPrinterUsed",
+ pItem->setValue( u"PrintDialog"_ustr,
+ u"LastPrinterUsed"_ustr,
GetName()
);
}
@@ -839,7 +839,7 @@ void PrinterController::setPrinter( const VclPtr<Printer>& i_rPrinter )
}
mpImplData->mxPrinter = i_rPrinter;
- setValue( "Name",
+ setValue( u"Name"_ustr,
css::uno::Any( i_rPrinter->GetName() ) );
mpImplData->mnDefaultPaperBin = mpImplData->mxPrinter->GetPaperBin();
mpImplData->mxPrinter->Push();
@@ -1501,7 +1501,7 @@ css::uno::Sequence< css::beans::PropertyValue > PrinterController::getJobPropert
pResult[nCur++] = rPropVal;
}
// append IsFirstPage
- if( aMergeSet.find( "IsFirstPage" ) == aMergeSet.end() )
+ if( aMergeSet.find( u"IsFirstPage"_ustr ) == aMergeSet.end() )
{
css::beans::PropertyValue aVal;
aVal.Name = "IsFirstPage";
@@ -1509,7 +1509,7 @@ css::uno::Sequence< css::beans::PropertyValue > PrinterController::getJobPropert
pResult[nCur++] = aVal;
}
// append IsLastPage
- if( aMergeSet.find( "IsLastPage" ) == aMergeSet.end() )
+ if( aMergeSet.find( u"IsLastPage"_ustr ) == aMergeSet.end() )
{
css::beans::PropertyValue aVal;
aVal.Name = "IsLastPage";
@@ -1517,7 +1517,7 @@ css::uno::Sequence< css::beans::PropertyValue > PrinterController::getJobPropert
pResult[nCur++] = aVal;
}
// append IsPrinter
- if( aMergeSet.find( "IsPrinter" ) == aMergeSet.end() )
+ if( aMergeSet.find( u"IsPrinter"_ustr ) == aMergeSet.end() )
{
css::beans::PropertyValue aVal;
aVal.Name = "IsPrinter";
@@ -1747,12 +1747,12 @@ void PrinterController::createProgressDialog()
if (!mpImplData->mxProgress)
{
bool bShow = true;
- css::beans::PropertyValue* pMonitor = getValue( "MonitorVisible" );
+ css::beans::PropertyValue* pMonitor = getValue( u"MonitorVisible"_ustr );
if( pMonitor )
pMonitor->Value >>= bShow;
else
{
- const css::beans::PropertyValue* pVal = getValue( "IsApi" );
+ const css::beans::PropertyValue* pVal = getValue( u"IsApi"_ustr );
if( pVal )
{
bool bApi = false;
@@ -1798,23 +1798,23 @@ void PrinterController::pushPropertiesToPrinter()
{
sal_Int32 nCopyCount = 1;
// set copycount and collate
- const css::beans::PropertyValue* pVal = getValue( "CopyCount" );
+ const css::beans::PropertyValue* pVal = getValue( u"CopyCount"_ustr );
if( pVal )
pVal->Value >>= nCopyCount;
bool bCollate = false;
- pVal = getValue( "Collate" );
+ pVal = getValue( u"Collate"_ustr );
if( pVal )
pVal->Value >>= bCollate;
mpImplData->mxPrinter->SetCopyCount( static_cast<sal_uInt16>(nCopyCount), bCollate );
- pVal = getValue("SinglePrintJobs");
+ pVal = getValue(u"SinglePrintJobs"_ustr);
bool bSinglePrintJobs = false;
if (pVal)
pVal->Value >>= bSinglePrintJobs;
mpImplData->mxPrinter->SetSinglePrintJobs(bSinglePrintJobs);
// duplex mode
- pVal = getValue( "DuplexMode" );
+ pVal = getValue( u"DuplexMode"_ustr );
if( pVal )
{
sal_Int16 nDuplex = css::view::DuplexMode::UNKNOWN;
@@ -1830,13 +1830,13 @@ void PrinterController::pushPropertiesToPrinter()
bool PrinterController::isShowDialogs() const
{
- bool bApi = getBoolProperty( "IsApi", false );
+ bool bApi = getBoolProperty( u"IsApi"_ustr, false );
return ! bApi && ! Application::IsHeadlessModeEnabled();
}
bool PrinterController::isDirectPrint() const
{
- bool bDirect = getBoolProperty( "IsDirect", false );
+ bool bDirect = getBoolProperty( u"IsDirect"_ustr, false );
return bDirect;
}
@@ -1918,7 +1918,7 @@ void PrinterOptionsHelper::appendPrintUIOptions( css::uno::Sequence< css::beans:
sal_Int32 nIndex = io_rProps.getLength();
io_rProps.realloc( nIndex+1 );
io_rProps.getArray()[ nIndex ] = comphelper::makePropertyValue(
- "ExtraPrintUIOptions", comphelper::containerToSequence(m_aUIProperties));
+ u"ExtraPrintUIOptions"_ustr, comphelper::containerToSequence(m_aUIProperties));
}
}
@@ -2021,7 +2021,7 @@ css::uno::Any PrinterOptionsHelper::setGroupControlOpt(const OUString& i_rID,
*aHelpId.getArray() = i_rHelpId;
}
css::uno::Sequence< OUString > aIds { i_rID };
- return setUIControlOpt(aIds, i_rTitle, aHelpId, "Group");
+ return setUIControlOpt(aIds, i_rTitle, aHelpId, u"Group"_ustr);
}
css::uno::Any PrinterOptionsHelper::setSubgroupControlOpt(const OUString& i_rID,
@@ -2036,7 +2036,7 @@ css::uno::Any PrinterOptionsHelper::setSubgroupControlOpt(const OUString& i_rID,
*aHelpId.getArray() = i_rHelpId;
}
css::uno::Sequence< OUString > aIds { i_rID };
- return setUIControlOpt(aIds, i_rTitle, aHelpId, "Subgroup", nullptr, i_rControlOptions);
+ return setUIControlOpt(aIds, i_rTitle, aHelpId, u"Subgroup"_ustr, nullptr, i_rControlOptions);
}
css::uno::Any PrinterOptionsHelper::setBoolControlOpt(const OUString& i_rID,
@@ -2056,7 +2056,7 @@ css::uno::Any PrinterOptionsHelper::setBoolControlOpt(const OUString& i_rID,
aVal.Name = i_rProperty;
aVal.Value <<= i_bValue;
css::uno::Sequence< OUString > aIds { i_rID };
- return setUIControlOpt(aIds, i_rTitle, aHelpId, "Bool", &aVal, i_rControlOptions);
+ return setUIControlOpt(aIds, i_rTitle, aHelpId, u"Bool"_ustr, &aVal, i_rControlOptions);
}
css::uno::Any PrinterOptionsHelper::setChoiceRadiosControlOpt(const css::uno::Sequence< OUString >& i_rIDs,
@@ -2082,7 +2082,7 @@ css::uno::Any PrinterOptionsHelper::setChoiceRadiosControlOpt(const css::uno::Se
css::beans::PropertyValue aVal;
aVal.Name = i_rProperty;
aVal.Value <<= i_nValue;
- return setUIControlOpt(i_rIDs, i_rTitle, i_rHelpId, "Radio", &aVal, aOpt);
+ return setUIControlOpt(i_rIDs, i_rTitle, i_rHelpId, u"Radio"_ustr, &aVal, aOpt);
}
css::uno::Any PrinterOptionsHelper::setChoiceListControlOpt(const OUString& i_rID,
@@ -2109,7 +2109,7 @@ css::uno::Any PrinterOptionsHelper::setChoiceListControlOpt(const OUString& i_rI
aVal.Name = i_rProperty;
aVal.Value <<= i_nValue;
css::uno::Sequence< OUString > aIds { i_rID };
- return setUIControlOpt(aIds, i_rTitle, i_rHelpId, "List", &aVal, aOpt);
+ return setUIControlOpt(aIds, i_rTitle, i_rHelpId, u"List"_ustr, &aVal, aOpt);
}
css::uno::Any PrinterOptionsHelper::setRangeControlOpt(const OUString& i_rID,
@@ -2142,7 +2142,7 @@ css::uno::Any PrinterOptionsHelper::setRangeControlOpt(const OUString& i_rID,
aVal.Name = i_rProperty;
aVal.Value <<= i_nValue;
css::uno::Sequence< OUString > aIds { i_rID };
- return setUIControlOpt(aIds, i_rTitle, aHelpId, "Range", &aVal, aOpt);
+ return setUIControlOpt(aIds, i_rTitle, aHelpId, u"Range"_ustr, &aVal, aOpt);
}
css::uno::Any PrinterOptionsHelper::setEditControlOpt(const OUString& i_rID,
@@ -2162,7 +2162,7 @@ css::uno::Any PrinterOptionsHelper::setEditControlOpt(const OUString& i_rID,
aVal.Name = i_rProperty;
aVal.Value <<= i_rValue;
css::uno::Sequence< OUString > aIds { i_rID };
- return setUIControlOpt(aIds, i_rTitle, aHelpId, "Edit", &aVal, i_rControlOptions);
+ return setUIControlOpt(aIds, i_rTitle, aHelpId, u"Edit"_ustr, &aVal, i_rControlOptions);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/vectorgraphicdata.cxx b/vcl/source/gdi/vectorgraphicdata.cxx
index 957d15c13a41..2417276dd397 100644
--- a/vcl/source/gdi/vectorgraphicdata.cxx
+++ b/vcl/source/gdi/vectorgraphicdata.cxx
@@ -66,7 +66,7 @@ BitmapEx convertPrimitive2DSequenceToBitmapEx(
const uno::Reference< graphic::XPrimitive2DRenderer > xPrimitive2DRenderer = graphic::Primitive2DTools::create(xContext);
uno::Sequence< beans::PropertyValue > aViewParameters = {
- comphelper::makePropertyValue("RangeUnit", static_cast<sal_Int32>(eTargetUnit)),
+ comphelper::makePropertyValue(u"RangeUnit"_ustr, static_cast<sal_Int32>(eTargetUnit)),
};
geometry::RealRectangle2D aRealRect;
@@ -225,7 +225,7 @@ void VectorGraphicData::ensureSequenceAndRange()
if (!mbEnableEMFPlus)
{
- aPropertySequence = { comphelper::makePropertyValue("EMFPlusEnable", uno::Any(false)) };
+ aPropertySequence = { comphelper::makePropertyValue(u"EMFPlusEnable"_ustr, uno::Any(false)) };
}
maSequence = comphelper::sequenceToContainer<std::deque<css::uno::Reference< css::graphic::XPrimitive2D >>>(xEmfParser->getDecomposition(xInputStream, OUString(), aPropertySequence));
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index b86c4ae49624..b16cdb764a2b 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -161,7 +161,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
{
// do not abort but throw an exception, may be the current thread terminates anyway (plugin-scenario)
throw css::uno::RuntimeException(
- "Could not create system bitmap!",
+ u"Could not create system bitmap!"_ustr,
css::uno::Reference< css::uno::XInterface >() );
}
diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx
index 109f55af2403..dccd0c959fbf 100644
--- a/vcl/source/graphic/GraphicObject.cxx
+++ b/vcl/source/graphic/GraphicObject.cxx
@@ -58,10 +58,10 @@ void SearchForGraphics(uno::Reference<uno::XInterface> const & xInterface,
uno::Reference<beans::XPropertySet> xPropertySet(xInterface, UNO_QUERY);
if (xPropertySet.is())
{
- if (xPropertySet->getPropertySetInfo()->hasPropertyByName("ImageURL"))
+ if (xPropertySet->getPropertySetInfo()->hasPropertyByName(u"ImageURL"_ustr))
{
OUString sURL;
- xPropertySet->getPropertyValue("ImageURL") >>= sURL;
+ xPropertySet->getPropertyValue(u"ImageURL"_ustr) >>= sURL;
if (!sURL.isEmpty() && !GraphicObject::isGraphicObjectUniqueIdURL(sURL))
{
Graphic aGraphic = vcl::graphic::loadFromURL(sURL);
@@ -70,10 +70,10 @@ void SearchForGraphics(uno::Reference<uno::XInterface> const & xInterface,
raGraphicList.push_back(aGraphic.GetXGraphic());
}
}
- } else if (xPropertySet->getPropertySetInfo()->hasPropertyByName("Graphic"))
+ } else if (xPropertySet->getPropertySetInfo()->hasPropertyByName(u"Graphic"_ustr))
{
uno::Reference<css::graphic::XGraphic> xGraphic;
- xPropertySet->getPropertyValue("Graphic") >>= xGraphic;
+ xPropertySet->getPropertyValue(u"Graphic"_ustr) >>= xGraphic;
if (xGraphic.is())
{
raGraphicList.push_back(xGraphic);
diff --git a/vcl/source/graphic/UnoGraphic.cxx b/vcl/source/graphic/UnoGraphic.cxx
index 9036f54452ba..2f360c8b40b7 100644
--- a/vcl/source/graphic/UnoGraphic.cxx
+++ b/vcl/source/graphic/UnoGraphic.cxx
@@ -78,7 +78,7 @@ void SAL_CALL Graphic::release() noexcept
OUString SAL_CALL Graphic::getImplementationName()
{
- return "com.sun.star.comp.graphic.Graphic";
+ return u"com.sun.star.comp.graphic.Graphic"_ustr;
}
sal_Bool SAL_CALL Graphic::supportsService( const OUString& rServiceName )
@@ -89,7 +89,7 @@ sal_Bool SAL_CALL Graphic::supportsService( const OUString& rServiceName )
uno::Sequence< OUString > SAL_CALL Graphic::getSupportedServiceNames()
{
uno::Sequence< OUString > aRet( ::unographic::GraphicDescriptor::getSupportedServiceNames() );
- const uno::Sequence< OUString > aNew { "com.sun.star.graphic.Graphic" };
+ const uno::Sequence< OUString > aNew { u"com.sun.star.graphic.Graphic"_ustr };
sal_Int32 nOldCount = aRet.getLength();
aRet.realloc( nOldCount + aNew.getLength() );
diff --git a/vcl/source/graphic/UnoGraphicDescriptor.cxx b/vcl/source/graphic/UnoGraphicDescriptor.cxx
index 32ffe48fd68f..f36d04988be8 100644
--- a/vcl/source/graphic/UnoGraphicDescriptor.cxx
+++ b/vcl/source/graphic/UnoGraphicDescriptor.cxx
@@ -195,7 +195,7 @@ void SAL_CALL GraphicDescriptor::release()
OUString SAL_CALL GraphicDescriptor::getImplementationName()
{
- return "com.sun.star.comp.graphic.GraphicDescriptor";
+ return u"com.sun.star.comp.graphic.GraphicDescriptor"_ustr;
}
sal_Bool SAL_CALL GraphicDescriptor::supportsService( const OUString& ServiceName )
@@ -206,7 +206,7 @@ sal_Bool SAL_CALL GraphicDescriptor::supportsService( const OUString& ServiceNam
uno::Sequence< OUString > SAL_CALL GraphicDescriptor::getSupportedServiceNames()
{
- return { "com.sun.star.graphic.GraphicDescriptor" };
+ return { u"com.sun.star.graphic.GraphicDescriptor"_ustr };
}
@@ -232,16 +232,16 @@ rtl::Reference<::comphelper::PropertySetInfo> GraphicDescriptor::createPropertyS
{
static ::comphelper::PropertyMapEntry const aEntries[] =
{
- { OUString( "GraphicType" ), static_cast< sal_Int32 >( UnoGraphicProperty::GraphicType ), cppu::UnoType< sal_Int8 >::get(), beans::PropertyAttribute::READONLY, 0 },
- { OUString( "MimeType" ), static_cast< sal_Int32 >( UnoGraphicProperty::MimeType ), cppu::UnoType< OUString >::get(), beans::PropertyAttribute::READONLY, 0 },
- { OUString( "SizePixel" ), static_cast< sal_Int32 >( UnoGraphicProperty::SizePixel ), cppu::UnoType< awt::Size >::get(), beans::PropertyAttribute::READONLY, 0 },
- { OUString( "Size100thMM" ), static_cast< sal_Int32 >( UnoGraphicProperty::Size100thMM ), cppu::UnoType< awt::Size >::get(), beans::PropertyAttribute::READONLY, 0 },
- { OUString( "BitsPerPixel" ), static_cast< sal_Int32 >( UnoGraphicProperty::BitsPerPixel ), cppu::UnoType< sal_Int8 >::get(), beans::PropertyAttribute::READONLY, 0 },
- { OUString( "Transparent" ), static_cast< sal_Int32 >( UnoGraphicProperty::Transparent ), cppu::UnoType< sal_Bool >::get(), beans::PropertyAttribute::READONLY, 0 },
- { OUString( "Alpha" ), static_cast< sal_Int32 >( UnoGraphicProperty::Alpha ), cppu::UnoType< sal_Bool >::get(), beans::PropertyAttribute::READONLY, 0 },
- { OUString( "Animated" ), static_cast< sal_Int32 >( UnoGraphicProperty::Animated ), cppu::UnoType< sal_Bool >::get(), beans::PropertyAttribute::READONLY, 0 },
- { OUString("Linked"), sal_Int32(UnoGraphicProperty::Linked), cppu::UnoType<sal_Bool>::get(), beans::PropertyAttribute::READONLY, 0 },
- { OUString("OriginURL"), sal_Int32(UnoGraphicProperty::OriginURL), cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0 },
+ { u"GraphicType"_ustr, static_cast< sal_Int32 >( UnoGraphicProperty::GraphicType ), cppu::UnoType< sal_Int8 >::get(), beans::PropertyAttribute::READONLY, 0 },
+ { u"MimeType"_ustr, static_cast< sal_Int32 >( UnoGraphicProperty::MimeType ), cppu::UnoType< OUString >::get(), beans::PropertyAttribute::READONLY, 0 },
+ { u"SizePixel"_ustr, static_cast< sal_Int32 >( UnoGraphicProperty::SizePixel ), cppu::UnoType< awt::Size >::get(), beans::PropertyAttribute::READONLY, 0 },
+ { u"Size100thMM"_ustr, static_cast< sal_Int32 >( UnoGraphicProperty::Size100thMM ), cppu::UnoType< awt::Size >::get(), beans::PropertyAttribute::READONLY, 0 },
+ { u"BitsPerPixel"_ustr, static_cast< sal_Int32 >( UnoGraphicProperty::BitsPerPixel ), cppu::UnoType< sal_Int8 >::get(), beans::PropertyAttribute::READONLY, 0 },
+ { u"Transparent"_ustr, static_cast< sal_Int32 >( UnoGraphicProperty::Transparent ), cppu::UnoType< sal_Bool >::get(), beans::PropertyAttribute::READONLY, 0 },
+ { u"Alpha"_ustr, static_cast< sal_Int32 >( UnoGraphicProperty::Alpha ), cppu::UnoType< sal_Bool >::get(), beans::PropertyAttribute::READONLY, 0 },
+ { u"Animated"_ustr, static_cast< sal_Int32 >( UnoGraphicProperty::Animated ), cppu::UnoType< sal_Bool >::get(), beans::PropertyAttribute::READONLY, 0 },
+ { u"Linked"_ustr, sal_Int32(UnoGraphicProperty::Linked), cppu::UnoType<sal_Bool>::get(), beans::PropertyAttribute::READONLY, 0 },
+ { u"OriginURL"_ustr, sal_Int32(UnoGraphicProperty::OriginURL), cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0 },
};
return rtl::Reference<::comphelper::PropertySetInfo>( new ::comphelper::PropertySetInfo(aEntries) );
diff --git a/vcl/source/graphic/UnoGraphicMapper.cxx b/vcl/source/graphic/UnoGraphicMapper.cxx
index 6bde78097681..6a2e48552c1a 100644
--- a/vcl/source/graphic/UnoGraphicMapper.cxx
+++ b/vcl/source/graphic/UnoGraphicMapper.cxx
@@ -34,7 +34,7 @@ protected:
// XServiceInfo
OUString SAL_CALL getImplementationName() override
{
- return "com.sun.star.comp.graphic.GraphicMapper";
+ return u"com.sun.star.comp.graphic.GraphicMapper"_ustr;
}
sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override
{
@@ -42,7 +42,7 @@ protected:
}
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override
{
- return { "com.sun.star.graphic.GraphicMapper" };
+ return { u"com.sun.star.graphic.GraphicMapper"_ustr };
}
// XTypeProvider
diff --git a/vcl/source/graphic/UnoGraphicObject.cxx b/vcl/source/graphic/UnoGraphicObject.cxx
index 73bbcef3ec8e..b7700a391d4a 100644
--- a/vcl/source/graphic/UnoGraphicObject.cxx
+++ b/vcl/source/graphic/UnoGraphicObject.cxx
@@ -50,7 +50,7 @@ public:
virtual OUString SAL_CALL getImplementationName() override
{
- return "com.sun.star.graphic.GraphicObject";
+ return u"com.sun.star.graphic.GraphicObject"_ustr;
}
virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override
@@ -60,7 +60,7 @@ public:
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override
{
- return { "com.sun.star.graphic.GraphicObject" };
+ return { u"com.sun.star.graphic.GraphicObject"_ustr };
}
};
diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx
index 63916164eb4b..d472aaaadcfd 100644
--- a/vcl/source/graphic/UnoGraphicProvider.cxx
+++ b/vcl/source/graphic/UnoGraphicProvider.cxx
@@ -94,7 +94,7 @@ GraphicProvider::GraphicProvider()
OUString SAL_CALL GraphicProvider::getImplementationName()
{
- return "com.sun.star.comp.graphic.GraphicProvider";
+ return u"com.sun.star.comp.graphic.GraphicProvider"_ustr;
}
sal_Bool SAL_CALL GraphicProvider::supportsService( const OUString& ServiceName )
@@ -104,7 +104,7 @@ sal_Bool SAL_CALL GraphicProvider::supportsService( const OUString& ServiceName
uno::Sequence< OUString > SAL_CALL GraphicProvider::getSupportedServiceNames()
{
- return { "com.sun.star.graphic.GraphicProvider" };
+ return { u"com.sun.star.graphic.GraphicProvider"_ustr };
}
uno::Sequence< uno::Type > SAL_CALL GraphicProvider::getTypes()
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index 7243eee4bf97..2806aa0726cf 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -586,7 +586,7 @@ sal_Bool SAL_CALL VclCanvasBitmap::getIndex( uno::Sequence< double >& o_entry, s
(m_pBmpAcc->HasPalette() ? m_pBmpAcc->GetPaletteEntryCount() : 0 ) : 0 );
OSL_ENSURE(nIndex >= 0 && nIndex < nCount,"Palette index out of range");
if( nIndex < 0 || nIndex >= nCount )
- throw lang::IndexOutOfBoundsException("Palette index out of range",
+ throw lang::IndexOutOfBoundsException(u"Palette index out of range"_ustr,
static_cast<rendering::XBitmapPalette*>(this));
const BitmapColor aCol = m_pBmpAcc->GetPaletteColor(sal::static_int_cast<sal_uInt16>(nIndex));
@@ -608,7 +608,7 @@ sal_Bool SAL_CALL VclCanvasBitmap::setIndex( const uno::Sequence< double >&, sal
OSL_ENSURE(nIndex >= 0 && nIndex < nCount,"Palette index out of range");
if( nIndex < 0 || nIndex >= nCount )
- throw lang::IndexOutOfBoundsException("Palette index out of range",
+ throw lang::IndexOutOfBoundsException(u"Palette index out of range"_ustr,
static_cast<rendering::XBitmapPalette*>(this));
return false; // read-only implementation
diff --git a/vcl/source/helper/commandinfoprovider.cxx b/vcl/source/helper/commandinfoprovider.cxx
index eb964b34b8ee..86ea1f0397cb 100644
--- a/vcl/source/helper/commandinfoprovider.cxx
+++ b/vcl/source/helper/commandinfoprovider.cxx
@@ -244,30 +244,30 @@ static OUString GetCommandProperty(const OUString& rsProperty, const Sequence<be
OUString GetLabelForCommand(const css::uno::Sequence<css::beans::PropertyValue>& rProperties)
{
- return GetCommandProperty("Name", rProperties);
+ return GetCommandProperty(u"Name"_ustr, rProperties);
}
OUString GetMenuLabelForCommand(const css::uno::Sequence<css::beans::PropertyValue>& rProperties)
{
// Here we want to use "Label", not "Name". "Name" is a stripped-down version of "Label" without accelerators
// and ellipsis. In the menu, we want to have those accelerators and ellipsis.
- return GetCommandProperty("Label", rProperties);
+ return GetCommandProperty(u"Label"_ustr, rProperties);
}
OUString GetPopupLabelForCommand(const css::uno::Sequence<css::beans::PropertyValue>& rProperties)
{
- OUString sPopupLabel(GetCommandProperty("PopupLabel", rProperties));
+ OUString sPopupLabel(GetCommandProperty(u"PopupLabel"_ustr, rProperties));
if (!sPopupLabel.isEmpty())
return sPopupLabel;
- return GetCommandProperty("Label", rProperties);
+ return GetCommandProperty(u"Label"_ustr, rProperties);
}
OUString GetTooltipLabelForCommand(const css::uno::Sequence<css::beans::PropertyValue>& rProperties)
{
- OUString sLabel(GetCommandProperty("TooltipLabel", rProperties));
+ OUString sLabel(GetCommandProperty(u"TooltipLabel"_ustr, rProperties));
if (!sLabel.isEmpty())
return sLabel;
- return GetCommandProperty("Label", rProperties);
+ return GetCommandProperty(u"Label"_ustr, rProperties);
}
OUString GetTooltipForCommand(
@@ -275,7 +275,7 @@ OUString GetTooltipForCommand(
const css::uno::Sequence<css::beans::PropertyValue>& rProperties,
const Reference<frame::XFrame>& rxFrame)
{
- OUString sLabel(GetCommandProperty("TooltipLabel", rProperties));
+ OUString sLabel(GetCommandProperty(u"TooltipLabel"_ustr, rProperties));
if (sLabel.isEmpty()) {
sLabel = GetPopupLabelForCommand(rProperties);
// Remove '...' at the end and mnemonics (we don't want those in tooltips)
@@ -334,7 +334,7 @@ vcl::KeyCode GetCommandKeyCodeShortcut (const OUString& rsCommandName, const Ref
OUString GetRealCommandForCommand(const css::uno::Sequence<css::beans::PropertyValue>& rProperties)
{
- return GetCommandProperty("TargetURL", rProperties);
+ return GetCommandProperty(u"TargetURL"_ustr, rProperties);
}
Reference<graphic::XGraphic> GetXGraphicForCommand(const OUString& rsCommandName,
@@ -416,12 +416,12 @@ sal_Int32 GetPropertiesForCommand (
bool IsRotated(const OUString& rsCommandName, const OUString& rsModuleName)
{
- return ResourceHasKey("private:resource/image/commandrotateimagelist", rsCommandName, rsModuleName);
+ return ResourceHasKey(u"private:resource/image/commandrotateimagelist"_ustr, rsCommandName, rsModuleName);
}
bool IsMirrored(const OUString& rsCommandName, const OUString& rsModuleName)
{
- return ResourceHasKey("private:resource/image/commandmirrorimagelist", rsCommandName, rsModuleName);
+ return ResourceHasKey(u"private:resource/image/commandmirrorimagelist"_ustr, rsCommandName, rsModuleName);
}
bool IsExperimental(const OUString& rsCommandName, const OUString& rModuleName)
diff --git a/vcl/source/helper/driverblocklist.cxx b/vcl/source/helper/driverblocklist.cxx
index e17b45e7a922..b14b146491fd 100644
--- a/vcl/source/helper/driverblocklist.cxx
+++ b/vcl/source/helper/driverblocklist.cxx
@@ -101,23 +101,23 @@ static OUString GetVendorId(std::string_view rString)
{
if (rString == "all")
{
- return "";
+ return u""_ustr;
}
else if (rString == "intel")
{
- return "0x8086";
+ return u"0x8086"_ustr;
}
else if (rString == "nvidia")
{
- return "0x10de";
+ return u"0x10de"_ustr;
}
else if (rString == "amd")
{
- return "0x1002";
+ return u"0x1002"_ustr;
}
else if (rString == "microsoft")
{
- return "0x1414";
+ return u"0x1414"_ustr;
}
else
{
@@ -133,15 +133,15 @@ OUString GetVendorId(DeviceVendor id)
switch (id)
{
case VendorAll:
- return "";
+ return u""_ustr;
case VendorIntel:
- return "0x8086";
+ return u"0x8086"_ustr;
case VendorNVIDIA:
- return "0x10de";
+ return u"0x10de"_ustr;
case VendorAMD:
- return "0x1002";
+ return u"0x1002"_ustr;
case VendorMicrosoft:
- return "0x1414";
+ return u"0x1414"_ustr;
}
abort();
}
@@ -636,7 +636,7 @@ bool FindBlocklistedDeviceInList(std::vector<DriverInfo>& aDeviceInfos, VersionT
}
if (std::none_of(aDeviceInfos[i].maDevices.begin(), aDeviceInfos[i].maDevices.end(),
- compareIgnoreAsciiCase("all"))
+ compareIgnoreAsciiCase(u"all"_ustr))
&& std::none_of(aDeviceInfos[i].maDevices.begin(), aDeviceInfos[i].maDevices.end(),
compareIgnoreAsciiCase(sAdapterDeviceID)))
{
diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx
index f8c0d56f8893..c92f609a535c 100644
--- a/vcl/source/image/Image.cxx
+++ b/vcl/source/image/Image.cxx
@@ -62,7 +62,7 @@ Image::Image(const OUString & rFileUrl)
else
{
Graphic aGraphic;
- if (ERRCODE_NONE == GraphicFilter::LoadGraphic(rFileUrl, IMP_PNG, aGraphic))
+ if (ERRCODE_NONE == GraphicFilter::LoadGraphic(rFileUrl, u"" IMP_PNG ""_ustr, aGraphic))
ImplInit(aGraphic.GetBitmapEx());
}
}
diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx
index 94ce3b94cfe4..55fb4ee2f349 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -113,7 +113,7 @@ OUString getIconCacheUrl(std::u16string_view sVariant, ImageRequestParameters co
// the macro expansion can be expensive in bulk, so cache that
static OUString CACHE_DIR = []()
{
- OUString sDir = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/";
+ OUString sDir = u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/"_ustr;
rtl::Bootstrap::expandMacros(sDir);
return sDir;
}();
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index c944426b75f7..19fb34df5d96 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -53,7 +53,7 @@ using namespace rtl;
OUString getShaderFolder()
{
- OUString aUrl("$BRAND_BASE_DIR/" LIBO_ETC_FOLDER);
+ OUString aUrl(u"$BRAND_BASE_DIR/" LIBO_ETC_FOLDER ""_ustr);
rtl::Bootstrap::expandMacros(aUrl);
return aUrl + "/opengl/";
@@ -229,7 +229,7 @@ namespace
OString getCacheFolder()
{
- OUString url("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/");
+ OUString url(u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/"_ustr);
rtl::Bootstrap::expandMacros(url);
osl::Directory::create(url);
@@ -425,7 +425,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
// Check Vertex Shader
glGetShaderiv(VertexShaderID, GL_COMPILE_STATUS, &Result);
if (!Result)
- return LogCompilerError(VertexShaderID, "vertex",
+ return LogCompilerError(VertexShaderID, u"vertex"_ustr,
rVertexShaderName, true);
// Compile Fragment Shader
@@ -438,7 +438,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
// Check Fragment Shader
glGetShaderiv(FragmentShaderID, GL_COMPILE_STATUS, &Result);
if (!Result)
- return LogCompilerError(FragmentShaderID, "fragment",
+ return LogCompilerError(FragmentShaderID, u"fragment"_ustr,
rFragmentShaderName, true);
if (bHasGeometryShader)
@@ -453,7 +453,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
// Check Geometry Shader
glGetShaderiv(GeometryShaderID, GL_COMPILE_STATUS, &Result);
if (!Result)
- return LogCompilerError(GeometryShaderID, "geometry",
+ return LogCompilerError(GeometryShaderID, u"geometry"_ustr,
rGeometryShaderName, true);
}
@@ -471,7 +471,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
if (!Result)
{
SAL_WARN("vcl.opengl", "linking failed: " << Result );
- return LogCompilerError(ProgramID, "program", "<both>", false);
+ return LogCompilerError(ProgramID, u"program"_ustr, u"<both>"_ustr, false);
}
OString aFileName =
createFileName(rVertexShaderName, rFragmentShaderName, rGeometryShaderName, rDigest);
@@ -490,7 +490,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
// Check the program
glGetProgramiv(ProgramID, GL_LINK_STATUS, &Result);
if (!Result)
- return LogCompilerError(ProgramID, "program", "<both>", false);
+ return LogCompilerError(ProgramID, u"program"_ustr, u"<both>"_ustr, false);
CHECK_GL_ERROR();
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 9416963b93b6..ae38e3d1c159 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -642,7 +642,7 @@ void OutputDevice::ImplInitFontList() const
// There is absolutely no way there should be no fonts available on the device
if( !mxFontCollection->Count() )
{
- OUString aError( "Application error: no fonts and no vcl resource found on your system" );
+ OUString aError( u"Application error: no fonts and no vcl resource found on your system"_ustr );
OUString aResStr(VclResId(SV_ACCESSERROR_NO_FONTS));
if (!aResStr.isEmpty())
aError = aResStr;
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 828a121cca91..44806506aa32 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -797,8 +797,8 @@ com::sun::star::uno::Reference< css::rendering::XCanvas > OutputDevice::ImplGetC
{
xCanvas.set( xCanvasFactory->createInstanceWithArgumentsAndContext(
bSpriteCanvas ?
- OUString( "com.sun.star.rendering.SpriteCanvas" ) :
- OUString( "com.sun.star.rendering.Canvas" ),
+ u"com.sun.star.rendering.SpriteCanvas"_ustr :
+ u"com.sun.star.rendering.Canvas"_ustr,
aArg,
xContext ),
UNO_QUERY );
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 1f342304ce5f..d1a16bcf2c61 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -681,12 +681,12 @@ float OutputDevice::approximate_char_width() const
//note pango uses "The quick brown fox jumps over the lazy dog." for english
//and has a bunch of per-language strings which corresponds somewhat with
//makeRepresentativeText in include/svtools/sampletext.hxx
- return GetTextWidth("aemnnxEM") / 8.0;
+ return GetTextWidth(u"aemnnxEM"_ustr) / 8.0;
}
float OutputDevice::approximate_digit_width() const
{
- return GetTextWidth("0123456789") / 10.0;
+ return GetTextWidth(u"0123456789"_ustr) / 10.0;
}
void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr,
diff --git a/vcl/source/pdf/PDFiumTools.cxx b/vcl/source/pdf/PDFiumTools.cxx
index cb392a8cb8da..35d0ffa2c098 100644
--- a/vcl/source/pdf/PDFiumTools.cxx
+++ b/vcl/source/pdf/PDFiumTools.cxx
@@ -43,7 +43,7 @@ OUString convertPdfDateToISO8601(std::u16string_view rInput)
if (rInput.size() >= 16)
sSeconds = rInput.substr(14, 2);
- OUString sTimeZoneMark("Z");
+ OUString sTimeZoneMark(u"Z"_ustr);
if (rInput.size() >= 17)
sTimeZoneMark = rInput.substr(16, 1);
diff --git a/vcl/source/printer/Options.cxx b/vcl/source/printer/Options.cxx
index 776b14d47cd5..fbf7a069d518 100644
--- a/vcl/source/printer/Options.cxx
+++ b/vcl/source/printer/Options.cxx
@@ -52,13 +52,13 @@ void Options::ReadFromConfig(bool i_bFile)
css::beans::PropertyValue aVal;
aVal.Name = "nodepath";
if (i_bFile)
- aVal.Value <<= OUString("/org.openoffice.Office.Common/Print/Option/File");
+ aVal.Value <<= u"/org.openoffice.Office.Common/Print/Option/File"_ustr;
else
- aVal.Value <<= OUString("/org.openoffice.Office.Common/Print/Option/Printer");
- xConfigAccess.set(
- xConfigProvider->createInstanceWithArguments(
- "com.sun.star.configuration.ConfigurationAccess", { css::uno::Any(aVal) }),
- css::uno::UNO_QUERY);
+ aVal.Value <<= u"/org.openoffice.Office.Common/Print/Option/Printer"_ustr;
+ xConfigAccess.set(xConfigProvider->createInstanceWithArguments(
+ u"com.sun.star.configuration.ConfigurationAccess"_ustr,
+ { css::uno::Any(aVal) }),
+ css::uno::UNO_QUERY);
if (xConfigAccess.is())
{
css::uno::Reference<css::beans::XPropertySet> xSet(xConfigAccess,
@@ -67,25 +67,26 @@ void Options::ReadFromConfig(bool i_bFile)
{
sal_Int32 nValue = 0;
bool bValue = false;
- if (xSet->getPropertyValue("ReduceTransparency") >>= bValue)
+ if (xSet->getPropertyValue(u"ReduceTransparency"_ustr) >>= bValue)
SetReduceTransparency(bValue);
- if (xSet->getPropertyValue("ReducedTransparencyMode") >>= nValue)
+ if (xSet->getPropertyValue(u"ReducedTransparencyMode"_ustr) >>= nValue)
SetReducedTransparencyMode(static_cast<TransparencyMode>(nValue));
- if (xSet->getPropertyValue("ReduceGradients") >>= bValue)
+ if (xSet->getPropertyValue(u"ReduceGradients"_ustr) >>= bValue)
SetReduceGradients(bValue);
- if (xSet->getPropertyValue("ReducedGradientMode") >>= nValue)
+ if (xSet->getPropertyValue(u"ReducedGradientMode"_ustr) >>= nValue)
SetReducedGradientMode(static_cast<GradientMode>(nValue));
- if (xSet->getPropertyValue("ReducedGradientStepCount") >>= nValue)
+ if (xSet->getPropertyValue(u"ReducedGradientStepCount"_ustr) >>= nValue)
SetReducedGradientStepCount(static_cast<sal_uInt16>(nValue));
- if (xSet->getPropertyValue("ReduceBitmaps") >>= bValue)
+ if (xSet->getPropertyValue(u"ReduceBitmaps"_ustr) >>= bValue)
SetReduceBitmaps(bValue);
- if (xSet->getPropertyValue("ReducedBitmapMode") >>= nValue)
+ if (xSet->getPropertyValue(u"ReducedBitmapMode"_ustr) >>= nValue)
SetReducedBitmapMode(static_cast<BitmapMode>(nValue));
- if (xSet->getPropertyValue("ReducedBitmapResolution") >>= nValue)
+ if (xSet->getPropertyValue(u"ReducedBitmapResolution"_ustr) >>= nValue)
SetReducedBitmapResolution(static_cast<sal_uInt16>(nValue));
- if (xSet->getPropertyValue("ReducedBitmapIncludesTransparency") >>= bValue)
+ if (xSet->getPropertyValue(u"ReducedBitmapIncludesTransparency"_ustr)
+ >>= bValue)
SetReducedBitmapIncludesTransparency(bValue);
- if (xSet->getPropertyValue("ConvertToGreyscales") >>= bValue)
+ if (xSet->getPropertyValue(u"ConvertToGreyscales"_ustr) >>= bValue)
SetConvertToGreyscales(bValue);
bSuccess = true;
diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx
index e80a29b0bc0b..cc3ac778f8a7 100644
--- a/vcl/source/treelist/iconview.cxx
+++ b/vcl/source/treelist/iconview.cxx
@@ -262,7 +262,7 @@ static OString extractPngString(const SvLBoxContextBmp* pBmpItem)
SvMemoryStream aOStm(65535, 65535);
// Use fastest compression "1"
css::uno::Sequence<css::beans::PropertyValue> aFilterData{
- comphelper::makePropertyValue("Compression", sal_Int32(1)),
+ comphelper::makePropertyValue(u"Compression"_ustr, sal_Int32(1)),
};
vcl::PngImageWriter aPNGWriter(aOStm);
aPNGWriter.setParameters(aFilterData);
diff --git a/vcl/source/treelist/imap.cxx b/vcl/source/treelist/imap.cxx
index ba29af020261..800b85089379 100644
--- a/vcl/source/treelist/imap.cxx
+++ b/vcl/source/treelist/imap.cxx
@@ -74,7 +74,7 @@ void IMapObject::Write( SvStream& rOStm ) const
rOStm.WriteUInt16( eEncoding );
const OString aRelURL = OUStringToOString(
- URIHelper::simpleNormalizedMakeRelative("", aURL), eEncoding);
+ URIHelper::simpleNormalizedMakeRelative(u""_ustr, aURL), eEncoding);
write_uInt16_lenPrefixed_uInt8s_FromOString(rOStm, aRelURL);
write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, aAltText, eEncoding);
rOStm.WriteBool( bActive );
diff --git a/vcl/source/treelist/imap2.cxx b/vcl/source/treelist/imap2.cxx
index 154380139246..c49aa45b5e6e 100644
--- a/vcl/source/treelist/imap2.cxx
+++ b/vcl/source/treelist/imap2.cxx
@@ -60,12 +60,12 @@ void IMapObject::AppendNCSACoords(OStringBuffer& rBuf, const Point& rPoint100)
void IMapObject::AppendCERNURL(OStringBuffer& rBuf) const
{
- rBuf.append(OUStringToOString(URIHelper::simpleNormalizedMakeRelative("", aURL), osl_getThreadTextEncoding()));
+ rBuf.append(OUStringToOString(URIHelper::simpleNormalizedMakeRelative(u""_ustr, aURL), osl_getThreadTextEncoding()));
}
void IMapObject::AppendNCSAURL(OStringBuffer& rBuf) const
{
- rBuf.append(OUStringToOString(URIHelper::simpleNormalizedMakeRelative("", aURL), osl_getThreadTextEncoding()));
+ rBuf.append(OUStringToOString(URIHelper::simpleNormalizedMakeRelative(u""_ustr, aURL), osl_getThreadTextEncoding()));
rBuf.append(' ');
}
diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index 73ecd5f312ee..cd0b014e5112 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -289,7 +289,7 @@ void SAL_CALL TransferableHelper::TerminateListener::notifyTermination( const Ev
OUString SAL_CALL TransferableHelper::TerminateListener::getImplementationName()
{
- return "com.sun.star.comp.svt.TransferableHelperTerminateListener";
+ return u"com.sun.star.comp.svt.TransferableHelperTerminateListener"_ustr;
}
sal_Bool SAL_CALL TransferableHelper::TerminateListener::supportsService(const OUString& /*rServiceName*/)
@@ -2097,7 +2097,7 @@ std::unique_ptr<SvStream> TransferableDataHelper::GetSotStorageStream( const Dat
if (!aSeq.hasElements())
return nullptr;
- std::unique_ptr<SvStream> xStream = SotTempStream::Create( "" );
+ std::unique_ptr<SvStream> xStream = SotTempStream::Create( u""_ustr );
xStream->WriteBytes( aSeq.getConstArray(), aSeq.getLength() );
xStream->Seek(0);
return xStream;
diff --git a/vcl/source/treelist/transfer2.cxx b/vcl/source/treelist/transfer2.cxx
index 1c53be66f1c6..a3cf6ac577ca 100644
--- a/vcl/source/treelist/transfer2.cxx
+++ b/vcl/source/treelist/transfer2.cxx
@@ -511,9 +511,9 @@ Reference<XClipboard> GetSystemPrimarySelection()
#if USING_X11
// A hack, making the primary selection available as an instance
// of the SystemClipboard service on X11:
- Sequence< Any > args{ Any(OUString("PRIMARY")) };
+ Sequence< Any > args{ Any(u"PRIMARY"_ustr) };
xSelection.set(xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- "com.sun.star.datatransfer.clipboard.SystemClipboard", args, xContext), UNO_QUERY_THROW);
+ u"com.sun.star.datatransfer.clipboard.SystemClipboard"_ustr, args, xContext), UNO_QUERY_THROW);
#else
static Reference< XClipboard > s_xSelection(
xContext->getServiceManager()->createInstanceWithContext(
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index 6dd915e23996..a16758e3eaba 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -1848,7 +1848,7 @@ void SvTreeListBox::KeyInput( const KeyEvent& rKEvt )
void SvTreeListBox::RequestingChildren( SvTreeListEntry* pParent )
{
if( !pParent->HasChildren() )
- InsertEntry( "<dummy>", pParent );
+ InsertEntry( u"<dummy>"_ustr, pParent );
}
void SvTreeListBox::GetFocus()
diff --git a/vcl/source/treelist/uiobject.cxx b/vcl/source/treelist/uiobject.cxx
index e9999e2ae119..d3b3b475ae80 100644
--- a/vcl/source/treelist/uiobject.cxx
+++ b/vcl/source/treelist/uiobject.cxx
@@ -34,13 +34,13 @@ StringMap TreeListUIObject::get_state()
{
StringMap aMap = WindowUIObject::get_state();
- aMap["SelectionCount"] = OUString::number(mxTreeList->GetSelectionCount());
- aMap["VisibleCount"] = OUString::number(mxTreeList->GetVisibleCount());
- aMap["Children"] = OUString::number(mxTreeList->GetChildCount(nullptr));
- aMap["LevelChildren"] = OUString::number(mxTreeList->GetLevelChildCount(nullptr));
- aMap["CheckBoxList"] = OUString::boolean(isCheckBoxList(mxTreeList));
+ aMap[u"SelectionCount"_ustr] = OUString::number(mxTreeList->GetSelectionCount());
+ aMap[u"VisibleCount"_ustr] = OUString::number(mxTreeList->GetVisibleCount());
+ aMap[u"Children"_ustr] = OUString::number(mxTreeList->GetChildCount(nullptr));
+ aMap[u"LevelChildren"_ustr] = OUString::number(mxTreeList->GetLevelChildCount(nullptr));
+ aMap[u"CheckBoxList"_ustr] = OUString::boolean(isCheckBoxList(mxTreeList));
SvTreeListEntry* pEntry = mxTreeList->FirstSelected();
- aMap["SelectEntryText"] = pEntry ? mxTreeList->GetEntryText(pEntry) : OUString();
+ aMap[u"SelectEntryText"_ustr] = pEntry ? mxTreeList->GetEntryText(pEntry) : OUString();
return aMap;
}
@@ -96,7 +96,7 @@ std::set<OUString> TreeListUIObject::get_children() const
OUString TreeListUIObject::get_name() const
{
- return "TreeListUIObject";
+ return u"TreeListUIObject"_ustr;
}
std::unique_ptr<UIObject> TreeListUIObject::create(vcl::Window* pWindow)
@@ -130,16 +130,16 @@ StringMap TreeListEntryUIObject::get_state()
StringMap aMap;
- aMap["Text"] = mxTreeList->GetEntryText(pEntry);
- aMap["Children"] = OUString::number(mxTreeList->GetLevelChildCount(pEntry));
- aMap["VisibleChildCount"] = OUString::number(mxTreeList->GetVisibleChildCount(pEntry));
- aMap["IsSelected"] = OUString::boolean(mxTreeList->IsSelected(pEntry));
+ aMap[u"Text"_ustr] = mxTreeList->GetEntryText(pEntry);
+ aMap[u"Children"_ustr] = OUString::number(mxTreeList->GetLevelChildCount(pEntry));
+ aMap[u"VisibleChildCount"_ustr] = OUString::number(mxTreeList->GetVisibleChildCount(pEntry));
+ aMap[u"IsSelected"_ustr] = OUString::boolean(mxTreeList->IsSelected(pEntry));
- aMap["IsSemiTransparent"] = OUString::boolean(bool(pEntry->GetFlags() & SvTLEntryFlags::SEMITRANSPARENT));
+ aMap[u"IsSemiTransparent"_ustr] = OUString::boolean(bool(pEntry->GetFlags() & SvTLEntryFlags::SEMITRANSPARENT));
SvLBoxButton* pItem = static_cast<SvLBoxButton*>(pEntry->GetFirstItem(SvLBoxItemType::Button));
if (pItem)
- aMap["IsChecked"] = OUString::boolean(pItem->IsStateChecked());
+ aMap[u"IsChecked"_ustr] = OUString::boolean(pItem->IsStateChecked());
return aMap;
}
@@ -214,7 +214,7 @@ std::set<OUString> TreeListEntryUIObject::get_children() const
OUString TreeListEntryUIObject::get_type() const
{
- return "TreeListEntry";
+ return u"TreeListEntry"_ustr;
}
bool TreeListEntryUIObject::equals(const UIObject& rOther) const
diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx
index 29520fd61331..3920fcd39061 100644
--- a/vcl/source/uitest/logger.cxx
+++ b/vcl/source/uitest/logger.cxx
@@ -68,8 +68,8 @@ UITestLogger::UITestLogger()
static const char* pFile = std::getenv("LO_COLLECT_UIINFO");
if (pFile)
{
- OUString aDirPath("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
- "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/uitest/");
+ OUString aDirPath(u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER
+ "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/uitest/"_ustr);
rtl::Bootstrap::expandMacros(aDirPath);
osl::Directory::createPath(aDirPath);
OUString aFilePath = aDirPath + OUString::fromUtf8(pFile);
@@ -320,7 +320,7 @@ namespace
OUString StringMapToOUString(const std::map<OUString, OUString>& rParameters)
{
if (rParameters.empty())
- return "";
+ return u""_ustr;
OUStringBuffer aParameterString(static_cast<int>(rParameters.size() * 32));
aParameterString.append(" {");
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index d209edd6a5c4..7c760b6c81fc 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -54,7 +54,7 @@ UIObject::~UIObject()
StringMap UIObject::get_state()
{
StringMap aMap;
- aMap["NotImplemented"] = "NotImplemented";
+ aMap[u"NotImplemented"_ustr] = "NotImplemented";
return aMap;
}
@@ -67,7 +67,7 @@ void UIObject::execute(const OUString& /*rAction*/,
OUString UIObject::get_type() const
{
- return "Generic UIObject";
+ return u"Generic UIObject"_ustr;
}
std::unique_ptr<UIObject> UIObject::get_child(const OUString&)
@@ -296,19 +296,19 @@ StringMap WindowUIObject::get_state()
mxWindow->RequestDoubleBuffering(false);
StringMap aMap;
- aMap["Visible"] = OUString::boolean(mxWindow->IsVisible());
- aMap["ReallyVisible"] = OUString::boolean(mxWindow->IsReallyVisible());
- aMap["Enabled"] = OUString::boolean(mxWindow->IsEnabled());
- aMap["HasFocus"] = OUString::boolean(mxWindow->HasChildPathFocus());
- aMap["WindowType"] = OUString::number(static_cast<sal_uInt16>(mxWindow->GetType()), 16);
+ aMap[u"Visible"_ustr] = OUString::boolean(mxWindow->IsVisible());
+ aMap[u"ReallyVisible"_ustr] = OUString::boolean(mxWindow->IsReallyVisible());
+ aMap[u"Enabled"_ustr] = OUString::boolean(mxWindow->IsEnabled());
+ aMap[u"HasFocus"_ustr] = OUString::boolean(mxWindow->HasChildPathFocus());
+ aMap[u"WindowType"_ustr] = OUString::number(static_cast<sal_uInt16>(mxWindow->GetType()), 16);
Point aPos = mxWindow->GetPosPixel();
- aMap["RelPosition"] = to_string(aPos);
- aMap["Size"] = to_string(mxWindow->GetSizePixel());
- aMap["ID"] = mxWindow->get_id();
+ aMap[u"RelPosition"_ustr] = to_string(aPos);
+ aMap[u"Size"_ustr] = to_string(mxWindow->GetSizePixel());
+ aMap[u"ID"_ustr] = mxWindow->get_id();
vcl::Window* pParent = mxWindow->GetParent();
if (pParent)
- aMap["Parent"] = mxWindow->GetParent()->get_id();
+ aMap[u"Parent"_ustr] = mxWindow->GetParent()->get_id();
bool bIgnoreAllExceptTop = isDialogWindow(mxWindow.get());
while(pParent)
@@ -327,9 +327,9 @@ StringMap WindowUIObject::get_state()
if (!pParent && bIgnoreAllExceptTop)
aPos += aParentPos;
}
- aMap["AbsPosition"] = to_string(aPos);
- aMap["Text"] = mxWindow->GetText();
- aMap["DisplayText"] = mxWindow->GetDisplayText();
+ aMap[u"AbsPosition"_ustr] = to_string(aPos);
+ aMap[u"Text"_ustr] = mxWindow->GetText();
+ aMap[u"DisplayText"_ustr] = mxWindow->GetDisplayText();
return aMap;
}
@@ -346,7 +346,7 @@ void WindowUIObject::execute(const OUString& rAction,
}
else if (rAction == "TYPE")
{
- auto it = rParameters.find("TEXT");
+ auto it = rParameters.find(u"TEXT"_ustr);
if (it != rParameters.end())
{
const OUString& rText = it->second;
@@ -356,9 +356,9 @@ void WindowUIObject::execute(const OUString& rAction,
mxWindow->KeyInput(keyEvent);
}
}
- else if (rParameters.find("KEYCODE") != rParameters.end())
+ else if (rParameters.find(u"KEYCODE"_ustr) != rParameters.end())
{
- auto itr = rParameters.find("KEYCODE");
+ auto itr = rParameters.find(u"KEYCODE"_ustr);
const OUString rText = itr->second;
auto aKeyEvents = generate_key_events_from_keycode(rText);
for (auto const& keyEvent : aKeyEvents)
@@ -514,7 +514,7 @@ std::set<OUString> WindowUIObject::get_children() const
OUString WindowUIObject::get_name() const
{
- return "WindowUIObject";
+ return u"WindowUIObject"_ustr;
}
namespace {
@@ -615,7 +615,7 @@ StringMap ButtonUIObject::get_state()
{
StringMap aMap = WindowUIObject::get_state();
// Move that to a Control base class
- aMap["Label"] = mxButton->GetDisplayText();
+ aMap[u"Label"_ustr] = mxButton->GetDisplayText();
return aMap;
}
@@ -640,7 +640,7 @@ void ButtonUIObject::execute(const OUString& rAction,
OUString ButtonUIObject::get_name() const
{
- return "ButtonUIObject";
+ return u"ButtonUIObject"_ustr;
}
OUString ButtonUIObject::get_action(VclEventId nEvent) const
@@ -649,33 +649,33 @@ OUString ButtonUIObject::get_action(VclEventId nEvent) const
{
if(mxButton->get_id()=="writer_all")
{
- UITestLogger::getInstance().setAppName("writer");
- return "Start writer" ;
+ UITestLogger::getInstance().setAppName(u"writer"_ustr);
+ return u"Start writer"_ustr ;
}
else if(mxButton->get_id()=="calc_all")
{
- UITestLogger::getInstance().setAppName("calc");
- return "Start calc" ;
+ UITestLogger::getInstance().setAppName(u"calc"_ustr);
+ return u"Start calc"_ustr ;
}
else if(mxButton->get_id()=="impress_all")
{
- UITestLogger::getInstance().setAppName("impress");
- return "Start impress" ;
+ UITestLogger::getInstance().setAppName(u"impress"_ustr);
+ return u"Start impress"_ustr ;
}
else if(mxButton->get_id()=="draw_all")
{
- UITestLogger::getInstance().setAppName("draw");
- return "Start draw" ;
+ UITestLogger::getInstance().setAppName(u"draw"_ustr);
+ return u"Start draw"_ustr ;
}
else if(mxButton->get_id()=="math_all")
{
- UITestLogger::getInstance().setAppName("math");
- return "Start math" ;
+ UITestLogger::getInstance().setAppName(u"math"_ustr);
+ return u"Start math"_ustr ;
}
else if(mxButton->get_id()=="database_all")
{
- UITestLogger::getInstance().setAppName("database");
- return "Start database" ;
+ UITestLogger::getInstance().setAppName(u"database"_ustr);
+ return u"Start database"_ustr ;
}
else{
if (get_top_parent(mxButton)->get_id().isEmpty()){
@@ -710,14 +710,14 @@ DialogUIObject::~DialogUIObject()
StringMap DialogUIObject::get_state()
{
StringMap aMap = WindowUIObject::get_state();
- aMap["Modal"] = OUString::boolean(mxDialog->IsModalInputMode());
+ aMap[u"Modal"_ustr] = OUString::boolean(mxDialog->IsModalInputMode());
return aMap;
}
OUString DialogUIObject::get_name() const
{
- return "DialogUIObject";
+ return u"DialogUIObject"_ustr;
}
std::unique_ptr<UIObject> DialogUIObject::create(vcl::Window* pWindow)
@@ -743,7 +743,7 @@ void EditUIObject::execute(const OUString& rAction,
bool bHandled = true;
if (rAction == "TYPE")
{
- auto it = rParameters.find("TEXT");
+ auto it = rParameters.find(u"TEXT"_ustr);
if (it != rParameters.end())
{
const OUString& rText = it->second;
@@ -760,7 +760,7 @@ void EditUIObject::execute(const OUString& rAction,
}
else if (rAction == "SET")
{
- auto it = rParameters.find("TEXT");
+ auto it = rParameters.find(u"TEXT"_ustr);
if (it != rParameters.end())
{
mxEdit->SetText(it->second);
@@ -771,18 +771,18 @@ void EditUIObject::execute(const OUString& rAction,
}
else if (rAction == "SELECT")
{
- if (rParameters.find("FROM") != rParameters.end() &&
- rParameters.find("TO") != rParameters.end())
+ if (rParameters.find(u"FROM"_ustr) != rParameters.end() &&
+ rParameters.find(u"TO"_ustr) != rParameters.end())
{
- tools::Long nMin = rParameters.find("FROM")->second.toInt32();
- tools::Long nMax = rParameters.find("TO")->second.toInt32();
+ tools::Long nMin = rParameters.find(u"FROM"_ustr)->second.toInt32();
+ tools::Long nMax = rParameters.find(u"TO"_ustr)->second.toInt32();
Selection aSelection(nMin, nMax);
mxEdit->SetSelection(aSelection);
}
}
else if (rAction == "CLEAR")
{
- mxEdit->SetText("");
+ mxEdit->SetText(u""_ustr);
mxEdit->Modify();
bHandled = true;
}
@@ -798,10 +798,10 @@ void EditUIObject::execute(const OUString& rAction,
StringMap EditUIObject::get_state()
{
StringMap aMap = WindowUIObject::get_state();
- aMap["MaxTextLength"] = OUString::number(mxEdit->GetMaxTextLen());
- aMap["QuickHelpText"] = mxEdit->GetQuickHelpText();
- aMap["SelectedText"] = mxEdit->GetSelected();
- aMap["Text"] = mxEdit->GetText();
+ aMap[u"MaxTextLength"_ustr] = OUString::number(mxEdit->GetMaxTextLen());
+ aMap[u"QuickHelpText"_ustr] = mxEdit->GetQuickHelpText();
+ aMap[u"SelectedText"_ustr] = mxEdit->GetSelected();
+ aMap[u"Text"_ustr] = mxEdit->GetText();
return aMap;
}
@@ -834,7 +834,7 @@ OUString EditUIObject::get_action(VclEventId nEvent) const
OUString EditUIObject::get_name() const
{
- return "EditUIObject";
+ return u"EditUIObject"_ustr;
}
std::unique_ptr<UIObject> EditUIObject::create(vcl::Window* pWindow)
@@ -865,11 +865,11 @@ void MultiLineEditUIObject::execute(const OUString& rAction,
}
else if (rAction == "SELECT")
{
- if (rParameters.find("FROM") != rParameters.end() &&
- rParameters.find("TO") != rParameters.end())
+ if (rParameters.find(u"FROM"_ustr) != rParameters.end() &&
+ rParameters.find(u"TO"_ustr) != rParameters.end())
{
- tools::Long nMin = rParameters.find("FROM")->second.toInt32();
- tools::Long nMax = rParameters.find("TO")->second.toInt32();
+ tools::Long nMin = rParameters.find(u"FROM"_ustr)->second.toInt32();
+ tools::Long nMax = rParameters.find(u"TO"_ustr)->second.toInt32();
Selection aSelection(nMin, nMax);
mxEdit->SetSelection(aSelection);
}
@@ -886,16 +886,16 @@ void MultiLineEditUIObject::execute(const OUString& rAction,
StringMap MultiLineEditUIObject::get_state()
{
StringMap aMap = WindowUIObject::get_state();
- aMap["MaxTextLength"] = OUString::number(mxEdit->GetMaxTextLen());
- aMap["SelectedText"] = mxEdit->GetSelected();
- aMap["Text"] = mxEdit->GetText();
+ aMap[u"MaxTextLength"_ustr] = OUString::number(mxEdit->GetMaxTextLen());
+ aMap[u"SelectedText"_ustr] = mxEdit->GetSelected();
+ aMap[u"Text"_ustr] = mxEdit->GetText();
return aMap;
}
OUString MultiLineEditUIObject::get_name() const
{
- return "MultiLineEditUIObject";
+ return u"MultiLineEditUIObject"_ustr;
}
std::unique_ptr<UIObject> MultiLineEditUIObject::create(vcl::Window* pWindow)
@@ -932,13 +932,13 @@ void ExpanderUIObject::execute(const OUString& rAction, const StringMap& rParame
StringMap ExpanderUIObject::get_state()
{
StringMap aMap = WindowUIObject::get_state();
- aMap["Expanded"] = OUString::boolean(mxExpander->get_expanded());
+ aMap[u"Expanded"_ustr] = OUString::boolean(mxExpander->get_expanded());
return aMap;
}
OUString ExpanderUIObject::get_name() const
{
- return "ExpanderUIObject";
+ return u"ExpanderUIObject"_ustr;
}
std::unique_ptr<UIObject> ExpanderUIObject::create(vcl::Window* pWindow)
@@ -973,14 +973,14 @@ void CheckBoxUIObject::execute(const OUString& rAction,
StringMap CheckBoxUIObject::get_state()
{
StringMap aMap = WindowUIObject::get_state();
- aMap["Selected"] = OUString::boolean(mxCheckBox->IsChecked());
- aMap["TriStateEnabled"] = OUString::boolean(mxCheckBox->IsTriStateEnabled());
+ aMap[u"Selected"_ustr] = OUString::boolean(mxCheckBox->IsChecked());
+ aMap[u"TriStateEnabled"_ustr] = OUString::boolean(mxCheckBox->IsTriStateEnabled());
return aMap;
}
OUString CheckBoxUIObject::get_name() const
{
- return "CheckBoxUIObject";
+ return u"CheckBoxUIObject"_ustr;
}
OUString CheckBoxUIObject::get_action(VclEventId nEvent) const
@@ -1029,15 +1029,15 @@ void RadioButtonUIObject::execute(const OUString& rAction,
StringMap RadioButtonUIObject::get_state()
{
StringMap aMap = WindowUIObject::get_state();
- aMap["Checked"] = OUString::boolean(mxRadioButton->IsChecked());
- aMap["Enabled"] = OUString::boolean(mxRadioButton->IsEnabled());
+ aMap[u"Checked"_ustr] = OUString::boolean(mxRadioButton->IsChecked());
+ aMap[u"Enabled"_ustr] = OUString::boolean(mxRadioButton->IsEnabled());
return aMap;
}
OUString RadioButtonUIObject::get_name() const
{
- return "RadioButtonUIObject";
+ return u"RadioButtonUIObject"_ustr;
}
OUString RadioButtonUIObject::get_action(VclEventId nEvent) const
@@ -1087,7 +1087,7 @@ StringMap TabPageUIObject::get_state()
OUString TabPageUIObject::get_name() const
{
- return "TabPageUIObject";
+ return u"TabPageUIObject"_ustr;
}
ListBoxUIObject::ListBoxUIObject(const VclPtr<ListBox>& xListBox):
@@ -1113,16 +1113,16 @@ void ListBoxUIObject::execute(const OUString& rAction,
if (rAction == "SELECT")
{
bool bSelect = true;
- if (rParameters.find("POS") != rParameters.end())
+ if (rParameters.find(u"POS"_ustr) != rParameters.end())
{
- auto itr = rParameters.find("POS");
+ auto itr = rParameters.find(u"POS"_ustr);
OUString aVal = itr->second;
sal_Int32 nPos = aVal.toInt32();
mxListBox->SelectEntryPos(nPos, bSelect);
}
- else if (rParameters.find("TEXT") != rParameters.end())
+ else if (rParameters.find(u"TEXT"_ustr) != rParameters.end())
{
- auto itr = rParameters.find("TEXT");
+ auto itr = rParameters.find(u"TEXT"_ustr);
OUString aText = itr->second;
mxListBox->SelectEntry(aText, bSelect);
}
@@ -1135,19 +1135,19 @@ void ListBoxUIObject::execute(const OUString& rAction,
StringMap ListBoxUIObject::get_state()
{
StringMap aMap = WindowUIObject::get_state();
- aMap["ReadOnly"] = OUString::boolean(mxListBox->IsReadOnly());
- aMap["MultiSelect"] = OUString::boolean(mxListBox->IsMultiSelectionEnabled());
- aMap["EntryCount"] = OUString::number(mxListBox->GetEntryCount());
- aMap["SelectEntryCount"] = OUString::number(mxListBox->GetSelectedEntryCount());
- aMap["SelectEntryPos"] = OUString::number(mxListBox->GetSelectedEntryPos());
- aMap["SelectEntryText"] = mxListBox->GetSelectedEntry();
+ aMap[u"ReadOnly"_ustr] = OUString::boolean(mxListBox->IsReadOnly());
+ aMap[u"MultiSelect"_ustr] = OUString::boolean(mxListBox->IsMultiSelectionEnabled());
+ aMap[u"EntryCount"_ustr] = OUString::number(mxListBox->GetEntryCount());
+ aMap[u"SelectEntryCount"_ustr] = OUString::number(mxListBox->GetSelectedEntryCount());
+ aMap[u"SelectEntryPos"_ustr] = OUString::number(mxListBox->GetSelectedEntryPos());
+ aMap[u"SelectEntryText"_ustr] = mxListBox->GetSelectedEntry();
return aMap;
}
OUString ListBoxUIObject::get_name() const
{
- return "ListBoxUIObject";
+ return u"ListBoxUIObject"_ustr;
}
OUString ListBoxUIObject::get_action(VclEventId nEvent) const
@@ -1199,15 +1199,15 @@ void ComboBoxUIObject::execute(const OUString& rAction,
{
if (rAction == "SELECT")
{
- if (rParameters.find("POS") != rParameters.end())
+ if (rParameters.find(u"POS"_ustr) != rParameters.end())
{
- auto itr = rParameters.find("POS");
+ auto itr = rParameters.find(u"POS"_ustr);
OUString aVal = itr->second;
sal_Int32 nPos = aVal.toInt32();
mxComboBox->SelectEntryPos(nPos);
}
- else if(rParameters.find("TEXT") != rParameters.end()){
- auto itr = rParameters.find("TEXT");
+ else if(rParameters.find(u"TEXT"_ustr) != rParameters.end()){
+ auto itr = rParameters.find(u"TEXT"_ustr);
OUString aVal = itr->second;
sal_Int32 nPos = mxComboBox->GetEntryPos(aVal);
mxComboBox->SelectEntryPos(nPos);
@@ -1231,14 +1231,14 @@ void ComboBoxUIObject::execute(const OUString& rAction,
StringMap ComboBoxUIObject::get_state()
{
StringMap aMap = WindowUIObject::get_state();
- aMap["SelectedText"] = mxComboBox->GetSelected();
- aMap["EntryCount"] = OUString::number(mxComboBox->GetEntryCount());
+ aMap[u"SelectedText"_ustr] = mxComboBox->GetSelected();
+ aMap[u"EntryCount"_ustr] = OUString::number(mxComboBox->GetEntryCount());
return aMap;
}
OUString ComboBoxUIObject::get_name() const
{
- return "ComboBoxUIObject";
+ return u"ComboBoxUIObject"_ustr;
}
OUString ComboBoxUIObject::get_action(VclEventId nEvent) const
@@ -1294,10 +1294,10 @@ void SpinUIObject::execute(const OUString& rAction,
StringMap SpinUIObject::get_state()
{
StringMap aMap = WindowUIObject::get_state();
- aMap["Min"] = OUString::number(mxSpinButton->GetRangeMin());
- aMap["Max"] = OUString::number(mxSpinButton->GetRangeMax());
- aMap["Step"] = OUString::number(mxSpinButton->GetValueStep());
- aMap["Value"] = OUString::number(mxSpinButton->GetValue());
+ aMap[u"Min"_ustr] = OUString::number(mxSpinButton->GetRangeMin());
+ aMap[u"Max"_ustr] = OUString::number(mxSpinButton->GetRangeMax());
+ aMap[u"Step"_ustr] = OUString::number(mxSpinButton->GetValueStep());
+ aMap[u"Value"_ustr] = OUString::number(mxSpinButton->GetValue());
return aMap;
}
@@ -1320,7 +1320,7 @@ OUString SpinUIObject::get_action(VclEventId nEvent) const
OUString SpinUIObject::get_name() const
{
- return "SpinUIObject";
+ return u"SpinUIObject"_ustr;
}
SpinFieldUIObject::SpinFieldUIObject(const VclPtr<SpinField>& xSpinField):
@@ -1392,7 +1392,7 @@ OUString SpinFieldUIObject::get_action(VclEventId nEvent) const
OUString SpinFieldUIObject::get_name() const
{
- return "SpinFieldUIObject";
+ return u"SpinFieldUIObject"_ustr;
}
std::unique_ptr<UIObject> SpinFieldUIObject::create(vcl::Window* pWindow)
@@ -1418,7 +1418,7 @@ void MetricFieldUIObject::execute(const OUString& rAction,
{
if (rAction == "VALUE")
{
- auto itPos = rParameters.find("VALUE");
+ auto itPos = rParameters.find(u"VALUE"_ustr);
if (itPos != rParameters.end())
{
mxMetricField->SetValueFromString(itPos->second);
@@ -1431,14 +1431,14 @@ void MetricFieldUIObject::execute(const OUString& rAction,
StringMap MetricFieldUIObject::get_state()
{
StringMap aMap = EditUIObject::get_state();
- aMap["Value"] = mxMetricField->GetValueString();
+ aMap[u"Value"_ustr] = mxMetricField->GetValueString();
return aMap;
}
OUString MetricFieldUIObject::get_name() const
{
- return "MetricFieldUIObject";
+ return u"MetricFieldUIObject"_ustr;
}
std::unique_ptr<UIObject> MetricFieldUIObject::create(vcl::Window* pWindow)
@@ -1463,7 +1463,7 @@ void FormattedFieldUIObject::execute(const OUString& rAction,
{
if (rAction == "VALUE")
{
- auto itPos = rParameters.find("VALUE");
+ auto itPos = rParameters.find(u"VALUE"_ustr);
if (itPos != rParameters.end())
{
mxFormattedField->SetValueFromString(itPos->second);
@@ -1476,14 +1476,14 @@ void FormattedFieldUIObject::execute(const OUString& rAction,
StringMap FormattedFieldUIObject::get_state()
{
StringMap aMap = EditUIObject::get_state();
- aMap["Value"] = OUString::number(mxFormattedField->GetFormatter().GetValue());
+ aMap[u"Value"_ustr] = OUString::number(mxFormattedField->GetFormatter().GetValue());
return aMap;
}
OUString FormattedFieldUIObject::get_name() const
{
- return "FormattedFieldUIObject";
+ return u"FormattedFieldUIObject"_ustr;
}
std::unique_ptr<UIObject> FormattedFieldUIObject::create(vcl::Window* pWindow)
@@ -1508,9 +1508,9 @@ void TabControlUIObject::execute(const OUString& rAction,
{
if (rAction == "SELECT")
{
- if (rParameters.find("POS") != rParameters.end())
+ if (rParameters.find(u"POS"_ustr) != rParameters.end())
{
- auto itr = rParameters.find("POS");
+ auto itr = rParameters.find(u"POS"_ustr);
sal_uInt32 nPos = itr->second.toUInt32();
std::vector<sal_uInt16> aIds = mxTabControl->GetPageIDs();
mxTabControl->SelectTabPage(aIds[nPos]);
@@ -1523,11 +1523,11 @@ void TabControlUIObject::execute(const OUString& rAction,
StringMap TabControlUIObject::get_state()
{
StringMap aMap = WindowUIObject::get_state();
- aMap["PageCount"] = OUString::number(mxTabControl->GetPageCount());
+ aMap[u"PageCount"_ustr] = OUString::number(mxTabControl->GetPageCount());
sal_uInt16 nPageId = mxTabControl->GetCurPageId();
- aMap["CurrPageId"] = OUString::number(nPageId);
- aMap["CurrPagePos"] = OUString::number(mxTabControl->GetPagePos(nPageId));
+ aMap[u"CurrPageId"_ustr] = OUString::number(nPageId);
+ aMap[u"CurrPagePos"_ustr] = OUString::number(mxTabControl->GetPagePos(nPageId));
return aMap;
}
@@ -1553,7 +1553,7 @@ OUString TabControlUIObject::get_action(VclEventId nEvent) const
OUString TabControlUIObject::get_name() const
{
- return "TabControlUIObject";
+ return u"TabControlUIObject"_ustr;
}
std::unique_ptr<UIObject> TabControlUIObject::create(vcl::Window* pWindow)
@@ -1578,9 +1578,9 @@ void RoadmapWizardUIObject::execute(const OUString& rAction,
{
if (rAction == "SELECT")
{
- if (rParameters.find("POS") != rParameters.end())
+ if (rParameters.find(u"POS"_ustr) != rParameters.end())
{
- auto itr = rParameters.find("POS");
+ auto itr = rParameters.find(u"POS"_ustr);
sal_uInt32 nPos = itr->second.toUInt32();
mxRoadmapWizard->SelectRoadmapItemByID(nPos);
}
@@ -1593,14 +1593,14 @@ StringMap RoadmapWizardUIObject::get_state()
{
StringMap aMap = WindowUIObject::get_state();
- aMap["CurrentStep"] = OUString::number(mxRoadmapWizard->GetCurrentRoadmapItemID());
+ aMap[u"CurrentStep"_ustr] = OUString::number(mxRoadmapWizard->GetCurrentRoadmapItemID());
return aMap;
}
OUString RoadmapWizardUIObject::get_name() const
{
- return "RoadmapWizardUIObject";
+ return u"RoadmapWizardUIObject"_ustr;
}
std::unique_ptr<UIObject> RoadmapWizardUIObject::create(vcl::Window* pWindow)
@@ -1625,9 +1625,9 @@ void VerticalTabControlUIObject::execute(const OUString& rAction,
{
if (rAction == "SELECT")
{
- if (rParameters.find("POS") != rParameters.end())
+ if (rParameters.find(u"POS"_ustr) != rParameters.end())
{
- auto itr = rParameters.find("POS");
+ auto itr = rParameters.find(u"POS"_ustr);
sal_uInt32 nPos = itr->second.toUInt32();
OUString xid = mxTabControl->GetPageId(nPos);
mxTabControl->SetCurPageId(xid);
@@ -1640,18 +1640,18 @@ void VerticalTabControlUIObject::execute(const OUString& rAction,
StringMap VerticalTabControlUIObject::get_state()
{
StringMap aMap = WindowUIObject::get_state();
- aMap["PageCount"] = OUString::number(mxTabControl->GetPageCount());
+ aMap[u"PageCount"_ustr] = OUString::number(mxTabControl->GetPageCount());
OUString nPageId = mxTabControl->GetCurPageId();
- aMap["CurrPageTitel"] = mxTabControl->GetPageText(nPageId);
- aMap["CurrPagePos"] = OUString::number(mxTabControl->GetPagePos(nPageId));
+ aMap[u"CurrPageTitel"_ustr] = mxTabControl->GetPageText(nPageId);
+ aMap[u"CurrPagePos"_ustr] = OUString::number(mxTabControl->GetPagePos(nPageId));
return aMap;
}
OUString VerticalTabControlUIObject::get_name() const
{
- return "VerticalTabControlUIObject";
+ return u"VerticalTabControlUIObject"_ustr;
}
std::unique_ptr<UIObject> VerticalTabControlUIObject::create(vcl::Window* pWindow)
@@ -1677,9 +1677,9 @@ void ToolBoxUIObject::execute(const OUString& rAction,
{
if (rAction == "CLICK")
{
- if (rParameters.find("POS") != rParameters.end())
+ if (rParameters.find(u"POS"_ustr) != rParameters.end())
{
- auto itr = rParameters.find("POS");
+ auto itr = rParameters.find(u"POS"_ustr);
sal_uInt16 nPos = itr->second.toUInt32();
mxToolBox->SetCurItemId(mxToolBox->GetItemId(nPos));
mxToolBox->Click();
@@ -1705,16 +1705,16 @@ StringMap ToolBoxUIObject::get_state()
{
StringMap aMap = WindowUIObject::get_state();
ToolBoxItemId nCurItemId = mxToolBox->GetCurItemId();
- aMap["CurrSelectedItemID"] = OUString::number(sal_uInt16(nCurItemId));
- aMap["CurrSelectedItemText"] = nCurItemId ? mxToolBox->GetItemText(nCurItemId) : "";
- aMap["CurrSelectedItemCommand"] = nCurItemId ? mxToolBox->GetItemCommand(nCurItemId) : "";
- aMap["ItemCount"] = OUString::number(mxToolBox->GetItemCount());
+ aMap[u"CurrSelectedItemID"_ustr] = OUString::number(sal_uInt16(nCurItemId));
+ aMap[u"CurrSelectedItemText"_ustr] = nCurItemId ? mxToolBox->GetItemText(nCurItemId) : u""_ustr;
+ aMap[u"CurrSelectedItemCommand"_ustr] = nCurItemId ? mxToolBox->GetItemCommand(nCurItemId) : u""_ustr;
+ aMap[u"ItemCount"_ustr] = OUString::number(mxToolBox->GetItemCount());
return aMap;
}
OUString ToolBoxUIObject::get_name() const
{
- return "ToolBoxUIObject";
+ return u"ToolBoxUIObject"_ustr;
}
std::unique_ptr<UIObject> ToolBoxUIObject::create(vcl::Window* pWindow)
@@ -1737,8 +1737,8 @@ MenuButtonUIObject::~MenuButtonUIObject()
StringMap MenuButtonUIObject::get_state()
{
StringMap aMap = WindowUIObject::get_state();
- aMap["Label"] = mxMenuButton->GetDisplayText();
- aMap["CurrentItem"] = mxMenuButton->GetCurItemIdent();
+ aMap[u"Label"_ustr] = mxMenuButton->GetDisplayText();
+ aMap[u"CurrentItem"_ustr] = mxMenuButton->GetCurItemIdent();
return aMap;
}
@@ -1756,7 +1756,7 @@ void MenuButtonUIObject::execute(const OUString& rAction,
}
else if (rAction == "OPENFROMLIST")
{
- auto itr = rParameters.find("POS");
+ auto itr = rParameters.find(u"POS"_ustr);
assert(itr != rParameters.end());
sal_uInt32 nPos = itr->second.toUInt32();
@@ -1775,7 +1775,7 @@ void MenuButtonUIObject::execute(const OUString& rAction,
OUString MenuButtonUIObject::get_name() const
{
- return "MenuButtonUIObject";
+ return u"MenuButtonUIObject"_ustr;
}
std::unique_ptr<UIObject> MenuButtonUIObject::create(vcl::Window* pWindow)
@@ -1802,11 +1802,11 @@ void DrawingAreaUIObject::execute(const OUString& rAction, const StringMap& rPar
if (rAction == "CLICK")
{
// POSX and POSY are percentage of width/height dimensions
- if (rParameters.find("POSX") != rParameters.end() &&
- rParameters.find("POSY") != rParameters.end())
+ if (rParameters.find(u"POSX"_ustr) != rParameters.end() &&
+ rParameters.find(u"POSY"_ustr) != rParameters.end())
{
- auto aPosX = rParameters.find("POSX");
- auto aPosY = rParameters.find("POSY");
+ auto aPosX = rParameters.find(u"POSX"_ustr);
+ auto aPosY = rParameters.find(u"POSY"_ustr);
OString sPosX2 = OUStringToOString(aPosX->second, RTL_TEXTENCODING_ASCII_US);
OString sPoxY2 = OUStringToOString(aPosY->second, RTL_TEXTENCODING_ASCII_US);
@@ -1849,18 +1849,18 @@ StringMap IconViewUIObject::get_state()
OUString* pId = static_cast<OUString*>(pEntry->GetUserData());
if (pId)
- aMap["SelectedItemId"] = *pId;
+ aMap[u"SelectedItemId"_ustr] = *pId;
SvTreeList* pModel = mxTreeList->GetModel();
if (pModel)
- aMap["SelectedItemPos"] = OUString::number(pModel->GetAbsPos(pEntry));
+ aMap[u"SelectedItemPos"_ustr] = OUString::number(pModel->GetAbsPos(pEntry));
return aMap;
}
OUString IconViewUIObject::get_name() const
{
- return "IconViewUIObject";
+ return u"IconViewUIObject"_ustr;
}
std::unique_ptr<UIObject> IconViewUIObject::create(vcl::Window* pWindow)
diff --git a/vcl/source/uitest/uitest.cxx b/vcl/source/uitest/uitest.cxx
index f52e636f5081..ba2cef12dd3f 100644
--- a/vcl/source/uitest/uitest.cxx
+++ b/vcl/source/uitest/uitest.cxx
@@ -23,7 +23,7 @@ bool UITest::executeCommand(const OUString& rCommand)
{
return comphelper::dispatchCommand(
rCommand,
- {{"SynchronMode", -1, css::uno::Any(true),
+ {{u"SynchronMode"_ustr, -1, css::uno::Any(true),
css::beans::PropertyState_DIRECT_VALUE}});
}
@@ -31,7 +31,7 @@ bool UITest::executeCommandWithParameters(const OUString& rCommand,
const css::uno::Sequence< css::beans::PropertyValue >& rArgs)
{
css::uno::Sequence< css::beans::PropertyValue > lNewArgs =
- {{"SynchronMode", -1, css::uno::Any(true),
+ {{u"SynchronMode"_ustr, -1, css::uno::Any(true),
css::beans::PropertyState_DIRECT_VALUE}};
if ( rArgs.hasElements() )
@@ -48,7 +48,7 @@ bool UITest::executeDialog(const OUString& rCommand)
{
return comphelper::dispatchCommand(
rCommand,
- {{"SynchronMode", -1, css::uno::Any(false),
+ {{u"SynchronMode"_ustr, -1, css::uno::Any(false),
css::beans::PropertyState_DIRECT_VALUE}});
}
diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx b/vcl/source/uitest/uno/uiobject_uno.cxx
index 5a67cf5f902e..de0efabddbf9 100644
--- a/vcl/source/uitest/uno/uiobject_uno.cxx
+++ b/vcl/source/uitest/uno/uiobject_uno.cxx
@@ -189,7 +189,7 @@ OUString SAL_CALL UIObjectUnoObj::getType()
OUString SAL_CALL UIObjectUnoObj::getImplementationName()
{
- return "org.libreoffice.uitest.UIObject";
+ return u"org.libreoffice.uitest.UIObject"_ustr;
}
sal_Bool UIObjectUnoObj::supportsService(OUString const & ServiceName)
@@ -199,7 +199,7 @@ sal_Bool UIObjectUnoObj::supportsService(OUString const & ServiceName)
css::uno::Sequence<OUString> UIObjectUnoObj::getSupportedServiceNames()
{
- return { "com.sun.star.ui.test.UIObject" };
+ return { u"com.sun.star.ui.test.UIObject"_ustr };
}
OUString SAL_CALL UIObjectUnoObj::getHierarchy()
diff --git a/vcl/source/uitest/uno/uitest_uno.cxx b/vcl/source/uitest/uno/uitest_uno.cxx
index 12694521fc19..a96371daba38 100644
--- a/vcl/source/uitest/uno/uitest_uno.cxx
+++ b/vcl/source/uitest/uno/uitest_uno.cxx
@@ -81,7 +81,7 @@ css::uno::Reference<css::ui::test::XUIObject> SAL_CALL UITestUnoObj::getTopFocus
SolarMutexGuard aGuard;
std::unique_ptr<UIObject> pObj = UITest::getFocusTopWindow();
if (!pObj)
- throw css::uno::RuntimeException("UITest::getFocusTopWindow did not find a window");
+ throw css::uno::RuntimeException(u"UITest::getFocusTopWindow did not find a window"_ustr);
return new UIObjectUnoObj(std::move(pObj));
}
@@ -90,13 +90,13 @@ css::uno::Reference<css::ui::test::XUIObject> SAL_CALL UITestUnoObj::getFloatWin
SolarMutexGuard aGuard;
std::unique_ptr<UIObject> pObj = UITest::getFloatWindow();
if (!pObj)
- throw css::uno::RuntimeException("UITest::getFloatWindow did not find a window");
+ throw css::uno::RuntimeException(u"UITest::getFloatWindow did not find a window"_ustr);
return new UIObjectUnoObj(std::move(pObj));
}
OUString SAL_CALL UITestUnoObj::getImplementationName()
{
- return "org.libreoffice.uitest.UITest";
+ return u"org.libreoffice.uitest.UITest"_ustr;
}
sal_Bool UITestUnoObj::supportsService(OUString const & ServiceName)
@@ -106,7 +106,7 @@ sal_Bool UITestUnoObj::supportsService(OUString const & ServiceName)
css::uno::Sequence<OUString> UITestUnoObj::getSupportedServiceNames()
{
- return { "com.sun.star.ui.test.UITest" };
+ return { u"com.sun.star.ui.test.UITest"_ustr };
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
diff --git a/vcl/source/window/EnumContext.cxx b/vcl/source/window/EnumContext.cxx
index ffe065568282..46486f98f82d 100644
--- a/vcl/source/window/EnumContext.cxx
+++ b/vcl/source/window/EnumContext.cxx
@@ -110,20 +110,20 @@ void EnumContext::ProvideApplicationContainers()
if (!maApplicationMap.empty())
return;
- AddEntry("com.sun.star.text.TextDocument", EnumContext::Application::Writer);
- AddEntry("com.sun.star.text.GlobalDocument", EnumContext::Application::WriterGlobal);
- AddEntry("com.sun.star.text.WebDocument", EnumContext::Application::WriterWeb);
- AddEntry("com.sun.star.xforms.XMLFormDocument", EnumContext::Application::WriterXML);
- AddEntry("com.sun.star.sdb.FormDesign", EnumContext::Application::WriterForm);
- AddEntry("com.sun.star.sdb.TextReportDesign", EnumContext::Application::WriterReport);
- AddEntry("com.sun.star.sheet.SpreadsheetDocument", EnumContext::Application::Calc);
- AddEntry("com.sun.star.chart2.ChartDocument", EnumContext::Application::Chart);
- AddEntry("com.sun.star.drawing.DrawingDocument", EnumContext::Application::Draw);
- AddEntry("com.sun.star.presentation.PresentationDocument", EnumContext::Application::Impress);
- AddEntry("com.sun.star.formula.FormulaProperties", EnumContext::Application::Formula);
- AddEntry("com.sun.star.sdb.OfficeDatabaseDocument", EnumContext::Application::Base);
- AddEntry("any", EnumContext::Application::Any);
- AddEntry("none", EnumContext::Application::NONE);
+ AddEntry(u"com.sun.star.text.TextDocument"_ustr, EnumContext::Application::Writer);
+ AddEntry(u"com.sun.star.text.GlobalDocument"_ustr, EnumContext::Application::WriterGlobal);
+ AddEntry(u"com.sun.star.text.WebDocument"_ustr, EnumContext::Application::WriterWeb);
+ AddEntry(u"com.sun.star.xforms.XMLFormDocument"_ustr, EnumContext::Application::WriterXML);
+ AddEntry(u"com.sun.star.sdb.FormDesign"_ustr, EnumContext::Application::WriterForm);
+ AddEntry(u"com.sun.star.sdb.TextReportDesign"_ustr, EnumContext::Application::WriterReport);
+ AddEntry(u"com.sun.star.sheet.SpreadsheetDocument"_ustr, EnumContext::Application::Calc);
+ AddEntry(u"com.sun.star.chart2.ChartDocument"_ustr, EnumContext::Application::Chart);
+ AddEntry(u"com.sun.star.drawing.DrawingDocument"_ustr, EnumContext::Application::Draw);
+ AddEntry(u"com.sun.star.presentation.PresentationDocument"_ustr, EnumContext::Application::Impress);
+ AddEntry(u"com.sun.star.formula.FormulaProperties"_ustr, EnumContext::Application::Formula);
+ AddEntry(u"com.sun.star.sdb.OfficeDatabaseDocument"_ustr, EnumContext::Application::Base);
+ AddEntry(u"any"_ustr, EnumContext::Application::Any);
+ AddEntry(u"none"_ustr, EnumContext::Application::NONE);
}
@@ -156,46 +156,46 @@ void EnumContext::ProvideContextContainers()
if (!maContextMap.empty())
return;
- AddEntry("3DObject", Context::ThreeDObject);
- AddEntry("Annotation", Context::Annotation);
- AddEntry("Auditing", Context::Auditing);
- AddEntry("Axis", Context::Axis);
- AddEntry("Cell", Context::Cell);
- AddEntry("Chart", Context::Chart);
- AddEntry("ChartElements", Context::ChartElements);
- AddEntry("Draw", Context::Draw);
- AddEntry("DrawFontwork", Context::DrawFontwork);
- AddEntry("DrawLine", Context::DrawLine);
- AddEntry("DrawPage", Context::DrawPage);
- AddEntry("DrawText", Context::DrawText);
- AddEntry("EditCell", Context::EditCell);
- AddEntry("ErrorBar", Context::ErrorBar);
- AddEntry("Form", Context::Form);
- AddEntry("Frame", Context::Frame);
- AddEntry("Graphic", Context::Graphic);
- AddEntry("Grid", Context::Grid);
- AddEntry("HandoutPage", Context::HandoutPage);
- AddEntry("MasterPage", Context::MasterPage);
- AddEntry("Math", Context::Math);
- AddEntry("Media", Context::Media);
- AddEntry("MultiObject", Context::MultiObject);
- AddEntry("NotesPage", Context::NotesPage);
- AddEntry("OLE", Context::OLE);
- AddEntry("OutlineText", Context::OutlineText);
- AddEntry("Pivot", Context::Pivot);
- AddEntry("Printpreview", Context::Printpreview);
- AddEntry("Series", Context::Series);
- AddEntry("SlidesorterPage", Context::SlidesorterPage);
- AddEntry("Table", Context::Table);
- AddEntry("Text", Context::Text);
- AddEntry("TextObject", Context::TextObject);
- AddEntry("Trendline", Context::Trendline);
- AddEntry("Sparkline", Context::Sparkline);
+ AddEntry(u"3DObject"_ustr, Context::ThreeDObject);
+ AddEntry(u"Annotation"_ustr, Context::Annotation);
+ AddEntry(u"Auditing"_ustr, Context::Auditing);
+ AddEntry(u"Axis"_ustr, Context::Axis);
+ AddEntry(u"Cell"_ustr, Context::Cell);
+ AddEntry(u"Chart"_ustr, Context::Chart);
+ AddEntry(u"ChartElements"_ustr, Context::ChartElements);
+ AddEntry(u"Draw"_ustr, Context::Draw);
+ AddEntry(u"DrawFontwork"_ustr, Context::DrawFontwork);
+ AddEntry(u"DrawLine"_ustr, Context::DrawLine);
+ AddEntry(u"DrawPage"_ustr, Context::DrawPage);
+ AddEntry(u"DrawText"_ustr, Context::DrawText);
+ AddEntry(u"EditCell"_ustr, Context::EditCell);
+ AddEntry(u"ErrorBar"_ustr, Context::ErrorBar);
+ AddEntry(u"Form"_ustr, Context::Form);
+ AddEntry(u"Frame"_ustr, Context::Frame);
+ AddEntry(u"Graphic"_ustr, Context::Graphic);
+ AddEntry(u"Grid"_ustr, Context::Grid);
+ AddEntry(u"HandoutPage"_ustr, Context::HandoutPage);
+ AddEntry(u"MasterPage"_ustr, Context::MasterPage);
+ AddEntry(u"Math"_ustr, Context::Math);
+ AddEntry(u"Media"_ustr, Context::Media);
+ AddEntry(u"MultiObject"_ustr, Context::MultiObject);
+ AddEntry(u"NotesPage"_ustr, Context::NotesPage);
+ AddEntry(u"OLE"_ustr, Context::OLE);
+ AddEntry(u"OutlineText"_ustr, Context::OutlineText);
+ AddEntry(u"Pivot"_ustr, Context::Pivot);
+ AddEntry(u"Printpreview"_ustr, Context::Printpreview);
+ AddEntry(u"Series"_ustr, Context::Series);
+ AddEntry(u"SlidesorterPage"_ustr, Context::SlidesorterPage);
+ AddEntry(u"Table"_ustr, Context::Table);
+ AddEntry(u"Text"_ustr, Context::Text);
+ AddEntry(u"TextObject"_ustr, Context::TextObject);
+ AddEntry(u"Trendline"_ustr, Context::Trendline);
+ AddEntry(u"Sparkline"_ustr, Context::Sparkline);
// other general contexts
- AddEntry("any", Context::Any);
- AddEntry("default", Context::Default);
- AddEntry("empty", Context::Empty);
+ AddEntry(u"any"_ustr, Context::Any);
+ AddEntry(u"default"_ustr, Context::Default);
+ AddEntry(u"empty"_ustr, Context::Empty);
}
EnumContext::Context EnumContext::GetContextEnum (const OUString& rsContextName)
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 225ad1b6f1c4..ed8d349f2dac 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -479,7 +479,7 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const OUString& sUIDir, const OUStr
catch (const css::uno::Exception &rExcept)
{
TOOLS_WARN_EXCEPTION("vcl.builder", "Unable to read .ui file " << sUIDir << sUIFile);
- CrashReporter::addKeyValue("VclBuilderException", "Unable to read .ui file: " + rExcept.Message, CrashReporter::Write);
+ CrashReporter::addKeyValue(u"VclBuilderException"_ustr, "Unable to read .ui file: " + rExcept.Message, CrashReporter::Write);
assert(false && "missing ui file or missing gb_CppunitTest_use_uiconfigs dependency");
throw;
}
@@ -796,7 +796,7 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const OUString& sUIDir, const OUStr
officecfg::Office::Common::Help::HelpRootURL::get().isEmpty();
if (bHideHelp)
{
- if (vcl::Window *pHelpButton = get("help"))
+ if (vcl::Window *pHelpButton = get(u"help"_ustr))
pHelpButton->Hide();
}
}
@@ -829,7 +829,7 @@ namespace
bool extractHasFrame(VclBuilder::stringmap& rMap)
{
bool bHasFrame = true;
- VclBuilder::stringmap::iterator aFind = rMap.find("has-frame");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"has-frame"_ustr);
if (aFind != rMap.end())
{
bHasFrame = toBool(aFind->second);
@@ -841,7 +841,7 @@ namespace
bool extractDrawValue(VclBuilder::stringmap& rMap)
{
bool bDrawValue = true;
- VclBuilder::stringmap::iterator aFind = rMap.find("draw-value");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"draw-value"_ustr);
if (aFind != rMap.end())
{
bDrawValue = toBool(aFind->second);
@@ -853,7 +853,7 @@ namespace
OUString extractPopupMenu(VclBuilder::stringmap& rMap)
{
OUString sRet;
- VclBuilder::stringmap::iterator aFind = rMap.find("popup");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"popup"_ustr);
if (aFind != rMap.end())
{
sRet = aFind->second;
@@ -865,7 +865,7 @@ namespace
OUString extractWidgetName(VclBuilder::stringmap& rMap)
{
OUString sRet;
- VclBuilder::stringmap::iterator aFind = rMap.find("name");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"name"_ustr);
if (aFind != rMap.end())
{
sRet = aFind->second;
@@ -876,8 +876,8 @@ namespace
OUString extractValuePos(VclBuilder::stringmap& rMap)
{
- OUString sRet("top");
- VclBuilder::stringmap::iterator aFind = rMap.find("value-pos");
+ OUString sRet(u"top"_ustr);
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"value-pos"_ustr);
if (aFind != rMap.end())
{
sRet = aFind->second;
@@ -888,8 +888,8 @@ namespace
OUString extractTypeHint(VclBuilder::stringmap &rMap)
{
- OUString sRet("normal");
- VclBuilder::stringmap::iterator aFind = rMap.find("type-hint");
+ OUString sRet(u"normal"_ustr);
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"type-hint"_ustr);
if (aFind != rMap.end())
{
sRet = aFind->second;
@@ -901,7 +901,7 @@ namespace
bool extractResizable(VclBuilder::stringmap &rMap)
{
bool bResizable = true;
- VclBuilder::stringmap::iterator aFind = rMap.find("resizable");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"resizable"_ustr);
if (aFind != rMap.end())
{
bResizable = toBool(aFind->second);
@@ -914,7 +914,7 @@ namespace
bool extractModal(VclBuilder::stringmap &rMap)
{
bool bModal = false;
- VclBuilder::stringmap::iterator aFind = rMap.find("modal");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"modal"_ustr);
if (aFind != rMap.end())
{
bModal = toBool(aFind->second);
@@ -927,7 +927,7 @@ namespace
bool extractDecorated(VclBuilder::stringmap &rMap)
{
bool bDecorated = true;
- VclBuilder::stringmap::iterator aFind = rMap.find("decorated");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"decorated"_ustr);
if (aFind != rMap.end())
{
bDecorated = toBool(aFind->second);
@@ -939,7 +939,7 @@ namespace
bool extractCloseable(VclBuilder::stringmap &rMap)
{
bool bCloseable = true;
- VclBuilder::stringmap::iterator aFind = rMap.find("deletable");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"deletable"_ustr);
if (aFind != rMap.end())
{
bCloseable = toBool(aFind->second);
@@ -951,7 +951,7 @@ namespace
bool extractEntry(VclBuilder::stringmap &rMap)
{
bool bHasEntry = false;
- VclBuilder::stringmap::iterator aFind = rMap.find("has-entry");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"has-entry"_ustr);
if (aFind != rMap.end())
{
bHasEntry = toBool(aFind->second);
@@ -963,7 +963,7 @@ namespace
bool extractOrientation(VclBuilder::stringmap &rMap)
{
bool bVertical = false;
- VclBuilder::stringmap::iterator aFind = rMap.find("orientation");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"orientation"_ustr);
if (aFind != rMap.end())
{
bVertical = aFind->second.equalsIgnoreAsciiCase("vertical");
@@ -975,7 +975,7 @@ namespace
bool extractVerticalTabPos(VclBuilder::stringmap &rMap)
{
bool bVertical = false;
- VclBuilder::stringmap::iterator aFind = rMap.find("tab-pos");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"tab-pos"_ustr);
if (aFind != rMap.end())
{
bVertical = aFind->second.equalsIgnoreAsciiCase("left") ||
@@ -988,7 +988,7 @@ namespace
bool extractVerticalTabsWithIcons(VclBuilder::stringmap &rMap)
{
bool bWithIcons = false;
- VclBuilder::stringmap::iterator aFind = rMap.find("group-name");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"group-name"_ustr);
if (aFind != rMap.end())
{
bWithIcons = aFind->second.equalsIgnoreAsciiCase("icons");
@@ -1000,7 +1000,7 @@ namespace
bool extractInconsistent(VclBuilder::stringmap &rMap)
{
bool bInconsistent = false;
- VclBuilder::stringmap::iterator aFind = rMap.find("inconsistent");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"inconsistent"_ustr);
if (aFind != rMap.end())
{
bInconsistent = toBool(aFind->second);
@@ -1014,7 +1014,7 @@ namespace
OUString sIconName;
// allow pixbuf, but prefer icon-name
{
- VclBuilder::stringmap::iterator aFind = rMap.find("pixbuf");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"pixbuf"_ustr);
if (aFind != rMap.end())
{
sIconName = aFind->second;
@@ -1022,7 +1022,7 @@ namespace
}
}
{
- VclBuilder::stringmap::iterator aFind = rMap.find("icon-name");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"icon-name"_ustr);
if (aFind != rMap.end())
{
sIconName = aFind->second;
@@ -1038,7 +1038,7 @@ namespace
WinBits extractRelief(VclBuilder::stringmap &rMap)
{
WinBits nBits = WB_3DLOOK;
- VclBuilder::stringmap::iterator aFind = rMap.find("relief");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"relief"_ustr);
if (aFind != rMap.end())
{
assert(aFind->second != "half" && "relief of 'half' unsupported");
@@ -1052,7 +1052,7 @@ namespace
OUString extractLabel(VclBuilder::stringmap &rMap)
{
OUString sType;
- VclBuilder::stringmap::iterator aFind = rMap.find("label");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"label"_ustr);
if (aFind != rMap.end())
{
sType = aFind->second;
@@ -1064,7 +1064,7 @@ namespace
OUString extractActionName(VclBuilder::stringmap &rMap)
{
OUString sActionName;
- VclBuilder::stringmap::iterator aFind = rMap.find("action-name");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"action-name"_ustr);
if (aFind != rMap.end())
{
sActionName = aFind->second;
@@ -1076,7 +1076,7 @@ namespace
bool extractVisible(VclBuilder::stringmap &rMap)
{
bool bRet = false;
- VclBuilder::stringmap::iterator aFind = rMap.find("visible");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"visible"_ustr);
if (aFind != rMap.end())
{
bRet = toBool(aFind->second);
@@ -1087,15 +1087,15 @@ namespace
Size extractSizeRequest(VclBuilder::stringmap &rMap)
{
- OUString sWidthRequest("0");
- OUString sHeightRequest("0");
- VclBuilder::stringmap::iterator aFind = rMap.find("width-request");
+ OUString sWidthRequest(u"0"_ustr);
+ OUString sHeightRequest(u"0"_ustr);
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"width-request"_ustr);
if (aFind != rMap.end())
{
sWidthRequest = aFind->second;
rMap.erase(aFind);
}
- aFind = rMap.find("height-request");
+ aFind = rMap.find(u"height-request"_ustr);
if (aFind != rMap.end())
{
sHeightRequest = aFind->second;
@@ -1107,9 +1107,9 @@ namespace
OUString extractTooltipText(VclBuilder::stringmap &rMap)
{
OUString sTooltipText;
- VclBuilder::stringmap::iterator aFind = rMap.find("tooltip-text");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"tooltip-text"_ustr);
if (aFind == rMap.end())
- aFind = rMap.find("tooltip-markup");
+ aFind = rMap.find(u"tooltip-markup"_ustr);
if (aFind != rMap.end())
{
sTooltipText = aFind->second;
@@ -1121,7 +1121,7 @@ namespace
float extractAlignment(VclBuilder::stringmap &rMap)
{
float f = 0.0;
- VclBuilder::stringmap::iterator aFind = rMap.find("alignment");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"alignment"_ustr);
if (aFind != rMap.end())
{
f = aFind->second.toFloat();
@@ -1133,7 +1133,7 @@ namespace
OUString extractTitle(VclBuilder::stringmap &rMap)
{
OUString sTitle;
- VclBuilder::stringmap::iterator aFind = rMap.find("title");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"title"_ustr);
if (aFind != rMap.end())
{
sTitle = aFind->second;
@@ -1145,7 +1145,7 @@ namespace
bool extractHeadersVisible(VclBuilder::stringmap &rMap)
{
bool bHeadersVisible = true;
- VclBuilder::stringmap::iterator aFind = rMap.find("headers-visible");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"headers-visible"_ustr);
if (aFind != rMap.end())
{
bHeadersVisible = toBool(aFind->second);
@@ -1157,7 +1157,7 @@ namespace
bool extractSortIndicator(VclBuilder::stringmap &rMap)
{
bool bSortIndicator = false;
- VclBuilder::stringmap::iterator aFind = rMap.find("sort-indicator");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"sort-indicator"_ustr);
if (aFind != rMap.end())
{
bSortIndicator = toBool(aFind->second);
@@ -1169,7 +1169,7 @@ namespace
bool extractClickable(VclBuilder::stringmap &rMap)
{
bool bClickable = false;
- VclBuilder::stringmap::iterator aFind = rMap.find("clickable");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"clickable"_ustr);
if (aFind != rMap.end())
{
bClickable = toBool(aFind->second);
@@ -1259,7 +1259,7 @@ namespace
void VclBuilder::extractGroup(const OUString &id, stringmap &rMap)
{
- VclBuilder::stringmap::iterator aFind = rMap.find("group");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"group"_ustr);
if (aFind != rMap.end())
{
OUString sID = aFind->second;
@@ -1285,7 +1285,7 @@ void VclBuilder::connectFormattedFormatterAdjustment(const OUString &id, const O
bool VclBuilder::extractAdjustmentToMap(const OUString& id, VclBuilder::stringmap& rMap, std::vector<WidgetAdjustmentMap>& rAdjustmentMap)
{
- VclBuilder::stringmap::iterator aFind = rMap.find("adjustment");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"adjustment"_ustr);
if (aFind != rMap.end())
{
rAdjustmentMap.emplace_back(id, aFind->second);
@@ -1300,7 +1300,7 @@ namespace
sal_Int32 extractActive(VclBuilder::stringmap &rMap)
{
sal_Int32 nActiveId = 0;
- VclBuilder::stringmap::iterator aFind = rMap.find("active");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"active"_ustr);
if (aFind != rMap.end())
{
nActiveId = aFind->second.toInt32();
@@ -1312,7 +1312,7 @@ namespace
bool extractSelectable(VclBuilder::stringmap &rMap)
{
bool bSelectable = false;
- VclBuilder::stringmap::iterator aFind = rMap.find("selectable");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"selectable"_ustr);
if (aFind != rMap.end())
{
bSelectable = toBool(aFind->second);
@@ -1324,7 +1324,7 @@ namespace
OUString extractAdjustment(VclBuilder::stringmap &rMap)
{
OUString sAdjustment;
- VclBuilder::stringmap::iterator aFind = rMap.find("adjustment");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"adjustment"_ustr);
if (aFind != rMap.end())
{
sAdjustment= aFind->second;
@@ -1337,7 +1337,7 @@ namespace
bool extractDrawIndicator(VclBuilder::stringmap &rMap)
{
bool bDrawIndicator = false;
- VclBuilder::stringmap::iterator aFind = rMap.find("draw-indicator");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"draw-indicator"_ustr);
if (aFind != rMap.end())
{
bDrawIndicator = toBool(aFind->second);
@@ -1349,7 +1349,7 @@ namespace
void VclBuilder::extractModel(const OUString &id, stringmap &rMap)
{
- VclBuilder::stringmap::iterator aFind = rMap.find("model");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"model"_ustr);
if (aFind != rMap.end())
{
m_pParserState->m_aModelMaps.emplace_back(id, aFind->second,
@@ -1360,7 +1360,7 @@ void VclBuilder::extractModel(const OUString &id, stringmap &rMap)
void VclBuilder::extractBuffer(const OUString &id, stringmap &rMap)
{
- VclBuilder::stringmap::iterator aFind = rMap.find("buffer");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"buffer"_ustr);
if (aFind != rMap.end())
{
m_pParserState->m_aTextBufferMaps.emplace_back(id, aFind->second);
@@ -1371,7 +1371,7 @@ void VclBuilder::extractBuffer(const OUString &id, stringmap &rMap)
int VclBuilder::getImageSize(const stringmap &rMap)
{
int nSize = 4;
- auto aFind = rMap.find("icon-size");
+ auto aFind = rMap.find(u"icon-size"_ustr);
if (aFind != rMap.end())
nSize = aFind->second.toInt32();
return nSize;
@@ -1379,7 +1379,7 @@ int VclBuilder::getImageSize(const stringmap &rMap)
void VclBuilder::extractButtonImage(const OUString &id, stringmap &rMap, bool bRadio)
{
- VclBuilder::stringmap::iterator aFind = rMap.find("image");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"image"_ustr);
if (aFind != rMap.end())
{
m_pParserState->m_aButtonImageWidgetMaps.emplace_back(id, aFind->second, bRadio);
@@ -1389,7 +1389,7 @@ void VclBuilder::extractButtonImage(const OUString &id, stringmap &rMap, bool bR
void VclBuilder::extractMnemonicWidget(const OUString &rLabelID, stringmap &rMap)
{
- VclBuilder::stringmap::iterator aFind = rMap.find("mnemonic-widget");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"mnemonic-widget"_ustr);
if (aFind != rMap.end())
{
OUString sID = aFind->second;
@@ -1423,9 +1423,9 @@ void VclBuilder::cleanupWidgetOwnScrolling(vcl::Window *pScrollParent, vcl::Wind
{
//remove the redundant scrolling parent
sal_Int32 nWidthReq = pScrollParent->get_width_request();
- rMap["width-request"] = OUString::number(nWidthReq);
+ rMap[u"width-request"_ustr] = OUString::number(nWidthReq);
sal_Int32 nHeightReq = pScrollParent->get_height_request();
- rMap["height-request"] = OUString::number(nHeightReq);
+ rMap[u"height-request"_ustr] = OUString::number(nHeightReq);
m_pParserState->m_aRedundantParentWidgets[pScrollParent] = pWindow;
}
@@ -1529,7 +1529,7 @@ namespace
// Takes a string like "sfxlo-NotebookbarToolBox"
VclBuilder::customMakeWidget GetCustomMakeWidget(const OUString& rName)
{
- const OUString name = rName == "sfxlo-SidebarToolBox" ? "sfxlo-NotebookbarToolBox" : rName;
+ const OUString name = rName == "sfxlo-SidebarToolBox" ? u"sfxlo-NotebookbarToolBox"_ustr : rName;
VclBuilder::customMakeWidget pFunction = nullptr;
if (sal_Int32 nDelim = name.indexOf('-'); nDelim != -1)
{
@@ -1884,7 +1884,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OUString
}
else if (name == "GtkIconView")
{
- assert(rMap.find("model") != rMap.end() && "GtkIconView must have a model");
+ assert(rMap.find(u"model"_ustr) != rMap.end() && "GtkIconView must have a model");
//window we want to apply the packing props for this GtkIconView to
VclPtr<vcl::Window> xWindowForPackingProps;
@@ -1907,7 +1907,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OUString
{
if (!m_bLegacy)
{
- assert(rMap.find("model") != rMap.end() && "GtkTreeView must have a model");
+ assert(rMap.find(u"model"_ustr) != rMap.end() && "GtkTreeView must have a model");
}
//window we want to apply the packing props for this GtkTreeView to
@@ -2022,7 +2022,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OUString
//full screen windows
if (!pParent)
{
- rMap["visible"] = "false";
+ rMap[u"visible"_ustr] = "false";
}
}
else if (name == "GtkSeparator")
@@ -2115,7 +2115,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OUString
}
else if(name == "NotebookBarAddonsToolMergePoint")
{
- customMakeWidget pFunction = GetCustomMakeWidget("sfxlo-NotebookbarToolBox");
+ customMakeWidget pFunction = GetCustomMakeWidget(u"sfxlo-NotebookbarToolBox"_ustr);
if(pFunction != nullptr)
NotebookBarAddonsMerger::MergeNotebookBarAddons(pParent, pFunction, m_xFrame, *m_pNotebookBarAddonsItem, rMap);
return nullptr;
@@ -2288,7 +2288,7 @@ namespace BuilderUtils
OUString extractCustomProperty(VclBuilder::stringmap &rMap)
{
OUString sCustomProperty;
- VclBuilder::stringmap::iterator aFind = rMap.find("customproperty");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"customproperty"_ustr);
if (aFind != rMap.end())
{
sCustomProperty = aFind->second;
@@ -2299,7 +2299,7 @@ namespace BuilderUtils
void ensureDefaultWidthChars(VclBuilder::stringmap &rMap)
{
- OUString sWidthChars("width-chars");
+ OUString sWidthChars(u"width-chars"_ustr);
VclBuilder::stringmap::iterator aFind = rMap.find(sWidthChars);
if (aFind == rMap.end())
rMap[sWidthChars] = "20";
@@ -2308,7 +2308,7 @@ namespace BuilderUtils
bool extractDropdown(VclBuilder::stringmap &rMap)
{
bool bDropdown = true;
- VclBuilder::stringmap::iterator aFind = rMap.find("dropdown");
+ VclBuilder::stringmap::iterator aFind = rMap.find(u"dropdown"_ustr);
if (aFind != rMap.end())
{
bDropdown = toBool(aFind->second);
@@ -2541,7 +2541,7 @@ VclPtr<vcl::Window> VclBuilder::insertObject(vcl::Window *pParent, const OUStrin
// tdf#119827 handle size before scale so we can trivially
// scale on the current font size whether size is present
// or not.
- VclBuilder::stringmap::iterator aSize = rPango.find("size");
+ VclBuilder::stringmap::iterator aSize = rPango.find(u"size"_ustr);
if (aSize != rPango.end())
{
pCurrentChild->set_font_attribute(aSize->first, aSize->second);
@@ -2599,7 +2599,7 @@ void VclBuilder::handleTabChild(vcl::Window *pParent, xmlreader::XmlReader &read
sal_Int32 nDelim = sID.indexOf(':');
if (nDelim != -1)
{
- aProperties["customproperty"] = sID.copy(nDelim + 1);
+ aProperties[u"customproperty"_ustr] = sID.copy(nDelim + 1);
sID = sID.copy(0, nDelim);
}
sIDs.push_back(sID);
@@ -2638,7 +2638,7 @@ void VclBuilder::handleTabChild(vcl::Window *pParent, xmlreader::XmlReader &read
VerticalTabControl *pVerticalTabControl = pParent->GetType() == WindowType::VERTICALTABCONTROL ?
static_cast<VerticalTabControl*>(pParent) : nullptr;
assert(pTabControl || pVerticalTabControl);
- VclBuilder::stringmap::iterator aFind = aProperties.find("label");
+ VclBuilder::stringmap::iterator aFind = aProperties.find(u"label"_ustr);
if (aFind != aProperties.end())
{
OUString sTooltip(extractTooltipText(aProperties));
@@ -2960,7 +2960,7 @@ void BuilderBase::collectAtkRoleAttribute(xmlreader::XmlReader& reader, stringma
}
if (!sProperty.isEmpty())
- rMap["role"] = sProperty;
+ rMap[u"role"_ustr] = sProperty;
}
void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OUString &rID)
@@ -3339,7 +3339,7 @@ void VclBuilder::handleMenuObject(Menu *pParent, xmlreader::XmlReader &reader)
accelmap aAccelerators;
if (!sCustomProperty.isEmpty())
- aProperties["customproperty"] = sCustomProperty;
+ aProperties[u"customproperty"_ustr] = sCustomProperty;
while(true)
{
@@ -3656,7 +3656,7 @@ VclPtr<vcl::Window> VclBuilder::handleObject(vcl::Window *pParent, stringmap *pA
std::vector<ComboBoxTextItem> aItems;
if (!sCustomProperty.isEmpty())
- aProperties["customproperty"] = sCustomProperty;
+ aProperties[u"customproperty"_ustr] = sCustomProperty;
VclPtr<vcl::Window> pCurrentChild;
while(true)
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index d160e8aa73ef..6c9d7577aa41 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -236,8 +236,8 @@ void vcl::Cursor::ImplDoShow( bool bDrawDirect, bool bRestore )
mpData->maTimer.Start();
else if ( !mpData->mbCurVisible )
ImplDraw();
- LOKNotify( pWindow, "cursor_invalidate" );
- LOKNotify( pWindow, "cursor_visible" );
+ LOKNotify( pWindow, u"cursor_invalidate"_ustr );
+ LOKNotify( pWindow, u"cursor_visible"_ustr );
}
}
@@ -297,7 +297,7 @@ bool vcl::Cursor::ImplDoHide( bool bSuspend )
if ( !bSuspend )
{
- LOKNotify( mpData->mpWindow, "cursor_visible" );
+ LOKNotify( mpData->mpWindow, u"cursor_visible"_ustr );
mpData->maTimer.Stop();
mpData->mpWindow = nullptr;
}
@@ -336,7 +336,7 @@ void vcl::Cursor::ImplNew()
ImplDraw();
if ( !mpWindow )
{
- LOKNotify( mpData->mpWindow, "cursor_invalidate" );
+ LOKNotify( mpData->mpWindow, u"cursor_invalidate"_ustr );
if ( mpData->maTimer.GetTimeout() != STYLE_CURSOR_NOBLINKTIME )
mpData->maTimer.Start();
}
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 1ba812c94197..aa8f3d1d4b4c 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -556,7 +556,7 @@ void VclBuilderContainer::disposeBuilder()
OUString AllSettings::GetUIRootDir()
{
- OUString sShareLayer("$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/config/soffice.cfg/");
+ OUString sShareLayer(u"$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/config/soffice.cfg/"_ustr);
rtl::Bootstrap::expandMacros(sShareLayer);
return sShareLayer;
}
@@ -641,7 +641,7 @@ void Dialog::dispose()
if(const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
{
if (bTunnelingEnabled)
- pNotifier->notifyWindow(GetLOKWindowId(), "close");
+ pNotifier->notifyWindow(GetLOKWindowId(), u"close"_ustr);
ReleaseLOKNotifier();
}
}
@@ -773,8 +773,8 @@ void Dialog::StateChanged( StateChangedType nType )
if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
{
- pNotifier->notifyWindow(GetLOKWindowId(), "created", aItems);
- pNotifier->notifyWindow(GetLOKWindowId(), "created", aItems);
+ pNotifier->notifyWindow(GetLOKWindowId(), u"created"_ustr, aItems);
+ pNotifier->notifyWindow(GetLOKWindowId(), u"created"_ustr, aItems);
}
else
{
@@ -782,7 +782,7 @@ void Dialog::StateChanged( StateChangedType nType )
if (pViewShell)
{
SetLOKNotifier(pViewShell);
- pViewShell->notifyWindow(GetLOKWindowId(), "created", aItems);
+ pViewShell->notifyWindow(GetLOKWindowId(), u"created"_ustr, aItems);
}
}
}
@@ -807,7 +807,7 @@ void Dialog::StateChanged( StateChangedType nType )
{
std::vector<vcl::LOKPayloadItem> aPayload;
aPayload.emplace_back("title", GetText().toUtf8());
- pNotifier->notifyWindow(GetLOKWindowId(), "title_changed", aPayload);
+ pNotifier->notifyWindow(GetLOKWindowId(), u"title_changed"_ustr, aPayload);
}
}
@@ -826,7 +826,7 @@ void Dialog::StateChanged( StateChangedType nType )
{
std::vector<vcl::LOKPayloadItem> aPayload;
aPayload.emplace_back("title", GetText().toUtf8());
- pNotifier->notifyWindow(GetLOKWindowId(), IsVisible()? OUString("show"): OUString("hide"), aPayload);
+ pNotifier->notifyWindow(GetLOKWindowId(), IsVisible()? u"show"_ustr: u"hide"_ustr, aPayload);
}
}
}
@@ -1049,7 +1049,7 @@ bool Dialog::ImplStartExecute()
std::vector<vcl::LOKPayloadItem> aItems;
aItems.emplace_back("size", GetSizePixel().toString());
aItems.emplace_back("unique_id", this->get_id().toUtf8());
- pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems);
+ pNotifier->notifyWindow(GetLOKWindowId(), u"size_changed"_ustr, aItems);
}
}
@@ -1147,7 +1147,7 @@ void Dialog::EndDialog( tools::Long nResult )
if(const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
{
if (mpDialogImpl->m_bLOKTunneling)
- pNotifier->notifyWindow(GetLOKWindowId(), "close");
+ pNotifier->notifyWindow(GetLOKWindowId(), u"close"_ustr);
ReleaseLOKNotifier();
}
}
@@ -1439,7 +1439,7 @@ void Dialog::Resize()
std::vector<vcl::LOKPayloadItem> aItems;
aItems.emplace_back("size", GetSizePixel().toString());
aItems.emplace_back("unique_id", this->get_id().toUtf8());
- pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems);
+ pNotifier->notifyWindow(GetLOKWindowId(), u"size_changed"_ustr, aItems);
}
}
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index 2bced4d8047b..e55cca238349 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -1088,11 +1088,11 @@ SystemWindow* DockingWindow::GetFloatingWindow() const
DropdownDockingWindow::DropdownDockingWindow(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame, bool bTearable)
: DockingWindow(pParent,
- !bTearable ? OUString("InterimDockParent") : OUString("InterimTearableParent"),
- !bTearable ? OUString("vcl/ui/interimdockparent.ui") : OUString("vcl/ui/interimtearableparent.ui"),
+ !bTearable ? u"InterimDockParent"_ustr : u"InterimTearableParent"_ustr,
+ !bTearable ? u"vcl/ui/interimdockparent.ui"_ustr : u"vcl/ui/interimtearableparent.ui"_ustr,
"vcl::DropdownDockingWindow maLayoutIdle",
rFrame)
- , m_xBox(m_pUIBuilder->get("box"))
+ , m_xBox(m_pUIBuilder->get(u"box"_ustr))
{
}
@@ -1108,8 +1108,8 @@ void DropdownDockingWindow::dispose()
}
ResizableDockingWindow::ResizableDockingWindow(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame)
- : DockingWindow(pParent, "DockingWindow", "vcl/ui/dockingwindow.ui", "vcl::ResizableDockingWindow maLayoutIdle", rFrame)
- , m_xBox(m_pUIBuilder->get("box"))
+ : DockingWindow(pParent, u"DockingWindow"_ustr, u"vcl/ui/dockingwindow.ui"_ustr, "vcl::ResizableDockingWindow maLayoutIdle", rFrame)
+ , m_xBox(m_pUIBuilder->get(u"box"_ustr))
{
}
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index b2faacadb5fa..5c576a0fd358 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -662,7 +662,7 @@ void FloatingWindow::PixelInvalidate(const tools::Rectangle* /*pRectangle*/)
std::make_pair("rectangle"_ostr, aRect.toString())
};
const vcl::ILibreOfficeKitNotifier* pNotifier = pParent->GetLOKNotifier();
- pNotifier->notifyWindow(GetLOKWindowId(), "invalidate", aPayload);
+ pNotifier->notifyWindow(GetLOKWindowId(), u"invalidate"_ustr, aPayload);
}
}
@@ -708,13 +708,13 @@ void FloatingWindow::StateChanged( StateChangedType nType )
}
aItems.emplace_back("size", GetSizePixel().toString());
- GetLOKNotifier()->notifyWindow(GetLOKWindowId(), "created", aItems);
+ GetLOKNotifier()->notifyWindow(GetLOKWindowId(), u"created"_ustr, aItems);
}
else if (!IsVisible() && nType == StateChangedType::Visible)
{
if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
{
- pNotifier->notifyWindow(GetLOKWindowId(), "close");
+ pNotifier->notifyWindow(GetLOKWindowId(), u"close"_ustr);
ReleaseLOKNotifier();
}
}
diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx
index cc3fca5802ea..31bf70f08d57 100644
--- a/vcl/source/window/keycod.cxx
+++ b/vcl/source/window/keycod.cxx
@@ -66,7 +66,7 @@ vcl::KeyCode::KeyCode( KeyFuncType eFunction )
OUString vcl::KeyCode::GetName() const
{
vcl::Window* pWindow = ImplGetDefaultWindow();
- return pWindow ? pWindow->ImplGetFrame()->GetKeyName( GetFullCode() ) : "";
+ return pWindow ? pWindow->ImplGetFrame()->GetKeyName( GetFullCode() ) : u""_ustr;
}
KeyFuncType vcl::KeyCode::GetFunction() const
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index c4729a1e1abb..2d42d305498e 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2449,7 +2449,7 @@ void MessageDialog::create_message_area()
pBtn.set( VclPtr<OKButton>::Create(pButtonBox) );
pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON);
pBtn->Show();
- pBtn->set_id("ok");
+ pBtn->set_id(u"ok"_ustr);
add_button(pBtn, RET_OK, true);
nDefaultResponse = RET_OK;
break;
@@ -2457,7 +2457,7 @@ void MessageDialog::create_message_area()
pBtn.set( VclPtr<CloseButton>::Create(pButtonBox) );
pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON);
pBtn->Show();
- pBtn->set_id("close");
+ pBtn->set_id(u"close"_ustr);
add_button(pBtn, RET_CLOSE, true);
nDefaultResponse = RET_CLOSE;
break;
@@ -2465,7 +2465,7 @@ void MessageDialog::create_message_area()
pBtn.set( VclPtr<CancelButton>::Create(pButtonBox) );
pBtn->SetStyle(pBtn->GetStyle() & WB_DEFBUTTON);
pBtn->Show();
- pBtn->set_id("cancel");
+ pBtn->set_id(u"cancel"_ustr);
add_button(pBtn, RET_CANCEL, true);
nDefaultResponse = RET_CANCEL;
break;
@@ -2473,25 +2473,25 @@ void MessageDialog::create_message_area()
pBtn = VclPtr<PushButton>::Create(pButtonBox);
pBtn->SetText(GetStandardText(StandardButtonType::Yes));
pBtn->Show();
- pBtn->set_id("yes");
+ pBtn->set_id(u"yes"_ustr);
add_button(pBtn, RET_YES, true);
pBtn.set( VclPtr<PushButton>::Create(pButtonBox) );
pBtn->SetText(GetStandardText(StandardButtonType::No));
pBtn->Show();
- pBtn->set_id("no");
+ pBtn->set_id(u"no"_ustr);
add_button(pBtn, RET_NO, true);
nDefaultResponse = RET_NO;
break;
case VclButtonsType::OkCancel:
pBtn.set( VclPtr<OKButton>::Create(pButtonBox) );
pBtn->Show();
- pBtn->set_id("ok");
+ pBtn->set_id(u"ok"_ustr);
add_button(pBtn, RET_OK, true);
pBtn.set( VclPtr<CancelButton>::Create(pButtonBox) );
pBtn->Show();
- pBtn->set_id("cancel");
+ pBtn->set_id(u"cancel"_ustr);
add_button(pBtn, RET_CANCEL, true);
nDefaultResponse = RET_CANCEL;
break;
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index eb08c4de9848..3fedfb936bc3 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -84,7 +84,7 @@ static bool ImplAccelDisabled()
{
OUString aStr =
vcl::SettingsConfigItem::get()->
- getValue( "Menu", "SuppressAccelerators" );
+ getValue( u"Menu"_ustr, u"SuppressAccelerators"_ustr );
nAccelDisabled = aStr.equalsIgnoreAsciiCase("true") ? 1 : 0;
}
return nAccelDisabled == 1;
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 5996b818d4bb..fc6435ef46bd 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1225,7 +1225,7 @@ void Window::PixelInvalidate(const tools::Rectangle* pRectangle)
aPayload.emplace_back("rectangle", aRect.toString());
- pNotifier->notifyWindow(GetLOKWindowId(), "invalidate", aPayload);
+ pNotifier->notifyWindow(GetLOKWindowId(), u"invalidate"_ustr, aPayload);
}
// Added for dialog items. Pass invalidation to the parent window.
else if (VclPtr<vcl::Window> pParent = GetParentWithLOKNotifier())
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index c76701b31698..f642641a0fc2 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -524,57 +524,57 @@ Size const & PrintDialog::getJobPageSize()
}
PrintDialog::PrintDialog(weld::Window* i_pWindow, std::shared_ptr<PrinterController> i_xController)
- : GenericDialogController(i_pWindow, "vcl/ui/printdialog.ui", "PrintDialog")
+ : GenericDialogController(i_pWindow, u"vcl/ui/printdialog.ui"_ustr, u"PrintDialog"_ustr)
, maPController(std::move( i_xController ))
- , mxTabCtrl(m_xBuilder->weld_notebook("tabcontrol"))
- , mxScrolledWindow(m_xBuilder->weld_scrolled_window("scrolledwindow"))
- , mxPageLayoutFrame(m_xBuilder->weld_frame("layoutframe"))
- , mxPrinters(m_xBuilder->weld_combo_box("printersbox"))
- , mxStatusTxt(m_xBuilder->weld_label("status"))
- , mxSetupButton(m_xBuilder->weld_button("setup"))
- , mxCopyCountField(m_xBuilder->weld_spin_button("copycount"))
- , mxCollateBox(m_xBuilder->weld_check_button("collate"))
- , mxCollateImage(m_xBuilder->weld_image("collateimage"))
- , mxPageRangeEdit(m_xBuilder->weld_entry("pagerange"))
- , mxPageRangesRadioButton(m_xBuilder->weld_radio_button("rbRangePages"))
- , mxPaperSidesBox(m_xBuilder->weld_combo_box("sidesbox"))
- , mxSingleJobsBox(m_xBuilder->weld_check_button("singlejobs"))
- , mxReverseOrderBox(m_xBuilder->weld_check_button("reverseorder"))
- , mxOKButton(m_xBuilder->weld_button("ok"))
- , mxCancelButton(m_xBuilder->weld_button("cancel"))
- , mxBackwardBtn(m_xBuilder->weld_button("backward"))
- , mxForwardBtn(m_xBuilder->weld_button("forward"))
- , mxFirstBtn(m_xBuilder->weld_button("btnFirst"))
- , mxLastBtn(m_xBuilder->weld_button("btnLast"))
- , mxPreviewBox(m_xBuilder->weld_check_button("previewbox"))
- , mxNumPagesText(m_xBuilder->weld_label("totalnumpages"))
+ , mxTabCtrl(m_xBuilder->weld_notebook(u"tabcontrol"_ustr))
+ , mxScrolledWindow(m_xBuilder->weld_scrolled_window(u"scrolledwindow"_ustr))
+ , mxPageLayoutFrame(m_xBuilder->weld_frame(u"layoutframe"_ustr))
+ , mxPrinters(m_xBuilder->weld_combo_box(u"printersbox"_ustr))
+ , mxStatusTxt(m_xBuilder->weld_label(u"status"_ustr))
+ , mxSetupButton(m_xBuilder->weld_button(u"setup"_ustr))
+ , mxCopyCountField(m_xBuilder->weld_spin_button(u"copycount"_ustr))
+ , mxCollateBox(m_xBuilder->weld_check_button(u"collate"_ustr))
+ , mxCollateImage(m_xBuilder->weld_image(u"collateimage"_ustr))
+ , mxPageRangeEdit(m_xBuilder->weld_entry(u"pagerange"_ustr))
+ , mxPageRangesRadioButton(m_xBuilder->weld_radio_button(u"rbRangePages"_ustr))
+ , mxPaperSidesBox(m_xBuilder->weld_combo_box(u"sidesbox"_ustr))
+ , mxSingleJobsBox(m_xBuilder->weld_check_button(u"singlejobs"_ustr))
+ , mxReverseOrderBox(m_xBuilder->weld_check_button(u"reverseorder"_ustr))
+ , mxOKButton(m_xBuilder->weld_button(u"ok"_ustr))
+ , mxCancelButton(m_xBuilder->weld_button(u"cancel"_ustr))
+ , mxBackwardBtn(m_xBuilder->weld_button(u"backward"_ustr))
+ , mxForwardBtn(m_xBuilder->weld_button(u"forward"_ustr))
+ , mxFirstBtn(m_xBuilder->weld_button(u"btnFirst"_ustr))
+ , mxLastBtn(m_xBuilder->weld_button(u"btnLast"_ustr))
+ , mxPreviewBox(m_xBuilder->weld_check_button(u"previewbox"_ustr))
+ , mxNumPagesText(m_xBuilder->weld_label(u"totalnumpages"_ustr))
, mxPreview(new PrintPreviewWindow(this))
- , mxPreviewWindow(new weld::CustomWeld(*m_xBuilder, "preview", *mxPreview))
- , mxPageEdit(m_xBuilder->weld_entry("pageedit"))
- , mxPagesBtn(m_xBuilder->weld_radio_button("pagespersheetbtn"))
- , mxBrochureBtn(m_xBuilder->weld_radio_button("brochure"))
- , mxPagesBoxTitleTxt(m_xBuilder->weld_label("pagespersheettxt"))
- , mxNupPagesBox(m_xBuilder->weld_combo_box("pagespersheetbox"))
- , mxNupNumPagesTxt(m_xBuilder->weld_label("pagestxt"))
- , mxNupColEdt(m_xBuilder->weld_spin_button("pagecols"))
- , mxNupTimesTxt(m_xBuilder->weld_label("by"))
- , mxNupRowsEdt(m_xBuilder->weld_spin_button("pagerows"))
- , mxPageMarginTxt1(m_xBuilder->weld_label("pagemargintxt1"))
- , mxPageMarginEdt(m_xBuilder->weld_metric_spin_button("pagemarginsb", FieldUnit::MM))
- , mxPageMarginTxt2(m_xBuilder->weld_label("pagemargintxt2"))
- , mxSheetMarginTxt1(m_xBuilder->weld_label("sheetmargintxt1"))
- , mxSheetMarginEdt(m_xBuilder->weld_metric_spin_button("sheetmarginsb", FieldUnit::MM))
- , mxSheetMarginTxt2(m_xBuilder->weld_label("sheetmargintxt2"))
- , mxPaperSizeBox(m_xBuilder->weld_combo_box("papersizebox"))
- , mxOrientationBox(m_xBuilder->weld_combo_box("pageorientationbox"))
- , mxNupOrderTxt(m_xBuilder->weld_label("labelorder"))
- , mxNupOrderBox(m_xBuilder->weld_combo_box("orderbox"))
+ , mxPreviewWindow(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, *mxPreview))
+ , mxPageEdit(m_xBuilder->weld_entry(u"pageedit"_ustr))
+ , mxPagesBtn(m_xBuilder->weld_radio_button(u"pagespersheetbtn"_ustr))
+ , mxBrochureBtn(m_xBuilder->weld_radio_button(u"brochure"_ustr))
+ , mxPagesBoxTitleTxt(m_xBuilder->weld_label(u"pagespersheettxt"_ustr))
+ , mxNupPagesBox(m_xBuilder->weld_combo_box(u"pagespersheetbox"_ustr))
+ , mxNupNumPagesTxt(m_xBuilder->weld_label(u"pagestxt"_ustr))
+ , mxNupColEdt(m_xBuilder->weld_spin_button(u"pagecols"_ustr))
+ , mxNupTimesTxt(m_xBuilder->weld_label(u"by"_ustr))
+ , mxNupRowsEdt(m_xBuilder->weld_spin_button(u"pagerows"_ustr))
+ , mxPageMarginTxt1(m_xBuilder->weld_label(u"pagemargintxt1"_ustr))
+ , mxPageMarginEdt(m_xBuilder->weld_metric_spin_button(u"pagemarginsb"_ustr, FieldUnit::MM))
+ , mxPageMarginTxt2(m_xBuilder->weld_label(u"pagemargintxt2"_ustr))
+ , mxSheetMarginTxt1(m_xBuilder->weld_label(u"sheetmargintxt1"_ustr))
+ , mxSheetMarginEdt(m_xBuilder->weld_metric_spin_button(u"sheetmarginsb"_ustr, FieldUnit::MM))
+ , mxSheetMarginTxt2(m_xBuilder->weld_label(u"sheetmargintxt2"_ustr))
+ , mxPaperSizeBox(m_xBuilder->weld_combo_box(u"papersizebox"_ustr))
+ , mxOrientationBox(m_xBuilder->weld_combo_box(u"pageorientationbox"_ustr))
+ , mxNupOrderTxt(m_xBuilder->weld_label(u"labelorder"_ustr))
+ , mxNupOrderBox(m_xBuilder->weld_combo_box(u"orderbox"_ustr))
, mxNupOrder(new ShowNupOrderWindow)
- , mxNupOrderWin(new weld::CustomWeld(*m_xBuilder, "orderpreview", *mxNupOrder))
- , mxBorderCB(m_xBuilder->weld_check_button("bordercb"))
- , mxRangeExpander(m_xBuilder->weld_expander("exRangeExpander"))
- , mxLayoutExpander(m_xBuilder->weld_expander("exLayoutExpander"))
- , mxCustom(m_xBuilder->weld_widget("customcontents"))
+ , mxNupOrderWin(new weld::CustomWeld(*m_xBuilder, u"orderpreview"_ustr, *mxNupOrder))
+ , mxBorderCB(m_xBuilder->weld_check_button(u"bordercb"_ustr))
+ , mxRangeExpander(m_xBuilder->weld_expander(u"exRangeExpander"_ustr))
+ , mxLayoutExpander(m_xBuilder->weld_expander(u"exLayoutExpander"_ustr))
+ , mxCustom(m_xBuilder->weld_widget(u"customcontents"_ustr))
, maPrintToFileText( VclResId( SV_PRINT_TOFILE_TXT ) )
, maDefPrtText( VclResId( SV_PRINT_DEFPRT_TXT ) )
, maNoPageStr( VclResId( SV_PRINT_NOPAGES ) )
@@ -608,8 +608,8 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, std::shared_ptr<PrinterControl
{
// fall back to last printer
SettingsConfigItem* pItem = SettingsConfigItem::get();
- OUString aValue( pItem->getValue( "PrintDialog",
- "LastPrinter" ) );
+ OUString aValue( pItem->getValue( u"PrintDialog"_ustr,
+ u"LastPrinter"_ustr ) );
if (mxPrinters->find_text(aValue) != -1)
{
mxPrinters->set_active_text(aValue);
@@ -752,37 +752,37 @@ void PrintDialog::storeToSettings()
{
SettingsConfigItem* pItem = SettingsConfigItem::get();
- pItem->setValue( "PrintDialog",
- "LastPrinter",
+ pItem->setValue( u"PrintDialog"_ustr,
+ u"LastPrinter"_ustr,
isPrintToFile() ? Printer::GetDefaultPrinterName()
: mxPrinters->get_active_text() );
- pItem->setValue( "PrintDialog",
- "LastPage",
+ pItem->setValue( u"PrintDialog"_ustr,
+ u"LastPage"_ustr,
mxTabCtrl->get_tab_label_text(mxTabCtrl->get_current_page_ident()));
- pItem->setValue( "PrintDialog",
- "WindowState",
+ pItem->setValue( u"PrintDialog"_ustr,
+ u"WindowState"_ustr,
m_xDialog->get_window_state(vcl::WindowDataMask::All) );
- pItem->setValue( "PrintDialog",
- "CopyCount",
+ pItem->setValue( u"PrintDialog"_ustr,
+ u"CopyCount"_ustr,
mxCopyCountField->get_text() );
- pItem->setValue( "PrintDialog",
- "Collate",
- mxCollateBox->get_active() ? OUString("true") :
- OUString("false") );
+ pItem->setValue( u"PrintDialog"_ustr,
+ u"Collate"_ustr,
+ mxCollateBox->get_active() ? u"true"_ustr :
+ u"false"_ustr );
- pItem->setValue( "PrintDialog",
- "CollateSingleJobs",
- mxSingleJobsBox->get_active() ? OUString("true") :
- OUString("false") );
+ pItem->setValue( u"PrintDialog"_ustr,
+ u"CollateSingleJobs"_ustr,
+ mxSingleJobsBox->get_active() ? u"true"_ustr :
+ u"false"_ustr );
- pItem->setValue( "PrintDialog",
- "HasPreview",
- hasPreview() ? OUString("true") :
- OUString("false") );
+ pItem->setValue( u"PrintDialog"_ustr,
+ u"HasPreview"_ustr,
+ hasPreview() ? u"true"_ustr :
+ u"false"_ustr );
pItem->Commit();
}
@@ -792,8 +792,8 @@ void PrintDialog::readFromSettings()
SettingsConfigItem* pItem = SettingsConfigItem::get();
// read last selected tab page; if it exists, activate it
- OUString aValue = pItem->getValue( "PrintDialog",
- "LastPage" );
+ OUString aValue = pItem->getValue( u"PrintDialog"_ustr,
+ u"LastPage"_ustr );
sal_uInt16 nCount = mxTabCtrl->get_n_pages();
for (sal_uInt16 i = 0; i < nCount; ++i)
{
@@ -806,14 +806,14 @@ void PrintDialog::readFromSettings()
}
// persistent window state
- aValue = pItem->getValue( "PrintDialog",
- "WindowState" );
+ aValue = pItem->getValue( u"PrintDialog"_ustr,
+ u"WindowState"_ustr );
if (!aValue.isEmpty())
m_xDialog->set_window_state(aValue);
// collate
- aValue = pItem->getValue( "PrintDialog",
- "CollateBox" );
+ aValue = pItem->getValue( u"PrintDialog"_ustr,
+ u"CollateBox"_ustr );
if( aValue.equalsIgnoreAsciiCase("alwaysoff") )
{
mbCollateAlwaysOff = true;
@@ -823,19 +823,19 @@ void PrintDialog::readFromSettings()
else
{
mbCollateAlwaysOff = false;
- aValue = pItem->getValue( "PrintDialog",
- "Collate" );
+ aValue = pItem->getValue( u"PrintDialog"_ustr,
+ u"Collate"_ustr );
mxCollateBox->set_active( aValue.equalsIgnoreAsciiCase("true") );
}
// collate single jobs
- aValue = pItem->getValue( "PrintDialog",
- "CollateSingleJobs" );
+ aValue = pItem->getValue( u"PrintDialog"_ustr,
+ u"CollateSingleJobs"_ustr );
mxSingleJobsBox->set_active(aValue.equalsIgnoreAsciiCase("true"));
// preview box
- aValue = pItem->getValue( "PrintDialog",
- "HasPreview" );
+ aValue = pItem->getValue( u"PrintDialog"_ustr,
+ u"HasPreview"_ustr );
if ( aValue.equalsIgnoreAsciiCase("false") )
mxPreviewBox->set_active( false );
else
@@ -877,7 +877,7 @@ void PrintDialog::setPaperSizes()
OUString aWidth( rLocWrap.getNum( aLogicPaperSize.Width(), nDigits ) );
OUString aHeight( rLocWrap.getNum( aLogicPaperSize.Height(), nDigits ) );
- OUString aUnit = eUnit == o3tl::Length::mm ? OUString("mm") : OUString("in");
+ OUString aUnit = eUnit == o3tl::Length::mm ? u"mm"_ustr : u"in"_ustr;
OUString aPaperName;
// Paper sizes that we don't know of but the system printer driver lists are not "User
@@ -1015,7 +1015,7 @@ void PrintDialog::updatePageRange(sal_Int32 nPages)
}
OUString sRange = aBuf.makeStringAndClear();
mxPageRangeEdit->set_text(sRange);
- maPController->setValue("PageRange", Any(sRange));
+ maPController->setValue(u"PageRange"_ustr, Any(sRange));
}
}
@@ -1372,8 +1372,8 @@ void PrintDialog::setupOptionalUI()
OUString sOptionsUIFile;
rOption.Value >>= sOptionsUIFile;
mxCustomOptionsUIBuilder = Application::CreateBuilder(mxCustom.get(), sOptionsUIFile);
- std::unique_ptr<weld::Container> xWindow = mxCustomOptionsUIBuilder->weld_container("box");
- xWindow->set_help_id("vcl/ui/printdialog/PrintDialog");
+ std::unique_ptr<weld::Container> xWindow = mxCustomOptionsUIBuilder->weld_container(u"box"_ustr);
+ xWindow->set_help_id(u"vcl/ui/printdialog/PrintDialog"_ustr);
xWindow->show();
continue;
}
@@ -1856,13 +1856,13 @@ IMPL_LINK(PrintDialog, ToggleHdl, weld::Toggleable&, rButton, void)
}
else if (&rButton == mxSingleJobsBox.get())
{
- maPController->setValue( "SinglePrintJobs",
+ maPController->setValue( u"SinglePrintJobs"_ustr,
Any( isSingleJobs() ) );
checkControlDependencies();
}
else if( &rButton == mxCollateBox.get() )
{
- maPController->setValue( "Collate",
+ maPController->setValue( u"Collate"_ustr,
Any( isCollate() ) );
checkControlDependencies();
}
@@ -1870,7 +1870,7 @@ IMPL_LINK(PrintDialog, ToggleHdl, weld::Toggleable&, rButton, void)
{
bool bChecked = mxReverseOrderBox->get_active();
maPController->setReversePrint( bChecked );
- maPController->setValue( "PrintReverse",
+ maPController->setValue( u"PrintReverse"_ustr,
Any( bChecked ) );
maUpdatePreviewIdle.Start();
}
@@ -2064,7 +2064,7 @@ IMPL_LINK_NOARG(PrintDialog, ActivateHdl, weld::Entry&, bool)
if (nPage < 1)
{
nPage = 1;
- mxPageEdit->set_text("1");
+ mxPageEdit->set_text(u"1"_ustr);
}
else if (nPage > mnCachedPages)
{
@@ -2089,9 +2089,9 @@ IMPL_LINK( PrintDialog, SpinModifyHdl, weld::SpinButton&, rEdit, void )
}
else if( &rEdit == mxCopyCountField.get() )
{
- maPController->setValue( "CopyCount",
+ maPController->setValue( u"CopyCount"_ustr,
Any( sal_Int32(mxCopyCountField->get_value()) ) );
- maPController->setValue( "Collate",
+ maPController->setValue( u"Collate"_ustr,
Any( isCollate() ) );
}
}
@@ -2224,7 +2224,7 @@ void PrintDialog::previewBackward()
void PrintDialog::previewFirst()
{
- mxPageEdit->set_text("1");
+ mxPageEdit->set_text(u"1"_ustr);
ActivateHdl(*mxPageEdit);
}
@@ -2245,13 +2245,13 @@ static OUString getNewLabel(const OUString& aLabel, int i_nCurr, int i_nMax)
// PrintProgressDialog
PrintProgressDialog::PrintProgressDialog(weld::Window* i_pParent, int i_nMax)
- : GenericDialogController(i_pParent, "vcl/ui/printprogressdialog.ui", "PrintProgressDialog")
+ : GenericDialogController(i_pParent, u"vcl/ui/printprogressdialog.ui"_ustr, u"PrintProgressDialog"_ustr)
, mbCanceled(false)
, mnCur(0)
, mnMax(i_nMax)
- , mxText(m_xBuilder->weld_label("label"))
- , mxProgress(m_xBuilder->weld_progress_bar("progressbar"))
- , mxButton(m_xBuilder->weld_button("cancel"))
+ , mxText(m_xBuilder->weld_label(u"label"_ustr))
+ , mxProgress(m_xBuilder->weld_progress_bar(u"progressbar"_ustr))
+ , mxButton(m_xBuilder->weld_button(u"cancel"_ustr))
{
if( mnMax < 1 )
mnMax = 1;
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index fc14762bef7a..b79f58766461 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -1173,8 +1173,8 @@ void StatusBar::SetItemText( sal_uInt16 nItemId, const OUString& rText, int nCha
tools::Long nWidth;
if (nCharsWidth != -1)
{
- nWidth = GetTextWidth("0",0,-1,nullptr,
- SalLayoutGlyphsCache::self()->GetLayoutGlyphs(GetOutDev(),"0"));
+ nWidth = GetTextWidth(u"0"_ustr,0,-1,nullptr,
+ SalLayoutGlyphsCache::self()->GetLayoutGlyphs(GetOutDev(),u"0"_ustr));
nWidth = nWidth * nCharsWidth + nFudge;
}
else
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 7fdd03a031e3..37a0c4c75fe0 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1679,7 +1679,7 @@ bool ToolBox::AlwaysLocked()
utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithComponentContext(
comphelper::getProcessComponentContext(),
- "/org.openoffice.Office.UI.GlobalSettings/Toolbars" ); // note: case sensitive !
+ u"/org.openoffice.Office.UI.GlobalSettings/Toolbars"_ustr ); // note: case sensitive !
if ( aNode.isValid() )
{
// feature enabled ?
@@ -1692,7 +1692,7 @@ bool ToolBox::AlwaysLocked()
// now read the locking state
utl::OConfigurationNode aNode2 = utl::OConfigurationTreeRoot::tryCreateWithComponentContext(
comphelper::getProcessComponentContext(),
- "/org.openoffice.Office.UI.GlobalSettings/Toolbars/States" ); // note: case sensitive !
+ u"/org.openoffice.Office.UI.GlobalSettings/Toolbars/States"_ustr ); // note: case sensitive !
bool bLocked = bool();
css::uno::Any aValue2 = aNode2.getNodeValue( "Locked" );
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 06a60a209483..b7f0ea58181b 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1059,7 +1059,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
{
// do not abort but throw an exception, may be the current thread terminates anyway (plugin-scenario)
throw RuntimeException(
- "Could not create system window!",
+ u"Could not create system window!"_ustr,
Reference< XInterface >() );
}
@@ -1921,7 +1921,7 @@ void Window::RequestHelp( const HelpEvent& rHEvt )
if( !aStrHelpId.isEmpty() )
pHelp->Start( aStrHelpId, this );
else
- pHelp->Start( OOO_HELP_INDEX, this );
+ pHelp->Start( u"" OOO_HELP_INDEX ""_ustr, this );
}
}
}
@@ -3783,8 +3783,8 @@ Reference< css::rendering::XCanvas > WindowOutputDevice::ImplGetCanvas( bool bSp
{
xCanvas.set( xCanvasFactory->createInstanceWithArgumentsAndContext(
bSpriteCanvas ?
- OUString( "com.sun.star.rendering.SpriteCanvas" ) :
- OUString( "com.sun.star.rendering.Canvas" ),
+ u"com.sun.star.rendering.SpriteCanvas"_ustr :
+ u"com.sun.star.rendering.Canvas"_ustr,
aArg,
xContext ),
UNO_QUERY );
diff --git a/vcl/unx/generic/app/geninst.cxx b/vcl/unx/generic/app/geninst.cxx
index 191d87ca76b7..fe3aefe9b71a 100644
--- a/vcl/unx/generic/app/geninst.cxx
+++ b/vcl/unx/generic/app/geninst.cxx
@@ -52,7 +52,7 @@ SalGenericInstance::~SalGenericInstance()
OUString SalGenericInstance::getOSVersion()
{
- OUString aKernelVer = "unknown";
+ OUString aKernelVer = u"unknown"_ustr;
#if defined(LINUX)
FILE* pVersion = fopen( "/proc/version", "r" );
if ( pVersion )
diff --git a/vcl/unx/generic/app/gensys.cxx b/vcl/unx/generic/app/gensys.cxx
index 98371c5484d1..d22c0a4ce72d 100644
--- a/vcl/unx/generic/app/gensys.cxx
+++ b/vcl/unx/generic/app/gensys.cxx
@@ -46,7 +46,7 @@ int SalGenericSystem::ShowNativeMessageBox( const OUString& rTitle, const OUStri
ImplHideSplash();
- aButtons.push_back( "OK" );
+ aButtons.push_back( u"OK"_ustr );
nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK;
int nResult = ShowNativeDialog( rTitle, rMessage, aButtons );
@@ -98,10 +98,10 @@ const char* SalGenericSystem::getFrameClassName()
if( aClassName.isEmpty() )
{
OUString aIni, aProduct;
- rtl::Bootstrap::get( "BRAND_BASE_DIR", aIni );
+ rtl::Bootstrap::get( u"BRAND_BASE_DIR"_ustr, aIni );
aIni += "/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap" );
rtl::Bootstrap aBootstrap( aIni );
- aBootstrap.getFrom( "ProductKey", aProduct );
+ aBootstrap.getFrom( u"ProductKey"_ustr, aProduct );
if( !aProduct.isEmpty() )
aClassName.append( OUStringToOString( aProduct, osl_getThreadTextEncoding() ) );
diff --git a/vcl/unx/generic/app/i18n_im.cxx b/vcl/unx/generic/app/i18n_im.cxx
index cc311b7be11d..e3767b175d1d 100644
--- a/vcl/unx/generic/app/i18n_im.cxx
+++ b/vcl/unx/generic/app/i18n_im.cxx
@@ -330,7 +330,7 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay )
if ((maMethod == nullptr) && (getenv("XMODIFIERS") != nullptr))
{
- OUString envVar("XMODIFIERS");
+ OUString envVar(u"XMODIFIERS"_ustr);
osl_clearEnvironment(envVar.pData);
XSetLocaleModifiers("");
maMethod = XOpenIM(pDisplay, nullptr, nullptr, nullptr);
diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index 34c7c0878991..e155acc45ec6 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -388,7 +388,7 @@ static Display *OpenX11Display(OString& rDisplay)
* the clipboard build another connection
* to the xserver using $DISPLAY
*/
- OUString envVar("DISPLAY");
+ OUString envVar(u"DISPLAY"_ustr);
osl_setEnvironment(envVar.pData, aParam.pData);
}
break;
diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx
index a77aca26482d..1b4b90521cc4 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -73,7 +73,7 @@ X11SalInstance::X11SalInstance(std::unique_ptr<SalYieldMutex> pMutex)
, mpXLib(nullptr)
{
ImplSVData* pSVData = ImplGetSVData();
- pSVData->maAppData.mxToolkitName = OUString("x11");
+ pSVData->maAppData.mxToolkitName = u"x11"_ustr;
m_bSupportsOpenGL = true;
#if HAVE_FEATURE_SKIA
X11SkiaSalGraphicsImpl::prepareSkia();
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index 240517d7aab9..d6a95dfc8583 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -873,8 +873,8 @@ bool WMAdaptor::getWMshouldSwitchWorkspace() const
pWMA->m_bWMshouldSwitchWorkspace = true;
vcl::SettingsConfigItem* pItem = vcl::SettingsConfigItem::get();
- OUString aSetting( pItem->getValue( "WM",
- "ShouldSwitchWorkspace" ) );
+ OUString aSetting( pItem->getValue( u"WM"_ustr,
+ u"ShouldSwitchWorkspace"_ustr ) );
if( aSetting.isEmpty() )
{
if( m_aWMName == "awesome" )
diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
index a159c134b821..93b58877bbdc 100644
--- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx
+++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
@@ -153,7 +153,7 @@ DesktopType get_desktop_environment()
}
OUString plugin;
- rtl::Bootstrap::get("SAL_USE_VCLPLUGIN", plugin);
+ rtl::Bootstrap::get(u"SAL_USE_VCLPLUGIN"_ustr, plugin);
if (plugin == "svp")
return DESKTOP_NONE;
diff --git a/vcl/unx/generic/dtrans/X11_clipboard.cxx b/vcl/unx/generic/dtrans/X11_clipboard.cxx
index 8a5b39d5cd19..1a0e5c685c71 100644
--- a/vcl/unx/generic/dtrans/X11_clipboard.cxx
+++ b/vcl/unx/generic/dtrans/X11_clipboard.cxx
@@ -63,7 +63,7 @@ X11Clipboard::create( SelectionManager& rManager, Atom aSelection )
else
{
rManager.registerHandler(XA_PRIMARY, *cb);
- rManager.registerHandler(rManager.getAtom("CLIPBOARD"), *cb);
+ rManager.registerHandler(rManager.getAtom(u"CLIPBOARD"_ustr), *cb);
}
return cb;
}
@@ -85,7 +85,7 @@ X11Clipboard::~X11Clipboard()
else
{
m_xSelectionManager->deregisterHandler( XA_PRIMARY );
- m_xSelectionManager->deregisterHandler( m_xSelectionManager->getAtom( "CLIPBOARD" ) );
+ m_xSelectionManager->deregisterHandler( m_xSelectionManager->getAtom( u"CLIPBOARD"_ustr ) );
}
}
@@ -159,7 +159,7 @@ void SAL_CALL X11Clipboard::setContents(
else
{
m_xSelectionManager->requestOwnership( XA_PRIMARY );
- m_xSelectionManager->requestOwnership( m_xSelectionManager->getAtom( "CLIPBOARD" ) );
+ m_xSelectionManager->requestOwnership( m_xSelectionManager->getAtom( u"CLIPBOARD"_ustr ) );
}
// notify old owner on loss of ownership
diff --git a/vcl/unx/generic/dtrans/X11_droptarget.cxx b/vcl/unx/generic/dtrans/X11_droptarget.cxx
index e026ad1ab17c..9933d490a886 100644
--- a/vcl/unx/generic/dtrans/X11_droptarget.cxx
+++ b/vcl/unx/generic/dtrans/X11_droptarget.cxx
@@ -161,7 +161,7 @@ void DropTarget::dragOver( const DropTargetDragEvent& dtde ) noexcept
// XServiceInfo
OUString DropTarget::getImplementationName()
{
- return "com.sun.star.datatransfer.dnd.XdndDropTarget";
+ return u"com.sun.star.datatransfer.dnd.XdndDropTarget"_ustr;
}
sal_Bool DropTarget::supportsService( const OUString& ServiceName )
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index 823b77982fdf..e3ef6e9e2c6f 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -364,29 +364,29 @@ void SelectionManager::initialize( const Sequence< Any >& arguments )
XSynchronize( m_pDisplay, True );
#endif
// special targets
- m_nTARGETSAtom = getAtom( "TARGETS" );
- m_nTIMESTAMPAtom = getAtom( "TIMESTAMP" );
- m_nTEXTAtom = getAtom( "TEXT" );
- m_nINCRAtom = getAtom( "INCR" );
- m_nCOMPOUNDAtom = getAtom( "COMPOUND_TEXT" );
- m_nMULTIPLEAtom = getAtom( "MULTIPLE" );
- m_nImageBmpAtom = getAtom( "image/bmp" );
+ m_nTARGETSAtom = getAtom( u"TARGETS"_ustr );
+ m_nTIMESTAMPAtom = getAtom( u"TIMESTAMP"_ustr );
+ m_nTEXTAtom = getAtom( u"TEXT"_ustr );
+ m_nINCRAtom = getAtom( u"INCR"_ustr );
+ m_nCOMPOUNDAtom = getAtom( u"COMPOUND_TEXT"_ustr );
+ m_nMULTIPLEAtom = getAtom( u"MULTIPLE"_ustr );
+ m_nImageBmpAtom = getAtom( u"image/bmp"_ustr );
// Atoms for Xdnd protocol
- m_nXdndAware = getAtom( "XdndAware" );
- m_nXdndEnter = getAtom( "XdndEnter" );
- m_nXdndLeave = getAtom( "XdndLeave" );
- m_nXdndPosition = getAtom( "XdndPosition" );
- m_nXdndStatus = getAtom( "XdndStatus" );
- m_nXdndDrop = getAtom( "XdndDrop" );
- m_nXdndFinished = getAtom( "XdndFinished" );
- m_nXdndSelection = getAtom( "XdndSelection" );
- m_nXdndTypeList = getAtom( "XdndTypeList" );
- m_nXdndProxy = getAtom( "XdndProxy" );
- m_nXdndActionCopy = getAtom( "XdndActionCopy" );
- m_nXdndActionMove = getAtom( "XdndActionMove" );
- m_nXdndActionLink = getAtom( "XdndActionLink" );
- m_nXdndActionAsk = getAtom( "XdndActionAsk" );
+ m_nXdndAware = getAtom( u"XdndAware"_ustr );
+ m_nXdndEnter = getAtom( u"XdndEnter"_ustr );
+ m_nXdndLeave = getAtom( u"XdndLeave"_ustr );
+ m_nXdndPosition = getAtom( u"XdndPosition"_ustr );
+ m_nXdndStatus = getAtom( u"XdndStatus"_ustr );
+ m_nXdndDrop = getAtom( u"XdndDrop"_ustr );
+ m_nXdndFinished = getAtom( u"XdndFinished"_ustr );
+ m_nXdndSelection = getAtom( u"XdndSelection"_ustr );
+ m_nXdndTypeList = getAtom( u"XdndTypeList"_ustr );
+ m_nXdndProxy = getAtom( u"XdndProxy"_ustr );
+ m_nXdndActionCopy = getAtom( u"XdndActionCopy"_ustr );
+ m_nXdndActionMove = getAtom( u"XdndActionMove"_ustr );
+ m_nXdndActionLink = getAtom( u"XdndActionLink"_ustr );
+ m_nXdndActionAsk = getAtom( u"XdndActionAsk"_ustr );
// initialize map with member none
m_aAtomToString[ 0 ]= "None";
@@ -825,7 +825,7 @@ void SelectionManager::getNativeTypeList( const Sequence< DataFlavor >& rTypes,
rOutTypeList.push_front( XA_STRING );
rOutTypeList.push_front( m_nCOMPOUNDAtom );
}
- convertTypeToNative( "text/plain;charset=utf-8", targetselection, nFormat, rOutTypeList, true );
+ convertTypeToNative( u"text/plain;charset=utf-8"_ustr, targetselection, nFormat, rOutTypeList, true );
}
if( targetselection != m_nXdndSelection )
rOutTypeList.push_back( m_nMULTIPLEAtom );
@@ -4141,7 +4141,7 @@ void SelectionManagerHolder::startDrag(
OUString SelectionManagerHolder::getImplementationName()
{
- return "com.sun.star.datatransfer.dnd.XdndSupport";
+ return u"com.sun.star.datatransfer.dnd.XdndSupport"_ustr;
}
sal_Bool SelectionManagerHolder::supportsService( const OUString& ServiceName )
diff --git a/vcl/unx/generic/dtrans/X11_service.cxx b/vcl/unx/generic/dtrans/X11_service.cxx
index 4b7367fead55..73c0487370c7 100644
--- a/vcl/unx/generic/dtrans/X11_service.cxx
+++ b/vcl/unx/generic/dtrans/X11_service.cxx
@@ -32,17 +32,17 @@ using namespace x11;
Sequence< OUString > x11::X11Clipboard_getSupportedServiceNames()
{
- return { "com.sun.star.datatransfer.clipboard.SystemClipboard" };
+ return { u"com.sun.star.datatransfer.clipboard.SystemClipboard"_ustr };
}
Sequence< OUString > x11::Xdnd_getSupportedServiceNames()
{
- return { "com.sun.star.datatransfer.dnd.X11DragSource" };
+ return { u"com.sun.star.datatransfer.dnd.X11DragSource"_ustr };
}
Sequence< OUString > x11::Xdnd_dropTarget_getSupportedServiceNames()
{
- return { "com.sun.star.datatransfer.dnd.X11DropTarget" };
+ return { u"com.sun.star.datatransfer.dnd.X11DropTarget"_ustr };
}
css::uno::Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >& arguments )
@@ -59,7 +59,7 @@ css::uno::Reference< XInterface > X11SalInstance::CreateClipboard( const Sequenc
sel = "CLIPBOARD";
} else if (arguments.getLength() != 1 || !(arguments[0] >>= sel)) {
throw css::lang::IllegalArgumentException(
- "bad X11SalInstance::CreateClipboard arguments",
+ u"bad X11SalInstance::CreateClipboard arguments"_ustr,
css::uno::Reference<css::uno::XInterface>(), -1);
}
Atom nSelection = rManager.getAtom(sel);
diff --git a/vcl/unx/generic/dtrans/X11_transferable.cxx b/vcl/unx/generic/dtrans/X11_transferable.cxx
index 6fa688c84b0c..80ed9fba8c4c 100644
--- a/vcl/unx/generic/dtrans/X11_transferable.cxx
+++ b/vcl/unx/generic/dtrans/X11_transferable.cxx
@@ -49,7 +49,7 @@ Any SAL_CALL X11Transferable::getTransferData( const DataFlavor& rFlavor )
Sequence< sal_Int8 > aData;
bool bSuccess = m_rManager.getPasteData( m_aSelection ? m_aSelection : XA_PRIMARY, rFlavor.MimeType, aData );
if( ! bSuccess && m_aSelection == 0 )
- bSuccess = m_rManager.getPasteData( m_rManager.getAtom( "CLIPBOARD" ), rFlavor.MimeType, aData );
+ bSuccess = m_rManager.getPasteData( m_rManager.getAtom( u"CLIPBOARD"_ustr ), rFlavor.MimeType, aData );
if( ! bSuccess )
{
@@ -74,7 +74,7 @@ Sequence< DataFlavor > SAL_CALL X11Transferable::getTransferDataFlavors()
Sequence< DataFlavor > aFlavorList;
bool bSuccess = m_rManager.getPasteDataTypes( m_aSelection ? m_aSelection : XA_PRIMARY, aFlavorList );
if( ! bSuccess && m_aSelection == 0 )
- m_rManager.getPasteDataTypes( m_rManager.getAtom( "CLIPBOARD" ), aFlavorList );
+ m_rManager.getPasteDataTypes( m_rManager.getAtom( u"CLIPBOARD"_ustr ), aFlavorList );
return aFlavorList;
}
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx
index d2b90b2ca69e..17191372bbaf 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -935,7 +935,7 @@ namespace
OUString getExemplarLangTagForCodePoint(sal_uInt32 currentChar)
{
if (isEmoji(currentChar))
- return "und-zsye";
+ return u"und-zsye"_ustr;
int32_t script = u_getIntPropertyValue(currentChar, UCHAR_SCRIPT);
UScriptCode eScript = static_cast<UScriptCode>(script);
OStringBuffer aBuf(unicode::getExemplarLanguageForUScriptCode(eScript));
@@ -951,7 +951,7 @@ IMPL_LINK_NOARG(PrintFontManager, autoInstallFontLangSupport, Timer *, void)
{
using namespace org::freedesktop::PackageKit;
css::uno::Reference<XSyncDbusSessionHelper> xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext()));
- xSyncDbusSessionHelper->InstallFontconfigResources(comphelper::containerToSequence(m_aCurrentRequests), "hide-finished");
+ xSyncDbusSessionHelper->InstallFontconfigResources(comphelper::containerToSequence(m_aCurrentRequests), u"hide-finished"_ustr);
}
catch (const css::uno::Exception&)
{
diff --git a/vcl/unx/generic/fontmanager/helper.cxx b/vcl/unx/generic/fontmanager/helper.cxx
index afa6d9cb76ed..65365e2cc91c 100644
--- a/vcl/unx/generic/fontmanager/helper.cxx
+++ b/vcl/unx/generic/fontmanager/helper.cxx
@@ -40,10 +40,10 @@ OUString getOfficePath( whichOfficePath ePath )
{
static const auto aPaths = [] {
OUString sRoot, sUser, sConfig;
- Bootstrap::get("BRAND_BASE_DIR", sRoot);
+ Bootstrap::get(u"BRAND_BASE_DIR"_ustr, sRoot);
Bootstrap aBootstrap(sRoot + "/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap"));
- aBootstrap.getFrom("UserInstallation", sUser);
- aBootstrap.getFrom("CustomDataUrl", sConfig);
+ aBootstrap.getFrom(u"UserInstallation"_ustr, sUser);
+ aBootstrap.getFrom(u"CustomDataUrl"_ustr, sConfig);
OUString aUPath = sUser + "/user/psprint";
if (sRoot.startsWith("file://"))
{
diff --git a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx
index 23547daa05d5..fa2d903a3067 100644
--- a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx
+++ b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx
@@ -35,7 +35,7 @@ public:
void Init() override;
- OUString getRenderBackendName() const override { return "gen"; }
+ OUString getRenderBackendName() const override { return u"gen"_ustr; }
// get the depth of the device
sal_uInt16 GetBitCount() const override { return mrParent.GetVisual().GetDepth(); }
diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx
index 1e7edb8e0909..d72a03e0f3bd 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -111,11 +111,11 @@ namespace
* QueryString
*/
QueryString::QueryString(weld::Window* pParent, OUString const & rQuery, OUString& rRet)
- : GenericDialogController(pParent, "vcl/ui/querydialog.ui", "QueryDialog")
+ : GenericDialogController(pParent, u"vcl/ui/querydialog.ui"_ustr, u"QueryDialog"_ustr)
, m_rReturnValue( rRet )
- , m_xOKButton(m_xBuilder->weld_button("ok"))
- , m_xFixedText(m_xBuilder->weld_label("label"))
- , m_xEdit(m_xBuilder->weld_entry("entry"))
+ , m_xOKButton(m_xBuilder->weld_button(u"ok"_ustr))
+ , m_xFixedText(m_xBuilder->weld_label(u"label"_ustr))
+ , m_xEdit(m_xBuilder->weld_entry(u"entry"_ustr))
{
m_xOKButton->connect_clicked(LINK(this, QueryString, ClickBtnHdl));
m_xFixedText->set_label(rQuery);
@@ -184,7 +184,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
pJobSetup->SetPaperBin( 0 );
if( rData.m_pParser )
- pKey = rData.m_pParser->getKey( "InputSlot" );
+ pKey = rData.m_pParser->getKey( u"InputSlot"_ustr );
if( pKey )
pValue = rData.m_aContext.getValue( pKey );
if( pKey && pValue )
@@ -204,7 +204,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
pJobSetup->SetDuplexMode( DuplexMode::Unknown );
if( rData.m_pParser )
- pKey = rData.m_pParser->getKey( "Duplex" );
+ pKey = rData.m_pParser->getKey( u"Duplex"_ustr );
if( pKey )
pValue = rData.m_aContext.getValue( pKey );
if( pKey && pValue )
@@ -362,7 +362,7 @@ void PspSalInfoPrinter::InitPaperFormats( const ImplJobSetup* )
if( !m_aJobData.m_pParser )
return;
- const PPDKey* pKey = m_aJobData.m_pParser->getKey( "PageSize" );
+ const PPDKey* pKey = m_aJobData.m_pParser->getKey( u"PageSize"_ustr );
if( pKey )
{
int nValues = pKey->countValues();
@@ -487,7 +487,7 @@ bool PspSalInfoPrinter::SetData(
else
aPaper = OStringToOUString(PaperInfo::toPSName(pJobSetup->GetPaperFormat()), RTL_TEXTENCODING_ISO_8859_1);
- pKey = aData.m_pParser->getKey( "PageSize" );
+ pKey = aData.m_pParser->getKey( u"PageSize"_ustr );
pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : nullptr;
// some PPD files do not specify the standard paper names (e.g. C5 instead of EnvC5)
@@ -509,7 +509,7 @@ bool PspSalInfoPrinter::SetData(
// merge paperbin if necessary
if( nSetDataFlags & JobSetFlags::PAPERBIN )
{
- pKey = aData.m_pParser->getKey( "InputSlot" );
+ pKey = aData.m_pParser->getKey( u"InputSlot"_ustr );
if( pKey )
{
int nPaperBin = pJobSetup->GetPaperBin();
@@ -529,22 +529,22 @@ bool PspSalInfoPrinter::SetData(
// merge duplex if necessary
if( nSetDataFlags & JobSetFlags::DUPLEXMODE )
{
- pKey = aData.m_pParser->getKey( "Duplex" );
+ pKey = aData.m_pParser->getKey( u"Duplex"_ustr );
if( pKey )
{
pValue = nullptr;
switch( pJobSetup->GetDuplexMode() )
{
case DuplexMode::Off:
- pValue = pKey->getValue( "None" );
+ pValue = pKey->getValue( u"None"_ustr );
if( pValue == nullptr )
- pValue = pKey->getValue( "SimplexNoTumble" );
+ pValue = pKey->getValue( u"SimplexNoTumble"_ustr );
break;
case DuplexMode::ShortEdge:
- pValue = pKey->getValue( "DuplexTumble" );
+ pValue = pKey->getValue( u"DuplexTumble"_ustr );
break;
case DuplexMode::LongEdge:
- pValue = pKey->getValue( "DuplexNoTumble" );
+ pValue = pKey->getValue( u"DuplexNoTumble"_ustr );
break;
case DuplexMode::Unknown:
default:
@@ -616,7 +616,7 @@ sal_uInt16 PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup )
JobData aData;
JobData::constructFromStreamBuffer( pJobSetup->GetDriverData(), pJobSetup->GetDriverDataLen(), aData );
- const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( "InputSlot" ): nullptr;
+ const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( u"InputSlot"_ustr ): nullptr;
return pKey ? pKey->countValues() : 0;
}
@@ -627,7 +627,7 @@ OUString PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, sal_
if( aData.m_pParser )
{
- const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( "InputSlot" ): nullptr;
+ const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( u"InputSlot"_ustr ): nullptr;
if( ! pKey || nPaperBin >= o3tl::make_unsigned(pKey->countValues()) )
return aData.m_pParser->getDefaultInputSlot();
const PPDValue* pValue = pKey->getValue( nPaperBin );
@@ -675,7 +675,7 @@ sal_uInt32 PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, Pr
JobData aData = PrinterInfoManager::get().getPrinterInfo(pJobSetup->GetPrinterName());
if( pJobSetup->GetDriverData() )
JobData::constructFromStreamBuffer( pJobSetup->GetDriverData(), pJobSetup->GetDriverDataLen(), aData );
- const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey("Dial") : nullptr;
+ const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey(u"Dial"_ustr) : nullptr;
const PPDValue* pValue = pKey ? aData.m_aContext.getValue(pKey) : nullptr;
if (pValue && !pValue->m_aOption.equalsIgnoreAsciiCase("Manually"))
return 1;
@@ -778,7 +778,7 @@ struct PDFPrintFile
bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJobName, const OUString& i_rAppName,
ImplJobSetup* i_pSetupData, vcl::PrinterController& i_rController )
{
- SAL_INFO( "vcl.unx.print", "StartJob with controller: pFilename = " << (i_pFileName ? *i_pFileName : "<nil>") );
+ SAL_INFO( "vcl.unx.print", "StartJob with controller: pFilename = " << (i_pFileName ? *i_pFileName : u"<nil>"_ustr) );
// reset IsLastPage
i_rController.setLastPage( false );
// is this a fax device
diff --git a/vcl/unx/generic/print/prtsetup.cxx b/vcl/unx/generic/print/prtsetup.cxx
index 4b0a63c1b3e8..6869dcecd919 100644
--- a/vcl/unx/generic/print/prtsetup.cxx
+++ b/vcl/unx/generic/print/prtsetup.cxx
@@ -68,14 +68,14 @@ void RTSDialog::insertAllPPDValues(weld::ComboBox& rBox, const PPDParser* pParse
*/
RTSDialog::RTSDialog(const PrinterInfo& rJobData, weld::Window* pParent)
- : GenericDialogController(pParent, "vcl/ui/printerpropertiesdialog.ui", "PrinterPropertiesDialog")
+ : GenericDialogController(pParent, u"vcl/ui/printerpropertiesdialog.ui"_ustr, u"PrinterPropertiesDialog"_ustr)
, m_aJobData(rJobData)
, m_bDataModified(false)
- , m_xTabControl(m_xBuilder->weld_notebook("tabcontrol"))
- , m_xOKButton(m_xBuilder->weld_button("ok"))
- , m_xCancelButton(m_xBuilder->weld_button("cancel"))
- , m_xPaperPage(new RTSPaperPage(m_xTabControl->get_page("paper"), this))
- , m_xDevicePage(new RTSDevicePage(m_xTabControl->get_page("device"), this))
+ , m_xTabControl(m_xBuilder->weld_notebook(u"tabcontrol"_ustr))
+ , m_xOKButton(m_xBuilder->weld_button(u"ok"_ustr))
+ , m_xCancelButton(m_xBuilder->weld_button(u"cancel"_ustr))
+ , m_xPaperPage(new RTSPaperPage(m_xTabControl->get_page(u"paper"_ustr), this))
+ , m_xDevicePage(new RTSDevicePage(m_xTabControl->get_page(u"device"_ustr), this))
{
OUString aTitle(m_xDialog->get_title());
m_xDialog->set_title(aTitle.replaceAll("%s", m_aJobData.m_aPrinterName));
@@ -127,18 +127,18 @@ IMPL_LINK( RTSDialog, ClickButton, weld::Button&, rButton, void )
*/
RTSPaperPage::RTSPaperPage(weld::Widget* pPage, RTSDialog* pDialog)
- : m_xBuilder(Application::CreateBuilder(pPage, "vcl/ui/printerpaperpage.ui"))
+ : m_xBuilder(Application::CreateBuilder(pPage, u"vcl/ui/printerpaperpage.ui"_ustr))
, m_pParent(pDialog)
- , m_xContainer(m_xBuilder->weld_widget("PrinterPaperPage"))
- , m_xCbFromSetup(m_xBuilder->weld_check_button("papersizefromsetup"))
- , m_xPaperText(m_xBuilder->weld_label("paperft"))
- , m_xPaperBox(m_xBuilder->weld_combo_box("paperlb"))
- , m_xOrientText(m_xBuilder->weld_label("orientft"))
- , m_xOrientBox(m_xBuilder->weld_combo_box("orientlb"))
- , m_xDuplexText(m_xBuilder->weld_label("duplexft"))
- , m_xDuplexBox(m_xBuilder->weld_combo_box("duplexlb"))
- , m_xSlotText(m_xBuilder->weld_label("slotft"))
- , m_xSlotBox(m_xBuilder->weld_combo_box("slotlb"))
+ , m_xContainer(m_xBuilder->weld_widget(u"PrinterPaperPage"_ustr))
+ , m_xCbFromSetup(m_xBuilder->weld_check_button(u"papersizefromsetup"_ustr))
+ , m_xPaperText(m_xBuilder->weld_label(u"paperft"_ustr))
+ , m_xPaperBox(m_xBuilder->weld_combo_box(u"paperlb"_ustr))
+ , m_xOrientText(m_xBuilder->weld_label(u"orientft"_ustr))
+ , m_xOrientBox(m_xBuilder->weld_combo_box(u"orientlb"_ustr))
+ , m_xDuplexText(m_xBuilder->weld_label(u"duplexft"_ustr))
+ , m_xDuplexBox(m_xBuilder->weld_combo_box(u"duplexlb"_ustr))
+ , m_xSlotText(m_xBuilder->weld_label(u"slotft"_ustr))
+ , m_xSlotBox(m_xBuilder->weld_combo_box(u"slotlb"_ustr))
{
//PrinterPaperPage
m_xPaperBox->connect_changed( LINK( this, RTSPaperPage, SelectHdl ) );
@@ -163,7 +163,7 @@ void RTSPaperPage::update()
// duplex
if( m_pParent->m_aJobData.m_pParser &&
- (pKey = m_pParent->m_aJobData.m_pParser->getKey( "Duplex" )) )
+ (pKey = m_pParent->m_aJobData.m_pParser->getKey( u"Duplex"_ustr )) )
{
m_pParent->insertAllPPDValues( *m_xDuplexBox, m_pParent->m_aJobData.m_pParser, pKey );
}
@@ -175,7 +175,7 @@ void RTSPaperPage::update()
// paper
if( m_pParent->m_aJobData.m_pParser &&
- (pKey = m_pParent->m_aJobData.m_pParser->getKey( "PageSize" )) )
+ (pKey = m_pParent->m_aJobData.m_pParser->getKey( u"PageSize"_ustr )) )
{
m_pParent->insertAllPPDValues( *m_xPaperBox, m_pParent->m_aJobData.m_pParser, pKey );
}
@@ -187,7 +187,7 @@ void RTSPaperPage::update()
// input slots
if( m_pParent->m_aJobData.m_pParser &&
- (pKey = m_pParent->m_aJobData.m_pParser->getKey( "InputSlot" )) )
+ (pKey = m_pParent->m_aJobData.m_pParser->getKey( u"InputSlot"_ustr )) )
{
m_pParent->insertAllPPDValues( *m_xSlotBox, m_pParent->m_aJobData.m_pParser, pKey );
}
@@ -221,17 +221,17 @@ IMPL_LINK( RTSPaperPage, SelectHdl, weld::ComboBox&, rBox, void )
if( &rBox == m_xPaperBox.get() )
{
if( m_pParent->m_aJobData.m_pParser )
- pKey = m_pParent->m_aJobData.m_pParser->getKey( "PageSize" );
+ pKey = m_pParent->m_aJobData.m_pParser->getKey( u"PageSize"_ustr );
}
else if( &rBox == m_xDuplexBox.get() )
{
if( m_pParent->m_aJobData.m_pParser )
- pKey = m_pParent->m_aJobData.m_pParser->getKey( "Duplex" );
+ pKey = m_pParent->m_aJobData.m_pParser->getKey( u"Duplex"_ustr );
}
else if( &rBox == m_xSlotBox.get() )
{
if( m_pParent->m_aJobData.m_pParser )
- pKey = m_pParent->m_aJobData.m_pParser->getKey( "InputSlot" );
+ pKey = m_pParent->m_aJobData.m_pParser->getKey( u"InputSlot"_ustr );
}
else if( &rBox == m_xOrientBox.get() )
{
@@ -262,15 +262,15 @@ IMPL_LINK_NOARG(RTSPaperPage, CheckBoxHdl, weld::Toggleable&, void)
* RTSDevicePage
*/
RTSDevicePage::RTSDevicePage(weld::Widget* pPage, RTSDialog* pParent)
- : m_xBuilder(Application::CreateBuilder(pPage, "vcl/ui/printerdevicepage.ui"))
+ : m_xBuilder(Application::CreateBuilder(pPage, u"vcl/ui/printerdevicepage.ui"_ustr))
, m_pCustomValue(nullptr)
, m_pParent(pParent)
- , m_xContainer(m_xBuilder->weld_widget("PrinterDevicePage"))
- , m_xPPDKeyBox(m_xBuilder->weld_tree_view("options"))
- , m_xPPDValueBox(m_xBuilder->weld_tree_view("values"))
- , m_xCustomEdit(m_xBuilder->weld_entry("custom"))
- , m_xSpaceBox(m_xBuilder->weld_combo_box("colorspace"))
- , m_xDepthBox(m_xBuilder->weld_combo_box("colordepth"))
+ , m_xContainer(m_xBuilder->weld_widget(u"PrinterDevicePage"_ustr))
+ , m_xPPDKeyBox(m_xBuilder->weld_tree_view(u"options"_ustr))
+ , m_xPPDValueBox(m_xBuilder->weld_tree_view(u"values"_ustr))
+ , m_xCustomEdit(m_xBuilder->weld_entry(u"custom"_ustr))
+ , m_xSpaceBox(m_xBuilder->weld_combo_box(u"colorspace"_ustr))
+ , m_xDepthBox(m_xBuilder->weld_combo_box(u"colordepth"_ustr))
, m_aReselectCustomIdle("RTSDevicePage m_aReselectCustomIdle")
{
m_aReselectCustomIdle.SetInvokeHandler(LINK(this, RTSDevicePage, ImplHandleReselectHdl));
diff --git a/vcl/unx/generic/printer/cpdmgr.cxx b/vcl/unx/generic/printer/cpdmgr.cxx
index 100b84592d77..7dc17cede353 100644
--- a/vcl/unx/generic/printer/cpdmgr.cxx
+++ b/vcl/unx/generic/printer/cpdmgr.cxx
@@ -340,17 +340,17 @@ const PPDParser* CPDManager::createCPDParser(const OUString& rPrinter)
if (aOptionName == "sides")
{
// Duplex key is used throughout for checking Duplex Support
- aOptionName = OUString("Duplex");
+ aOptionName = u"Duplex"_ustr;
}
else if (aOptionName == "printer-resolution")
{
// Resolution key is used in places
- aOptionName = OUString("Resolution");
+ aOptionName = u"Resolution"_ustr;
}
else if (aOptionName == "media")
{
// PageSize key is used in many places
- aOptionName = OUString("PageSize");
+ aOptionName = u"PageSize"_ustr;
}
default_values.push_back(aDefaultValue);
pKey = new PPDKey(aOptionName);
@@ -371,15 +371,15 @@ const PPDParser* CPDManager::createCPDParser(const OUString& rPrinter)
// Duplex key matches against very specific Values
if (aValueName == "one-sided")
{
- aValueName = OUString("None");
+ aValueName = u"None"_ustr;
}
else if (aValueName == "two-sided-long-edge")
{
- aValueName = OUString("DuplexNoTumble");
+ aValueName = u"DuplexNoTumble"_ustr;
}
else if (aValueName == "two-sided-short-edge")
{
- aValueName = OUString("DuplexTumble");
+ aValueName = u"DuplexTumble"_ustr;
}
}
@@ -404,7 +404,7 @@ const PPDParser* CPDManager::createCPDParser(const OUString& rPrinter)
keys.emplace_back(pKey);
}
- pKey = new PPDKey("ModelName");
+ pKey = new PPDKey(u"ModelName"_ustr);
aValueName = OStringToOUString("", aEncoding);
pValue = pKey->insertValue(aValueName, eQuoted);
if (pValue)
@@ -412,7 +412,7 @@ const PPDParser* CPDManager::createCPDParser(const OUString& rPrinter)
pKey->m_pDefaultValue = pValue;
keys.emplace_back(pKey);
- pKey = new PPDKey("NickName");
+ pKey = new PPDKey(u"NickName"_ustr);
aValueName = OStringToOUString(pDest->name, aEncoding);
pValue = pKey->insertValue(aValueName, eQuoted);
if (pValue)
@@ -460,7 +460,7 @@ const PPDParser* CPDManager::createCPDParser(const OUString& rPrinter)
if (!pNewParser)
{
// get the default PPD
- pNewParser = PPDParser::getParser("SGENPRT");
+ pNewParser = PPDParser::getParser(u"SGENPRT"_ustr);
SAL_WARN("vcl.unx.print", "Parsing default SGENPRT PPD");
PrinterInfo& rInfo = m_aPrinters[aPrinter].m_aInfo;
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx
index 4f8a4e06f43e..c958b25549cd 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -532,7 +532,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
if( ! pNewParser )
{
// get the default PPD
- pNewParser = PPDParser::getParser( "SGENPRT" );
+ pNewParser = PPDParser::getParser( u"SGENPRT"_ustr );
SAL_INFO("vcl.unx.print", "Parsing default SGENPRT PPD" );
PrinterInfo& rInfo = m_aPrinters[ aPrinter ].m_aInfo;
@@ -713,19 +713,19 @@ namespace
};
RTSPWDialog::RTSPWDialog(weld::Window* pParent, std::string_view rServer, std::string_view rUserName)
- : GenericDialogController(pParent, "vcl/ui/cupspassworddialog.ui", "CUPSPasswordDialog")
- , m_xText(m_xBuilder->weld_label("text"))
- , m_xDomainLabel(m_xBuilder->weld_label("label3"))
- , m_xDomainEdit(m_xBuilder->weld_entry("domain"))
- , m_xUserLabel(m_xBuilder->weld_label("label1"))
- , m_xUserEdit(m_xBuilder->weld_entry("user"))
- , m_xPassLabel(m_xBuilder->weld_label("label2"))
- , m_xPassEdit(m_xBuilder->weld_entry("pass"))
+ : GenericDialogController(pParent, u"vcl/ui/cupspassworddialog.ui"_ustr, u"CUPSPasswordDialog"_ustr)
+ , m_xText(m_xBuilder->weld_label(u"text"_ustr))
+ , m_xDomainLabel(m_xBuilder->weld_label(u"label3"_ustr))
+ , m_xDomainEdit(m_xBuilder->weld_entry(u"domain"_ustr))
+ , m_xUserLabel(m_xBuilder->weld_label(u"label1"_ustr))
+ , m_xUserEdit(m_xBuilder->weld_entry(u"user"_ustr))
+ , m_xPassLabel(m_xBuilder->weld_label(u"label2"_ustr))
+ , m_xPassEdit(m_xBuilder->weld_entry(u"pass"_ustr))
{
OUString aText(m_xText->get_label());
aText = aText.replaceFirst("%s", OStringToOUString(rServer, osl_getThreadTextEncoding()));
m_xText->set_label(aText);
- m_xDomainEdit->set_text("WORKGROUP");
+ m_xDomainEdit->set_text(u"WORKGROUP"_ustr);
if (rUserName.empty())
m_xUserEdit->grab_focus();
else
diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx
index 5fc6a7870006..2ba928475154 100644
--- a/vcl/unx/generic/printer/jobdata.cxx
+++ b/vcl/unx/generic/printer/jobdata.cxx
@@ -67,7 +67,7 @@ void JobData::setPaper( int i_nWidth, int i_nHeight )
{
OUString aPaper( m_pParser->matchPaper( i_nWidth, i_nHeight ) );
- const PPDKey* pKey = m_pParser->getKey( "PageSize" );
+ const PPDKey* pKey = m_pParser->getKey( u"PageSize"_ustr );
const PPDValue* pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : nullptr;
if (pKey && pValue)
@@ -79,7 +79,7 @@ void JobData::setPaperBin( int i_nPaperBin )
{
if( m_pParser )
{
- const PPDKey* pKey = m_pParser->getKey( "InputSlot" );
+ const PPDKey* pKey = m_pParser->getKey( u"InputSlot"_ustr );
const PPDValue* pValue = pKey ? pKey->getValue( i_nPaperBin ) : nullptr;
if (pKey && pValue)
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index b982c1a0a4be..c869765c8767 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -450,7 +450,7 @@ void PPDParser::initPPDFiles(PPDCache &rPPDCache)
INetURLObject aPPDDir( path, INetProtocol::File, INetURLObject::EncodeMechanism::All );
scanPPDDir( aPPDDir.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
- if( rPPDCache.xAllPPDFiles->find( OUString( "SGENPRT" ) ) != rPPDCache.xAllPPDFiles->end() )
+ if( rPPDCache.xAllPPDFiles->find( u"SGENPRT"_ustr ) != rPPDCache.xAllPPDFiles->end() )
return;
// last try: search in directory of executable (mainly for setup)
@@ -463,7 +463,7 @@ void PPDParser::initPPDFiles(PPDCache &rPPDCache)
<< aDir.GetMainURL(INetURLObject::DecodeMechanism::NONE));
scanPPDDir( aDir.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
SAL_INFO("vcl.unx.print", "SGENPRT "
- << (rPPDCache.xAllPPDFiles->find("SGENPRT") ==
+ << (rPPDCache.xAllPPDFiles->find(u"SGENPRT"_ustr) ==
rPPDCache.xAllPPDFiles->end() ? "not found" : "found"));
}
}
@@ -608,11 +608,11 @@ PPDParser::PPDParser(OUString aFile, const std::vector<PPDKey*>& keys)
// fill in shortcuts
const PPDKey* pKey;
- pKey = getKey( "PageSize" );
+ pKey = getKey( u"PageSize"_ustr );
if ( pKey ) {
- std::unique_ptr<PPDKey> pImageableAreas(new PPDKey("ImageableArea"));
- std::unique_ptr<PPDKey> pPaperDimensions(new PPDKey("PaperDimension"));
+ std::unique_ptr<PPDKey> pImageableAreas(new PPDKey(u"ImageableArea"_ustr));
+ std::unique_ptr<PPDKey> pPaperDimensions(new PPDKey(u"PaperDimension"_ustr));
#if defined(CUPS_VERSION_MAJOR)
#if (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 7) || CUPS_VERSION_MAJOR > 1
for (int i = 0; i < pKey->countValues(); i++) {
@@ -648,7 +648,7 @@ PPDParser::PPDParser(OUString aFile, const std::vector<PPDKey*>& keys)
insertKey(std::move(pPaperDimensions));
}
- m_pImageableAreas = getKey( "ImageableArea" );
+ m_pImageableAreas = getKey( u"ImageableArea"_ustr );
const PPDValue* pDefaultImageableArea = nullptr;
if( m_pImageableAreas )
pDefaultImageableArea = m_pImageableAreas->getDefaultValue();
@@ -659,7 +659,7 @@ PPDParser::PPDParser(OUString aFile, const std::vector<PPDKey*>& keys)
SAL_WARN( "vcl.unx.print", "no DefaultImageableArea in " << m_aFile);
}
- m_pPaperDimensions = getKey( "PaperDimension" );
+ m_pPaperDimensions = getKey( u"PaperDimension"_ustr );
if( m_pPaperDimensions )
m_pDefaultPaperDimension = m_pPaperDimensions->getDefaultValue();
if (m_pPaperDimensions == nullptr) {
@@ -669,7 +669,7 @@ PPDParser::PPDParser(OUString aFile, const std::vector<PPDKey*>& keys)
SAL_WARN( "vcl.unx.print", "no DefaultPaperDimensions in " << m_aFile);
}
- auto pResolutions = getKey( "Resolution" );
+ auto pResolutions = getKey( u"Resolution"_ustr );
if( pResolutions )
m_pDefaultResolution = pResolutions->getDefaultValue();
if (pResolutions == nullptr) {
@@ -677,7 +677,7 @@ PPDParser::PPDParser(OUString aFile, const std::vector<PPDKey*>& keys)
}
SAL_INFO_IF(!m_pDefaultResolution, "vcl.unx.print", "no DefaultResolution in " + m_aFile);
- auto pInputSlots = getKey( "InputSlot" );
+ auto pInputSlots = getKey( u"InputSlot"_ustr );
if( pInputSlots )
m_pDefaultInputSlot = pInputSlots->getDefaultValue();
SAL_INFO_IF(!pInputSlots, "vcl.unx.print", "no InputSlot in " << m_aFile);
@@ -796,7 +796,7 @@ PPDParser::PPDParser( OUString aFile ) :
}
#endif
- m_pImageableAreas = getKey( "ImageableArea" );
+ m_pImageableAreas = getKey( u"ImageableArea"_ustr );
const PPDValue * pDefaultImageableArea = nullptr;
if( m_pImageableAreas )
pDefaultImageableArea = m_pImageableAreas->getDefaultValue();
@@ -807,7 +807,7 @@ PPDParser::PPDParser( OUString aFile ) :
SAL_WARN( "vcl.unx.print", "no DefaultImageableArea in " << m_aFile);
}
- m_pPaperDimensions = getKey( "PaperDimension" );
+ m_pPaperDimensions = getKey( u"PaperDimension"_ustr );
if( m_pPaperDimensions )
m_pDefaultPaperDimension = m_pPaperDimensions->getDefaultValue();
if (m_pPaperDimensions == nullptr) {
@@ -817,7 +817,7 @@ PPDParser::PPDParser( OUString aFile ) :
SAL_WARN( "vcl.unx.print", "no DefaultPaperDimensions in " << m_aFile);
}
- auto pResolutions = getKey( "Resolution" );
+ auto pResolutions = getKey( u"Resolution"_ustr );
if( pResolutions )
m_pDefaultResolution = pResolutions->getDefaultValue();
if (pResolutions == nullptr) {
@@ -825,7 +825,7 @@ PPDParser::PPDParser( OUString aFile ) :
}
SAL_INFO_IF(!m_pDefaultResolution, "vcl.unx.print", "no DefaultResolution in " + m_aFile);
- auto pInputSlots = getKey( "InputSlot" );
+ auto pInputSlots = getKey( u"InputSlot"_ustr );
if( pInputSlots )
m_pDefaultInputSlot = pInputSlots->getDefaultValue();
SAL_INFO_IF(!pInputSlots, "vcl.unx.print", "no InputSlot in " << m_aFile);
@@ -1007,7 +1007,7 @@ void PPDParser::parse( ::std::vector< OString >& rLines )
if(keyit != m_aKeys.end())
{
PPDKey* pKey = keyit->second.get();
- pKey->insertValue("Custom", eInvocation, true);
+ pKey->insertValue(u"Custom"_ustr, eInvocation, true);
}
continue;
}
@@ -1717,9 +1717,9 @@ bool PPDContext::resetValue( const PPDKey* pKey, bool bDefaultable )
if( ! pKey || ! m_pParser || ! m_pParser->hasKey( pKey ) )
return false;
- const PPDValue* pResetValue = pKey->getValue( "None" );
+ const PPDValue* pResetValue = pKey->getValue( u"None"_ustr );
if( ! pResetValue )
- pResetValue = pKey->getValue( "False" );
+ pResetValue = pKey->getValue( u"False"_ustr );
if( ! pResetValue && bDefaultable )
pResetValue = pKey->getDefaultValue();
@@ -1884,7 +1884,7 @@ void PPDContext::rebuildFromStreamBuffer(const std::vector<char> &rBuffer)
SAL_INFO("vcl.unx.print",
"PPDContext::rebuildFromStreamBuffer: read PPDKeyValue { "
<< pKey->getKey() << " , "
- << (pValue ? aOption : "<nil>")
+ << (pValue ? aOption : u"<nil>"_ustr)
<< " }");
}
}
@@ -1899,7 +1899,7 @@ int PPDContext::getRenderResolution() const
if( m_pParser )
{
int nDPIx = 300, nDPIy = 300;
- const PPDKey* pKey = m_pParser->getKey( "Resolution" );
+ const PPDKey* pKey = m_pParser->getKey( u"Resolution"_ustr );
if( pKey )
{
const PPDValue* pValue = getValue( pKey );
@@ -1925,7 +1925,7 @@ void PPDContext::getPageSize( OUString& rPaper, int& rWidth, int& rHeight ) cons
if( !m_pParser )
return;
- const PPDKey* pKey = m_pParser->getKey( "PageSize" );
+ const PPDKey* pKey = m_pParser->getKey( u"PageSize"_ustr );
if( !pKey )
return;
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index e92005136487..da4818195a8e 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -96,7 +96,7 @@ PrinterInfoManager& PrinterInfoManager::get()
PrinterInfoManager::PrinterInfoManager( Type eType ) :
m_eType( eType ),
- m_aSystemDefaultPaper( "A4" )
+ m_aSystemDefaultPaper( u"A4"_ustr )
{
if( eType == Type::Default )
m_pQueueInfo.reset( new SystemQueueInfo );
@@ -184,7 +184,7 @@ void PrinterInfoManager::initialize()
m_aGlobalDefaults = PrinterInfo();
// need a parser for the PPDContext. generic printer should do.
- m_aGlobalDefaults.m_pParser = PPDParser::getParser( "SGENPRT" );
+ m_aGlobalDefaults.m_pParser = PPDParser::getParser( u"SGENPRT"_ustr );
m_aGlobalDefaults.m_aContext.setParser( m_aGlobalDefaults.m_pParser );
if( ! m_aGlobalDefaults.m_pParser )
@@ -471,8 +471,8 @@ void PrinterInfoManager::initialize()
{
PrinterInfo aDefaultInfo( getPrinterInfo( m_aDefaultPrinter ) );
- const PPDKey* pDefKey = aDefaultInfo.m_pParser->getKey( "PageSize" );
- const PPDKey* pMergeKey = aMergeInfo.m_pParser->getKey( "PageSize" );
+ const PPDKey* pDefKey = aDefaultInfo.m_pParser->getKey( u"PageSize"_ustr );
+ const PPDKey* pMergeKey = aMergeInfo.m_pParser->getKey( u"PageSize"_ustr );
const PPDValue* pDefValue = aDefaultInfo.m_aContext.getValue( pDefKey );
const PPDValue* pMergeValue = pMergeKey ? pMergeKey->getValue( pDefValue->m_aOption ) : nullptr;
if( pMergeKey && pMergeValue )
@@ -571,7 +571,7 @@ void PrinterInfoManager::setDefaultPaper( PPDContext& rContext ) const
if( ! rContext.getParser() )
return;
- const PPDKey* pPageSizeKey = rContext.getParser()->getKey( "PageSize" );
+ const PPDKey* pPageSizeKey = rContext.getParser()->getKey( u"PageSize"_ustr );
if( ! pPageSizeKey )
return;
diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
index 53f8e2e35b34..3685f229e6d2 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
@@ -1653,7 +1653,7 @@ void SAL_CALL SalGtkFilePicker::initialize( const uno::Sequence<uno::Any>& aArgu
uno::Any aAny;
if( !aArguments.hasElements() )
throw lang::IllegalArgumentException(
- "no arguments",
+ u"no arguments"_ustr,
static_cast<XFilePicker2*>( this ), 1 );
aAny = aArguments[0];
@@ -1661,7 +1661,7 @@ void SAL_CALL SalGtkFilePicker::initialize( const uno::Sequence<uno::Any>& aArgu
if( ( aAny.getValueType() != cppu::UnoType<sal_Int16>::get()) &&
(aAny.getValueType() != cppu::UnoType<sal_Int8>::get()) )
throw lang::IllegalArgumentException(
- "invalid argument type",
+ u"invalid argument type"_ustr,
static_cast<XFilePicker2*>( this ), 1 );
sal_Int16 templateId = -1;
@@ -1775,7 +1775,7 @@ void SalGtkFilePicker::impl_initialize(GtkWidget* pParentWidget, sal_Int16 templ
break;
default:
throw lang::IllegalArgumentException(
- "Unknown template",
+ u"Unknown template"_ustr,
static_cast< XFilePicker2* >( this ),
1 );
}
diff --git a/vcl/unx/gtk3/fpicker/SalGtkFolderPicker.cxx b/vcl/unx/gtk3/fpicker/SalGtkFolderPicker.cxx
index 867e28a9124d..ee618e4515f7 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkFolderPicker.cxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkFolderPicker.cxx
@@ -60,7 +60,7 @@ void SAL_CALL SalGtkFolderPicker::setDisplayDirectory( const OUString& aDirector
OString aTxt = unicodetouri( aDirectory );
if( aTxt.isEmpty() ){
- aTxt = unicodetouri("file:///.");
+ aTxt = unicodetouri(u"file:///."_ustr);
}
if( aTxt.endsWith("/") )
diff --git a/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx b/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx
index 9d07a11f7620..1ca92d8751bf 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx
@@ -247,7 +247,7 @@ void SalGtkPicker::implsetDisplayDirectory( const OUString& aDirectory )
OString aTxt = unicodetouri(aDirectory);
if( aTxt.isEmpty() ){
- aTxt = unicodetouri("file:///.");
+ aTxt = unicodetouri(u"file:///."_ustr);
}
if( aTxt.endsWith("/") )
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 8089c88467e3..cb71fabe81af 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -247,7 +247,7 @@ void GtkInstance::EnsureInit()
#ifdef GTK_TOOLKIT_NAME
pSVData->maAppData.mxToolkitName = OUString(GTK_TOOLKIT_NAME);
#else
- pSVData->maAppData.mxToolkitName = OUString("gtk3");
+ pSVData->maAppData.mxToolkitName = u"gtk3"_ustr;
#endif
bNeedsInit = false;
@@ -991,12 +991,12 @@ public:
OUString VclGtkClipboard::getImplementationName()
{
- return "com.sun.star.datatransfer.VclGtkClipboard";
+ return u"com.sun.star.datatransfer.VclGtkClipboard"_ustr;
}
Sequence< OUString > VclGtkClipboard::getSupportedServiceNames()
{
- Sequence<OUString> aRet { "com.sun.star.datatransfer.clipboard.SystemClipboard" };
+ Sequence<OUString> aRet { u"com.sun.star.datatransfer.clipboard.SystemClipboard"_ustr };
return aRet;
}
@@ -1552,7 +1552,7 @@ void VclGtkClipboard::setContents(
OUString VclGtkClipboard::getName()
{
- return (m_eSelection == SELECTION_CLIPBOARD) ? OUString("CLIPBOARD") : OUString("PRIMARY");
+ return (m_eSelection == SELECTION_CLIPBOARD) ? u"CLIPBOARD"_ustr : u"PRIMARY"_ustr;
}
sal_Int8 VclGtkClipboard::getRenderingCapabilities()
@@ -1584,7 +1584,7 @@ Reference< XInterface > GtkInstance::CreateClipboard(const Sequence< Any >& argu
sel = "CLIPBOARD";
} else if (arguments.getLength() != 1 || !(arguments[0] >>= sel)) {
throw css::lang::IllegalArgumentException(
- "bad GtkInstance::CreateClipboard arguments",
+ u"bad GtkInstance::CreateClipboard arguments"_ustr,
css::uno::Reference<css::uno::XInterface>(), -1);
}
@@ -1612,7 +1612,7 @@ GtkInstDropTarget::GtkInstDropTarget()
OUString SAL_CALL GtkInstDropTarget::getImplementationName()
{
- return "com.sun.star.datatransfer.dnd.VclGtkDropTarget";
+ return u"com.sun.star.datatransfer.dnd.VclGtkDropTarget"_ustr;
}
sal_Bool SAL_CALL GtkInstDropTarget::supportsService(OUString const & ServiceName)
@@ -1622,7 +1622,7 @@ sal_Bool SAL_CALL GtkInstDropTarget::supportsService(OUString const & ServiceNam
css::uno::Sequence<OUString> SAL_CALL GtkInstDropTarget::getSupportedServiceNames()
{
- Sequence<OUString> aRet { "com.sun.star.datatransfer.dnd.GtkDropTarget" };
+ Sequence<OUString> aRet { u"com.sun.star.datatransfer.dnd.GtkDropTarget"_ustr };
return aRet;
}
@@ -1642,7 +1642,7 @@ void GtkInstDropTarget::initialize(const Sequence<Any>& rArguments)
{
if (rArguments.getLength() < 2)
{
- throw RuntimeException("DropTarget::initialize: Cannot install window event handler",
+ throw RuntimeException(u"DropTarget::initialize: Cannot install window event handler"_ustr,
getXWeak());
}
@@ -1651,7 +1651,7 @@ void GtkInstDropTarget::initialize(const Sequence<Any>& rArguments)
if (!nFrame)
{
- throw RuntimeException("DropTarget::initialize: missing SalFrame",
+ throw RuntimeException(u"DropTarget::initialize: missing SalFrame"_ustr,
getXWeak());
}
@@ -1778,7 +1778,7 @@ void GtkInstDragSource::initialize(const css::uno::Sequence<css::uno::Any >& rAr
{
if (rArguments.getLength() < 2)
{
- throw RuntimeException("DragSource::initialize: Cannot install window event handler",
+ throw RuntimeException(u"DragSource::initialize: Cannot install window event handler"_ustr,
getXWeak());
}
@@ -1787,7 +1787,7 @@ void GtkInstDragSource::initialize(const css::uno::Sequence<css::uno::Any >& rAr
if (!nFrame)
{
- throw RuntimeException("DragSource::initialize: missing SalFrame",
+ throw RuntimeException(u"DragSource::initialize: missing SalFrame"_ustr,
getXWeak());
}
@@ -1797,7 +1797,7 @@ void GtkInstDragSource::initialize(const css::uno::Sequence<css::uno::Any >& rAr
OUString SAL_CALL GtkInstDragSource::getImplementationName()
{
- return "com.sun.star.datatransfer.dnd.VclGtkDragSource";
+ return u"com.sun.star.datatransfer.dnd.VclGtkDragSource"_ustr;
}
sal_Bool SAL_CALL GtkInstDragSource::supportsService(OUString const & ServiceName)
@@ -1807,7 +1807,7 @@ sal_Bool SAL_CALL GtkInstDragSource::supportsService(OUString const & ServiceNam
css::uno::Sequence<OUString> SAL_CALL GtkInstDragSource::getSupportedServiceNames()
{
- Sequence<OUString> aRet { "com.sun.star.datatransfer.dnd.GtkDragSource" };
+ Sequence<OUString> aRet { u"com.sun.star.datatransfer.dnd.GtkDragSource"_ustr };
return aRet;
}
@@ -4893,7 +4893,7 @@ namespace
// We "know" that this gets passed to zlib's deflateInit2_(). 1 means best speed.
css::uno::Sequence<css::beans::PropertyValue> aFilterData{ comphelper::makePropertyValue(
- "Compression", sal_Int32(1)) };
+ u"Compression"_ustr, sal_Int32(1)) };
auto aBitmapEx = aImage.GetBitmapEx();
vcl::PngImageWriter aWriter(aMemStm);
aWriter.setParameters(aFilterData);
@@ -4920,7 +4920,7 @@ namespace
// We "know" that this gets passed to zlib's deflateInit2_(). 1 means best speed.
css::uno::Sequence<css::beans::PropertyValue> aFilterData{ comphelper::makePropertyValue(
- "Compression", sal_Int32(1)) };
+ u"Compression"_ustr, sal_Int32(1)) };
auto aBitmapEx = aImage.GetBitmapEx();
vcl::PngImageWriter aWriter(*pStream);
aWriter.setParameters(aFilterData);
@@ -7532,7 +7532,7 @@ public:
#if !GTK_CHECK_VERSION(4, 0, 0)
gtk_widget_set_can_default(GTK_WIDGET(m_pBack), true);
#endif
- ::set_buildable_id(GTK_BUILDABLE(m_pBack), "previous");
+ ::set_buildable_id(GTK_BUILDABLE(m_pBack), u"previous"_ustr);
#if GTK_CHECK_VERSION(4, 0, 0)
gtk_box_append(GTK_BOX(m_pButtonBox), GTK_WIDGET(m_pBack));
#else
@@ -7543,7 +7543,7 @@ public:
#if !GTK_CHECK_VERSION(4, 0, 0)
gtk_widget_set_can_default(GTK_WIDGET(m_pNext), true);
#endif
- ::set_buildable_id(GTK_BUILDABLE(m_pNext), "next");
+ ::set_buildable_id(GTK_BUILDABLE(m_pNext), u"next"_ustr);
#if GTK_CHECK_VERSION(4, 0, 0)
gtk_box_append(GTK_BOX(m_pButtonBox), GTK_WIDGET(m_pNext));
#else
@@ -7564,7 +7564,7 @@ public:
#if !GTK_CHECK_VERSION(4, 0, 0)
gtk_widget_set_can_default(GTK_WIDGET(m_pFinish), true);
#endif
- ::set_buildable_id(GTK_BUILDABLE(m_pFinish), "finish");
+ ::set_buildable_id(GTK_BUILDABLE(m_pFinish), u"finish"_ustr);
#if GTK_CHECK_VERSION(4, 0, 0)
gtk_box_append(GTK_BOX(m_pButtonBox), GTK_WIDGET(m_pFinish));
#else
@@ -8948,7 +8948,7 @@ private:
disable_notify_events();
GtkWidget *pTabWidget = gtk_fixed_new();
- ::set_buildable_id(GTK_BUILDABLE(pTabWidget), "useless");
+ ::set_buildable_id(GTK_BUILDABLE(pTabWidget), u"useless"_ustr);
GtkWidget *pChild = gtk_grid_new();
gtk_notebook_append_page(pNotebook, pChild, pTabWidget);
@@ -14421,7 +14421,7 @@ private:
if (!bRet)
{
GtkTreeIter subiter;
- OUString sDummy("<dummy>");
+ OUString sDummy(u"<dummy>"_ustr);
insert_row(subiter, &iter, -1, nullptr, &sDummy, nullptr, nullptr);
}
m_aExpandingPlaceHolderParents.erase(pPlaceHolderPath);
@@ -15187,7 +15187,7 @@ public:
if (bChildrenOnDemand)
{
GtkTreeIter subiter;
- OUString sDummy("<dummy>");
+ OUString sDummy(u"<dummy>"_ustr);
insert_row(subiter, &iter, -1, nullptr, &sDummy, nullptr, nullptr);
}
if (pRet)
@@ -16242,7 +16242,7 @@ public:
if (bChildrenOnDemand && !bPlaceHolder)
{
GtkTreeIter subiter;
- OUString sDummy("<dummy>");
+ OUString sDummy(u"<dummy>"_ustr);
insert_row(subiter, &rGtkIter.iter, -1, nullptr, &sDummy, nullptr, nullptr);
}
else if (!bChildrenOnDemand && bPlaceHolder)
@@ -21913,7 +21913,7 @@ private:
}
if (m_nMRUCount && !nMRUCount)
- insert_separator_including_mru(m_nMRUCount, "separator");
+ insert_separator_including_mru(m_nMRUCount, u"separator"_ustr);
else if (!m_nMRUCount && nMRUCount)
remove_including_mru(m_nMRUCount); // remove separator
}
@@ -22844,7 +22844,7 @@ public:
while (nIndex >= 0);
if (nMRUCount && !m_nMRUCount)
- insert_separator_including_mru(nMRUCount, "separator");
+ insert_separator_including_mru(nMRUCount, u"separator"_ustr);
else if (!nMRUCount && m_nMRUCount)
remove_including_mru(m_nMRUCount); // remove separator
@@ -24200,7 +24200,7 @@ public:
OUString sPageHelpId;
// check to see if there is a notebook called tabcontrol and get the
// helpid for the current page of that
- std::unique_ptr<weld::Notebook> xNotebook(weld_notebook("tabcontrol"));
+ std::unique_ptr<weld::Notebook> xNotebook(weld_notebook(u"tabcontrol"_ustr));
if (xNotebook)
{
if (GtkInstanceContainer* pPage = dynamic_cast<GtkInstanceContainer*>(xNotebook->get_page(xNotebook->get_current_page_ident())))
diff --git a/vcl/unx/kf5/KFFilePicker.cxx b/vcl/unx/kf5/KFFilePicker.cxx
index 8d0344b4cb93..4122ef47108c 100644
--- a/vcl/unx/kf5/KFFilePicker.cxx
+++ b/vcl/unx/kf5/KFFilePicker.cxx
@@ -38,8 +38,10 @@ namespace
{
uno::Sequence<OUString> FilePicker_getSupportedServiceNames()
{
- return { "com.sun.star.ui.dialogs.FilePicker", "com.sun.star.ui.dialogs.SystemFilePicker",
- "com.sun.star.ui.dialogs.KFFilePicker", "com.sun.star.ui.dialogs.KFFolderPicker" };
+ return { u"com.sun.star.ui.dialogs.FilePicker"_ustr,
+ u"com.sun.star.ui.dialogs.SystemFilePicker"_ustr,
+ u"com.sun.star.ui.dialogs.KFFilePicker"_ustr,
+ u"com.sun.star.ui.dialogs.KFFolderPicker"_ustr };
}
}
@@ -127,7 +129,7 @@ OUString SAL_CALL KFFilePicker::getLabel(sal_Int16 controlId)
{
// We ignore this one and rely on QFileDialog to provide the functionality
if (CHECKBOX_AUTOEXTENSION == controlId)
- return "";
+ return u""_ustr;
return QtFilePicker::getLabel(controlId);
}
@@ -145,7 +147,7 @@ void KFFilePicker::addCustomControl(sal_Int16 controlId)
// XServiceInfo
OUString SAL_CALL KFFilePicker::getImplementationName()
{
- return "com.sun.star.ui.dialogs.KFFilePicker";
+ return u"com.sun.star.ui.dialogs.KFFilePicker"_ustr;
}
sal_Bool SAL_CALL KFFilePicker::supportsService(const OUString& ServiceName)
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx
index f28c78d97078..e086e2e22e79 100644
--- a/vcl/workben/fftester.cxx
+++ b/vcl/workben/fftester.cxx
@@ -125,17 +125,17 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
Reference< XComponentContext > xContext = defaultBootstrap_InitialComponentContext();
Reference< XMultiServiceFactory > xServiceManager( xContext->getServiceManager(), UNO_QUERY );
if( !xServiceManager.is() )
- Application::Abort( "Failed to bootstrap" );
+ Application::Abort( u"Failed to bootstrap"_ustr );
comphelper::setProcessServiceFactory( xServiceManager );
comphelper::EnableFuzzing();
// initialise unconfigured UCB:
css::uno::Reference<css::ucb::XUniversalContentBroker> xUcb(comphelper::getProcessServiceFactory()->
- createInstance("com.sun.star.ucb.UniversalContentBroker"), css::uno::UNO_QUERY_THROW);
- css::uno::Sequence<css::uno::Any> aArgs{ css::uno::Any(OUString("NoConfig")) };
+ createInstance(u"com.sun.star.ucb.UniversalContentBroker"_ustr), css::uno::UNO_QUERY_THROW);
+ css::uno::Sequence<css::uno::Any> aArgs{ css::uno::Any(u"NoConfig"_ustr) };
css::uno::Reference<css::ucb::XContentProvider> xFileProvider(comphelper::getProcessServiceFactory()->
- createInstanceWithArguments("com.sun.star.ucb.FileContentProvider", aArgs), css::uno::UNO_QUERY_THROW);
- xUcb->registerContentProvider(xFileProvider, "file", true);
+ createInstanceWithArguments(u"com.sun.star.ucb.FileContentProvider"_ustr, aArgs), css::uno::UNO_QUERY_THROW);
+ xUcb->registerContentProvider(xFileProvider, u"file"_ustr, true);
Application::EnableHeadlessMode(false);
InitVCL();
diff --git a/vcl/workben/icontest.cxx b/vcl/workben/icontest.cxx
index 86cf4da23e38..fce26b743c82 100644
--- a/vcl/workben/icontest.cxx
+++ b/vcl/workben/icontest.cxx
@@ -183,7 +183,7 @@ void IconTestApp::DoItWithVcl( const OUString& sImageFile)
{
VclPtrInstance<MyWorkWindow> pWindow( nullptr, WB_APP | WB_STDWORK | WB_SIZEABLE | WB_CLOSEABLE | WB_CLIPCHILDREN );
- pWindow->SetText("VCL Image Test");
+ pWindow->SetText(u"VCL Image Test"_ustr);
pWindow->LoadGraphic( sImageFile );
pWindow->mpFixedBitmap = VclPtr<FixedBitmap>::Create( pWindow );
diff --git a/vcl/workben/listfonts.cxx b/vcl/workben/listfonts.cxx
index 49380c03bcbc..30718bb010b2 100644
--- a/vcl/workben/listfonts.cxx
+++ b/vcl/workben/listfonts.cxx
@@ -40,256 +40,256 @@ OUString GetOctetTextEncodingName(sal_uInt16 encoding)
switch (encoding)
{
case RTL_TEXTENCODING_APPLE_ARABIC:
- return "Arabic (Apple Macintosh)";
+ return u"Arabic (Apple Macintosh)"_ustr;
case RTL_TEXTENCODING_IBM_864:
- return "Arabic (DOS/OS2-864)";
+ return u"Arabic (DOS/OS2-864)"_ustr;
case RTL_TEXTENCODING_ISO_8859_6:
- return "Arabic (ISO-8859-6)";
+ return u"Arabic (ISO-8859-6)"_ustr;
case RTL_TEXTENCODING_MS_1256:
- return "Arabic (Windows-1256)";
+ return u"Arabic (Windows-1256)"_ustr;
case RTL_TEXTENCODING_IBM_775:
- return "Baltic (DOS/OS2-775)";
+ return u"Baltic (DOS/OS2-775)"_ustr;
case RTL_TEXTENCODING_ISO_8859_4:
- return "Baltic (ISO-8859-4)";
+ return u"Baltic (ISO-8859-4)"_ustr;
case RTL_TEXTENCODING_MS_1257:
- return "Baltic (Windows-1257)";
+ return u"Baltic (Windows-1257)"_ustr;
case RTL_TEXTENCODING_APPLE_CENTEURO:
- return "Central European (Apple Macintosh)";
+ return u"Central European (Apple Macintosh)"_ustr;
case RTL_TEXTENCODING_APPLE_CROATIAN:
- return "Central European (Apple Macintosh/Croatian)";
+ return u"Central European (Apple Macintosh/Croatian)"_ustr;
case RTL_TEXTENCODING_APPLE_ROMANIAN:
- return "Central European (Apple Macintosh/Romanian)";
+ return u"Central European (Apple Macintosh/Romanian)"_ustr;
case RTL_TEXTENCODING_IBM_852:
- return "Central European (DOS/OS2-852)";
+ return u"Central European (DOS/OS2-852)"_ustr;
case RTL_TEXTENCODING_ISO_8859_2:
- return "Central European (ISO-8859-2)";
+ return u"Central European (ISO-8859-2)"_ustr;
case RTL_TEXTENCODING_ISO_8859_10:
- return "Central European (ISO-8859-10)";
+ return u"Central European (ISO-8859-10)"_ustr;
case RTL_TEXTENCODING_ISO_8859_13:
- return "Central European (ISO-8859-13)";
+ return u"Central European (ISO-8859-13)"_ustr;
case RTL_TEXTENCODING_MS_1250:
- return "Central European (Windows-1250/WinLatin 2)";
+ return u"Central European (Windows-1250/WinLatin 2)"_ustr;
case RTL_TEXTENCODING_APPLE_CHINSIMP:
- return "Chinese Simplified (Apple Macintosh)";
+ return u"Chinese Simplified (Apple Macintosh)"_ustr;
case RTL_TEXTENCODING_EUC_CN:
- return "Chinese Simplified (EUC-CN)";
+ return u"Chinese Simplified (EUC-CN)"_ustr;
case RTL_TEXTENCODING_GB_2312:
- return "Chinese Simplified (GB-2312)";
+ return u"Chinese Simplified (GB-2312)"_ustr;
case RTL_TEXTENCODING_GBK:
- return "Chinese Simplified (GBK/GB-2312-80)";
+ return u"Chinese Simplified (GBK/GB-2312-80)"_ustr;
case RTL_TEXTENCODING_ISO_2022_CN:
- return "Chinese Simplified (ISO-2022-CN)";
+ return u"Chinese Simplified (ISO-2022-CN)"_ustr;
case RTL_TEXTENCODING_MS_936:
- return "Chinese Simplified (Windows-936)";
+ return u"Chinese Simplified (Windows-936)"_ustr;
case RTL_TEXTENCODING_GB_18030:
- return "Chinese Simplified (GB-18030)";
+ return u"Chinese Simplified (GB-18030)"_ustr;
case RTL_TEXTENCODING_APPLE_CHINTRAD:
- return "Chinese Traditional (Apple Macintosh)";
+ return u"Chinese Traditional (Apple Macintosh)"_ustr;
case RTL_TEXTENCODING_BIG5:
- return "Chinese Traditional (BIG5)";
+ return u"Chinese Traditional (BIG5)"_ustr;
case RTL_TEXTENCODING_EUC_TW:
- return "Chinese Traditional (EUC-TW)";
+ return u"Chinese Traditional (EUC-TW)"_ustr;
case RTL_TEXTENCODING_GBT_12345:
- return "Chinese Traditional (GBT-12345)";
+ return u"Chinese Traditional (GBT-12345)"_ustr;
case RTL_TEXTENCODING_MS_950:
- return "Chinese Traditional (Windows-950)";
+ return u"Chinese Traditional (Windows-950)"_ustr;
case RTL_TEXTENCODING_BIG5_HKSCS:
- return "Chinese Traditional (BIG5-HKSCS)";
+ return u"Chinese Traditional (BIG5-HKSCS)"_ustr;
case RTL_TEXTENCODING_APPLE_CYRILLIC:
- return "Cyrillic (Apple Macintosh)";
+ return u"Cyrillic (Apple Macintosh)"_ustr;
case RTL_TEXTENCODING_APPLE_UKRAINIAN:
- return "Cyrillic (Apple Macintosh/Ukrainian)";
+ return u"Cyrillic (Apple Macintosh/Ukrainian)"_ustr;
case RTL_TEXTENCODING_IBM_855:
- return "Cyrillic (DOS/OS2-855)";
+ return u"Cyrillic (DOS/OS2-855)"_ustr;
case RTL_TEXTENCODING_IBM_866:
- return "Cyrillic (DOS/OS2-866/Russian)";
+ return u"Cyrillic (DOS/OS2-866/Russian)"_ustr;
case RTL_TEXTENCODING_ISO_8859_5:
- return "Cyrillic (ISO-8859-5)";
+ return u"Cyrillic (ISO-8859-5)"_ustr;
case RTL_TEXTENCODING_KOI8_R:
- return "Cyrillic (KOI8-R)";
+ return u"Cyrillic (KOI8-R)"_ustr;
case RTL_TEXTENCODING_KOI8_U:
- return "Cyrillic (KOI8-U)";
+ return u"Cyrillic (KOI8-U)"_ustr;
case RTL_TEXTENCODING_MS_1251:
- return "Cyrillic (Windows-1251)";
+ return u"Cyrillic (Windows-1251)"_ustr;
case RTL_TEXTENCODING_APPLE_GREEK:
- return "Greek (Apple Macintosh)";
+ return u"Greek (Apple Macintosh)"_ustr;
case RTL_TEXTENCODING_IBM_737:
- return "Greek (DOS/OS2-737)";
+ return u"Greek (DOS/OS2-737)"_ustr;
case RTL_TEXTENCODING_IBM_869:
- return "Greek (DOS/OS2-869/Modern)";
+ return u"Greek (DOS/OS2-869/Modern)"_ustr;
case RTL_TEXTENCODING_ISO_8859_7:
- return "Greek (ISO-8859-7)";
+ return u"Greek (ISO-8859-7)"_ustr;
case RTL_TEXTENCODING_MS_1253:
- return "Greek (Windows-1253)";
+ return u"Greek (Windows-1253)"_ustr;
case RTL_TEXTENCODING_APPLE_HEBREW:
- return "Hebrew (Apple Macintosh)";
+ return u"Hebrew (Apple Macintosh)"_ustr;
case RTL_TEXTENCODING_IBM_862:
- return "Hebrew (DOS/OS2-862)";
+ return u"Hebrew (DOS/OS2-862)"_ustr;
case RTL_TEXTENCODING_ISO_8859_8:
- return "Hebrew (ISO-8859-8)";
+ return u"Hebrew (ISO-8859-8)"_ustr;
case RTL_TEXTENCODING_MS_1255:
- return "Hebrew (Windows-1255)";
+ return u"Hebrew (Windows-1255)"_ustr;
case RTL_TEXTENCODING_APPLE_KOREAN:
- return "Korean (Apple Macintosh)";
+ return u"Korean (Apple Macintosh)"_ustr;
case RTL_TEXTENCODING_EUC_KR:
- return "Korean (EUC-KR)";
+ return u"Korean (EUC-KR)"_ustr;
case RTL_TEXTENCODING_ISO_2022_KR:
- return "Korean (ISO-2022-KR)";
+ return u"Korean (ISO-2022-KR)"_ustr;
case RTL_TEXTENCODING_MS_949:
- return "Korean (Windows-Wansung-949)";
+ return u"Korean (Windows-Wansung-949)"_ustr;
case RTL_TEXTENCODING_MS_1361:
- return "Korean (Windows-Johab-1361)";
+ return u"Korean (Windows-Johab-1361)"_ustr;
case RTL_TEXTENCODING_ISO_8859_3:
- return "Latin 3 (ISO-8859-3)";
+ return u"Latin 3 (ISO-8859-3)"_ustr;
case RTL_TEXTENCODING_ISCII_DEVANAGARI:
- return "Indian (ISCII Devanagari)";
+ return u"Indian (ISCII Devanagari)"_ustr;
case RTL_TEXTENCODING_APPLE_JAPANESE:
- return "Japanese (Apple Macintosh)";
+ return u"Japanese (Apple Macintosh)"_ustr;
case RTL_TEXTENCODING_EUC_JP:
- return "Japanese (EUC-JP)";
+ return u"Japanese (EUC-JP)"_ustr;
case RTL_TEXTENCODING_ISO_2022_JP:
- return "Japanese (ISO-2022-JP)";
+ return u"Japanese (ISO-2022-JP)"_ustr;
case RTL_TEXTENCODING_SHIFT_JIS:
- return "Japanese (Shift-JIS)";
+ return u"Japanese (Shift-JIS)"_ustr;
case RTL_TEXTENCODING_MS_932:
- return "Japanese (Windows-932)";
+ return u"Japanese (Windows-932)"_ustr;
case RTL_TEXTENCODING_SYMBOL:
- return "Symbol";
+ return u"Symbol"_ustr;
case RTL_TEXTENCODING_APPLE_THAI:
- return "Thai (Apple Macintosh)";
+ return u"Thai (Apple Macintosh)"_ustr;
case RTL_TEXTENCODING_MS_874:
- return "Thai (Dos/Windows-874)";
+ return u"Thai (Dos/Windows-874)"_ustr;
case RTL_TEXTENCODING_TIS_620:
- return "Thai (TIS 620)";
+ return u"Thai (TIS 620)"_ustr;
case RTL_TEXTENCODING_APPLE_TURKISH:
- return "Turkish (Apple Macintosh)";
+ return u"Turkish (Apple Macintosh)"_ustr;
case RTL_TEXTENCODING_IBM_857:
- return "Turkish (DOS/OS2-857)";
+ return u"Turkish (DOS/OS2-857)"_ustr;
case RTL_TEXTENCODING_ISO_8859_9:
- return "Turkish (ISO-8859-9)";
+ return u"Turkish (ISO-8859-9)"_ustr;
case RTL_TEXTENCODING_MS_1254:
- return "Turkish (Windows-1254)";
+ return u"Turkish (Windows-1254)"_ustr;
case RTL_TEXTENCODING_UTF7:
- return "Unicode (UTF-7)";
+ return u"Unicode (UTF-7)"_ustr;
case RTL_TEXTENCODING_UTF8:
- return "Unicode (UTF-8)";
+ return u"Unicode (UTF-8)"_ustr;
case RTL_TEXTENCODING_JAVA_UTF8:
- return "Unicode (Java's modified UTF-8)";
+ return u"Unicode (Java's modified UTF-8)"_ustr;
case RTL_TEXTENCODING_MS_1258:
- return "Vietnamese (Windows-1258)";
+ return u"Vietnamese (Windows-1258)"_ustr;
case RTL_TEXTENCODING_APPLE_ROMAN:
- return "Western (Apple Macintosh)";
+ return u"Western (Apple Macintosh)"_ustr;
case RTL_TEXTENCODING_APPLE_ICELAND:
- return "Western (Apple Macintosh/Icelandic)";
+ return u"Western (Apple Macintosh/Icelandic)"_ustr;
case RTL_TEXTENCODING_ASCII_US:
- return "Western (ASCII/US)";
+ return u"Western (ASCII/US)"_ustr;
case RTL_TEXTENCODING_IBM_437:
- return "Western (DOS/OS2-437/US)";
+ return u"Western (DOS/OS2-437/US)"_ustr;
case RTL_TEXTENCODING_IBM_850:
- return "Western (DOS/OS2-850/International)";
+ return u"Western (DOS/OS2-850/International)"_ustr;
case RTL_TEXTENCODING_IBM_860:
- return "Western (DOS/OS2-860/Portuguese)";
+ return u"Western (DOS/OS2-860/Portuguese)"_ustr;
case RTL_TEXTENCODING_IBM_861:
- return "Western (DOS/OS2-861/Icelandic)";
+ return u"Western (DOS/OS2-861/Icelandic)"_ustr;
case RTL_TEXTENCODING_IBM_863:
- return "Western (DOS/OS2-863/Canadian-French)";
+ return u"Western (DOS/OS2-863/Canadian-French)"_ustr;
case RTL_TEXTENCODING_IBM_865:
- return "Western (DOS/OS2-865/Nordic)";
+ return u"Western (DOS/OS2-865/Nordic)"_ustr;
case RTL_TEXTENCODING_ISO_8859_1:
- return "Western (ISO-8859-1)";
+ return u"Western (ISO-8859-1)"_ustr;
case RTL_TEXTENCODING_ISO_8859_14:
- return "Western (ISO-8859-14)";
+ return u"Western (ISO-8859-14)"_ustr;
case RTL_TEXTENCODING_ISO_8859_15:
- return "Western (ISO-8859-15/EURO)";
+ return u"Western (ISO-8859-15/EURO)"_ustr;
case RTL_TEXTENCODING_MS_1252:
- return "Western (Window-1252/WinLatin 1)";
+ return u"Western (Window-1252/WinLatin 1)"_ustr;
case RTL_TEXTENCODING_UCS4:
- return "UCS4";
+ return u"UCS4"_ustr;
case RTL_TEXTENCODING_UCS2:
- return "UCS2 (aka Unicode)";
+ return u"UCS2 (aka Unicode)"_ustr;
default:
{
@@ -516,7 +516,7 @@ void ListFonts::Init()
xServiceManager.set(xContext->getServiceManager(), css::uno::UNO_QUERY);
if (!xServiceManager.is())
- Application::Abort("Bootstrap failure - no service manager");
+ Application::Abort(u"Bootstrap failure - no service manager"_ustr);
comphelper::setProcessServiceFactory(xServiceManager);
diff --git a/vcl/workben/listglyphs.cxx b/vcl/workben/listglyphs.cxx
index 341006d433dd..f9dac2f4a97e 100644
--- a/vcl/workben/listglyphs.cxx
+++ b/vcl/workben/listglyphs.cxx
@@ -202,7 +202,7 @@ void ListGlyphs::Init()
xServiceManager.set(xContext->getServiceManager(), css::uno::UNO_QUERY);
if (!xServiceManager.is())
- Application::Abort("Bootstrap failure - no service manager");
+ Application::Abort(u"Bootstrap failure - no service manager"_ustr);
comphelper::setProcessServiceFactory(xServiceManager);
diff --git a/vcl/workben/mtfdemo.cxx b/vcl/workben/mtfdemo.cxx
index 8cc9363a04de..4475815194c4 100644
--- a/vcl/workben/mtfdemo.cxx
+++ b/vcl/workben/mtfdemo.cxx
@@ -104,7 +104,7 @@ public:
try
{
mpWin = VclPtr<DemoMtfWin>::Create(maFileName);
- mpWin->SetText("Display metafile");
+ mpWin->SetText(u"Display metafile"_ustr);
mpWin->Show();
@@ -179,7 +179,7 @@ private:
= ::cppu::defaultBootstrap_InitialComponentContext();
xMSF.set(xComponentContext->getServiceManager(), uno::UNO_QUERY);
if(!xMSF.is())
- Application::Abort("Bootstrap failure - no service manager");
+ Application::Abort(u"Bootstrap failure - no service manager"_ustr);
::comphelper::setProcessServiceFactory(xMSF);
@@ -198,18 +198,18 @@ private:
}
OUString sAbsoluteDumpUrl, sDumpUrl;
- rc = osl::FileBase::getFileURLFromSystemPath("metadump.xml", sDumpUrl);
+ rc = osl::FileBase::getFileURLFromSystemPath(u"metadump.xml"_ustr, sDumpUrl);
if (rc == osl::FileBase::E_None)
{
rc = osl::FileBase::getAbsoluteFileURL(sWorkingDir, sDumpUrl, sAbsoluteDumpUrl);
if (rc != osl::FileBase::E_None)
{
- throw css::uno::RuntimeException("Can not make absolute: metadump.xml");
+ throw css::uno::RuntimeException(u"Can not make absolute: metadump.xml"_ustr);
}
}
else
{
- throw css::uno::RuntimeException("Can not get file url from system path: metadump.xml");
+ throw css::uno::RuntimeException(u"Can not get file url from system path: metadump.xml"_ustr);
}
aMtf.dumpAsXml(rtl::OUStringToOString(sAbsoluteDumpUrl, RTL_TEXTENCODING_UTF8).getStr());
diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx
index 5c7cbb12ad89..af216ee1155f 100644
--- a/vcl/workben/svdem.cxx
+++ b/vcl/workben/svdem.cxx
@@ -51,7 +51,7 @@ SAL_IMPLEMENT_MAIN()
Reference< XMultiServiceFactory > xServiceManager( xContext->getServiceManager(), UNO_QUERY );
if( !xServiceManager.is() )
- Application::Abort( "Failed to bootstrap" );
+ Application::Abort( u"Failed to bootstrap"_ustr );
comphelper::setProcessServiceFactory( xServiceManager );
@@ -91,7 +91,7 @@ public:
void Main()
{
ScopedVclPtrInstance< MyWin > aMainWin( nullptr, WB_APP | WB_STDWORK );
- aMainWin->SetText("VCL - Workbench");
+ aMainWin->SetText(u"VCL - Workbench"_ustr);
aMainWin->Show();
Application::Execute();
diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx
index 18d1f1aaad0a..ec9623ab0d1c 100644
--- a/vcl/workben/svpclient.cxx
+++ b/vcl/workben/svpclient.cxx
@@ -70,7 +70,7 @@ SAL_IMPLEMENT_MAIN()
Reference< XMultiServiceFactory > xServiceManager( xContext->getServiceManager(), UNO_QUERY );
if( !xServiceManager.is() )
- Application::Abort( "Failed to bootstrap" );
+ Application::Abort( u"Failed to bootstrap"_ustr );
comphelper::setProcessServiceFactory( xServiceManager );
@@ -120,7 +120,7 @@ public:
void Main()
{
ScopedVclPtrInstance< MyWin > aMainWin( nullptr, WB_STDWORK );
- aMainWin->SetText( "SvpClient" );
+ aMainWin->SetText( u"SvpClient"_ustr );
aMainWin->Show();
Application::Execute();
@@ -134,7 +134,7 @@ MyWin::MyWin( vcl::Window* pParent, WinBits nWinStyle ) :
m_aQuitButton(VclPtr<PushButton>::Create(this, 0))
{
m_aListButton->SetPosSizePixel( Point( 10, 10 ), Size( 120, 25 ) );
- m_aListButton->SetText( "List Elements" );
+ m_aListButton->SetText( u"List Elements"_ustr );
m_aListButton->SetClickHdl( LINK( this, MyWin, ListHdl ) );
m_aListButton->Show();
@@ -146,7 +146,7 @@ MyWin::MyWin( vcl::Window* pParent, WinBits nWinStyle ) :
m_aImage->Show();
m_aQuitButton->SetPosSizePixel( Point( 10, 300 ), Size( 120,25 ) );
- m_aQuitButton->SetText( "Quit SVP server" );
+ m_aQuitButton->SetText( u"Quit SVP server"_ustr );
m_aQuitButton->SetClickHdl( LINK( this, MyWin, QuitHdl ) );
m_aQuitButton->Show();
}
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index 1ecc03835fd8..1c6f9a9c3361 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -61,7 +61,7 @@ SAL_IMPLEMENT_MAIN()
Reference< XMultiServiceFactory > xServiceManager( xContext->getServiceManager(), UNO_QUERY );
if( !xServiceManager.is() )
- Application::Abort( "Failed to bootstrap" );
+ Application::Abort( u"Failed to bootstrap"_ustr );
comphelper::setProcessServiceFactory( xServiceManager );
@@ -99,7 +99,7 @@ public:
void Main()
{
ScopedVclPtrInstance< MyWin > aMainWin( nullptr, WB_APP | WB_STDWORK );
- aMainWin->SetText( "VCL - Workbench" );
+ aMainWin->SetText( u"VCL - Workbench"_ustr );
aMainWin->Show();
Application::Execute();
@@ -244,7 +244,7 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rR
rRenderContext.DrawText(tools::Rectangle(Point((aPaperSize.Width() - 4000) / 2, 2000),
Size(aPaperSize.Width() - 2100, aPaperSize.Height() - 4000)),
- "SVP test program",
+ u"SVP test program"_ustr,
DrawTextFlags::MultiLine);
}
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 16d28360f92e..8fd54dfb4560 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -143,7 +143,7 @@ public:
#endif
{
if (!Application::LoadBrandBitmap(u"intro", maIntro))
- Application::Abort("Failed to load intro image");
+ Application::Abort(u"Failed to load intro image"_ustr);
maIntroBW = maIntro.GetBitmap();
@@ -554,7 +554,7 @@ public:
for (size_t i = 0; i < std::size(aRuns); ++i)
{
// Legend
- vcl::Font aIndexFont("sans", Size(0,20));
+ vcl::Font aIndexFont(u"sans"_ustr, Size(0,20));
aIndexFont.SetColor( COL_BLACK);
tools::Rectangle aTextRect;
rDev.SetFont(aIndexFont);
@@ -764,11 +764,11 @@ public:
{
auto aRegions = partition(rCtx, 2, 2);
doInvert(rDev, aRegions[0], InvertFlags::NONE);
- rDev.DrawText(aRegions[0], "InvertFlags::NONE");
+ rDev.DrawText(aRegions[0], u"InvertFlags::NONE"_ustr);
doInvert(rDev, aRegions[1], InvertFlags::N50);
- rDev.DrawText(aRegions[1], "InvertFlags::N50");
+ rDev.DrawText(aRegions[1], u"InvertFlags::N50"_ustr);
doInvert(rDev, aRegions[3], InvertFlags::TrackFrame);
- rDev.DrawText(aRegions[3], "InvertFlags::TrackFrame");
+ rDev.DrawText(aRegions[3], u"InvertFlags::TrackFrame"_ustr);
}
}
};
@@ -851,7 +851,7 @@ public:
// be done with a shader / gradient
static void SimulateBorderStretch(OutputDevice &rDev, const tools::Rectangle& r)
{
- BitmapEx aPageShadowMask("sw/res/page-shadow-mask.png");
+ BitmapEx aPageShadowMask(u"sw/res/page-shadow-mask.png"_ustr);
BitmapEx aRight(aPageShadowMask);
sal_Int32 nSlice = (aPageShadowMask.GetSizePixel().Width() - 3) / 4;
@@ -1773,7 +1773,7 @@ public:
else
{ // spawn another window
VclPtrInstance<DemoWin> pNewWin(mrRenderer, testThreads);
- pNewWin->SetText("Another interactive VCL demo window");
+ pNewWin->SetText(u"Another interactive VCL demo window"_ustr);
pNewWin->Show();
}
}
@@ -1911,9 +1911,9 @@ public:
mpToolbox(VclPtrInstance<ToolBox>(mpBox.get())),
mpButton(VclPtrInstance<PushButton>(mpBox.get()))
{
- SetText("VCL widget demo");
+ SetText(u"VCL widget demo"_ustr);
- Wallpaper aWallpaper(BitmapEx("sfx2/res/128x128_writer_doc-p.png"));
+ Wallpaper aWallpaper(BitmapEx(u"sfx2/res/128x128_writer_doc-p.png"_ustr));
aWallpaper.SetStyle(WallpaperStyle::BottomRight);
aWallpaper.SetColor(COL_RED);
@@ -1921,13 +1921,13 @@ public:
mpBox->Show();
Help::EnableBalloonHelp();
- mpToolbox->SetHelpText("Help text");
- mpToolbox->InsertItem(ToolBoxItemId(0), "Toolbar item", OUString());
- mpToolbox->SetQuickHelpText(ToolBoxItemId(0), "This is a tooltip popup");
+ mpToolbox->SetHelpText(u"Help text"_ustr);
+ mpToolbox->InsertItem(ToolBoxItemId(0), u"Toolbar item"_ustr, OUString());
+ mpToolbox->SetQuickHelpText(ToolBoxItemId(0), u"This is a tooltip popup"_ustr);
mpToolbox->InsertSeparator();
mpToolbox->Show();
- mpButton->SetText("Click me; go on");
+ mpButton->SetText(u"Click me; go on"_ustr);
mpButton->Show();
int i = 0;
@@ -1950,9 +1950,9 @@ public:
}
mpBar = VclPtr<MenuBar>::Create();
- mpBar->InsertItem(0,"File");
+ mpBar->InsertItem(0,u"File"_ustr);
VclPtrInstance<PopupMenu> pPopup;
- pPopup->InsertItem(0,"Item");
+ pPopup->InsertItem(0,u"Item"_ustr);
mpBar->SetPopupMenu(0, pPopup);
SetMenuBar(mpBar);
@@ -2038,7 +2038,7 @@ class DemoPopup : public FloatingWindow
SetTextColor(COL_BLACK);
SetTextAlign(ALIGN_TOP);
- rRenderContext.DrawText(aTextRect, "This is a standalone help text test",
+ rRenderContext.DrawText(aTextRect, u"This is a standalone help text test"_ustr,
DrawTextFlags::MultiLine|DrawTextFlags::WordBreak|
DrawTextFlags::Left|DrawTextFlags::Top);
@@ -2194,7 +2194,7 @@ public:
VclPtr<DemoWidgets> xWidgets;
VclPtr<DemoPopup> xPopup;
- aMainWin->SetText("Interactive VCL demo #1");
+ aMainWin->SetText(u"Interactive VCL demo #1"_ustr);
if (bWidgets)
xWidgets = VclPtr< DemoWidgets >::Create ();
else if (bPopup)
@@ -2234,7 +2234,7 @@ protected:
uno::Reference<lang::XMultiServiceFactory> xMSF;
xMSF.set(xComponentContext->getServiceManager(), uno::UNO_QUERY);
if(!xMSF.is())
- Application::Abort("Bootstrap failure - no service manager");
+ Application::Abort(u"Bootstrap failure - no service manager"_ustr);
::comphelper::setProcessServiceFactory(xMSF);
}