Commit 821e0a4b authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

.....

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58897 954022d7-b5bf-4e40-9824-e11837661b57
parent f7c65a4a
This diff is collapsed.
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\Common;..\..\..\..\Addons\ZLib" AdditionalIncludeDirectories="..\Common;..\..\..\..\Addons\ZLib"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_ATL_ATTRIBUTES;_USE_MATH_DEFINES" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_ATL_ATTRIBUTES;NODOCX;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;_AVS_PPT_SHAPE_INCLUDE_;LIBXML_READER_ENABLED;_USE_XMLLITE_READER_;USE_XMLLITE_READER;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML"
StringPooling="true" StringPooling="true"
RuntimeLibrary="2" RuntimeLibrary="2"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
...@@ -432,14 +432,6 @@ ...@@ -432,14 +432,6 @@
Name="Source Files" Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
> >
<File
RelativePath=".\ASCOfficePPTXFile.cpp"
>
</File>
<File
RelativePath=".\ASCOfficePPTXFileRealization.cpp"
>
</File>
<File <File
RelativePath="stdafx.cpp" RelativePath="stdafx.cpp"
> >
...@@ -497,10 +489,6 @@ ...@@ -497,10 +489,6 @@
RelativePath=".\ASCOfficePPTXFileComInterface.h" RelativePath=".\ASCOfficePPTXFileComInterface.h"
> >
</File> </File>
<File
RelativePath="..\Common\DocxFormat\Source\XML\libxml2\libxml2.h"
>
</File>
<File <File
RelativePath="Resource.h" RelativePath="Resource.h"
> >
...@@ -509,10 +497,6 @@ ...@@ -509,10 +497,6 @@
RelativePath="stdafx.h" RelativePath="stdafx.h"
> >
</File> </File>
<File
RelativePath="..\Common\DocxFormat\Source\XML\stringcommon.h"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="Resource Files" Name="Resource Files"
...@@ -527,30 +511,6 @@ ...@@ -527,30 +511,6 @@
> >
</File> </File>
</Filter> </Filter>
<Filter
Name="Editor"
>
<File
RelativePath=".\Editor\BinaryFileReaderWriter.h"
>
</File>
<File
RelativePath=".\Editor\BinReaderWriterDefines.h"
>
</File>
<File
RelativePath=".\Editor\BinWriters.h"
>
</File>
<File
RelativePath=".\Editor\Converter.h"
>
</File>
<File
RelativePath=".\Editor\PPTXWriter.h"
>
</File>
</Filter>
</Files> </Files>
<Globals> <Globals>
</Globals> </Globals>
......
#include "stdafx.h"
#include "ASCOfficePPTXFile.h" #include "ASCOfficePPTXFile.h"
#include "PPTXFormat/PPTXEvent.h" #include "PPTXFormat/PPTXEvent.h"
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\..\Common\ASCDocxFormat\Source\Utility;..\..\Common\ASCDocxFormat\Source\XML;..\..\Common\ASCDocxFormat\Source\;.\;..\..\Common\DocxFormat\Source\XML\libxml2\XML\include;&quot;../../DesktopEditor/freetype-2.5.2/include&quot;" AdditionalIncludeDirectories="..\..\Common\ASCDocxFormat\Source\Utility;..\..\Common\ASCDocxFormat\Source\XML;..\..\Common\ASCDocxFormat\Source\;.\;..\..\Common\DocxFormat\Source\XML\libxml2\XML\include;&quot;../../DesktopEditor/freetype-2.5.2/include&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_ATL_ATTRIBUTES;_USE_MATH_DEFINES;NODOCX;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;_AVS_PPT_SHAPE_INCLUDE_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML" PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_ATL_ATTRIBUTES;_USE_MATH_DEFINES;NODOCX;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;_AVS_PPT_SHAPE_INCLUDE_;_DOCWRAPPER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
...@@ -107,8 +107,8 @@ ...@@ -107,8 +107,8 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
FavorSizeOrSpeed="1" FavorSizeOrSpeed="1"
WholeProgramOptimization="false" WholeProgramOptimization="false"
AdditionalIncludeDirectories="..\..\Common\ASCDocxFormat\Source\Utility;..\..\Common\ASCDocxFormat\Source\XML;..\..\Common\ASCDocxFormat\Source;..\..\Common\DocxFormat\Source\XML\libxml2\XML\include;&quot;../../DesktopEditor/freetype-2.5.2/include&quot;" AdditionalIncludeDirectories="..\..\Common\ASCDocxFormat\Source\Utility;..\..\Common\ASCDocxFormat\Source\XML;..\..\Common\ASCDocxFormat\Source;..\..\Common\DocxFormat\Source\XML\libxml2\XML\include;&quot;..\..\DesktopEditor\freetype-2.5.2\include&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_ATL_ATTRIBUTES;_USE_MATH_DEFINES;NODOCX;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;_AVS_PPT_SHAPE_INCLUDE_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML" PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_ATL_ATTRIBUTES;_USE_MATH_DEFINES;NODOCX;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;_AVS_PPT_SHAPE_INCLUDE_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML"
RuntimeLibrary="2" RuntimeLibrary="2"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
...@@ -158,7 +158,11 @@ ...@@ -158,7 +158,11 @@
> >
</File> </File>
<File <File
RelativePath="..\..\Common\DocxFormat\Source\XML\libxml2\libxml2.cpp" RelativePath="..\ASCOfficePPTXFile.cpp"
>
</File>
<File
RelativePath="..\ASCOfficePPTXFileRealization.cpp"
> >
</File> </File>
<File <File
...@@ -178,10 +182,6 @@ ...@@ -178,10 +182,6 @@
RelativePath="..\.\ASCOfficePPTXFile.h" RelativePath="..\.\ASCOfficePPTXFile.h"
> >
</File> </File>
<File
RelativePath="..\..\Common\DocxFormat\Source\XML\libxml2\libxml2.h"
>
</File>
<File <File
RelativePath="..\..\Common\DocxFormat\Source\XML\stringcommon.h" RelativePath="..\..\Common\DocxFormat\Source\XML\stringcommon.h"
> >
...@@ -203,48 +203,12 @@ ...@@ -203,48 +203,12 @@
> >
</File> </File>
<File <File
RelativePath="..\.\Editor\FontPicker.cpp" RelativePath="..\Editor\FontPicker.cpp"
> >
</File> </File>
<File <File
RelativePath="..\..\ASCPresentationEditor\OfficeDrawing\Shapes\BaseShape\PPTXShape\Formula.cpp" RelativePath="..\..\ASCPresentationEditor\OfficeDrawing\Shapes\BaseShape\PPTXShape\Formula.cpp"
> >
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
<FileConfiguration
Name="ReleaseASC|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
<FileConfiguration
Name="ReleaseOpenSource|Win32"
>
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)\$(InputName)1.obj"
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath="..\..\ASCPresentationEditor\OfficeDrawing\Shapes\BaseShape\PPTShape\Formula.cpp" RelativePath="..\..\ASCPresentationEditor\OfficeDrawing\Shapes\BaseShape\PPTShape\Formula.cpp"
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//1 //1
//0 //0
//0 //0
//247 //302
#define INTVER 1,0,0,247 #define INTVER 1,0,0,302
#define STRVER "1,0,0,247\0" #define STRVER "1,0,0,302\0"
...@@ -63,14 +63,13 @@ __interface IAVSPresentationEditor: IDispatch ...@@ -63,14 +63,13 @@ __interface IAVSPresentationEditor: IDispatch
[id(2001)] HRESULT GetAdditionalParam([in] BSTR ParamName, [out, retval] VARIANT* ParamValue); [id(2001)] HRESULT GetAdditionalParam([in] BSTR ParamName, [out, retval] VARIANT* ParamValue);
}; };
//?????? ??? [dispinterface, uuid("34EC371F-3F73-4a40-B8A6-FD21B9C3E789")]
//[dispinterface, uuid("34EC371F-3F73-4a40-B8A6-FD21B9C3E789")] __interface _IAVSPresentationEditorEvents
//__interface _IAVSPresentationEditorEvents {
//{ };
//};
// CAVSPresentationEditor // CAVSPresentationEditor
[coclass, uuid("29759D68-916E-4317-BC8B-35793F7448B3")/*, event_source(com)*/, threading(apartment), vi_progid("AVSPptEditor.PptEditor"), progid("AVSPptEditor.PptEditor.1"), version(1.0)] [coclass, uuid("29759D68-916E-4317-BC8B-35793F7448B3"), event_source(com), threading(apartment), vi_progid("AVSPptEditor.PptEditor"), progid("AVSPptEditor.PptEditor.1"), version(1.0)]
class ATL_NO_VTABLE CAVSPresentationEditor: class ATL_NO_VTABLE CAVSPresentationEditor:
public IAVSPresentationEditor public IAVSPresentationEditor
{ {
...@@ -110,6 +109,8 @@ protected: ...@@ -110,6 +109,8 @@ protected:
#endif #endif
public: public:
__event __interface _IAVSPresentationEditorEvents;
CAVSPresentationEditor() CAVSPresentationEditor()
{ {
m_hSynchMutex = CreateMutex(NULL, FALSE, NULL); m_hSynchMutex = CreateMutex(NULL, FALSE, NULL);
......
#pragma once #pragma once
#include "../../Common/DocxFormat/Source/SystemUtility/File.h" #include "../../Common/DocxFormat/Source/SystemUtility/File.h"
#include <map>
namespace NSPresentationEditor namespace NSPresentationEditor
{ {
// xml // xml
...@@ -57,17 +59,16 @@ namespace NSPresentationEditor ...@@ -57,17 +59,16 @@ namespace NSPresentationEditor
// common function // common function
template <typename TKey, typename TVal> template <typename TKey, typename TVal>
void AppendAtlMap(CAtlMap<TKey, TVal>* pMapDst, const CAtlMap<TKey, TVal>* pMapSrc) void AppendAtlMap(std::map<TKey, TVal>* pMapDst, const std::map<TKey, TVal>* pMapSrc)
{ {
if ((NULL == pMapDst) || (NULL == pMapSrc)) if ((NULL == pMapDst) || (NULL == pMapSrc))
return; return;
POSITION pos = pMapSrc->GetStartPosition(); for (std::map<TKey, TVal>::iterator pPair = pMapSrc->begin(); pPair != pMapSrc->end(); ++pPair)
while (NULL != pos)
{ {
TKey key = pMapSrc->GetKeyAt(pos); TKey key = pPair->first;
TVal value = pMapSrc->GetNextValue(pos); TVal value = pPair->second;
pMapDst->SetAt(key, value); (*pMapDst)[key] = value;
} }
} }
} }
#pragma once #pragma once
#include <vector>
namespace NSPresentationEditor namespace NSPresentationEditor
{ {
class CEffect class CEffect
...@@ -28,7 +30,7 @@ namespace NSPresentationEditor ...@@ -28,7 +30,7 @@ namespace NSPresentationEditor
class CEffects class CEffects
{ {
public: public:
CAtlArray<CEffect> m_arEffects; std::vector<CEffect> m_arEffects;
public: public:
CEffects() : m_arEffects() CEffects() : m_arEffects()
...@@ -36,7 +38,7 @@ namespace NSPresentationEditor ...@@ -36,7 +38,7 @@ namespace NSPresentationEditor
} }
CEffects& operator=(const CEffects& oSrc) CEffects& operator=(const CEffects& oSrc)
{ {
m_arEffects.Copy(oSrc.m_arEffects); m_arEffects.insert(m_arEffects.end(), oSrc.m_arEffects.begin(), oSrc.m_arEffects.end());
return *this; return *this;
} }
CEffects(const CEffects& oSrc) CEffects(const CEffects& oSrc)
......
...@@ -181,12 +181,11 @@ namespace NSPresentationEditor ...@@ -181,12 +181,11 @@ namespace NSPresentationEditor
virtual void SetupProperties(CSlide* pSlide, CTheme* pTheme, CLayout* pLayout) virtual void SetupProperties(CSlide* pSlide, CTheme* pTheme, CLayout* pLayout)
{ {
CAtlMap<CElementProperty::Type, CElementProperty>* pMap = &m_oProperties.m_arProperties; std::map<CElementProperty::Type, CElementProperty>* pMap = &m_oProperties.m_arProperties;
POSITION pos = pMap->GetStartPosition(); for (std::map<CElementProperty::Type, CElementProperty>::iterator pPair = pMap->begin(); pPair != pMap->end(); ++pPair)
while (NULL != pos)
{ {
CElementProperty oProperty = pMap->GetNextValue(pos); CElementProperty oProperty = pPair->second;
SetupProperty(pSlide, pTheme, pLayout, &oProperty); SetupProperty(pSlide, pTheme, pLayout, &oProperty);
} }
} }
......
#pragma once #pragma once
#include <map>
namespace NSPresentationEditor namespace NSPresentationEditor
{ {
class CElementProperty class CElementProperty
...@@ -114,7 +116,7 @@ namespace NSPresentationEditor ...@@ -114,7 +116,7 @@ namespace NSPresentationEditor
class CElementProperties class CElementProperties
{ {
public: public:
CAtlMap<CElementProperty::Type, CElementProperty> m_arProperties; std::map<CElementProperty::Type, CElementProperty> m_arProperties;
public: public:
CElementProperties() : m_arProperties() CElementProperties() : m_arProperties()
...@@ -123,14 +125,14 @@ namespace NSPresentationEditor ...@@ -123,14 +125,14 @@ namespace NSPresentationEditor
public: public:
CElementProperties& operator=(const CElementProperties& oSrc) CElementProperties& operator=(const CElementProperties& oSrc)
{ {
m_arProperties.RemoveAll(); m_arProperties.clear();
POSITION pos = oSrc.m_arProperties.GetStartPosition(); for (std::map<CElementProperty::Type, CElementProperty>::const_iterator pPair = oSrc.m_arProperties.begin(); pPair != oSrc.m_arProperties.end(); ++pPair)
while (NULL != pos)
{ {
CElementProperty oProperty = oSrc.m_arProperties.GetNextValue(pos); CElementProperty oProperty = pPair->second;
m_arProperties.SetAt(oProperty.m_ID, oProperty); m_arProperties[oProperty.m_ID] = oProperty;
} }
return *this; return *this;
} }
CElementProperties(const CElementProperties& oSrc) CElementProperties(const CElementProperties& oSrc)
...@@ -140,7 +142,7 @@ namespace NSPresentationEditor ...@@ -140,7 +142,7 @@ namespace NSPresentationEditor
virtual ~CElementProperties() virtual ~CElementProperties()
{ {
m_arProperties.RemoveAll(); m_arProperties.clear();
} }
inline void SetAt(const CElementProperty::Type& eType, const DWORD& dwValue) inline void SetAt(const CElementProperty::Type& eType, const DWORD& dwValue)
...@@ -148,28 +150,28 @@ namespace NSPresentationEditor ...@@ -148,28 +150,28 @@ namespace NSPresentationEditor
CElementProperty oProp(eType); CElementProperty oProp(eType);
oProp.m_dwValue = dwValue; oProp.m_dwValue = dwValue;
m_arProperties.SetAt(eType, oProp); m_arProperties[eType] = oProp;
} }
inline void SetAt(const CElementProperty::Type& eType, const BYTE& nValue) inline void SetAt(const CElementProperty::Type& eType, const BYTE& nValue)
{ {
CElementProperty oProp(eType); CElementProperty oProp(eType);
oProp.m_dwValue = (DWORD)nValue; oProp.m_dwValue = (DWORD)nValue;
m_arProperties.SetAt(eType, oProp); m_arProperties[eType] = oProp;
} }
inline void SetAt(const CElementProperty::Type& eType, const long& lValue) inline void SetAt(const CElementProperty::Type& eType, const long& lValue)
{ {
CElementProperty oProp(eType); CElementProperty oProp(eType);
oProp.m_dwValue = (DWORD)lValue; oProp.m_dwValue = (DWORD)lValue;
m_arProperties.SetAt(eType, oProp); m_arProperties[eType] = oProp;
} }
inline void SetAt(const CElementProperty::Type& eType, const bool& bValue) inline void SetAt(const CElementProperty::Type& eType, const bool& bValue)
{ {
CElementProperty oProp(eType); CElementProperty oProp(eType);
oProp.m_dwValue = (true == bValue) ? 1 : 0; oProp.m_dwValue = (true == bValue) ? 1 : 0;
m_arProperties.SetAt(eType, oProp); m_arProperties[eType] = oProp;
} }
inline void SetAt(const CElementProperty::Type& eType, CString strValue) inline void SetAt(const CElementProperty::Type& eType, CString strValue)
{ {
...@@ -181,7 +183,7 @@ namespace NSPresentationEditor ...@@ -181,7 +183,7 @@ namespace NSPresentationEditor
oProp.m_strAdvanced[oProp.m_dwValue - 1] = 0; oProp.m_strAdvanced[oProp.m_dwValue - 1] = 0;
m_arProperties.SetAt(eType, oProp); m_arProperties[eType] = oProp;
} }
}; };
} }
......
...@@ -738,12 +738,11 @@ namespace NSPresentationEditor ...@@ -738,12 +738,11 @@ namespace NSPresentationEditor
virtual void SetupProperties(CSlide* pSlide, CTheme* pTheme, CLayout* pLayout) virtual void SetupProperties(CSlide* pSlide, CTheme* pTheme, CLayout* pLayout)
{ {
CAtlMap<CElementProperty::Type, CElementProperty>* pMap = &m_oProperties.m_arProperties; std::map<CElementProperty::Type, CElementProperty>* pMap = &m_oProperties.m_arProperties;
POSITION pos = pMap->GetStartPosition(); for (std::map<CElementProperty::Type, CElementProperty>::iterator pPair = pMap->begin(); pPair != pMap->end(); ++pPair)
while (NULL != pos)
{ {
CElementProperty oProperty = pMap->GetNextValue(pos); CElementProperty oProperty = pPair->second;
SetupProperty(pSlide, pTheme, pLayout, &oProperty); SetupProperty(pSlide, pTheme, pLayout, &oProperty);
} }
......
...@@ -37,7 +37,7 @@ namespace NSPresentationEditor ...@@ -37,7 +37,7 @@ namespace NSPresentationEditor
public: public:
bool m_bPresent; bool m_bPresent;
CAtlArray<CTextRange> m_arRanges; std::vector<CTextRange> m_arRanges;
public: public:
CInteractiveInfo() CInteractiveInfo()
...@@ -55,7 +55,7 @@ namespace NSPresentationEditor ...@@ -55,7 +55,7 @@ namespace NSPresentationEditor
m_bPresent = oSrc.m_bPresent; m_bPresent = oSrc.m_bPresent;
m_arRanges.Copy(oSrc.m_arRanges); m_arRanges.insert(m_arRanges.end(), oSrc.m_arRanges.begin(), oSrc.m_arRanges.end());
return *this; return *this;
} }
......
...@@ -290,12 +290,12 @@ namespace NSPresentationEditor ...@@ -290,12 +290,12 @@ namespace NSPresentationEditor
} }
private: private:
// //
bool Save(CAtlArray<BYTE> &aTable) bool Save(std::vector<BYTE> &aTable)
{ {
return false; return false;
} }
bool Load(CAtlArray<BYTE> &aTable) bool Load(std::vector<BYTE> &aTable)
{ {
return false; return false;
} }
...@@ -382,12 +382,12 @@ namespace NSPresentationEditor ...@@ -382,12 +382,12 @@ namespace NSPresentationEditor
private: private:
// //
bool Save(CAtlArray<BYTE> &aTable) bool Save(std::vector<BYTE> &aTable)
{ {
return false; return false;
} }
bool Load(CAtlArray<BYTE> &aTable) bool Load(std::vector<BYTE> &aTable)
{ {
return false; return false;
} }
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
#include "../../Common/ASCUtils.h" #include "../../Common/ASCUtils.h"
#include "../OfficeDrawing/TextAttributesEx.h" #include "../OfficeDrawing/TextAttributesEx.h"
#define _USE_XMLLITE_READER_
#include <map> #include <map>
class CCSS class CCSS
......
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
#include "../stdafx.h" #include "../stdafx.h"
#include "FileDownloader.h" #include "FileDownloader.h"
namespace NSPresentationEditor namespace NSPresentationEditor
{ {
class CImageManager class CImageManager
{ {
private: private:
CAtlMap<CString, CString> m_mapImages; std::map<CString, CString> m_mapImages;
LONG m_lIndexNextImage; LONG m_lIndexNextImage;
CString m_strDstMedia; CString m_strDstMedia;
...@@ -20,7 +21,7 @@ namespace NSPresentationEditor ...@@ -20,7 +21,7 @@ namespace NSPresentationEditor
} }
AVSINLINE void Clear() AVSINLINE void Clear()
{ {
m_mapImages.RemoveAll(); m_mapImages.clear();
m_lIndexNextImage = 0; m_lIndexNextImage = 0;
} }
AVSINLINE void SetDstMedia(const CString& strDst) AVSINLINE void SetDstMedia(const CString& strDst)
...@@ -31,9 +32,9 @@ namespace NSPresentationEditor ...@@ -31,9 +32,9 @@ namespace NSPresentationEditor
public: public:
AVSINLINE CString GenerateImage(const CString& strInput) AVSINLINE CString GenerateImage(const CString& strInput)
{ {
CAtlMap<CString, CString>::CPair* pPair = m_mapImages.Lookup(strInput); std::map<CString, CString>::iterator pPair = m_mapImages.find(strInput);
if (NULL != pPair) if (m_mapImages.end() != pPair)
return pPair->m_value; return pPair->second;
if (IsNeedDownload(strInput)) if (IsNeedDownload(strInput))
return DownloadImage(strInput); return DownloadImage(strInput);
...@@ -51,7 +52,7 @@ namespace NSPresentationEditor ...@@ -51,7 +52,7 @@ namespace NSPresentationEditor
CString strOutput = m_strDstMedia + strImage + strExts; CString strOutput = m_strDstMedia + strImage + strExts;
strImage = _T("../media/") + strImage + strExts; strImage = _T("../media/") + strImage + strExts;
m_mapImages.SetAt(strInput, strImage); m_mapImages[strInput] = strImage;
// //
if (strOutput != strInput) if (strOutput != strInput)
...@@ -91,7 +92,7 @@ namespace NSPresentationEditor ...@@ -91,7 +92,7 @@ namespace NSPresentationEditor
private: private:
NSPresentationEditor::CStringWriter m_oWriter; NSPresentationEditor::CStringWriter m_oWriter;
int m_lNextRelsID; int m_lNextRelsID;
CAtlMap<CString, int> m_mapImages; std::map<CString, int> m_mapImages;
CImageManager* m_pManager; CImageManager* m_pManager;
public: public:
...@@ -106,7 +107,7 @@ namespace NSPresentationEditor ...@@ -106,7 +107,7 @@ namespace NSPresentationEditor
{ {
m_oWriter.ClearNoAttack(); m_oWriter.ClearNoAttack();
m_lNextRelsID = 1; m_lNextRelsID = 1;
m_mapImages.RemoveAll(); m_mapImages.clear();
} }
AVSINLINE void StartMaster(int nIndexTheme, int nStartLayoutIndex, int nCountLayouts) AVSINLINE void StartMaster(int nIndexTheme, int nStartLayoutIndex, int nCountLayouts)
...@@ -212,16 +213,17 @@ namespace NSPresentationEditor ...@@ -212,16 +213,17 @@ namespace NSPresentationEditor
AVSINLINE CString WriteImage(const CString& strImagePath) AVSINLINE CString WriteImage(const CString& strImagePath)
{ {
CString strImage = m_pManager->GenerateImage(strImagePath); CString strImage = m_pManager->GenerateImage(strImagePath);
CAtlMap<CString, int>::CPair* pPair = m_mapImages.Lookup(strImage); std::map<CString, int>::iterator pPair = m_mapImages.find(strImage);
if (NULL != pPair) if (m_mapImages.end() != pPair)
{ {
CString strRid = _T(""); CString strRid = _T("");
strRid.Format(_T("rId%d"), pPair->m_value); strRid.Format(_T("rId%d"), pPair->second);
return strRid; return strRid;
} }
m_mapImages.SetAt(strImage, m_lNextRelsID); m_mapImages[strImage] = m_lNextRelsID;
CString strRid = _T(""); CString strRid = _T("");
strRid.Format(_T("rId%d"), m_lNextRelsID++); strRid.Format(_T("rId%d"), m_lNextRelsID++);
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//1 //1
//0 //0
//0 //0
//109 //121
#define INTVER 1,0,0,109 #define INTVER 1,0,0,121
#define STRVER "1,0,0,109\0" #define STRVER "1,0,0,121\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