summaryrefslogtreecommitdiff
path: root/xmloff/source
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source')
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx6
-rw-r--r--xmloff/source/core/xmlmultiimagehelper.cxx8
2 files changed, 7 insertions, 7 deletions
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index ac8a9f3e3f51..a59a28b2546b 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -181,13 +181,13 @@ bool lcl_mapContainsRange(
}
bool lcl_tableOfRangeMatches(
- const OUString & rRange,
+ std::u16string_view rRange,
std::u16string_view rTableName )
{
// both strings are non-empty and the table name is part of the range
- return ( !rRange.isEmpty() &&
+ return ( !rRange.empty() &&
!rTableName.empty() &&
- (rRange.indexOf( rTableName ) != -1 ));
+ (rRange.find( rTableName ) != std::u16string_view::npos ));
}
} // anonymous namespace
diff --git a/xmloff/source/core/xmlmultiimagehelper.cxx b/xmloff/source/core/xmlmultiimagehelper.cxx
index b3529acc586e..000c6151ee81 100644
--- a/xmloff/source/core/xmlmultiimagehelper.cxx
+++ b/xmloff/source/core/xmlmultiimagehelper.cxx
@@ -19,19 +19,19 @@
#include <rtl/ustring.hxx>
#include <xmlmultiimagehelper.hxx>
-
+#include <o3tl/string_view.hxx>
#include <comphelper/graphicmimetype.hxx>
using namespace ::com::sun::star;
namespace
{
- OUString getMimeTypeForURL(const OUString& rString)
+ OUString getMimeTypeForURL(std::u16string_view rString)
{
OUString sMimeType;
- if (rString.startsWith("vnd.sun.star.Package"))
+ if (o3tl::starts_with(rString, u"vnd.sun.star.Package"))
{
- OString aExtension = OUStringToOString(rString.subView(rString.lastIndexOf(".") + 1), RTL_TEXTENCODING_ASCII_US);
+ OString aExtension = OUStringToOString(rString.substr(rString.rfind('.') + 1), RTL_TEXTENCODING_ASCII_US);
sMimeType = comphelper::GraphicMimeTypeHelper::GetMimeTypeForExtension(aExtension);
}
return sMimeType;