diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/export-tests-ooxml1.cxx | 7 | ||||
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 19 | ||||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 2 | ||||
-rw-r--r-- | sd/qa/unit/sdmodeltestbase.hxx | 4 | ||||
-rw-r--r-- | sd/source/filter/html/htmlex.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/html/htmlex.hxx | 3 |
6 files changed, 25 insertions, 12 deletions
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index 75222f267a58..ca100c003967 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -6,6 +6,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include <sal/config.h> + +#include <string_view> + #include <officecfg/Office/Common.hxx> #include "sdmodeltestbase.hxx" #include <Outliner.hxx> @@ -537,7 +542,7 @@ void SdOOXMLExportTest1::testTableCellFillProperties() uno::Reference< lang::XComponent > xComponent = xDocShRef->GetModel(); uno::Reference<frame::XStorable> xStorable(xComponent, uno::UNO_QUERY); utl::MediaDescriptor aMediaDescriptor; - aMediaDescriptor["FilterName"] <<= OStringToOUString(OString(aFileFormats[PPTX].pFilterName), RTL_TEXTENCODING_UTF8); + aMediaDescriptor["FilterName"] <<= OStringToOUString(std::string_view(aFileFormats[PPTX].pFilterName), RTL_TEXTENCODING_UTF8); utl::TempFile aTempFile; aTempFile.EnableKillingFile(); diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 69eb33240764..39700d4ab7cf 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -6,6 +6,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include <sal/config.h> + +#include <string_view> + #include <officecfg/Office/Common.hxx> #include "sdmodeltestbase.hxx" #include <sdpage.hxx> @@ -416,7 +421,7 @@ void SdExportTest::testSwappedOutImageExport() uno::Reference< lang::XComponent > xComponent = xDocShRef->GetModel(); uno::Reference<frame::XStorable> xStorable(xComponent, uno::UNO_QUERY); utl::MediaDescriptor aMediaDescriptor; - aMediaDescriptor["FilterName"] <<= OStringToOUString(OString(aFileFormats[vFormats[nExportFormat]].pFilterName), RTL_TEXTENCODING_UTF8); + aMediaDescriptor["FilterName"] <<= OStringToOUString(std::string_view(aFileFormats[vFormats[nExportFormat]].pFilterName), RTL_TEXTENCODING_UTF8); utl::TempFile aTempFile; aTempFile.EnableKillingFile(); @@ -472,7 +477,7 @@ void SdExportTest::testOOoXMLAnimations() uno::Reference<lang::XComponent> xComponent = xDocShRef->GetModel(); uno::Reference<frame::XStorable> xStorable(xComponent, uno::UNO_QUERY); utl::MediaDescriptor aMediaDescriptor; - aMediaDescriptor["FilterName"] <<= OStringToOUString(OString(getFormat(ODP)->pFilterName), RTL_TEXTENCODING_UTF8); + aMediaDescriptor["FilterName"] <<= OStringToOUString(std::string_view(getFormat(ODP)->pFilterName), RTL_TEXTENCODING_UTF8); utl::TempFile aTempFile; aTempFile.EnableKillingFile(); xStorable->storeToURL(aTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList()); @@ -548,7 +553,7 @@ void SdExportTest::testUnknownAttributes() uno::Reference<lang::XComponent> xComponent = xDocShRef->GetModel(); uno::Reference<frame::XStorable> xStorable(xComponent, uno::UNO_QUERY); utl::MediaDescriptor aMediaDescriptor; - aMediaDescriptor["FilterName"] <<= OStringToOUString(OString(getFormat(ODP)->pFilterName), RTL_TEXTENCODING_UTF8); + aMediaDescriptor["FilterName"] <<= OStringToOUString(std::string_view(getFormat(ODP)->pFilterName), RTL_TEXTENCODING_UTF8); utl::TempFile aTempFile; aTempFile.EnableKillingFile(); xStorable->storeToURL(aTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList()); @@ -601,7 +606,7 @@ void SdExportTest::testLinkedGraphicRT() uno::Reference< lang::XComponent > xComponent = xDocShRef->GetModel(); uno::Reference<frame::XStorable> xStorable(xComponent, uno::UNO_QUERY); utl::MediaDescriptor aMediaDescriptor; - aMediaDescriptor["FilterName"] <<= OStringToOUString(OString(aFileFormats[vFormats[nExportFormat]].pFilterName), RTL_TEXTENCODING_UTF8); + aMediaDescriptor["FilterName"] <<= OStringToOUString(std::string_view(aFileFormats[vFormats[nExportFormat]].pFilterName), RTL_TEXTENCODING_UTF8); // Check if the graphic has been imported correctly (before doing the export/import run) { @@ -713,7 +718,7 @@ void SdExportTest::testImageWithSpecialID() uno::Reference< lang::XComponent > xComponent = xDocShRef->GetModel(); uno::Reference<frame::XStorable> xStorable(xComponent, uno::UNO_QUERY); utl::MediaDescriptor aMediaDescriptor; - aMediaDescriptor["FilterName"] <<= OStringToOUString(OString(aFileFormats[vFormats[nExportFormat]].pFilterName), RTL_TEXTENCODING_UTF8); + aMediaDescriptor["FilterName"] <<= OStringToOUString(std::string_view(aFileFormats[vFormats[nExportFormat]].pFilterName), RTL_TEXTENCODING_UTF8); utl::TempFile aTempFile; aTempFile.EnableKillingFile(); @@ -1014,7 +1019,7 @@ void SdExportTest::testTdf115394PPT() uno::Reference< lang::XComponent > xComponent = xDocShRef->GetModel(); uno::Reference<frame::XStorable> xStorable(xComponent, uno::UNO_QUERY); utl::MediaDescriptor aMediaDescriptor; - aMediaDescriptor["FilterName"] <<= OStringToOUString(OString(aFileFormats[PPT].pFilterName), RTL_TEXTENCODING_UTF8); + aMediaDescriptor["FilterName"] <<= OStringToOUString(std::string_view(aFileFormats[PPT].pFilterName), RTL_TEXTENCODING_UTF8); utl::TempFile aTempFile; aTempFile.EnableKillingFile(); @@ -1053,7 +1058,7 @@ void SdExportTest::testBulletsAsImage() uno::Reference< lang::XComponent > xComponent = xDocShRef->GetModel(); uno::Reference<frame::XStorable> xStorable(xComponent, uno::UNO_QUERY); utl::MediaDescriptor aMediaDescriptor; - aMediaDescriptor["FilterName"] <<= OStringToOUString(OString(aFileFormats[nExportFormat].pFilterName), RTL_TEXTENCODING_UTF8); + aMediaDescriptor["FilterName"] <<= OStringToOUString(std::string_view(aFileFormats[nExportFormat].pFilterName), RTL_TEXTENCODING_UTF8); utl::TempFile aTempFile; aTempFile.EnableKillingFile(); diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 8906d780c4bf..12b340ccf3fa 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -415,7 +415,7 @@ void SdImportTest::testDocumentLayout() if( aFilesToCompare[i].nExportType >= 0 ) xDocShRef = saveAndReload( xDocShRef.get(), aFilesToCompare[i].nExportType ); compareWithShapesDump( xDocShRef, - m_directories.getPathFromSrc( "/sd/qa/unit/data/" ) + OUString::createFromAscii( aFilesToCompare[i].pDump ), + OUString(m_directories.getPathFromSrc( "/sd/qa/unit/data/" ) + OUString::createFromAscii( aFilesToCompare[i].pDump )), i == nUpdateMe ); } } diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx index de163fbc38ef..f2dd51b58b20 100644 --- a/sd/qa/unit/sdmodeltestbase.hxx +++ b/sd/qa/unit/sdmodeltestbase.hxx @@ -11,6 +11,8 @@ #define INCLUDED_SD_QA_UNIT_SDMODELTESTBASE_HXX #include <memory> +#include <string_view> + #include <test/bootstrapfixture.hxx> #include <test/xmldiff.hxx> #include <test/xmltesttools.hxx> @@ -305,7 +307,7 @@ protected: @param bCreate Instead of comparing to the reference file(s), create it/them. */ - void compareWithShapesDump( ::sd::DrawDocShellRef xDocShRef, const OUString &rShapesDumpFileNameBase, bool bCreate ) + void compareWithShapesDump( ::sd::DrawDocShellRef xDocShRef, std::u16string_view rShapesDumpFileNameBase, bool bCreate ) { CPPUNIT_ASSERT_MESSAGE( "failed to load", xDocShRef.is() ); CPPUNIT_ASSERT_MESSAGE( "not in destruction", !xDocShRef->IsInDestruction() ); diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 7b1efa7e14b5..bcd21c6e8074 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -1144,7 +1144,7 @@ bool HtmlExport::CreateHtmlTextForPresPages() /** exports the given html data into a non unicode file in the current export path with the given filename */ -bool HtmlExport::WriteHtml( const OUString& rFileName, bool bAddExtension, const OUString& rHtmlData ) +bool HtmlExport::WriteHtml( const OUString& rFileName, bool bAddExtension, std::u16string_view rHtmlData ) { ErrCode nErr = ERRCODE_NONE; diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx index 1622bc4a0e0c..2c07ab2358b8 100644 --- a/sd/source/filter/html/htmlex.hxx +++ b/sd/source/filter/html/htmlex.hxx @@ -29,6 +29,7 @@ #include "htmlpublishmode.hxx" #include <memory> +#include <string_view> #include <vector> namespace basegfx { class B2DPolyPolygon; } @@ -207,7 +208,7 @@ class HtmlExport final void ExportWebCast(); void ExportSingleDocument(); - bool WriteHtml( const OUString& rFileName, bool bAddExtension, const OUString& rHtmlData ); + bool WriteHtml( const OUString& rFileName, bool bAddExtension, std::u16string_view rHtmlData ); static OUString GetButtonName( int nButton ); void WriteOutlinerParagraph(OUStringBuffer& aStr, SdrOutliner* pOutliner, |