From d0a0d896fa7e8baddf0e12e4db20b913074ad899 Mon Sep 17 00:00:00 2001 From: ElenaSubbotina Date: Tue, 29 Mar 2016 15:09:00 +0300 Subject: [PATCH] =?UTF-8?q?x2t=20-=20=D1=80=D0=B0=D0=B7=D1=80=D0=B5=D1=88?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4?= =?UTF-8?q?=D0=B4=D0=B5=D1=80=D0=B6=D0=BA=D1=83=20xls=20=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D1=81=D0=B8=D0=B8=205.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Common/OfficeFileFormatChecker2.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Common/OfficeFileFormatChecker2.cpp b/Common/OfficeFileFormatChecker2.cpp index 4cd5a41bb8..32ebebca5d 100644 --- a/Common/OfficeFileFormatChecker2.cpp +++ b/Common/OfficeFileFormatChecker2.cpp @@ -94,12 +94,18 @@ bool COfficeFileFormatChecker::isXlsFormatFile (POLE::Storage * storage) { if (storage == NULL) return false; - POLE::Stream stream(storage, "Workbook"); + unsigned char buffer[10]; + + POLE::Stream stream(storage, "Workbook"); - unsigned char buffer[10]; if (stream.read(buffer,10) >0) return true; + POLE::Stream stream2(storage, "Book"); + + if (stream2.read(buffer,10) >0) + return true; + return false; } bool COfficeFileFormatChecker::isPptFormatFile (POLE::Storage * storage)