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

(1.0.0.32) ASC version full

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@52666 954022d7-b5bf-4e40-9824-e11837661b57
parent 4cfdb40d
......@@ -2,7 +2,6 @@
#pragma once
#include "stdafx.h"
#include "resource.h" // main symbols
#include "Registration.h"
#ifdef PPT_DEF
#include "OfficeDrawing\Shapes\BaseShape\PPTShape\Formula.cpp"
......@@ -75,7 +74,7 @@ class ATL_NO_VTABLE CAVSPresentationEditor:
public IAVSPresentationEditor
{
protected:
AVSGraphics::IAVSWinFonts* m_pWinFonts;
ASCGraphics::IASCWinFonts* m_pWinFonts;
LONG m_lFileType;
PPTFile::IAVSOfficePPTFile* m_pPPTFile;
......@@ -113,7 +112,7 @@ public:
m_hSynchMutex = CreateMutex(NULL, FALSE, NULL);
m_pWinFonts = NULL;
CoCreateInstance(AVSGraphics::CLSID_CAVSWinFonts, NULL, CLSCTX_ALL, AVSGraphics::IID_IAVSWinFonts, (void**)&m_pWinFonts);
CoCreateInstance(ASCGraphics::CLSID_CASCWinFonts, NULL, CLSCTX_ALL, ASCGraphics::IID_IASCWinFonts, (void**)&m_pWinFonts);
m_pPPTFile = NULL;
m_pPPTXFile = NULL;
......@@ -458,111 +457,7 @@ public:
oWriter.CreateFile(&m_oDocument);
oWriter.CloseFile();
break;
}
case 2:
{
AVSGraphics::IAVSDocumentPainter* pPainter = NULL;
CoCreateInstance(AVSGraphics::CLSID_CAVSDocumentPainter, NULL, CLSCTX_ALL, AVSGraphics::IID_IAVSDocumentPainter, (void**)&pPainter);
CString strXml = m_oDocument.ToXmlVideoSource2();
BSTR bsXml = strXml.AllocSysString();
pPainter->SetXml(bsXml);
SysFreeString(bsXml);
PDFFile::IPDFWriter* pPdfWriter = NULL;
CoCreateInstance(PDFFile::CLSID_CPDFWriter, NULL, CLSCTX_ALL, PDFFile::IID_IPDFWriter, (void**)&pPdfWriter);
pPdfWriter->CreatePDF();
IUnknown* punkPDF = NULL;
pPdfWriter->QueryInterface(IID_IUnknown, (void**)&punkPDF);
pPainter->AddRenderer(punkPDF);
RELEASEINTERFACE(punkPDF);
pPainter->Start();
LONG lStatus = 1;
while (lStatus)
{
pPainter->get_Status(&lStatus);
::Sleep(100);
}
CString strFile = (CString)bsFilePath;
BSTR bsFile = strFile.AllocSysString();
pPdfWriter->SaveToFile(bsFile);
RELEASEINTERFACE(pPdfWriter);
SysFreeString(bsFile);
break;
}
case 3:
{
AVSGraphics::IAVSDocumentPainter* pPainter = NULL;
CoCreateInstance(AVSGraphics::CLSID_CAVSDocumentPainter, NULL, CLSCTX_ALL, AVSGraphics::IID_IAVSDocumentPainter, (void**)&pPainter);
CString strXml = m_oDocument.ToXmlVideoSource2();
BSTR bsXml = strXml.AllocSysString();
pPainter->SetXml(bsXml);
SysFreeString(bsXml);
HTMLRenderer::IAVSHTMLRenderer* pHTML = NULL;
CoCreateInstance(HTMLRenderer::CLSID_CAVSHTMLRenderer, NULL, CLSCTX_ALL, HTMLRenderer::IID_IAVSHTMLRenderer, (void**)&pHTML);
pHTML->put_Mode(20);
pHTML->CreateOfficeFile(bsFilePath);
IUnknown* punkHTML = NULL;
pHTML->QueryInterface(IID_IUnknown, (void**)&punkHTML);
pPainter->AddRenderer(punkHTML);
RELEASEINTERFACE(punkHTML);
pPainter->Start();
LONG lStatus = 1;
while (lStatus)
{
pPainter->get_Status(&lStatus);
::Sleep(100);
}
pHTML->CloseFile();
RELEASEINTERFACE(pHTML);
break;
}
case 4:
{
AVSGraphics::IAVSDocumentPainter* pPainter = NULL;
CoCreateInstance(AVSGraphics::CLSID_CAVSDocumentPainter, NULL, CLSCTX_ALL, AVSGraphics::IID_IAVSDocumentPainter, (void**)&pPainter);
CString strXml = m_oDocument.ToXmlVideoSource2();
BSTR bsXml = strXml.AllocSysString();
pPainter->SetXml(bsXml);
SysFreeString(bsXml);
HTMLRenderer::IAVSHTMLRenderer2* pHTML = NULL;
CoCreateInstance(HTMLRenderer::CLSID_CAVSHTMLRenderer2, NULL, CLSCTX_ALL, HTMLRenderer::IID_IAVSHTMLRenderer2, (void**)&pHTML);
pHTML->put_Mode(20);
pHTML->CreateOfficeFile(bsFilePath);
IUnknown* punkHTML = NULL;
pHTML->QueryInterface(IID_IUnknown, (void**)&punkHTML);
pPainter->AddRenderer(punkHTML);
RELEASEINTERFACE(punkHTML);
pPainter->Start();
LONG lStatus = 1;
while (lStatus)
{
pPainter->get_Status(&lStatus);
::Sleep(100);
}
pHTML->CloseFile();
RELEASEINTERFACE(pHTML);
break;
}
}
default:
break;
}
......
......@@ -121,7 +121,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="..\..\..\Redist\VersionControl.exe &quot;$(ProjectDir)\version.h&quot;"
CommandLine="..\Redist\VersionControl.exe &quot;$(ProjectDir)\version.h&quot;"
/>
<Tool
Name="VCCustomBuildTool"
......
......@@ -122,22 +122,6 @@ namespace NSPresentationEditor
{
if (0.0 < m_dAudioDuration || _T("") == m_strFile)
return;
VideoFile::IVideoFile3* pVideoFile = NULL;
if (SUCCEEDED(CoCreateInstance(VideoFile::CLSID_CVideoFile3, NULL, CLSCTX_ALL, VideoFile::IID_IVideoFile3, (void**)(&pVideoFile))))
{
if (NULL != pVideoFile)
{
BSTR bsFile = m_strFile.AllocSysString();
if (S_OK == pVideoFile->OpenFile(bsFile))
{
pVideoFile->get_audioDuration(&m_dAudioDuration);
}
SysFreeString(bsFile);
RELEASEINTERFACE(pVideoFile);
}
}
}
};
......
......@@ -23,6 +23,7 @@
#include "Shapes/BaseShape/PPTShape/PPT2PPTXShapeConverter.h"
#endif
#if defined(PPTX_DEF)
namespace PPTX2EditorAdvanced
{
AVSINLINE OOXMLShapes::ShapeType GetShapeTypeFromStr(const CString& str)//const
......@@ -264,6 +265,7 @@ namespace PPTX2EditorAdvanced
return OOXMLShapes::sptNil;
}
}
#endif
namespace NSPresentationEditor
{
......@@ -977,9 +979,9 @@ namespace NSPresentationEditor
// m_oShape.m_oPen.LineEndCap == 0x13 ||
// m_oShape.m_oPen.LineEndCap == 0x12)
//{
// AVSGraphics::IAVSMetafile* pMetafile = NULL;
// CoCreateInstance(AVSGraphics::CLSID_CAVSMetafile, NULL, CLSCTX_ALL, AVSGraphics::IID_IAVSMetafile, (void**)&pMetafile);
// m_oShape.ToRenderer((IAVSRenderer*)pMetafile, oInfo, m_oMetric, m_dStartTime, m_dEndTime);
// ASCGraphics::IAVSMetafile* pMetafile = NULL;
// CoCreateInstance(ASCGraphics::CLSID_CAVSMetafile, NULL, CLSCTX_ALL, ASCGraphics::IID_IAVSMetafile, (void**)&pMetafile);
// m_oShape.ToRenderer((IASCRenderer*)pMetafile, oInfo, m_oMetric, m_dStartTime, m_dEndTime);
// pMetafile->Draw2((IUnknown*)pSVG, 96.0, 96.0, NULL);
// RELEASEINTERFACE(pMetafile);
//}
......@@ -1220,8 +1222,8 @@ namespace NSPresentationEditor
strSvg += _T("</svg>");
AVSGraphics::ISVGTransformer* pSVGTransformer = NULL;
CoCreateInstance(__uuidof(AVSGraphics::SVGTransformer), NULL, CLSCTX_ALL, __uuidof(AVSGraphics::ISVGTransformer), (void**)&pSVGTransformer);
ASCGraphics::ISVGTransformer* pSVGTransformer = NULL;
CoCreateInstance(__uuidof(ASCGraphics::SVGTransformer), NULL, CLSCTX_ALL, __uuidof(ASCGraphics::ISVGTransformer), (void**)&pSVGTransformer);
ISVGConverter* pSVGConverter = NULL;
CoCreateInstance(__uuidof(CSVGConverter), NULL, CLSCTX_ALL, __uuidof(ISVGConverter), (void**)&pSVGConverter);
......
......@@ -13,7 +13,7 @@ HRESULT NSPresentationEditor::CSVGConverter::FinalConstruct()
m_lClipMode = c_nClipRegionTypeWinding;
m_pSimpleGraphicsConverter = NULL;
CoCreateInstance(AVSGraphics::CLSID_CAVSGraphicSimpleComverter, NULL, CLSCTX_ALL, AVSGraphics::IID_IAVSGraphicSimpleComverter, (void**)&m_pSimpleGraphicsConverter);
CoCreateInstance(ASCGraphics::CLSID_CASCGraphicSimpleComverter, NULL, CLSCTX_ALL, ASCGraphics::IID_IASCGraphicSimpleComverter, (void**)&m_pSimpleGraphicsConverter);
IUnknown* punkRenderer = NULL;
this->QueryInterface(IID_IUnknown, (void**)&punkRenderer);
......@@ -115,7 +115,7 @@ STDMETHODIMP NSPresentationEditor::CSVGConverter::get_PenColor(LONG* lColor)
}
STDMETHODIMP NSPresentationEditor::CSVGConverter::put_PenColor(LONG lColor)
{
BYTE lScheme = ((DWORD)(lColor)) >> 24;
BYTE lScheme = (BYTE)(((DWORD)(lColor)) >> 24);
if (0xFF != lScheme)
m_oPen.Color.SetBGR(lColor);
......@@ -243,7 +243,7 @@ STDMETHODIMP NSPresentationEditor::CSVGConverter::get_BrushColor1(LONG* lColor)
}
STDMETHODIMP NSPresentationEditor::CSVGConverter::put_BrushColor1(LONG lColor)
{
BYTE lScheme = ((DWORD)(lColor)) >> 24;
BYTE lScheme = (BYTE)(((DWORD)(lColor)) >> 24);
if (0xFF != lScheme)
m_oBrush.Color1.SetBGR(lColor);
......@@ -857,7 +857,7 @@ STDMETHODIMP NSPresentationEditor::CSVGConverter::OpenFile(BSTR bsFilePath)
{
if (NULL == m_pFontManager)
{
CoCreateInstance(AVSGraphics::CLSID_CAVSFontManager, NULL, CLSCTX_ALL, AVSGraphics::IID_IAVSFontManager, (void**)&m_pFontManager);
CoCreateInstance(ASCGraphics::CLSID_CASCFontManager, NULL, CLSCTX_ALL, ASCGraphics::IID_IASCFontManager, (void**)&m_pFontManager);
m_pFontManager->Initialize(L"");
m_pFontManager->SetDefaultFont(L"Arial");
......
......@@ -3,7 +3,7 @@
#include "Shapes\Shape.h"
#include "Shapes\Graphics\Matrix.h"
#include "../../../AVSImageStudio3/AVSGraphics/Interfaces/AVSRenderer.h"
#include "../../ASCImageStudio3/ASCGraphics/Interfaces/ASCRenderer.h"
namespace NSPresentationEditor
{
......@@ -13,7 +13,7 @@ namespace NSPresentationEditor
// ISVGConverter
[ object, uuid("4EE9D2C3-7317-4540-A205-DB78DBEB9BD0"), dual, pointer_default(unique) ]
__interface ISVGConverter : IAVSRenderer
__interface ISVGConverter : IASCRenderer
{
[id(5000)] HRESULT OpenFile([in] BSTR bsFileName);
[id(5001)] HRESULT CloseFile();
......@@ -184,8 +184,8 @@ namespace NSPresentationEditor
private:
AVSGraphics::IAVSGraphicSimpleComverter* m_pSimpleGraphicsConverter; //
AVSGraphics::IAVSFontManager* m_pFontManager; //
ASCGraphics::IASCGraphicSimpleComverter* m_pSimpleGraphicsConverter; //
ASCGraphics::IASCFontManager* m_pFontManager; //
CMatrix m_oBaseTransform; // (: -> )
CMatrix m_oTransform; //
......@@ -315,7 +315,7 @@ namespace NSPresentationEditor
{
if (NULL == m_pFontManager)
{
CoCreateInstance(__uuidof(AVSGraphics::CAVSFontManager), NULL, CLSCTX_ALL, __uuidof(AVSGraphics::IAVSFontManager), (void**)&m_pFontManager);
CoCreateInstance(__uuidof(ASCGraphics::CASCFontManager), NULL, CLSCTX_ALL, __uuidof(ASCGraphics::IASCFontManager), (void**)&m_pFontManager);
m_pFontManager->Initialize(L"");
}
......
#pragma once
#include "AvsUtils.h"
#include "../../Common/ASCUtils.h"
#include "../OfficeDrawing/Document.h"
#include "../../Common/DocxFormat/Source/SystemUtility/File.h"
......@@ -7,7 +7,7 @@
#include "StylesWriter.h"
#include "ImageManager.h"
#import "../../../Redist/AVSOfficeStudio/AVSOfficeUtils.dll" named_guids rename_namespace("AVSOfficeUtils"), raw_interfaces_only
#import "../../Redist/ASCOfficeUtils.dll" named_guids rename_namespace("AVSOfficeUtils"), raw_interfaces_only
namespace NSPresentationEditor
{
......@@ -48,8 +48,8 @@ namespace NSPresentationEditor
m_pDocument = NULL;
IAVSRenderer* pRenderer = NULL;
CoCreateInstance(__uuidof(CShapeWriter), NULL, CLSCTX_ALL, __uuidof(IAVSRenderer), (void**)&pRenderer);
IASCRenderer* pRenderer = NULL;
CoCreateInstance(__uuidof(CShapeWriter), NULL, CLSCTX_ALL, __uuidof(IASCRenderer), (void**)&pRenderer);
m_pShapeWriter = (CShapeWriter*)pRenderer;
}
......
......@@ -9,7 +9,7 @@ HRESULT NSPresentationEditor::CShapeWriter::FinalConstruct()
m_lClipMode = c_nClipRegionTypeWinding;
m_pSimpleGraphicsConverter = NULL;
CoCreateInstance(AVSGraphics::CLSID_CAVSGraphicSimpleComverter, NULL, CLSCTX_ALL, AVSGraphics::IID_IAVSGraphicSimpleComverter, (void**)&m_pSimpleGraphicsConverter);
CoCreateInstance(ASCGraphics::CLSID_CASCGraphicSimpleComverter, NULL, CLSCTX_ALL, ASCGraphics::IID_IASCGraphicSimpleComverter, (void**)&m_pSimpleGraphicsConverter);
IUnknown* punkRenderer = NULL;
this->QueryInterface(IID_IUnknown, (void**)&punkRenderer);
......
......@@ -30,8 +30,8 @@ namespace NSPresentationEditor
return _T("body");
}
[ coclass, default(IAVSRenderer), threading(apartment), vi_progid("Drawing.SW"), progid("Drawing.SW.1"), version(1.0), uuid("3C1D8C77-D249-47a4-8D7A-7F7BEE66741E") ]
class ATL_NO_VTABLE CShapeWriter : public IAVSRenderer
[ coclass, default(IASCRenderer), threading(apartment), vi_progid("Drawing.SW"), progid("Drawing.SW.1"), version(1.0), uuid("3C1D8C77-D249-47a4-8D7A-7F7BEE66741E") ]
class ATL_NO_VTABLE CShapeWriter : public IASCRenderer
{
private:
NSPresentationEditor::CStringWriter m_oWriterPath;
......@@ -55,8 +55,8 @@ namespace NSPresentationEditor
CShapeWriter()
{
m_pShapeElement = NULL;
CoCreateInstance(AVSGraphics::CLSID_CAVSGraphicSimpleComverter, NULL, CLSCTX_ALL,
AVSGraphics::IID_IAVSGraphicSimpleComverter, (void**)&m_pSimpleGraphicsConverter);
CoCreateInstance(ASCGraphics::CLSID_CASCGraphicSimpleComverter, NULL, CLSCTX_ALL,
ASCGraphics::IID_IASCGraphicSimpleComverter, (void**)&m_pSimpleGraphicsConverter);
m_pRels = NULL;
m_lNextShapeID = 1000;
......@@ -415,7 +415,7 @@ namespace NSPresentationEditor
{
if (NULL == m_pFontManager)
{
CoCreateInstance(__uuidof(AVSGraphics::CAVSFontManager), NULL, CLSCTX_ALL, __uuidof(AVSGraphics::IAVSFontManager), (void**)&m_pFontManager);
CoCreateInstance(__uuidof(ASCGraphics::CASCFontManager), NULL, CLSCTX_ALL, __uuidof(ASCGraphics::IASCFontManager), (void**)&m_pFontManager);
m_pFontManager->Initialize(L"");
}
......@@ -440,8 +440,8 @@ namespace NSPresentationEditor
public:
AVSGraphics::IAVSGraphicSimpleComverter* m_pSimpleGraphicsConverter; //
AVSGraphics::IAVSFontManager* m_pFontManager; //
ASCGraphics::IASCGraphicSimpleComverter* m_pSimpleGraphicsConverter; //
ASCGraphics::IASCFontManager* m_pFontManager; //
CMatrix m_oBaseTransform; // (: -> )
CMatrix m_oTransform; //
......
......@@ -56,14 +56,13 @@ using namespace Gdiplus;
#include "../Common/OfficeFileTemplate.h"
#include "../ASCImageStudio3/ASCGraphics/Interfaces/ASCRenderer.h"
#import "../Redist/ASCMediaCore3.dll" named_guids rename_namespace("MediaCore"), exclude("tagRECT")
#import "../Redist/ASCImageFile3.dll" named_guids rename_namespace("ImageFile")
#import "../Redist/ASCVideoFile3.dll" named_guids rename_namespace("VideoFile"), raw_interfaces_only
#import "../Redist/ASCGraphics.dll" named_guids rename_namespace("AVSGraphics"), raw_interfaces_only, exclude("IAVSRenderer")
#import "../Redist/ASCHTMLRenderer.dll" named_guids rename_namespace("HTMLRenderer"), raw_interfaces_only, exclude("IAVSRenderer")
#import "../Redist/ASCMediaCore3.dll" named_guids rename_namespace("MediaCore"), exclude("tagRECT")
#import "../Redist/ASCImageFile3.dll" named_guids rename_namespace("ImageFile")
#import "../Redist/ASCGraphics.dll" named_guids rename_namespace("ASCGraphics"), raw_interfaces_only, exclude("IASCRenderer")
#import "../Redist/ASCHTMLRenderer.dll" named_guids rename_namespace("HTMLRenderer"), raw_interfaces_only, exclude("IASCRenderer")
#import "../Redist/ASCOfficePPTFile.dll" named_guids rename_namespace("PPTFile"), raw_interfaces_only, exclude("IAVSOfficeFileTemplate", "_IAVSOfficeFileTemplateEvents", "_IAVSOfficeFileTemplateEvents2", "IAVSOfficeFile")
#import "../Redist/ASCOfficePPTXFile.dll" named_guids rename_namespace("PPTXFile"), raw_interfaces_only, exclude("IAVSOfficeFileTemplate", "_IAVSOfficeFileTemplateEvents", "_IAVSOfficeFileTemplateEvents2", "IAVSOfficeFile")
#import "../Redist/ASCOfficeOdpFile.dll" named_guids rename_namespace("ODPFile"), raw_interfaces_only, exclude("IAVSOfficeFileTemplate", "_IAVSOfficeFileTemplateEvents", "_IAVSOfficeFileTemplateEvents2", "IAVSOfficeFile")
#import "../Redist/ASCOfficePDFWriter.dll" named_guids rename_namespace("PDFFile"), raw_interfaces_only, exclude("IAVSRenderer")
#import "../Redist/ASCOfficePDFWriter.dll" named_guids rename_namespace("PDFFile"), raw_interfaces_only, exclude("IASCRenderer")
......@@ -2,6 +2,6 @@
//1
//0
//0
//31
#define INTVER 1,0,0,31
#define STRVER "1,0,0,31\0"
//32
#define INTVER 1,0,0,32
#define STRVER "1,0,0,32\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