Commit 2ff0280c authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

X2t - FileConverter linux

добавлены rtf, doc

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62346 954022d7-b5bf-4e40-9824-e11837661b57
parent 562c970d
...@@ -30,7 +30,10 @@ SOURCES += ../ASCSVGWriter.cpp \ ...@@ -30,7 +30,10 @@ SOURCES += ../ASCSVGWriter.cpp \
../../DesktopEditor/raster/Metafile/Emf/EmfObjects.cpp \ ../../DesktopEditor/raster/Metafile/Emf/EmfObjects.cpp \
../../DesktopEditor/raster/Metafile/Emf/EmfPath.cpp \ ../../DesktopEditor/raster/Metafile/Emf/EmfPath.cpp \
../../DesktopEditor/raster/Metafile/Emf/EmfPlayer.cpp \ ../../DesktopEditor/raster/Metafile/Emf/EmfPlayer.cpp \
../../DesktopEditor/raster/Metafile/Emf/EmfClip.cpp ../../DesktopEditor/raster/Metafile/Emf/EmfClip.cpp \
../../DesktopEditor/raster/Metafile/Common/MetaFileTypes.cpp \
../../DesktopEditor/raster/Metafile/Wmf/WmfObjects.cpp \
../../DesktopEditor/raster/Metafile/Wmf/WmfPlayer.cpp
HEADERS += ../ASCSVGWriter.h \ HEADERS += ../ASCSVGWriter.h \
../CASCImage.h \ ../CASCImage.h \
...@@ -67,7 +70,15 @@ HEADERS += ../ASCSVGWriter.h \ ...@@ -67,7 +70,15 @@ HEADERS += ../ASCSVGWriter.h \
../../DesktopEditor/raster/Metafile/Wmf/WmfRegion.h \ ../../DesktopEditor/raster/Metafile/Wmf/WmfRegion.h \
../../DesktopEditor/raster/Metafile/Wmf/WmfTypes.h \ ../../DesktopEditor/raster/Metafile/Wmf/WmfTypes.h \
../../DesktopEditor/raster/Metafile/Wmf/WmfUtils.h \ ../../DesktopEditor/raster/Metafile/Wmf/WmfUtils.h \
../../DesktopEditor/raster/Metafile/Emf/EmfClip.h ../../DesktopEditor/raster/Metafile/Emf/EmfClip.h \
../../DesktopEditor/raster/Metafile/Common/IOutputDevice.h \
../../DesktopEditor/raster/Metafile/Common/MetaFile.h \
../../DesktopEditor/raster/Metafile/Common/MetaFileClip.h \
../../DesktopEditor/raster/Metafile/Common/MetaFileObjects.h \
../../DesktopEditor/raster/Metafile/Common/MetaFileRenderer.h \
../../DesktopEditor/raster/Metafile/Common/MetaFileTypes.h \
../../DesktopEditor/raster/Metafile/Wmf/WmfObjects.h \
../../DesktopEditor/raster/Metafile/Wmf/WmfPlayer.h
unix { unix {
target.path = /usr/lib target.path = /usr/lib
......
...@@ -6,17 +6,17 @@ ...@@ -6,17 +6,17 @@
#include "../../Common/DocxFormat/Source/SystemUtility/FileSystem/Directory.h" #include "../../Common/DocxFormat/Source/SystemUtility/FileSystem/Directory.h"
#include "../../ASCOfficeUtils/ASCOfficeUtilsLib/OfficeUtils.h" #include "../../ASCOfficeUtils/ASCOfficeUtilsLib/OfficeUtils.h"
HRESULT COfficeDocFile::LoadFromFile(CString bsDocFile, CString bsDocxDirectory, CString bsXMLOptions, ProgressCallback *ffCallBack ) HRESULT COfficeDocFile::LoadFromFile(std::wstring bsDocFile, std::wstring bsDocxDirectory, ProgressCallback *ffCallBack )
{ {
HRESULT hr = S_FALSE; HRESULT hr = S_FALSE;
DocFileFormat::Converter docToDocx; DocFileFormat::Converter docToDocx;
hr= docToDocx.LoadAndConvert(bsDocFile, bsDocxDirectory, ffCallBack); hr= docToDocx.LoadAndConvert(std_string2string(bsDocFile), std_string2string(bsDocxDirectory), ffCallBack);
return hr; return hr;
} }
HRESULT COfficeDocFile::SaveToFile (CString sDstFileName, CString sSrcFileName, CString sXMLOptions, ProgressCallback *ffCallBack ) HRESULT COfficeDocFile::SaveToFile (std::wstring sDstFileName, std::wstring sSrcFileName, ProgressCallback *ffCallBack )
{ {
return S_OK; return S_OK;
} }
#ifndef DOC_FORMAT_LIB #ifndef DOC_FORMAT_LIB
#define DOC_FORMAT_LIB #define DOC_FORMAT_LIB
#if defined(_WIN32) || defined(_WIN64) #include <string>
#include <atlbase.h>
#include <atlstr.h> #if !defined(_WIN32) && !defined(_WIN64)
#else
#include "../../DesktopEditor/common/ASCVariant.h" #include "../../DesktopEditor/common/ASCVariant.h"
#include "../../Common/DocxFormat/Source/Base/ASCString.h"
#endif #endif
struct ProgressCallback; struct ProgressCallback;
...@@ -26,23 +24,23 @@ public: ...@@ -26,23 +24,23 @@ public:
private: private:
CString m_strTempDirectory; std::wstring m_strTempDirectory;
public: public:
HRESULT put_TempDirectory(CString sDir) HRESULT put_TempDirectory(std::wstring sDir)
{ {
m_strTempDirectory = sDir; m_strTempDirectory = sDir;
return S_OK; return S_OK;
} }
CString get_TempDirectory() std::wstring get_TempDirectory()
{ {
return m_strTempDirectory; return m_strTempDirectory;
} }
HRESULT LoadFromFile(CString sSrcFileName, CString sDstFileName, CString sXMLOptions, ProgressCallback *ffCallBack = NULL); HRESULT LoadFromFile(std::wstring sSrcFileName, std::wstring sDstFileName, ProgressCallback *ffCallBack);
HRESULT SaveToFile(CString sDstFileName, CString sSrcFileName, CString sXMLOptions, ProgressCallback *ffCallBack =NULL); HRESULT SaveToFile(std::wstring sDstFileName, std::wstring sSrcFileName, ProgressCallback *ffCallBack);
}; };
......
...@@ -396,9 +396,11 @@ namespace ZLibZipUtils ...@@ -396,9 +396,11 @@ namespace ZLibZipUtils
std::wstring filenameW = codepage_issue_fixFromOEM(filename_inzip); std::wstring filenameW = codepage_issue_fixFromOEM(filename_inzip);
if (wcscmp(filename, filenameW.c_str())) //todooo есть ли необходимость свести все к нижнему ???
if (wcscmp(filename, filenameW.c_str()) == 0)
return true; return true;
return false;
return false;
} }
/*========================================================================================================*/ /*========================================================================================================*/
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#define _METAFILE_COMMON_IOUTPUTDEVICE_H #define _METAFILE_COMMON_IOUTPUTDEVICE_H
#include "../Wmf/WmfTypes.h" #include "../Wmf/WmfTypes.h"
#include <string>
namespace MetaFile namespace MetaFile
{ {
...@@ -40,4 +41,4 @@ namespace MetaFile ...@@ -40,4 +41,4 @@ namespace MetaFile
} }
#endif //_METAFILE_COMMON_IOUTPUTDEVICE_H #endif //_METAFILE_COMMON_IOUTPUTDEVICE_H
\ No newline at end of file
#ifndef _METAFILE_COMMON_METAFILETYPES_H #ifndef _METAFILE_COMMON_METAFILETYPES_H
#define _METAFILE_COMMON_METAFILETYPES_H #define _METAFILE_COMMON_METAFILETYPES_H
#if !defined (_WIN32) && !defined(_WIN64)
#define BLACKONWHITE 1
#define WHITEONBLACK 2
#define COLORONCOLOR 3
#define HALFTONE 4
#define MAXSTRETCHBLTMODE 4
#endif
#define MWT_IDENTITY 0x01
#define MWT_LEFTMULTIPLY 0x02
#define MWT_RIGHTMULTIPLY 0x03
#define MWT_SET 0x04
namespace MetaFile namespace MetaFile
{ {
struct TEmfPointL; struct TEmfPointL;
...@@ -82,11 +97,6 @@ namespace MetaFile ...@@ -82,11 +97,6 @@ namespace MetaFile
unsigned char b; unsigned char b;
}; };
#define MWT_IDENTITY 0x01
#define MWT_LEFTMULTIPLY 0x02
#define MWT_RIGHTMULTIPLY 0x03
#define MWT_SET 0x04
struct TXForm struct TXForm
{ {
double M11; double M11;
...@@ -172,4 +182,4 @@ namespace MetaFile ...@@ -172,4 +182,4 @@ namespace MetaFile
}; };
} }
#endif //_METAFILE_COMMON_METAFILETYPES_H #endif //_METAFILE_COMMON_METAFILETYPES_H
\ No newline at end of file
...@@ -149,7 +149,7 @@ namespace MetaFile ...@@ -149,7 +149,7 @@ namespace MetaFile
if (c_lMetaWmf == m_lType) if (c_lMetaWmf == m_lType)
{ {
#ifdef NEW_WMF #ifdef NEW_WMF
TRectD& oRect = m_oWmfFile.GetBounds(); const TRectD& oRect = m_oWmfFile.GetBounds();
*pdX = oRect.dLeft; *pdX = oRect.dLeft;
*pdY = oRect.dTop; *pdY = oRect.dTop;
*pdW = oRect.dRight - oRect.dLeft; *pdW = oRect.dRight - oRect.dLeft;
......
...@@ -40,4 +40,4 @@ namespace MetaFile ...@@ -40,4 +40,4 @@ namespace MetaFile
}; };
} }
#endif //_METAFILE_H #endif //_METAFILE_H
\ No newline at end of file
...@@ -28,7 +28,7 @@ namespace MetaFile ...@@ -28,7 +28,7 @@ namespace MetaFile
ClearFile(); ClearFile();
} }
TRectD GetBounds() TRectD GetBounds()
{ {
TRect oBB; TRect oBB;
if (IsPlaceable()) if (IsPlaceable())
......
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