summaryrefslogtreecommitdiff
path: root/oox/qa
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 /oox/qa
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 'oox/qa')
-rw-r--r--oox/qa/unit/shape.cxx12
-rw-r--r--oox/qa/unit/vba_compression.cxx28
-rw-r--r--oox/qa/unit/vml.cxx14
3 files changed, 31 insertions, 23 deletions
diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx
index 24ec173ce9d5..6c88ba4ea21e 100644
--- a/oox/qa/unit/shape.cxx
+++ b/oox/qa/unit/shape.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
@@ -30,7 +34,7 @@ public:
void setUp() override;
void tearDown() override;
uno::Reference<lang::XComponent>& getComponent() { return mxComponent; }
- void load(const OUString& rURL);
+ void load(std::u16string_view rURL);
};
void OoxShapeTest::setUp()
@@ -48,7 +52,7 @@ void OoxShapeTest::tearDown()
test::BootstrapFixture::tearDown();
}
-void OoxShapeTest::load(const OUString& rFileName)
+void OoxShapeTest::load(std::u16string_view rFileName)
{
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + rFileName;
mxComponent = loadFromDesktop(aURL);
@@ -56,7 +60,7 @@ void OoxShapeTest::load(const OUString& rFileName)
CPPUNIT_TEST_FIXTURE(OoxShapeTest, testMultipleGroupShapes)
{
- load("multiple-group-shapes.docx");
+ load(u"multiple-group-shapes.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -70,7 +74,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testMultipleGroupShapes)
CPPUNIT_TEST_FIXTURE(OoxShapeTest, testCustomshapePosition)
{
- load("customshape-position.docx");
+ load(u"customshape-position.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
diff --git a/oox/qa/unit/vba_compression.cxx b/oox/qa/unit/vba_compression.cxx
index bfe241c5995c..906e30bfc688 100644
--- a/oox/qa/unit/vba_compression.cxx
+++ b/oox/qa/unit/vba_compression.cxx
@@ -95,8 +95,8 @@ void ReadFiles(const OUString& rTestFile, const OUString& rReference,
void TestVbaCompression::testSimple1()
{
- OUString aTestFile = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/simple1.bin");
- OUString aReference = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/reference/simple1.bin");
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/simple1.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/simple1.bin");
SvMemoryStream aOutputMemoryStream(4096, 4096);
SvMemoryStream aReferenceMemoryStream(4096, 4096);
@@ -118,8 +118,8 @@ void TestVbaCompression::testSimple1()
void TestVbaCompression::testSimple2()
{
- OUString aTestFile = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/simple2.bin");
- OUString aReference = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/reference/simple2.bin");
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/simple2.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/simple2.bin");
SvMemoryStream aOutputMemoryStream(4096, 4096);
SvMemoryStream aReferenceMemoryStream(4096, 4096);
@@ -140,8 +140,8 @@ void TestVbaCompression::testSimple2()
void TestVbaCompression::testSimple3()
{
- OUString aTestFile = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/simple3.bin");
- OUString aReference = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/reference/simple3.bin");
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/simple3.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/simple3.bin");
SvMemoryStream aOutputMemoryStream(4096, 4096);
SvMemoryStream aReferenceMemoryStream(4096, 4096);
@@ -162,8 +162,8 @@ void TestVbaCompression::testSimple3()
void TestVbaCompression::testComplex1()
{
- OUString aTestFile = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/complex1.bin");
- OUString aReference = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/reference/complex1.bin");
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/complex1.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/complex1.bin");
SvMemoryStream aOutputMemoryStream(4096, 4096);
SvMemoryStream aReferenceMemoryStream(4096, 4096);
@@ -184,8 +184,8 @@ void TestVbaCompression::testComplex1()
void TestVbaCompression::testSpec321()
{
- OUString aTestFile = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/spec321.bin");
- OUString aReference = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/reference/spec321.bin");
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/spec321.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/spec321.bin");
SvMemoryStream aOutputMemoryStream(4096, 4096);
SvMemoryStream aReferenceMemoryStream(4096, 4096);
@@ -206,8 +206,8 @@ void TestVbaCompression::testSpec321()
void TestVbaCompression::testSpec322()
{
- OUString aTestFile = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/spec322.bin");
- OUString aReference = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/reference/spec322.bin");
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/spec322.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/spec322.bin");
SvMemoryStream aOutputMemoryStream(4096, 4096);
SvMemoryStream aReferenceMemoryStream(4096, 4096);
@@ -228,8 +228,8 @@ void TestVbaCompression::testSpec322()
void TestVbaCompression::testSpec323()
{
- OUString aTestFile = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/spec323.bin");
- OUString aReference = m_directories.getPathFromSrc("/oox/qa/unit/data/vba/reference/spec323.bin");
+ OUString aTestFile = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/spec323.bin");
+ OUString aReference = m_directories.getPathFromSrc(u"/oox/qa/unit/data/vba/reference/spec323.bin");
SvMemoryStream aOutputMemoryStream(4096, 4096);
SvMemoryStream aReferenceMemoryStream(4096, 4096);
diff --git a/oox/qa/unit/vml.cxx b/oox/qa/unit/vml.cxx
index d6e79a3da956..ca656a08276c 100644
--- a/oox/qa/unit/vml.cxx
+++ b/oox/qa/unit/vml.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
@@ -31,7 +35,7 @@ public:
void setUp() override;
void tearDown() override;
uno::Reference<lang::XComponent>& getComponent() { return mxComponent; }
- void load(const OUString& rURL);
+ void load(std::u16string_view rURL);
};
void OoxVmlTest::setUp()
@@ -49,7 +53,7 @@ void OoxVmlTest::tearDown()
test::BootstrapFixture::tearDown();
}
-void OoxVmlTest::load(const OUString& rFileName)
+void OoxVmlTest::load(std::u16string_view rFileName)
{
OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + rFileName;
mxComponent = loadFromDesktop(aURL);
@@ -59,7 +63,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testSpt202ShapeType)
{
// Load a document with a groupshape, 2nd child is a <v:shape>, its type has o:spt set to 202
// (TextBox).
- load("group-spt202.docx");
+ load(u"group-spt202.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
@@ -79,7 +83,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testShapeNonAutosizeWithText)
// Load a document which has a group shape, containing a single child.
// 17.78 cm is the full group shape width, 19431/64008 is the child shape's relative width inside
// that, so 5.3975 cm should be the shape width.
- load("shape-non-autosize-with-text.docx");
+ load(u"shape-non-autosize-with-text.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
@@ -94,7 +98,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testShapeNonAutosizeWithText)
CPPUNIT_TEST_FIXTURE(OoxVmlTest, testGraphicStroke)
{
- load("graphic-stroke.pptx");
+ load(u"graphic-stroke.pptx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);