From 9405b0680cadcd2ddc5eae7d308937e53b353a0d Mon Sep 17 00:00:00 2001 From: ElenaSubbotina Date: Sun, 26 Jun 2016 18:07:39 +0300 Subject: [PATCH] x2t linux build version up --- ASCOfficeDocFile/DocDocxConverter/OpenXmlPackage.cpp | 7 +++++++ .../DocDocxConverter/SectionPropertiesMapping.cpp | 2 +- ASCOfficeDocFile/DocDocxConverter/StringTable.h | 4 ++-- .../DocDocxConverter/TableCellPropertiesMapping.cpp | 8 ++++---- ASCOfficeDocFile/DocDocxConverter/TextboxMapping.cpp | 5 ++++- ASCOfficeDocFile/DocDocxConverter/WordDocument.cpp | 2 +- ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro | 7 ++++--- X2tConverter/build/Qt/X2tConverter.pro | 2 +- 8 files changed, 24 insertions(+), 13 deletions(-) diff --git a/ASCOfficeDocFile/DocDocxConverter/OpenXmlPackage.cpp b/ASCOfficeDocFile/DocDocxConverter/OpenXmlPackage.cpp index 0b76e0aa16..238278e239 100644 --- a/ASCOfficeDocFile/DocDocxConverter/OpenXmlPackage.cpp +++ b/ASCOfficeDocFile/DocDocxConverter/OpenXmlPackage.cpp @@ -34,6 +34,13 @@ #include "OpenXmlPackage.h" #include "Converter.h" +#include "NumberingMapping.h" +#include "CommentsMapping.h" +#include "EndnotesMapping.h" +#include "FootnotesMapping.h" +#include "FooterMapping.h" +#include "HeaderMapping.h" +#include "MainDocumentMapping.h" #include "OleObjectMapping.h" #include "VMLPictureMapping.h" diff --git a/ASCOfficeDocFile/DocDocxConverter/SectionPropertiesMapping.cpp b/ASCOfficeDocFile/DocDocxConverter/SectionPropertiesMapping.cpp index 695e453735..e6b5a40278 100644 --- a/ASCOfficeDocFile/DocDocxConverter/SectionPropertiesMapping.cpp +++ b/ASCOfficeDocFile/DocDocxConverter/SectionPropertiesMapping.cpp @@ -404,7 +404,7 @@ namespace DocFileFormat case sprmSLnc : { SLncOperand mode = (SLncOperand)FormatUtils::BytesToUChar (iter->Arguments, 0, iter->argumentsSize); - mode = (SLncOperand)min(max(mode,lncPerPage),lncContinue); + mode = (SLncOperand)(std::min)((std::max)(mode,lncPerPage),lncContinue); appendValueAttribute (&lnNumType, _T("w:restart"), LineNumberRestart[mode].c_str() ); } diff --git a/ASCOfficeDocFile/DocDocxConverter/StringTable.h b/ASCOfficeDocFile/DocDocxConverter/StringTable.h index 33ece8d4ab..e3044e8015 100644 --- a/ASCOfficeDocFile/DocDocxConverter/StringTable.h +++ b/ASCOfficeDocFile/DocDocxConverter/StringTable.h @@ -64,9 +64,9 @@ namespace DocFileFormat } StringTable( VirtualStreamReader *reader, int code_page_ ): - code_page(code_page_), fExtend(false), cData(0), cbExtra(0) + code_page(code_page_), fExtend(false), cbData(0), cbExtra(0) { - parse( reader, (unsigned int)reader->GetPosition() ); + parse( reader, (unsigned int)reader->GetPosition() ); } StringTable( POLE::Stream* tableStream, unsigned int fc, unsigned int lcb, bool older ) : diff --git a/ASCOfficeDocFile/DocDocxConverter/TableCellPropertiesMapping.cpp b/ASCOfficeDocFile/DocDocxConverter/TableCellPropertiesMapping.cpp index 50c6dd726c..4f81b3c3b0 100644 --- a/ASCOfficeDocFile/DocDocxConverter/TableCellPropertiesMapping.cpp +++ b/ASCOfficeDocFile/DocDocxConverter/TableCellPropertiesMapping.cpp @@ -89,7 +89,7 @@ namespace DocFileFormat int cc = tdef.numberOfColumns; this->_tGrid = tdef.rgdxaCenter; - this->_tcDef = tdef.rgTc80[min(_cellIndex, (int)tdef.rgTc80.size() - 1)]; // NOTE: fix for crash + this->_tcDef = tdef.rgTc80[(std::min)(_cellIndex, (int)tdef.rgTc80.size() - 1)]; // NOTE: fix for crash appendValueElement( this->_tcPr, _T( "textDirection" ), FormatUtils::MapValueToWideString( this->_tcDef.textFlow, &Global::TextFlowMap[0][0], 6, 6 ).c_str(), false ); @@ -114,8 +114,8 @@ namespace DocFileFormat appendValueElement( _tcPr, _T( "noWrap" ), _T( "" ), true ); } - nComputedCellWidth = (short)( tdef.rgdxaCenter[(size_t)min(_cellIndex, (int)tdef.rgTc80.size() - 1) + 1] - - tdef.rgdxaCenter[min(_cellIndex, (int)tdef.rgTc80.size() - 1)] ); // NOTE: fix for crash + nComputedCellWidth = (short)( tdef.rgdxaCenter[(size_t)(std::min)(_cellIndex, (int)tdef.rgTc80.size() - 1) + 1] - + tdef.rgdxaCenter[(std::min)(_cellIndex, (int)tdef.rgTc80.size() - 1)] ); // NOTE: fix for crash //borders if (!IsTableBordersDefined(tapx->grpprl)) @@ -413,4 +413,4 @@ namespace DocFileFormat return false; } -} \ No newline at end of file +} diff --git a/ASCOfficeDocFile/DocDocxConverter/TextboxMapping.cpp b/ASCOfficeDocFile/DocDocxConverter/TextboxMapping.cpp index 44d0ace964..f0f5aa4aa6 100644 --- a/ASCOfficeDocFile/DocDocxConverter/TextboxMapping.cpp +++ b/ASCOfficeDocFile/DocDocxConverter/TextboxMapping.cpp @@ -30,10 +30,13 @@ * */ - #include "Converter.h" + #include "TextboxMapping.h" #include "TableMapping.h" +#include "FooterMapping.h" +#include "HeaderMapping.h" +#include "MainDocumentMapping.h" namespace DocFileFormat { diff --git a/ASCOfficeDocFile/DocDocxConverter/WordDocument.cpp b/ASCOfficeDocFile/DocDocxConverter/WordDocument.cpp index d7dd81a4c8..60d76607fd 100644 --- a/ASCOfficeDocFile/DocDocxConverter/WordDocument.cpp +++ b/ASCOfficeDocFile/DocDocxConverter/WordDocument.cpp @@ -424,7 +424,7 @@ namespace DocFileFormat { if (m_sTempFolder.empty()) { - m_sTempFolder = FileSystem::Directory::GetTempPathW().GetBuffer(); + m_sTempFolder = FileSystem::Directory::GetTempPath().GetBuffer(); } m_sTempDecryptFileName = m_sTempFolder + FILE_SEPARATOR_STR + L"~tempFile.doc"; diff --git a/ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro b/ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro index 97e465b61c..0b956aab01 100644 --- a/ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro +++ b/ASCOfficeDocFile/DocFormatLib/Linux/DocFormatLib.pro @@ -92,8 +92,8 @@ QMAKE_MAC_SDK = macosx10.11 SOURCES += \ ../DocFormatLib.cpp \ - ../../Common/MD4/md4c.cpp \ - ../../../Common/3dParty/pole/pole.cpp + ../../../Common/3dParty/pole/pole.cpp \ + ../../DocDocxConverter/EncryptionHeader.cpp build_fast { SOURCES += \ @@ -328,7 +328,8 @@ HEADERS += \ ../../DocDocxConverter/OfficeDrawing/Shapetypes/SunType.h \ ../../DocDocxConverter/OfficeDrawing/Shapetypes/TextboxType.h \ ../../DocDocxConverter/OfficeDrawing/Shapetypes/TrapezoidType.h \ - ../../../Common/3dParty/pole/pole.h + ../../../Common/3dParty/pole/pole.h \ + ../../DocDocxConverter/EncryptionHeader.h diff --git a/X2tConverter/build/Qt/X2tConverter.pro b/X2tConverter/build/Qt/X2tConverter.pro index 8fbece28c3..d1edd76ecf 100644 --- a/X2tConverter/build/Qt/X2tConverter.pro +++ b/X2tConverter/build/Qt/X2tConverter.pro @@ -7,7 +7,7 @@ QT -= core QT -= gui -VERSION = 2.0.2.375 +VERSION = 2.0.2.376 DEFINES += INTVER=$$VERSION mac {