Commit ae5e5ae5 authored by Ivan.Shulga's avatar Ivan.Shulga Committed by Alexander Trofimov

CAtlMap -> std::map

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58790 954022d7-b5bf-4e40-9824-e11837661b57
parent 8009344b
......@@ -3,7 +3,7 @@
#define OOX_CONTENT_TYPES_EXTENSION_TABLE_INCLUDE_H_
#include "../../../../Common/DocxFormat/Source/Base/Base.h"
#include <map>
namespace PPTX
{
......@@ -14,48 +14,49 @@ namespace PPTX
public:
ExtensionTable()
{
m_table.SetAt(_T("gif"), _T("image/gif"));
m_table.SetAt(_T("png"), _T("image/png"));
m_table.SetAt(_T("tif"), _T("image/tiff"));
m_table.SetAt(_T("tiff"), _T("image/tiff"));
m_table.SetAt(_T("jpeg"), _T("image/jpeg"));
m_table.SetAt(_T("jpg"), _T("image/jpeg"));
m_table.SetAt(_T("jpe"), _T("image/jpeg"));
m_table.SetAt(_T("jfif"), _T("image/jpeg"));
m_table.SetAt(_T("rels"), _T("application/vnd.openxmlformats-package.relationships+xml"));
m_table.SetAt(_T("bin"), _T("application/vnd.openxmlformats-officedocument.oleObject"));
m_table.SetAt(_T("xml"), _T("application/xml"));
m_table.SetAt(_T("emf"), _T("image/x-emf"));
m_table.SetAt(_T("emz"), _T("image/x-emz"));
m_table.SetAt(_T("wmf"), _T("image/x-wmf"));
m_table.SetAt(_T("svm"), _T("image/svm"));
m_table.SetAt(_T("wav"), _T("audio/wav"));
m_table.SetAt(_T("xls"), _T("application/vnd.ms-excel"));
m_table.SetAt(_T("xlsm"), _T("application/vnd.ms-excel.sheet.macroEnabled.12"));
m_table.SetAt(_T("xlsb"), _T("application/vnd.ms-excel.sheet.binary.macroEnabled.12"));
m_table.SetAt(_T("xlsx"), _T("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"));
m_table.SetAt(_T("ppt"), _T("application/vnd.ms-powerpoint"));
m_table.SetAt(_T("pptm"), _T("application/vnd.ms-powerpoint.presentation.macroEnabled.12"));
m_table.SetAt(_T("pptx"), _T("application/vnd.openxmlformats-officedocument.presentationml.presentation"));
m_table.SetAt(_T("sldm"), _T("application/vnd.ms-powerpoint.slide.macroEnabled.12"));
m_table.SetAt(_T("sldx"), _T("application/vnd.openxmlformats-officedocument.presentationml.slide"));
m_table.SetAt(_T("doc"), _T("application/msword"));
m_table.SetAt(_T("docm"), _T("aapplication/vnd.ms-word.document.macroEnabled.12"));
m_table.SetAt(_T("docx"), _T("application/vnd.openxmlformats-officedocument.wordprocessingml.document"));
m_table.SetAt(_T("vml"), _T("application/vnd.openxmlformats-officedocument.vmlDrawing"));
m_table.insert( std::pair<CString,CString>( _T("gif"), _T("image/gif")));
m_table.insert( std::pair<CString,CString>( _T("png"), _T("image/png")));
m_table.insert( std::pair<CString,CString>( _T("tif"), _T("image/tiff")));
m_table.insert( std::pair<CString,CString>( _T("tiff"), _T("image/tiff")));
m_table.insert( std::pair<CString,CString>( _T("jpeg"), _T("image/jpeg")));
m_table.insert( std::pair<CString,CString>( _T("jpg"), _T("image/jpeg")));
m_table.insert( std::pair<CString,CString>( _T("jpe"), _T("image/jpeg")));
m_table.insert( std::pair<CString,CString>( _T("jfif"), _T("image/jpeg")));
m_table.insert( std::pair<CString,CString>( _T("rels"), _T("application/vnd.openxmlformats-package.relationships+xml")));
m_table.insert( std::pair<CString,CString>( _T("bin"), _T("application/vnd.openxmlformats-officedocument.oleObject")));
m_table.insert( std::pair<CString,CString>( _T("xml"), _T("application/xml")));
m_table.insert( std::pair<CString,CString>( _T("emf"), _T("image/x-emf")));
m_table.insert( std::pair<CString,CString>( _T("emz"), _T("image/x-emz")));
m_table.insert( std::pair<CString,CString>( _T("wmf"), _T("image/x-wmf")));
m_table.insert( std::pair<CString,CString>( _T("svm"), _T("image/svm")));
m_table.insert( std::pair<CString,CString>( _T("wav"), _T("audio/wav")));
m_table.insert( std::pair<CString,CString>( _T("xls"), _T("application/vnd.ms-excel")));
m_table.insert( std::pair<CString,CString>( _T("xlsm"), _T("application/vnd.ms-excel.sheet.macroEnabled.12")));
m_table.insert( std::pair<CString,CString>( _T("xlsb"), _T("application/vnd.ms-excel.sheet.binary.macroEnabled.12")));
m_table.insert( std::pair<CString,CString>( _T("xlsx"), _T("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")));
m_table.insert( std::pair<CString,CString>( _T("ppt"), _T("application/vnd.ms-powerpoint")));
m_table.insert( std::pair<CString,CString>( _T("pptm"), _T("application/vnd.ms-powerpoint.presentation.macroEnabled.12")));
m_table.insert( std::pair<CString,CString>( _T("pptx"), _T("application/vnd.openxmlformats-officedocument.presentationml.presentation")));
m_table.insert( std::pair<CString,CString>( _T("sldm"), _T("application/vnd.ms-powerpoint.slide.macroEnabled.12")));
m_table.insert( std::pair<CString,CString>( _T("sldx"), _T("application/vnd.openxmlformats-officedocument.presentationml.slide")));
m_table.insert( std::pair<CString,CString>( _T("doc"), _T("application/msword")));
m_table.insert( std::pair<CString,CString>( _T("docm"), _T("aapplication/vnd.ms-word.document.macroEnabled.12")));
m_table.insert( std::pair<CString,CString>( _T("docx"), _T("application/vnd.openxmlformats-officedocument.wordprocessingml.document")));
m_table.insert( std::pair<CString,CString>( _T("vml"), _T("application/vnd.openxmlformats-officedocument.vmlDrawing")));
}
const CString operator[] (const CString& extension) const
{
const CAtlMap<CString, CString>::CPair* pPair = m_table.Lookup(extension);
if (NULL == pPair)
return _T("");
return pPair->m_value;
std::map<CString, CString>::const_iterator it = m_table.find(extension);
if (it == m_table.end())
return _T("");
return it->second;
}
private:
CAtlMap<CString, CString> m_table;
std::map<CString, CString> m_table;
};
} // namespace ContentTypes
} // namespace PPTX
#endif // OOX_CONTENT_TYPES_EXTENSION_TABLE_INCLUDE_H_
\ No newline at end of file
#endif // OOX_CONTENT_TYPES_EXTENSION_TABLE_INCLUDE_H_
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