Commit fa55ec29 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

(1.0.0.6) add panose to interface

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@52614 954022d7-b5bf-4e40-9824-e11837661b57
parent edc8c604
...@@ -12,6 +12,7 @@ __interface IWinFonts : IDispatch ...@@ -12,6 +12,7 @@ __interface IWinFonts : IDispatch
{ {
[id(1)] HRESULT Init([in] BSTR bsFolder, [in] VARIANT_BOOL bIsUseSharedMemory, [in] VARIANT_BOOL bIsSaved); [id(1)] HRESULT Init([in] BSTR bsFolder, [in] VARIANT_BOOL bIsUseSharedMemory, [in] VARIANT_BOOL bIsSaved);
[id(2)] HRESULT GetWinFontByParams([in] BSTR bsFontParams, [out] BSTR* pbsFontName, [out] BSTR* pbsFontPath, [out] BSTR* pbsFontStyle, [out] long *plIndex); [id(2)] HRESULT GetWinFontByParams([in] BSTR bsFontParams, [out] BSTR* pbsFontName, [out] BSTR* pbsFontPath, [out] BSTR* pbsFontStyle, [out] long *plIndex);
[id(10)] HRESULT GetParamsByFontName([in] BSTR bsFontName, [out, satype("BYTE")] SAFEARRAY **ppsaPanose, [out] BSTR* pbsFontParams);
[id(1001)] HRESULT SetAdditionalParam([in] BSTR ParamName, [in] VARIANT ParamValue); [id(1001)] HRESULT SetAdditionalParam([in] BSTR ParamName, [in] VARIANT ParamValue);
[id(1002)] HRESULT GetAdditionalParam([in] BSTR ParamName, [out, retval] VARIANT* ParamValue); [id(1002)] HRESULT GetAdditionalParam([in] BSTR ParamName, [out, retval] VARIANT* ParamValue);
...@@ -134,6 +135,29 @@ public: ...@@ -134,6 +135,29 @@ public:
return S_OK; return S_OK;
} }
STDMETHOD(GetParamsByFontName)(BSTR bsFontName, SAFEARRAY **ppsaPanose, BSTR* pbsFontParams)
{
CString props = _T("<FontProperties>");
props += _T("<Name value='");
props += ((CString)bsFontName);
props += _T("' /></FontProperties>");
CWinFontInfo *pFontInfo = m_pList->GetByParams( props );
if ( NULL == pFontInfo )
return S_FALSE;
SAFEARRAYBOUND saBound;
saBound.lLbound = 0;
saBound.cElements = 10;
SAFEARRAY *psaArray = SafeArrayCreate( VT_I1, 1, &saBound );
memcpy( psaArray->pvData, pFontInfo->m_aPanose, 10 * sizeof(BYTE) );
*ppsaPanose = psaArray;
return S_OK;
}
STDMETHOD(Init)(BSTR bsFolder, VARIANT_BOOL bIsUseSharedMemory, VARIANT_BOOL bIsSaved) STDMETHOD(Init)(BSTR bsFolder, VARIANT_BOOL bIsUseSharedMemory, VARIANT_BOOL bIsSaved)
{ {
if (m_bIsInit) if (m_bIsInit)
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//1 //1
//0 //0
//0 //0
//5 //6
#define INTVER 1,0,0,5 #define INTVER 1,0,0,6
#define STRVER "1,0,0,5\0" #define STRVER "1,0,0,6\0"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment