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

crossplatform version (not worked)

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63549 954022d7-b5bf-4e40-9824-e11837661b57
parent 5de1bdc4
......@@ -15,6 +15,9 @@ ASCHTMLRenderer/Resources/imgtrackbar/b_bg_off.gif svn_mime_002dtype=application
ASCHTMLRenderer/Resources/imgtrackbar/b_bg_on.gif svn_mime_002dtype=application%2Foctet-stream
ASCHTMLRenderer/Resources/imgtrackbar/b_l.gif svn_mime_002dtype=application%2Foctet-stream
ASCHTMLRenderer/Resources/imgtrackbar/b_r.gif svn_mime_002dtype=application%2Foctet-stream
ASCHTMLRenderer/lib svnc_tsvn_003alogminsize=5
ASCHTMLRenderer/lib/include svnc_tsvn_003alogminsize=5
ASCHTMLRenderer/lib/src svnc_tsvn_003alogminsize=5
ASCImageStudio3/ASCGraphics/Expat/lib/libexpat.lib svn_mime_002dtype=application%2Foctet-stream
ASCImageStudio3/ASCGraphics/Objects/Font/FreeType/freetype242_vs2005.lib svn_mime_002dtype=application%2Foctet-stream
ASCImageStudio3/ASCGraphics/OfficeSvmFile/zlibstat.lib svn_mime_002dtype=application%2Foctet-stream
#-------------------------------------------------
#
# Project created by QtCreator 2015-01-19T10:22:14
#
#-------------------------------------------------
QT -= core
QT -= gui
TARGET = aschtmlrenderer
TEMPLATE = lib
CONFIG += staticlib
QMAKE_CXXFLAGS += -std=c++11
#################### WINDOWS #####################
win32 {
DEFINES += \
WIN32
CONFIG(debug, debug|release) {
LIBS += -L../../../DesktopEditor/Qt_build/graphics/Debug/debug -lgraphics
} else {
LIBS += -L../../../DesktopEditor/Qt_build/graphics/Release/release -lgraphics
}
}
##################################################
################### LINUX ########################
linux-g++ | linux-g++-64 | linux-g++-32 {
DEFINES += \
LINUX \
_LINUX \
_LINUX_QT \
LIBS += -L../../../DesktopEditor/Qt_build/graphics/Release -lgraphics
}
linux-g++:contains(QMAKE_HOST.arch, x86_64):{
message(linux64)
}
linux-g++:!contains(QMAKE_HOST.arch, x86_64):{
message(linux32)
}
##################################################
INCLUDEPATH += \
../../DesktopEditor/agg-2.4/include \
../../DesktopEditor/freetype-2.5.2/include
SOURCES += \
src/HTMLRenderer.cpp \
src/HTMLRenderer2.cpp \
src/HTMLRenderer3.cpp
HEADERS += \
src/CanvasWriter.h \
src/Common.h \
src/Document.h \
src/FontManager.h \
src/FontManagerBase.h \
src/StringWriter.h \
src/SVGWriter.h \
src/SVGWriter2.h \
src/Text.h \
src/TextItem.h \
src/VectorGraphicsWriter.h \
src/VectorGraphicsWriter2.h \
src/VMLWriter.h \
src/Writer.h \
src/Writer2.h \
src/Writer3.h \
src/Writer4.h \
include/HTMLRenderer.h \
include/HTMLRenderer2.h \
include/HTMLRenderer3.h
unix {
target.path = /usr/lib
INSTALLS += target
}
#ifndef _ASC_HTMLRENDERER1_H_
#define _ASC_HTMLRENDERER1_H_
#include "../../../DesktopEditor/graphics/IRenderer.h"
class CASCHTMLRenderer_Private;
class CASCHTMLRenderer : public IRenderer
{
public:
// тип рендерера-----------------------------------------------------------------------------
virtual HRESULT get_Type(LONG* lType);
//-------- Функции для работы со страницей --------------------------------------------------
virtual HRESULT NewPage();
virtual HRESULT get_Height(double* dHeight);
virtual HRESULT put_Height(const double& dHeight);
virtual HRESULT get_Width(double* dWidth);
virtual HRESULT put_Width(const double& dWidth);
virtual HRESULT get_DpiX(double* dDpiX);
virtual HRESULT get_DpiY(double* dDpiY);
// pen --------------------------------------------------------------------------------------
virtual HRESULT get_PenColor(LONG* lColor);
virtual HRESULT put_PenColor(const LONG& lColor);
virtual HRESULT get_PenAlpha(LONG* lAlpha);
virtual HRESULT put_PenAlpha(const LONG& lAlpha);
virtual HRESULT get_PenSize(double* dSize);
virtual HRESULT put_PenSize(const double& dSize);
virtual HRESULT get_PenDashStyle(BYTE* val);
virtual HRESULT put_PenDashStyle(const BYTE& val);
virtual HRESULT get_PenLineStartCap(BYTE* val);
virtual HRESULT put_PenLineStartCap(const BYTE& val);
virtual HRESULT get_PenLineEndCap(BYTE* val);
virtual HRESULT put_PenLineEndCap(const BYTE& val);
virtual HRESULT get_PenLineJoin(BYTE* val);
virtual HRESULT put_PenLineJoin(const BYTE& val);
virtual HRESULT get_PenDashOffset(double* dOffset);
virtual HRESULT put_PenDashOffset(const double& dOffset);
virtual HRESULT get_PenAlign(LONG* lAlign);
virtual HRESULT put_PenAlign(const LONG& lAlign);
virtual HRESULT get_PenMiterLimit(double* dOffset);
virtual HRESULT put_PenMiterLimit(const double& dOffset);
virtual HRESULT PenDashPattern(double* pPattern, LONG lCount);
// brush ------------------------------------------------------------------------------------
virtual HRESULT get_BrushType(LONG* lType);
virtual HRESULT put_BrushType(const LONG& lType);
virtual HRESULT get_BrushColor1(LONG* lColor);
virtual HRESULT put_BrushColor1(const LONG& lColor);
virtual HRESULT get_BrushAlpha1(LONG* lAlpha);
virtual HRESULT put_BrushAlpha1(const LONG& lAlpha);
virtual HRESULT get_BrushColor2(LONG* lColor);
virtual HRESULT put_BrushColor2(const LONG& lColor);
virtual HRESULT get_BrushAlpha2(LONG* lAlpha);
virtual HRESULT put_BrushAlpha2(const LONG& lAlpha);
virtual HRESULT get_BrushTexturePath(std::wstring* bsPath);
virtual HRESULT put_BrushTexturePath(const std::wstring& bsPath);
virtual HRESULT get_BrushTextureMode(LONG* lMode);
virtual HRESULT put_BrushTextureMode(const LONG& lMode);
virtual HRESULT get_BrushTextureAlpha(LONG* lTxAlpha);
virtual HRESULT put_BrushTextureAlpha(const LONG& lTxAlpha);
virtual HRESULT get_BrushLinearAngle(double* dAngle);
virtual HRESULT put_BrushLinearAngle(const double& dAngle);
virtual HRESULT BrushRect(const INT& val, const double& left, const double& top, const double& width, const double& height);
virtual HRESULT BrushBounds(const double& left, const double& top, const double& width, const double& height);
virtual HRESULT put_BrushGradientColors(LONG* lColors, double* pPositions, LONG nCount);
// font -------------------------------------------------------------------------------------
virtual HRESULT get_FontName(std::wstring* bsName);
virtual HRESULT put_FontName(const std::wstring& bsName);
virtual HRESULT get_FontPath(std::wstring* bsName);
virtual HRESULT put_FontPath(const std::wstring& bsName);
virtual HRESULT get_FontSize(double* dSize);
virtual HRESULT put_FontSize(const double& dSize);
virtual HRESULT get_FontStyle(LONG* lStyle);
virtual HRESULT put_FontStyle(const LONG& lStyle);
virtual HRESULT get_FontStringGID(INT* bGID);
virtual HRESULT put_FontStringGID(const INT& bGID);
virtual HRESULT get_FontCharSpace(double* dSpace);
virtual HRESULT put_FontCharSpace(const double& dSpace);
virtual HRESULT get_FontFaceIndex(int* lFaceIndex);
virtual HRESULT put_FontFaceIndex(const int& lFaceIndex);
//-------- Функции для вывода текста --------------------------------------------------------
virtual HRESULT CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
virtual HRESULT CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
virtual HRESULT CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
virtual HRESULT CommandDrawTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
//-------- Маркеры для команд ---------------------------------------------------------------
virtual HRESULT BeginCommand(const DWORD& lType);
virtual HRESULT EndCommand(const DWORD& lType);
//-------- Функции для работы с Graphics Path -----------------------------------------------
virtual HRESULT PathCommandMoveTo(const double& x, const double& y);
virtual HRESULT PathCommandLineTo(const double& x, const double& y);
virtual HRESULT PathCommandLinesTo(double* points, const int& count);
virtual HRESULT PathCommandCurveTo(const double& x1, const double& y1, const double& x2, const double& y2, const double& x3, const double& y3);
virtual HRESULT PathCommandCurvesTo(double* points, const int& count);
virtual HRESULT PathCommandArcTo(const double& x, const double& y, const double& w, const double& h, const double& startAngle, const double& sweepAngle);
virtual HRESULT PathCommandClose();
virtual HRESULT PathCommandEnd();
virtual HRESULT DrawPath(const LONG& nType);
virtual HRESULT PathCommandStart();
virtual HRESULT PathCommandGetCurrentPoint(double* x, double* y);
virtual HRESULT PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
virtual HRESULT PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
virtual HRESULT PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
virtual HRESULT PathCommandTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
//-------- Функции для вывода изображений ---------------------------------------------------
virtual HRESULT DrawImage(IGrObject* pImage, const double& x, const double& y, const double& w, const double& h);
virtual HRESULT DrawImageFromFile(const std::wstring&, const double& x, const double& y, const double& w, const double& h, const BYTE& lAlpha = 255);
// transform --------------------------------------------------------------------------------
virtual HRESULT SetTransform(const double& m1, const double& m2, const double& m3, const double& m4, const double& m5, const double& m6);
virtual HRESULT GetTransform(double *pdA, double *pdB, double *pdC, double *pdD, double *pdE, double *pdF);
virtual HRESULT ResetTransform();
// -----------------------------------------------------------------------------------------
virtual HRESULT get_ClipMode(LONG* plMode);
virtual HRESULT put_ClipMode(const LONG& lMode);
// additiaonal params ----------------------------------------------------------------------
virtual HRESULT CommandLong(const LONG& lType, const LONG& lCommand);
virtual HRESULT CommandDouble(const LONG& lType, const double& dCommand);
virtual HRESULT CommandString(const LONG& lType, const std::wstring& sCommand);
// owner params ----------------------------------------------------------------------
virtual HRESULT get_Mode(LONG *plMode);
virtual HRESULT put_Mode(LONG lMode);
virtual HRESULT CreateOfficeFile(std::wstring bsFileName);
virtual HRESULT CloseFile();
virtual HRESULT SetAdditionalParam(std::string sParamName, int nValue);
protected:
CASCHTMLRenderer_Private* m_pInternal;
};
#endif // _ASC_HTMLRENDERER1_H_
#ifndef _ASC_HTMLRENDERER2_H_
#define _ASC_HTMLRENDERER2_H_
#include "../../../DesktopEditor/graphics/IRenderer.h"
class CASCHTMLRenderer2_Private;
class CASCHTMLRenderer2 : public IRenderer
{
public:
// тип рендерера-----------------------------------------------------------------------------
virtual HRESULT get_Type(LONG* lType);
//-------- Функции для работы со страницей --------------------------------------------------
virtual HRESULT NewPage();
virtual HRESULT get_Height(double* dHeight);
virtual HRESULT put_Height(const double& dHeight);
virtual HRESULT get_Width(double* dWidth);
virtual HRESULT put_Width(const double& dWidth);
virtual HRESULT get_DpiX(double* dDpiX);
virtual HRESULT get_DpiY(double* dDpiY);
// pen --------------------------------------------------------------------------------------
virtual HRESULT get_PenColor(LONG* lColor);
virtual HRESULT put_PenColor(const LONG& lColor);
virtual HRESULT get_PenAlpha(LONG* lAlpha);
virtual HRESULT put_PenAlpha(const LONG& lAlpha);
virtual HRESULT get_PenSize(double* dSize);
virtual HRESULT put_PenSize(const double& dSize);
virtual HRESULT get_PenDashStyle(BYTE* val);
virtual HRESULT put_PenDashStyle(const BYTE& val);
virtual HRESULT get_PenLineStartCap(BYTE* val);
virtual HRESULT put_PenLineStartCap(const BYTE& val);
virtual HRESULT get_PenLineEndCap(BYTE* val);
virtual HRESULT put_PenLineEndCap(const BYTE& val);
virtual HRESULT get_PenLineJoin(BYTE* val);
virtual HRESULT put_PenLineJoin(const BYTE& val);
virtual HRESULT get_PenDashOffset(double* dOffset);
virtual HRESULT put_PenDashOffset(const double& dOffset);
virtual HRESULT get_PenAlign(LONG* lAlign);
virtual HRESULT put_PenAlign(const LONG& lAlign);
virtual HRESULT get_PenMiterLimit(double* dOffset);
virtual HRESULT put_PenMiterLimit(const double& dOffset);
virtual HRESULT PenDashPattern(double* pPattern, LONG lCount);
// brush ------------------------------------------------------------------------------------
virtual HRESULT get_BrushType(LONG* lType);
virtual HRESULT put_BrushType(const LONG& lType);
virtual HRESULT get_BrushColor1(LONG* lColor);
virtual HRESULT put_BrushColor1(const LONG& lColor);
virtual HRESULT get_BrushAlpha1(LONG* lAlpha);
virtual HRESULT put_BrushAlpha1(const LONG& lAlpha);
virtual HRESULT get_BrushColor2(LONG* lColor);
virtual HRESULT put_BrushColor2(const LONG& lColor);
virtual HRESULT get_BrushAlpha2(LONG* lAlpha);
virtual HRESULT put_BrushAlpha2(const LONG& lAlpha);
virtual HRESULT get_BrushTexturePath(std::wstring* bsPath);
virtual HRESULT put_BrushTexturePath(const std::wstring& bsPath);
virtual HRESULT get_BrushTextureMode(LONG* lMode);
virtual HRESULT put_BrushTextureMode(const LONG& lMode);
virtual HRESULT get_BrushTextureAlpha(LONG* lTxAlpha);
virtual HRESULT put_BrushTextureAlpha(const LONG& lTxAlpha);
virtual HRESULT get_BrushLinearAngle(double* dAngle);
virtual HRESULT put_BrushLinearAngle(const double& dAngle);
virtual HRESULT BrushRect(const INT& val, const double& left, const double& top, const double& width, const double& height);
virtual HRESULT BrushBounds(const double& left, const double& top, const double& width, const double& height);
virtual HRESULT put_BrushGradientColors(LONG* lColors, double* pPositions, LONG nCount);
// font -------------------------------------------------------------------------------------
virtual HRESULT get_FontName(std::wstring* bsName);
virtual HRESULT put_FontName(const std::wstring& bsName);
virtual HRESULT get_FontPath(std::wstring* bsName);
virtual HRESULT put_FontPath(const std::wstring& bsName);
virtual HRESULT get_FontSize(double* dSize);
virtual HRESULT put_FontSize(const double& dSize);
virtual HRESULT get_FontStyle(LONG* lStyle);
virtual HRESULT put_FontStyle(const LONG& lStyle);
virtual HRESULT get_FontStringGID(INT* bGID);
virtual HRESULT put_FontStringGID(const INT& bGID);
virtual HRESULT get_FontCharSpace(double* dSpace);
virtual HRESULT put_FontCharSpace(const double& dSpace);
virtual HRESULT get_FontFaceIndex(int* lFaceIndex);
virtual HRESULT put_FontFaceIndex(const int& lFaceIndex);
//-------- Функции для вывода текста --------------------------------------------------------
virtual HRESULT CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
virtual HRESULT CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
virtual HRESULT CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
virtual HRESULT CommandDrawTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
//-------- Маркеры для команд ---------------------------------------------------------------
virtual HRESULT BeginCommand(const DWORD& lType);
virtual HRESULT EndCommand(const DWORD& lType);
//-------- Функции для работы с Graphics Path -----------------------------------------------
virtual HRESULT PathCommandMoveTo(const double& x, const double& y);
virtual HRESULT PathCommandLineTo(const double& x, const double& y);
virtual HRESULT PathCommandLinesTo(double* points, const int& count);
virtual HRESULT PathCommandCurveTo(const double& x1, const double& y1, const double& x2, const double& y2, const double& x3, const double& y3);
virtual HRESULT PathCommandCurvesTo(double* points, const int& count);
virtual HRESULT PathCommandArcTo(const double& x, const double& y, const double& w, const double& h, const double& startAngle, const double& sweepAngle);
virtual HRESULT PathCommandClose();
virtual HRESULT PathCommandEnd();
virtual HRESULT DrawPath(const LONG& nType);
virtual HRESULT PathCommandStart();
virtual HRESULT PathCommandGetCurrentPoint(double* x, double* y);
virtual HRESULT PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
virtual HRESULT PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
virtual HRESULT PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
virtual HRESULT PathCommandTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
//-------- Функции для вывода изображений ---------------------------------------------------
virtual HRESULT DrawImage(IGrObject* pImage, const double& x, const double& y, const double& w, const double& h);
virtual HRESULT DrawImageFromFile(const std::wstring&, const double& x, const double& y, const double& w, const double& h, const BYTE& lAlpha = 255);
// transform --------------------------------------------------------------------------------
virtual HRESULT SetTransform(const double& m1, const double& m2, const double& m3, const double& m4, const double& m5, const double& m6);
virtual HRESULT GetTransform(double *pdA, double *pdB, double *pdC, double *pdD, double *pdE, double *pdF);
virtual HRESULT ResetTransform();
// -----------------------------------------------------------------------------------------
virtual HRESULT get_ClipMode(LONG* plMode);
virtual HRESULT put_ClipMode(const LONG& lMode);
// additiaonal params ----------------------------------------------------------------------
virtual HRESULT CommandLong(const LONG& lType, const LONG& lCommand);
virtual HRESULT CommandDouble(const LONG& lType, const double& dCommand);
virtual HRESULT CommandString(const LONG& lType, const std::wstring& sCommand);
// owner params ----------------------------------------------------------------------
virtual HRESULT get_Mode(LONG *plMode);
virtual HRESULT put_Mode(LONG lMode);
virtual HRESULT CreateOfficeFile(std::wstring bsFileName);
virtual HRESULT CloseFile();
virtual HRESULT SetAdditionalParam(std::string sParamName, int nValue);
protected:
CASCHTMLRenderer2_Private* m_pInternal;
};
#endif // _ASC_HTMLRENDERER2_H_
#ifndef _ASC_HTMLRENDERER3_H_
#define _ASC_HTMLRENDERER3_H_
#include "../../../DesktopEditor/graphics/IRenderer.h"
class CASCHTMLRenderer3_Private;
class CASCHTMLRenderer3 : public IRenderer
{
public:
// тип рендерера-----------------------------------------------------------------------------
virtual HRESULT get_Type(LONG* lType);
//-------- Функции для работы со страницей --------------------------------------------------
virtual HRESULT NewPage();
virtual HRESULT get_Height(double* dHeight);
virtual HRESULT put_Height(const double& dHeight);
virtual HRESULT get_Width(double* dWidth);
virtual HRESULT put_Width(const double& dWidth);
virtual HRESULT get_DpiX(double* dDpiX);
virtual HRESULT get_DpiY(double* dDpiY);
// pen --------------------------------------------------------------------------------------
virtual HRESULT get_PenColor(LONG* lColor);
virtual HRESULT put_PenColor(const LONG& lColor);
virtual HRESULT get_PenAlpha(LONG* lAlpha);
virtual HRESULT put_PenAlpha(const LONG& lAlpha);
virtual HRESULT get_PenSize(double* dSize);
virtual HRESULT put_PenSize(const double& dSize);
virtual HRESULT get_PenDashStyle(BYTE* val);
virtual HRESULT put_PenDashStyle(const BYTE& val);
virtual HRESULT get_PenLineStartCap(BYTE* val);
virtual HRESULT put_PenLineStartCap(const BYTE& val);
virtual HRESULT get_PenLineEndCap(BYTE* val);
virtual HRESULT put_PenLineEndCap(const BYTE& val);
virtual HRESULT get_PenLineJoin(BYTE* val);
virtual HRESULT put_PenLineJoin(const BYTE& val);
virtual HRESULT get_PenDashOffset(double* dOffset);
virtual HRESULT put_PenDashOffset(const double& dOffset);
virtual HRESULT get_PenAlign(LONG* lAlign);
virtual HRESULT put_PenAlign(const LONG& lAlign);
virtual HRESULT get_PenMiterLimit(double* dOffset);
virtual HRESULT put_PenMiterLimit(const double& dOffset);
virtual HRESULT PenDashPattern(double* pPattern, LONG lCount);
// brush ------------------------------------------------------------------------------------
virtual HRESULT get_BrushType(LONG* lType);
virtual HRESULT put_BrushType(const LONG& lType);
virtual HRESULT get_BrushColor1(LONG* lColor);
virtual HRESULT put_BrushColor1(const LONG& lColor);
virtual HRESULT get_BrushAlpha1(LONG* lAlpha);
virtual HRESULT put_BrushAlpha1(const LONG& lAlpha);
virtual HRESULT get_BrushColor2(LONG* lColor);
virtual HRESULT put_BrushColor2(const LONG& lColor);
virtual HRESULT get_BrushAlpha2(LONG* lAlpha);
virtual HRESULT put_BrushAlpha2(const LONG& lAlpha);
virtual HRESULT get_BrushTexturePath(std::wstring* bsPath);
virtual HRESULT put_BrushTexturePath(const std::wstring& bsPath);
virtual HRESULT get_BrushTextureMode(LONG* lMode);
virtual HRESULT put_BrushTextureMode(const LONG& lMode);
virtual HRESULT get_BrushTextureAlpha(LONG* lTxAlpha);
virtual HRESULT put_BrushTextureAlpha(const LONG& lTxAlpha);
virtual HRESULT get_BrushLinearAngle(double* dAngle);
virtual HRESULT put_BrushLinearAngle(const double& dAngle);
virtual HRESULT BrushRect(const INT& val, const double& left, const double& top, const double& width, const double& height);
virtual HRESULT BrushBounds(const double& left, const double& top, const double& width, const double& height);
virtual HRESULT put_BrushGradientColors(LONG* lColors, double* pPositions, LONG nCount);
// font -------------------------------------------------------------------------------------
virtual HRESULT get_FontName(std::wstring* bsName);
virtual HRESULT put_FontName(const std::wstring& bsName);
virtual HRESULT get_FontPath(std::wstring* bsName);
virtual HRESULT put_FontPath(const std::wstring& bsName);
virtual HRESULT get_FontSize(double* dSize);
virtual HRESULT put_FontSize(const double& dSize);
virtual HRESULT get_FontStyle(LONG* lStyle);
virtual HRESULT put_FontStyle(const LONG& lStyle);
virtual HRESULT get_FontStringGID(INT* bGID);
virtual HRESULT put_FontStringGID(const INT& bGID);
virtual HRESULT get_FontCharSpace(double* dSpace);
virtual HRESULT put_FontCharSpace(const double& dSpace);
virtual HRESULT get_FontFaceIndex(int* lFaceIndex);
virtual HRESULT put_FontFaceIndex(const int& lFaceIndex);
//-------- Функции для вывода текста --------------------------------------------------------
virtual HRESULT CommandDrawTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
virtual HRESULT CommandDrawText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
virtual HRESULT CommandDrawTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
virtual HRESULT CommandDrawTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
//-------- Маркеры для команд ---------------------------------------------------------------
virtual HRESULT BeginCommand(const DWORD& lType);
virtual HRESULT EndCommand(const DWORD& lType);
//-------- Функции для работы с Graphics Path -----------------------------------------------
virtual HRESULT PathCommandMoveTo(const double& x, const double& y);
virtual HRESULT PathCommandLineTo(const double& x, const double& y);
virtual HRESULT PathCommandLinesTo(double* points, const int& count);
virtual HRESULT PathCommandCurveTo(const double& x1, const double& y1, const double& x2, const double& y2, const double& x3, const double& y3);
virtual HRESULT PathCommandCurvesTo(double* points, const int& count);
virtual HRESULT PathCommandArcTo(const double& x, const double& y, const double& w, const double& h, const double& startAngle, const double& sweepAngle);
virtual HRESULT PathCommandClose();
virtual HRESULT PathCommandEnd();
virtual HRESULT DrawPath(const LONG& nType);
virtual HRESULT PathCommandStart();
virtual HRESULT PathCommandGetCurrentPoint(double* x, double* y);
virtual HRESULT PathCommandTextCHAR(const LONG& c, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
virtual HRESULT PathCommandText(const std::wstring& bsText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset);
virtual HRESULT PathCommandTextExCHAR(const LONG& c, const LONG& gid, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
virtual HRESULT PathCommandTextEx(const std::wstring& bsUnicodeText, const std::wstring& bsGidText, const double& x, const double& y, const double& w, const double& h, const double& baselineOffset, const DWORD& lFlags);
//-------- Функции для вывода изображений ---------------------------------------------------
virtual HRESULT DrawImage(IGrObject* pImage, const double& x, const double& y, const double& w, const double& h);
virtual HRESULT DrawImageFromFile(const std::wstring&, const double& x, const double& y, const double& w, const double& h, const BYTE& lAlpha = 255);
// transform --------------------------------------------------------------------------------
virtual HRESULT SetTransform(const double& m1, const double& m2, const double& m3, const double& m4, const double& m5, const double& m6);
virtual HRESULT GetTransform(double *pdA, double *pdB, double *pdC, double *pdD, double *pdE, double *pdF);
virtual HRESULT ResetTransform();
// -----------------------------------------------------------------------------------------
virtual HRESULT get_ClipMode(LONG* plMode);
virtual HRESULT put_ClipMode(const LONG& lMode);
// additiaonal params ----------------------------------------------------------------------
virtual HRESULT CommandLong(const LONG& lType, const LONG& lCommand);
virtual HRESULT CommandDouble(const LONG& lType, const double& dCommand);
virtual HRESULT CommandString(const LONG& lType, const std::wstring& sCommand);
// owner params ----------------------------------------------------------------------
virtual HRESULT get_Mode(LONG *plMode);
virtual HRESULT put_Mode(LONG lMode);
virtual HRESULT CreateOfficeFile(std::wstring bsFileName);
virtual HRESULT CloseFile();
virtual HRESULT SetAdditionalParam(std::string sParamName, int nValue);
virtual HRESULT SetAdditionalParam(std::string sParamName, const std::wstring& sParam);
protected:
CASCHTMLRenderer3_Private* m_pInternal;
};
#endif // _ASC_HTMLRENDERER3_H_
#ifndef _ASC_HTMLRENDERER_CANVASWRITER_H_
#define _ASC_HTMLRENDERER_CANVASWRITER_H_
#include "Common.h"
#include "../../../DesktopEditor/graphics/GraphicsPath.h"
namespace NSHtmlRenderer
{
class CCanvasWriter
{
public:
NSStringUtils::CStringBuilder m_oPath;
NSStringUtils::CStringBuilder m_oDocument;
LONG m_lCurDocumentID;
LONG m_lClippingPath;
bool m_bIsClipping;
LONG m_lClipMode;
bool m_bIsMoveTo;
NSStructures::CPen* m_pPen;
NSStructures::CBrush* m_pBrush;
double m_lWidth;
double m_lHeight;
double m_dDpiX;
double m_dDpiY;
public:
CCanvasWriter() : m_oPath(), m_oDocument()
{
m_lCurDocumentID = 0;
m_lClippingPath = 0;
m_pPen = NULL;
m_pBrush = NULL;
m_dDpiX = 96;
m_dDpiY = 96;
m_lClipMode = c_nWindingFillMode;
m_bIsClipping = false;
m_bIsMoveTo = false;
}
void SetSettings(NSStructures::CPen* pPen, NSStructures::CBrush* pBrush)
{
m_pPen = pPen;
m_pBrush = pBrush;
}
void CloseFile(std::wstring strFile = L"")
{
if (!strFile.empty())
{
NSFile::CFileBinary::SaveToFile(strFile, m_oDocument.GetData());
}
m_oDocument.ClearNoAttack();
m_oPath.ClearNoAttack();
}
void NewDocument(double& dWidth, double& dHeigth)
{
CloseFile(L"");
m_lWidth = (int)dWidth;
m_lHeight = (int)dHeigth;
}
public:
inline void WritePathEnd()
{
}
inline void WritePathStart()
{
m_bIsMoveTo = false;
m_oDocument.WriteString(L"b(c);\n", 6);
}
void WritePathClose()
{
m_oDocument.WriteString(L"x(c);\n", 6);
}
void WritePathMoveTo(double& x, double& y)
{
m_oDocument.WriteString(L"m(c,", 4);
WriteIntsToStringBuilder(round(x), round(y), &m_oDocument);
m_oDocument.WriteString(L");\n", 3);
m_bIsMoveTo = true;
}
void WritePathLineTo(double& x, double& y)
{
if (false == m_bIsMoveTo)
WritePathMoveTo(x, y);
m_oDocument.WriteString(L"l(c,", 4);
WriteIntsToStringBuilder(round(x), round(y), &m_oDocument);
m_oDocument.WriteString(L");\n", 3);
}
void WritePathCurveTo(double& x1, double& y1, double& x2, double& y2, double& x3, double& y3)
{
if (false == m_bIsMoveTo)
WritePathMoveTo(x1, y1);
m_oDocument.WriteString(L"cu(c,", 5);
WriteIntsToStringBuilder(round(x1), round(y1), round(x2), round(y2), round(x3), round(y3), &m_oDocument);
m_oDocument.WriteString(L");\n", 3);
}
void WriteDrawPath(LONG lType, Aggplus::CMatrix* pTransform, Aggplus::CGraphicsPathSimpleConverter* pConverter, LONG lTxId)
{
bool bStroke = false;
if (m_pPen->Alpha == 0)
lType &= 0xFF00;
if ((-1 == lTxId) && (0 == m_pBrush->Alpha1))
lType &= 0xFF;
if ((lType & 0x01) == 0x01)
{
SetStrokeColor(m_pPen->Color, m_pPen->Alpha, &m_oDocument);
bStroke = true;
}
if (lType > 0x01)
{
if (-1 != lTxId)
{
// текстура!
double x = 0;
double y = 0;
double w = 0;
double h = 0;
pConverter->PathCommandGetBounds(x, y, w, h);
double r = x + w;
double b = y + h;
pTransform->TransformPoint(x, y);
pTransform->TransformPoint(r, b);
w = r - x;
h = b - y;
m_oDocument.WriteString(L"img", 3);
m_oDocument.AddInt(lTxId);
m_oDocument.WriteString(L".src = \"media\\\\image", 20);
m_oDocument.AddInt(lTxId);
m_oDocument.WriteString(L".jpg\";img", 9);
m_oDocument.AddInt(lTxId);
m_oDocument.WriteString(L".onload = function(){c.drawImage(img", 36);
WriteIntsToStringBuilder(lTxId, round(x), round(y), round(w), round(h), &m_oDocument);
m_oDocument.WriteString(L");drawpage", 10);
m_oDocument.AddInt(m_lCurDocumentID);
m_oDocument.AddCharSafe('_');
m_oDocument.AddInt(lTxId);
m_oDocument.WriteString(L"(c);};\n}\nfunction drawpage", 26);
m_oDocument.AddInt(m_lCurDocumentID);
m_oDocument.AddCharSafe('_');
m_oDocument.AddInt(lTxId);
m_oDocument.WriteString(L"(c)\n{\n", 6);
}
else
{
SetFillColor(m_pBrush->Color1, m_pBrush->Alpha1, &m_oDocument);
m_oDocument.WriteString(L"f(c);\n", 6);
}
}
if (bStroke)
{
m_oDocument.WriteString(L"s(c);\n", 6);
}
}
void WritePathClip()
{
m_bIsClipping = true;
++m_lClippingPath;
}
void WritePathClipEnd()
{
if (!m_bIsClipping)
{
m_oDocument.WriteString(L"c.save();\n", 10);
}
m_bIsClipping = true;
m_oDocument.WriteString(L"c.clip();\n", 10);
}
void WritePathResetClip()
{
if (m_bIsClipping)
{
m_oDocument.WriteString(L"c.restore();\n", 13);
}
m_bIsClipping = false;
}
inline void WriteStyleClip()
{
}
};
}
#endif // _ASC_HTMLRENDERER_CANVASWRITER_H_
This diff is collapsed.
This diff is collapsed.
#pragma once
#include "..\stdafx.h"
#include "Const.h"
#include "Common.h"
#include "StringWriter.h"
#include "..\Graphics\Structures.h"
#include "..\Graphics\Matrix.h"
#include "FontManagerBase.h"
namespace NSHtmlRenderer
{
using namespace NSFontManager;
const long g_lNewNoJustifySpace = 5;
class CFontManager : public CFontManagerBase
{
public:
NSStructures::CFont* m_pFont;
NSHtmlRenderer::CMatrix* m_pTransform;
double m_dSpaceWidthMM;
public:
CFontManager() : m_pFont(NULL), CFontManagerBase()
{
m_pTransform = NULL;
m_dSpaceWidthMM = 0;
}
virtual ~CFontManager()
{
}
public:
virtual void LoadFont(long lFaceIndex = 0, bool bIsNeedAddToMap = true)
{
if (NULL == m_pManager)
return;
double dSize = m_pFont->Size;
double dSizeFont = dSize * ((m_pTransform->m_agg_mtx.sx + m_pTransform->m_agg_mtx.sy) / 2);
m_pFont->Size = dSizeFont;
if (m_pFont->IsEqual2(&m_oFont.m_oFont))
{
m_pFont->Size = dSize;
return;
}
m_oFont.m_oFont = *m_pFont;
m_pFont->Size = dSize;
bool bIsPath = false;
if (_T("") == m_pFont->Path)
{
CFontManagerBase::LoadFontByName(m_oFont.m_oFont.Name, m_oFont.m_oFont.Size, m_oFont.m_oFont.GetStyle());
}
else
{
CFontManagerBase::LoadFontByFile(m_oFont.m_oFont.Path, m_oFont.m_oFont.Size, lFaceIndex);
m_pFont->SetStyle(m_oFont.m_oProperties.m_lStyle);
m_oFont.m_oFont.SetStyle(m_oFont.m_oProperties.m_lStyle);
bIsPath = true;
}
CalculateSpace();
}
AVSINLINE void CalculateSpace()
{
LONG lGid = 0;
m_pManager->GetStringGID(&lGid);
m_pManager->SetStringGID(FALSE);
m_pManager->LoadString(L" ", 0, 0);
float _x = 0;
float _y = 0;
float _w = 0;
float _h = 0;
m_pManager->MeasureString2(&_x, &_y, &_w, &_h);
m_dSpaceWidthMM = (double)_w * c_dPixToMM;
if (0 >= m_dSpaceWidthMM)
{
m_dSpaceWidthMM = 1.0;
}
m_pManager->SetStringGID(lGid);
}
};
}
\ No newline at end of file
This diff is collapsed.
#include "../include/HTMLRenderer.h"
#include "./Common.h"
// TEST
#include "VectorGraphicsWriter2.h"
#include "CanvasWriter.h"
#include "SVGWriter2.h"
class CASCHTMLRenderer_Private
{
public:
};
#include "../include/HTMLRenderer2.h"
#include "./Common.h"
#include "../include/HTMLRenderer3.h"
#include "./Common.h"
This diff is collapsed.
This diff is collapsed.
#pragma once
#include "../../DesktopEditor/common/File.h"
#include "TextItem.h"
#include "Common.h"
class CDstInfo
{
public:
CString m_strDstFilePath;
CString m_strAdditionalPath;
CString m_strDstMedia;
bool m_bIsWeb;
public:
CDstInfo()
{
m_strDstFilePath = _T("");
m_strAdditionalPath = _T("");
m_strDstMedia = _T("");
m_bIsWeb = false;
}
CDstInfo(const CDstInfo& oInfo)
{
*this = oInfo;
}
CDstInfo& operator=(const CDstInfo& oSrc)
{
m_strDstFilePath = oSrc.m_strDstFilePath;
m_strAdditionalPath = oSrc.m_strAdditionalPath;
m_strDstMedia = oSrc.m_strDstMedia;
m_bIsWeb = oSrc.m_bIsWeb;
return *this;
}
};
namespace NSStrings
{
class CStringWriter : public CTextItem
{
public:
CStringWriter() : CTextItem()
{
}
virtual ~CStringWriter()
{
}
public:
AVSINLINE void WriteString(CString& sString)
{
size_t nLen = (size_t)sString.GetLength();
#ifdef _UNICODE
CTextItem::WriteString(sString.GetBuffer(), nLen);
#else
CStringW str = (CStringW)sString;
WriteString(str.GetBuffer(), nLen);
#endif
}
AVSINLINE void WriteString(wchar_t* pString, const size_t& nLen)
{
CTextItem::WriteString(pString, nLen);
}
AVSINLINE void Write(CStringWriter& oWriter)
{
CTextItem::WriteString(oWriter.m_pData, oWriter.m_lSizeCur);
}
};
}
This diff is collapsed.
#pragma once
//#include "../stdafx.h"
#if defined(_WIN32) || defined (_WIN64)
#include <atlbase.h>
#include <atlstr.h>
#else
#include "../../Common/DocxFormat/Source/Base/ASCString.h"
#endif
#ifndef AVSINLINE
#if defined(_MSC_VER)
#define AVSINLINE __forceinline
#else
#define AVSINLINE inline
#endif
#endif
namespace NSStrings
{
class CTextItem
{
protected:
wchar_t* m_pData;
size_t m_lSize;
wchar_t* m_pDataCur;
size_t m_lSizeCur;
public:
CTextItem()
{
m_pData = NULL;
m_lSize = 0;
m_pDataCur = m_pData;
m_lSizeCur = m_lSize;
}
CTextItem(const CTextItem& oSrc)
{
m_pData = NULL;
*this = oSrc;
}
CTextItem& operator=(const CTextItem& oSrc)
{
RELEASEMEM(m_pData);
m_lSize = oSrc.m_lSize;
m_lSizeCur = oSrc.m_lSizeCur;
m_pData = (wchar_t*)malloc(m_lSize * sizeof(wchar_t));
memcpy(m_pData, oSrc.m_pData, m_lSizeCur * sizeof(wchar_t));
m_pDataCur = m_pData + m_lSizeCur;
return *this;
}
CTextItem(const size_t& nLen)
{
m_lSize = nLen;
m_pData = (wchar_t*)malloc(m_lSize * sizeof(wchar_t));
m_lSizeCur = 0;
m_pDataCur = m_pData;
}
CTextItem(wchar_t* pData, const size_t& nLen)
{
m_lSize = nLen;
m_pData = (wchar_t*)malloc(m_lSize * sizeof(wchar_t));
memcpy(m_pData, pData, m_lSize * sizeof(wchar_t));
m_lSizeCur = m_lSize;
m_pDataCur = m_pData + m_lSize;
}
CTextItem(wchar_t* pData, BYTE* pUnicodeChecker = NULL)
{
size_t nLen = GetStringLen(pData);
m_lSize = nLen;
m_pData = (wchar_t*)malloc(m_lSize * sizeof(wchar_t));
memcpy(m_pData, pData, m_lSize * sizeof(wchar_t));
m_lSizeCur = m_lSize;
m_pDataCur = m_pData + m_lSize;
if (NULL != pUnicodeChecker)
{
wchar_t* pMemory = m_pData;
while (pMemory < m_pDataCur)
{
if (!pUnicodeChecker[*pMemory])
*pMemory = wchar_t(' ');
++pMemory;
}
}
}
virtual ~CTextItem()
{
RELEASEMEM(m_pData);
}
AVSINLINE void AddSize(const size_t& nSize)
{
if (NULL == m_pData)
{
m_lSize = nSize > 1000 ? nSize : 1000;
m_pData = (wchar_t*)malloc(m_lSize * sizeof(wchar_t));
m_lSizeCur = 0;
m_pDataCur = m_pData;
return;
}
if ((m_lSizeCur + nSize) > m_lSize)
{
while ((m_lSizeCur + nSize) > m_lSize)
{
m_lSize *= 2;
}
wchar_t* pRealloc = (wchar_t*)realloc(m_pData, m_lSize * sizeof(wchar_t));
if (NULL != pRealloc)
{
// реаллок сработал
m_pData = pRealloc;
m_pDataCur = m_pData + m_lSizeCur;
}
else
{
wchar_t* pMalloc = (wchar_t*)malloc(m_lSize * sizeof(wchar_t));
memcpy(pMalloc, m_pData, m_lSizeCur * sizeof(wchar_t));
free(m_pData);
m_pData = pMalloc;
m_pDataCur = m_pData + m_lSizeCur;
}
}
}
public:
AVSINLINE void operator+=(const CTextItem& oTemp)
{
WriteString(oTemp.m_pData, oTemp.m_lSizeCur);
}
AVSINLINE void operator+=(CString& oTemp)
{
size_t nLen = (size_t)oTemp.GetLength();
#ifdef _UNICODE
WriteString(oTemp.GetBuffer(), nLen);
#else
CStringW str = (CStringW)oTemp;
WriteString(str.GetBuffer(), nLen);
#endif
}
AVSINLINE wchar_t operator[](const size_t& nIndex)
{
if (nIndex < m_lSizeCur)
return m_pData[nIndex];
return 0;
}
AVSINLINE void SetText(BSTR& bsText)
{
ClearNoAttack();
size_t nLen = GetStringLen(bsText);
WriteString(bsText, nLen);
for (size_t i = 0; i < nLen; ++i)
{
if (WCHAR(8233) == m_pData[i])
m_pData[i] = WCHAR(' ');
}
}
AVSINLINE void AddSpace()
{
AddSize(1);
*m_pDataCur = wchar_t(' ');
++m_lSizeCur;
++m_pDataCur;
}
AVSINLINE void CorrectUnicode(const BYTE* pUnicodeChecker)
{
if (NULL != pUnicodeChecker)
{
wchar_t* pMemory = m_pData;
while (pMemory < m_pDataCur)
{
if (!pUnicodeChecker[*pMemory])
*pMemory = wchar_t(' ');
++pMemory;
}
}
}
AVSINLINE void RemoveLastSpaces()
{
wchar_t* pMemory = m_pDataCur - 1;
while ((pMemory > m_pData) && (wchar_t(' ') == *pMemory))
{
--pMemory;
--m_lSizeCur;
--m_pDataCur;
}
}
AVSINLINE bool IsSpace()
{
if (1 != m_lSizeCur)
return false;
return (wchar_t(' ') == *m_pData);
}
public:
AVSINLINE void WriteString(const wchar_t* pString, const size_t& nLen)
{
AddSize(nLen);
memcpy(m_pDataCur, pString, nLen * sizeof(wchar_t));
m_pDataCur += nLen;
m_lSizeCur += nLen;
}
AVSINLINE size_t GetCurSize()
{
return m_lSizeCur;
}
AVSINLINE void SetCurSize(ULONG lCurSize)
{
m_lSizeCur = (size_t)lCurSize;
m_pDataCur = m_pData + m_lSizeCur;
}
AVSINLINE size_t GetSize()
{
return m_lSize;
}
AVSINLINE void Clear()
{
RELEASEMEM(m_pData);
m_pData = NULL;
m_lSize = 0;
m_pDataCur = m_pData;
m_lSizeCur = 0;
}
AVSINLINE void ClearNoAttack()
{
m_pDataCur = m_pData;
m_lSizeCur = 0;
}
AVSINLINE size_t GetStringLen(const wchar_t* pData)
{
const wchar_t* s = pData;
for (; *s != 0; ++s);
return (size_t)(s - pData);
}
AVSINLINE CString GetCString()
{
CString str(m_pData, (int)m_lSizeCur);
return str;
}
AVSINLINE wchar_t* GetBuffer()
{
return m_pData;
}
AVSINLINE void AddCharNoCheck(const WCHAR& wc)
{
*m_pDataCur++ = wc;
++m_lSizeCur;
}
AVSINLINE void AddIntNoCheck(int val)
{
if (0 == val)
{
*m_pDataCur++ = (WCHAR)'0';
++m_lSizeCur;
return;
}
if (val < 0)
{
val = -val;
*m_pDataCur++ = (WCHAR)'-';
++m_lSizeCur;
}
int len = 0;
int oval = val;
while (oval > 0)
{
oval /= 10;
++len;
}
oval = 1;
while (val > 0)
{
m_pDataCur[len - oval] = (WCHAR)('0' + (val % 10));
++oval;
val /= 10;
}
m_pDataCur += len;
m_lSizeCur += len;
}
AVSINLINE void AddIntNoCheckDel10(int val)
{
if (0 == val)
{
*m_pDataCur++ = (WCHAR)'0';
++m_lSizeCur;
return;
}
if (val < 0)
{
val = -val;
*m_pDataCur++ = (WCHAR)'-';
++m_lSizeCur;
}
int len = 0;
int oval = val;
while (oval > 0)
{
oval /= 10;
++len;
}
oval = 1;
int nLastS = (val % 10);
if (0 != nLastS)
{
++len;
m_pDataCur[len - oval] = (WCHAR)('0' + nLastS);
++oval;
m_pDataCur[len - oval] = (WCHAR)('.');
++oval;
val /= 10;
}
else
{
--len;
val /= 10;
}
while (val > 0)
{
m_pDataCur[len - oval] = (WCHAR)('0' + (val % 10));
++oval;
val /= 10;
}
m_pDataCur += len;
m_lSizeCur += len;
}
AVSINLINE void AddStringNoCheck(const wchar_t* pData, const int& len)
{
memcpy(m_pDataCur, pData, len * sizeof(wchar_t));
m_pDataCur += len;
m_lSizeCur += len;
}
AVSINLINE void AddSpaceNoCheck()
{
*m_pDataCur = WCHAR(' ');
++m_pDataCur;
++m_lSizeCur;
}
};
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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