diff --git a/DesktopEditor/graphics/pro/js/qt/raster/raster.pro b/DesktopEditor/graphics/pro/js/qt/raster/raster.pro index c59a31d6fc..f76fad13e6 100644 --- a/DesktopEditor/graphics/pro/js/qt/raster/raster.pro +++ b/DesktopEditor/graphics/pro/js/qt/raster/raster.pro @@ -45,11 +45,16 @@ LIB_GRAPHICS_PRI_PATH = $$PWD/../../../../.. INCLUDEPATH += \ $$CORE_ROOT_DIR/OfficeUtils/src/zlib-1.2.11 \ $$CORE_ROOT_DIR/OfficeUtils/src \ - $$LIB_GRAPHICS_PRI_PATH/cximage/jasper/include + $$LIB_GRAPHICS_PRI_PATH/cximage/jasper/include \ + $$LIB_GRAPHICS_PRI_PATH/agg-2.4/include + +include($$CORE_ROOT_DIR/DesktopEditor/xml/build/qt/libxml2.pri) SOURCES += \ $$CORE_ROOT_DIR/DesktopEditor/common/File.cpp \ - $$CORE_ROOT_DIR/DesktopEditor/common/Base64.cpp + $$CORE_ROOT_DIR/DesktopEditor/common/Base64.cpp \ + $$CORE_ROOT_DIR/DesktopEditor/common/StringBuilder.cpp \ + $$CORE_ROOT_DIR/DesktopEditor/common/StringExt.cpp SOURCES += \ $$CORE_ROOT_DIR/OfficeUtils/src/zlib_addon.c \ @@ -312,5 +317,70 @@ SOURCES += \ SOURCES += $$CORE_ROOT_DIR/DesktopEditor/graphics/pro/lepton_lib_all.cpp +HEADERS += \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/CXmlOutput.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Common/CPathConverter.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Common/IOutputDevice.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Common/MetaFile.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Common/MetaFileClip.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Common/MetaFileObjects.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Common/MetaFileRenderer.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Common/MetaFileTypes.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Common/MetaFileUtils.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfInterpretator/CEmfInterpretator.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfInterpretator/CEmfInterpretatorArray.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfInterpretator/CEmfInterpretatorBase.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfInterpretator/CEmfInterpretatorRender.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfInterpretator/CEmfInterpretatorSvg.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfInterpretator/CEmfInterpretatorXml.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfParser/CEmfParser.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfParser/CEmfParserBase.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfParser/CEmfPlusParser.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfParser/CEmfxParser.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Wmf/WmfInterpretator/CWmfInterpretatorSvg.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Wmf/WmfParser/CWmfParser.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Wmf/WmfParser/CWmfParserBase.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Wmf/WmfInterpretator/CWmfInterpretatorBase.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Wmf/WmfInterpretator/CWmfInterpretatorRender.h \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Wmf/WmfInterpretator/CWmfInterpretator.h + +SOURCES += \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/CXmlOutput.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Common/CPathConverter.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Common/MetaFileTypes.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Common/MetaFileUtils.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfInterpretator/CEmfInterpretator.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfInterpretator/CEmfInterpretatorArray.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfInterpretator/CEmfInterpretatorRender.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfInterpretator/CEmfInterpretatorSvg.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfInterpretator/CEmfInterpretatorXml.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfParser/CEmfParser.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfParser/CEmfParserBase.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfParser/CEmfPlusParser.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfParser/CEmfxParser.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Wmf/WmfInterpretator/CWmfInterpretatorSvg.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Wmf/WmfParser/CWmfParser.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Wmf/WmfParser/CWmfParserBase.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Wmf/WmfInterpretator/CWmfInterpretatorRender.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Wmf/WmfInterpretator/CWmfInterpretator.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/MetaFile.cpp \ + \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfClip.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfObjects.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfPath.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfPlayer.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Emf/EmfFile.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Wmf/WmfClip.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Wmf/WmfObjects.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/Wmf/WmfPlayer.cpp \ + \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/StarView/SvmClip.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/StarView/SvmFile.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/StarView/SvmObjects.cpp \ + $$LIB_GRAPHICS_PRI_PATH/raster/Metafile/StarView/SvmPlayer.cpp + +SOURCES += \ + ../../../pro_base.cpp + SOURCES += ./raster.cpp HEADERS += ./raster.h diff --git a/DesktopEditor/graphics/pro/pro_Fonts.cpp b/DesktopEditor/graphics/pro/pro_Fonts.cpp index f6ca0f09ee..b24a8c2cc1 100644 --- a/DesktopEditor/graphics/pro/pro_Fonts.cpp +++ b/DesktopEditor/graphics/pro/pro_Fonts.cpp @@ -34,10 +34,7 @@ #include "../../common/File.h" #include "../../common/StringExt.h" #include "../../fontengine/ApplicationFonts.h" - -#ifdef __APPLE__ -#include -#endif +#include "./pro_base.cpp" NSFonts::IFontsMemoryStorage* g_global_fonts_memory_storage = NULL; @@ -54,53 +51,6 @@ namespace NSFonts } } -namespace NSBase -{ - CBaseRefCounter::CBaseRefCounter() - { - m_lRef = 1; - } - - CBaseRefCounter::~CBaseRefCounter() - { - } - -#ifdef __APPLE__ - int CBaseRefCounter::AddRef() - { - OSAtomicIncrement32(&m_lRef); - return m_lRef; - } - int CBaseRefCounter::Release() - { - int32_t ret = OSAtomicDecrement32(&m_lRef); - if (0 == m_lRef) - delete this; - - return ret; - } -#else - int CBaseRefCounter::AddRef() - { - ++m_lRef; - return m_lRef; - } - - int CBaseRefCounter::Release() - { - int ret = --m_lRef; - if (0 == m_lRef) - delete this; - return ret; - } -#endif - - void Release(CBaseRefCounter* base) - { - delete base; - } -} - namespace NSFonts { IFontPath::IFontPath() : NSBase::CBaseRefCounter() {} diff --git a/DesktopEditor/graphics/pro/pro_base.cpp b/DesktopEditor/graphics/pro/pro_base.cpp new file mode 100644 index 0000000000..1f41fb1f43 --- /dev/null +++ b/DesktopEditor/graphics/pro/pro_base.cpp @@ -0,0 +1,80 @@ +/* + * (c) Copyright Ascensio System SIA 2010-2019 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ + +#include "Fonts.h" + +namespace NSBase +{ + CBaseRefCounter::CBaseRefCounter() + { + m_lRef = 1; + } + + CBaseRefCounter::~CBaseRefCounter() + { + } + +#ifdef __APPLE__ + int CBaseRefCounter::AddRef() + { + OSAtomicIncrement32(&m_lRef); + return m_lRef; + } + int CBaseRefCounter::Release() + { + int32_t ret = OSAtomicDecrement32(&m_lRef); + if (0 == m_lRef) + delete this; + + return ret; + } +#else + int CBaseRefCounter::AddRef() + { + ++m_lRef; + return m_lRef; + } + + int CBaseRefCounter::Release() + { + int ret = --m_lRef; + if (0 == m_lRef) + delete this; + return ret; + } +#endif + + void Release(CBaseRefCounter* base) + { + delete base; + } +} diff --git a/DesktopEditor/raster/Metafile/Common/MetaFileRenderer.h b/DesktopEditor/raster/Metafile/Common/MetaFileRenderer.h index 48e14bc3c2..0f7fe1afd5 100644 --- a/DesktopEditor/raster/Metafile/Common/MetaFileRenderer.h +++ b/DesktopEditor/raster/Metafile/Common/MetaFileRenderer.h @@ -38,7 +38,6 @@ #include "../../../raster/ImageFileFormatChecker.h" #include "../../../raster/BgraFrame.h" #include "../../../graphics/AggPlusEnums.h" -#include "../../../graphics/GraphicsRenderer.h" #include "IOutputDevice.h" #include "MetaFile.h" diff --git a/DesktopEditor/raster/Metafile/Emf/EmfInterpretator/CEmfInterpretatorSvg.cpp b/DesktopEditor/raster/Metafile/Emf/EmfInterpretator/CEmfInterpretatorSvg.cpp index 2e589105f5..bea6594d78 100644 --- a/DesktopEditor/raster/Metafile/Emf/EmfInterpretator/CEmfInterpretatorSvg.cpp +++ b/DesktopEditor/raster/Metafile/Emf/EmfInterpretator/CEmfInterpretatorSvg.cpp @@ -2,7 +2,7 @@ #include "../../Common/MetaFileUtils.h" -#include "../Image.h" +#include "../../../../graphics/Image.h" #include "../../../BgraFrame.h" diff --git a/DesktopEditor/raster/Metafile/Emf/EmfParser/CEmfPlusParser.cpp b/DesktopEditor/raster/Metafile/Emf/EmfParser/CEmfPlusParser.cpp index c30665348e..c975e0defc 100644 --- a/DesktopEditor/raster/Metafile/Emf/EmfParser/CEmfPlusParser.cpp +++ b/DesktopEditor/raster/Metafile/Emf/EmfParser/CEmfPlusParser.cpp @@ -1,4 +1,5 @@ #include "CEmfPlusParser.h" +#include "../../../../graphics/pro/Graphics.h" #define EMRPLUS_OFFSETCLIP 0x4035 #define EMRPLUS_RESETCLIP 0x4031 @@ -1255,9 +1256,9 @@ namespace MetaFile if (!oEmfParser.CheckError()) { - CGraphicsRenderer oRenderer; + NSGraphics::IGraphicsRenderer* pGrRenderer = NSGraphics::Create(); - oRenderer.SetFontManager(GetFontManager()); + pGrRenderer->SetFontManager(GetFontManager()); TEmfRectL *pEmfBounds = oEmfParser.GetBounds(); @@ -1286,23 +1287,25 @@ namespace MetaFile oFrame.put_Height(nHeight); oFrame.put_Stride(-4 * nWidth); - oRenderer.CreateFromBgraFrame(&oFrame); - oRenderer.SetSwapRGB(false); - oRenderer.put_Width(dWidth); - oRenderer.put_Height(dHeight); + pGrRenderer->CreateFromBgraFrame(&oFrame); + pGrRenderer->SetSwapRGB(false); + pGrRenderer->put_Width(dWidth); + pGrRenderer->put_Height(dHeight); - oRenderer.BeginCommand(c_nImageType); + pGrRenderer->BeginCommand(c_nImageType); - CMetaFileRenderer oEmfOut(&oEmfParser, &oRenderer, 0, 0, dWidth, dHeight); + CMetaFileRenderer oEmfOut(&oEmfParser, pGrRenderer, 0, 0, dWidth, dHeight); oEmfParser.SetInterpretator(&oEmfOut); oEmfParser.PlayFile(); - oRenderer.EndCommand(c_nImageType); + pGrRenderer->EndCommand(c_nImageType); - LONG lWidth, lHeight; + LONG lWidth = nWidth, lHeight = nHeight; - BYTE* pPixels = oRenderer.GetPixels(lWidth, lHeight); + BYTE* pPixels = oFrame.get_Data(); + + RELEASEINTERFACE(pGrRenderer); FlipYImage(pPixels, lWidth, lHeight); //Проверить на примерах, где WrapMode != WrapModeTileFlipXY @@ -1335,8 +1338,8 @@ namespace MetaFile if (!oWmfParser.CheckError()) { - CGraphicsRenderer oRenderer; - oRenderer.SetFontManager(GetFontManager()); + NSGraphics::IGraphicsRenderer* pGrRenderer = NSGraphics::Create(); + pGrRenderer->SetFontManager(GetFontManager()); TRectD oWmfBounds = oWmfParser.GetBounds(); @@ -1365,23 +1368,23 @@ namespace MetaFile oFrame.put_Height(nHeight); oFrame.put_Stride(-4 * nWidth); - oRenderer.CreateFromBgraFrame(&oFrame); - oRenderer.SetSwapRGB(false); - oRenderer.put_Width(dWidth); - oRenderer.put_Height(dHeight); + pGrRenderer->CreateFromBgraFrame(&oFrame); + pGrRenderer->SetSwapRGB(false); + pGrRenderer->put_Width(dWidth); + pGrRenderer->put_Height(dHeight); - oRenderer.BeginCommand(c_nImageType); + pGrRenderer->BeginCommand(c_nImageType); - CMetaFileRenderer oWmfOut(&oWmfParser, &oRenderer, 0, 0, dWidth, dHeight); + CMetaFileRenderer oWmfOut(&oWmfParser, pGrRenderer, 0, 0, dWidth, dHeight); oWmfParser.SetOutputDevice(&oWmfOut); oWmfParser.PlayMetaFile(); - oRenderer.EndCommand(c_nImageType); + pGrRenderer->EndCommand(c_nImageType); LONG lWidth, lHeight; - BYTE* pPixels = oRenderer.GetPixels(lWidth, lHeight); + BYTE* pPixels = oFrame.get_Data(); FlipYImage(pPixels, lWidth, lHeight); //Проверить на примерах, где WrapMode != WrapModeTileFlipXY diff --git a/DesktopEditor/raster/Metafile/MetaFile.cpp b/DesktopEditor/raster/Metafile/MetaFile.cpp index 836d58f46d..bff579fb4e 100644 --- a/DesktopEditor/raster/Metafile/MetaFile.cpp +++ b/DesktopEditor/raster/Metafile/MetaFile.cpp @@ -30,13 +30,9 @@ * */ #include "MetaFile.h" - -#include "../../graphics/GraphicsRenderer.h" #include "../../raster/BgraFrame.h" - -#include "../../../Common/DocxFormat/Source/Base/Types_32.h" - #include "Common/MetaFileRenderer.h" +#include "../../graphics/pro/Graphics.h" namespace MetaFile { @@ -47,7 +43,7 @@ namespace MetaFile CMetaFile::CMetaFile(NSFonts::IApplicationFonts *pAppFonts) : MetaFile::IMetaFile(pAppFonts) { - m_pAppFonts = (CApplicationFonts*)pAppFonts; + m_pAppFonts = pAppFonts; // Создаем менеджер шрифтов с собственным кэшем if (pAppFonts) { @@ -107,14 +103,14 @@ namespace MetaFile m_oEmfFile.SetOutputDevice(NULL, wsXmlFilePath); - CGraphicsRenderer oRenderer; + NSGraphics::IGraphicsRenderer* pGrRenderer = NSGraphics::Create(); NSFonts::IFontManager* pFontManager = m_pAppFonts->GenerateFontManager(); NSFonts::IFontsCache* pFontCache = NSFonts::NSFontCache::Create(); pFontCache->SetStreams(m_pAppFonts->GetStreams()); pFontManager->SetOwnerCache(pFontCache); - oRenderer.SetFontManager(pFontManager); + pGrRenderer->SetFontManager(pFontManager); if (-1 == nHeight) { @@ -150,16 +146,17 @@ namespace MetaFile oFrame.put_Height(nHeight); oFrame.put_Stride(-4 * nWidth); - oRenderer.CreateFromBgraFrame(&oFrame); - oRenderer.SetSwapRGB(false); - oRenderer.put_Width(dWidth); - oRenderer.put_Height(dHeight); + pGrRenderer->CreateFromBgraFrame(&oFrame); + pGrRenderer->SetSwapRGB(false); + pGrRenderer->put_Width(dWidth); + pGrRenderer->put_Height(dHeight); - DrawOnRenderer(wsXmlFilePath, &oRenderer, 0, 0, dWidth, dHeight); + DrawOnRenderer(wsXmlFilePath, pGrRenderer, 0, 0, dWidth, dHeight); oFrame.SaveFile(wsOutFilePath, unFileType); RELEASEINTERFACE(pFontManager); + RELEASEINTERFACE(pGrRenderer); } bool CMetaFile::DrawOnRenderer(const wchar_t *wsXmlFilePath, IRenderer *pRenderer, double dX, double dY, double dWidth, double dHeight) @@ -410,14 +407,14 @@ namespace MetaFile void CMetaFile::ConvertToRaster(const wchar_t* wsOutFilePath, unsigned int unFileType, int nWidth, int nHeight) { - CGraphicsRenderer oRenderer; + NSGraphics::IGraphicsRenderer* pGrRenderer = NSGraphics::Create(); NSFonts::IFontManager* pFontManager = m_pAppFonts->GenerateFontManager(); NSFonts::IFontsCache* pFontCache = NSFonts::NSFontCache::Create(); pFontCache->SetStreams(m_pAppFonts->GetStreams()); pFontManager->SetOwnerCache(pFontCache); - oRenderer.SetFontManager(pFontManager); + pGrRenderer->SetFontManager(pFontManager); if (-1 == nHeight) { @@ -453,15 +450,16 @@ namespace MetaFile oFrame.put_Height(nHeight); oFrame.put_Stride(-4 * nWidth); - oRenderer.CreateFromBgraFrame(&oFrame); - oRenderer.SetSwapRGB(false); - oRenderer.put_Width(dWidth); - oRenderer.put_Height(dHeight); + pGrRenderer->CreateFromBgraFrame(&oFrame); + pGrRenderer->SetSwapRGB(false); + pGrRenderer->put_Width(dWidth); + pGrRenderer->put_Height(dHeight); - DrawOnRenderer(&oRenderer, 0, 0, dWidth, dHeight); + DrawOnRenderer(pGrRenderer, 0, 0, dWidth, dHeight); oFrame.SaveFile(wsOutFilePath, unFileType); RELEASEINTERFACE(pFontManager); + RELEASEINTERFACE(pGrRenderer); } } diff --git a/DesktopEditor/raster/Metafile/StarView/SvmFile.cpp b/DesktopEditor/raster/Metafile/StarView/SvmFile.cpp index b166039b95..995184a192 100644 --- a/DesktopEditor/raster/Metafile/StarView/SvmFile.cpp +++ b/DesktopEditor/raster/Metafile/StarView/SvmFile.cpp @@ -31,7 +31,7 @@ */ #include -#include "../../../graphics/GraphicsRenderer.h" +#include "../../../graphics/pro/Graphics.h" #include "../Common/MetaFileTypes.h" #include "../Common/MetaFileRenderer.h" @@ -45,10 +45,6 @@ #include "SvmEnums.h" #include "SvmObjects.h" -#if defined(DrawText) -#undef DrawText -#endif - #define DEBUG_CSvmParser 0 namespace MetaFile diff --git a/DesktopEditor/raster/Metafile/StarView/SvmFile.h b/DesktopEditor/raster/Metafile/StarView/SvmFile.h index 6d3221777f..7c88bd4e81 100644 --- a/DesktopEditor/raster/Metafile/StarView/SvmFile.h +++ b/DesktopEditor/raster/Metafile/StarView/SvmFile.h @@ -32,9 +32,12 @@ #pragma once #include "SvmPlayer.h" - #include "../Common/MetaFile.h" +#if defined(DrawText) +#undef DrawText +#endif + namespace MetaFile { diff --git a/DesktopEditor/raster/Metafile/Wmf/WmfInterpretator/CWmfInterpretatorSvg.cpp b/DesktopEditor/raster/Metafile/Wmf/WmfInterpretator/CWmfInterpretatorSvg.cpp index 1fbe34725b..2154688084 100644 --- a/DesktopEditor/raster/Metafile/Wmf/WmfInterpretator/CWmfInterpretatorSvg.cpp +++ b/DesktopEditor/raster/Metafile/Wmf/WmfInterpretator/CWmfInterpretatorSvg.cpp @@ -1,6 +1,6 @@ #include "CWmfInterpretatorSvg.h" -#include "../Image.h" +#include "../../../../graphics/Image.h" #include "../../../BgraFrame.h" diff --git a/DesktopEditor/xml/src/xmldom.cpp b/DesktopEditor/xml/src/xmldom.cpp index 4aa7a79225..8bb8f8a0fa 100644 --- a/DesktopEditor/xml/src/xmldom.cpp +++ b/DesktopEditor/xml/src/xmldom.cpp @@ -1046,6 +1046,7 @@ namespace XmlUtils std::string NSXmlCanonicalizator::Execute(const std::string& sXml, int mode, bool withComments) { +#ifdef LIBXML_C14N_ENABLED xmlDocPtr xmlDoc = xmlParseMemory((char*)sXml.c_str(), (int)sXml.length()); CXmlBuffer bufferC14N; @@ -1059,6 +1060,9 @@ namespace XmlUtils xmlOutputBufferClose(_buffer); return bufferC14N.builder.GetData(); +#else + return ""; +#endif } std::string NSXmlCanonicalizator::Execute(const std::wstring& sXmlFile, int mode, bool withComments) {