Commit 51fe936e authored by ElenaSubbotina's avatar ElenaSubbotina

...

parent d8b17741
...@@ -33,7 +33,10 @@ ...@@ -33,7 +33,10 @@
#include "../DesktopEditor/common/File.h" #include "../DesktopEditor/common/File.h"
#include "../OfficeUtils/src/OfficeUtils.h" #include "../OfficeUtils/src/OfficeUtils.h"
#include "../ASCOfficePPTFile/PPTFormatLib/PPTFormatLib.h"
#if defined FILE_FORMAT_CHECKER_WITH_MACRO
#include "../ASCOfficePPTFile/PPTFormatLib/PPTFormatLib.h"
#endif
#include "3dParty/pole/pole.h" #include "3dParty/pole/pole.h"
#include <algorithm> #include <algorithm>
...@@ -146,10 +149,12 @@ bool COfficeFileFormatChecker::isDocFormatFile (POLE::Storage * storage) ...@@ -146,10 +149,12 @@ bool COfficeFileFormatChecker::isDocFormatFile (POLE::Storage * storage)
if (entries.size() > 0) if (entries.size() > 0)
return false; return false;
#if defined FILE_FORMAT_CHECKER_WITH_MACRO
if (storage->isDirectory(L"Macros")) if (storage->isDirectory(L"Macros"))
{ {
bMacroEnabled = true; bMacroEnabled = true;
} }
#endif
return true; return true;
} }
...@@ -185,11 +190,12 @@ bool COfficeFileFormatChecker::isXlsFormatFile (POLE::Storage * storage) ...@@ -185,11 +190,12 @@ bool COfficeFileFormatChecker::isXlsFormatFile (POLE::Storage * storage)
} }
} }
} }
#if defined FILE_FORMAT_CHECKER_WITH_MACRO
if (storage->isDirectory(L"_VBA_PROJECT_CUR")) if (storage->isDirectory(L"_VBA_PROJECT_CUR"))
{ {
bMacroEnabled = true; bMacroEnabled = true;
} }
#endif
return true; return true;
} }
...@@ -237,6 +243,7 @@ bool COfficeFileFormatChecker::isOfficeFile(const std::wstring & fileName) ...@@ -237,6 +243,7 @@ bool COfficeFileFormatChecker::isOfficeFile(const std::wstring & fileName)
} }
else if ( isPptFormatFile(&storage) ) else if ( isPptFormatFile(&storage) )
{ {
#if defined FILE_FORMAT_CHECKER_WITH_MACRO
COfficePPTFile pptFile; COfficePPTFile pptFile;
bMacroEnabled = true; bMacroEnabled = true;
...@@ -246,6 +253,7 @@ bool COfficeFileFormatChecker::isOfficeFile(const std::wstring & fileName) ...@@ -246,6 +253,7 @@ bool COfficeFileFormatChecker::isOfficeFile(const std::wstring & fileName)
return false; return false;
} }
pptFile.CloseFile(); pptFile.CloseFile();
#endif
nFileType = AVS_OFFICESTUDIO_FILE_PRESENTATION_PPT; nFileType = AVS_OFFICESTUDIO_FILE_PRESENTATION_PPT;
return true; return true;
} }
......
...@@ -60,6 +60,7 @@ DEFINES += DJVU_USE_DYNAMIC_LIBRARY ...@@ -60,6 +60,7 @@ DEFINES += DJVU_USE_DYNAMIC_LIBRARY
DEFINES += HTMLRENDERER_USE_DYNAMIC_LIBRARY DEFINES += HTMLRENDERER_USE_DYNAMIC_LIBRARY
DEFINES += HTMLFILE_USE_DYNAMIC_LIBRARY DEFINES += HTMLFILE_USE_DYNAMIC_LIBRARY
DEFINES += UNICODECONVERTER_USE_DYNAMIC_LIBRARY DEFINES += UNICODECONVERTER_USE_DYNAMIC_LIBRARY
DEFINES += FILE_FORMAT_CHECKER_WITH_MACRO
core_windows { core_windows {
INCLUDEPATH += ../../../OfficeUtils/src/zlib-1.2.3 INCLUDEPATH += ../../../OfficeUtils/src/zlib-1.2.3
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="&quot;../../../DesktopEditor/agg-2.4/include&quot;;../../../DesktopEditor/xml/build/vs2005;../../../DesktopEditor/xml/libxml2/include" AdditionalIncludeDirectories="&quot;../../../DesktopEditor/agg-2.4/include&quot;;../../../DesktopEditor/xml/build/vs2005;../../../DesktopEditor/xml/libxml2/include"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;FILE_FORMAT_CHECKER_WITH_MACRO;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment