[Libreoffice-commits] core.git: vcl/source

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Sun May 3 20:17:10 UTC 2020


 vcl/source/filter/GraphicFormatDetector.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 28609e1017adf10cdfa513639406e362e578259e
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sat May 2 14:46:37 2020 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sun May 3 22:16:34 2020 +0200

    vcl: simplify graphic type detection for EPS files
    
    Change-Id: Ia48560274c33aaa8e81a5ee6eb00f6470e92e0fd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93349
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/vcl/source/filter/GraphicFormatDetector.cxx b/vcl/source/filter/GraphicFormatDetector.cxx
index 5682d78f8e3c..56f7a9f2d006 100644
--- a/vcl/source/filter/GraphicFormatDetector.cxx
+++ b/vcl/source/filter/GraphicFormatDetector.cxx
@@ -311,8 +311,7 @@ bool GraphicFormatDetector::checkEPS()
         msDetectedFormat = "EPS";
         return true;
     }
-    else if (matchArrayWithString(pFirstBytesAsCharArray, 10, "%!PS-Adobe")
-             && matchArrayWithString(pFirstBytesAsCharArray + 15, 3, "EPS"))
+    else if (checkArrayForMatchingStrings(pFirstBytesAsCharArray, 30, { "%!PS-Adobe", " EPS" }))
     {
         msDetectedFormat = "EPS";
         return true;


More information about the Libreoffice-commits mailing list