mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
удалил ненужное
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@64218 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
committed by
Alexander Trofimov
parent
411c985fa0
commit
9a7b4a30c9
6
.gitattributes
vendored
6
.gitattributes
vendored
@ -7648,12 +7648,6 @@ DesktopEditor/xml/libxml2/xstc svnc_tsvn_003alogminsize=5
|
||||
DesktopEditor/xml/src svnc_tsvn_003alogminsize=5
|
||||
DjVuFile/DjVuFileTest svnc_tsvn_003alogminsize=5
|
||||
DjVuFile/libdjvu svnc_tsvn_003alogminsize=5
|
||||
DoctRenderer/COMMON/Dlls/AVSGraphics.dll svn_mime_002dtype=application%2Foctet-stream
|
||||
DoctRenderer/COMMON/Dlls/AVSOfficeFOFile.dll svn_mime_002dtype=application%2Foctet-stream
|
||||
DoctRenderer/COMMON/Joiner/bin/Debug/Joiner.exe svn_mime_002dtype=application%2Foctet-stream
|
||||
DoctRenderer/COMMON/JoinerPPT/bin/Debug/Joiner.exe svn_mime_002dtype=application%2Foctet-stream
|
||||
DoctRenderer/COMMON/JoinerXLS/bin/Debug/Joiner.exe svn_mime_002dtype=application%2Foctet-stream
|
||||
DoctRenderer/COMMON/TestConsole/Ionic.Zip.Reduced.dll svn_mime_002dtype=application%2Foctet-stream
|
||||
/HtmlFile svnc_tsvn_003alogminsize=5
|
||||
HtmlFile/Internal svnc_tsvn_003alogminsize=5
|
||||
HtmlFile/Internal/src svnc_tsvn_003alogminsize=5
|
||||
|
||||
@ -1,803 +0,0 @@
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "resource.h" // main symbols
|
||||
#include "Registration.h"
|
||||
|
||||
#include "..\Interfaces\XmlUtils.h"
|
||||
#include "..\..\AVSVideoStudio3\Common\AvsUtils.h"
|
||||
#include "ImageSerializeObjects2.h"
|
||||
#include "AVSDocumentRenderer.h"
|
||||
#include "GdiPlusEx.h"
|
||||
#include "Common.h"
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> XML
|
||||
#include "..\..\..\AVSOfficeStudio\Common\RSA\XMLDecoder.h"
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#include "..\Interfaces\BaseThread.h"
|
||||
|
||||
using namespace ImageStudio::Serialize::Paint::Common;
|
||||
|
||||
// IAVSOfficeViewer
|
||||
[object, uuid("0DA1E32E-D5D6-48f7-A28C-B477554AFE65"), dual, pointer_default(unique)]
|
||||
__interface IAVSDocumentPainter : IDispatch
|
||||
{
|
||||
[id(0)] HRESULT SetXml([in] BSTR bstrXml);
|
||||
|
||||
[id(1)] HRESULT AddRenderer([in] IUnknown* punkRenderer);
|
||||
[id(2)] HRESULT RemoveRenderer([in] IUnknown* punkRenderer);
|
||||
|
||||
[id(10)] HRESULT Start();
|
||||
[id(11)] HRESULT Stop();
|
||||
[id(12)] HRESULT Suspend();
|
||||
[id(13)] HRESULT Resume();
|
||||
|
||||
[id(50), propget] HRESULT Status([out, retval] LONG* pStatus);
|
||||
|
||||
[id(60), propget] HRESULT Priority([out, retval] LONG* pPriority);
|
||||
[id(60), propput] HRESULT Priority([in] LONG Priotity);
|
||||
|
||||
[id(2000)] HRESULT SetAdditionalParam([in] BSTR ParamName, [in] VARIANT ParamValue);
|
||||
[id(2001)] HRESULT GetAdditionalParam([in] BSTR ParamName, [out, retval] VARIANT* ParamValue);
|
||||
};
|
||||
|
||||
[dispinterface, uuid("ECE824D3-96AC-4cac-BBE0-A156FDF1F9DC")]
|
||||
__interface _IAVSDocumentPainterEvents
|
||||
{
|
||||
[id(0)] HRESULT OnError(LONG lError);
|
||||
[id(1)] HRESULT OnStop();
|
||||
|
||||
[id(5)] HRESULT OnProgress(LONG lProgressPage);
|
||||
[id(6)] HRESULT OnProgressParce(LONG lType, LONG lProgress);
|
||||
|
||||
// <20><><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> gdiplus-<2D><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
[id(10)] HRESULT OnNewPage(double dWidthMm, double dHeightMm);
|
||||
[id(11)] HRESULT OnCompletePage();
|
||||
};
|
||||
|
||||
// CAVSDocumentPainter
|
||||
[coclass, uuid("F06CB25F-4960-4083-9858-C775158BA9A5"), event_source(com), threading(apartment), vi_progid("AVSDocumentPainter"), progid("AVSDocumentPainter.1"), version(1.0)]
|
||||
class ATL_NO_VTABLE CAVSDocumentPainter :
|
||||
public IAVSDocumentPainter,
|
||||
public CBaseThread,
|
||||
public CEventReceiver,
|
||||
public CTextMeasurer
|
||||
{
|
||||
protected:
|
||||
|
||||
class CPageInfo
|
||||
{
|
||||
public:
|
||||
CString m_strPageInfo;
|
||||
|
||||
double m_dWidthMetric;
|
||||
double m_dHeightMetric;
|
||||
|
||||
CBaseThread* m_pThread;
|
||||
CEventReceiver* m_pReceiver;
|
||||
|
||||
public:
|
||||
CPageInfo() :
|
||||
m_pThread(NULL),
|
||||
m_pReceiver(NULL),
|
||||
m_strPageInfo(_T("")),
|
||||
m_dWidthMetric(0.0),
|
||||
m_dHeightMetric(0.0)
|
||||
{
|
||||
}
|
||||
CPageInfo(const CPageInfo& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
CPageInfo& operator=(const CPageInfo& oSrc)
|
||||
{
|
||||
m_strPageInfo = oSrc.m_strPageInfo;
|
||||
m_pThread = oSrc.m_pThread;
|
||||
m_pReceiver = oSrc.m_pReceiver;
|
||||
|
||||
m_dWidthMetric = oSrc.m_dWidthMetric;
|
||||
m_dHeightMetric = oSrc.m_dHeightMetric;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
void Render(IAVSRenderer* pRenderer, CTextMeasurer* pMeasurer, double dDPIX, double dDPIY)
|
||||
{
|
||||
if ((NULL == pRenderer) || (NULL == pMeasurer) || (NULL == m_pThread))
|
||||
return;
|
||||
|
||||
LONG lRendType = 0;
|
||||
pRenderer->get_Type(&lRendType);
|
||||
if (c_nPDFWriter == lRendType)
|
||||
{
|
||||
VARIANT var;
|
||||
var.vt = VT_BOOL;
|
||||
var.boolVal = VARIANT_TRUE;
|
||||
pRenderer->SetAdditionalParam(L"WhiteBackImage", var);
|
||||
}
|
||||
|
||||
XmlUtils::CXmlNode oNodeSource;
|
||||
oNodeSource.FromXmlString(m_strPageInfo);
|
||||
|
||||
if (g_cpszXMLImageSource == oNodeSource.GetName())
|
||||
{
|
||||
CString strFileName = oNodeSource.GetAttributeOrValue(_T("FilePath"));
|
||||
|
||||
float fX = 0;
|
||||
float fY = 0;
|
||||
float fWidth = m_dWidthMetric;
|
||||
float fHeight = m_dHeightMetric;
|
||||
|
||||
IAVSDocumentRenderer* pRend2 = NULL;
|
||||
pRenderer->QueryInterface(__uuidof(IAVSDocumentRenderer), (void**)&pRend2);
|
||||
|
||||
if (NULL != pRend2)
|
||||
{
|
||||
pRenderer->put_Width(fWidth);
|
||||
pRenderer->put_Height(fHeight);
|
||||
|
||||
BSTR bstrFile = strFileName.AllocSysString();
|
||||
pRend2->DrawImageFromFile(bstrFile, fX, fY, fWidth, fHeight);
|
||||
SysFreeString(bstrFile);
|
||||
RELEASEINTERFACE(pRend2);
|
||||
}
|
||||
else
|
||||
{
|
||||
ImageStudio::Serialize::Paint::Common::CDrawImageFromFile oImagePainter;
|
||||
oImagePainter.FilePath = strFileName;
|
||||
oImagePainter.Left = fX;
|
||||
oImagePainter.Top = fY;
|
||||
oImagePainter.Right = fX + fWidth;
|
||||
oImagePainter.Bottom = fY + fHeight;
|
||||
oImagePainter.m_dWidthMM = m_dWidthMetric;
|
||||
oImagePainter.m_dHeightMM = m_dHeightMetric;
|
||||
|
||||
oImagePainter.Draw(pRenderer, dDPIX, dDPIY);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
XmlUtils::CXmlNode oNodeVideoTransforms;
|
||||
if ( oNodeSource.GetNode(g_cpszXMLVideoTransforms, oNodeVideoTransforms) )
|
||||
{
|
||||
XmlUtils::CXmlReader oReader;
|
||||
if (oReader.SetXmlString(oNodeVideoTransforms.GetXml()) && oReader.ReadNodeList(_T("*")))
|
||||
{
|
||||
int nEffectCount = oReader.GetLengthList();
|
||||
|
||||
if (0 < nEffectCount)
|
||||
{
|
||||
for (int i = 0; (i < nEffectCount) && (m_pThread->IsRunned()); ++i)
|
||||
{
|
||||
if (NULL != m_pReceiver)
|
||||
{
|
||||
m_pReceiver->OnSendEvent(OFFICEEDITOR_PROGRESS_TYPE_ELEMENT, 100 * (i + 1) / nEffectCount, 0);
|
||||
}
|
||||
|
||||
XmlUtils::CXmlNode oNodeEffect;
|
||||
oNodeEffect.FromXmlString(oReader.ReadNodeXml(i));
|
||||
|
||||
CString sNodeName = oNodeEffect.GetName();
|
||||
if (g_cpszXMLEffectText == sNodeName)
|
||||
{
|
||||
if (NULL != pMeasurer)
|
||||
{
|
||||
pMeasurer->InternalFromXmlNode(oNodeEffect);
|
||||
|
||||
if (!pMeasurer->IsFormated())
|
||||
{
|
||||
pMeasurer->InitDrawText(pRenderer, 720, 576);
|
||||
}
|
||||
|
||||
pMeasurer->DrawText(pRenderer, 1.0);
|
||||
}
|
||||
}
|
||||
else if (g_cpszXMLPath == sNodeName)
|
||||
{
|
||||
ImageStudio::Serialize::Paint::Common::CDrawGraphicPath oPath;
|
||||
oPath.InternalFromXmlNode(oNodeEffect);
|
||||
|
||||
oPath.Draw(pRenderer);
|
||||
pRenderer->PathCommandEnd();
|
||||
}
|
||||
else if (g_cpszXMLImage == sNodeName)
|
||||
{
|
||||
ImageStudio::Serialize::Paint::Common::CDrawImageFromFile oImagePainter;
|
||||
oImagePainter.InternalFromXmlNode(oNodeEffect);
|
||||
|
||||
BOOL bNeedDraw = TRUE;
|
||||
if (-1 == dDPIX && -1 == dDPIY)
|
||||
{
|
||||
IAVSDocumentRenderer* pCommandRenderer = NULL;
|
||||
pRenderer->QueryInterface(__uuidof(IAVSDocumentRenderer), (void**)&pCommandRenderer);
|
||||
|
||||
if (NULL != pCommandRenderer)
|
||||
{
|
||||
oImagePainter.DrawFromFile(pRenderer);
|
||||
RELEASEINTERFACE(pCommandRenderer);
|
||||
bNeedDraw = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (bNeedDraw)
|
||||
{
|
||||
oImagePainter.Draw(pRenderer, dDPIX, dDPIY);
|
||||
}
|
||||
}
|
||||
|
||||
m_pThread->CheckSuspend();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
CGdiPlusInit m_oInit;
|
||||
CXMLDecoder m_oDecoder;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> xml-<2D><>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>.
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
// 1) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> xml videosource
|
||||
// 2) <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> XmlRenderer'<27>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> xml-fo
|
||||
CAtlArray<CPageInfo> m_arPages;
|
||||
|
||||
// xsl-fo
|
||||
CString m_strFoXml;
|
||||
|
||||
// <20><> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...
|
||||
CAtlArray<IAVSRenderer*> m_arRenderers;
|
||||
|
||||
public:
|
||||
__event __interface _IAVSDocumentPainterEvents;
|
||||
|
||||
CAVSDocumentPainter() : m_arRenderers(), m_arPages(), CBaseThread(0)
|
||||
{
|
||||
m_oInit.Init();
|
||||
|
||||
m_strFoXml = _T("");
|
||||
}
|
||||
|
||||
~CAVSDocumentPainter()
|
||||
{
|
||||
Stop();
|
||||
|
||||
size_t nCount = m_arRenderers.GetCount();
|
||||
for (size_t nIndex = 0; nIndex < nCount; ++nIndex)
|
||||
{
|
||||
RELEASEINTERFACE((m_arRenderers[nIndex]));
|
||||
}
|
||||
|
||||
m_arRenderers.RemoveAll();
|
||||
}
|
||||
|
||||
public:
|
||||
STDMETHOD(SetXml)(BSTR bstrXml)
|
||||
{
|
||||
m_arPages.RemoveAll();
|
||||
|
||||
//CString strXml = CString(bstrXml);
|
||||
//strXml = m_oDecoder.DecryptXML(strXml);
|
||||
|
||||
CString strXml = _T("");
|
||||
CString strInput = (CString)bstrXml;
|
||||
if (strInput.Find(_T("TEAMLAB_DOCS")) == 0)
|
||||
strXml = strInput.Mid(12);
|
||||
else
|
||||
strXml = m_oDecoder.DecryptXML(bstrXml);
|
||||
|
||||
m_strFoXml = _T("");
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
XmlUtils::CXmlNode oRootNode;
|
||||
XmlUtils::CXmlNode XmlSingleSourceNode;
|
||||
|
||||
BOOL bIsVideoSource = FALSE;
|
||||
if (oRootNode.FromXmlString(strXml))
|
||||
{
|
||||
if (_T("Tracks") == oRootNode.GetName())
|
||||
{
|
||||
XmlUtils::CXmlNodes oUsers;
|
||||
if (oRootNode.GetNodes(g_cpszXMLMultiSource, oUsers))
|
||||
{
|
||||
if (0 < oUsers.GetCount())
|
||||
{
|
||||
XmlUtils::CXmlNode oMulti;
|
||||
if (oUsers.GetAt(0, oMulti))
|
||||
{
|
||||
if (oMulti.GetNode(g_cpszXMLSingleSource, XmlSingleSourceNode))
|
||||
{
|
||||
bIsVideoSource = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (oRootNode.GetNode(g_cpszXMLSingleSource, XmlSingleSourceNode))
|
||||
{
|
||||
bIsVideoSource = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if ( bIsVideoSource )
|
||||
{
|
||||
XmlUtils::CXmlNode XmlNodeVideo;
|
||||
if ( XmlSingleSourceNode.GetNode ( g_cpszXMLVideoSources, XmlNodeVideo ) )
|
||||
{
|
||||
XmlUtils::CXmlNodes oReader;
|
||||
if (XmlNodeVideo.GetNodes(_T("*"), oReader))
|
||||
{
|
||||
int nSourceCount = oReader.GetCount();
|
||||
if (0 < nSourceCount)
|
||||
{
|
||||
for (int i = 0; i < nSourceCount; ++i)
|
||||
{
|
||||
XmlUtils::CXmlNode oPageNode;
|
||||
oReader.GetAt(i, oPageNode);
|
||||
|
||||
CString sNodeName = oPageNode.GetName();
|
||||
if (g_cpszXMLColorSource == sNodeName)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>??)
|
||||
if (0 == i)
|
||||
{
|
||||
int nColor = XmlUtils::GetInteger(oPageNode.GetAttributeOrValue(_T("Color"), _T("-1")));
|
||||
if (0 == nColor)
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeTransforms;
|
||||
if (!oPageNode.GetNode(g_cpszXMLVideoTransforms, oNodeTransforms))
|
||||
{
|
||||
// <20><><EFBFBD> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_arPages.Add();
|
||||
m_arPages[m_arPages.GetCount() - 1].m_strPageInfo = oPageNode.GetXml();
|
||||
m_arPages[m_arPages.GetCount() - 1].m_pThread = this;
|
||||
m_arPages[m_arPages.GetCount() - 1].m_pReceiver = this;
|
||||
|
||||
m_arPages[m_arPages.GetCount() - 1].m_dWidthMetric = Strings::ToDouble(oPageNode.GetAttributeOrValue(_T("widthmetric"), _T("210")));
|
||||
m_arPages[m_arPages.GetCount() - 1].m_dHeightMetric = Strings::ToDouble(oPageNode.GetAttributeOrValue(_T("heightmetric"), _T("190")));
|
||||
}
|
||||
else if (g_cpszXMLImageSource == sNodeName)
|
||||
{
|
||||
m_arPages.Add();
|
||||
m_arPages[m_arPages.GetCount() - 1].m_strPageInfo = oPageNode.GetXml();
|
||||
m_arPages[m_arPages.GetCount() - 1].m_pThread = this;
|
||||
m_arPages[m_arPages.GetCount() - 1].m_pReceiver = this;
|
||||
|
||||
m_arPages[m_arPages.GetCount() - 1].m_dWidthMetric = Strings::ToDouble(oPageNode.GetAttributeOrValue(_T("widthmetric"), _T("210")));
|
||||
m_arPages[m_arPages.GetCount() - 1].m_dHeightMetric = Strings::ToDouble(oPageNode.GetAttributeOrValue(_T("heightmetric"), _T("190")));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> fo - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
// <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> XmlRenderer.
|
||||
// <20><> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//m_strFoXml = GetCStringFromUTF8((CStringA)strXml);
|
||||
m_strFoXml = DeleteRootNode(strXml);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
STDMETHOD(AddRenderer)(IUnknown* punkRenderer)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><>...
|
||||
size_t nCount = m_arRenderers.GetCount();
|
||||
for (size_t nIndex = 0; nIndex < nCount; ++nIndex)
|
||||
{
|
||||
if (punkRenderer == m_arRenderers[nIndex])
|
||||
{
|
||||
// <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
IAVSRenderer* pRenderer = NULL;
|
||||
if (NULL != punkRenderer)
|
||||
punkRenderer->QueryInterface(__uuidof(IAVSRenderer), (void**)&pRenderer);
|
||||
|
||||
if (NULL != pRenderer)
|
||||
{
|
||||
m_arRenderers.Add(pRenderer);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHOD(RemoveRenderer)(IUnknown* punkRenderer)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><>...
|
||||
size_t nCount = m_arRenderers.GetCount();
|
||||
for (size_t nIndex = 0; nIndex < nCount; ++nIndex)
|
||||
{
|
||||
if (punkRenderer == m_arRenderers[nIndex])
|
||||
{
|
||||
RELEASEINTERFACE((m_arRenderers[nIndex]));
|
||||
m_arRenderers.RemoveAt(nIndex);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHOD(Start)()
|
||||
{
|
||||
if (IsRunned())
|
||||
return S_FALSE;
|
||||
|
||||
StartWork(m_lThreadPriority);
|
||||
return S_OK;
|
||||
}
|
||||
STDMETHOD(Stop)()
|
||||
{
|
||||
StopWork();
|
||||
return S_OK;
|
||||
}
|
||||
STDMETHOD(Suspend)()
|
||||
{
|
||||
SuspendWork();
|
||||
return S_OK;
|
||||
}
|
||||
STDMETHOD(Resume)()
|
||||
{
|
||||
ResumeWork();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHOD(get_Status)(LONG* pStatus)
|
||||
{
|
||||
*pStatus = AVS_OFFICEEDITOR_STATUS_NONE;
|
||||
if (m_bRunThread)
|
||||
*pStatus = AVS_OFFICEEDITOR_STATUS_STARTED;
|
||||
return S_OK;
|
||||
}
|
||||
STDMETHOD(get_Priority)(LONG* pPriority)
|
||||
{
|
||||
*pPriority = GetPriority();
|
||||
return S_OK;
|
||||
}
|
||||
STDMETHOD(put_Priority)(LONG Priority)
|
||||
{
|
||||
m_lThreadPriority = Priority;
|
||||
if (IsRunned())
|
||||
{
|
||||
::SetThreadPriority(m_hThread, m_lThreadPriority);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHOD(SetAdditionalParam)(BSTR ParamName, VARIANT ParamValue)
|
||||
{
|
||||
CString sParamName; sParamName = ParamName;
|
||||
if (g_csBlowfishKeyParamName == sParamName)
|
||||
{
|
||||
if (!m_oDecoder.SetBlowfishKey(ParamValue.punkVal))
|
||||
return S_FALSE;
|
||||
}
|
||||
if (_T("OnCompletePage") == sParamName)
|
||||
{
|
||||
OnCompletePage();
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
STDMETHOD(GetAdditionalParam)(BSTR ParamName, VARIANT* ParamValue)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
virtual DWORD ThreadProc()
|
||||
{
|
||||
if (!CRegistratorClient::IsRegistered())
|
||||
return S_OK;
|
||||
|
||||
CoInitialize(NULL);
|
||||
|
||||
if (_T("") == m_strFoXml)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
size_t nCountPages = m_arPages.GetCount();
|
||||
|
||||
for (size_t nIndex = 0; nIndex < nCountPages; ++nIndex)
|
||||
{
|
||||
size_t nRendCount = m_arRenderers.GetCount();
|
||||
|
||||
//
|
||||
//Suspend();
|
||||
|
||||
OnNewPage(m_arPages[nIndex].m_dWidthMetric, m_arPages[nIndex].m_dHeightMetric);
|
||||
|
||||
//
|
||||
CheckSuspend();
|
||||
|
||||
for (size_t nRendIndex = 0; nRendIndex < nRendCount; ++nRendIndex)
|
||||
{
|
||||
if (NULL == m_arRenderers[nRendIndex])
|
||||
continue;
|
||||
|
||||
m_arRenderers[nRendIndex]->NewPage();
|
||||
|
||||
m_arRenderers[nRendIndex]->put_Width(m_arPages[nIndex].m_dWidthMetric);
|
||||
m_arRenderers[nRendIndex]->put_Height(m_arPages[nIndex].m_dHeightMetric);
|
||||
}
|
||||
|
||||
for (size_t nRendIndex = 0; nRendIndex < nRendCount; ++nRendIndex)
|
||||
{
|
||||
if (NULL == m_arRenderers[nRendIndex])
|
||||
continue;
|
||||
|
||||
double dDPIX = -1;
|
||||
double dDPIY = -1;
|
||||
|
||||
if (NULL != m_arRenderers[nRendIndex])
|
||||
{
|
||||
VARIANT var;
|
||||
var.vt = VT_R8;
|
||||
var.dblVal = -1;
|
||||
|
||||
m_arRenderers[nRendIndex]->GetAdditionalParam(L"DPIX", &var);
|
||||
dDPIX = var.dblVal;
|
||||
|
||||
var.dblVal = -1;
|
||||
m_arRenderers[nRendIndex]->GetAdditionalParam(L"DPIY", &var);
|
||||
dDPIY = var.dblVal;
|
||||
}
|
||||
|
||||
m_arPages[nIndex].Render(m_arRenderers[nRendIndex], this, dDPIX, dDPIY);
|
||||
}
|
||||
|
||||
//
|
||||
//Suspend();
|
||||
|
||||
IWorker_OnCompletePage();
|
||||
|
||||
OnProgress(100 * (nIndex + 1) / nCountPages);
|
||||
CheckSuspend();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 1) convert to doct
|
||||
Docx2::IAVSOfficeDocxFile2Ptr pDocx2;
|
||||
pDocx2.CreateInstance(Docx2::CLSID_CAVSOfficeDocxFile2);
|
||||
|
||||
BSTR bsInput = m_strFoXml.AllocSysString();
|
||||
CString strOutput = m_strFoXml + _T("\\Editor.bin");
|
||||
BSTR bsOutput = strOutput.AllocSysString();
|
||||
VARIANT varNoBase64;
|
||||
varNoBase64.vt = VT_BOOL;
|
||||
varNoBase64.boolVal = VARIANT_TRUE;
|
||||
pDocx2->SetAdditionalParam(L"NoBase64Save", varNoBase64);
|
||||
pDocx2->OpenFile(bsInput, bsOutput);
|
||||
SysFreeString(bsInput);
|
||||
SysFreeString(bsOutput);
|
||||
|
||||
// 2) open doct to documentrenderer
|
||||
if (m_arRenderers.GetCount() > 0)
|
||||
{
|
||||
DoctRenderer::IDoctRendererPtr pDoct;
|
||||
pDoct.CreateInstance(DoctRenderer::CLSID_CDoctRenderer);
|
||||
|
||||
IUnknown* pThis = NULL;
|
||||
this->QueryInterface(IID_IUnknown, (void**)&pThis);
|
||||
VARIANT var;
|
||||
var.punkVal = pThis;
|
||||
pDoct->SetAdditionalParam(L"Parent", var);
|
||||
RELEASEINTERFACE(pThis);
|
||||
|
||||
IUnknown* punkRenderer = NULL;
|
||||
m_arRenderers[0]->QueryInterface(IID_IUnknown, (void**)&punkRenderer);
|
||||
|
||||
BSTR bsFile = m_strFoXml.AllocSysString();
|
||||
pDoct->OpenFile(bsFile, punkRenderer);
|
||||
SysFreeString(bsFile);
|
||||
RELEASEINTERFACE(punkRenderer);
|
||||
}
|
||||
|
||||
/*
|
||||
XmlUtils::CXmlNode oNodeFo;
|
||||
if (oNodeFo.FromXmlString(m_strFoXml, _T("xmlns:fo='http://www.w3.org/1999/XSL/Format'")))
|
||||
{
|
||||
InternalFromXmlNode(oNodeFo);
|
||||
|
||||
for (size_t nIndex = 0; nIndex < m_arRenderers.GetCount(); ++nIndex)
|
||||
{
|
||||
BOOL bIsLastPage = FALSE;
|
||||
|
||||
do
|
||||
{
|
||||
if (!m_bRunThread)
|
||||
break;
|
||||
|
||||
CheckSuspend();
|
||||
bIsLastPage = DrawText(m_arRenderers[nIndex], 1.0);
|
||||
}
|
||||
while (!bIsLastPage);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
OnStop();
|
||||
CoUninitialize();
|
||||
m_bRunThread = FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void OnSendEvent(LONG lType, LONG lParam1, LONG lParam2)
|
||||
{
|
||||
switch (lType)
|
||||
{
|
||||
case OFFICEEDITOR_PROGRESS_TYPE_ERROR:
|
||||
{
|
||||
OnError(lParam1);
|
||||
break;
|
||||
}
|
||||
case OFFICEEDITOR_PROGRESS_TYPE_STOP:
|
||||
{
|
||||
OnStop();
|
||||
break;
|
||||
}
|
||||
case OFFICEEDITOR_PROGRESS_TYPE_PAGE:
|
||||
{
|
||||
OnProgress(lParam1);
|
||||
break;
|
||||
}
|
||||
case OFFICEEDITOR_PROGRESS_TYPE_ELEMENT:
|
||||
{
|
||||
OnProgressParce(OFFICEEDITOR_PROGRESS_TYPE_ELEMENT, lParam1);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
// IWorker events
|
||||
virtual void IWorker_OnNewPage(double dWidthMm, double dHeightMm)
|
||||
{
|
||||
//
|
||||
//Suspend();
|
||||
|
||||
OnNewPage(dWidthMm, dHeightMm);
|
||||
|
||||
//
|
||||
CheckSuspend();
|
||||
|
||||
if (0 < m_arRenderers[0])
|
||||
{
|
||||
SetRenderer(m_arRenderers[0]);
|
||||
m_arRenderers[0]->NewPage();
|
||||
|
||||
m_arRenderers[0]->put_Width(dWidthMm);
|
||||
m_arRenderers[0]->put_Height(dHeightMm);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetRenderer(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void IWorker_OnCompletePage()
|
||||
{
|
||||
//
|
||||
//Suspend();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (0 < m_arRenderers.GetCount())
|
||||
{
|
||||
if (NULL != m_arRenderers[0])
|
||||
{
|
||||
m_arRenderers[0]->EndCommand(c_nPageType);
|
||||
}
|
||||
}
|
||||
|
||||
OnCompletePage();
|
||||
|
||||
//
|
||||
CheckSuspend();
|
||||
}
|
||||
|
||||
virtual void IWorker_OnProgress(double dCompleteness)
|
||||
{
|
||||
LONG lPercents = (LONG)(100 * dCompleteness);
|
||||
OnProgress(lPercents);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
CString GetCStringFromUTF8( CStringA str )
|
||||
{
|
||||
BYTE* pBuffer = (BYTE*)str.GetBuffer();
|
||||
LONG lLen = str.GetLength();
|
||||
|
||||
return GetCStringFromUTF8(pBuffer, lLen);
|
||||
}
|
||||
|
||||
CString DeleteRootNode(CString& str)
|
||||
{
|
||||
int nStart = str.Find(_T("<?xml"));
|
||||
int nEnd = str.Find(_T("?>"));
|
||||
|
||||
if (-1 == nStart)
|
||||
return str;
|
||||
|
||||
return str.Mid(nEnd + 2);
|
||||
}
|
||||
|
||||
CString GetCStringFromUTF8( BYTE* pBuffer, LONG lCount, BOOL bIsRemoveCode = TRUE )
|
||||
{
|
||||
if (bIsRemoveCode)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>...
|
||||
while (('>' != *pBuffer) && (lCount > 0))
|
||||
{
|
||||
++pBuffer;
|
||||
--lCount;
|
||||
}
|
||||
++pBuffer;
|
||||
--lCount;
|
||||
}
|
||||
|
||||
LONG lLenght = 0;
|
||||
|
||||
TCHAR* pUnicodeString = new TCHAR[lCount + 1];
|
||||
LONG lIndexUnicode = 0;
|
||||
|
||||
for (LONG lIndex = 0; lIndex < lCount; ++lIndex)
|
||||
{
|
||||
if (0x00 == (0x80 & pBuffer[lIndex]))
|
||||
{
|
||||
//strRes += (TCHAR)pBuffer[lIndex];
|
||||
pUnicodeString[lIndexUnicode++] = (WCHAR)pBuffer[lIndex];
|
||||
continue;
|
||||
}
|
||||
else if (0x00 == (0x20 & pBuffer[lIndex]))
|
||||
{
|
||||
TCHAR mem = (TCHAR)(((pBuffer[lIndex] & 0x1F) << 6) + (pBuffer[lIndex + 1] & 0x3F));
|
||||
|
||||
//strRes += mem;
|
||||
pUnicodeString[lIndexUnicode++] = mem;
|
||||
|
||||
lIndex += 1;
|
||||
}
|
||||
else if (0x00 == (0x10 & pBuffer[lIndex]))
|
||||
{
|
||||
TCHAR mem = (TCHAR)(((pBuffer[lIndex] & 0x0F) << 12) + ((pBuffer[lIndex + 1] & 0x3F) << 6) + (pBuffer[lIndex + 2] & 0x3F));
|
||||
|
||||
//strRes += mem;
|
||||
pUnicodeString[lIndexUnicode++] = mem;
|
||||
|
||||
lIndex += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
BYTE mem = pBuffer[lIndex];
|
||||
//pUnicodeString[lIndexUnicode++] = mem;
|
||||
}
|
||||
}
|
||||
|
||||
pUnicodeString[lIndexUnicode] = 0;
|
||||
|
||||
CString strRes = (CString)pUnicodeString;
|
||||
RELEASEARRAYOBJECTS(pUnicodeString);
|
||||
|
||||
return strRes;
|
||||
}
|
||||
};
|
||||
@ -1,100 +0,0 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently,
|
||||
// but are changed infrequently
|
||||
|
||||
#pragma once
|
||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||
#define _CRT_NONSTDC_NO_DEPRECATE 1
|
||||
|
||||
#ifndef STRICT
|
||||
#define STRICT
|
||||
#endif
|
||||
|
||||
// Modify the following defines if you have to target a platform prior to the ones specified below.
|
||||
// Refer to MSDN for the latest info on corresponding values for different platforms.
|
||||
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
|
||||
#define WINVER 0x0500 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
|
||||
#define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 2000 or later.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
|
||||
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
|
||||
#define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later.
|
||||
#endif
|
||||
|
||||
#define _ATL_APARTMENT_THREADED
|
||||
//#define _ATL_NO_AUTOMATIC_NAMESPACE
|
||||
|
||||
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
|
||||
|
||||
// turns off ATL's hiding of some common and often safely ignored warning messages
|
||||
#define _ATL_ALL_WARNINGS
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include <atltypes.h>
|
||||
#include <atlctl.h>
|
||||
#include <atlhost.h>
|
||||
#include <atlcoll.h>
|
||||
#include <atldefine.h>
|
||||
|
||||
#include "Gdiplus.h"
|
||||
#pragma comment(lib, "gdiplus.lib")
|
||||
|
||||
// FreeType
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
//#ifdef _VS_2005
|
||||
#pragma comment (lib, "Objects\\Font\\FreeType\\freetype242_vs2005.lib")
|
||||
//#pragma comment (lib, "Objects\\Font\\FreeType\\freetype242_vs2005.lib")
|
||||
//#endif
|
||||
//
|
||||
//#ifdef _VS_2008
|
||||
//#pragma comment (lib, "FreeType\\freetype2312.lib")
|
||||
//#endif
|
||||
|
||||
//#define AVS_CXIMAGE_USE
|
||||
#define CXIMAGE_SUPPORT_ALPHA
|
||||
|
||||
#ifdef AVS_CXIMAGE_USE
|
||||
#pragma comment (lib, "Expat\\lib\\libexpat.lib")
|
||||
|
||||
#pragma comment (lib, "cximage\\zlib\\Release\\zlib.lib")
|
||||
#pragma comment (lib, "cximage\\tiff\\Release\\Tiff.lib")
|
||||
#pragma comment (lib, "cximage\\png\\Release\\png.lib")
|
||||
#pragma comment (lib, "cximage\\mng\\Release\\mng.lib")
|
||||
#pragma comment (lib, "cximage\\jpeg\\Release\\Jpeg.lib")
|
||||
#pragma comment (lib, "cximage\\jbig\\Release\\jbig.lib")
|
||||
#pragma comment (lib, "cximage\\jasper\\Release\\jasper.lib")
|
||||
#pragma comment (lib, "cximage\\raw\\Release\\libdcr.lib")
|
||||
|
||||
#pragma comment (lib, "cximage\\CxImage\\Release\\cximage.lib")
|
||||
#endif
|
||||
#pragma comment (lib, "cximage\\zlib\\Release\\zlib.lib")
|
||||
|
||||
#ifdef _DEBUG
|
||||
#pragma comment (lib, "Debug\\agg2d.lib")
|
||||
#else
|
||||
#pragma comment (lib, "Release\\agg2d.lib")
|
||||
#endif
|
||||
|
||||
#define _AVS_GRAPHICS_
|
||||
using namespace ATL;
|
||||
|
||||
#include "..\..\AVSVideoStudio3\Common\AVSUtils.h"
|
||||
|
||||
#import "..\..\..\Redist\AVSMediaCore3.dll" named_guids raw_interfaces_only rename_namespace("MediaCore"), exclude("tagRECT")
|
||||
#import "..\..\..\Redist\AVSMediaFormatSettings3.dll" named_guids raw_interfaces_only rename_namespace("MediaFormat"), exclude("tagRECT")
|
||||
#import "..\..\..\Redist\AVSImageStudio3.dll" named_guids raw_interfaces_only rename_namespace("ImageStudio")
|
||||
#import "..\..\..\Redist\AVSOfficeStudio\AVSOfficeUniversalConverter.dll" named_guids raw_interfaces_only rename_namespace("DocConverter")
|
||||
|
||||
#import "..\..\TeamlabOffice\trunk\ServerComponents\Redist\ASCOfficeDocxFile2.dll" named_guids raw_interfaces_only rename_namespace("Docx2")
|
||||
#import "..\..\TeamlabOffice\trunk\ServerComponents\Redist\DoctRenderer.dll" named_guids raw_interfaces_only rename_namespace("DoctRenderer")
|
||||
@ -1,615 +0,0 @@
|
||||
/*! \file OfficeFOFile.cpp
|
||||
* \brief Implementation of COfficeFOFile
|
||||
*/
|
||||
|
||||
#include "precompiled_avsofficefofile.h"
|
||||
#include <shlwapi.h>
|
||||
#include "OfficeFOFile.h"
|
||||
#include "utils/helpers.h"
|
||||
|
||||
#define MAX_PATH_LEN 256
|
||||
|
||||
#define XML_HEADER_STRING "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>"
|
||||
#define PACKAGE_HEADER_STRING "<oox:package xmlns:oox=\"urn:oox\">"
|
||||
#define PACKAGE_FOOTER_STRING "</oox:package>"
|
||||
#define PART_HEADER_STRING "<oox:part oox:name=\"%s\">"
|
||||
#define PART_HEADER_STRING_L "<oox:part oox:name=\""
|
||||
#define PART_HEADER_STRING_R "\">"
|
||||
#define PART_FOOTER_STRING "</oox:part>"
|
||||
|
||||
#define array_size( arr ) ( ( sizeof( arr ) ) / ( sizeof( arr[ 0 ] ) ) )
|
||||
|
||||
typedef enum
|
||||
{
|
||||
READER_MODE_INIT = 0,
|
||||
READER_MODE_QUESTION_MARK,
|
||||
READER_MODE_CONTENT
|
||||
}
|
||||
reader_mode;
|
||||
|
||||
static const char input_files[][MAX_PATH_LEN] = {
|
||||
"_rels/.rels",
|
||||
"word/_rels/document.xml.rels",
|
||||
"word/settings.xml",
|
||||
"word/fontTable.xml",
|
||||
"word/styles.xml",
|
||||
"word/numbering.xml",
|
||||
"word/document.xml",
|
||||
"docProps/app.xml",
|
||||
"docProps/core.xml",
|
||||
};
|
||||
|
||||
static const char additional_relationships [ ] [ MAX_PATH_LEN ] =
|
||||
{
|
||||
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",
|
||||
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",
|
||||
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" ,
|
||||
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",
|
||||
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes"
|
||||
};
|
||||
|
||||
static const char nodeAvsProperties[] = "AvsProperties";
|
||||
static const char nodeAvsPropertiesOutputFOFileName[] = "OutputFOFileName";
|
||||
static const char nodeAvsPropertiesTemploraryDir[] = "TemploraryDirectory";
|
||||
|
||||
// COfficeFOFile
|
||||
COfficeFOFile::COfficeFOFile()
|
||||
{
|
||||
HRESULT hr;
|
||||
if FAILED(hr = LoadXSLT()){
|
||||
ATLTRACE2("Cannot load XSL-transform");
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT COfficeFOFile::LoadFromFile(BSTR sSrcFileName, BSTR sDstPath, BSTR sXMLOptions)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT COfficeFOFile::MergeAndEncode(BSTR SrcPath, BSTR DestPath, std::wstring& Result)
|
||||
{
|
||||
HRESULT hr;
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> XSL-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (!CheckXSLTReady())
|
||||
return E_FAIL;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Docx <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
CHECK_HR(LoadDocx(SrcPath, AVS::Utils::ExtractFileName(std::wstring(DestPath))));
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_MergedDocx->save(CComVariant(_T("c:\\temp\\debug_merged_doc.xml")));
|
||||
#endif
|
||||
|
||||
CHECK_HR(DoXSLTransformImpl(m_XSLDoc, m_MergedDocx, Result));
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>-<2D><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//CHECK_HR(CopyMediaFilesFromDocx(sSrcPath, sDstFileName));
|
||||
|
||||
/*
|
||||
DEPRECATE
|
||||
<09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> xml, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*/
|
||||
|
||||
/* HECK_HR(ReplaceImagesPath(std::wstring(sDstFileName), outputXML)); */
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT COfficeFOFile::SaveToFile(BSTR sDstFileName, BSTR sSrcPath, BSTR sXMLOptions)
|
||||
{
|
||||
std::wstring outputXML;
|
||||
HRESULT hr = MergeAndEncode(sSrcPath, sDstFileName, outputXML);
|
||||
if(hr != S_OK)
|
||||
return hr;
|
||||
|
||||
std::string strOutputXml = AVS::Utils::WideStringToUTF8(outputXML);
|
||||
CString strTempXml(strOutputXml.c_str());
|
||||
CStringA strA = m_oEncoder.EncryptXML(strTempXml);
|
||||
BSTR bstrA = strA.AllocSysString();
|
||||
outputXML = std::wstring(bstrA);
|
||||
SysFreeString(bstrA);
|
||||
|
||||
std::ofstream outputFile(std::wstring(sDstFileName).c_str());
|
||||
outputFile << AVS::Utils::WideStringToUTF8(outputXML);
|
||||
outputFile.close();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT COfficeFOFile::GetFOXml(BSTR SrcFile, BSTR* FOXML)
|
||||
{
|
||||
CString strTempXml = (CString)SrcFile;
|
||||
strTempXml = _T("TEAMLAB_DOCS") + strTempXml;
|
||||
*FOXML = strTempXml.AllocSysString();
|
||||
//CStringA strA = m_oEncoder.EncryptXML(strTempXml);
|
||||
//*FOXML = strA.AllocSysString();
|
||||
/*
|
||||
BSTR l_bstrEmpty(L"");
|
||||
std::wstring outputXML;
|
||||
HRESULT hr = MergeAndEncode(SrcFile, l_bstrEmpty, outputXML);
|
||||
if(hr != S_OK)
|
||||
return hr;
|
||||
|
||||
//std::string strOutputXml = AVS::Utils::WideStringToUTF8(outputXML);
|
||||
CString strTempXml(outputXML.c_str());
|
||||
CStringA strA = m_oEncoder.EncryptXML(strTempXml);
|
||||
*FOXML = strA.AllocSysString();
|
||||
//outputXML = std::wstring(bstrA);
|
||||
//SysFreeString(bstrA);
|
||||
*/
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT COfficeFOFile::LoadXMLFromResource(BSTR * xmlStr, WORD resourceID, LPTSTR resourceType)
|
||||
{
|
||||
if (resourceID == IDR_HTML2)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
std::string strXml;
|
||||
LoadXMLFromResource(&strXml, resourceID, resourceType);
|
||||
|
||||
std::string xslStringWithoutBOM;
|
||||
if ((unsigned char)strXml[0] == 0xEF
|
||||
&& (unsigned char)strXml[1] == 0xBB
|
||||
&& (unsigned char)strXml[2] == 0xBF)
|
||||
xslStringWithoutBOM = &strXml[3];
|
||||
else
|
||||
xslStringWithoutBOM = strXml;
|
||||
|
||||
*xmlStr = ::SysAllocString(AVS::Utils::UTF8ToWideString(xslStringWithoutBOM).c_str());
|
||||
#else
|
||||
CString strXml = readFileFromRresource(IDR_REGISTRY1);
|
||||
*xmlStr = strXml.AllocSysString();
|
||||
#endif
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT COfficeFOFile::LoadXMLFromResource(std::string * xmlStr, WORD resourceID, LPTSTR resourceType)
|
||||
{
|
||||
if (!xmlStr)
|
||||
return E_POINTER;
|
||||
|
||||
HINSTANCE hResInstance = ATL::_pModule->GetResourceInstance();
|
||||
if (!hResInstance)
|
||||
return E_FAIL;
|
||||
|
||||
HRSRC hRes = FindResource((HMODULE)hResInstance, MAKEINTRESOURCE(resourceID), resourceType);
|
||||
if (!hRes)
|
||||
return E_FAIL;
|
||||
|
||||
DWORD sizeofXML = SizeofResource((HMODULE) hResInstance, hRes);
|
||||
|
||||
HGLOBAL hData = LoadResource((HMODULE) hResInstance, hRes);
|
||||
|
||||
if (!hData)
|
||||
return false;
|
||||
|
||||
LPVOID lpData = LockResource(hData);
|
||||
if (!lpData)
|
||||
return E_FAIL;
|
||||
|
||||
char * resourceXML = new char[sizeofXML + 1];
|
||||
memset(reinterpret_cast<void*>(resourceXML), 0, sizeofXML+1);
|
||||
memcpy_s(reinterpret_cast<void*>(resourceXML), sizeofXML + 1, lpData, sizeofXML);
|
||||
*xmlStr = (char*)resourceXML;
|
||||
free(resourceXML);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT COfficeFOFile::LoadXSLT()
|
||||
{
|
||||
HRESULT hr;
|
||||
m_xsltString = "";
|
||||
m_XSLDoc.Release();
|
||||
|
||||
BSTR xslTempString;
|
||||
CHECK_HR(LoadXMLFromResource(&xslTempString, IDR_HTML2, RT_HTML));
|
||||
|
||||
CComPtr<IXMLDOMDOCUMENT> pXSLDoc;
|
||||
|
||||
CHECK_HR(hr = CreateMSXMLDocument(&pXSLDoc, MS_XML_VERSION));
|
||||
|
||||
VARIANT_BOOL bSuccessful = VARIANT_FALSE;
|
||||
|
||||
hr = pXSLDoc->loadXML(xslTempString, &bSuccessful);
|
||||
SysFreeString(xslTempString);
|
||||
if (FAILED(hr) || bSuccessful == VARIANT_FALSE)
|
||||
return hr;
|
||||
|
||||
m_XSLDoc.Attach(pXSLDoc.Detach());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT COfficeFOFile::LoadDocx(BSTR bstrPath)
|
||||
{
|
||||
return LoadDocx(bstrPath, std::wstring(L""));
|
||||
}
|
||||
|
||||
|
||||
HRESULT COfficeFOFile::LoadDocx(BSTR bstrPath, std::wstring & foFileName)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
std::vector<std::wstring> relationshipsFiles;
|
||||
CalcRels(bstrPath, relationshipsFiles);
|
||||
|
||||
std::string mergedDocx;
|
||||
CHECK_HR(MergeDocxIntoSingleXML(bstrPath, mergedDocx, relationshipsFiles, foFileName));
|
||||
|
||||
CComPtr<IXMLDOMDOCUMENT> pMergedDocx;
|
||||
CHECK_HR(CreateMSXMLDocument(&pMergedDocx, MS_XML_VERSION));
|
||||
|
||||
VARIANT_BOOL bSuccessful = VARIANT_FALSE;
|
||||
pMergedDocx->put_validateOnParse(VARIANT_FALSE);
|
||||
hr = pMergedDocx->loadXML(CComBSTR(AVS::Utils::UTF8ToWideString(mergedDocx).c_str()), &bSuccessful);
|
||||
if (S_FALSE == hr)
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(hr) || bSuccessful == VARIANT_FALSE)
|
||||
return hr;
|
||||
|
||||
m_MergedDocx.Attach(pMergedDocx.Detach());
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT COfficeFOFile::DoXSLTransformImpl(IXMLDOMDOCUMENT * xslt, IXMLDOMDOCUMENT * xml, std::wstring & resultXML)
|
||||
{
|
||||
HRESULT hr;
|
||||
IXMLDOMElement * xslRootElm = NULL;
|
||||
hr = xslt->get_documentElement(&xslRootElm);
|
||||
BSTR bsResultXML = NULL;
|
||||
if (S_OK != (hr = xml->transformNode(xslRootElm, &bsResultXML)))
|
||||
return hr;
|
||||
|
||||
resultXML = std::wstring(bsResultXML);
|
||||
SysFreeString(bsResultXML);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT COfficeFOFile::MergeDocxIntoSingleXMLImpl1(BSTR bstrPath, std::string & mergedDocx, const std::vector<std::wstring> & additionalFiles)
|
||||
{
|
||||
return MergeDocxIntoSingleXMLImpl1(bstrPath, mergedDocx, additionalFiles, std::wstring(L""));
|
||||
}
|
||||
|
||||
// DEPRECATE
|
||||
// from AVSOfficeHtmpFile
|
||||
HRESULT COfficeFOFile::MergeDocxIntoSingleXMLImpl1(BSTR bstrPath, std::string & mergedDocx, const std::vector<std::wstring> & additionalFiles, std::wstring & outputFOFileName)
|
||||
{
|
||||
/*
|
||||
<09><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> XML-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*/
|
||||
|
||||
if (!bstrPath)
|
||||
return E_INVALIDARG;
|
||||
|
||||
std::wstring input_dir = bstrPath;
|
||||
std::stringstream outputString;
|
||||
|
||||
char buff [ 512 ] = { 0 };
|
||||
wchar_t wbuff [ MAX_PATH_LEN ] = { 0 };
|
||||
size_t len = 0;
|
||||
|
||||
outputString << XML_HEADER_STRING;
|
||||
outputString << PACKAGE_HEADER_STRING;
|
||||
|
||||
std::vector<std::string> inputFilesArray;
|
||||
for (UINT i = 0; i < array_size( input_files ); ++i)
|
||||
inputFilesArray.push_back(input_files[i]);
|
||||
|
||||
for (UINT i = 0; i < additionalFiles.size(); ++i)
|
||||
inputFilesArray.push_back(AVS::Utils::WideStringToANSI(additionalFiles[i]));
|
||||
|
||||
for (UINT i = 0; i < inputFilesArray.size(); ++i)
|
||||
{
|
||||
FILE * tmp = NULL;
|
||||
wchar_t tmp_path [ MAX_PATH_LEN * 2 ] = { 0 };
|
||||
reader_mode mode = READER_MODE_INIT;
|
||||
|
||||
swprintf_s(tmp_path, MAX_PATH_LEN * 2, L"%s/%s", input_dir.c_str(), AVS::Utils::ANSIToWideString(inputFilesArray[ i ]).c_str() );
|
||||
_wfopen_s(&tmp, tmp_path, L"r+" );
|
||||
if ( tmp )
|
||||
{
|
||||
outputString << PART_HEADER_STRING_L << inputFilesArray[ i ] << PART_HEADER_STRING_R;
|
||||
|
||||
while ( !feof( tmp ) )
|
||||
{
|
||||
char c = fgetc( tmp );
|
||||
switch ( mode )
|
||||
{
|
||||
case READER_MODE_INIT:
|
||||
if ( c == '?' )
|
||||
{
|
||||
mode = READER_MODE_QUESTION_MARK;
|
||||
}
|
||||
break;
|
||||
case READER_MODE_QUESTION_MARK:
|
||||
mode = ( c == '>' ) ? READER_MODE_CONTENT : READER_MODE_INIT;
|
||||
break;
|
||||
case READER_MODE_CONTENT:
|
||||
outputString << c;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
outputString << PART_FOOTER_STRING;
|
||||
fclose( tmp );
|
||||
}
|
||||
else
|
||||
continue;
|
||||
}
|
||||
|
||||
if (outputFOFileName != L"")
|
||||
{
|
||||
outputString << PART_HEADER_STRING_L << nodeAvsProperties << PART_HEADER_STRING_R;
|
||||
outputString << "<" << "oox:" << nodeAvsProperties << ">";
|
||||
outputString << "<" << "oox:" << nodeAvsPropertiesOutputFOFileName << " value=\"" << AVS::Utils::WideStringToUTF8(outputFOFileName) << "\"/>";
|
||||
outputString << "</" << "oox:" << nodeAvsProperties << ">";
|
||||
outputString << PART_FOOTER_STRING;
|
||||
outputString << PACKAGE_FOOTER_STRING ;
|
||||
}
|
||||
|
||||
mergedDocx = outputString.str();
|
||||
|
||||
std::ofstream outputFile(L"e:/01.xml");
|
||||
outputFile << mergedDocx;
|
||||
outputFile.close();
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*! Merge XML <20><><EFBFBD> xmllite-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*/
|
||||
HRESULT COfficeFOFile::MergeDocxIntoSingleXMLImpl2(BSTR bstrPath, std::string & mergedDocx, const std::vector<std::wstring> & additionalFiles)
|
||||
{
|
||||
return MergeDocxIntoSingleXMLImpl2(bstrPath, mergedDocx, additionalFiles, std::wstring(L""));
|
||||
}
|
||||
|
||||
/*! Merge XML <20><><EFBFBD> xmllite-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*/
|
||||
HRESULT COfficeFOFile::MergeDocxIntoSingleXMLImpl2(BSTR bstrPath, std::string & mergedDocx, const std::vector<std::wstring> & additionalFiles, std::wstring & outputFOFileName)
|
||||
{
|
||||
HRESULT hr;
|
||||
CComPtr<IXmlWriter> pWriter;
|
||||
CComPtr<IStream> pOutFileStream;
|
||||
|
||||
CHECK_HR(AVS::StringStreamImpl::CreateStream(&pOutFileStream));
|
||||
CHECK_HR(CreateXmlWriter(__uuidof(IXmlWriter), (void**)&pWriter, NULL));
|
||||
|
||||
if (!pOutFileStream)
|
||||
return E_FAIL;
|
||||
|
||||
CHECK_HR(pWriter->SetOutput(pOutFileStream));
|
||||
CHECK_HR(pWriter->WriteStartDocument(XmlStandalone_Yes));
|
||||
|
||||
wchar_t * oox_ns = L"oox";
|
||||
wchar_t * oox_uri = L"urn:oox";
|
||||
|
||||
CHECK_HR(pWriter->WriteStartElement(oox_ns, L"package", oox_uri));
|
||||
|
||||
std::vector<std::string> inputFilesArray;
|
||||
for (UINT i = 0; i < array_size( input_files ); ++i)
|
||||
inputFilesArray.push_back(input_files[i]);
|
||||
|
||||
for (UINT i = 0; i < additionalFiles.size(); ++i)
|
||||
inputFilesArray.push_back(AVS::Utils::WideStringToANSI(additionalFiles[i]));
|
||||
|
||||
std::wstring input_dir = bstrPath;
|
||||
for (UINT i = 0; i < inputFilesArray.size(); ++i)
|
||||
{
|
||||
std::wstring tmp_path;
|
||||
tmp_path = input_dir + L"/" + AVS::Utils::ANSIToWideString(inputFilesArray[i]);
|
||||
|
||||
CComPtr<IStream> pFileStream;
|
||||
CComPtr<IXmlReader> pReader;
|
||||
|
||||
if (FAILED(hr = SHCreateStreamOnFileW(tmp_path.c_str(), STGM_READ, &pFileStream)) || !pFileStream)
|
||||
continue;
|
||||
|
||||
CHECK_HR(CreateXmlReader(__uuidof(IXmlReader), (void**) &pReader, NULL));
|
||||
CHECK_HR(pReader->SetInput(pFileStream));
|
||||
CHECK_HR(pWriter->WriteStartElement(oox_ns, L"part", oox_uri));
|
||||
CHECK_HR(pWriter->WriteAttributeString(oox_ns, L"name", oox_uri, AVS::Utils::ANSIToWideString(inputFilesArray[i]).c_str()));
|
||||
CHECK_HR(pWriter->WriteNode(pReader, true));
|
||||
CHECK_HR(pWriter->WriteFullEndElement());
|
||||
}
|
||||
|
||||
|
||||
CHECK_HR(pWriter->WriteStartElement(oox_ns, L"part", oox_uri));
|
||||
CHECK_HR(pWriter->WriteAttributeString(oox_ns, L"name", oox_uri, AVS::Utils::ANSIToWideString(nodeAvsProperties).c_str() ));
|
||||
|
||||
CHECK_HR(pWriter->WriteStartElement(oox_ns, AVS::Utils::ANSIToWideString(nodeAvsProperties).c_str(), oox_uri));
|
||||
if (outputFOFileName != L"")
|
||||
{
|
||||
CHECK_HR(pWriter->WriteStartElement(oox_ns, AVS::Utils::ANSIToWideString(nodeAvsPropertiesOutputFOFileName).c_str(), oox_uri));
|
||||
CHECK_HR(pWriter->WriteAttributeString(NULL, L"value", NULL, outputFOFileName.c_str() ));
|
||||
CHECK_HR(pWriter->WriteEndElement());
|
||||
}
|
||||
|
||||
CHECK_HR(pWriter->WriteStartElement(oox_ns, AVS::Utils::ANSIToWideString(nodeAvsPropertiesTemploraryDir).c_str(), oox_uri));
|
||||
CHECK_HR(pWriter->WriteAttributeString(NULL, L"value", NULL, input_dir.c_str() ));
|
||||
CHECK_HR(pWriter->WriteEndElement());
|
||||
|
||||
CHECK_HR(pWriter->WriteEndElement());
|
||||
|
||||
CHECK_HR(pWriter->WriteEndElement());
|
||||
|
||||
CHECK_HR(pWriter->WriteEndElement());
|
||||
CHECK_HR(pWriter->WriteEndDocument());
|
||||
CHECK_HR(pWriter->Flush());
|
||||
|
||||
CComPtr<AVS::IStringStream> pStringStream;
|
||||
CHECK_HR(pOutFileStream.QueryInterface(&pStringStream));
|
||||
CHECK_HR(pStringStream->GetString(&mergedDocx));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT COfficeFOFile::MergeDocxIntoSingleXML(BSTR bstrPath, std::string & mergedDocx, const std::vector<std::wstring> & additionalFiles)
|
||||
{
|
||||
return COfficeFOFile::MergeDocxIntoSingleXML(bstrPath, mergedDocx, additionalFiles, std::wstring(L""));
|
||||
}
|
||||
|
||||
HRESULT COfficeFOFile::MergeDocxIntoSingleXML(BSTR bstrPath, std::string & mergedDocx, const std::vector<std::wstring> & additionalFiles, std::wstring & outputFOFileName)
|
||||
{
|
||||
HRESULT hr;
|
||||
if SUCCEEDED(hr = MergeDocxIntoSingleXMLImpl2(bstrPath, mergedDocx, additionalFiles, outputFOFileName))
|
||||
return hr;
|
||||
|
||||
// <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> xmllite (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?)
|
||||
return MergeDocxIntoSingleXMLImpl1(bstrPath, mergedDocx, additionalFiles, outputFOFileName);
|
||||
}
|
||||
|
||||
bool COfficeFOFile::CheckXSLTReady() const
|
||||
{
|
||||
return (!!m_XSLDoc);
|
||||
}
|
||||
|
||||
HRESULT COfficeFOFile::FinalConstruct()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void COfficeFOFile::FinalRelease()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
HRESULT COfficeFOFile::CreateMSXMLDocument(IXMLDOMDOCUMENT ** ixmlDomDocument, long version)
|
||||
{
|
||||
HRESULT hr;
|
||||
CComPtr<IXMLDOMDOCUMENT> xmlDomDocument;
|
||||
switch(version)
|
||||
{
|
||||
case 6:
|
||||
if FAILED(hr = xmlDomDocument.CoCreateInstance(__uuidof(DOMDocument60)))
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> MSXML <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
return CreateMSXMLDocument(ixmlDomDocument, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
*ixmlDomDocument = xmlDomDocument.Detach();
|
||||
return hr;
|
||||
}
|
||||
case 4:
|
||||
CHECK_HR(xmlDomDocument.CoCreateInstance(__uuidof(DOMDocument40)));
|
||||
|
||||
*ixmlDomDocument = xmlDomDocument.Detach();
|
||||
return hr;
|
||||
default:
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT COfficeFOFile::CopyMediaFilesFromDocx(BSTR bstrOOXPath, BSTR bstrFOPath)
|
||||
{
|
||||
std::wstring outputDirName = std::wstring(bstrFOPath) + L".files";
|
||||
std::wstring inputDirMask = std::wstring(bstrOOXPath) + L"/word/media/*.*";
|
||||
WIN32_FIND_DATAW FindFileData = { 0 };
|
||||
HANDLE hCopy = FindFirstFileW(inputDirMask.c_str(), &FindFileData );
|
||||
BOOL findReslut = (INVALID_HANDLE_VALUE != hCopy);
|
||||
if (findReslut)
|
||||
{
|
||||
if (!CreateDirectoryW(outputDirName.c_str(), NULL))
|
||||
{
|
||||
DWORD lastError = GetLastError();
|
||||
if (ERROR_ALREADY_EXISTS != lastError)
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
while (findReslut)
|
||||
{
|
||||
std::wstring file_from = std::wstring(bstrOOXPath) + L"/word/media/" + std::wstring(FindFileData.cFileName);
|
||||
std::wstring file_to = outputDirName + L"/" + std::wstring(FindFileData.cFileName);
|
||||
CopyFileW(file_from.c_str(), file_to.c_str(), FALSE );
|
||||
findReslut = FindNextFileW( hCopy, &FindFileData );
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
\deprecate <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> xslt-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*/
|
||||
HRESULT COfficeFOFile::ReplaceImagesPath(const std::wstring & stringFOPath, std::wstring &foXML)
|
||||
{
|
||||
//std::wstring imagePath = std::wstring(L".\\") + AVS::Utils::ExtractFileName(stringFOPath) + L".files";
|
||||
//boost::algorithm::replace_all(foXML, L"avsooximagesource:media", imagePath);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT COfficeFOFile::CalcRels(BSTR bstrPath, std::vector<std::wstring> & relationshipsFiles, const std::string & relsName)
|
||||
{
|
||||
HRESULT hr;
|
||||
std::wstring input_dir = bstrPath;
|
||||
CComPtr<IXMLDOMDOCUMENT> pXMLDoc;
|
||||
CHECK_HR(CreateMSXMLDocument(&pXMLDoc, MS_XML_VERSION));
|
||||
|
||||
input_dir += std::wstring(L"\\word\\_rels\\") + AVS::Utils::ANSIToWideString(relsName) + std::wstring(L".xml.rels");
|
||||
|
||||
VARIANT_BOOL isSuccessful = VARIANT_FALSE;
|
||||
CHECK_HR(pXMLDoc->load(CComVariant(input_dir.c_str()), &isSuccessful));
|
||||
if (isSuccessful != VARIANT_TRUE)
|
||||
return S_OK;
|
||||
|
||||
std::vector<std::wstring> reslutVector;
|
||||
for (int i = 0; i < array_size(additional_relationships); ++i)
|
||||
GetRelationshipValues(pXMLDoc, additional_relationships[i], reslutVector);
|
||||
|
||||
relationshipsFiles = reslutVector;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT COfficeFOFile::GetRelationshipValues(CComPtr<IXMLDOMDOCUMENT> & xmlDoc, const std::string & relType, std::vector<std::wstring> & relTarget)
|
||||
{
|
||||
HRESULT hr;
|
||||
std::vector<std::wstring> resultVector;
|
||||
|
||||
std::string queryString = std::string("//*[@Type='") + relType + std::string("']/@Target");
|
||||
CComPtr<IXMLDOMNodeList> pNodeList;
|
||||
CHECK_HR(xmlDoc->selectNodes(CComBSTR(queryString.c_str()), &pNodeList));
|
||||
if (!pNodeList)
|
||||
return E_UNEXPECTED;
|
||||
|
||||
long nodeListLength = 0;
|
||||
CHECK_HR(pNodeList->get_length(&nodeListLength));
|
||||
if (0 == nodeListLength)
|
||||
{
|
||||
ATLTRACE2("Warning: rels for type %s not found\n", relType.c_str());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
for (int nodeIndex = 0; nodeIndex < nodeListLength; ++nodeIndex)
|
||||
{
|
||||
CComPtr<IXMLDOMNode> pCurrentNode;
|
||||
if FAILED(pNodeList->get_item(nodeIndex, &pCurrentNode))
|
||||
{
|
||||
ATLTRACE2("Warning: cannot get item from node list\n");
|
||||
continue;
|
||||
}
|
||||
CComVariant pNodeValue;
|
||||
if FAILED(pCurrentNode->get_nodeValue(&pNodeValue))
|
||||
{
|
||||
ATLTRACE2("Warning: cannot get node value\n");
|
||||
continue;
|
||||
}
|
||||
if (VT_BSTR == pNodeValue.vt)
|
||||
{
|
||||
relTarget.push_back(std::wstring(L"word/") + std::wstring(pNodeValue.bstrVal));
|
||||
relTarget.push_back(std::wstring(L"word/_rels/") + std::wstring(pNodeValue.bstrVal) + std::wstring(L".rels"));
|
||||
}else
|
||||
{
|
||||
ATLTRACE2("Warning: unknown attribute type");
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@ -1,74 +0,0 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently,
|
||||
// but are changed infrequently
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef STRICT
|
||||
#define STRICT
|
||||
#endif
|
||||
|
||||
// Modify the following defines if you have to target a platform prior to the ones specified below.
|
||||
// Refer to MSDN for the latest info on corresponding values for different platforms.
|
||||
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
|
||||
#define WINVER 0x0500 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
|
||||
#define _WIN32_WINNT 0x0500 // Change this to the appropriate value to target Windows 2000 or later.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
|
||||
#define _WIN32_WINDOWS 0x0510 // Change this to the appropriate value to target Windows Me or later.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
|
||||
#define _WIN32_IE 0x0501 // Change this to the appropriate value to target IE 5.0 or later.
|
||||
#endif
|
||||
|
||||
#define _ATL_APARTMENT_THREADED
|
||||
#define _ATL_NO_AUTOMATIC_NAMESPACE
|
||||
|
||||
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
|
||||
|
||||
// turns off ATL's hiding of some common and often safely ignored warning messages
|
||||
#define _ATL_ALL_WARNINGS
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include <atltypes.h>
|
||||
#include <atlctl.h>
|
||||
#include <atlhost.h>
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
|
||||
#include "utils\stringutils.h"
|
||||
//#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "xmllite.h"
|
||||
#pragma comment(lib,"xmllite.lib")
|
||||
|
||||
|
||||
#if (MS_XML_VERSION == 6)
|
||||
#include "msxml6.h"
|
||||
#define DOMDOCUMENT DOMDocument60
|
||||
#define IXMLDOMDOCUMENT IXMLDOMDocument3
|
||||
#elif (MS_XML_VERSION == 4)
|
||||
#include "msxml2.h"
|
||||
#define DOMDOCUMENT DOMDocument40
|
||||
#define IXMLDOMDOCUMENT IXMLDOMDocument2
|
||||
#else
|
||||
#error Invalid MS_XML_VERSION
|
||||
#endif
|
||||
|
||||
#define CHECK_HR(HR) if FAILED(hr = (HR)) return hr;
|
||||
|
||||
#import "..\..\..\Redist\AVSMediaCore3.dll" named_guids raw_interfaces_only rename_namespace("MediaCore"), exclude("tagRECT")
|
||||
|
||||
using namespace ATL;
|
||||
@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Joiner</RootNamespace>
|
||||
<AssemblyName>Joiner</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.DataSetExtensions">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@ -1,20 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Joiner", "Joiner.csproj", "{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@ -1,194 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace Joiner
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
string strApplication = Directory.GetCurrentDirectory();
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
|
||||
string strRoot = strApplication + "\\OfficeWeb\\";
|
||||
List<string> files = new List<string>();
|
||||
|
||||
string[] arrFilesConfig = {
|
||||
"Common/3rdparty/jquery/jquery.min.js",
|
||||
"Common/3rdparty/Underscore/underscore-min.js",
|
||||
"Common/3rdparty/Sockjs/sockjs-0.3.min.js",
|
||||
"Common/3rdparty/XRegExp/xregexp-all-min.js",
|
||||
"Common/3rdparty/jszip/jszip.min.js",
|
||||
"Common/3rdparty/jszip-utils/jszip-utils.min.js",
|
||||
|
||||
"Common/AllFonts.js",
|
||||
|
||||
"Common/Build/License.js",
|
||||
"Common/browser.js",
|
||||
"Common/docscoapicommon.js",
|
||||
"Common/docscoapi.js",
|
||||
"Common/apiCommon.js",
|
||||
"Common/spellcheckapi.js",
|
||||
"Common/wordcopypaste.js",
|
||||
"Common/spellCheckLanguage.js",
|
||||
"Common/spellCheckLanguagesAll.js",
|
||||
"Common/downloaderfiles.js",
|
||||
"Common/commonDefines.js",
|
||||
"Common/editorscommon.js",
|
||||
"Common/Shapes/Serialize.js",
|
||||
"Common/Shapes/SerializeWriter.js",
|
||||
"Common/SerializeCommonWordExcel.js",
|
||||
"Common/SerializeChart.js",
|
||||
"Common/Drawings/Format/Constants.js",
|
||||
"Common/Drawings/Format/Format.js",
|
||||
"Common/trackFile.js",
|
||||
"Common/FontsFreeType/font_engine.js",
|
||||
"Common/FontsFreeType/FontFile.js",
|
||||
"Common/FontsFreeType/FontManager.js",
|
||||
"Common/FontsFreeType/font_map.js",
|
||||
"Word/Drawing/Externals.js",
|
||||
"Word/Drawing/GlobalLoaders.js",
|
||||
"Word/Drawing/translations.js",
|
||||
"Common/Charts/charts.js",
|
||||
"Common/Charts/ChartsDrawer.js",
|
||||
"Common/Charts/DrawingArea.js",
|
||||
"Common/Charts/DrawingObjects.js",
|
||||
"Common/NumFormat.js",
|
||||
"Common/Drawings/TrackObjects/AdjustmentTracks.js",
|
||||
"Common/Drawings/TrackObjects/MoveTracks.js",
|
||||
"Common/Drawings/TrackObjects/NewShapeTracks.js",
|
||||
"Common/Drawings/TrackObjects/PolyLine.js",
|
||||
"Common/Drawings/TrackObjects/ResizeTracks.js",
|
||||
"Common/Drawings/TrackObjects/RotateTracks.js",
|
||||
"Common/Drawings/TrackObjects/Spline.js",
|
||||
"Common/Drawings/ArcTo.js",
|
||||
"Common/Drawings/ColorArray.js",
|
||||
"Common/Drawings/CommonController.js",
|
||||
"Common/Drawings/DrawingObjectsHandlers.js",
|
||||
"Common/Drawings/Hit.js",
|
||||
"Common/Drawings/Joined.js",
|
||||
"Common/Drawings/Math.js",
|
||||
"Common/Drawings/Format/Shape.js",
|
||||
"Common/Drawings/Format/Image.js",
|
||||
"Common/Drawings/Format/GroupShape.js",
|
||||
"Common/Drawings/Format/ChartSpace.js",
|
||||
"Common/Drawings/Format/ChartFormat.js",
|
||||
"Common/Drawings/Format/CreateGeometry.js",
|
||||
"Common/Drawings/Format/Geometry.js",
|
||||
"Common/Drawings/Format/Path.js",
|
||||
"Common/Drawings/Format/TextBody.js",
|
||||
"Common/Drawings/TextDrawer.js",
|
||||
"Word/Editor/GraphicObjects/Format/ShapePrototype.js",
|
||||
"Word/Editor/GraphicObjects/Format/ImagePrototype.js",
|
||||
"Word/Editor/GraphicObjects/Format/GroupPrototype.js",
|
||||
"Word/Editor/GraphicObjects/Format/ChartSpacePrototype.js",
|
||||
"PowerPoint/Editor/Format/GraphicFrame.js",
|
||||
"Word/Editor/GraphicObjects/DrawingStates.js",
|
||||
"Word/Editor/GraphicObjects/GraphicObjects.js",
|
||||
"Word/Editor/GraphicObjects/GraphicPage.js",
|
||||
"Word/Editor/GraphicObjects/WrapManager.js",
|
||||
"Word/Editor/CollaborativeEditing.js",
|
||||
"Word/Editor/Comments.js",
|
||||
"Word/Editor/History.js",
|
||||
"Word/Editor/Styles.js",
|
||||
"Word/Editor/FlowObjects.js",
|
||||
"Word/Editor/ParagraphContent.js",
|
||||
"Word/Editor/ParagraphContentBase.js",
|
||||
"Word/Editor/Hyperlink.js",
|
||||
"Word/Editor/Field.js",
|
||||
"Word/Editor/Run.js",
|
||||
"Word/Editor/Math.js",
|
||||
"Word/Editor/Paragraph.js",
|
||||
"Word/Editor/Paragraph_Recalculate.js",
|
||||
"Word/Editor/Sections.js",
|
||||
"Word/Editor/Numbering.js",
|
||||
"Word/Editor/HeaderFooter.js",
|
||||
"Word/Editor/Document.js",
|
||||
"Word/Editor/Common.js",
|
||||
"Word/Editor/DocumentContent.js",
|
||||
"Word/Editor/Table.js",
|
||||
"Word/Editor/Serialize2.js",
|
||||
"Word/Editor/Search.js",
|
||||
"Word/Editor/FontClassification.js",
|
||||
"Word/Editor/Spelling.js",
|
||||
"Word/Drawing/Graphics.js",
|
||||
"Word/Drawing/Overlay.js",
|
||||
"Word/Drawing/HatchPattern.js",
|
||||
"Word/Drawing/ShapeDrawer.js",
|
||||
"Word/Drawing/Metafile.js",
|
||||
"Word/Drawing/DrawingDocument.js",
|
||||
"Word/Drawing/GraphicsEvents.js",
|
||||
"Common/Scrolls/iscroll.js",
|
||||
"Word/Drawing/WorkEvents.js",
|
||||
"Common/Controls.js",
|
||||
"Word/Drawing/Rulers.js",
|
||||
"Word/Drawing/HtmlPage.js",
|
||||
"Word/Drawing/documentrenderer.js",
|
||||
"Common/scroll.js",
|
||||
"Word/Editor/SerializeCommon.js",
|
||||
"Word/apiDefines.js",
|
||||
"Word/document/empty.js",
|
||||
"Word/Math/mathTypes.js",
|
||||
"Word/Math/mathText.js",
|
||||
"Word/Math/mathContent.js",
|
||||
"Word/Math/base.js",
|
||||
"Word/Math/fraction.js",
|
||||
"Word/Math/degree.js",
|
||||
"Word/Math/matrix.js",
|
||||
"Word/Math/limit.js",
|
||||
"Word/Math/nary.js",
|
||||
"Word/Math/radical.js",
|
||||
"Word/Math/operators.js",
|
||||
"Word/Math/accent.js",
|
||||
"Word/Math/borderBox.js",
|
||||
"Excel/utils/utils.js",
|
||||
"Excel/model/CellComment.js",
|
||||
"Excel/model/Serialize.js",
|
||||
"Excel/model/WorkbookElems.js",
|
||||
"Excel/model/Workbook.js",
|
||||
"Excel/model/CellInfo.js",
|
||||
"Excel/model/AdvancedOptions.js",
|
||||
|
||||
"Common/Locks.js",
|
||||
|
||||
"Common/Shapes/EditorSettings.js",
|
||||
|
||||
"Word/apiCommon.js",
|
||||
"Word/api.js"
|
||||
};
|
||||
|
||||
if (true)
|
||||
{
|
||||
files.Clear();
|
||||
for (int i = 0; i < arrFilesConfig.Length; ++i)
|
||||
{
|
||||
files.Add(arrFilesConfig[i]);
|
||||
}
|
||||
}
|
||||
|
||||
StringBuilder oBuilder = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < files.Count; i++)
|
||||
{
|
||||
StreamReader oReader = new StreamReader(strRoot + files[i]);
|
||||
oBuilder.Append(oReader.ReadToEnd());
|
||||
|
||||
oBuilder.Append("\n\n");
|
||||
}
|
||||
|
||||
string strDestPath = strApplication + "\\OfficeWeb\\Word\\sdk-all.js";
|
||||
StreamWriter oWriter = new StreamWriter(strDestPath, false, Encoding.UTF8);
|
||||
|
||||
oWriter.Write(oBuilder.ToString());
|
||||
oWriter.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Joiner")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Ascensio System SIA")]
|
||||
[assembly: AssemblyProduct("Joiner")]
|
||||
[assembly: AssemblyCopyright("Ascensio System SIA Copyright (c) 2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("0e989b01-1ac4-4bc9-8346-c19b89b47389")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Joiner</RootNamespace>
|
||||
<AssemblyName>Joiner</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.DataSetExtensions">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@ -1,20 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Joiner", "Joiner.csproj", "{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@ -1,202 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace Joiner
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
string strApplication = Directory.GetCurrentDirectory();
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
|
||||
string strRoot = strApplication + "\\OfficeWeb\\";
|
||||
List<string> files = new List<string>();
|
||||
|
||||
string[] arrFilesConfig = {
|
||||
"Common/Build/License.js",
|
||||
"Common/browser.js",
|
||||
"Common/FontsFreeType/font_engine.js",
|
||||
"Common/FontsFreeType/FontFile.js",
|
||||
"Common/FontsFreeType/FontManager.js",
|
||||
"Common/FontsFreeType/font_map.js",
|
||||
"Word/Drawing/Externals.js",
|
||||
"Word/Drawing/GlobalLoaders.js",
|
||||
"Common/commonDefines.js",
|
||||
"Common/apiCommon.js",
|
||||
"Common/downloaderfiles.js",
|
||||
"Common/docscoapicommon.js",
|
||||
"Common/docscoapi.js",
|
||||
"Common/docscoapisettings.js",
|
||||
"Common/wordcopypaste.js",
|
||||
"Common/editorscommon.js",
|
||||
"PowerPoint/Drawing/ThemeLoader.js",
|
||||
"Common/Charts/DrawingObjects.js",
|
||||
"Common/SerializeCommonWordExcel.js",
|
||||
"Common/SerializeChart.js",
|
||||
"Common/Charts/charts.js",
|
||||
"Common/Charts/ChartsDrawer.js",
|
||||
"Common/Charts/DrawingArea.js",
|
||||
"Common/NumFormat.js",
|
||||
"Word/Editor/Serialize2.js",
|
||||
"Common/trackFile.js",
|
||||
|
||||
"Word/Editor/Styles.js",
|
||||
"Word/Editor/Numbering.js",
|
||||
"Word/Drawing/Metafile.js",
|
||||
"PowerPoint/Editor/CollaborativeEditing.js",
|
||||
|
||||
"Word/Drawing/GraphicsEvents.js",
|
||||
"Word/Drawing/WorkEvents.js",
|
||||
"Word/Drawing/Controls.js",
|
||||
"Word/Drawing/Rulers.js",
|
||||
"Word/Editor/Table.js",
|
||||
"Word/Editor/Common.js",
|
||||
"Word/Editor/Sections.js",
|
||||
"Common/scroll.js",
|
||||
|
||||
"Word/Editor/History.js",
|
||||
"Common/Drawings/Hit.js",
|
||||
"Common/Drawings/States.js",
|
||||
"Common/Drawings/DrawingObjectsHandlers.js",
|
||||
"Common/Drawings/TrackObjects/AdjustmentTracks.js",
|
||||
"Common/Drawings/TrackObjects/ResizeTracks.js",
|
||||
"Common/Drawings/TrackObjects/RotateTracks.js",
|
||||
"Common/Drawings/TrackObjects/NewShapeTracks.js",
|
||||
"Common/Drawings/TrackObjects/PolyLine.js",
|
||||
"Common/Drawings/TrackObjects/Spline.js",
|
||||
"Common/Drawings/TrackObjects/MoveTracks.js",
|
||||
|
||||
"Word/Drawing/HatchPattern.js",
|
||||
"Word/Drawing/Graphics.js",
|
||||
"Word/Drawing/Private/Graphics.js",
|
||||
"Word/Drawing/Overlay.js",
|
||||
"Word/Drawing/ShapeDrawer.js",
|
||||
"PowerPoint/Drawing/Transitions.js",
|
||||
"PowerPoint/Drawing/DrawingDocument.js",
|
||||
"PowerPoint/Drawing/HtmlPage.js",
|
||||
"PowerPoint/apiDefines.js",
|
||||
|
||||
"Common/Drawings/Format/Constants.js",
|
||||
|
||||
"Common/Shapes/Serialize.js",
|
||||
"Common/Shapes/SerializeWriter.js",
|
||||
"Word/Editor/SerializeCommon.js",
|
||||
|
||||
"Common/Drawings/Math.js",
|
||||
"Common/Drawings/ArcTo.js",
|
||||
"Word/Drawing/ColorArray.js",
|
||||
|
||||
"PowerPoint/Editor/Format/Presentation.js",
|
||||
"Common/Drawings/CommonController.js",
|
||||
"Excel/view/DrawingObjectsController.js",
|
||||
"PowerPoint/Editor/DrawingObjectsController.js",
|
||||
|
||||
"Common/Drawings/Format/Format.js",
|
||||
"Common/Drawings/Format/CreateGeometry.js",
|
||||
"Common/Drawings/Format/Geometry.js",
|
||||
"Common/Drawings/Format/Path.js",
|
||||
"Common/Drawings/Format/Shape.js",
|
||||
"Common/Drawings/Format/Image.js",
|
||||
"Common/Drawings/Format/GroupShape.js",
|
||||
"Common/Drawings/Format/ChartSpace.js",
|
||||
"Common/Drawings/Format/ChartFormat.js",
|
||||
"Common/Drawings/Format/TextBody.js",
|
||||
"PowerPoint/Editor/Format/Slide.js",
|
||||
"PowerPoint/Editor/Format/SlideMaster.js",
|
||||
"PowerPoint/Editor/Format/Layout.js",
|
||||
"PowerPoint/Editor/Format/Comments.js",
|
||||
|
||||
"Word/Editor/Styles.js",
|
||||
"Word/Editor/Numbering.js",
|
||||
"Word/Editor/ParagraphContent.js",
|
||||
"Word/Editor/ParagraphContentBase.js",
|
||||
"Word/Editor/Hyperlink.js",
|
||||
"Word/Editor/Field.js",
|
||||
"Word/Editor/Run.js",
|
||||
|
||||
"Word/Math/mathTypes.js",
|
||||
"Word/Math/mathText.js",
|
||||
"Word/Math/mathContent.js",
|
||||
"Word/Math/base.js",
|
||||
"Word/Math/fraction.js",
|
||||
"Word/Math/degree.js",
|
||||
"Word/Math/matrix.js",
|
||||
"Word/Math/limit.js",
|
||||
"Word/Math/nary.js",
|
||||
"Word/Math/radical.js",
|
||||
"Word/Math/operators.js",
|
||||
"Word/Math/accent.js",
|
||||
"Word/Math/borderBox.js",
|
||||
|
||||
"Word/Editor/FlowObjects.js",
|
||||
"Word/Editor/Paragraph.js",
|
||||
"Word/Editor/Paragraph_Recalculate.js",
|
||||
"Word/Editor/Document.js",
|
||||
"Word/Editor/DocumentContent.js",
|
||||
"Word/Editor/HeaderFooter.js",
|
||||
"Word/Editor/Table.js",
|
||||
"Word/Editor/Math.js",
|
||||
"Word/Editor/Spelling.js",
|
||||
"Word/Editor/Search.js",
|
||||
"Word/Editor/FontClassification.js",
|
||||
|
||||
"PowerPoint/Editor/Format/ShapePrototype.js",
|
||||
"PowerPoint/Editor/Format/ImagePrototype.js",
|
||||
"PowerPoint/Editor/Format/GroupPrototype.js",
|
||||
"PowerPoint/Editor/Format/ChartSpacePrototype.js",
|
||||
"PowerPoint/Editor/Format/GraphicFrame.js",
|
||||
|
||||
"Excel/utils/utils.js",
|
||||
"Excel/model/Serialize.js",
|
||||
"Excel/model/WorkbookElems.js",
|
||||
"Excel/model/Workbook.js",
|
||||
"Excel/model/CellInfo.js",
|
||||
"Excel/model/AdvancedOptions.js",
|
||||
|
||||
"Common/Private/Locks.js",
|
||||
|
||||
"Common/Shapes/EditorSettings.js",
|
||||
"PowerPoint/themes/Themes.js",
|
||||
"PowerPoint/apiDefines.js",
|
||||
"Common/commonDefines.js",
|
||||
|
||||
"PowerPoint/api.js",
|
||||
"PowerPoint/apiCommon.js"
|
||||
};
|
||||
|
||||
if (true)
|
||||
{
|
||||
files.Clear();
|
||||
for (int i = 0; i < arrFilesConfig.Length; ++i)
|
||||
{
|
||||
files.Add(arrFilesConfig[i]);
|
||||
}
|
||||
}
|
||||
|
||||
StringBuilder oBuilder = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < files.Count; i++)
|
||||
{
|
||||
StreamReader oReader = new StreamReader(strRoot + files[i]);
|
||||
oBuilder.Append(oReader.ReadToEnd());
|
||||
|
||||
oBuilder.Append("\n\n");
|
||||
}
|
||||
|
||||
string strDestPath = strApplication + "\\OfficeWeb\\PowerPoint\\sdk-all.js";
|
||||
StreamWriter oWriter = new StreamWriter(strDestPath, false, Encoding.UTF8);
|
||||
|
||||
oWriter.Write(oBuilder.ToString());
|
||||
oWriter.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Joiner")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Ascensio System SIA")]
|
||||
[assembly: AssemblyProduct("Joiner")]
|
||||
[assembly: AssemblyCopyright("Ascensio System SIA Copyright (c) 2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("0e989b01-1ac4-4bc9-8346-c19b89b47389")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
Binary file not shown.
@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Joiner</RootNamespace>
|
||||
<AssemblyName>Joiner</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.DataSetExtensions">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@ -1,20 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Joiner", "Joiner.csproj", "{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{44F7AE26-3218-4A27-BEF7-0FC1B2AE9CB7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@ -1,379 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace Joiner
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
string strApplication = Directory.GetCurrentDirectory();
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
strApplication = Path.GetDirectoryName(strApplication);
|
||||
|
||||
string strRoot = strApplication + "\\OfficeWeb\\";
|
||||
List<string> files = new List<string>();
|
||||
|
||||
/*
|
||||
string[] arrFilesConfig = {
|
||||
"Common/Build/License.js",
|
||||
"Common/browser.js",
|
||||
"Common/docscoapisettings.js",
|
||||
"Common/docscoapicommon.js",
|
||||
"Common/docscoapi.js",
|
||||
"Common/downloaderfiles.js",
|
||||
"Common/apiCommon.js",
|
||||
"Common/commonDefines.js",
|
||||
"Common/editorscommon.js",
|
||||
"Common/NumFormat.js",
|
||||
"Common/Charts/charts.js",
|
||||
"Common/Charts/DrawingArea.js",
|
||||
"Common/Charts/DrawingObjects.js",
|
||||
"Common/Charts/ChartsDrawer.js",
|
||||
"Common/FontsFreeType/font_engine.js",
|
||||
"Common/FontsFreeType/FontFile.js",
|
||||
"Common/FontsFreeType/FontManager.js",
|
||||
"Word/Drawing/HatchPattern.js",
|
||||
"Word/Drawing/Externals.js",
|
||||
"Word/Drawing/Metafile.js",
|
||||
"Excel/model/DrawingObjects/GlobalLoaders.js",
|
||||
"Common/trackFile.js",
|
||||
"Excel/apiDefines.js",
|
||||
"Excel/document/empty-workbook.js",
|
||||
"Excel/utils/utils.js",
|
||||
"Excel/model/clipboard.js",
|
||||
"Excel/model/autofilters.js",
|
||||
"Excel/graphics/DrawingContext.js",
|
||||
"Excel/graphics/pdfprinter.js",
|
||||
"Excel/model/CollaborativeEditing.js",
|
||||
"Excel/model/ConditionalFormatting.js",
|
||||
"Excel/model/FormulaObjects/parserFormula.js",
|
||||
"Excel/model/FormulaObjects/dateandtimeFunctions.js",
|
||||
"Excel/model/FormulaObjects/engineeringFunctions.js",
|
||||
"Excel/model/FormulaObjects/cubeFunctions.js",
|
||||
"Excel/model/FormulaObjects/databaseFunctions.js",
|
||||
"Excel/model/FormulaObjects/textanddataFunctions.js",
|
||||
"Excel/model/FormulaObjects/statisticalFunctions.js",
|
||||
"Excel/model/FormulaObjects/financialFunctions.js",
|
||||
"Excel/model/FormulaObjects/mathematicFunctions.js",
|
||||
"Excel/model/FormulaObjects/lookupandreferenceFunctions.js",
|
||||
"Excel/model/FormulaObjects/informationFunctions.js",
|
||||
"Excel/model/FormulaObjects/logicalFunctions.js",
|
||||
"Excel/model/Serialize.js",
|
||||
"Excel/model/WorkbookElems.js",
|
||||
"Excel/model/Workbook.js",
|
||||
"Excel/model/CellInfo.js",
|
||||
"Excel/model/AdvancedOptions.js",
|
||||
"Excel/model/History.js",
|
||||
"Excel/model/UndoRedo.js",
|
||||
"Excel/model/CellComment.js",
|
||||
"Excel/view/mobileTouch.js",
|
||||
"Excel/view/iscroll.js",
|
||||
"Excel/view/PopUpSelector.js",
|
||||
"Excel/view/StringRender.js",
|
||||
"Excel/view/CellTextRender.js",
|
||||
"Excel/view/CellEditorView.js",
|
||||
"Excel/view/WorksheetView.js",
|
||||
"Excel/view/HandlerList.js",
|
||||
"Excel/view/EventsController.js",
|
||||
"Excel/view/WorkbookView.js",
|
||||
"Common/scroll.js",
|
||||
"Word/Editor/SerializeCommon.js",
|
||||
"Common/Drawings/Math.js",
|
||||
"Common/Drawings/ArcTo.js",
|
||||
"Word/Drawing/ColorArray.js",
|
||||
"Common/Shapes/Serialize.js",
|
||||
"Common/Shapes/SerializeWriter.js",
|
||||
"Common/SerializeCommonWordExcel.js",
|
||||
"Common/SerializeChart.js",
|
||||
"Common/Charts/libraries/OfficeExcel.common.core.js",
|
||||
"Common/Charts/libraries/OfficeExcel.common.key.js",
|
||||
"Common/Charts/libraries/OfficeExcel.bar.js",
|
||||
"Common/Charts/libraries/OfficeExcel.hbar.js",
|
||||
"Common/Charts/libraries/OfficeExcel.line.js",
|
||||
"Common/Charts/libraries/OfficeExcel.pie.js",
|
||||
"Common/Charts/libraries/OfficeExcel.scatter.js",
|
||||
"Common/Charts/libraries/OfficeExcel.chartProperties.js",
|
||||
|
||||
"Common/Drawings/Hit.js",
|
||||
"Common/Drawings/States.js",
|
||||
"Common/Drawings/TrackObjects/AdjustmentTracks.js",
|
||||
"Common/Drawings/TrackObjects/ResizeTracks.js",
|
||||
"Common/Drawings/TrackObjects/RotateTracks.js",
|
||||
"Common/Drawings/TrackObjects/NewShapeTracks.js",
|
||||
"Common/Drawings/TrackObjects/PolyLine.js",
|
||||
"Common/Drawings/TrackObjects/Spline.js",
|
||||
"Common/Drawings/TrackObjects/MoveTracks.js",
|
||||
|
||||
"Common/Drawings/Format/Constants.js",
|
||||
"Common/Drawings/Format/Format.js",
|
||||
"Common/Drawings/Format/CreateGeometry.js",
|
||||
"Common/Drawings/Format/Geometry.js",
|
||||
"Common/Drawings/Format/Path.js",
|
||||
"Common/Drawings/Format/Shape.js",
|
||||
"Common/Drawings/Format/GroupShape.js",
|
||||
"Common/Drawings/Format/Image.js",
|
||||
"Common/Drawings/Format/ChartSpace.js",
|
||||
"Common/Drawings/Format/ChartFormat.js",
|
||||
"Common/Drawings/Format/TextBody.js",
|
||||
"Common/Drawings/CommonController.js",
|
||||
"Excel/view/DrawingObjectsController.js",
|
||||
|
||||
"Excel/model/DrawingObjects/Graphics.js",
|
||||
"Excel/model/DrawingObjects/Overlay.js",
|
||||
"Excel/model/DrawingObjects/Controls.js",
|
||||
"Excel/model/DrawingObjects/ShapeDrawer.js",
|
||||
|
||||
|
||||
"Word/Editor/CollaborativeEditing.js",
|
||||
|
||||
"Excel/model/DrawingObjects/DrawingDocument.js",
|
||||
|
||||
"Excel/model/DrawingObjects/Format/ShapePrototype.js",
|
||||
"Excel/model/DrawingObjects/Format/ImagePrototype.js",
|
||||
"Excel/model/DrawingObjects/Format/GroupPrototype.js",
|
||||
"Excel/model/DrawingObjects/Format/ChartSpacePrototype.js",
|
||||
|
||||
|
||||
"Word/Math/mathTypes.js",
|
||||
"Word/Math/mathText.js",
|
||||
"Word/Math/mathContent.js",
|
||||
"Word/Math/base.js",
|
||||
"Word/Math/fraction.js",
|
||||
"Word/Math/degree.js",
|
||||
"Word/Math/matrix.js",
|
||||
"Word/Math/limit.js",
|
||||
"Word/Math/nary.js",
|
||||
"Word/Math/radical.js",
|
||||
"Word/Math/operators.js",
|
||||
"Word/Math/accent.js",
|
||||
"Word/Math/borderBox.js",
|
||||
|
||||
"Word/Editor/Comments.js",
|
||||
"Word/Editor/Styles.js",
|
||||
"Word/Editor/FlowObjects.js",
|
||||
"Word/Editor/ParagraphContent.js",
|
||||
"Word/Editor/Hyperlink.js",
|
||||
"Word/Editor/Run.js",
|
||||
"Word/Editor/Math.js",
|
||||
"Word/Editor/Paragraph.js",
|
||||
"Word/Editor/Sections.js",
|
||||
"Word/Editor/Numbering.js",
|
||||
"Word/Editor/HeaderFooter.js",
|
||||
"Word/Editor/Document.js",
|
||||
"Word/Editor/DocumentContent.js",
|
||||
"Word/Editor/Table.js",
|
||||
"Word/Editor/Serialize2.js",
|
||||
"Word/Editor/FontClassification.js",
|
||||
"Word/Editor/Spelling.js",
|
||||
|
||||
"Word/Math/mathTypes.js",
|
||||
"Word/Math/print.js",
|
||||
"Word/Math/mathText.js",
|
||||
"Word/Math/mathContent.js",
|
||||
"Word/Math/actions.js",
|
||||
"Word/Math/base.js",
|
||||
"Word/Math/subBase.js",
|
||||
"Word/Math/fraction.js",
|
||||
"Word/Math/degree.js",
|
||||
"Word/Math/matrix.js",
|
||||
"Word/Math/limit.js",
|
||||
"Word/Math/nary.js",
|
||||
"Word/Math/radical.js",
|
||||
"Word/Math/operators.js",
|
||||
"Word/Math/accent.js",
|
||||
"Word/Math/drawingUnion.js",
|
||||
"Word/Math/borderBox.js",
|
||||
"Word/Math/test_composition.js",
|
||||
|
||||
"Excel/model/DrawingObjects/GlobalCounters.js",
|
||||
|
||||
"Word/apiCommon.js",
|
||||
"Excel/api.js"
|
||||
};
|
||||
*/
|
||||
string[] arrFilesConfig = {
|
||||
"Common/Build/License.js",
|
||||
"Common/browser.js",
|
||||
"Common/docscoapisettings.js",
|
||||
"Common/docscoapicommon.js",
|
||||
"Common/docscoapi.js",
|
||||
"Common/downloaderfiles.js",
|
||||
"Common/apiCommon.js",
|
||||
"Common/commonDefines.js",
|
||||
"Common/editorscommon.js",
|
||||
"Common/NumFormat.js",
|
||||
"Common/Charts/charts.js",
|
||||
"Common/Charts/DrawingArea.js",
|
||||
"Common/Charts/DrawingObjects.js",
|
||||
"Common/Charts/ChartsDrawer.js",
|
||||
"Common/FontsFreeType/font_engine.js",
|
||||
"Common/FontsFreeType/FontFile.js",
|
||||
"Common/FontsFreeType/FontManager.js",
|
||||
"Common/FontsFreeType/font_map.js",
|
||||
"Word/Drawing/HatchPattern.js",
|
||||
"Word/Drawing/WorkEvents.js",
|
||||
"Word/Drawing/Externals.js",
|
||||
"Word/Drawing/Metafile.js",
|
||||
"Excel/model/DrawingObjects/GlobalLoaders.js",
|
||||
"Common/trackFile.js",
|
||||
"Excel/apiDefines.js",
|
||||
"Excel/document/empty-workbook.js",
|
||||
"Excel/utils/utils.js",
|
||||
"Excel/model/clipboard.js",
|
||||
"Excel/model/autofilters.js",
|
||||
"Excel/graphics/DrawingContext.js",
|
||||
"Excel/graphics/pdfprinter.js",
|
||||
"Excel/model/CollaborativeEditing.js",
|
||||
"Excel/model/ConditionalFormatting.js",
|
||||
"Excel/model/FormulaObjects/parserFormula.js",
|
||||
"Excel/model/FormulaObjects/dateandtimeFunctions.js",
|
||||
"Excel/model/FormulaObjects/engineeringFunctions.js",
|
||||
"Excel/model/FormulaObjects/cubeFunctions.js",
|
||||
"Excel/model/FormulaObjects/databaseFunctions.js",
|
||||
"Excel/model/FormulaObjects/textanddataFunctions.js",
|
||||
"Excel/model/FormulaObjects/statisticalFunctions.js",
|
||||
"Excel/model/FormulaObjects/financialFunctions.js",
|
||||
"Excel/model/FormulaObjects/mathematicFunctions.js",
|
||||
"Excel/model/FormulaObjects/lookupandreferenceFunctions.js",
|
||||
"Excel/model/FormulaObjects/informationFunctions.js",
|
||||
"Excel/model/FormulaObjects/logicalFunctions.js",
|
||||
"Excel/model/Serialize.js",
|
||||
"Excel/model/WorkbookElems.js",
|
||||
"Excel/model/Workbook.js",
|
||||
"Excel/model/CellInfo.js",
|
||||
"Excel/model/AdvancedOptions.js",
|
||||
"Excel/model/History.js",
|
||||
"Excel/model/UndoRedo.js",
|
||||
"Excel/model/CellComment.js",
|
||||
"Excel/model/Private/CellComment.js",
|
||||
"Excel/view/mobileTouch.js",
|
||||
"Excel/view/iscroll.js",
|
||||
"Excel/view/PopUpSelector.js",
|
||||
"Excel/view/StringRender.js",
|
||||
"Excel/view/CellTextRender.js",
|
||||
"Excel/view/CellEditorView.js",
|
||||
"Excel/view/WorksheetView.js",
|
||||
"Excel/view/Private/WorksheetView.js",
|
||||
"Excel/view/HandlerList.js",
|
||||
"Excel/view/EventsController.js",
|
||||
"Excel/view/WorkbookView.js",
|
||||
"Common/scroll.js",
|
||||
"Word/Editor/SerializeCommon.js",
|
||||
"Common/Drawings/Math.js",
|
||||
"Common/Drawings/ArcTo.js",
|
||||
"Word/Drawing/ColorArray.js",
|
||||
"Common/Shapes/Serialize.js",
|
||||
"Common/Shapes/SerializeWriter.js",
|
||||
"Common/SerializeCommonWordExcel.js",
|
||||
"Common/SerializeChart.js",
|
||||
"Common/Drawings/Hit.js",
|
||||
"Common/Drawings/States.js",
|
||||
"Common/Drawings/DrawingObjectsHandlers.js",
|
||||
"Common/Drawings/TrackObjects/AdjustmentTracks.js",
|
||||
"Common/Drawings/TrackObjects/ResizeTracks.js",
|
||||
"Common/Drawings/TrackObjects/RotateTracks.js",
|
||||
"Common/Drawings/TrackObjects/NewShapeTracks.js",
|
||||
"Common/Drawings/TrackObjects/PolyLine.js",
|
||||
"Common/Drawings/TrackObjects/Spline.js",
|
||||
"Common/Drawings/TrackObjects/MoveTracks.js",
|
||||
"Common/Drawings/CommonController.js",
|
||||
"Common/Drawings/Format/Constants.js",
|
||||
"Common/Drawings/Format/Format.js",
|
||||
"Common/Drawings/Format/CreateGeometry.js",
|
||||
"Common/Drawings/Format/Geometry.js",
|
||||
"Common/Drawings/Format/Path.js",
|
||||
"Common/Drawings/Format/Shape.js",
|
||||
"Common/Drawings/Format/GroupShape.js",
|
||||
"Common/Drawings/Format/Image.js",
|
||||
"Common/Drawings/Format/ChartSpace.js",
|
||||
"Common/Drawings/Format/ChartFormat.js",
|
||||
"Common/Drawings/Format/TextBody.js",
|
||||
"Common/wordcopypaste.js",
|
||||
"Excel/view/DrawingObjectsController.js",
|
||||
"Excel/model/DrawingObjects/Graphics.js",
|
||||
"Excel/model/DrawingObjects/Private/Graphics.js",
|
||||
"Excel/model/DrawingObjects/Overlay.js",
|
||||
"Excel/model/DrawingObjects/Controls.js",
|
||||
"Excel/model/DrawingObjects/ShapeDrawer.js",
|
||||
"Excel/model/DrawingObjects/DrawingDocument.js",
|
||||
"Excel/model/DrawingObjects/Format/ShapePrototype.js",
|
||||
"Excel/model/DrawingObjects/Format/ImagePrototype.js",
|
||||
"Excel/model/DrawingObjects/Format/GroupPrototype.js",
|
||||
"Excel/model/DrawingObjects/Format/ChartSpacePrototype.js",
|
||||
"PowerPoint/Editor/Format/GraphicFrame.js",
|
||||
"Word/Editor/Comments.js",
|
||||
"Word/Editor/Styles.js",
|
||||
"Word/Editor/FlowObjects.js",
|
||||
"Word/Editor/ParagraphContent.js",
|
||||
"Word/Editor/ParagraphContentBase.js",
|
||||
"Word/Editor/Hyperlink.js",
|
||||
"Word/Editor/Field.js",
|
||||
"Word/Editor/Run.js",
|
||||
"Word/Editor/Math.js",
|
||||
"Word/Editor/Paragraph.js",
|
||||
"Word/Editor/Paragraph_Recalculate.js",
|
||||
"Word/Editor/Sections.js",
|
||||
"Word/Editor/Numbering.js",
|
||||
"Word/Editor/HeaderFooter.js",
|
||||
"Word/Editor/Document.js",
|
||||
"Word/Editor/DocumentContent.js",
|
||||
"Word/Editor/Table.js",
|
||||
"Word/Editor/Serialize2.js",
|
||||
"Word/Editor/FontClassification.js",
|
||||
"Word/Editor/Spelling.js",
|
||||
"Word/Editor/GraphicObjects/WrapManager.js",
|
||||
"Word/Math/mathTypes.js",
|
||||
"Word/Math/mathText.js",
|
||||
"Word/Math/mathContent.js",
|
||||
"Word/Math/base.js",
|
||||
"Word/Math/fraction.js",
|
||||
"Word/Math/degree.js",
|
||||
"Word/Math/matrix.js",
|
||||
"Word/Math/limit.js",
|
||||
"Word/Math/nary.js",
|
||||
"Word/Math/radical.js",
|
||||
"Word/Math/operators.js",
|
||||
"Word/Math/accent.js",
|
||||
"Word/Math/borderBox.js",
|
||||
"Excel/model/DrawingObjects/GlobalCounters.js",
|
||||
"Word/apiCommon.js",
|
||||
"Excel/api.js",
|
||||
|
||||
"Common/Shapes/EditorSettings.js"
|
||||
};
|
||||
|
||||
if (true)
|
||||
{
|
||||
files.Clear();
|
||||
for (int i = 0; i < arrFilesConfig.Length; ++i)
|
||||
{
|
||||
files.Add(arrFilesConfig[i]);
|
||||
}
|
||||
}
|
||||
|
||||
StringBuilder oBuilder = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < files.Count; i++)
|
||||
{
|
||||
StreamReader oReader = new StreamReader(strRoot + files[i]);
|
||||
oBuilder.Append(oReader.ReadToEnd());
|
||||
|
||||
oBuilder.Append("\n\n");
|
||||
}
|
||||
|
||||
string strDestPath = strApplication + "\\OfficeWeb\\Excel\\sdk-all.js";
|
||||
StreamWriter oWriter = new StreamWriter(strDestPath, false, Encoding.UTF8);
|
||||
|
||||
oWriter.Write(oBuilder.ToString());
|
||||
oWriter.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Joiner")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Ascensio System SIA")]
|
||||
[assembly: AssemblyProduct("Joiner")]
|
||||
[assembly: AssemblyCopyright("Ascensio System SIA Copyright (c) 2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("0e989b01-1ac4-4bc9-8346-c19b89b47389")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
Binary file not shown.
9001
DoctRenderer/COMMON/jquery_native.js
vendored
9001
DoctRenderer/COMMON/jquery_native.js
vendored
File diff suppressed because it is too large
Load Diff
@ -1,334 +0,0 @@
|
||||
var editor = undefined;
|
||||
var window = new Object();
|
||||
var navigator = new Object();
|
||||
navigator.userAgent = "chrome";
|
||||
window.navigator = navigator;
|
||||
window.location = new Object();
|
||||
|
||||
window.location.protocol = "";
|
||||
window.location.host = "";
|
||||
window.location.href = "";
|
||||
|
||||
window.NATIVE_EDITOR_ENJINE = true;
|
||||
window.NATIVE_EDITOR_ENJINE_SYNC_RECALC = true;
|
||||
|
||||
window.__fonts_files = __fonts_files;
|
||||
window.__fonts_infos = __fonts_infos;
|
||||
|
||||
var document = new Object();
|
||||
window.document = document;
|
||||
|
||||
function Image()
|
||||
{
|
||||
this.src = "";
|
||||
this.onload = function()
|
||||
{
|
||||
}
|
||||
this.onerror = function()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
function _image_data()
|
||||
{
|
||||
this.data = null;
|
||||
this.length = 0;
|
||||
}
|
||||
|
||||
function native_context2d(parent)
|
||||
{
|
||||
this.canvas = parent;
|
||||
|
||||
this.globalAlpha = 0;
|
||||
this.globalCompositeOperation = "";
|
||||
this.fillStyle = "";
|
||||
this.strokeStyle = "";
|
||||
|
||||
this.lineWidth = 0;
|
||||
this.lineCap = 0;
|
||||
this.lineJoin = 0;
|
||||
this.miterLimit = 0;
|
||||
this.shadowOffsetX = 0;
|
||||
this.shadowOffsetY = 0;
|
||||
this.shadowBlur = 0;
|
||||
this.shadowColor = 0;
|
||||
this.font = "";
|
||||
this.textAlign = 0;
|
||||
this.textBaseline = 0;
|
||||
}
|
||||
native_context2d.prototype =
|
||||
{
|
||||
save : function() {},
|
||||
restore : function() {},
|
||||
|
||||
scale : function(x,y) {},
|
||||
rotate : function(angle) {},
|
||||
translate : function(x,y) {},
|
||||
transform : function(m11,m12,m21,m22,dx,dy) {},
|
||||
setTransform : function(m11,m12,m21,m22,dx,dy) {},
|
||||
|
||||
createLinearGradient : function(x0,y0,x1,y1) { return null; },
|
||||
createRadialGradient : function(x0,y0,r0,x1,y1,r1) { return null; },
|
||||
createPattern : function(image,repetition) { return null; },
|
||||
|
||||
clearRect : function(x,y,w,h) {},
|
||||
fillRect : function(x,y,w,h) {},
|
||||
strokeRect : function(x,y,w,h) {},
|
||||
|
||||
beginPath : function() {},
|
||||
closePath : function() {},
|
||||
moveTo : function(x,y) {},
|
||||
lineTo : function(x,y) {},
|
||||
quadraticCurveTo : function(cpx,cpy,x,y) {},
|
||||
bezierCurveTo : function(cp1x,cp1y,cp2x,cp2y,x,y) {},
|
||||
arcTo : function(x1,y1,x2,y2,radius) {},
|
||||
rect : function(x,y,w,h) {},
|
||||
arc : function(x,y,radius,startAngle,endAngle,anticlockwise) {},
|
||||
|
||||
fill : function() {},
|
||||
stroke : function() {},
|
||||
clip : function() {},
|
||||
isPointInPath : function(x,y) {},
|
||||
drawFocusRing : function(element,xCaret,yCaret,canDrawCustom) {},
|
||||
|
||||
fillText : function(text,x,y,maxWidth) {},
|
||||
strokeText : function(text,x,y,maxWidth) {},
|
||||
measureText : function(text) {},
|
||||
|
||||
drawImage : function(img_elem,dx_or_sx,dy_or_sy,dw_or_sw,dh_or_sh,dx,dy,dw,dh) {},
|
||||
|
||||
createImageData : function(imagedata_or_sw,sh)
|
||||
{
|
||||
var _data = new _image_data();
|
||||
_data.length = imagedata_or_sw * sh * 4;
|
||||
_data.data = new Uint8Array(imagedata_or_sw * sh * 4);
|
||||
return _data;
|
||||
},
|
||||
getImageData : function(sx,sy,sw,sh) {},
|
||||
putImageData : function(image_data,dx,dy,dirtyX,dirtyY,dirtyWidth,dirtyHeight) {}
|
||||
};
|
||||
|
||||
function native_canvas()
|
||||
{
|
||||
this.id = "";
|
||||
this.width = 300;
|
||||
this.height = 150;
|
||||
|
||||
this.nodeType = 1;
|
||||
}
|
||||
native_canvas.prototype =
|
||||
{
|
||||
getContext : function(type)
|
||||
{
|
||||
if (type == "2d")
|
||||
return new native_context2d(this);
|
||||
return null;
|
||||
},
|
||||
|
||||
toDataUrl : function(type)
|
||||
{
|
||||
return "";
|
||||
},
|
||||
|
||||
addEventListener : function()
|
||||
{
|
||||
},
|
||||
|
||||
attr : function()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
window["Asc"] = new Object();
|
||||
|
||||
var _null_object = new Object();
|
||||
_null_object.length = 0;
|
||||
_null_object.nodeType = 1;
|
||||
_null_object.offsetWidth = 1;
|
||||
_null_object.offsetHeight = 1;
|
||||
_null_object.clientWidth = 1;
|
||||
_null_object.clientHeight = 1;
|
||||
_null_object.scrollWidth = 1;
|
||||
_null_object.scrollHeight = 1;
|
||||
_null_object.style = new Object();
|
||||
_null_object.documentElement = _null_object;
|
||||
_null_object.body = _null_object;
|
||||
_null_object.ownerDocument = _null_object;
|
||||
_null_object.defaultView = _null_object;
|
||||
|
||||
_null_object.addEventListener = function(){};
|
||||
_null_object.setAttribute = function(){};
|
||||
_null_object.getElementsByTagName = function() { return []; };
|
||||
_null_object.appendChild = function() {};
|
||||
_null_object.removeChild = function() {};
|
||||
_null_object.insertBefore = function() {};
|
||||
_null_object.childNodes = [];
|
||||
_null_object.parent = _null_object;
|
||||
_null_object.parentNode = _null_object;
|
||||
_null_object.find = function() { return this; };
|
||||
_null_object.appendTo = function() { return this; };
|
||||
_null_object.css = function() { return this; };
|
||||
_null_object.width = function() { return 0; };
|
||||
_null_object.height = function() { return 0; };
|
||||
_null_object.attr = function() { return this; };
|
||||
_null_object.prop = function() { return this; };
|
||||
_null_object.val = function() { return this; };
|
||||
_null_object.remove = function() {};
|
||||
_null_object.getComputedStyle = function() { return null; };
|
||||
_null_object.getContext = function(type) {
|
||||
if (type == "2d")
|
||||
return new native_context2d(this);
|
||||
return null;
|
||||
};
|
||||
|
||||
window._null_object = _null_object;
|
||||
|
||||
document.createElement = function(type)
|
||||
{
|
||||
if (type && type.toLowerCase)
|
||||
{
|
||||
if (type.toLowerCase() == "canvas")
|
||||
return new native_canvas();
|
||||
}
|
||||
|
||||
return _null_object;
|
||||
}
|
||||
|
||||
function _return_empty_html_element() { return _null_object; };
|
||||
|
||||
document.createDocumentFragment = _return_empty_html_element;
|
||||
document.getElementsByTagName = function(tag) {
|
||||
var ret = [];
|
||||
if ("head" == tag)
|
||||
ret.push(_null_object);
|
||||
return ret;
|
||||
};
|
||||
document.insertBefore = function() {};
|
||||
document.appendChild = function() {};
|
||||
document.removeChild = function() {};
|
||||
document.getElementById = function() { return _null_object; };
|
||||
document.createComment = function() { return undefined; };
|
||||
|
||||
document.documentElement = _null_object;
|
||||
document.body = _null_object;
|
||||
|
||||
var native = CreateNativeEngine();
|
||||
window.native = native;
|
||||
window["native"] = native;
|
||||
window.native.v6a = window.native.GetFontBinary;
|
||||
|
||||
var native_renderer = null;
|
||||
var _api = null;
|
||||
var Asc = null;
|
||||
|
||||
function NativeOpenFile()
|
||||
{
|
||||
var doc_bin = window.native.GetFileString(g_file_path);
|
||||
if (NATIVE_DOCUMENT_TYPE == "presentation" || NATIVE_DOCUMENT_TYPE == "document")
|
||||
{
|
||||
_api = new window["asc_docs_api"]("");
|
||||
_api.asc_nativeOpenFile(doc_bin);
|
||||
}
|
||||
else
|
||||
{
|
||||
Asc = window["Asc"];
|
||||
_api = new window["Asc"]["spreadsheet_api"];
|
||||
var doc_bin = window.native.GetFileString(g_file_path);
|
||||
_api.asc_nativeOpenFile(doc_bin);
|
||||
}
|
||||
}
|
||||
|
||||
function NativeCalculateFile()
|
||||
{
|
||||
_api.asc_nativeCalculateFile();
|
||||
}
|
||||
|
||||
function NativeApplyChanges()
|
||||
{
|
||||
if (NATIVE_DOCUMENT_TYPE == "presentation" || NATIVE_DOCUMENT_TYPE == "document")
|
||||
{
|
||||
var __changes = [];
|
||||
var _count_main = window.native.GetCountChanges();
|
||||
for (var i = 0; i < _count_main; i++)
|
||||
{
|
||||
var _changes_file = window.native.GetChangesFile(i);
|
||||
var _changes = JSON.parse(window.native.GetFileString(_changes_file));
|
||||
|
||||
for (var j = 0; j < _changes.length; j++)
|
||||
{
|
||||
__changes.push(_changes[j]);
|
||||
}
|
||||
}
|
||||
_api.asc_nativeApplyChanges(__changes);
|
||||
}
|
||||
else
|
||||
{
|
||||
var __changes = [];
|
||||
var _count_main = window.native.GetCountChanges();
|
||||
for (var i = 0; i < _count_main; i++)
|
||||
{
|
||||
var _changes_file = window.native.GetChangesFile(i);
|
||||
var _changes = JSON.parse(window.native.GetFileString(_changes_file));
|
||||
|
||||
for (var j = 0; j < _changes.length; j++)
|
||||
{
|
||||
__changes.push(_changes[j]);
|
||||
}
|
||||
}
|
||||
|
||||
_api.asc_nativeApplyChanges(__changes);
|
||||
}
|
||||
}
|
||||
function NativeGetFileString()
|
||||
{
|
||||
return _api.asc_nativeGetFile();
|
||||
}
|
||||
|
||||
function GetNativeCountPages()
|
||||
{
|
||||
return _api.asc_nativePrintPagesCount();
|
||||
}
|
||||
|
||||
window.memory1 = null;
|
||||
window.memory2 = null;
|
||||
|
||||
function GetNativePageBase64(pageIndex)
|
||||
{
|
||||
if (null == window.memory1)
|
||||
window.memory1 = CreateNativeMemoryStream();
|
||||
else
|
||||
window.memory1.ClearNoAttack();
|
||||
|
||||
if (null == window.memory2)
|
||||
window.memory2 = CreateNativeMemoryStream();
|
||||
else
|
||||
window.memory2.ClearNoAttack();
|
||||
|
||||
if (native_renderer == null)
|
||||
{
|
||||
native_renderer = _api.asc_nativeCheckPdfRenderer(window.memory1, window.memory2);
|
||||
}
|
||||
else
|
||||
{
|
||||
window.memory1.ClearNoAttack();
|
||||
window.memory2.ClearNoAttack();
|
||||
}
|
||||
|
||||
_api.asc_nativePrint(native_renderer, pageIndex);
|
||||
return window.memory1;
|
||||
}
|
||||
|
||||
function GetNativeId()
|
||||
{
|
||||
return window.native.GetFileId();
|
||||
}
|
||||
|
||||
function clearTimeout() {};
|
||||
function setTimeout() {};
|
||||
function clearInterval() {};
|
||||
function setInterval() {};
|
||||
|
||||
window.clearTimeout = clearTimeout;
|
||||
window.setTimeout = setTimeout;
|
||||
window.clearInterval = clearInterval;
|
||||
window.setInterval = setInterval;
|
||||
@ -1,289 +0,0 @@
|
||||
#pragma once
|
||||
#include "stdafx.h"
|
||||
#include "../Common/DocxFormat/Source/SystemUtility/File.h"
|
||||
|
||||
#define GUID_STRING_LEN 40
|
||||
|
||||
//#pragma comment(lib, "../../../../../../../v8/build/Debug/lib/icui18n.lib")
|
||||
//#pragma comment(lib, "../../../../../../../v8/build/Debug/lib/icuuc.lib")
|
||||
//#pragma comment(lib, "../../../../../../../v8/build/Debug/lib/v8_base.ia32.lib")
|
||||
//#pragma comment(lib, "../../../../../../../v8/build/Debug/lib/v8_nosnapshot.ia32.lib")
|
||||
//#pragma comment(lib, "../../../../../../../v8/build/Debug/lib/v8_snapshot.lib")
|
||||
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib, "../../../../../../v8_trunk/build/Debug/lib/icui18n.lib")
|
||||
#pragma comment(lib, "../../../../../../v8_trunk/build/Debug/lib/icuuc.lib")
|
||||
#pragma comment(lib, "../../../../../../v8_trunk/build/Debug/lib/v8_libbase.lib")
|
||||
#pragma comment(lib, "../../../../../../v8_trunk/build/Debug/lib/v8_base.lib")
|
||||
#pragma comment(lib, "../../../../../../v8_trunk/build/Debug/lib/v8_nosnapshot.lib")
|
||||
#pragma comment(lib, "../../../../../../v8_trunk/build/Debug/lib/v8_snapshot.lib")
|
||||
#pragma comment(lib, "../../../../../../v8_trunk/build/Debug/lib/v8_libplatform.lib")
|
||||
#else
|
||||
#pragma comment(lib, "../../../../../../v8_trunk/build/Release/lib/icui18n.lib")
|
||||
#pragma comment(lib, "../../../../../../v8_trunk/build/Release/lib/icuuc.lib")
|
||||
#pragma comment(lib, "../../../../../../v8_trunk/build/Release/lib/v8_libbase.lib")
|
||||
#pragma comment(lib, "../../../../../../v8_trunk/build/Release/lib/v8_base.lib")
|
||||
#pragma comment(lib, "../../../../../../v8_trunk/build/Release/lib/v8_nosnapshot.lib")
|
||||
#pragma comment(lib, "../../../../../../v8_trunk/build/Release/lib/v8_snapshot.lib")
|
||||
#pragma comment(lib, "../../../../../../v8_trunk/build/Release/lib/v8_libplatform.lib")
|
||||
#endif
|
||||
|
||||
#include "../../../../../../v8_trunk/include/v8.h"
|
||||
#include "../../../../../../v8_trunk/include/libplatform/libplatform.h"
|
||||
|
||||
class CMemoryStream
|
||||
{
|
||||
private:
|
||||
// <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
BYTE* m_pBuffer;
|
||||
BYTE* m_pBufferMem;
|
||||
|
||||
size_t m_lSize;
|
||||
|
||||
public:
|
||||
CMemoryStream()
|
||||
{
|
||||
m_pBuffer = NULL;
|
||||
m_pBufferMem = NULL;
|
||||
|
||||
m_lSize = 0;
|
||||
}
|
||||
~CMemoryStream()
|
||||
{
|
||||
RELEASEARRAYOBJECTS(m_pBuffer);
|
||||
}
|
||||
|
||||
__forceinline BYTE* GetData()
|
||||
{
|
||||
return m_pBuffer;
|
||||
}
|
||||
__forceinline int GetSize()
|
||||
{
|
||||
return (int)(m_pBufferMem - m_pBuffer);
|
||||
}
|
||||
|
||||
__forceinline void Clear()
|
||||
{
|
||||
m_lSize = 0;
|
||||
|
||||
m_pBuffer = NULL;
|
||||
m_pBufferMem = NULL;
|
||||
}
|
||||
|
||||
__forceinline void ClearNoAttack()
|
||||
{
|
||||
m_pBufferMem = m_pBuffer;
|
||||
}
|
||||
|
||||
__forceinline void Copy(const CMemoryStream* pData, const size_t& nPos, const size_t& nLen)
|
||||
{
|
||||
CheckBufferSize(nLen);
|
||||
memcpy(m_pBufferMem, pData->m_pBuffer + nPos, nLen);
|
||||
m_pBufferMem += nLen;
|
||||
};
|
||||
|
||||
__forceinline void CheckBufferSize(size_t lPlus)
|
||||
{
|
||||
if (NULL != m_pBuffer)
|
||||
{
|
||||
size_t nNewSize = (m_pBufferMem - m_pBuffer) + lPlus;
|
||||
if (nNewSize >= m_lSize)
|
||||
{
|
||||
while (nNewSize >= m_lSize)
|
||||
{
|
||||
m_lSize *= 2;
|
||||
}
|
||||
|
||||
BYTE* pNew = new BYTE[m_lSize];
|
||||
memcpy(pNew, m_pBuffer, m_pBufferMem - m_pBuffer);
|
||||
|
||||
m_pBufferMem = pNew + (m_pBufferMem - m_pBuffer);
|
||||
|
||||
RELEASEARRAYOBJECTS(m_pBuffer);
|
||||
m_pBuffer = pNew;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_lSize = 1000;
|
||||
m_pBuffer = new BYTE[m_lSize];
|
||||
m_pBufferMem = m_pBuffer;
|
||||
|
||||
CheckBufferSize(lPlus);
|
||||
}
|
||||
}
|
||||
|
||||
__forceinline void WriteBYTE(const BYTE& lValue)
|
||||
{
|
||||
CheckBufferSize(sizeof(BYTE));
|
||||
*m_pBufferMem = lValue;
|
||||
m_pBufferMem += sizeof(BYTE);
|
||||
}
|
||||
__forceinline void WriteLONG(const LONG& lValue)
|
||||
{
|
||||
CheckBufferSize(sizeof(LONG));
|
||||
*((LONG*)(m_pBufferMem)) = lValue;
|
||||
m_pBufferMem += sizeof(LONG);
|
||||
}
|
||||
__forceinline void WriteDouble(const double& dValue)
|
||||
{
|
||||
CheckBufferSize(sizeof(double));
|
||||
*((double*)(m_pBufferMem)) = dValue;
|
||||
m_pBufferMem += sizeof(double);
|
||||
}
|
||||
__forceinline void WriteStringA(const char* pData, int nLen)
|
||||
{
|
||||
CheckBufferSize(nLen + sizeof(USHORT));
|
||||
*((USHORT*)(m_pBufferMem)) = (USHORT)nLen;
|
||||
m_pBufferMem += sizeof(USHORT);
|
||||
|
||||
memcpy(m_pBufferMem, pData, nLen);
|
||||
m_pBufferMem += nLen;
|
||||
}
|
||||
__forceinline void WriteStringA2(const char* pData, int nLen)
|
||||
{
|
||||
CheckBufferSize(nLen + sizeof(LONG));
|
||||
*((LONG*)(m_pBufferMem)) = (LONG)nLen;
|
||||
m_pBufferMem += sizeof(LONG);
|
||||
|
||||
memcpy(m_pBufferMem, pData, nLen);
|
||||
m_pBufferMem += nLen;
|
||||
}
|
||||
|
||||
__forceinline void WriteString(const wchar_t* pData, int nLen)
|
||||
{
|
||||
CheckBufferSize(nLen + sizeof(USHORT));
|
||||
*((USHORT*)(m_pBufferMem)) = (USHORT)nLen;
|
||||
m_pBufferMem += sizeof(USHORT);
|
||||
|
||||
int nLen2 = nLen << 1;
|
||||
memcpy(m_pBufferMem, pData, nLen2);
|
||||
m_pBufferMem += nLen2;
|
||||
}
|
||||
__forceinline void WriteString2(const wchar_t* pData, int nLen)
|
||||
{
|
||||
int nLen2 = nLen << 1;
|
||||
|
||||
CheckBufferSize(nLen2 + sizeof(LONG));
|
||||
*((LONG*)(m_pBufferMem)) = (LONG)nLen2;
|
||||
m_pBufferMem += sizeof(LONG);
|
||||
|
||||
memcpy(m_pBufferMem, pData, nLen2);
|
||||
m_pBufferMem += nLen2;
|
||||
}
|
||||
};
|
||||
|
||||
// wrap_methods -------------
|
||||
CMemoryStream* unwrap_memorystream(v8::Handle<v8::Object> obj)
|
||||
{
|
||||
v8::Handle<v8::External> field = v8::Handle<v8::External>::Cast(obj->GetInternalField(0));
|
||||
return static_cast<CMemoryStream*>(field->Value());
|
||||
}
|
||||
|
||||
void _ms_write_byte(const v8::FunctionCallbackInfo<v8::Value>& args)
|
||||
{
|
||||
CMemoryStream* pNative = unwrap_memorystream(args.This());
|
||||
|
||||
BYTE arg = (BYTE)args[0]->Int32Value();
|
||||
pNative->WriteBYTE(arg);
|
||||
|
||||
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
|
||||
}
|
||||
void _ms_write_bool(const v8::FunctionCallbackInfo<v8::Value>& args)
|
||||
{
|
||||
CMemoryStream* pNative = unwrap_memorystream(args.This());
|
||||
|
||||
BYTE arg = (BYTE)args[0]->BooleanValue();
|
||||
pNative->WriteBYTE(arg ? 1 : 0);
|
||||
|
||||
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
|
||||
}
|
||||
void _ms_write_long(const v8::FunctionCallbackInfo<v8::Value>& args)
|
||||
{
|
||||
CMemoryStream* pNative = unwrap_memorystream(args.This());
|
||||
|
||||
LONG arg = (LONG)args[0]->Int32Value();
|
||||
pNative->WriteLONG(arg);
|
||||
|
||||
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
|
||||
}
|
||||
void _ms_write_double(const v8::FunctionCallbackInfo<v8::Value>& args)
|
||||
{
|
||||
CMemoryStream* pNative = unwrap_memorystream(args.This());
|
||||
|
||||
double arg = (double)args[0]->NumberValue();
|
||||
pNative->WriteLONG((LONG)(arg * 100000));
|
||||
|
||||
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
|
||||
}
|
||||
|
||||
void _ms_writestring1(const v8::FunctionCallbackInfo<v8::Value>& args)
|
||||
{
|
||||
CMemoryStream* pNative = unwrap_memorystream(args.This());
|
||||
v8::String::Value data(args[0]);
|
||||
pNative->WriteString((wchar_t*)*data, data.length());
|
||||
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
|
||||
}
|
||||
void _ms_writestring2(const v8::FunctionCallbackInfo<v8::Value>& args)
|
||||
{
|
||||
CMemoryStream* pNative = unwrap_memorystream(args.This());
|
||||
v8::String::Value data(args[0]);
|
||||
pNative->WriteString2((wchar_t*)*data, data.length());
|
||||
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
|
||||
}
|
||||
|
||||
void _ms_copy(const v8::FunctionCallbackInfo<v8::Value>& args)
|
||||
{
|
||||
CMemoryStream* pNative = unwrap_memorystream(args.This());
|
||||
|
||||
CMemoryStream* pNative2 = unwrap_memorystream(args[0]->ToObject());
|
||||
size_t pos = (size_t)args[1]->Uint32Value();
|
||||
size_t len = (size_t)args[2]->Uint32Value();
|
||||
|
||||
pNative->Copy(pNative2, pos, len);
|
||||
|
||||
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
|
||||
}
|
||||
|
||||
void _ms_clearnoattack(const v8::FunctionCallbackInfo<v8::Value>& args)
|
||||
{
|
||||
CMemoryStream* pNative = unwrap_memorystream(args.This());
|
||||
pNative->ClearNoAttack();
|
||||
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
|
||||
}
|
||||
|
||||
void _ms_pos(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
|
||||
{
|
||||
CMemoryStream* pNative = unwrap_memorystream(info.Holder());
|
||||
info.GetReturnValue().Set(v8::Integer::New(v8::Isolate::GetCurrent(), pNative->GetSize()));
|
||||
}
|
||||
|
||||
v8::Handle<v8::ObjectTemplate> CreateMemoryStreamTemplate(v8::Isolate* isolate)
|
||||
{
|
||||
//v8::HandleScope handle_scope(isolate);
|
||||
|
||||
v8::Local<v8::ObjectTemplate> result = v8::ObjectTemplate::New();
|
||||
result->SetInternalFieldCount(1); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CNativeControl
|
||||
|
||||
v8::Isolate* current = v8::Isolate::GetCurrent();
|
||||
|
||||
// property
|
||||
result->SetAccessor(v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), "pos"), _ms_pos); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
result->Set(v8::String::NewFromUtf8(current, "Copy"), v8::FunctionTemplate::New(current, _ms_copy));
|
||||
result->Set(v8::String::NewFromUtf8(current, "ClearNoAttack"), v8::FunctionTemplate::New(current, _ms_clearnoattack));
|
||||
result->Set(v8::String::NewFromUtf8(current, "WriteByte"), v8::FunctionTemplate::New(current, _ms_write_byte));
|
||||
result->Set(v8::String::NewFromUtf8(current, "WriteBool"), v8::FunctionTemplate::New(current, _ms_write_bool));
|
||||
result->Set(v8::String::NewFromUtf8(current, "WriteLong"), v8::FunctionTemplate::New(current, _ms_write_long));
|
||||
result->Set(v8::String::NewFromUtf8(current, "WriteDouble"), v8::FunctionTemplate::New(current, _ms_write_double));
|
||||
result->Set(v8::String::NewFromUtf8(current, "WriteString"), v8::FunctionTemplate::New(current, _ms_writestring1));
|
||||
result->Set(v8::String::NewFromUtf8(current, "WriteString2"), v8::FunctionTemplate::New(current, _ms_writestring2));
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> HandleScope <20> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" HandleScope - handle_scope
|
||||
|
||||
//return handle_scope.Close(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
<Settings>
|
||||
<file>../../../OfficeWeb/Common/Native/native.js</file>
|
||||
<file>../../../OfficeWeb/Common/Native/jquery_native.js</file>
|
||||
<file>../../../OfficeWeb/Common/3rdparty/XRegExp/xregexp-all-min.js</file>
|
||||
<file>../../../OfficeWeb/Common/AllFonts.js</file>
|
||||
<DoctSdk>../../../OfficeWeb/Word/sdk-all.js</DoctSdk>
|
||||
<PpttSdk>../../../OfficeWeb/PowerPoint/sdk-all.js</PpttSdk>
|
||||
<XlstSdk>../../../OfficeWeb/Excel/sdk-all.js</XlstSdk>
|
||||
</Settings>
|
||||
@ -1,17 +0,0 @@
|
||||
// DoctRenderer.cpp : Implementation of DLL Exports.
|
||||
#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
|
||||
#include "DoctRenderer.h"
|
||||
|
||||
// The module attribute causes DllMain, DllRegisterServer and DllUnregisterServer to be automatically implemented for you
|
||||
[ module(dll, uuid = "{8AFF13BF-79BE-4682-89AF-2CA81245D3E9}",
|
||||
name = "DoctRenderer",
|
||||
helpstring = "DoctRenderer 1.0 Type Library",
|
||||
resource_name = "IDR_DOCTRENDERER") ]
|
||||
class CDoctRendererModule
|
||||
{
|
||||
public:
|
||||
// Override CAtlDllModuleT members
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,102 +0,0 @@
|
||||
//Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
#define COMPONENT_NAME "DoctRenderer"
|
||||
#include "../Common/FileInfo.h"
|
||||
#include "version.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "winres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
|
||||
LANGUAGE 25, 1
|
||||
#pragma code_page(1251)
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""winres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#ifndef _MAC
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION INTVER
|
||||
PRODUCTVERSION INTVER
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904B0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", COMPANY_NAME
|
||||
VALUE "FileDescription", FILE_DESCRIPTION_ACTIVEX
|
||||
VALUE "FileVersion", STRVER
|
||||
VALUE "LegalCopyright", LEGAL_COPYRIGHT
|
||||
VALUE "InternalName", COMPONENT_FILE_NAME_DLL
|
||||
VALUE "OriginalFilename", COMPONENT_FILE_NAME_DLL
|
||||
VALUE "ProductName", FILE_DESCRIPTION_ACTIVEX
|
||||
VALUE "ProductVersion", STRVER
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0409, 0x04B0
|
||||
END
|
||||
END
|
||||
|
||||
#endif // !_MAC
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_PROJNAME "DoctRenderer"
|
||||
END
|
||||
|
||||
IDR_DOCTRENDERER REGISTRY "DoctRenderer.rgs"
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
HKCR
|
||||
{
|
||||
NoRemove AppID
|
||||
{
|
||||
'%APPID%' = s 'DoctRenderer'
|
||||
'DoctRenderer.DLL'
|
||||
{
|
||||
val AppID = s '%APPID%'
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Express 2013 for Windows Desktop
|
||||
VisualStudioVersion = 12.0.21005.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DoctRenderer", "DoctRenderer.vcxproj", "{BC0A8A11-2017-473D-8AB1-86A55116A2F5}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{BC0A8A11-2017-473D-8AB1-86A55116A2F5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{BC0A8A11-2017-473D-8AB1-86A55116A2F5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{BC0A8A11-2017-473D-8AB1-86A55116A2F5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{BC0A8A11-2017-473D-8AB1-86A55116A2F5}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@ -1,288 +0,0 @@
|
||||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9,00"
|
||||
Name="DoctRenderer"
|
||||
ProjectGUID="{BC0A8A11-2017-473D-8AB1-86A55116A2F5}"
|
||||
Keyword="AtlProj"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
UseOfATL="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="false"
|
||||
TargetEnvironment="1"
|
||||
GenerateStublessProxies="true"
|
||||
TypeLibraryName="$(IntDir)/DoctRenderer.tlb"
|
||||
HeaderFileName="Control.h"
|
||||
DLLDataFileName=""
|
||||
InterfaceIdentifierFileName="DoctRenderer_i.c"
|
||||
ProxyFileName="DoctRenderer_p.c"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL;_ATL_ATTRIBUTES"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1049"
|
||||
AdditionalIncludeDirectories="$(IntDir)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
IgnoreImportLibrary="true"
|
||||
UseLibraryDependencyInputs="false"
|
||||
OutputFile="$(OutDir)/DoctRenderer.dll"
|
||||
LinkIncremental="2"
|
||||
MergedIDLBaseFileName="_DoctRenderer.idl"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/DoctRenderer.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
Description="Performing registration"
|
||||
CommandLine="regsvr32 /s /c "$(TargetPath)""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="2"
|
||||
UseOfATL="1"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="..\Redist\VersionControl.exe "$(ProjectDir)\version.h""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="false"
|
||||
TargetEnvironment="1"
|
||||
GenerateStublessProxies="true"
|
||||
TypeLibraryName="$(IntDir)/DoctRenderer.tlb"
|
||||
HeaderFileName="Control.h"
|
||||
DLLDataFileName=""
|
||||
InterfaceIdentifierFileName="DoctRenderer_i.c"
|
||||
ProxyFileName="DoctRenderer_p.c"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1049"
|
||||
AdditionalIncludeDirectories="$(IntDir)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
IgnoreImportLibrary="true"
|
||||
OutputFile="$(OutDir)/DoctRenderer.dll"
|
||||
LinkIncremental="1"
|
||||
MergedIDLBaseFileName="_DoctRenderer.idl"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/DoctRenderer.lib"
|
||||
TargetMachine="1"
|
||||
CLRThreadAttribute="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
Description="Performing registration"
|
||||
CommandLine="regsvr32 /s /c "$(TargetPath)"
copy $(TargetPath) ..\Redist\DoctRenderer.dll
"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\DoctRenderer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\DocRenderer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DoctRenderer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\NativeControl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\version.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\DoctRenderer.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DoctRenderer.rgs"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,18 +0,0 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by DoctRenderer.rc
|
||||
//
|
||||
|
||||
#define IDS_PROJNAME 100
|
||||
#define IDR_DOCTRENDERER 101
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 301
|
||||
#define _APS_NEXT_COMMAND_VALUE 32768
|
||||
#define _APS_NEXT_CONTROL_VALUE 201
|
||||
#define _APS_NEXT_SYMED_VALUE 102
|
||||
#endif
|
||||
#endif
|
||||
@ -1,5 +0,0 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// JS_Executer.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
@ -1,38 +0,0 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently,
|
||||
// but are changed infrequently
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef STRICT
|
||||
#define STRICT
|
||||
#endif
|
||||
|
||||
#define _ATL_APARTMENT_THREADED
|
||||
#define _ATL_NO_AUTOMATIC_NAMESPACE
|
||||
|
||||
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
|
||||
|
||||
// turns off ATL's hiding of some common and often safely ignored warning messages
|
||||
#define _ATL_ALL_WARNINGS
|
||||
|
||||
#pragma warning(disable: 4996)
|
||||
|
||||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include <atltypes.h>
|
||||
#include <atlctl.h>
|
||||
#include <atlhost.h>
|
||||
#include <atlcoll.h>
|
||||
|
||||
#define _USE_LIBXML2_READER_
|
||||
|
||||
#pragma comment(lib, "libxml2.lib")
|
||||
|
||||
using namespace ATL;
|
||||
|
||||
#include "../ASCImageStudio3/ASCGraphics/Interfaces/ASCRenderer.h"
|
||||
|
||||
#import "..\Redist\ASCGraphics.dll" named_guids raw_interfaces_only rename_namespace("ASCGraphics"), exclude("IASCRenderer")
|
||||
#import "..\Redist\ASCOfficePDFWriter.dll" named_guids raw_interfaces_only rename_namespace("PDFWriter"), exclude("IASCRenderer")
|
||||
@ -1,7 +0,0 @@
|
||||
#pragma once
|
||||
//1
|
||||
//0
|
||||
//0
|
||||
//15
|
||||
#define INTVER 1,0,0,15
|
||||
#define STRVER "1,0,0,15\0"
|
||||
Reference in New Issue
Block a user