mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
(1.0.0.6) xml format error
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@56361 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
committed by
Alexander Trofimov
parent
e9304f6f8e
commit
4dcf4dfef3
@ -46,7 +46,7 @@ void CreateNativeMemoryStream(const v8::FunctionCallbackInfo<v8::Value>& args)
|
||||
[ object, uuid("353508C9-F3EA-4ceb-8AF6-A5FF4498998C"), dual, pointer_default(unique) ]
|
||||
__interface IDoctRenderer : IDispatch
|
||||
{
|
||||
[id(100)] HRESULT Execute([in] BSTR bsXml);
|
||||
[id(100)] HRESULT Execute([in] BSTR bsXml, [out] BSTR* pbsError);
|
||||
|
||||
//----- <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ----------------------------------------------------------------
|
||||
[id(10001)] HRESULT SetAdditionalParam([in] BSTR ParamName, [in] VARIANT ParamValue);
|
||||
@ -250,8 +250,9 @@ public:
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHOD(Execute)(BSTR bsXml)
|
||||
STDMETHOD(Execute)(BSTR bsXml, BSTR* pbsError)
|
||||
{
|
||||
*pbsError = NULL;
|
||||
m_oParams.FromXml(bsXml);
|
||||
|
||||
BOOL bIsInnerFonts = FALSE;
|
||||
@ -355,8 +356,15 @@ public:
|
||||
strScript += ReadScriptFile(sResourceFile);
|
||||
|
||||
strScript += strCorrector;
|
||||
|
||||
BOOL bResult = ExecuteScript(strScript);
|
||||
|
||||
CString strError = _T("");
|
||||
BOOL bResult = ExecuteScript(strScript, strError);
|
||||
|
||||
if (_T("") != strError)
|
||||
{
|
||||
CString sDestError = _T("<result><error code=\"") + strError + _T("\" /></result>");
|
||||
*pbsError = sDestError.AllocSysString();
|
||||
}
|
||||
|
||||
return bResult ? S_OK : S_FALSE;
|
||||
}
|
||||
@ -475,7 +483,7 @@ private:
|
||||
}
|
||||
|
||||
private:
|
||||
BOOL ExecuteScript(CString& strScript)
|
||||
BOOL ExecuteScript(CString& strScript, CString& strError)
|
||||
{
|
||||
CString strException = _T("");
|
||||
|
||||
@ -499,6 +507,8 @@ private:
|
||||
{
|
||||
CString strCode = to_cstring(try_catch.Message()->GetSourceLine());
|
||||
strException = to_cstring(try_catch.Message()->Get());
|
||||
|
||||
strError = _T("compile");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -508,6 +518,8 @@ private:
|
||||
{
|
||||
CString strCode = to_cstring(try_catch.Message()->GetSourceLine());
|
||||
strException = to_cstring(try_catch.Message()->Get());
|
||||
|
||||
strError = _T("run");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -543,6 +555,8 @@ private:
|
||||
{
|
||||
int nLineError = try_catch.Message()->GetLineNumber();
|
||||
strException = to_cstring(try_catch.Message()->Get()); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
strError = _T("run");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -564,6 +578,8 @@ private:
|
||||
{
|
||||
CString strCode = to_cstring(try_catch.Message()->GetSourceLine());
|
||||
strException = to_cstring(try_catch.Message()->Get()); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
strError = _T("open");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@ -580,6 +596,8 @@ private:
|
||||
int nLineError = try_catch.Message()->GetLineNumber();
|
||||
CString strCode = to_cstring(try_catch.Message()->GetSourceLine());
|
||||
strException = to_cstring(try_catch.Message()->Get()); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
strError = _T("changes");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@ -601,6 +619,8 @@ private:
|
||||
int nLineError = try_catch.Message()->GetLineNumber();
|
||||
CString strCode = to_cstring(try_catch.Message()->GetSourceLine());
|
||||
strException = to_cstring(try_catch.Message()->Get()); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
strError = _T("save");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -610,7 +630,7 @@ private:
|
||||
{
|
||||
oFile.WriteFile((void*)strSave.GetBuffer(), (DWORD)strSave.GetLength());
|
||||
oFile.CloseFile();
|
||||
return S_OK;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -627,6 +647,8 @@ private:
|
||||
int nLineError = try_catch.Message()->GetLineNumber();
|
||||
CString strCode = to_cstring(try_catch.Message()->GetSourceLine());
|
||||
strException = to_cstring(try_catch.Message()->Get()); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
strError = _T("calculate");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@ -641,6 +663,8 @@ private:
|
||||
{
|
||||
CString strCode = to_cstring(try_catch.Message()->GetSourceLine());
|
||||
strException = to_cstring(try_catch.Message()->Get()); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
strError = _T("calculate");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -676,6 +700,8 @@ private:
|
||||
int nLineError = try_catch.Message()->GetLineNumber();
|
||||
CString strCode = to_cstring(try_catch.Message()->GetSourceLine());
|
||||
strException = to_cstring(try_catch.Message()->Get()); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>? <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
strError = _T("render");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -700,6 +726,9 @@ private:
|
||||
|
||||
RELEASEINTERFACE(pPDF);
|
||||
|
||||
if (S_OK != hr)
|
||||
strError = _T("save");
|
||||
|
||||
return (hr == S_OK) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
//1
|
||||
//0
|
||||
//0
|
||||
//5
|
||||
#define INTVER 1,0,0,5
|
||||
#define STRVER "1,0,0,5\0"
|
||||
//6
|
||||
#define INTVER 1,0,0,6
|
||||
#define STRVER "1,0,0,6\0"
|
||||
|
||||
Reference in New Issue
Block a user