comphelper/source/misc/storagehelper.cxx |   13 +++----------
 include/comphelper/storagehelper.hxx     |    1 -
 2 files changed, 3 insertions(+), 11 deletions(-)

New commits:
commit 505647d63726ce526d9ecd544954f3ce3e1af95a
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Apr 11 21:07:46 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Apr 12 11:21:36 2023 +0200

    remove unnecessary method
    
    Change-Id: I9ef8f2cb2e3836c879532f690794df642c2449de
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150255
    Tested-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/comphelper/source/misc/storagehelper.cxx 
b/comphelper/source/misc/storagehelper.cxx
index 3fdabfcfe430..8244a1a1654a 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -543,16 +543,9 @@ uno::Sequence< beans::NamedValue > 
OStorageHelper::CreateGpgPackageEncryptionDat
 
 bool OStorageHelper::IsValidZipEntryFileName( std::u16string_view aName, bool 
bSlashAllowed )
 {
-    return IsValidZipEntryFileName( aName.data(), aName.size(), bSlashAllowed 
);
-}
-
-
-bool OStorageHelper::IsValidZipEntryFileName(
-    const sal_Unicode *pChar, sal_Int32 nLength, bool bSlashAllowed )
-{
-    for ( sal_Int32 i = 0; i < nLength; i++ )
+    for ( size_t i = 0; i < aName.size(); i++ )
     {
-        switch ( pChar[i] )
+        switch ( aName[i] )
         {
             case '\\':
             case '?':
@@ -567,7 +560,7 @@ bool OStorageHelper::IsValidZipEntryFileName(
                     return false;
                 break;
             default:
-                if ( pChar[i] < 32  || (pChar[i] >= 0xD800 && pChar[i] <= 
0xDFFF) )
+                if ( aName[i] < 32  || (aName[i] >= 0xD800 && aName[i] <= 
0xDFFF) )
                     return false;
         }
     }
diff --git a/include/comphelper/storagehelper.hxx 
b/include/comphelper/storagehelper.hxx
index c6c47c1a5a11..3d8e0bc916c5 100644
--- a/include/comphelper/storagehelper.hxx
+++ b/include/comphelper/storagehelper.hxx
@@ -178,7 +178,6 @@ public:
         CreateGpgPackageEncryptionData();
 
     static bool IsValidZipEntryFileName( std::u16string_view aName, bool 
bSlashAllowed );
-    static bool IsValidZipEntryFileName( const sal_Unicode *pChar, sal_Int32 
nLength, bool bSlashAllowed );
 
     static bool PathHasSegment( std::u16string_view aPath, std::u16string_view 
aSegment );
 

Reply via email to