diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-05-02 14:46:37 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-05-03 22:16:34 +0200 |
commit | 28609e1017adf10cdfa513639406e362e578259e (patch) | |
tree | 185a2e4edc28ab5bb5f1e6ae957d21af0a063b9f /vcl/source/filter | |
parent | fe98579520ebf3b570dc9f93451d7928769e4c43 (diff) |
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@gmail.com>
Diffstat (limited to 'vcl/source/filter')
-rw-r--r-- | vcl/source/filter/GraphicFormatDetector.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
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; |