Commit 14f9e4e4 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

linux build

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@59298 954022d7-b5bf-4e40-9824-e11837661b57
parent 0e4f3060
...@@ -24,9 +24,10 @@ ...@@ -24,9 +24,10 @@
#include "../ASCPresentationEditor/OfficeDrawing/Elements.h" #include "../ASCPresentationEditor/OfficeDrawing/Elements.h"
#include "../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTXShape/pptx2pptshapeconverter.h" #include "../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTXShape/pptx2pptshapeconverter.h"
#include "../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTShape/Formula.h"
#include "PPTXFormat/PPTX.h" #include "PPTXFormat/PPTX.h"
#include "../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTXShape/PPTXShape.h" #include "../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTXShape/PPTXShape.h"
#include "../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTShape/Formula.h"
#include "../Common/DocxFormat/Source/SystemUtility/FileSystem/Directory.h" #include "../Common/DocxFormat/Source/SystemUtility/FileSystem/Directory.h"
const double g_emu_koef = 25.4 * 36000 / 72.0; const double g_emu_koef = 25.4 * 36000 / 72.0;
...@@ -888,7 +889,8 @@ HRESULT CDrawingConverter::AddShapeType(const CString& bsXml) ...@@ -888,7 +889,8 @@ HRESULT CDrawingConverter::AddShapeType(const CString& bsXml)
if (oNode.IsValid()) if (oNode.IsValid())
{ {
CPPTShape* pShape = new CPPTShape(); #ifdef PPT_DEF
CPPTShape* pShape = new CPPTShape();
pShape->m_bIsShapeType = true; pShape->m_bIsShapeType = true;
XmlUtils::CXmlNode oNodeST = oNode.ReadNodeNoNS(_T("shapetype")); XmlUtils::CXmlNode oNodeST = oNode.ReadNodeNoNS(_T("shapetype"));
...@@ -901,7 +903,8 @@ HRESULT CDrawingConverter::AddShapeType(const CString& bsXml) ...@@ -901,7 +903,8 @@ HRESULT CDrawingConverter::AddShapeType(const CString& bsXml)
LoadCoordSize(oNodeST, pS); LoadCoordSize(oNodeST, pS);
m_mapShapeTypes.insert(std::pair<CString, CShape*>(strId, pS)); m_mapShapeTypes.insert(std::pair<CString, CShape*>(strId, pS));
} #endif
}
return S_OK; return S_OK;
} }
...@@ -1521,8 +1524,11 @@ PPTX::Logic::SpTreeElem CDrawingConverter::doc_LoadShape(XmlUtils::CXmlNode& oNo ...@@ -1521,8 +1524,11 @@ PPTX::Logic::SpTreeElem CDrawingConverter::doc_LoadShape(XmlUtils::CXmlNode& oNo
oShapeElem.m_oShape.m_pShape->m_oPath.SetCoordsize(21600, 21600); oShapeElem.m_oShape.m_pShape->m_oPath.SetCoordsize(21600, 21600);
} }
CString strXmlPPTX = oShapeElem.ConvertPPTShapeToPPTX(true); CString strXmlPPTX;
#ifdef ENABLE_PPT_TO_PPTX_CONVERT
strXmlPPTX= oShapeElem.ConvertPPTShapeToPPTX(true);
#endif
PPTX::Logic::Shape* pShape = new PPTX::Logic::Shape(); PPTX::Logic::Shape* pShape = new PPTX::Logic::Shape();
XmlUtils::CXmlNode oNodeG; XmlUtils::CXmlNode oNodeG;
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
#include "../Common/DocxFormat/Source/Base/Base.h" #include "../Common/DocxFormat/Source/Base/Base.h"
#include "PPTXFormat/PPTXEvent.h" #include "PPTXFormat/PPTXEvent.h"
#include "../ASCPresentationEditor/ASCPresentationEditorDef.h"
typedef void (*load_from_resource)(void*, int, CString&); typedef void (*load_from_resource)(void*, int, CString&);
typedef bool (*extract_to_directory)(void*, CString&, CString&); typedef bool (*extract_to_directory)(void*, CString&, CString&);
typedef bool (*compress_from_directory)(void*, CString&, CString&); typedef bool (*compress_from_directory)(void*, CString&, CString&);
......
...@@ -135,7 +135,7 @@ namespace NSWMFToImageConverter ...@@ -135,7 +135,7 @@ namespace NSWMFToImageConverter
pRenderer->get_FontPath( &font_Path ); pRenderer->get_FontPath( &font_Path );
pRenderer->get_FontSize( &font_Size ); pRenderer->get_FontSize( &font_Size );
pRenderer->get_FontStyle( &font_Style ); pRenderer->get_FontStyle( &font_Style );
pRenderer->get_FontStringGID( &font_GID ); //pRenderer->get_FontStringGID( &font_GID );
LONG pen_Align = 0; LONG pen_Align = 0;
LONG pen_Alpha = 0; LONG pen_Alpha = 0;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include "./BinReaderWriterDefines.h" #include "./BinReaderWriterDefines.h"
#include "../../DesktopEditor/graphics/IRenderer.h" #include "../../DesktopEditor/graphics/IRenderer.h"
#include "../../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/Common.h" #include "../../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/Common.h"
#include "../../../Common/DocxFormat/Source/Base/Nullable.h"
namespace NSBinPptxRW namespace NSBinPptxRW
{ {
static std::wstring g_bstr_nodeopen = L"<"; static std::wstring g_bstr_nodeopen = L"<";
......
...@@ -103,7 +103,9 @@ namespace PPTX ...@@ -103,7 +103,9 @@ namespace PPTX
(int)(dkoefX * txRect.right), (int)(dkoefY * txRect.bottom)); (int)(dkoefX * txRect.right), (int)(dkoefY * txRect.bottom));
} }
SysFreeString((var.bstrVal)); #ifdef WIN32
SysFreeString((var.bstrVal));
#endif
#endif #endif
} }
} }
......
...@@ -14,16 +14,17 @@ DEFINES += UNICODE \ ...@@ -14,16 +14,17 @@ DEFINES += UNICODE \
_UNICODE \ _UNICODE \
_USE_LIBXML2_READER_ \ _USE_LIBXML2_READER_ \
_LINUX_QT \ _LINUX_QT \
_LINUX \
_USE_XMLLITE_READER_ \ _USE_XMLLITE_READER_ \
PPTX_DEF\ PPTX_DEF\
PPT_DEF\ PPT_DEF\
ENABLE_PPT_TO_PPTX_CONVERT\ # ENABLE_PPT_TO_PPTX_CONVERT \
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML \
NODOCX \ NODOCX \
DISABLE_FILE_DOWNLOADER \ DISABLE_FILE_DOWNLOADER \
CXIMAGE_DONT_DECLARE_TCHAR \ CXIMAGE_DONT_DECLARE_TCHAR \
BUILD_CONFIG_FULL_VERSION \ BUILD_CONFIG_FULL_VERSION \
DONT_WRITE_EMBEDDED_FONTS \ DONT_WRITE_EMBEDDED_FONTS
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML
INCLUDEPATH += \ INCLUDEPATH += \
/usr/include/libxml2 /usr/include/libxml2
...@@ -83,15 +84,10 @@ SOURCES += pptxformatlib.cpp \ ...@@ -83,15 +84,10 @@ SOURCES += pptxformatlib.cpp \
../../../Editor/BinaryFileReaderWriter.cpp \ ../../../Editor/BinaryFileReaderWriter.cpp \
../../../Editor/FontPicker.cpp \ ../../../Editor/FontPicker.cpp \
../../../../Common/DocxFormat/Source/SystemUtility/SystemUtility.cpp \ ../../../../Common/DocxFormat/Source/SystemUtility/SystemUtility.cpp \
../../../../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/BaseShape.cpp \
../../../../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTXShape/PPTXShape.cpp \
../../../../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTShape/PPTShape.cpp \
../../../../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTShape/Formula.cpp \
../../../../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTXShape/Formula.cpp \
../../../../ASCPresentationEditor/OfficeDrawing/Layout.cpp \ ../../../../ASCPresentationEditor/OfficeDrawing/Layout.cpp \
../../../../ASCPresentationEditor/OfficeDrawing/TextAttributesEx.cpp \ ../../../../ASCPresentationEditor/OfficeDrawing/TextAttributesEx.cpp \
../../../../XlsxSerializerCom/Reader/CSVReader.cpp ../../../../XlsxSerializerCom/Reader/CSVReader.cpp \
../../../../DesktopEditor/raster/BgraFrame.cpp ../../../../DesktopEditor/raster/BgraFrame.cpp
#../../../Directory.cpp \ #../../../Directory.cpp \
#../../File.cpp #../../File.cpp
...@@ -516,9 +512,8 @@ HEADERS += pptxformatlib.h \ ...@@ -516,9 +512,8 @@ HEADERS += pptxformatlib.h \
#../../Directory.h \ #../../Directory.h \
#../../File.h \ #../../File.h \
../../Settings.h \ ../../Settings.h \
../../../../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTShape/ppt2pptxshapeconverter.h \ ../../../../ASCPresentationEditor/ASCPresentationEditorDef.h \
../../../../DesktopEditor/raster/BgraFrame.h ../../../../DesktopEditor/raster/BgraFrame.h
unix { unix {
target.path = /usr/lib target.path = /usr/lib
INSTALLS += target INSTALLS += target
......
...@@ -2,20 +2,23 @@ ...@@ -2,20 +2,23 @@
#pragma once #pragma once
#ifdef PPT_DEF #ifdef PPT_DEF
#include "OfficeDrawing\Shapes\BaseShape\PPTShape\Formula.cpp" #include "./OfficeDrawing/Shapes/BaseShape/PPTShape/Formula.cpp"
#include "OfficeDrawing\Shapes\BaseShape\PPTShape\PPTShape.cpp" #include "./OfficeDrawing/Shapes/BaseShape/PPTShape/PPTShape.cpp"
#ifndef BASE_SHAPE #ifndef BASE_SHAPE
#define BASE_SHAPE #define BASE_SHAPE
#endif #endif
#endif #endif
#ifdef PPTX_DEF #ifdef PPTX_DEF
#include "OfficeDrawing\Shapes\BaseShape\PPTXShape\Formula.cpp" #include "./OfficeDrawing/Shapes/BaseShape/PPTXShape/Formula.cpp"
#include "OfficeDrawing\Shapes\BaseShape\PPTXShape\PPTXShape.cpp" #include "./OfficeDrawing/Shapes/BaseShape/PPTXShape/PPTXShape.cpp"
#ifndef BASE_SHAPE #ifndef BASE_SHAPE
#define BASE_SHAPE #define BASE_SHAPE
#endif #endif
#include "./OfficeDrawing/Shapes/BaseShape/PPTShape/ppt2pptxshapeconverter.h"
#endif #endif
#ifdef BASE_SHAPE #ifdef BASE_SHAPE
#include "OfficeDrawing\Shapes\BaseShape\BaseShape.cpp" #include "./OfficeDrawing/Shapes/BaseShape/BaseShape.cpp"
#endif #endif
#pragma once #pragma once
#include <algorithm>
#include <vector>
#ifdef _WIN32 #ifdef _WIN32
#include <atlbase.h> #include <atlbase.h>
#include <atlstr.h> #include <atlstr.h>
#include "../../../../Common/atldefine.h" #include "../../../../Common/atldefine.h"
#else #else
#include "../../../../Common/DocxFormat/Source/Base/ASCString.h" #include "../../../../Common/DocxFormat/Source/Base/ASCString.h"
#endif #endif
#include <vector> #include "../../../../Common/DocxFormat/Source/Base/Base.h"
#include "../../../../DesktopEditor/graphics/GraphicsPath.h" #include "../../../../DesktopEditor/graphics/GraphicsPath.h"
const double ShapeSize = 43200.0; const double ShapeSize = 43200.0;
...@@ -423,11 +425,11 @@ private: ...@@ -423,11 +425,11 @@ private:
RELEASEMEM(m_pData); RELEASEMEM(m_pData);
} }
__forceinline void AddSize(size_t nSize) AVSINLINE void AddSize(size_t nSize)
{ {
if (NULL == m_pData) if (NULL == m_pData)
{ {
m_lSize = max(nSize, 1000); m_lSize = (std::max)((int)nSize, (int)1000);
m_pData = (wchar_t*)malloc(m_lSize * sizeof(wchar_t)); m_pData = (wchar_t*)malloc(m_lSize * sizeof(wchar_t));
m_lSizeCur = 0; m_lSizeCur = 0;
...@@ -462,12 +464,12 @@ private: ...@@ -462,12 +464,12 @@ private:
} }
public: public:
__forceinline size_t GetCurSize() AVSINLINE size_t GetCurSize()
{ {
return m_lSizeCur; return m_lSizeCur;
} }
__forceinline void Clear() AVSINLINE void Clear()
{ {
RELEASEMEM(m_pData); RELEASEMEM(m_pData);
...@@ -477,24 +479,24 @@ private: ...@@ -477,24 +479,24 @@ private:
m_pDataCur = m_pData; m_pDataCur = m_pData;
m_lSizeCur = 0; m_lSizeCur = 0;
} }
__forceinline void ClearNoAttack() AVSINLINE void ClearNoAttack()
{ {
m_pDataCur = m_pData; m_pDataCur = m_pData;
m_lSizeCur = 0; m_lSizeCur = 0;
} }
__forceinline CString GetData() AVSINLINE CString GetData()
{ {
CString str(m_pData, (int)m_lSizeCur); CString str(m_pData, (int)m_lSizeCur);
return str; return str;
} }
__forceinline void AddCharNoCheck(const WCHAR& wc) AVSINLINE void AddCharNoCheck(const WCHAR& wc)
{ {
*m_pDataCur++ = wc; *m_pDataCur++ = wc;
++m_lSizeCur; ++m_lSizeCur;
} }
__forceinline void AddIntNoCheck(int val) AVSINLINE void AddIntNoCheck(int val)
{ {
if (0 == val) if (0 == val)
{ {
...@@ -529,13 +531,13 @@ private: ...@@ -529,13 +531,13 @@ private:
m_lSizeCur += len; m_lSizeCur += len;
} }
__forceinline void AddStringNoCheck(const wchar_t* pData, const int& len) AVSINLINE void AddStringNoCheck(const wchar_t* pData, const int& len)
{ {
memcpy(m_pDataCur, pData, len << 1); memcpy(m_pDataCur, pData, len << 1);
m_pDataCur += len; m_pDataCur += len;
m_lSizeCur += len; m_lSizeCur += len;
} }
__forceinline void AddSpaceNoCheck() AVSINLINE void AddSpaceNoCheck()
{ {
*m_pDataCur = WCHAR(' '); *m_pDataCur = WCHAR(' ');
++m_pDataCur; ++m_pDataCur;
......
...@@ -67,8 +67,8 @@ LONG NSGuidesVML::CFormula::Calculate(NSGuidesVML::CFormulasManager* pManager) ...@@ -67,8 +67,8 @@ LONG NSGuidesVML::CFormula::Calculate(NSGuidesVML::CFormulasManager* pManager)
case ftMid: { dRes = (a + b) / 2.0; break; } case ftMid: { dRes = (a + b) / 2.0; break; }
case ftAbsolute: { dRes = abs(a); break; } case ftAbsolute: { dRes = abs(a); break; }
case ftMin: { dRes = min(a, b); break; } case ftMin: { dRes = (std::min)(a, b); break; }
case ftMax: { dRes = max(a, b); break; } case ftMax: { dRes = (std::max)(a, b); break; }
case ftIf: { dRes = (a > 0) ? b : c; break; } case ftIf: { dRes = (a > 0) ? b : c; break; }
case ftSqrt: { dRes = sqrt(a); break; } case ftSqrt: { dRes = sqrt(a); break; }
case ftMod: { dRes = sqrt(a*a + b*b + c*c); break; } case ftMod: { dRes = sqrt(a*a + b*b + c*c); break; }
...@@ -131,4 +131,4 @@ LONG NSGuidesVML::CFormula::Calculate(NSGuidesVML::CFormulasManager* pManager) ...@@ -131,4 +131,4 @@ LONG NSGuidesVML::CFormula::Calculate(NSGuidesVML::CFormulasManager* pManager)
lResult = (LONG)dRes; lResult = (LONG)dRes;
pManager->m_arResults[m_lIndex] = lResult; pManager->m_arResults[m_lIndex] = lResult;
return lResult; return lResult;
} }
\ No newline at end of file
...@@ -373,7 +373,7 @@ private: ...@@ -373,7 +373,7 @@ private:
{ {
for (int index = 0; index < m_arFormulas.size(); ++index) for (int index = 0; index < m_arFormulas.size(); ++index)
{ {
LONG lResult = m_arFormulas[index].Calculate(this); LONG lResult = m_arFormulas[index].Calculate(this);
} }
//m_pAdjustments = NULL; //m_pAdjustments = NULL;
......
...@@ -4,6 +4,14 @@ ...@@ -4,6 +4,14 @@
#include "xfile.h" #include "xfile.h"
//#include <TCHAR.h> //#include <TCHAR.h>
#ifndef WIN32
#ifdef _UNICODE
typedef wchar_t TCHAR;
#else
typedef char TCHAR;
#endif
#endif
class DLL_EXP CxIOFile : public CxFile class DLL_EXP CxIOFile : public CxFile
{ {
public: public:
......
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