summaryrefslogtreecommitdiff
path: root/sd/qa/unit/export-tests.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-13 08:47:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-14 08:26:14 +0200
commit9b5dad13b56bdde7c40970351af3da3a2c3c9350 (patch)
treeabfd4b02743a0e6a93c51c026f4c53f0e21100bc /sd/qa/unit/export-tests.cxx
parentfa71320329999c968feb16ff65be328b5b8ff5e4 (diff)
loplugin:stringadd look for unnecessary temporaries
which defeat the *StringConcat optimisation. Also make StringConcat conversions treat a nullptr as an empty string, to match the O*String(char*) constructors. Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b Reviewed-on: https://gerrit.libreoffice.org/80724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/qa/unit/export-tests.cxx')
-rw-r--r--sd/qa/unit/export-tests.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index b8a17934d441..57fe771339f1 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -423,7 +423,7 @@ void SdExportTest::testSwappedOutImageExport()
{
// Load the original file with one image
::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/document_with_two_images.odp"), ODP);
- const OString sFailedMessage = OString("Failed on filter: ") + OString(aFileFormats[vFormats[nExportFormat]].pFilterName);
+ const OString sFailedMessage = OStringLiteral("Failed on filter: ") + aFileFormats[vFormats[nExportFormat]].pFilterName;
// Export the document and import again for a check
uno::Reference< lang::XComponent > xComponent = xDocShRef->GetModel();
@@ -642,7 +642,7 @@ void SdExportTest::testLinkedGraphicRT()
// Check whether graphic imported well after export
{
- const OString sFailedMessage = OString("Failed on filter: ") + OString(aFileFormats[vFormats[nExportFormat]].pFilterName);
+ const OString sFailedMessage = OStringLiteral("Failed on filter: ") + aFileFormats[vFormats[nExportFormat]].pFilterName;
SdDrawDocument *pDoc = xDocShRef->GetDoc();
CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pDoc != nullptr );
@@ -680,7 +680,7 @@ void SdExportTest::testImageWithSpecialID()
{
// Load the original file
::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/images_with_special_IDs.odp"), ODP);
- const OString sFailedMessage = OString("Failed on filter: ") + OString(aFileFormats[vFormats[nExportFormat]].pFilterName);
+ const OString sFailedMessage = OStringLiteral("Failed on filter: ") + aFileFormats[vFormats[nExportFormat]].pFilterName;
// Export the document and import again for a check
uno::Reference< lang::XComponent > xComponent = xDocShRef->GetModel();
@@ -986,7 +986,7 @@ void SdExportTest::testBulletsAsImage()
for (sal_Int32 nExportFormat : {ODP, PPTX, PPT})
{
::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odp/BulletsAsImage.odp"), ODP);
- const OString sFailedMessageBase = OString("Failed on filter '") + OString(aFileFormats[nExportFormat].pFilterName) + OString("': ");
+ const OString sFailedMessageBase = OStringLiteral("Failed on filter '") + aFileFormats[nExportFormat].pFilterName + "': ";
uno::Reference< lang::XComponent > xComponent = xDocShRef->GetModel();
uno::Reference<frame::XStorable> xStorable(xComponent, uno::UNO_QUERY);