summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-21 16:08:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-22 13:29:40 +0200
commitca1027e7d3a47402a016dba26d12db93b097a856 (patch)
tree666c4045bd72c8ed63a674438fcbcc41df6e3235 /vcl
parent08a72cbb06776e83475e70e0ee5d6c0ca572944e (diff)
use more string_view in unotools
Change-Id: If32767647d3fba22a8e4a2b10fc57f47efca01d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/font/PhysicalFontCollection.cxx4
-rw-r--r--vcl/source/font/fontmetric.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index 139e4f133e88..6a1b35372952 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -344,8 +344,8 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamilyByTokenNames(OUString
// use normalized font name tokens to find the font
for( sal_Int32 nTokenPos = 0; nTokenPos != -1; )
{
- OUString aFamilyName = GetNextFontToken( rTokenStr, nTokenPos );
- if( aFamilyName.isEmpty() )
+ std::u16string_view aFamilyName = GetNextFontToken( rTokenStr, nTokenPos );
+ if( aFamilyName.empty() )
continue;
pFoundData = FindFontFamily( aFamilyName );
diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx
index 000523941813..660b1a7d1f78 100644
--- a/vcl/source/font/fontmetric.cxx
+++ b/vcl/source/font/fontmetric.cxx
@@ -137,7 +137,7 @@ ImplFontMetricData::ImplFontMetricData( const vcl::font::FontSelectPattern& rFon
{
// initialize the used font name
sal_Int32 nTokenPos = 0;
- SetFamilyName( GetNextFontToken( rFontSelData.GetFamilyName(), nTokenPos ) );
+ SetFamilyName( OUString(GetNextFontToken( rFontSelData.GetFamilyName(), nTokenPos )) );
SetStyleName( rFontSelData.GetStyleName() );
}