summaryrefslogtreecommitdiff
path: root/test/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-28 17:56:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-29 16:42:33 +0100
commit042033f1e6da22616cb76c8d950c20c9efecbad5 (patch)
tree26b3f1f42d067506f44550b410f3fb9640616a5b /test/source
parentccfd8e9d09f9ac0a0ea92d0f378391006faaf934 (diff)
loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'test/source')
-rw-r--r--test/source/bootstrapfixture.cxx8
-rw-r--r--test/source/helper/form.cxx11
-rw-r--r--test/source/helper/shape.cxx16
-rw-r--r--test/source/screenshot_test.cxx2
-rw-r--r--test/source/unoapi_test.cxx2
-rw-r--r--test/source/view/xcontrolaccess.cxx2
-rw-r--r--test/source/xmltesttools.cxx2
7 files changed, 22 insertions, 21 deletions
diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx
index c04729376b1e..5116ac32115a 100644
--- a/test/source/bootstrapfixture.cxx
+++ b/test/source/bootstrapfixture.cxx
@@ -174,13 +174,13 @@ void test::BootstrapFixture::validate(const OUString& rPath, test::ValidationFor
// invoke without -e so that we know when something new is written
// in loext namespace that isn't yet in the custom schema
aValidator += " -M "
- + m_directories.getPathFromSrc("/schema/libreoffice/OpenDocument-manifest-schema-v1.3+libreoffice.rng")
+ + m_directories.getPathFromSrc(u"/schema/libreoffice/OpenDocument-manifest-schema-v1.3+libreoffice.rng")
+ " -D "
- + m_directories.getPathFromSrc("/schema/libreoffice/OpenDocument-dsig-schema-v1.3+libreoffice.rng")
+ + m_directories.getPathFromSrc(u"/schema/libreoffice/OpenDocument-dsig-schema-v1.3+libreoffice.rng")
+ " -O "
- + m_directories.getPathFromSrc("/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng")
+ + m_directories.getPathFromSrc(u"/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng")
+ " -m "
- + m_directories.getPathFromSrc("/schema/mathml2/mathml2.xsd");
+ + m_directories.getPathFromSrc(u"/schema/mathml2/mathml2.xsd");
}
utl::TempFile aOutput;
diff --git a/test/source/helper/form.cxx b/test/source/helper/form.cxx
index 77e6b163524c..c610070a1372 100644
--- a/test/source/helper/form.cxx
+++ b/test/source/helper/form.cxx
@@ -29,11 +29,11 @@ uno::Reference<drawing::XControlShape>
const sal_Int32 nX, const sal_Int32 nY,
const sal_Int32 nHeight, const sal_Int32 nWidth)
{
- return createControlShape(r_xComponent, "CommandButton", nX, nY, nHeight, nWidth);
+ return createControlShape(r_xComponent, u"CommandButton", nX, nY, nHeight, nWidth);
}
uno::Reference<drawing::XControlShape> OOO_DLLPUBLIC_TEST createControlShape(
- const uno::Reference<lang::XComponent>& r_xComponent, const OUString& r_aKind,
+ const uno::Reference<lang::XComponent>& r_xComponent, std::u16string_view r_aKind,
const sal_Int32 nX, const sal_Int32 nY, const sal_Int32 nHeight, const sal_Int32 nWidth)
{
uno::Reference<lang::XMultiServiceFactory> xMSF(r_xComponent, uno::UNO_QUERY_THROW);
@@ -42,10 +42,11 @@ uno::Reference<drawing::XControlShape> OOO_DLLPUBLIC_TEST createControlShape(
xMSF->createInstance("com.sun.star.drawing.ControlShape"), uno::UNO_QUERY_THROW);
uno::Reference<uno::XInterface> aComponent(
- xMSF->createInstance("com.sun.star.form.component." + r_aKind), uno::UNO_SET_THROW);
+ xMSF->createInstance(OUString::Concat("com.sun.star.form.component.") + r_aKind),
+ uno::UNO_SET_THROW);
uno::Reference<beans::XPropertySet> xPropertySet(aComponent, uno::UNO_QUERY_THROW);
- xPropertySet->setPropertyValue("DefaultControl",
- uno::makeAny("com.sun.star.form.control." + r_aKind));
+ xPropertySet->setPropertyValue(
+ "DefaultControl", uno::makeAny(OUString::Concat("com.sun.star.form.control.") + r_aKind));
uno::Reference<awt::XControlModel> xControlModel(aComponent, uno::UNO_QUERY_THROW);
xControlShape->setSize(awt::Size(nHeight, nWidth));
diff --git a/test/source/helper/shape.cxx b/test/source/helper/shape.cxx
index 4fafcc0c7e48..0fbc3bc6d3a3 100644
--- a/test/source/helper/shape.cxx
+++ b/test/source/helper/shape.cxx
@@ -26,7 +26,7 @@ uno::Reference<drawing::XShape>
const sal_Int32 nX, const sal_Int32 nY, const sal_Int32 nWidth,
const sal_Int32 nHeight)
{
- return createShape(r_xComponent, "Ellipse", nX, nY, nWidth, nHeight);
+ return createShape(r_xComponent, u"Ellipse", nX, nY, nWidth, nHeight);
}
uno::Reference<drawing::XShape>
@@ -34,7 +34,7 @@ uno::Reference<drawing::XShape>
const sal_Int32 nX, const sal_Int32 nY, const sal_Int32 nWidth,
const sal_Int32 nHeight)
{
- return createShape(r_xComponent, "Line", nX, nY, nWidth, nHeight);
+ return createShape(r_xComponent, u"Line", nX, nY, nWidth, nHeight);
}
uno::Reference<drawing::XShape>
@@ -42,17 +42,17 @@ uno::Reference<drawing::XShape>
const sal_Int32 nX, const sal_Int32 nY,
const sal_Int32 nWidth, const sal_Int32 nHeight)
{
- return createShape(r_xComponent, "Rectangle", nX, nY, nWidth, nHeight);
+ return createShape(r_xComponent, u"Rectangle", nX, nY, nWidth, nHeight);
}
-uno::Reference<drawing::XShape>
- OOO_DLLPUBLIC_TEST createShape(const uno::Reference<lang::XComponent>& r_xComponent,
- const OUString& r_aKind, const sal_Int32 nX, const sal_Int32 nY,
- const sal_Int32 nWidth, const sal_Int32 nHeight)
+uno::Reference<drawing::XShape> OOO_DLLPUBLIC_TEST
+createShape(const uno::Reference<lang::XComponent>& r_xComponent, std::u16string_view r_aKind,
+ const sal_Int32 nX, const sal_Int32 nY, const sal_Int32 nWidth, const sal_Int32 nHeight)
{
uno::Reference<lang::XMultiServiceFactory> xMSF(r_xComponent, uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape(
- xMSF->createInstance("com.sun.star.drawing." + r_aKind + "Shape"), uno::UNO_QUERY_THROW);
+ xMSF->createInstance(OUString::Concat("com.sun.star.drawing.") + r_aKind + "Shape"),
+ uno::UNO_QUERY_THROW);
try
{
diff --git a/test/source/screenshot_test.cxx b/test/source/screenshot_test.cxx
index a99b01d37c2f..a79d53a0d87a 100644
--- a/test/source/screenshot_test.cxx
+++ b/test/source/screenshot_test.cxx
@@ -242,7 +242,7 @@ void ScreenshotTest::processAllKnownDialogs()
}
}
-void ScreenshotTest::processDialogBatchFile(const OUString& rFile)
+void ScreenshotTest::processDialogBatchFile(std::u16string_view rFile)
{
test::Directories aDirectories;
const OUString aURL(aDirectories.getURLFromSrc(rFile));
diff --git a/test/source/unoapi_test.cxx b/test/source/unoapi_test.cxx
index 6147609f3f42..50d0ff562fc9 100644
--- a/test/source/unoapi_test.cxx
+++ b/test/source/unoapi_test.cxx
@@ -30,7 +30,7 @@ void UnoApiTest::setUp()
CPPUNIT_ASSERT_MESSAGE("no desktop!", mxDesktop.is());
}
-void UnoApiTest::createFileURL(const OUString& aFileBase, OUString& rFilePath)
+void UnoApiTest::createFileURL(std::u16string_view aFileBase, OUString& rFilePath)
{
rFilePath = m_directories.getSrcRootURL() + m_aBaseString + "/" + aFileBase;
}
diff --git a/test/source/view/xcontrolaccess.cxx b/test/source/view/xcontrolaccess.cxx
index 1e7583f2b137..43a98c9c868c 100644
--- a/test/source/view/xcontrolaccess.cxx
+++ b/test/source/view/xcontrolaccess.cxx
@@ -39,7 +39,7 @@ void XControlAccess::testGetControl()
uno::Reference<drawing::XShapes> xShapes(xDP, uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape(
- helper::form::createControlShape(xComponent, "CommandButton", 10000, 50000, 100, 100),
+ helper::form::createControlShape(xComponent, u"CommandButton", 10000, 50000, 100, 100),
uno::UNO_QUERY_THROW);
xShapes->add(xShape);
diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx
index c1d03cd41fe7..16226a2e8845 100644
--- a/test/source/xmltesttools.cxx
+++ b/test/source/xmltesttools.cxx
@@ -251,7 +251,7 @@ void XmlTestTools::assertXPathNoAttribute(const xmlDocUniquePtr& pXmlDoc, const
xmlXPathFreeObject(pXmlObj);
}
-int XmlTestTools::getXPathPosition(const xmlDocUniquePtr& pXmlDoc, const OString& rXPath, const OString& rChildName)
+int XmlTestTools::getXPathPosition(const xmlDocUniquePtr& pXmlDoc, const OString& rXPath, std::string_view rChildName)
{
xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, rXPath);
xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;