summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/localize.cxx4
-rw-r--r--l10ntools/source/merge.cxx2
-rw-r--r--l10ntools/source/propmerge.cxx3
-rw-r--r--l10ntools/source/xmlparse.cxx5
4 files changed, 8 insertions, 6 deletions
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 17ad73f3b2a4..1aa3bab4b6d8 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -125,7 +125,7 @@ void InitPoFile(
{
OUString outDir =
OStringToOUString(
- rPotDir.copy(0,rPotDir.lastIndexOf('/')), RTL_TEXTENCODING_UTF8);
+ rPotDir.subView(0,rPotDir.lastIndexOf('/')), RTL_TEXTENCODING_UTF8);
OUString outDirUrl;
if (osl::FileBase::getFileURLFromSystemPath(outDir, outDirUrl)
!= osl::FileBase::E_None)
@@ -406,7 +406,7 @@ void handleDirectory(
//Remove empty pot directory
OUString sPoPath =
OStringToOUString(
- aPotDir.copy(0,aPotDir.lastIndexOf('/')), RTL_TEXTENCODING_UTF8);
+ aPotDir.subView(0,aPotDir.lastIndexOf('/')), RTL_TEXTENCODING_UTF8);
OUString sPoUrl;
if (osl::FileBase::getFileURLFromSystemPath(sPoPath, sPoUrl)
!= osl::FileBase::E_None)
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 694e48f23f4f..22beb6f1b962 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -94,7 +94,7 @@ namespace
{
//DOUBLE VERTICAL LINE instead of || because the translations make their
//way into action_names under gtk3 where || is illegal
- return OUStringToOString(OUString(u'\x2016'), RTL_TEXTENCODING_UTF8);
+ return OUStringToOString(u"\x2016", RTL_TEXTENCODING_UTF8);
}
}
diff --git a/l10ntools/source/propmerge.cxx b/l10ntools/source/propmerge.cxx
index 42945aee316d..3922d172398e 100644
--- a/l10ntools/source/propmerge.cxx
+++ b/l10ntools/source/propmerge.cxx
@@ -13,6 +13,7 @@
#include <iostream>
#include <fstream>
#include <iomanip>
+#include <string_view>
#include <export.hxx>
#include <common.hxx>
@@ -59,7 +60,7 @@ namespace
}
//Escape unicode characters
- void lcl_PrintJavaStyle( const OString& rText, std::ofstream &rOfstream )
+ void lcl_PrintJavaStyle( std::string_view rText, std::ofstream &rOfstream )
{
const OUString sTemp =
OStringToOUString( rText, RTL_TEXTENCODING_UTF8 );
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index 54b9c6bf4d8e..4bd58b1a49f6 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -22,6 +22,7 @@
#include <cassert>
#include <stdio.h>
+#include <string_view>
#include <helper.hxx>
#include <common.hxx>
@@ -741,7 +742,7 @@ void XMLElement::Print(XMLNode *pCur, OStringBuffer& rBuffer, bool bRootelement
namespace
{
-OUString lcl_pathnameToAbsoluteUrl(const OString& rPathname)
+OUString lcl_pathnameToAbsoluteUrl(std::string_view rPathname)
{
OUString sPath = OStringToOUString(rPathname, RTL_TEXTENCODING_UTF8 );
OUString sUrl;
@@ -1112,7 +1113,7 @@ OString XMLUtil::QuotHTML( const OString &rString )
sReturn.append('\0');
return
OUStringToOString(
- OUString(reinterpret_cast<const sal_Unicode*>(sReturn.getBuffer())),
+ reinterpret_cast<const sal_Unicode*>(sReturn.getBuffer()),
RTL_TEXTENCODING_UTF8);
}