diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/core/uwriter.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/wrthtml.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/html/wrthtml.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmlayoutpage.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/misc/glosdoc.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uno/unomailmerge.cxx | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index 3ba4abc9719a..ae59144b9be8 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -196,7 +196,7 @@ void SwDocTest::testFileNameFields() { //Here's a file name with some chars in it that will be %% encoded, when expanding //SwFileNameFields we want to restore the original readable filename - utl::TempFile aTempFile("demo [name]"); + utl::TempFile aTempFile(u"demo [name]"); aTempFile.EnableKillingFile(); INetURLObject aTempFileURL(aTempFile.GetURL()); diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index d1e5f64408fb..487fe7e36009 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -1547,7 +1547,7 @@ sal_uInt16 SwHTMLWriter::GetHTMLFontSize( sal_uInt32 nHeight ) const // Paragraphs with Table of Contents and other index styles will be typeset with // dot leaders at the position of the last tabulator in PrintLayout (CSS2) mode -sal_Int32 SwHTMLWriter::indexOfDotLeaders( sal_uInt16 nPoolId, const OUString& rStr ) +sal_Int32 SwHTMLWriter::indexOfDotLeaders( sal_uInt16 nPoolId, std::u16string_view rStr ) { if (m_bCfgPrintLayout && ((nPoolId >= RES_POOLCOLL_TOX_CNTNT1 && nPoolId <= RES_POOLCOLL_TOX_CNTNT5) || (nPoolId >= RES_POOLCOLL_TOX_IDX1 && nPoolId <= RES_POOLCOLL_TOX_IDX3) || @@ -1555,9 +1555,9 @@ sal_Int32 SwHTMLWriter::indexOfDotLeaders( sal_uInt16 nPoolId, const OUString& r nPoolId == RES_POOLCOLL_TOX_ILLUS1 || nPoolId == RES_POOLCOLL_TOX_TABLES1 || nPoolId == RES_POOLCOLL_TOX_OBJECT1 || (nPoolId >= RES_POOLCOLL_TOX_AUTHORITIES1 && nPoolId <= RES_POOLCOLL_TOX_USER10))) { - sal_Int32 i = rStr.lastIndexOf('\t'); + size_t i = rStr.rfind('\t'); // there are only ASCII (Latin-1) characters after the tabulator - if (i > -1 && OUStringToOString(rStr.subView(i + 1), RTL_TEXTENCODING_ASCII_US).indexOf('?') == -1) + if (i != std::u16string_view::npos && OUStringToOString(rStr.substr(i + 1), RTL_TEXTENCODING_ASCII_US).indexOf('?') == -1) return i; } return -1; diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index 911eaa629aed..3f6860a6d160 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -595,7 +595,7 @@ public: FieldUnit GetCSS1Unit() const { return m_eCSS1Unit; } - sal_Int32 indexOfDotLeaders( sal_uInt16 nPoolId, const OUString& rText ); + sal_Int32 indexOfDotLeaders( sal_uInt16 nPoolId, std::u16string_view rText ); /// Determines the prefix string needed to respect the requested namespace alias. OString GetNamespace() const; diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index 763ae5808138..86d705b2bac6 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -95,7 +95,7 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage(weld::Container* pPage, SwMailMerge //creating with extension is not supported by a static method :-( OUString const sExt( comphelper::string::stripStart(pSfxFlt->GetDefaultExtension(),'*')); - utl::TempFile aTempFile( OUString(), true, &sExt ); + utl::TempFile aTempFile( u"", true, &sExt ); m_sExampleURL = aTempFile.GetURL(); aTempFile.EnableKillingFile(); } diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx index d147505edbdd..e5f29f1d4aa7 100644 --- a/sw/source/uibase/misc/glosdoc.cxx +++ b/sw/source/uibase/misc/glosdoc.cxx @@ -78,7 +78,7 @@ OUString lcl_CheckFileName( const OUString& rNewFilePath, OUString rSG = SwGlossaries::GetExtension(); //generate generic name - utl::TempFile aTemp("group", true, &rSG, &rNewFilePath); + utl::TempFile aTemp(u"group", true, &rSG, &rNewFilePath); aTemp.EnableKillingFile(); INetURLObject aTempURL( aTemp.GetURL() ); diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx index a6bc6104f43e..203879289a9b 100644 --- a/sw/source/uibase/uno/unomailmerge.cxx +++ b/sw/source/uibase/uno/unomailmerge.cxx @@ -766,7 +766,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( FILTER_XML, SwDocShell::Factory().GetFilterContainer() ); OUString aExtension(comphelper::string::stripStart(pSfxFlt->GetDefaultExtension(), '*')); - utl::TempFile aTempFile( "SwMM", true, &aExtension ); + utl::TempFile aTempFile( u"SwMM", true, &aExtension ); m_aTmpFileName = aTempFile.GetURL(); Reference< XStorable > xStorable( xCurModel, UNO_QUERY ); |