sfx2/source/bastyp/fltfnc.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 5fe3202e99901d82b0df03e739f3a02b00441fda
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue May 10 20:54:26 2022 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Wed May 11 11:22:18 2022 +0200

    elide temporary OUString in GetFilter4FilterName
    
    Change-Id: Idd51eb5f86b5d8148fe31ff69e17ce2d5724e6fa
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134150
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 4b1e38a78aca..06d3afbd043f 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -715,12 +715,12 @@ std::shared_ptr<const SfxFilter> 
SfxFilterMatcher::GetFilter4UIName( std::u16str
 
 std::shared_ptr<const SfxFilter> SfxFilterMatcher::GetFilter4FilterName( const 
OUString& rName, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
 {
-    OUString aName( rName );
-    sal_Int32 nIndex = aName.indexOf(": ");
+    std::u16string_view aName( rName );
+    sal_Int32 nIndex = rName.indexOf(": ");
     if (  nIndex != -1 )
     {
         SAL_WARN( "sfx.bastyp", "Old filter name used!");
-        aName = rName.copy( nIndex + 2 );
+        aName = rName.subView( nIndex + 2 );
     }
 
     if ( bFirstRead )

Reply via email to