Commit 47d479b7 authored by Ivan.Shulga's avatar Ivan.Shulga Committed by Alexander Trofimov

linux build

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58885 954022d7-b5bf-4e40-9824-e11837661b57
parent 90ef8c84
...@@ -4,14 +4,16 @@ ...@@ -4,14 +4,16 @@
#ifdef _WIN32 #ifdef _WIN32
#include <atlbase.h> #include <atlbase.h>
#include <atlstr.h> #include <atlstr.h>
#else
#include <vector> #include "../../../../DesktopEditor/common/ASCVariant.h"
#include <map>
#endif #endif
#include "../Common/DocxFormat/Source/Base/Base.h" #include "../Common/DocxFormat/Source/Base/Base.h"
#include "../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTShape/PPTShapeEnum.h" #include "../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTShape/PPTShapeEnum.h"
#include <vector>
#include <map>
class IRenderer; class IRenderer;
class CShape; class CShape;
class CPPTShape; class CPPTShape;
...@@ -121,11 +123,12 @@ public: ...@@ -121,11 +123,12 @@ public:
void FinalRelease(); void FinalRelease();
public: public:
STDMETHOD(GetProperty)(LONG lId, VARIANT* pProp); HRESULT(GetProperty)(LONG lId, VARIANT* pProp);
STDMETHOD(SetProperty)(LONG lId, VARIANT prop); HRESULT(SetProperty)(LONG lId, VARIANT prop);
public: public:
static bool CopyProperty(VARIANT& oDst, const VARIANT& oSrc); static bool CopyProperty(VARIANT& oDst, const VARIANT& oSrc);
}; };
namespace NSBinPptxRW namespace NSBinPptxRW
...@@ -174,34 +177,34 @@ namespace NSBinPptxRW ...@@ -174,34 +177,34 @@ namespace NSBinPptxRW
~CDrawingConverter(); ~CDrawingConverter();
public: public:
STDMETHOD(SetMainDocument)(BinDocxRW::CDocxSerializer* pDocument); HRESULT SetMainDocument (BinDocxRW::CDocxSerializer* pDocument);
STDMETHOD(SetRelsPath)(CString& bsRelsPath); HRESULT SetRelsPath (CString& bsRelsPath);
CString GetRelsPath(); CString GetRelsPath();
STDMETHOD(SetMediaDstPath)(CString& bsMediaPath); HRESULT SetMediaDstPath (CString& bsMediaPath);
STDMETHOD(AddShapeType)(CString& bsXml); HRESULT AddShapeType(CString& bsXml);
STDMETHOD(AddObject)(CString& bsXml, CString** pMainProps); HRESULT AddObject(CString& bsXml, CString** pMainProps);
STDMETHOD(GetThemeBinary)(BYTE** ppBinary, long& lBinarySize, CString& bsThemeFilePath); HRESULT GetThemeBinary(BYTE** ppBinary, long& lBinarySize, CString& bsThemeFilePath);
STDMETHOD(SaveThemeXml)(LONG lStart, LONG lLength, CString& bsThemePath); HRESULT SaveThemeXml(LONG lStart, LONG lLength, CString& bsThemePath);
STDMETHOD(SaveObject)(LONG lStart, LONG lLength, CString& bsMainProps, CString** bsXml); HRESULT SaveObject(LONG lStart, LONG lLength, CString& bsMainProps, CString** bsXml);
STDMETHOD(SaveObjectEx)(LONG lStart, LONG lLength, CString& bsMainProps, LONG lDocType, CString** bsXml); HRESULT SaveObjectEx(LONG lStart, LONG lLength, CString& bsMainProps, LONG lDocType, CString** bsXml);
STDMETHOD(GetRecordBinary)(LONG lRecordType, CString& bsXml); HRESULT GetRecordBinary(LONG lRecordType, CString& bsXml);
STDMETHOD(GetRecordXml)(LONG lStart, LONG lLength, LONG lRecType, LONG lDocType, CString** bsXml); HRESULT GetRecordXml(LONG lStart, LONG lLength, LONG lRecType, LONG lDocType, CString** bsXml);
STDMETHOD(SetDstContentRels)(); HRESULT SetDstContentRels();
STDMETHOD(SaveDstContentRels)(CString& bsRelsPath); HRESULT SaveDstContentRels(CString& bsRelsPath);
STDMETHOD(WriteRels)(CString& bsType, CString& bsTarget, CString& bsTargetMode, LONG* lId); HRESULT WriteRels (CString& bsType, CString& bsTarget, CString& bsTargetMode, LONG* lId);
STDMETHOD(LoadClrMap)(CString& bsXml); HRESULT LoadClrMap (CString& bsXml);
STDMETHOD(GetTxBodyBinary)(CString& bsXml); HRESULT(GetTxBodyBinary)(CString& bsXml);
STDMETHOD(GetTxBodyXml)(LONG lStart, LONG lLength, CString** pbstrXml); HRESULT(GetTxBodyXml)(LONG lStart, LONG lLength, CString** pbstrXml);
STDMETHOD(SetFontDir)(CString& bsFontDir); HRESULT(SetFontDir)(CString& bsFontDir);
HRESULT SetFontPicker(COfficeFontPicker* pFontPicker); HRESULT SetFontPicker(COfficeFontPicker* pFontPicker);
STDMETHOD(SetAdditionalParam)(CString& ParamName, VARIANT ParamValue); HRESULT(SetAdditionalParam)(CString& ParamName, VARIANT ParamValue);
STDMETHOD(GetAdditionalParam)(CString& ParamName, VARIANT* ParamValue); HRESULT(GetAdditionalParam)(CString& ParamName, VARIANT* ParamValue);
public: public:
void SetFontManager(CFontManager* pFontManager); void SetFontManager(CFontManager* pFontManager);
protected: protected:
......
...@@ -6,17 +6,17 @@ ...@@ -6,17 +6,17 @@
namespace NSBinPptxRW namespace NSBinPptxRW
{ {
static _bstr_t g_bstr_nodeopen = L"<"; static std::wstring g_bstr_nodeopen = L"<";
static _bstr_t g_bstr_nodeclose = L">"; static std::wstring g_bstr_nodeclose = L">";
static _bstr_t g_bstr_nodeopen_slash = L"</"; static std::wstring g_bstr_nodeopen_slash = L"</";
static _bstr_t g_bstr_nodeclose_slash = L"/>"; static std::wstring g_bstr_nodeclose_slash = L"/>";
static _bstr_t g_bstr_node_space = L" "; static std::wstring g_bstr_node_space = L" ";
static _bstr_t g_bstr_node_equal = L"="; static std::wstring g_bstr_node_equal = L"=";
static _bstr_t g_bstr_node_quote = L"\""; static std::wstring g_bstr_node_quote = L"\"";
static _bstr_t g_bstr_boolean_true = L"true"; static std::wstring g_bstr_boolean_true = L"true";
static _bstr_t g_bstr_boolean_false = L"false"; static std::wstring g_bstr_boolean_false = L"false";
static _bstr_t g_bstr_boolean_true2 = L"1"; static std::wstring g_bstr_boolean_true2 = L"1";
static _bstr_t g_bstr_boolean_false2 = L"0"; static std::wstring g_bstr_boolean_false2 = L"0";
AVSINLINE static double FABS(double dVal) AVSINLINE static double FABS(double dVal)
{ {
...@@ -98,11 +98,13 @@ namespace NSBinPptxRW ...@@ -98,11 +98,13 @@ namespace NSBinPptxRW
m_pDataCur += nLen; m_pDataCur += nLen;
m_lSizeCur += nLen; m_lSizeCur += nLen;
} }
#ifdef _WIN32
AVSINLINE void WriteString(_bstr_t& bsString) AVSINLINE void WriteString(_bstr_t& bsString)
{ {
size_t nLen = bsString.length(); size_t nLen = bsString.length();
WriteString(bsString.GetBSTR(), nLen); WriteString(bsString.GetBSTR(), nLen);
} }
#endif // #ifdef _WIN32
AVSINLINE void WriteString(const CString& sString) AVSINLINE void WriteString(const CString& sString)
{ {
size_t nLen = (size_t)sString.GetLength(); size_t nLen = (size_t)sString.GetLength();
...@@ -672,6 +674,7 @@ namespace NSBinPptxRW ...@@ -672,6 +674,7 @@ namespace NSBinPptxRW
m_oWriter.WriteString(g_bstr_nodeclose); m_oWriter.WriteString(g_bstr_nodeclose);
} }
#ifdef _WIN32
template<typename T> template<typename T>
AVSINLINE void WriteArray(const CString& strName, const CAtlArray<T>& arr) AVSINLINE void WriteArray(const CString& strName, const CAtlArray<T>& arr)
{ {
...@@ -685,6 +688,7 @@ namespace NSBinPptxRW ...@@ -685,6 +688,7 @@ namespace NSBinPptxRW
EndNode(strName); EndNode(strName);
} }
} }
#endif //#ifdef _WIN32
template<typename T> template<typename T>
AVSINLINE void WriteArray(const CString& strName, const std::vector<T>& arr) AVSINLINE void WriteArray(const CString& strName, const std::vector<T>& arr)
{ {
...@@ -698,6 +702,8 @@ namespace NSBinPptxRW ...@@ -698,6 +702,8 @@ namespace NSBinPptxRW
EndNode(strName); EndNode(strName);
} }
} }
#ifdef _WIN32
template<typename T> template<typename T>
AVSINLINE void WriteArray2(const CAtlArray<T>& arr) AVSINLINE void WriteArray2(const CAtlArray<T>& arr)
{ {
...@@ -708,6 +714,7 @@ namespace NSBinPptxRW ...@@ -708,6 +714,7 @@ namespace NSBinPptxRW
arr[i].toXmlWriter(this); arr[i].toXmlWriter(this);
} }
} }
#endif //#ifdef _WIN32
template<typename T> template<typename T>
AVSINLINE void WriteArray2(const std::vector<T>& arr) AVSINLINE void WriteArray2(const std::vector<T>& arr)
{ {
......
...@@ -10,7 +10,14 @@ TARGET = PPTXFormatLib ...@@ -10,7 +10,14 @@ TARGET = PPTXFormatLib
TEMPLATE = lib TEMPLATE = lib
CONFIG += staticlib CONFIG += staticlib
QMAKE_CXXFLAGS += -std=c++11 -Wall -Wno-ignored-qualifiers -g QMAKE_CXXFLAGS += -std=c++11 -Wall -Wno-ignored-qualifiers -g
DEFINES += UNICODE _UNICODE _USE_LIBXML2_READER_ _LINUX_QT _USE_XMLLITE_READER_ NODOCX DISABLE_FILE_DOWNLOADER DEFINES += UNICODE \
_UNICODE \
_USE_LIBXML2_READER_ \
_LINUX_QT \
_USE_XMLLITE_READER_ \
NODOCX \
DISABLE_FILE_DOWNLOADER \
CXIMAGE_DONT_DECLARE_TCHAR
INCLUDEPATH += \ INCLUDEPATH += \
/usr/include/libxml2 /usr/include/libxml2
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.1.1, 2014-10-10T19:44:34. --> <!-- Written by QtCreator 3.1.1, 2014-10-14T19:48:10. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>ProjectExplorer.Project.ActiveTarget</variable> <variable>ProjectExplorer.Project.ActiveTarget</variable>
......
#pragma once #pragma once
#ifdef _WIN32
#include <atlbase.h> #include <atlbase.h>
#include <atlstr.h> #include <atlstr.h>
#include "../../../../Common/atldefine.h"
#else
#include "../../../../Common/DocxFormat/Source/Base/ASCString.h"
#endif
#include <vector> #include <vector>
#include "../../../../Common/atldefine.h"
#include "../../../../DesktopEditor/graphics/GraphicsPath.h" #include "../../../../DesktopEditor/graphics/GraphicsPath.h"
const double ShapeSize = 43200.0; const double ShapeSize = 43200.0;
...@@ -867,4 +874,4 @@ private: ...@@ -867,4 +874,4 @@ private:
} }
}; };
#endif #endif
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.1.1, 2014-10-10T19:44:34. --> <!-- Written by QtCreator 3.1.1, 2014-10-15T14:46:26. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>ProjectExplorer.Project.ActiveTarget</variable> <variable>ProjectExplorer.Project.ActiveTarget</variable>
......
...@@ -135,149 +135,4 @@ typedef int RGB; ...@@ -135,149 +135,4 @@ typedef int RGB;
}\ }\
} }
// VARIANT
#ifndef VARIANT
/*
// 0 == FALSE, -1 == TRUE
typedef short VARIANT_BOOL;
#define VARIANT_TRUE ((VARIANT_BOOL)-1)
#define VARIANT_FALSE ((VARIANT_BOOL)0)
enum VARENUM
{ VT_EMPTY = 0,
VT_NULL = 1,
VT_I2 = 2,
VT_I4 = 3,
VT_R4 = 4,
VT_R8 = 5,
VT_CY = 6,
VT_DATE = 7,
VT_BSTR = 8,
VT_DISPATCH = 9,
VT_ERROR = 10,
VT_BOOL = 11,
VT_VARIANT = 12,
VT_UNKNOWN = 13,
VT_DECIMAL = 14,
VT_I1 = 16,
VT_UI1 = 17,
VT_UI2 = 18,
VT_UI4 = 19,
VT_I8 = 20,
VT_UI8 = 21,
VT_INT = 22,
VT_UINT = 23,
VT_VOID = 24,
VT_HRESULT = 25,
VT_PTR = 26,
VT_SAFEARRAY = 27,
VT_CARRAY = 28,
VT_USERDEFINED = 29,
VT_LPSTR = 30,
VT_LPWSTR = 31,
VT_RECORD = 36,
VT_INT_PTR = 37,
VT_UINT_PTR = 38,
VT_FILETIME = 64,
VT_BLOB = 65,
VT_STREAM = 66,
VT_STORAGE = 67,
VT_STREAMED_OBJECT = 68,
VT_STORED_OBJECT = 69,
VT_BLOB_OBJECT = 70,
VT_CF = 71,
VT_CLSID = 72,
VT_VERSIONED_STREAM = 73,
VT_BSTR_BLOB = 0xfff,
VT_VECTOR = 0x1000,
VT_ARRAY = 0x2000,
VT_BYREF = 0x4000,
VT_RESERVED = 0x8000,
VT_ILLEGAL = 0xffff,
VT_ILLEGALMASKED = 0xfff,
VT_TYPEMASK = 0xfff
} ;
typedef VARIANT_BOOL _VARIANT_BOOL;
typedef unsigned short VARTYPE;
struct tagVARIANT
{
union
{
struct __tagVARIANT
{
VARTYPE vt;
WORD wReserved1;
WORD wReserved2;
WORD wReserved3;
union
{
LONGLONG llVal;
LONG lVal;
BYTE bVal;
SHORT iVal;
FLOAT fltVal;
DOUBLE dblVal;
VARIANT_BOOL boolVal;
_VARIANT_BOOL bool;
SCODE scode;
CY cyVal;
DATE date;
BSTR bstrVal;
IUnknown *punkVal;
IDispatch *pdispVal;
SAFEARRAY *parray;
BYTE *pbVal;
SHORT *piVal;
LONG *plVal;
LONGLONG *pllVal;
FLOAT *pfltVal;
DOUBLE *pdblVal;
VARIANT_BOOL *pboolVal;
_VARIANT_BOOL *pbool;
SCODE *pscode;
CY *pcyVal;
DATE *pdate;
BSTR *pbstrVal;
IUnknown **ppunkVal;
IDispatch **ppdispVal;
SAFEARRAY **pparray;
VARIANT *pvarVal;
PVOID byref;
CHAR cVal;
USHORT uiVal;
ULONG ulVal;
ULONGLONG ullVal;
INT intVal;
UINT uintVal;
DECIMAL *pdecVal;
CHAR *pcVal;
USHORT *puiVal;
ULONG *pulVal;
ULONGLONG *pullVal;
INT *pintVal;
UINT *puintVal;
struct __tagBRECORD
{
PVOID pvRecord;
IRecordInfo *pRecInfo;
} __VARIANT_NAME_4;
} __VARIANT_NAME_3;
} __VARIANT_NAME_2;
DECIMAL decVal;
} __VARIANT_NAME_1;
} ;
typedef VARIANT *LPVARIANT;
typedef VARIANT VARIANTARG;
typedef VARIANT *LPVARIANTARG;
*/
#endif // #ifndef VARIANT
#endif //_BUILD_TYPES_CROSSPLATFORM_H_ #endif //_BUILD_TYPES_CROSSPLATFORM_H_
...@@ -119,10 +119,12 @@ typedef void* HRGN; ...@@ -119,10 +119,12 @@ typedef void* HRGN;
#define FALSE false #define FALSE false
#endif #endif
#ifndef CXIMAGE_DONT_DECLARE_TCHAR // it brokes CString implementation
#ifndef TCHAR #ifndef TCHAR
#define TCHAR char #define TCHAR char
#define _T #define _T
#endif #endif
#endif // CXIMAGE_DONT_DECLARE_TCHAR
typedef struct tagRECT typedef struct tagRECT
{ {
......
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