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

(1.0.0.91) ASC version (full & opensource)

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@52612 954022d7-b5bf-4e40-9824-e11837661b57
parent fa91e4c0
...@@ -111,7 +111,7 @@ public: ...@@ -111,7 +111,7 @@ public:
pFontPicker->GetAdditionalParam(_T("NativeCutter"), &vt); pFontPicker->GetAdditionalParam(_T("NativeCutter"), &vt);
pEmbeddedFontsManager = (NSFontCutter::CEmbeddedFontsManager*)vt.pvRecord; pEmbeddedFontsManager = (NSFontCutter::CEmbeddedFontsManager*)vt.pvRecord;
AVSGraphics::IAVSFontManager* pFontManager = m_oFontProcessor.getFontManager(); ASCGraphics::IASCFontManager* pFontManager = m_oFontProcessor.getFontManager();
// //
pEmbeddedFontsManager->CheckFont(_T("Wingdings 3"), pFontManager); pEmbeddedFontsManager->CheckFont(_T("Wingdings 3"), pFontManager);
pEmbeddedFontsManager->CheckFont(_T("Arial"), pFontManager); pEmbeddedFontsManager->CheckFont(_T("Arial"), pFontManager);
......
...@@ -7,7 +7,7 @@ namespace BinXlsxRW { ...@@ -7,7 +7,7 @@ namespace BinXlsxRW {
static TCHAR* gc_sDefaultFontName = _T("Arial"); static TCHAR* gc_sDefaultFontName = _T("Arial");
class FontProcessor { class FontProcessor {
AVSGraphics::IAVSFontManager* m_pFontManager; ASCGraphics::IASCFontManager* m_pFontManager;
CAtlMap<CString, CString> m_mapFontMap; CAtlMap<CString, CString> m_mapFontMap;
CString m_sFontDir; CString m_sFontDir;
...@@ -37,7 +37,7 @@ namespace BinXlsxRW { ...@@ -37,7 +37,7 @@ namespace BinXlsxRW {
addToFontMap(*pFont); addToFontMap(*pFont);
} }
} }
AVSGraphics::IAVSFontManager* getFontManager() ASCGraphics::IASCFontManager* getFontManager()
{ {
return m_pFontManager; return m_pFontManager;
} }
...@@ -66,7 +66,7 @@ namespace BinXlsxRW { ...@@ -66,7 +66,7 @@ namespace BinXlsxRW {
void initFontManager() void initFontManager()
{ {
RELEASEINTERFACE(m_pFontManager); RELEASEINTERFACE(m_pFontManager);
CoCreateInstance(__uuidof(AVSGraphics::CAVSFontManager), NULL, CLSCTX_ALL, __uuidof(AVSGraphics::IAVSFontManager), (void**) &m_pFontManager); CoCreateInstance(ASCGraphics::CLSID_CASCFontManager, NULL, CLSCTX_ALL, ASCGraphics::IID_IASCFontManager, (void**) &m_pFontManager);
VARIANT var; VARIANT var;
var.vt = VT_BSTR; var.vt = VT_BSTR;
...@@ -74,10 +74,12 @@ namespace BinXlsxRW { ...@@ -74,10 +74,12 @@ namespace BinXlsxRW {
m_pFontManager->SetAdditionalParam(L"InitializeFromFolder", var); m_pFontManager->SetAdditionalParam(L"InitializeFromFolder", var);
RELEASESYSSTRING(var.bstrVal); RELEASESYSSTRING(var.bstrVal);
#ifdef BUILD_CONFIG_FULL_VERSION
CString defaultFontName = gc_sDefaultFontName; CString defaultFontName = gc_sDefaultFontName;
BSTR defFontName = defaultFontName.AllocSysString(); BSTR defFontName = defaultFontName.AllocSysString();
m_pFontManager->SetDefaultFont(defFontName); m_pFontManager->SetDefaultFont(defFontName);
SysFreeString(defFontName); SysFreeString(defFontName);
#endif
} }
void addToFontMap(OOX::Spreadsheet::CFont& font) void addToFontMap(OOX::Spreadsheet::CFont& font)
...@@ -118,17 +120,23 @@ namespace BinXlsxRW { ...@@ -118,17 +120,23 @@ namespace BinXlsxRW {
CString params = parw; CString params = parw;
BSTR fontPath; BSTR fontPath;
BSTR familyName;
long index = 0; long index = 0;
BSTR bstrParams = params.AllocSysString(); BSTR bstrParams = params.AllocSysString();
#ifdef BUILD_CONFIG_FULL_VERSION
m_pFontManager->GetWinFontByParams(bstrParams, &fontPath, &index); m_pFontManager->GetWinFontByParams(bstrParams, &fontPath, &index);
SysFreeString(bstrParams);
int status = m_pFontManager->LoadFontFromFile(fontPath, 12, 72, 72, index); int status = m_pFontManager->LoadFontFromFile(fontPath, 12, 72, 72, index);
SysFreeString(fontPath); SysFreeString(fontPath);
BSTR familyName;
m_pFontManager->GetFamilyName(&familyName); m_pFontManager->GetFamilyName(&familyName);
#else
m_pFontManager->GetWinFontByParams(bstrParams, &familyName, &fontPath, NULL, &index);
#endif
CString resFontName = familyName; CString resFontName = familyName;
SysFreeString(fontPath);
SysFreeString(familyName); SysFreeString(familyName);
SysFreeString(bstrParams);
m_mapFontMap.SetAt(sFontName, resFontName); m_mapFontMap.SetAt(sFontName, resFontName);
} }
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
CommandLine="" CommandLine="..\Redist\VersionControl.exe &quot;$(ProjectDir)\version.h&quot;"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
...@@ -279,11 +279,11 @@ ...@@ -279,11 +279,11 @@
Name="Common" Name="Common"
> >
<File <File
RelativePath="..\ASCOfficePPTXFile\Editor\BinReaderWriterDefines.h" RelativePath=".\Common\BinReaderWriterDefines.h"
> >
</File> </File>
<File <File
RelativePath=".\Common\BinReaderWriterDefines.h" RelativePath="..\ASCOfficePPTXFile\Editor\BinReaderWriterDefines.h"
> >
</File> </File>
<File <File
......
...@@ -45,19 +45,31 @@ ...@@ -45,19 +45,31 @@
#include <atlhost.h> #include <atlhost.h>
#include <atlcoll.h> #include <atlcoll.h>
#define __USE_XML_COMMON__
using namespace ATL; using namespace ATL;
#include "../Common/ASCUtils.h" #include "../Common/ASCUtils.h"
#include "../Common/Config.h"
#import "../../../../../Redist/AVSMediaCore3.dll" named_guids raw_interfaces_only rename_namespace("MediaCore"), exclude("tagRECT")
#import "../../../../../Redist/AVSImageStudio3.dll" named_guids raw_interfaces_only rename_namespace("AVSImageStudio")
#import "../../../../../Redist/AVSGraphics.dll" named_guids raw_interfaces_only rename_namespace("AVSGraphics")
#import "../../../../../Redist/AVSOfficeStudio/AVSOfficeFile.dll" raw_interfaces_only rename_namespace("AVSOfficeFile")
#import "../../../../../Redist/AVSOfficeStudio/AVSFontConverter.dll" named_guids raw_interfaces_only rename_namespace("Fonts")
#import "../../../../../Redist/AVSOfficeStudio/AVSOfficePPTXFile.dll" raw_interfaces_only rename_namespace("PPTXFile")
#include <Gdiplus.h> #include <Gdiplus.h>
#pragma comment(lib, "gdiplus.lib") #pragma comment(lib, "gdiplus.lib")
using namespace Gdiplus; using namespace Gdiplus;
\ No newline at end of file
#ifdef BUILD_CONFIG_OPENSOURCE_VERSION
#import "../Redist/OfficeCore.dll" named_guids raw_interfaces_only rename_namespace("OfficeCore")
namespace ASCGraphics
{
typedef OfficeCore::IWinFonts IASCFontManager;
const GUID CLSID_CASCFontManager = OfficeCore::CLSID_CWinFonts;
const GUID IID_IASCFontManager = OfficeCore::IID_IWinFonts;
}
#else
#import "../Redist/ASCGraphics.dll" named_guids raw_interfaces_only rename_namespace("ASCGraphics")
#import "../Redist/ASCFontConverter.dll" named_guids raw_interfaces_only rename_namespace("Fonts")
#endif
#import "../Redist/ASCOfficePPTXFile.dll" named_guids raw_interfaces_only rename_namespace("PPTXFile"), exclude("_IAVSOfficeFileTemplateEvents"), exclude("_IAVSOfficeFileTemplateEvents2")
\ No newline at end of file
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//1 //1
//0 //0
//0 //0
//90 //91
#define INTVER 1,0,0,90 #define INTVER 1,0,0,91
#define STRVER "1,0,0,90\0" #define STRVER "1,0,0,91\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