mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-20 23:06:35 +08:00
Compare commits
38 Commits
core-linux
...
core-linux
| Author | SHA1 | Date | |
|---|---|---|---|
| cc228f3393 | |||
| 19904acd30 | |||
| 30d175144a | |||
| acf15abe41 | |||
| 5a7fc7f548 | |||
| e7326556e0 | |||
| c589d8fe8a | |||
| a28e8f1357 | |||
| 8b7bb944bc | |||
| 14ee946069 | |||
| 7aebdd8ec5 | |||
| 977baafc03 | |||
| 31b854bc70 | |||
| e274dc50d7 | |||
| d153db627b | |||
| 9cc6bc14c5 | |||
| 775c57be5d | |||
| da37aeb039 | |||
| 751c6647a2 | |||
| ec2344ccd5 | |||
| 0494882541 | |||
| 07b0ba71d9 | |||
| 299ef4873f | |||
| 93c7819106 | |||
| 16c3f81dee | |||
| 7fc67bdadf | |||
| 31deb60343 | |||
| 7e83e168db | |||
| a4c0fbe4ea | |||
| ae0f5867dd | |||
| 0dd4fc9c14 | |||
| 3a92ef2395 | |||
| 23c9a65fcb | |||
| ba55f1436d | |||
| f1c1d62a4d | |||
| c2bdec6bde | |||
| 93d0ebfa09 | |||
| 6f881e2066 |
@ -324,7 +324,7 @@ namespace DocFileFormat
|
||||
{
|
||||
case wzEquationXML:
|
||||
{
|
||||
ODRAW::xmlString *pXml = dynamic_cast<ODRAW::xmlString*>(iter.get());
|
||||
ODRAW::XmlString *pXml = dynamic_cast<ODRAW::XmlString*>(iter.get());
|
||||
if (pXml)
|
||||
{
|
||||
m_isEquation = true;
|
||||
@ -340,7 +340,7 @@ namespace DocFileFormat
|
||||
}break;
|
||||
case metroBlob:
|
||||
{//встроенная неведомая хуйня
|
||||
ODRAW::metroBlob* blob = dynamic_cast<ODRAW::metroBlob*>(iter.get());
|
||||
ODRAW::MetroBlob* blob = dynamic_cast<ODRAW::MetroBlob*>(iter.get());
|
||||
if (blob)
|
||||
{
|
||||
m_isBlob = true;
|
||||
|
||||
@ -568,7 +568,7 @@ namespace DocFileFormat
|
||||
}break;
|
||||
case fillBlipName:
|
||||
{
|
||||
ODRAW::anyString* str = dynamic_cast<ODRAW::anyString*>(iter.get());
|
||||
ODRAW::AnyString* str = dynamic_cast<ODRAW::AnyString*>(iter.get());
|
||||
if ((str) && (!str->string_.empty()))
|
||||
{
|
||||
appendValueAttribute(&m_fill, L"o:title", FormatUtils::XmlEncode(str->string_));
|
||||
@ -650,7 +650,7 @@ namespace DocFileFormat
|
||||
}break;
|
||||
case pibName:
|
||||
{
|
||||
ODRAW::anyString* str = dynamic_cast<ODRAW::anyString*>(iter.get());
|
||||
ODRAW::AnyString* str = dynamic_cast<ODRAW::AnyString*>(iter.get());
|
||||
if ((str) && (!str->string_.empty()))
|
||||
{
|
||||
appendValueAttribute(&m_imagedata, L"o:title", FormatUtils::XmlEncode(str->string_));
|
||||
@ -762,7 +762,7 @@ namespace DocFileFormat
|
||||
// Word Art
|
||||
case gtextUNICODE:
|
||||
{
|
||||
ODRAW::anyString* str = dynamic_cast<ODRAW::anyString*>(iter.get());
|
||||
ODRAW::AnyString* str = dynamic_cast<ODRAW::AnyString*>(iter.get());
|
||||
if ((str) && (!str->string_.empty()))
|
||||
{
|
||||
std::wstring text = FormatUtils::XmlEncode(str->string_);
|
||||
@ -776,7 +776,7 @@ namespace DocFileFormat
|
||||
}break;
|
||||
case gtextFont:
|
||||
{
|
||||
ODRAW::anyString* str = dynamic_cast<ODRAW::anyString*>(iter.get());
|
||||
ODRAW::AnyString* str = dynamic_cast<ODRAW::AnyString*>(iter.get());
|
||||
if ((str) && (!str->string_.empty()))
|
||||
{
|
||||
std::wstring font = str->string_;
|
||||
@ -1261,7 +1261,7 @@ namespace DocFileFormat
|
||||
/// Build the VML wrapcoords string for a given pWrapPolygonVertices
|
||||
std::wstring VMLShapeMapping::GetWrapCoords(const ODRAW::OfficeArtFOPTEPtr& pOpt) const
|
||||
{
|
||||
ODRAW::pWrapPolygonVertices* pWrapPolygonVertices = dynamic_cast<ODRAW::pWrapPolygonVertices*>(pOpt.get());
|
||||
ODRAW::PWrapPolygonVertices* pWrapPolygonVertices = dynamic_cast<ODRAW::PWrapPolygonVertices*>(pOpt.get());
|
||||
if (!pWrapPolygonVertices) return L"";
|
||||
|
||||
std::wstring coords;
|
||||
@ -1842,7 +1842,7 @@ namespace DocFileFormat
|
||||
|
||||
std::wstring VMLShapeMapping::getFillColorString(const ODRAW::OfficeArtFOPTEPtr& pOpt) const
|
||||
{
|
||||
ODRAW::fillShadeColors* pColors = dynamic_cast<ODRAW::fillShadeColors*>(pOpt.get());
|
||||
ODRAW::FillShadeColors* pColors = dynamic_cast<ODRAW::FillShadeColors*>(pOpt.get());
|
||||
if (!pColors) return L"";
|
||||
|
||||
std::wstring result;
|
||||
@ -1923,7 +1923,7 @@ namespace DocFileFormat
|
||||
}
|
||||
std::wstring VMLShapeMapping::GetConnectAngles(const ODRAW::OfficeArtFOPTEPtr& pOpt) const
|
||||
{
|
||||
ODRAW::pConnectionSitesDir* pAngles = dynamic_cast<ODRAW::pConnectionSitesDir*>(pOpt.get());
|
||||
ODRAW::PConnectionSitesDir* pAngles = dynamic_cast<ODRAW::PConnectionSitesDir*>(pOpt.get());
|
||||
if (!pAngles) return L"";
|
||||
|
||||
std::wstring angles;
|
||||
@ -1951,7 +1951,7 @@ namespace DocFileFormat
|
||||
}
|
||||
void VMLShapeMapping::GetGuides( const ODRAW::OfficeArtFOPTEPtr& pOpt )
|
||||
{
|
||||
ODRAW::pGuides* pGuides = dynamic_cast<ODRAW::pGuides*>(pOpt.get());
|
||||
ODRAW::PGuides* pGuides = dynamic_cast<ODRAW::PGuides*>(pOpt.get());
|
||||
if (!pGuides) return;
|
||||
|
||||
m_arrGuides = pGuides->complex.data;
|
||||
@ -1975,7 +1975,7 @@ namespace DocFileFormat
|
||||
|
||||
std::wstring VMLShapeMapping::GetConnectLocs( const ODRAW::OfficeArtFOPTEPtr& pOpt ) const
|
||||
{
|
||||
ODRAW::pConnectionSites* pConnection = dynamic_cast<ODRAW::pConnectionSites*>(pOpt.get());
|
||||
ODRAW::PConnectionSites* pConnection = dynamic_cast<ODRAW::PConnectionSites*>(pOpt.get());
|
||||
if (!pConnection) return L"";
|
||||
|
||||
std::wstring locs;
|
||||
@ -1996,7 +1996,7 @@ namespace DocFileFormat
|
||||
{
|
||||
std::vector<std::wstring> rectangles;
|
||||
|
||||
ODRAW::pInscribe* pInscribe = dynamic_cast<ODRAW::pInscribe*>(pOpt.get());
|
||||
ODRAW::PInscribe* pInscribe = dynamic_cast<ODRAW::PInscribe*>(pOpt.get());
|
||||
if (!pInscribe) return rectangles;
|
||||
|
||||
for (size_t i = 0; i < pInscribe->complex.data.size(); ++i)
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
#define COMMENTS_WRITER
|
||||
|
||||
#include "../../XlsxSerializerCom/Common/Common.h"
|
||||
#include "../../Common/DocxFormat/Source/DocxFormat/FileTypes.h"
|
||||
|
||||
namespace Writers
|
||||
{
|
||||
@ -50,21 +51,28 @@ namespace Writers
|
||||
std::wstring m_sComment;
|
||||
std::wstring m_sCommentExt;
|
||||
std::wstring m_sPeople;
|
||||
std::wstring m_sDocumentComment;
|
||||
std::wstring m_sDocumentCommentExt;
|
||||
std::wstring m_sDocumentPeople;
|
||||
|
||||
CommentsWriter(std::wstring sDir) : m_sDir(sDir)
|
||||
{
|
||||
}
|
||||
void setElements(std::wstring& sComment, std::wstring& sCommentExt, std::wstring& sPeople)
|
||||
void setElements(std::wstring& sComment, std::wstring& sCommentExt, std::wstring& sPeople, std::wstring& sDocumentComment, std::wstring& sDocumentCommentExt, std::wstring& sDocumentPeople)
|
||||
{
|
||||
m_sComment = sComment;
|
||||
m_sCommentExt = sCommentExt;
|
||||
m_sPeople = sPeople;
|
||||
m_sDocumentComment = sDocumentComment;
|
||||
m_sDocumentCommentExt = sDocumentCommentExt;
|
||||
m_sDocumentPeople = sDocumentPeople;
|
||||
}
|
||||
void Write()
|
||||
{
|
||||
std::wstring sDir = m_sDir + FILE_SEPARATOR_STR + _T("word") + FILE_SEPARATOR_STR;
|
||||
if(false == m_sComment.empty())
|
||||
{
|
||||
OOX::CPath filePath = m_sDir + FILE_SEPARATOR_STR + _T("word") + FILE_SEPARATOR_STR + _T("comments.xml");
|
||||
OOX::CPath filePath = sDir + OOX::FileTypes::Comments.DefaultFileName().GetPath();
|
||||
|
||||
NSFile::CFileBinary oFile;
|
||||
oFile.CreateFileW(filePath.GetPath());
|
||||
@ -76,7 +84,7 @@ namespace Writers
|
||||
if(false == m_sCommentExt.empty())
|
||||
{
|
||||
NSFile::CFileBinary oFile;
|
||||
oFile.CreateFileW(m_sDir + FILE_SEPARATOR_STR + _T("word") + FILE_SEPARATOR_STR + _T("commentsExtended.xml"));
|
||||
oFile.CreateFileW(sDir + OOX::FileTypes::CommentsExt.DefaultFileName().GetPath());
|
||||
oFile.WriteStringUTF8(g_string_commentExt_Start);
|
||||
oFile.WriteStringUTF8(m_sCommentExt);
|
||||
oFile.WriteStringUTF8(g_string_commentExt_End);
|
||||
@ -85,12 +93,43 @@ namespace Writers
|
||||
if(false == m_sPeople.empty())
|
||||
{
|
||||
NSFile::CFileBinary oFile;
|
||||
oFile.CreateFileW(m_sDir + FILE_SEPARATOR_STR + _T("word") + FILE_SEPARATOR_STR + _T("people.xml"));
|
||||
oFile.CreateFileW(sDir + OOX::FileTypes::People.DefaultFileName().GetPath());
|
||||
oFile.WriteStringUTF8(g_string_people_Start);
|
||||
oFile.WriteStringUTF8(m_sPeople);
|
||||
oFile.WriteStringUTF8(g_string_people_End);
|
||||
oFile.CloseFile();
|
||||
}
|
||||
|
||||
if(false == m_sDocumentComment.empty())
|
||||
{
|
||||
OOX::CPath filePath = sDir + OOX::FileTypes::DocumentComments.DefaultFileName().GetPath();
|
||||
|
||||
NSFile::CFileBinary oFile;
|
||||
oFile.CreateFileW(filePath.GetPath());
|
||||
oFile.WriteStringUTF8(g_string_comment_Start);
|
||||
oFile.WriteStringUTF8(m_sDocumentComment);
|
||||
oFile.WriteStringUTF8(g_string_comment_End);
|
||||
oFile.CloseFile();
|
||||
}
|
||||
if(false == m_sDocumentCommentExt.empty())
|
||||
{
|
||||
NSFile::CFileBinary oFile;
|
||||
oFile.CreateFileW(sDir + OOX::FileTypes::DocumentCommentsExt.DefaultFileName().GetPath());
|
||||
oFile.WriteStringUTF8(g_string_commentExt_Start);
|
||||
oFile.WriteStringUTF8(m_sDocumentCommentExt);
|
||||
oFile.WriteStringUTF8(g_string_commentExt_End);
|
||||
oFile.CloseFile();
|
||||
}
|
||||
if(false == m_sDocumentPeople.empty())
|
||||
{
|
||||
NSFile::CFileBinary oFile;
|
||||
oFile.CreateFileW(sDir + OOX::FileTypes::DocumentPeople.DefaultFileName().GetPath());
|
||||
oFile.WriteStringUTF8(g_string_people_Start);
|
||||
oFile.WriteStringUTF8(m_sDocumentPeople);
|
||||
oFile.WriteStringUTF8(g_string_people_End);
|
||||
oFile.CloseFile();
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -3486,6 +3486,16 @@ public:
|
||||
READ1_DEF(length, res, this->ReadEndnotePr, &oEdnProps);
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(oEdnProps.toXML());
|
||||
}
|
||||
else if( c_oSer_SettingsType::DecimalSymbol == type )
|
||||
{
|
||||
std::wstring sDecimalSymbol = m_oBufferedStream.GetString3(length);
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<w:decimalSymbol w:val=\"" + XmlUtils::EncodeXmlString(sDecimalSymbol) + L"\"/>");
|
||||
}
|
||||
else if( c_oSer_SettingsType::ListSeparator == type )
|
||||
{
|
||||
std::wstring sListSeparator = m_oBufferedStream.GetString3(length);
|
||||
m_oFileWriter.m_oSettingWriter.AddSetting(L"<w:listSeparator w:val=\"" + XmlUtils::EncodeXmlString(sListSeparator) + L"\"/>");
|
||||
}
|
||||
else if( c_oSer_SettingsType::SdtGlobalColor == type )
|
||||
{
|
||||
rPr oRPr(m_oFileWriter.m_oFontTableWriter.m_mapFonts);
|
||||
@ -8703,6 +8713,7 @@ public:
|
||||
long nSettingsOffset = -1;
|
||||
long nDocumentOffset = -1;
|
||||
long nCommentsOffset = -1;
|
||||
long nDocumentCommentsOffset = -1;
|
||||
|
||||
std::vector<BYTE> aTypes;
|
||||
std::vector<long> aOffBits;
|
||||
@ -8737,6 +8748,10 @@ public:
|
||||
{
|
||||
nCommentsOffset = mtiOffBits;
|
||||
}
|
||||
else if(c_oSerTableTypes::DocumentComments == mtiType)
|
||||
{
|
||||
nDocumentCommentsOffset = mtiOffBits;
|
||||
}
|
||||
else
|
||||
{
|
||||
aTypes.push_back(mtiType);
|
||||
@ -8786,6 +8801,15 @@ public:
|
||||
if(c_oSerConstants::ReadOk != res)
|
||||
return res;
|
||||
}
|
||||
Binary_CommentsTableReader oBinary_DocumentCommentsTableReader(m_oBufferedStream, m_oFileWriter);
|
||||
if(-1 != nDocumentCommentsOffset)
|
||||
{
|
||||
int nOldPos = m_oBufferedStream.GetPos();
|
||||
m_oBufferedStream.Seek(nDocumentCommentsOffset);
|
||||
res = oBinary_DocumentCommentsTableReader.Read();
|
||||
if(c_oSerConstants::ReadOk != res)
|
||||
return res;
|
||||
}
|
||||
|
||||
for(size_t i = 0; i < aTypes.size(); ++i)
|
||||
{
|
||||
@ -8936,6 +8960,7 @@ public:
|
||||
+ FILE_SEPARATOR_STR + L"_rels"
|
||||
+ FILE_SEPARATOR_STR + L"document.xml.rels";
|
||||
|
||||
//comments
|
||||
CComments& oComments= oBinary_CommentsTableReader.m_oComments;
|
||||
Writers::CommentsWriter& oCommentsWriter = m_oFileWriter.m_oCommentsWriter;
|
||||
|
||||
@ -8943,25 +8968,47 @@ public:
|
||||
std::wstring sContentEx = oComments.writeContentExt(); //важно чтобы writeContentExt вызывался после writeContent
|
||||
std::wstring sPeople = oComments.writePeople();
|
||||
|
||||
oCommentsWriter.setElements(sContent, sContentEx, sPeople);
|
||||
std::wstring sDocumentContent = oBinary_DocumentCommentsTableReader.m_oComments.writeContent();
|
||||
std::wstring sDocumentContentEx = oBinary_DocumentCommentsTableReader.m_oComments.writeContentExt(); //важно чтобы writeContentExt вызывался после writeContent
|
||||
std::wstring sDocumentPeople = oBinary_DocumentCommentsTableReader.m_oComments.writePeople();
|
||||
|
||||
oCommentsWriter.setElements(sContent, sContentEx, sPeople, sDocumentContent, sDocumentContentEx, sDocumentPeople);
|
||||
|
||||
if(false == oCommentsWriter.m_sComment.empty())
|
||||
{
|
||||
unsigned int rId;
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments", L"comments.xml", std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(L"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml", L"/word", L"comments.xml");
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(OOX::FileTypes::Comments.RelationType(), OOX::FileTypes::Comments.DefaultFileName().GetPath(), std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(OOX::FileTypes::Comments.OverrideType(), L"/word", OOX::FileTypes::Comments.DefaultFileName().GetPath());
|
||||
}
|
||||
if(false == oCommentsWriter.m_sCommentExt.empty())
|
||||
{
|
||||
unsigned int rId;
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(L"http://schemas.microsoft.com/office/2011/relationships/commentsExtended", L"commentsExtended.xml", std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(L"application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml", L"/word", L"commentsExtended.xml");
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(OOX::FileTypes::CommentsExt.RelationType(), OOX::FileTypes::CommentsExt.DefaultFileName().GetPath(), std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(OOX::FileTypes::CommentsExt.OverrideType(), L"/word", OOX::FileTypes::CommentsExt.DefaultFileName().GetPath());
|
||||
}
|
||||
if(false == oCommentsWriter.m_sPeople.empty())
|
||||
{
|
||||
unsigned int rId;
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(L"http://schemas.microsoft.com/office/2011/relationships/people", L"people.xml", std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(L"application/vnd.openxmlformats-officedocument.wordprocessingml.people+xml", L"/word", L"people.xml");
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(OOX::FileTypes::People.RelationType(), OOX::FileTypes::People.DefaultFileName().GetPath(), std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(OOX::FileTypes::People.OverrideType(), L"/word", OOX::FileTypes::People.DefaultFileName().GetPath());
|
||||
}
|
||||
if(false == oCommentsWriter.m_sDocumentComment.empty())
|
||||
{
|
||||
unsigned int rId;
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(OOX::FileTypes::DocumentComments.RelationType(), OOX::FileTypes::DocumentComments.DefaultFileName().GetPath(), std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(OOX::FileTypes::DocumentComments.OverrideType(), L"/word", OOX::FileTypes::DocumentComments.DefaultFileName().GetPath());
|
||||
}
|
||||
if(false == oCommentsWriter.m_sDocumentCommentExt.empty())
|
||||
{
|
||||
unsigned int rId;
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(OOX::FileTypes::DocumentCommentsExt.RelationType(), OOX::FileTypes::DocumentCommentsExt.DefaultFileName().GetPath(), std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(OOX::FileTypes::DocumentCommentsExt.OverrideType(), L"/word", OOX::FileTypes::DocumentCommentsExt.DefaultFileName().GetPath());
|
||||
}
|
||||
if(false == oCommentsWriter.m_sDocumentPeople.empty())
|
||||
{
|
||||
unsigned int rId;
|
||||
m_oFileWriter.m_pDrawingConverter->WriteRels(OOX::FileTypes::DocumentPeople.RelationType(), OOX::FileTypes::DocumentPeople.DefaultFileName().GetPath(), std::wstring(), &rId);
|
||||
m_oFileWriter.m_pDrawingConverter->Registration(OOX::FileTypes::DocumentPeople.OverrideType(), L"/word", OOX::FileTypes::DocumentPeople.DefaultFileName().GetPath());
|
||||
}
|
||||
|
||||
m_oFileWriter.m_pDrawingConverter->SaveDstContentRels(fileRelsPath.GetPath());
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
namespace Writers
|
||||
{
|
||||
static std::wstring g_string_set_Start = _T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?><w:settings xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:v=\"urn:schemas-microsoft-com:vml\">");
|
||||
static std::wstring g_string_set_Default = _T("<w:zoom w:percent=\"100\"/><w:characterSpacingControl w:val=\"doNotCompress\"/><w:compat><w:compatSetting w:name=\"compatibilityMode\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"15\"/><w:compatSetting w:name=\"overrideTableStyleFontSizeAndJustification\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/><w:compatSetting w:name=\"enableOpenTypeFeatures\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/><w:compatSetting w:name=\"doNotFlipMirrorIndents\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/></w:compat><w:themeFontLang w:val=\"en-US\" w:eastAsia=\"zh-CN\"/><w:shapeDefaults><o:shapedefaults v:ext=\"edit\" spidmax=\"1026\"/><o:shapelayout v:ext=\"edit\"><o:idmap v:ext=\"edit\" data=\"1\"/></o:shapelayout></w:shapeDefaults><w:decimalSymbol w:val=\".\"/><w:listSeparator w:val=\",\"/>");
|
||||
static std::wstring g_string_set_Default = _T("<w:zoom w:percent=\"100\"/><w:characterSpacingControl w:val=\"doNotCompress\"/><w:compat><w:compatSetting w:name=\"compatibilityMode\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"15\"/><w:compatSetting w:name=\"overrideTableStyleFontSizeAndJustification\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/><w:compatSetting w:name=\"enableOpenTypeFeatures\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/><w:compatSetting w:name=\"doNotFlipMirrorIndents\" w:uri=\"http://schemas.microsoft.com/office/word\" w:val=\"1\"/></w:compat><w:themeFontLang w:val=\"en-US\" w:eastAsia=\"zh-CN\"/><w:shapeDefaults><o:shapedefaults v:ext=\"edit\" spidmax=\"1026\"/><o:shapelayout v:ext=\"edit\"><o:idmap v:ext=\"edit\" data=\"1\"/></o:shapelayout></w:shapeDefaults>");
|
||||
static std::wstring g_string_set_End = _T("</w:settings>");
|
||||
|
||||
class SettingWriter
|
||||
|
||||
@ -146,7 +146,8 @@ extern int g_nCurFormatVersion;
|
||||
Background = 12,
|
||||
VbaProject = 13,
|
||||
App = 15,
|
||||
Core = 16
|
||||
Core = 16,
|
||||
DocumentComments = 17
|
||||
};}
|
||||
namespace c_oSerSigTypes{enum c_oSerSigTypes
|
||||
{
|
||||
@ -809,7 +810,9 @@ extern int g_nCurFormatVersion;
|
||||
SdtGlobalColor = 6,
|
||||
SdtGlobalShowHighlight = 7,
|
||||
Compat = 8,
|
||||
DefaultTabStopTwips = 9
|
||||
DefaultTabStopTwips = 9,
|
||||
DecimalSymbol = 10,
|
||||
ListSeparator = 11
|
||||
};}
|
||||
namespace c_oSer_MathPrType{enum c_oSer_SettingsType
|
||||
{
|
||||
|
||||
@ -7535,6 +7535,18 @@ namespace BinDocxRW
|
||||
WriteCompat(oSettings.m_oCompat.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oSettings.m_oDecimalSymbol.IsInit() && oSettings.m_oDecimalSymbol->m_sVal.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSer_SettingsType::DecimalSymbol);
|
||||
m_oBcw.m_oStream.WriteStringW3(oSettings.m_oDecimalSymbol->m_sVal.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oSettings.m_oListSeparator.IsInit() && oSettings.m_oListSeparator->m_sVal.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSer_SettingsType::ListSeparator);
|
||||
m_oBcw.m_oStream.WriteStringW3(oSettings.m_oListSeparator->m_sVal.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oSettingsCustom.m_oSdtGlobalColor.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSer_SettingsType::SdtGlobalColor);
|
||||
@ -8081,6 +8093,13 @@ namespace BinDocxRW
|
||||
oBinaryCommentsTableWriter.Write(*oDocx.m_pComments, oDocx.m_pCommentsExt, oDocx.m_pPeople, m_oParamsWriter.m_mapIgnoreComments);
|
||||
this->WriteTableEnd(nCurPos);
|
||||
}
|
||||
if(NULL != oDocx.m_pDocumentComments)
|
||||
{
|
||||
BinDocxRW::BinaryCommentsTableWriter oBinaryCommentsTableWriter(m_oParamsWriter);
|
||||
int nCurPos = this->WriteTableStart(BinDocxRW::c_oSerTableTypes::DocumentComments);
|
||||
oBinaryCommentsTableWriter.Write(*oDocx.m_pDocumentComments, oDocx.m_pDocumentCommentsExt, oDocx.m_pDocumentPeople, m_oParamsWriter.m_mapIgnoreComments);
|
||||
this->WriteTableEnd(nCurPos);
|
||||
}
|
||||
|
||||
//Write StyleTable
|
||||
BinDocxRW::BinaryStyleTableWriter oBinaryStyleTableWriter(m_oParamsWriter);
|
||||
|
||||
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1010"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "17C1FE921ACC42C4006B99B3"
|
||||
BuildableName = "libASCOfficeDocxFile2Lib_ios.a"
|
||||
BlueprintName = "ASCOfficeDocxFile2Lib"
|
||||
ReferencedContainer = "container:ASCOfficeDocxFile2Lib.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "17C1FE921ACC42C4006B99B3"
|
||||
BuildableName = "libASCOfficeDocxFile2Lib_ios.a"
|
||||
BlueprintName = "ASCOfficeDocxFile2Lib"
|
||||
ReferencedContainer = "container:ASCOfficeDocxFile2Lib.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "17C1FE921ACC42C4006B99B3"
|
||||
BuildableName = "libASCOfficeDocxFile2Lib_ios.a"
|
||||
BlueprintName = "ASCOfficeDocxFile2Lib"
|
||||
ReferencedContainer = "container:ASCOfficeDocxFile2Lib.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@ -852,9 +852,12 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
std::wstring StyleDisplayName(const std::wstring & Name, odf_types::style_family::type Type)
|
||||
std::wstring StyleDisplayName(const std::wstring & Name, const std::wstring & DisplayName, odf_types::style_family::type Type)
|
||||
{
|
||||
if (!Name.empty())
|
||||
if (!DisplayName.empty())
|
||||
return DisplayName;
|
||||
|
||||
if (!Name.empty())
|
||||
return Name;
|
||||
else
|
||||
{
|
||||
@ -930,8 +933,8 @@ mc:Ignorable=\"w14 wp14\">";
|
||||
|
||||
for (size_t i = 0; i < numIds.size(); i++)
|
||||
{
|
||||
strm << L"<w:num w:numId=\"" << numIds[i] << L"\" >";
|
||||
strm << L"<w:abstractNumId w:val=\"" << numIds[i] << "\" />";
|
||||
strm << L"<w:num w:numId=\"" << numIds[i] << L"\">";
|
||||
strm << L"<w:abstractNumId w:val=\"" << numIds[i] << "\"/>";
|
||||
strm << L"</w:num>";
|
||||
}
|
||||
|
||||
@ -957,19 +960,19 @@ void docx_conversion_context::process_fonts()
|
||||
if (!arFonts[i]) continue;
|
||||
if (arFonts[i]->name().empty()) continue;
|
||||
|
||||
strm << L"<w:font w:name=\"" << arFonts[i]->name() << L"\" >";
|
||||
strm << L"<w:font w:name=\"" << arFonts[i]->name() << L"\">";
|
||||
|
||||
if (!arFonts[i]->charset().empty())
|
||||
strm << L"<w:charset w:val=\"" << arFonts[i]->charset() <<"\" />";
|
||||
strm << L"<w:charset w:val=\"" << arFonts[i]->charset() <<"\"/>";
|
||||
|
||||
if (!arFonts[i]->family().empty())
|
||||
strm << L"<w:family w:val=\"" << arFonts[i]->family() << "\" />";
|
||||
strm << L"<w:family w:val=\"" << arFonts[i]->family() << "\"/>";
|
||||
|
||||
if (!arFonts[i]->pitch().empty())
|
||||
strm << L"<w:pitch w:val=\"" << arFonts[i]->pitch() << "\" />";
|
||||
strm << L"<w:pitch w:val=\"" << arFonts[i]->pitch() << "\"/>";
|
||||
|
||||
if (!arFonts[i]->alt_name().empty())
|
||||
strm << L"<w:altName w:val=\"" << arFonts[i]->alt_name() << "\" />";
|
||||
strm << L"<w:altName w:val=\"" << arFonts[i]->alt_name() << "\"/>";
|
||||
|
||||
strm << L"</w:font>";
|
||||
}
|
||||
@ -992,7 +995,7 @@ void docx_conversion_context::process_styles()
|
||||
_Wostream << L"xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" ";
|
||||
_Wostream << L"xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" ";
|
||||
_Wostream << L"xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\" ";
|
||||
_Wostream << L"mc:Ignorable=\"w14\"> ";
|
||||
_Wostream << L"mc:Ignorable=\"w14\">";
|
||||
|
||||
if (odf_reader::odf_document * doc = root())
|
||||
{
|
||||
@ -1062,30 +1065,34 @@ void docx_conversion_context::process_styles()
|
||||
}
|
||||
_Wostream << L">";
|
||||
|
||||
const std::wstring displayName = StyleDisplayName(arStyles[i]->name(), arStyles[i]->type());
|
||||
const std::wstring displayName = StyleDisplayName(arStyles[i]->name(), arStyles[i]->display_name(), arStyles[i]->type());
|
||||
|
||||
_Wostream << L"<w:name w:val=\"" << displayName << L"\" />";
|
||||
_Wostream << L"<w:name w:val=\"" << displayName << L"\"/>";
|
||||
|
||||
if (odf_reader::style_instance * baseOn = arStyles[i]->parent())
|
||||
{
|
||||
const std::wstring basedOnId = styles_map_.get(baseOn->name(), baseOn->type());
|
||||
_Wostream << L"<w:basedOn w:val=\"" << basedOnId << "\" />";
|
||||
_Wostream << L"<w:basedOn w:val=\"" << basedOnId << "\"/>";
|
||||
}
|
||||
else if (!arStyles[i]->is_default() && styles_map_.check(L"", arStyles[i]->type()))
|
||||
{
|
||||
const std::wstring basedOnId = styles_map_.get(L"", arStyles[i]->type());
|
||||
_Wostream << L"<w:basedOn w:val=\"" << basedOnId << "\" />";
|
||||
_Wostream << L"<w:basedOn w:val=\"" << basedOnId << "\"/>";
|
||||
}
|
||||
else
|
||||
{
|
||||
_Wostream << L"<w:qFormat/>";
|
||||
}
|
||||
|
||||
if (odf_reader::style_instance * next = arStyles[i]->next())
|
||||
{
|
||||
const std::wstring nextId = styles_map_.get(next->name(), next->type());
|
||||
_Wostream << L"<w:next w:val=\"" << nextId << "\" />";
|
||||
_Wostream << L"<w:next w:val=\"" << nextId << "\"/>";
|
||||
}
|
||||
else if (arStyles[i]->is_default())
|
||||
{
|
||||
// self
|
||||
_Wostream << L"<w:next w:val=\"" << id << "\" />";
|
||||
_Wostream << L"<w:next w:val=\"" << id << "\"/>";
|
||||
}
|
||||
|
||||
if (odf_reader::style_content * content = arStyles[i]->content())
|
||||
@ -1555,7 +1562,8 @@ int docx_conversion_context::process_paragraph_attr(odf_reader::text::paragraph_
|
||||
)
|
||||
{
|
||||
process_page_break_after(styleInst);
|
||||
if (styleInst->is_automatic())
|
||||
|
||||
if (styleInst->is_automatic())
|
||||
{
|
||||
if (odf_reader::style_content * styleContent = styleInst->content())
|
||||
{
|
||||
@ -1593,9 +1601,13 @@ int docx_conversion_context::process_paragraph_attr(odf_reader::text::paragraph_
|
||||
}
|
||||
}
|
||||
set_margin_left(properties.fo_margin_left_? 20.0 * properties.fo_margin_left_->get_length().get_value_unit(odf_types::length::pt) : 0);
|
||||
|
||||
|
||||
styleContent->docx_convert(*this);
|
||||
|
||||
if ((Attr->outline_level_) && (*Attr->outline_level_ > 0))
|
||||
{
|
||||
std::wstringstream & _pPr = get_styles_context().paragraph_nodes();
|
||||
_pPr << L"<w:outlineLvl w:val=\"" << *Attr->outline_level_ - 1 << L"\"/>";
|
||||
}
|
||||
end_automatic_style();
|
||||
|
||||
push_text_properties(styleContent->get_style_text_properties());
|
||||
@ -1632,12 +1644,6 @@ int docx_conversion_context::process_paragraph_attr(odf_reader::text::paragraph_
|
||||
output_stream() << L"</w:pPr>";
|
||||
}
|
||||
}
|
||||
else if ((Attr->outline_level_) && (*Attr->outline_level_ > 0))
|
||||
{
|
||||
output_stream() << L"<w:pPr>";
|
||||
output_stream() << L"<w:outlineLvl w:val=\"" << *Attr->outline_level_ - 1 << L"\"/>";
|
||||
output_stream() << L"</w:pPr>";
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,16 +123,17 @@ public:
|
||||
|
||||
if (sExt == L"wmv") return typeVideo;
|
||||
if (sExt == L"avi") return typeVideo;
|
||||
if (sExt == L"wmv") return typeVideo;
|
||||
if (sExt == L"wma") return typeAudio;
|
||||
if (sExt == L"wav") return typeAudio;
|
||||
|
||||
if (sExt == L"mp3") return typeAudio;
|
||||
if (sExt == L"m4a") return typeAudio;
|
||||
if (sExt == L"m4v") return typeVideo;
|
||||
if (sExt == L"mp4") return typeVideo;
|
||||
if (sExt == L"mov") return typeVideo;
|
||||
if (sExt == L"mkv") return typeVideo;
|
||||
if (sExt == L"webm") return typeVideo;
|
||||
|
||||
if (sExt == L"wmv") return typeVideo;
|
||||
if (sExt == L"wma") return typeAudio;
|
||||
if (sExt == L"wav") return typeAudio;
|
||||
if (sExt == L"mp3") return typeAudio;
|
||||
if (sExt == L"m4a") return typeAudio;
|
||||
|
||||
return typeMedia;
|
||||
}
|
||||
|
||||
@ -375,10 +375,9 @@ void _oox_drawing::serialize_bodyPr(std::wostream & strm, const std::wstring & n
|
||||
{
|
||||
CP_XML_NODE(L"a:spAutoFit");
|
||||
}
|
||||
else if ((bFitToSize) && (*bFitToSize))
|
||||
if ((bFitToSize) && (*bFitToSize))
|
||||
{
|
||||
CP_XML_NODE(L"a:noAutofit");
|
||||
//CP_XML_NODE(L"a:spAutoFit")
|
||||
CP_XML_NODE(L"a:normAutofit");
|
||||
//{
|
||||
// CP_XML_ATTR(L"lnSpcReduction", 10000);
|
||||
//}
|
||||
|
||||
@ -145,8 +145,11 @@ void draw_frame::pptx_convert(oox::pptx_conversion_context & Context)
|
||||
{
|
||||
style_instance * defaultStyle = Context.root()->odf_context().styleContainer().style_default_by_type(odf_types::style_family::Presentation);
|
||||
if (defaultStyle)instances.push_back(defaultStyle);
|
||||
|
||||
instances.push_back(baseStyleInst);
|
||||
instances.push_back(baseStyleInst);
|
||||
}
|
||||
else if (common_presentation_attlist_.presentation_class_)
|
||||
{
|
||||
instances.push_back(baseStyleInst);
|
||||
}
|
||||
if (grStyleInst)//обычная векторная фигура
|
||||
{
|
||||
|
||||
@ -57,6 +57,7 @@ namespace odf_reader {
|
||||
style_instance::style_instance(
|
||||
styles_container *Container,
|
||||
const std::wstring &Name,
|
||||
const std::wstring &DisplayName,
|
||||
style_family::type Type,
|
||||
style_content *Content,
|
||||
bool IsAutomatic,
|
||||
@ -68,6 +69,7 @@ style_instance::style_instance(
|
||||
) :
|
||||
container_ (Container),
|
||||
name_ (Name),
|
||||
display_name_ (DisplayName),
|
||||
style_type_ (Type),
|
||||
content_ (Content),
|
||||
is_automatic_ (IsAutomatic),
|
||||
@ -110,7 +112,7 @@ void styles_container::add_style( const std::wstring & Name,
|
||||
{
|
||||
ParentStyleName = L"";//иначе в коде возможно зацикливание.
|
||||
}
|
||||
style_instance_ptr newStyle = style_instance_ptr( new style_instance(this, Name, Type, Content, IsAutomatic, IsDefault,
|
||||
style_instance_ptr newStyle = style_instance_ptr( new style_instance(this, Name, DisplayName, Type, Content, IsAutomatic, IsDefault,
|
||||
ParentStyleName, NextStyleName, DataStyleName, StyleClass));
|
||||
|
||||
instances_.push_back(newStyle);
|
||||
@ -143,7 +145,10 @@ const std::wstring & style_instance::name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
const std::wstring & style_instance::display_name() const
|
||||
{
|
||||
return display_name_;
|
||||
}
|
||||
style_family::type style_instance::type() const
|
||||
{
|
||||
return style_type_;
|
||||
|
||||
@ -61,6 +61,7 @@ public:
|
||||
style_instance(
|
||||
styles_container * Container,
|
||||
const std::wstring & Name,
|
||||
const std::wstring & DisplayName,
|
||||
odf_types::style_family::type Type,
|
||||
style_content * Content,
|
||||
bool IsAutomatic,
|
||||
@ -71,8 +72,8 @@ public:
|
||||
const std::wstring & StyleClass
|
||||
);
|
||||
|
||||
|
||||
const std::wstring & name() const;
|
||||
const std::wstring & display_name()const;
|
||||
const std::wstring & name() const;
|
||||
odf_types::style_family::type type() const;
|
||||
style_content * content() const;
|
||||
style_instance * parent() const;
|
||||
@ -88,7 +89,10 @@ public:
|
||||
|
||||
private:
|
||||
styles_container * container_;
|
||||
|
||||
std::wstring name_;
|
||||
std::wstring display_name_;
|
||||
|
||||
odf_types::style_family::type style_type_;
|
||||
style_content * content_;
|
||||
|
||||
|
||||
@ -55,6 +55,8 @@ void graphic_format_properties::add_attributes( const xml::attributes_wc_ptr & A
|
||||
CP_APPLY_ATTR(L"draw:auto-grow-width", draw_auto_grow_width_);
|
||||
CP_APPLY_ATTR(L"draw:fit-to-size", draw_fit_to_size_);
|
||||
CP_APPLY_ATTR(L"draw:fit-to-contour", draw_fit_to_contour_);
|
||||
CP_APPLY_ATTR(L"style:shrink-to-fit", style_shrink_to_fit_);
|
||||
CP_APPLY_ATTR(L"draw:fit-to-size", draw_fit_to_size_str_);
|
||||
|
||||
CP_APPLY_ATTR(L"draw:stroke", draw_stroke_);
|
||||
CP_APPLY_ATTR(L"draw:stroke-dash", draw_stroke_dash_);
|
||||
@ -99,7 +101,12 @@ void graphic_format_properties::add_attributes( const xml::attributes_wc_ptr & A
|
||||
common_padding_attlist_.add_attributes(Attributes);
|
||||
common_shadow_attlist_.add_attributes(Attributes);
|
||||
common_background_color_attlist_.add_attributes(Attributes);
|
||||
|
||||
|
||||
if (draw_fit_to_size_str_ && !style_shrink_to_fit_)
|
||||
{//https://bugs.documentfoundation.org/show_bug.cgi?id=97630
|
||||
if (*draw_fit_to_size_str_ == L"shrink-to-fit")
|
||||
style_shrink_to_fit_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
void graphic_format_properties::apply_to(std::vector<_property> & properties)
|
||||
@ -134,8 +141,10 @@ void graphic_format_properties::apply_to(std::vector<_property> & properties)
|
||||
|
||||
if (draw_auto_grow_height_) properties.push_back(_property(L"auto-grow-height", *draw_auto_grow_height_));
|
||||
if (draw_auto_grow_width_) properties.push_back(_property(L"auto-grow-width", *draw_auto_grow_width_));
|
||||
if (draw_fit_to_size_) properties.push_back(_property(L"fit-to-size", *draw_fit_to_size_));
|
||||
if (draw_fit_to_contour_) properties.push_back(_property(L"fit-to-contour", *draw_fit_to_contour_));
|
||||
|
||||
if (style_shrink_to_fit_) properties.push_back(_property(L"fit-to-size", true));
|
||||
else if (draw_fit_to_size_) properties.push_back(_property(L"fit-to-size", *draw_fit_to_size_));
|
||||
|
||||
if (common_draw_fill_attlist_.draw_color_mode_)
|
||||
{
|
||||
@ -183,6 +192,7 @@ void graphic_format_properties::apply_from(const graphic_format_properties * Oth
|
||||
_CP_APPLY_PROP3(draw_auto_grow_width_);
|
||||
_CP_APPLY_PROP3(draw_fit_to_size_);
|
||||
_CP_APPLY_PROP3(draw_fit_to_contour_);
|
||||
_CP_APPLY_PROP3(style_shrink_to_fit_);
|
||||
|
||||
_CP_APPLY_PROP3(svg_stroke_color_);
|
||||
_CP_APPLY_PROP3(svg_stroke_width_);
|
||||
|
||||
@ -94,7 +94,9 @@ public:
|
||||
_CP_OPT(bool) draw_auto_grow_height_;
|
||||
_CP_OPT(bool) draw_auto_grow_width_;
|
||||
|
||||
_CP_OPT(bool) draw_fit_to_size_;
|
||||
_CP_OPT(bool) style_shrink_to_fit_;
|
||||
_CP_OPT(std::wstring) draw_fit_to_size_str_;
|
||||
_CP_OPT(bool) draw_fit_to_size_; // draw:fit-to-size="shrink-to-fit" style:shrink-to-fit="true" - cebre_1.odp
|
||||
_CP_OPT(bool) draw_fit_to_contour_;
|
||||
_CP_OPT(std::wstring) draw_wrap_influence_on_position_;
|
||||
|
||||
|
||||
@ -65,18 +65,28 @@ HRESULT convert_single(std::wstring srcFileName)
|
||||
|
||||
std::wstring dstPath = srcFileName;// + ....
|
||||
|
||||
bool bTemplate = false;
|
||||
|
||||
std::wstring type;
|
||||
switch(fileChecker.nFileType)
|
||||
{
|
||||
case AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCX:
|
||||
case AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCM: dstPath += L"-my.odt"; type = L"text"; break;
|
||||
|
||||
case AVS_OFFICESTUDIO_FILE_DOCUMENT_DOTX:
|
||||
case AVS_OFFICESTUDIO_FILE_DOCUMENT_DOTM: dstPath += L"-my.ott"; type = L"text"; bTemplate = true; break;
|
||||
|
||||
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX:
|
||||
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSM: dstPath += L"-my.ods"; type = L"spreadsheet"; break;
|
||||
|
||||
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLTX:
|
||||
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLTM: dstPath += L"-my.ots"; type = L"spreadsheet"; bTemplate = true; break;
|
||||
|
||||
case AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX:
|
||||
case AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTM: dstPath += L"-my.odp"; type = L"presentation"; break;
|
||||
|
||||
case AVS_OFFICESTUDIO_FILE_PRESENTATION_POTX:
|
||||
case AVS_OFFICESTUDIO_FILE_PRESENTATION_POTM: dstPath += L"-my.otp"; type = L"presentation"; bTemplate = true; break;
|
||||
default:
|
||||
return S_FALSE;
|
||||
}
|
||||
@ -94,7 +104,7 @@ HRESULT convert_single(std::wstring srcFileName)
|
||||
if (S_OK != oCOfficeUtils.ExtractToDirectory(srcFileName.c_str(), srcTempPath.c_str(), NULL, 0))
|
||||
return S_FALSE;
|
||||
|
||||
Oox2Odf::Converter converter(srcTempPath, type, L"C:\\Windows\\Fonts", NULL);
|
||||
Oox2Odf::Converter converter(srcTempPath, type, L"C:\\Windows\\Fonts", bTemplate);
|
||||
|
||||
std::wstring sPassword;// = L"password";
|
||||
|
||||
|
||||
@ -123,9 +123,9 @@ namespace odf_writer
|
||||
rels_.add(r.relationships_[i]);
|
||||
}
|
||||
}
|
||||
manifect_file::manifect_file(std::wstring t)
|
||||
manifect_file::manifect_file(const std::wstring & type)
|
||||
{
|
||||
type_ = t;
|
||||
type_ = type;
|
||||
}
|
||||
binary_file::binary_file(const std::wstring &file_name, const std::string &value)
|
||||
{
|
||||
@ -137,9 +137,9 @@ namespace odf_writer
|
||||
simple_element elm(file_name_, value_);
|
||||
elm.write(RootPath, false);
|
||||
}
|
||||
mimetype_file::mimetype_file(std::wstring t)
|
||||
mimetype_file::mimetype_file(const std::wstring & type)
|
||||
{
|
||||
type_ = t;
|
||||
type_ = type;
|
||||
}
|
||||
void mimetype_file::write(const std::wstring & RootPath, bool add_padding)
|
||||
{
|
||||
@ -316,11 +316,17 @@ namespace odf_writer
|
||||
set_rels(rels_);
|
||||
}
|
||||
|
||||
odf_document::odf_document(std::wstring type)
|
||||
odf_document::odf_document(std::wstring type, bool bTemplate)
|
||||
{
|
||||
manifest_ = element_ptr(new manifect_file(type));
|
||||
mimetype_ = element_ptr(new mimetype_file(type));
|
||||
manifest_ = element_ptr(new manifect_file(type + (bTemplate ? L"-template" : L"")));
|
||||
mimetype_ = element_ptr(new mimetype_file(type + (bTemplate ? L"-template" : L"")));
|
||||
}
|
||||
|
||||
std::wstring odf_document::get_type()
|
||||
{
|
||||
return dynamic_cast<manifect_file*>(manifest_.get())->get_type();
|
||||
}
|
||||
|
||||
void odf_document::write_manifest(const std::wstring & RootPath)
|
||||
{
|
||||
if (mimetype_)
|
||||
|
||||
@ -91,8 +91,6 @@ namespace odf_writer
|
||||
|
||||
virtual void write(const std::wstring & RootPath, bool add_padding = false) = 0;
|
||||
std::wstring local_path;
|
||||
private:
|
||||
element * element_;
|
||||
};
|
||||
|
||||
inline element::~element()
|
||||
@ -151,11 +149,13 @@ namespace odf_writer
|
||||
class manifect_file : public element
|
||||
{
|
||||
public:
|
||||
manifect_file(std::wstring type);
|
||||
manifect_file(const std::wstring & type);
|
||||
|
||||
virtual void write(const std::wstring & RootPath, bool add_padding = false);
|
||||
void add_rels(rels & r);
|
||||
|
||||
std::wstring get_type() {return type_;}
|
||||
|
||||
rels *get_rels() {return &rels_;}
|
||||
|
||||
private:
|
||||
@ -178,7 +178,7 @@ namespace odf_writer
|
||||
class mimetype_file : public element
|
||||
{
|
||||
public:
|
||||
mimetype_file(std::wstring type);
|
||||
mimetype_file(const std::wstring & type);
|
||||
|
||||
virtual void write(const std::wstring & RootPath, bool add_padding = false);
|
||||
|
||||
@ -201,7 +201,7 @@ namespace odf_writer
|
||||
class object_files : public element
|
||||
{
|
||||
public:
|
||||
object_files(){}
|
||||
object_files() {}
|
||||
|
||||
void set_content (content_content_ptr & _content);
|
||||
|
||||
@ -227,14 +227,16 @@ namespace odf_writer
|
||||
class odf_document : public element
|
||||
{
|
||||
public:
|
||||
odf_document(std::wstring type);
|
||||
odf_document(std::wstring type, bool bTemplate);
|
||||
|
||||
void add_object(element_ptr _object,bool root = false);
|
||||
void add_binary(const std::wstring &file_name, const std::string &value);
|
||||
|
||||
void set_rels(rels & r);
|
||||
|
||||
std::wstring get_type();
|
||||
|
||||
virtual void write(const std::wstring & RootPath, bool add_padding = false);
|
||||
virtual void write(const std::wstring & RootPath, bool add_padding);
|
||||
void write_manifest(const std::wstring & RootPath);
|
||||
|
||||
manifect_file* get_manifest() {return dynamic_cast<manifect_file*>(manifest_.get());}
|
||||
|
||||
@ -163,8 +163,15 @@ void odf_conversion_context::end_document()
|
||||
rels_.add(relationship(std::wstring(L"text/xml"), object_files->local_path + L"meta.xml"));
|
||||
rels_.add(relationship(std::wstring(L"text/xml"), object_files->local_path + L"settings.xml"));
|
||||
|
||||
if (isRoot)object_files->local_path = L"/";
|
||||
rels_.add(relationship(std::wstring(L"application/vnd.oasis.opendocument.") + object.content->get_name(), object_files->local_path));
|
||||
if (isRoot)
|
||||
{
|
||||
object_files->local_path = L"/";
|
||||
rels_.add(relationship(std::wstring(L"application/vnd.oasis.opendocument.") + output_document_->get_type(), object_files->local_path));
|
||||
}
|
||||
else
|
||||
{
|
||||
rels_.add(relationship(std::wstring(L"application/vnd.oasis.opendocument.") + object.content->get_name(), object_files->local_path));
|
||||
}
|
||||
|
||||
output_document_->add_object(package::element_ptr(object_files), isRoot);
|
||||
}
|
||||
|
||||
@ -70,23 +70,17 @@
|
||||
#include "../../../DesktopEditor/common/Directory.h"
|
||||
#include "../../../DesktopEditor/common/SystemUtils.h"
|
||||
|
||||
#define PROGRESSEVENT_ID 0
|
||||
|
||||
using namespace cpdoccore;
|
||||
|
||||
namespace Oox2Odf
|
||||
{
|
||||
static double pt2emu(double Val)
|
||||
{
|
||||
return (Val * 360000 * 2.54) / 72;
|
||||
}
|
||||
Converter::Converter(const std::wstring & path, const std::wstring & type, const std::wstring & fontsPath, const ProgressCallback* CallBack)
|
||||
Converter::Converter(const std::wstring & path, const std::wstring & type, const std::wstring & fontsPath, bool bTemplate)
|
||||
{
|
||||
impl_ = NULL;
|
||||
|
||||
if (type == _T("text")) impl_ = new DocxConverter(path, CallBack);
|
||||
if (type == _T("spreadsheet")) impl_ = new XlsxConverter(path, CallBack);
|
||||
if (type == _T("presentation")) impl_ = new PptxConverter(path, CallBack);
|
||||
if (type == _T("text")) impl_ = new DocxConverter(path, bTemplate);
|
||||
if (type == _T("spreadsheet")) impl_ = new XlsxConverter(path, bTemplate);
|
||||
if (type == _T("presentation")) impl_ = new PptxConverter(path, bTemplate);
|
||||
|
||||
if (impl_)
|
||||
impl_->set_fonts_directory(fontsPath);
|
||||
@ -100,36 +94,16 @@ namespace Oox2Odf
|
||||
void Converter::convert()
|
||||
{
|
||||
if (!impl_)return;
|
||||
|
||||
if (impl_->bUserStopConvert) return;
|
||||
|
||||
impl_->convertDocument();
|
||||
}
|
||||
void Converter::write(const std::wstring & out_path, const std::wstring & temp_path, const std::wstring & password, const std::wstring & documentID) const
|
||||
{
|
||||
if (!impl_)return;
|
||||
|
||||
if (impl_->bUserStopConvert) return;
|
||||
|
||||
return impl_->write(out_path, temp_path, password, documentID);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool OoxConverter::UpdateProgress(long nComplete)
|
||||
{
|
||||
if (pCallBack)
|
||||
{
|
||||
pCallBack->OnProgress (pCallBack->caller, PROGRESSEVENT_ID, nComplete);
|
||||
|
||||
bUserStopConvert = 0;
|
||||
pCallBack->OnProgressEx (pCallBack->caller, PROGRESSEVENT_ID, nComplete, &bUserStopConvert);
|
||||
|
||||
if (bUserStopConvert !=0 ) return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
void OoxConverter::write(const std::wstring & out_path, const std::wstring & temp_path, const std::wstring & password, const std::wstring & documentID)
|
||||
{
|
||||
if (!output_document)return;
|
||||
@ -141,7 +115,7 @@ void OoxConverter::write(const std::wstring & out_path, const std::wstring & tem
|
||||
|
||||
if (password.empty())
|
||||
{
|
||||
output_document->write(out_path);
|
||||
output_document->write(out_path, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -155,8 +129,6 @@ void OoxConverter::write(const std::wstring & out_path, const std::wstring & tem
|
||||
|
||||
NSDirectory::DeleteDirectory(temp_folder);
|
||||
}
|
||||
|
||||
if (UpdateProgress(1000000))return;
|
||||
}
|
||||
std::wstring EncodeBase64(const std::string & value)
|
||||
{
|
||||
|
||||
@ -356,19 +356,14 @@ public:
|
||||
|
||||
void write(const std::wstring & out_path, const std::wstring & temp_path, const std::wstring & password, const std::wstring & documentID);
|
||||
|
||||
OoxConverter(const ProgressCallback* CallBack = NULL){
|
||||
oox_current_child_document = NULL;
|
||||
|
||||
pCallBack = CallBack;
|
||||
bUserStopConvert = 0;
|
||||
}
|
||||
OoxConverter()
|
||||
{
|
||||
oox_current_child_document = NULL;
|
||||
}
|
||||
virtual ~OoxConverter(){}
|
||||
|
||||
void set_fonts_directory (const std::wstring & fontsPath);
|
||||
|
||||
const ProgressCallback* pCallBack;
|
||||
short bUserStopConvert;
|
||||
bool UpdateProgress(long nComplete);
|
||||
|
||||
bool encrypt_document (const std::wstring &password, const std::wstring & srcPath, const std::wstring & dstPath);
|
||||
bool encrypt_file (const std::wstring &password, const std::wstring & srcPath, const std::wstring & dstPath, std::wstring &encrypt_info, int &size);
|
||||
|
||||
|
||||
@ -103,22 +103,18 @@ namespace Oox2Odf
|
||||
}
|
||||
return cols_1 == cols_2;
|
||||
}
|
||||
DocxConverter::DocxConverter(const std::wstring & path, const ProgressCallback* CallBack)
|
||||
DocxConverter::DocxConverter(const std::wstring & path, bool bTemplate)
|
||||
{
|
||||
const OOX::CPath oox_path(std::wstring(path.c_str()));
|
||||
|
||||
docx_document = new OOX::CDocx(oox_path);
|
||||
|
||||
output_document = new odf_writer::package::odf_document(L"text");
|
||||
output_document = new odf_writer::package::odf_document(L"text", bTemplate);
|
||||
odt_context = new odf_writer::odt_conversion_context(output_document);
|
||||
|
||||
pCallBack = CallBack;
|
||||
|
||||
//set flags to default
|
||||
current_section_properties = NULL;
|
||||
last_section_properties = NULL;
|
||||
|
||||
if (UpdateProgress(290000))return;
|
||||
}
|
||||
DocxConverter::~DocxConverter()
|
||||
{
|
||||
@ -190,19 +186,14 @@ void DocxConverter::convertDocument()
|
||||
convert_lists_styles();
|
||||
convert_styles();
|
||||
|
||||
if (UpdateProgress(300000))return;
|
||||
|
||||
convert_settings();
|
||||
|
||||
convert_document();
|
||||
|
||||
if (UpdateProgress(800000))return;
|
||||
//удалим уже ненужный документ docx
|
||||
delete docx_document; docx_document = NULL;
|
||||
|
||||
odt_context->end_document();
|
||||
|
||||
if (UpdateProgress(850000))return;
|
||||
}
|
||||
|
||||
void DocxConverter::convert_document()
|
||||
|
||||
@ -143,7 +143,7 @@ namespace Oox2Odf
|
||||
class DocxConverter : public OoxConverter
|
||||
{
|
||||
public:
|
||||
DocxConverter(const std::wstring & path, const ProgressCallback* ffCallBack);
|
||||
DocxConverter(const std::wstring & path, bool bTemplate);
|
||||
~DocxConverter();
|
||||
|
||||
virtual void convertDocument();
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../progressCallback.h"
|
||||
#include <string>
|
||||
|
||||
namespace Oox2Odf
|
||||
@ -41,7 +40,7 @@ namespace Oox2Odf
|
||||
class Converter
|
||||
{
|
||||
public:
|
||||
Converter(const std::wstring & path, const std::wstring & type, const std::wstring & fontsPath, const ProgressCallback* ffCallBack);
|
||||
Converter(const std::wstring & path, const std::wstring & type, const std::wstring & fontsPath, bool bTemplate);
|
||||
virtual ~Converter();
|
||||
|
||||
void convert();
|
||||
|
||||
@ -73,7 +73,7 @@ using namespace cpdoccore;
|
||||
namespace Oox2Odf
|
||||
{
|
||||
|
||||
PptxConverter::PptxConverter(const std::wstring & path, const ProgressCallback* CallBack)
|
||||
PptxConverter::PptxConverter(const std::wstring & path, bool bTemplate)
|
||||
{
|
||||
current_clrMap = NULL;
|
||||
current_slide = NULL;
|
||||
@ -84,8 +84,6 @@ PptxConverter::PptxConverter(const std::wstring & path, const ProgressCallback*
|
||||
output_document = NULL;
|
||||
odp_context = NULL;
|
||||
|
||||
pCallBack = CallBack;
|
||||
|
||||
const OOX::CPath oox_path(std::wstring(path.c_str()));
|
||||
|
||||
pptx_document = new PPTX::Document();
|
||||
@ -105,10 +103,8 @@ PptxConverter::PptxConverter(const std::wstring & path, const ProgressCallback*
|
||||
}
|
||||
presentation = presentation_ptr.operator->();
|
||||
|
||||
output_document = new odf_writer::package::odf_document(L"presentation");
|
||||
output_document = new odf_writer::package::odf_document(L"presentation", bTemplate);
|
||||
odp_context = new odf_writer::odp_conversion_context(output_document);
|
||||
|
||||
if (UpdateProgress(290000))return;
|
||||
}
|
||||
PptxConverter::~PptxConverter()
|
||||
{
|
||||
@ -186,20 +182,15 @@ void PptxConverter::convertDocument()
|
||||
|
||||
odp_context->start_document();
|
||||
|
||||
if (UpdateProgress(300000))return;
|
||||
|
||||
convert_styles();
|
||||
convert_settings();
|
||||
|
||||
convert_slides();
|
||||
|
||||
if (UpdateProgress(800000))return;
|
||||
//удалим уже ненужный документ pptx
|
||||
delete pptx_document; pptx_document = NULL;
|
||||
|
||||
odp_context->end_document();
|
||||
|
||||
if (UpdateProgress(850000))return;
|
||||
}
|
||||
void PptxConverter::convert_styles()
|
||||
{
|
||||
|
||||
@ -110,7 +110,7 @@ namespace Oox2Odf
|
||||
class PptxConverter : public OoxConverter
|
||||
{
|
||||
public:
|
||||
PptxConverter(const std::wstring & path, const ProgressCallback* ffCallBack);
|
||||
PptxConverter(const std::wstring & path, bool bTemplate);
|
||||
~PptxConverter();
|
||||
|
||||
virtual void convertDocument();
|
||||
|
||||
@ -65,20 +65,16 @@ using namespace cpdoccore;
|
||||
namespace Oox2Odf
|
||||
{
|
||||
|
||||
XlsxConverter::XlsxConverter(const std::wstring & path, const ProgressCallback* CallBack)
|
||||
XlsxConverter::XlsxConverter(const std::wstring & path, bool bTemplate)
|
||||
{
|
||||
const OOX::CPath oox_path(std::wstring(path.c_str()));
|
||||
|
||||
xlsx_document = new OOX::Spreadsheet::CXlsx(oox_path);
|
||||
|
||||
output_document = new odf_writer::package::odf_document(L"spreadsheet");
|
||||
output_document = new odf_writer::package::odf_document(L"spreadsheet", bTemplate);
|
||||
ods_context = new odf_writer::ods_conversion_context(output_document);
|
||||
|
||||
pCallBack = CallBack;
|
||||
|
||||
xlsx_current_container = NULL;
|
||||
|
||||
if (UpdateProgress(400000))return;
|
||||
}
|
||||
XlsxConverter::~XlsxConverter()
|
||||
{
|
||||
@ -147,16 +143,12 @@ void XlsxConverter::convertDocument()
|
||||
ods_context->start_document();
|
||||
|
||||
convert_styles();
|
||||
if (UpdateProgress(500000))return;
|
||||
|
||||
convert_sheets();
|
||||
|
||||
if (UpdateProgress(800000))return;
|
||||
delete xlsx_document; xlsx_document = NULL;
|
||||
|
||||
ods_context->end_document();
|
||||
|
||||
if (UpdateProgress(850000))return;
|
||||
}
|
||||
|
||||
void XlsxConverter::convert_sheets()
|
||||
@ -2369,8 +2361,10 @@ void XlsxConverter::convert(OOX::Spreadsheet::CConditionalFormattingRule *oox_co
|
||||
if (oox_cond_rule->m_oText.IsInit())
|
||||
ods_context->current_table().set_conditional_text(oox_cond_rule->m_oText.get2());
|
||||
|
||||
for (size_t i=0; i< oox_cond_rule->m_arrItems.size(); i++)
|
||||
convert(oox_cond_rule->m_arrItems[i]);
|
||||
convert(oox_cond_rule->m_oIconSet.GetPointer());
|
||||
convert(oox_cond_rule->m_oColorScale.GetPointer());
|
||||
convert(oox_cond_rule->m_oDataBar.GetPointer());
|
||||
convert(oox_cond_rule->m_oFormula.GetPointer());
|
||||
}
|
||||
ods_context->current_table().end_conditional_rule();
|
||||
}
|
||||
@ -2386,33 +2380,26 @@ void XlsxConverter::convert(OOX::Spreadsheet::CDataBar *oox_cond_databar)
|
||||
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oMaxLength;
|
||||
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oMinLength;
|
||||
//nullable<SimpleTypes::COnOff<>> m_oShowValue;
|
||||
for (size_t i=0; i< oox_cond_databar->m_arrItems.size(); i++)
|
||||
convert(oox_cond_databar->m_arrItems[i]);
|
||||
for (size_t i=0; i< oox_cond_databar->m_arrValues.size(); i++)
|
||||
convert(oox_cond_databar->m_arrValues[i].GetPointer());
|
||||
}
|
||||
void XlsxConverter::convert(OOX::Spreadsheet::CColorScale *oox_cond_colorscale)
|
||||
{
|
||||
if (!oox_cond_colorscale)return;
|
||||
|
||||
int index = 0;
|
||||
|
||||
for (std::vector<OOX::Spreadsheet::WritingElement*>::iterator it = oox_cond_colorscale->m_arrItems.begin();
|
||||
it != oox_cond_colorscale->m_arrItems.end(); ++it)
|
||||
|
||||
for (size_t i = 0; i < oox_cond_colorscale->m_arrValues.size(); ++i)
|
||||
{
|
||||
if (*it == NULL )continue;
|
||||
|
||||
OOX::EElementType type = (*it)->getType();
|
||||
if (type == OOX::et_x_ConditionalFormatValueObject)
|
||||
{
|
||||
convert(*it);
|
||||
}
|
||||
else
|
||||
{
|
||||
_CP_OPT(odf_types::color) color;
|
||||
convert(dynamic_cast<OOX::Spreadsheet::CColor*>(*it), color);
|
||||
|
||||
ods_context->current_table().add_conditional_colorscale( index++, color );
|
||||
}
|
||||
convert(oox_cond_colorscale->m_arrValues[i].GetPointer());
|
||||
}
|
||||
for (size_t i = 0; i < oox_cond_colorscale->m_arrColors.size(); ++i)
|
||||
{
|
||||
_CP_OPT(odf_types::color) color;
|
||||
convert(dynamic_cast<OOX::Spreadsheet::CColor*>(oox_cond_colorscale->m_arrColors[i].GetPointer()), color);
|
||||
|
||||
ods_context->current_table().add_conditional_colorscale( index++, color );
|
||||
}
|
||||
}
|
||||
void XlsxConverter::convert(OOX::Spreadsheet::CIconSet *oox_cond_iconset)
|
||||
{
|
||||
@ -2423,8 +2410,10 @@ void XlsxConverter::convert(OOX::Spreadsheet::CIconSet *oox_cond_iconset)
|
||||
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oMaxLength;
|
||||
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oMinLength;
|
||||
//nullable<SimpleTypes::COnOff<>> m_oShowValue;
|
||||
for (size_t i=0; i< oox_cond_iconset->m_arrItems.size(); i++)
|
||||
convert(oox_cond_iconset->m_arrItems[i]);
|
||||
for (size_t i=0; i< oox_cond_iconset->m_arrValues.size(); i++)
|
||||
{
|
||||
convert(oox_cond_iconset->m_arrValues[i].GetPointer());
|
||||
}
|
||||
}
|
||||
void XlsxConverter::convert(OOX::Spreadsheet::CConditionalFormatValueObject *oox_cond_value)
|
||||
{
|
||||
|
||||
@ -135,7 +135,7 @@ namespace Oox2Odf
|
||||
public:
|
||||
friend class OoxConverter;
|
||||
|
||||
XlsxConverter(const std::wstring & path, const ProgressCallback* ffCallBack);
|
||||
XlsxConverter(const std::wstring & path, bool bTemplate);
|
||||
~XlsxConverter();
|
||||
|
||||
virtual void convertDocument();
|
||||
|
||||
@ -119,7 +119,7 @@ _UINT32 COfficePPTFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDs
|
||||
}
|
||||
if (!((CPPTFileReader*)m_pReader)->m_oDocumentInfo.m_arUsers.empty())
|
||||
{
|
||||
NSPresentationEditor::CPPTXWriter oPPTXWriter;
|
||||
PPT_FORMAT::CPPTXWriter oPPTXWriter;
|
||||
oPPTXWriter.m_strTempDirectory = sDstPath;
|
||||
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
|
||||
#include "Converter.h"
|
||||
|
||||
namespace NSPresentationEditor
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
namespace NSPPTXWriterConst
|
||||
{
|
||||
@ -68,7 +68,7 @@ namespace NSPresentationEditor
|
||||
}
|
||||
|
||||
|
||||
NSPresentationEditor::CPPTXWriter::CPPTXWriter()
|
||||
PPT_FORMAT::CPPTXWriter::CPPTXWriter()
|
||||
{
|
||||
m_strTempDirectory = NSDirectory::GetTempPath() + FILE_SEPARATOR_STR + _T("TempPPTX");
|
||||
m_strDstFileName = NSDirectory::GetTempPath() + FILE_SEPARATOR_STR + _T("Test.pptx");
|
||||
@ -79,12 +79,12 @@ NSPresentationEditor::CPPTXWriter::CPPTXWriter()
|
||||
m_pShapeWriter = new CShapeWriter();
|
||||
}
|
||||
|
||||
NSPresentationEditor::CPPTXWriter::~CPPTXWriter()
|
||||
PPT_FORMAT::CPPTXWriter::~CPPTXWriter()
|
||||
{
|
||||
RELEASEOBJECT(m_pShapeWriter);
|
||||
}
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::CreateFile(CPPTUserInfo* pUserInfo )
|
||||
void PPT_FORMAT::CPPTXWriter::CreateFile(CPPTUserInfo* pUserInfo )
|
||||
{
|
||||
m_pUserInfo = pUserInfo;
|
||||
|
||||
@ -131,7 +131,7 @@ void NSPresentationEditor::CPPTXWriter::CreateFile(CPPTUserInfo* pUserInfo )
|
||||
WriteAll();
|
||||
}
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::CreateFile(CDocument* pDocument)
|
||||
void PPT_FORMAT::CPPTXWriter::CreateFile(CDocument* pDocument)
|
||||
{
|
||||
m_pDocument = pDocument;
|
||||
m_oManager.Clear();
|
||||
@ -175,13 +175,13 @@ void NSPresentationEditor::CPPTXWriter::CreateFile(CDocument* pDocument)
|
||||
WriteAll();
|
||||
}
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::CloseFile()
|
||||
void PPT_FORMAT::CPPTXWriter::CloseFile()
|
||||
{
|
||||
m_oManager.Clear();
|
||||
}
|
||||
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::WriteContentTypes()
|
||||
void PPT_FORMAT::CPPTXWriter::WriteContentTypes()
|
||||
{
|
||||
std::wstring strContentTypes = L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>\
|
||||
<Types xmlns=\"http://schemas.openxmlformats.org/package/2006/content-types\">\
|
||||
@ -273,7 +273,7 @@ void NSPresentationEditor::CPPTXWriter::WriteContentTypes()
|
||||
}
|
||||
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::WriteApp(CFile& oFile)
|
||||
void PPT_FORMAT::CPPTXWriter::WriteApp(CFile& oFile)
|
||||
{
|
||||
std::wstringstream strm;
|
||||
|
||||
@ -413,7 +413,7 @@ void NSPresentationEditor::CPPTXWriter::WriteApp(CFile& oFile)
|
||||
oFile.WriteStringUTF8(strm.str());
|
||||
}
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::WritePresInfo()
|
||||
void PPT_FORMAT::CPPTXWriter::WritePresInfo()
|
||||
{
|
||||
CFile oFile;
|
||||
|
||||
@ -551,7 +551,7 @@ void NSPresentationEditor::CPPTXWriter::WritePresInfo()
|
||||
oFile.CloseFile();
|
||||
}
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::WriteAll()
|
||||
void PPT_FORMAT::CPPTXWriter::WriteAll()
|
||||
{
|
||||
std::wstring strPptDirectory = m_strTempDirectory + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR ;
|
||||
|
||||
@ -585,7 +585,7 @@ void NSPresentationEditor::CPPTXWriter::WriteAll()
|
||||
WriteNotes();
|
||||
}
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::WriteThemes()
|
||||
void PPT_FORMAT::CPPTXWriter::WriteThemes()
|
||||
{
|
||||
int nStartLayout = 0, nIndexTheme = 0;
|
||||
|
||||
@ -600,7 +600,7 @@ void NSPresentationEditor::CPPTXWriter::WriteThemes()
|
||||
WriteTheme(m_pDocument->m_pHandoutMaster, nIndexTheme, nStartLayout);
|
||||
}
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::WriteTheme(CThemePtr pTheme, int & nIndexTheme, int & nStartLayout)
|
||||
void PPT_FORMAT::CPPTXWriter::WriteTheme(CThemePtr pTheme, int & nIndexTheme, int & nStartLayout)
|
||||
{
|
||||
if (!pTheme) return;
|
||||
|
||||
@ -612,7 +612,7 @@ void NSPresentationEditor::CPPTXWriter::WriteTheme(CThemePtr pTheme, int & nInde
|
||||
CFile oFile;
|
||||
oFile.CreateFile(strThemeFile);
|
||||
|
||||
NSPresentationEditor::CStringWriter oStringWriter;
|
||||
PPT_FORMAT::CStringWriter oStringWriter;
|
||||
|
||||
oStringWriter.WriteString(std::wstring(L"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?><a:theme xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" name=\""));
|
||||
oStringWriter.WriteStringXML(pTheme->m_sThemeName);
|
||||
@ -854,7 +854,7 @@ void NSPresentationEditor::CPPTXWriter::WriteTheme(CThemePtr pTheme, int & nInde
|
||||
nIndexTheme++;
|
||||
}
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::WriteColorScheme(CStringWriter& oStringWriter, const std::wstring & name, const std::vector<CColor> & colors, bool extra)
|
||||
void PPT_FORMAT::CPPTXWriter::WriteColorScheme(CStringWriter& oStringWriter, const std::wstring & name, const std::vector<CColor> & colors, bool extra)
|
||||
{
|
||||
if (colors.size() < 1)
|
||||
{
|
||||
@ -908,7 +908,7 @@ accent2=\"accent2\" accent3=\"accent3\" accent4=\"accent4\" accent5=\"accent5\"
|
||||
}
|
||||
}
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::WriteBackground(CStringWriter& oWriter, CRelsGenerator& oRels, CBrush& oBackground)
|
||||
void PPT_FORMAT::CPPTXWriter::WriteBackground(CStringWriter& oWriter, CRelsGenerator& oRels, CBrush& oBackground)
|
||||
{
|
||||
oWriter.WriteString(std::wstring(L"<p:bg><p:bgPr>"));
|
||||
|
||||
@ -918,7 +918,7 @@ void NSPresentationEditor::CPPTXWriter::WriteBackground(CStringWriter& oWriter,
|
||||
}
|
||||
oWriter.WriteString(std::wstring(L"</p:bgPr></p:bg>"));
|
||||
}
|
||||
void NSPresentationEditor::CPPTXWriter::WriteGroup(CStringWriter& oWriter, CRelsGenerator& oRels, CElementPtr pElement, CLayout* pLayout)
|
||||
void PPT_FORMAT::CPPTXWriter::WriteGroup(CStringWriter& oWriter, CRelsGenerator& oRels, CElementPtr pElement, CLayout* pLayout)
|
||||
{
|
||||
CGroupElement *pGroupElement = dynamic_cast<CGroupElement*>(pElement.get());
|
||||
|
||||
@ -931,7 +931,7 @@ void NSPresentationEditor::CPPTXWriter::WriteGroup(CStringWriter& oWriter, CRels
|
||||
}
|
||||
oWriter.WriteString(L"</p:grpSp>");
|
||||
}
|
||||
void NSPresentationEditor::CPPTXWriter::WriteElement(CStringWriter& oWriter, CRelsGenerator& oRels, CElementPtr pElement, CLayout* pLayout)
|
||||
void PPT_FORMAT::CPPTXWriter::WriteElement(CStringWriter& oWriter, CRelsGenerator& oRels, CElementPtr pElement, CLayout* pLayout)
|
||||
{
|
||||
if (!pElement) return;
|
||||
|
||||
@ -986,7 +986,7 @@ void NSPresentationEditor::CPPTXWriter::WriteElement(CStringWriter& oWriter, CRe
|
||||
}
|
||||
}
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::WriteLayout(CLayoutPtr pLayout, int nIndexLayout, int nStartLayout, int nIndexTheme)
|
||||
void PPT_FORMAT::CPPTXWriter::WriteLayout(CLayoutPtr pLayout, int nIndexLayout, int nStartLayout, int nIndexTheme)
|
||||
{
|
||||
if (!pLayout) return;
|
||||
|
||||
@ -1055,7 +1055,7 @@ void NSPresentationEditor::CPPTXWriter::WriteLayout(CLayoutPtr pLayout, int nInd
|
||||
strFile = L"slideLayout" + std::to_wstring(nIndexLayout + nStartLayout + 1) + L".xml.rels";
|
||||
oRels.SaveRels(strFileLayoutPath + _T("_rels") + FILE_SEPARATOR_STR + strFile);
|
||||
}
|
||||
void NSPresentationEditor::CPPTXWriter::WriteSlide(int nIndexSlide)
|
||||
void PPT_FORMAT::CPPTXWriter::WriteSlide(int nIndexSlide)
|
||||
{
|
||||
CStringWriter oWriter;
|
||||
CRelsGenerator oRels(&m_oManager);
|
||||
@ -1140,7 +1140,7 @@ void NSPresentationEditor::CPPTXWriter::WriteSlide(int nIndexSlide)
|
||||
oRels.SaveRels(strFileSlidePath + _T("_rels") + FILE_SEPARATOR_STR + strFile);
|
||||
}
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::WriteTransition(CStringWriter& oWriter, CTransition& transition)
|
||||
void PPT_FORMAT::CPPTXWriter::WriteTransition(CStringWriter& oWriter, CTransition& transition)
|
||||
{
|
||||
if (transition.m_nEffectType == 0xFF) return;
|
||||
|
||||
@ -1327,7 +1327,7 @@ void NSPresentationEditor::CPPTXWriter::WriteTransition(CStringWriter& oWriter,
|
||||
oWriter.WriteString(std::wstring(L"</p:transition>"));
|
||||
}
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::WriteNotes(int nIndexNotes)
|
||||
void PPT_FORMAT::CPPTXWriter::WriteNotes(int nIndexNotes)
|
||||
{
|
||||
CStringWriter oWriter;
|
||||
CRelsGenerator oRels(&m_oManager);
|
||||
@ -1391,14 +1391,14 @@ void NSPresentationEditor::CPPTXWriter::WriteNotes(int nIndexNotes)
|
||||
oRels.SaveRels(strFileSlidePath + _T("_rels") + FILE_SEPARATOR_STR + strFile);
|
||||
}
|
||||
|
||||
void NSPresentationEditor::CPPTXWriter::WriteSlides()
|
||||
void PPT_FORMAT::CPPTXWriter::WriteSlides()
|
||||
{
|
||||
for (size_t nIndexS = 0; nIndexS < m_pDocument->m_arSlides.size(); ++nIndexS)
|
||||
{
|
||||
WriteSlide((int)nIndexS);
|
||||
}
|
||||
}
|
||||
void NSPresentationEditor::CPPTXWriter::WriteNotes()
|
||||
void PPT_FORMAT::CPPTXWriter::WriteNotes()
|
||||
{
|
||||
for (size_t nIndexS = 0; nIndexS < m_pDocument->m_arNotes.size(); ++nIndexS)
|
||||
{
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
class CStylesWriter;
|
||||
class CPPTUserInfo;
|
||||
|
||||
namespace NSPresentationEditor
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
class CDocument;
|
||||
class CShapeWriter;
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
#include "../../../Common/FileDownloader/FileDownloader.h"
|
||||
#endif
|
||||
|
||||
namespace NSPresentationEditor
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
class CMediaManager
|
||||
{
|
||||
@ -170,7 +170,7 @@ namespace NSPresentationEditor
|
||||
class CRelsGenerator
|
||||
{
|
||||
private:
|
||||
NSPresentationEditor::CStringWriter m_oWriter;
|
||||
PPT_FORMAT::CStringWriter m_oWriter;
|
||||
int m_lNextRelsID;
|
||||
std::map<std::wstring, int> m_mapMediaRelsID;
|
||||
CMediaManager* m_pManager;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -35,7 +35,7 @@
|
||||
|
||||
#include "ImageManager.h"
|
||||
|
||||
namespace NSPresentationEditor
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
static inline LONG GetPPTXPlaceHolderType(const int & lType)
|
||||
{
|
||||
@ -64,7 +64,6 @@ namespace NSPresentationEditor
|
||||
return 13; // subtitle
|
||||
|
||||
case PT_Object:
|
||||
case PT_VerticalObject:
|
||||
return 9; // object
|
||||
|
||||
case PT_MasterNotesSlideImage:
|
||||
@ -86,9 +85,6 @@ namespace NSPresentationEditor
|
||||
case PT_Media:
|
||||
return 8; // media
|
||||
|
||||
case PT_Picture:
|
||||
return 10; // picture
|
||||
|
||||
case PT_MasterDate:
|
||||
return 5; // date
|
||||
|
||||
@ -138,15 +134,15 @@ namespace NSPresentationEditor
|
||||
class CShapeWriter
|
||||
{
|
||||
private:
|
||||
NSPresentationEditor::CStringWriter m_oWriterPath;
|
||||
NSPresentationEditor::CStringWriter m_oWriterVML;
|
||||
NSPresentationEditor::CStringWriter m_oWriter;
|
||||
PPT_FORMAT::CStringWriter m_oWriterPath;
|
||||
PPT_FORMAT::CStringWriter m_oWriterVML;
|
||||
PPT_FORMAT::CStringWriter m_oWriter;
|
||||
|
||||
NSPresentationEditor::CElementPtr m_pElement;
|
||||
PPT_FORMAT::CElementPtr m_pElement;
|
||||
|
||||
NSPresentationEditor::CRelsGenerator* m_pRels;
|
||||
PPT_FORMAT::CRelsGenerator* m_pRels;
|
||||
|
||||
NSPresentationEditor::CTheme* m_pTheme;
|
||||
PPT_FORMAT::CTheme* m_pTheme;
|
||||
|
||||
LONG m_lNextShapeID;
|
||||
|
||||
|
||||
@ -31,19 +31,19 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace NSPresentationEditor
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
class CTheme;
|
||||
}
|
||||
class CStylesWriter
|
||||
{
|
||||
public:
|
||||
CStylesWriter(NSPresentationEditor::CTheme* m_pTheme);
|
||||
CStylesWriter(PPT_FORMAT::CTheme* m_pTheme);
|
||||
CStylesWriter();
|
||||
|
||||
NSPresentationEditor::CTheme* m_pTheme;
|
||||
PPT_FORMAT::CTheme* m_pTheme;
|
||||
|
||||
void ConvertStyles(NSPresentationEditor::CTextStyles& oStyles, NSPresentationEditor::CStringWriter& oWriter, int nCount = 10)
|
||||
void ConvertStyles(PPT_FORMAT::CTextStyles& oStyles, PPT_FORMAT::CStringWriter& oWriter, int nCount = 10)
|
||||
{
|
||||
for (int i = 0; i < nCount; ++i)
|
||||
{
|
||||
@ -51,19 +51,19 @@ public:
|
||||
ConvertStyleLevel(oStyles.m_pLevels[i].get(), oWriter, i);
|
||||
}
|
||||
}
|
||||
std::wstring ConvertStyleLevel(NSPresentationEditor::CTextStyleLevel& oLevel, const int& nLevel)
|
||||
std::wstring ConvertStyleLevel(PPT_FORMAT::CTextStyleLevel& oLevel, const int& nLevel)
|
||||
{
|
||||
NSPresentationEditor::CStringWriter oWriter;
|
||||
PPT_FORMAT::CStringWriter oWriter;
|
||||
ConvertStyleLevel(oLevel, oWriter, nLevel);
|
||||
return oWriter.GetData();
|
||||
}
|
||||
|
||||
void ConvertStyleLevel(NSPresentationEditor::CTextStyleLevel& oLevel,
|
||||
NSPresentationEditor::CStringWriter& oWriter, const int& nLevel);
|
||||
void ConvertStyleLevel(PPT_FORMAT::CTextStyleLevel& oLevel,
|
||||
PPT_FORMAT::CStringWriter& oWriter, const int& nLevel);
|
||||
|
||||
std::wstring ConvertStyles(NSPresentationEditor::CTextStyles& oStyles, int nCount = 10)
|
||||
std::wstring ConvertStyles(PPT_FORMAT::CTextStyles& oStyles, int nCount = 10)
|
||||
{
|
||||
NSPresentationEditor::CStringWriter oWriter;
|
||||
PPT_FORMAT::CStringWriter oWriter;
|
||||
ConvertStyles(oStyles, oWriter, nCount);
|
||||
return oWriter.GetData();
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
#include "../Records/CurrentUserAtom.h"
|
||||
|
||||
using namespace NSOfficePPT;
|
||||
//using namespace NSOfficePPT;
|
||||
|
||||
class CUserEdit
|
||||
{
|
||||
|
||||
@ -42,6 +42,7 @@
|
||||
#include "../Records/SoundCollectionContainer.h"
|
||||
#include "../Records/SoundContainer.h"
|
||||
|
||||
|
||||
CPPTUserInfo::CPPTUserInfo() : CDocument(),
|
||||
m_oUser(),
|
||||
m_mapOffsetInPIDs(),
|
||||
@ -446,7 +447,7 @@ void CPPTUserInfo::ReadExtenalObjects(std::wstring strFolderMem)
|
||||
// так... теперь берем всю инфу о ExObject -----------------------------
|
||||
m_oExMedia.m_strPresentationDirectory = strFolderMem;
|
||||
|
||||
NSPresentationEditor::CExFilesInfo oInfo;
|
||||
PPT_FORMAT::CExFilesInfo oInfo;
|
||||
|
||||
oInfo.m_strFilePath = m_oExMedia.m_strPresentationDirectory;
|
||||
oInfo.m_dwID = 0xFFFFFFFF;
|
||||
@ -475,10 +476,10 @@ void CPPTUserInfo::ReadExtenalObjects(std::wstring strFolderMem)
|
||||
|
||||
for (size_t nIndex = 0; nIndex < oArrayFonts.size(); ++nIndex)
|
||||
{
|
||||
CFont oFont;
|
||||
CFontProperty oFont;
|
||||
|
||||
oFont.Name = oArrayFonts[nIndex]->m_strFaceName;
|
||||
oFont.Charset = oArrayFonts[nIndex]->m_lfCharSet;
|
||||
|
||||
oFont.PitchFamily = oArrayFonts[nIndex]->m_lfPitchAndFamily;
|
||||
|
||||
m_arrFonts.push_back(oFont);
|
||||
@ -510,7 +511,7 @@ void CPPTUserInfo::FromDocument()
|
||||
oArrayInfo[0]->GetRecordsByType(&oStyles, false, false);
|
||||
|
||||
if (0 != oStyles.size())
|
||||
m_oDefaultTextStyle.SetStyles((NSPresentationEditor::CTextStyles*)oStyles[0]);
|
||||
m_oDefaultTextStyle.SetStyles((PPT_FORMAT::CTextStyles*)oStyles[0]);
|
||||
|
||||
std::vector<CRecordTextSIExceptionAtom*> oSI;
|
||||
oArrayInfo[0]->GetRecordsByType(&oSI, false, false);
|
||||
@ -674,7 +675,7 @@ void CPPTUserInfo::LoadNotes(_UINT32 dwNoteID, CSlide* pNotes)
|
||||
|
||||
CLayout* pLayout = NULL;
|
||||
//-----------------------------------------------------
|
||||
std::vector<NSPresentationEditor::CColor>* pArrayColorScheme = pTheme ? &pTheme->m_arColorScheme : NULL;
|
||||
std::vector<ODRAW::CColor>* pArrayColorScheme = pTheme ? &pTheme->m_arColorScheme : NULL;
|
||||
|
||||
// читаем цветовую схему -----------------------------------------------------------
|
||||
pNotes->m_bUseLayoutColorScheme = true;
|
||||
@ -800,7 +801,7 @@ void CPPTUserInfo::LoadSlide(_UINT32 dwSlideID, CSlide* pSlide)
|
||||
|
||||
pTransition->m_bAudioPresent = pAtom->m_bSound;
|
||||
|
||||
NSPresentationEditor::CExFilesInfo* pInfo = m_oExMedia.LockAudioFromCollection(pAtom->m_nSoundRef);
|
||||
PPT_FORMAT::CExFilesInfo* pInfo = m_oExMedia.LockAudioFromCollection(pAtom->m_nSoundRef);
|
||||
if (NULL != pInfo)
|
||||
{
|
||||
pTransition->m_oAudio.m_strAudioFileName = pInfo->m_strFilePath;
|
||||
@ -818,7 +819,7 @@ void CPPTUserInfo::LoadSlide(_UINT32 dwSlideID, CSlide* pSlide)
|
||||
CSlideShowSlideInfoAtom* pAtom = &pRecordSlide->m_oSlideShowSlideInfoAtom;
|
||||
if (pAtom->m_bSound)
|
||||
{
|
||||
NSPresentationEditor::CExFilesInfo* pInfo = m_oExMedia.LockAudioFromCollection(pAtom->m_nSoundRef);
|
||||
PPT_FORMAT::CExFilesInfo* pInfo = m_oExMedia.LockAudioFromCollection(pAtom->m_nSoundRef);
|
||||
if (NULL != pInfo)
|
||||
AddAudioTransition (dwSlideID, pTransition, pInfo->m_strFilePath);
|
||||
}
|
||||
@ -897,7 +898,7 @@ void CPPTUserInfo::LoadSlide(_UINT32 dwSlideID, CSlide* pSlide)
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<NSPresentationEditor::CColor>* pArrayColorScheme = &pTheme->m_arColorScheme;
|
||||
std::vector<ODRAW::CColor>* pArrayColorScheme = &pTheme->m_arColorScheme;
|
||||
if (!pLayout->m_bUseThemeColorScheme)
|
||||
pArrayColorScheme = &pLayout->m_arColorScheme;
|
||||
|
||||
@ -1024,16 +1025,16 @@ void CPPTUserInfo::LoadSlide(_UINT32 dwSlideID, CSlide* pSlide)
|
||||
}
|
||||
std::multimap<int, int>::iterator it;
|
||||
|
||||
if (bHasSlideNumber) AddLayoutSlidePlaceholder(pSlide, MasterSlideNumber, pLayout, true);
|
||||
if (bHasSlideNumber) AddLayoutSlidePlaceholder(pSlide, PT_MasterSlideNumber, pLayout, true);
|
||||
|
||||
if (bHasDate)
|
||||
{
|
||||
CElementPtr pElement = AddLayoutSlidePlaceholder(pSlide, MasterDate, pLayout, true);
|
||||
CElementPtr pElement = AddLayoutSlidePlaceholder(pSlide, PT_MasterDate, pLayout, true);
|
||||
|
||||
if (pElement) pElement->m_nFormatDate = nFormatDate;
|
||||
}
|
||||
|
||||
if (bHasFooter) AddLayoutSlidePlaceholder(pSlide, MasterFooter, pLayout, true);
|
||||
if (bHasFooter) AddLayoutSlidePlaceholder(pSlide, PT_MasterFooter, pLayout, true);
|
||||
}
|
||||
|
||||
void CPPTUserInfo::LoadGroupShapeContainer(CRecordGroupShapeContainer* pGroupContainer, std::vector<CElementPtr>* pParentElements, CTheme* pTheme, CLayout* pLayout,
|
||||
@ -1101,9 +1102,9 @@ void CPPTUserInfo::LoadGroupShapeContainer(CRecordGroupShapeContainer* pGroupCon
|
||||
{
|
||||
if (pElement->m_lPlaceholderID >= 0)
|
||||
{
|
||||
if (pElement->m_lPlaceholderType == MasterSlideNumber) pLayout->m_bHasSlideNumber = true;
|
||||
if (pElement->m_lPlaceholderType == MasterDate) pLayout->m_bHasDate = true;
|
||||
if (pElement->m_lPlaceholderType == MasterFooter) pLayout->m_bHasFooter = true;
|
||||
if (pElement->m_lPlaceholderType == PT_MasterSlideNumber) pLayout->m_bHasSlideNumber = true;
|
||||
if (pElement->m_lPlaceholderType == PT_MasterDate) pLayout->m_bHasDate = true;
|
||||
if (pElement->m_lPlaceholderType == PT_MasterFooter) pLayout->m_bHasFooter = true;
|
||||
}
|
||||
pLayout->m_mapPlaceholders.insert(std::make_pair(pElement->m_lPlaceholderType, pElement));
|
||||
}
|
||||
@ -1230,7 +1231,7 @@ int CPPTUserInfo::AddNewLayout(CTheme* pTheme, CRecordSlide* pRecordSlide, bool
|
||||
|
||||
int ind = pTheme->m_arLayouts.size();
|
||||
|
||||
pTheme->m_arLayouts.push_back(boost::make_shared<NSPresentationEditor::CLayout>());
|
||||
pTheme->m_arLayouts.push_back(boost::make_shared<PPT_FORMAT::CLayout>());
|
||||
CLayout *pLayout = pTheme->m_arLayouts.back().get();
|
||||
|
||||
pLayout->m_bUseThemeColorScheme = true;
|
||||
@ -1270,16 +1271,16 @@ int CPPTUserInfo::AddNewLayout(CTheme* pTheme, CRecordSlide* pRecordSlide, bool
|
||||
|
||||
switch(layoutRecord.m_pPlaceHolderID[i])
|
||||
{
|
||||
case NSOfficePPT::MasterTitle :
|
||||
case NSOfficePPT::MasterBody :
|
||||
case NSOfficePPT::MasterCenteredTitle :
|
||||
case NSOfficePPT::MasterSubtitle :
|
||||
case NSOfficePPT::MasterNotesSlideImage :
|
||||
case NSOfficePPT::MasterNotesBody:
|
||||
case NSOfficePPT::MasterSlideNumber:
|
||||
case NSOfficePPT::MasterDate:
|
||||
case NSOfficePPT::MasterHeader:
|
||||
case NSOfficePPT::MasterFooter:
|
||||
case PT_MasterTitle:
|
||||
case PT_MasterBody:
|
||||
case PT_MasterCenterTitle:
|
||||
case PT_MasterSubTitle:
|
||||
case PT_MasterNotesSlideImage:
|
||||
case PT_MasterNotesBody:
|
||||
case PT_MasterDate:
|
||||
case PT_MasterSlideNumber:
|
||||
case PT_MasterFooter:
|
||||
case PT_MasterHeader:
|
||||
{
|
||||
int usualType = layoutRecord.m_pPlaceHolderID[i];
|
||||
CorrectPlaceholderType(usualType);
|
||||
@ -1331,9 +1332,9 @@ int CPPTUserInfo::AddNewLayout(CTheme* pTheme, CRecordSlide* pRecordSlide, bool
|
||||
|
||||
for (int i = 0; i < 3; i++) pLayout->m_PlaceholdersReplaceString[i] = pTheme->m_PlaceholdersReplaceString[i];
|
||||
|
||||
if (pLayout->m_bHasSlideNumber) AddThemeLayoutPlaceholder(pLayout, MasterSlideNumber, pTheme, true);
|
||||
if (pLayout->m_bHasDate) AddThemeLayoutPlaceholder(pLayout, MasterDate, pTheme, true);
|
||||
if (pLayout->m_bHasFooter) AddThemeLayoutPlaceholder(pLayout, MasterFooter, pTheme, true);
|
||||
if (pLayout->m_bHasSlideNumber) AddThemeLayoutPlaceholder(pLayout, PT_MasterSlideNumber, pTheme, true);
|
||||
if (pLayout->m_bHasDate) AddThemeLayoutPlaceholder(pLayout, PT_MasterDate, pTheme, true);
|
||||
if (pLayout->m_bHasFooter) AddThemeLayoutPlaceholder(pLayout, PT_MasterFooter, pTheme, true);
|
||||
|
||||
return ind;
|
||||
}
|
||||
@ -1387,7 +1388,7 @@ void CPPTUserInfo::LoadMainMaster(_UINT32 dwMasterID)
|
||||
if (0 == oArraySlideAtoms.size())
|
||||
return;
|
||||
|
||||
_UINT32 dwID = (_UINT32)oArraySlideAtoms[0]->m_nMasterIDRef;
|
||||
_UINT32 dwID = (_UINT32)oArraySlideAtoms[0]->m_nMasterIDRef;
|
||||
if (0 != dwID)
|
||||
{
|
||||
// этот мастер - не main!!!
|
||||
@ -1419,7 +1420,7 @@ void CPPTUserInfo::LoadMainMaster(_UINT32 dwMasterID)
|
||||
|
||||
m_mapMasterToTheme.insert(std::pair<_UINT32, LONG>(dwMasterID, lIndexTheme));
|
||||
|
||||
m_arThemes.push_back(boost::make_shared<NSPresentationEditor::CTheme>());
|
||||
m_arThemes.push_back(boost::make_shared<PPT_FORMAT::CTheme>());
|
||||
CTheme* pTheme = m_arThemes[lIndexTheme].get();
|
||||
|
||||
std::vector<CRecordHeadersFootersContainer*> oArrayHeadersFootersInfo;
|
||||
@ -1463,8 +1464,7 @@ void CPPTUserInfo::LoadMainMaster(_UINT32 dwMasterID)
|
||||
CSlideInfo* pMasterWrapper = &m_arMasterWrapper[lIndexTheme];
|
||||
|
||||
// записываем шрифты ---------------------------------------------------------------
|
||||
int nCountFonts = m_arrFonts.size();
|
||||
for (int i = 0; i < nCountFonts; ++i)
|
||||
for (size_t i = 0; i < m_arrFonts.size(); ++i)
|
||||
{
|
||||
pTheme->m_arFonts.push_back(m_arrFonts[i]);
|
||||
}
|
||||
@ -1531,8 +1531,8 @@ void CPPTUserInfo::LoadMainMaster(_UINT32 dwMasterID)
|
||||
if ((0 > lType) || (lType > 8))
|
||||
continue;
|
||||
|
||||
pMasterWrapper->m_pStyles[lType] = new NSPresentationEditor::CTextStyles();
|
||||
pMasterWrapper->m_pStyles[lType]->SetStyles((NSPresentationEditor::CTextStyles*)oArrayTextMasters[i]);
|
||||
pMasterWrapper->m_pStyles[lType] = new PPT_FORMAT::CTextStyles();
|
||||
pMasterWrapper->m_pStyles[lType]->SetStyles((PPT_FORMAT::CTextStyles*)oArrayTextMasters[i]);
|
||||
|
||||
CTheme::CalculateStyle(pTheme, pMasterWrapper->m_pStyles[lType].get());
|
||||
}
|
||||
@ -1671,7 +1671,7 @@ void CPPTUserInfo::LoadMaster(_typeMaster type, CRecordSlide* pMaster, CSlideInf
|
||||
}
|
||||
}
|
||||
|
||||
pTheme = boost::make_shared<NSPresentationEditor::CTheme>(type);
|
||||
pTheme = boost::make_shared<PPT_FORMAT::CTheme>(type);
|
||||
|
||||
std::vector<CRecordHeadersFootersContainer*> oArrayHeadersFootersInfo;
|
||||
pMaster->GetRecordsByType(&oArrayHeadersFootersInfo, true, false);
|
||||
@ -1712,8 +1712,7 @@ void CPPTUserInfo::LoadMaster(_typeMaster type, CRecordSlide* pMaster, CSlideInf
|
||||
pMasterWrapper = new CSlideInfo();
|
||||
|
||||
// записываем шрифты ---------------------------------------------------------------
|
||||
int nCountFonts = m_arrFonts.size();
|
||||
for (int i = 0; i < nCountFonts; ++i)
|
||||
for (size_t i = 0; i < m_arrFonts.size(); ++i)
|
||||
{
|
||||
pTheme->m_arFonts.push_back(m_arrFonts[i]);
|
||||
}
|
||||
@ -1891,7 +1890,7 @@ void CPPTUserInfo::LoadNoMainMaster(_UINT32 dwMasterID)
|
||||
|
||||
pTheme->m_mapTitleLayout[dwMasterID] = lLayoutID;
|
||||
|
||||
std::vector<NSPresentationEditor::CColor>* pArrayColorScheme = &pTheme->m_arColorScheme;
|
||||
std::vector<ODRAW::CColor>* pArrayColorScheme = &pTheme->m_arColorScheme;
|
||||
// читаем цветовую схему -----------------------------------------------------------
|
||||
if (!bMasterColorScheme)
|
||||
{
|
||||
@ -2006,23 +2005,23 @@ void CPPTUserInfo::LoadNoMainMaster(_UINT32 dwMasterID)
|
||||
|
||||
if (pLayout->m_bHasSlideNumber)
|
||||
{
|
||||
if (pLayout->m_mapPlaceholders.find(MasterSlideNumber) == pLayout->m_mapPlaceholders.end())
|
||||
if (pLayout->m_mapPlaceholders.find(PT_MasterSlideNumber) == pLayout->m_mapPlaceholders.end())
|
||||
{
|
||||
AddNewLayoutPlaceholder(pLayout, MasterSlideNumber, 2);
|
||||
AddNewLayoutPlaceholder(pLayout, PT_MasterSlideNumber, 2);
|
||||
}
|
||||
}
|
||||
if (pLayout->m_bHasDate && pLayout->m_nFormatDate == 1)
|
||||
{
|
||||
if (pLayout->m_mapPlaceholders.find(MasterDate) == pLayout->m_mapPlaceholders.end())
|
||||
if (pLayout->m_mapPlaceholders.find(PT_MasterDate) == pLayout->m_mapPlaceholders.end())
|
||||
{
|
||||
AddNewLayoutPlaceholder(pLayout, MasterDate, 2);
|
||||
AddNewLayoutPlaceholder(pLayout, PT_MasterDate, 2);
|
||||
}
|
||||
}
|
||||
if (pLayout->m_bHasFooter)
|
||||
{
|
||||
if (pLayout->m_mapPlaceholders.find(MasterFooter) == pLayout->m_mapPlaceholders.end())
|
||||
if (pLayout->m_mapPlaceholders.find(PT_MasterFooter) == pLayout->m_mapPlaceholders.end())
|
||||
{
|
||||
AddNewLayoutPlaceholder(pLayout, MasterFooter, 1);
|
||||
AddNewLayoutPlaceholder(pLayout, PT_MasterFooter, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2249,7 +2248,7 @@ void CPPTUserInfo::LoadExternal(CRecordExObjListContainer* pExObjects)
|
||||
|
||||
if ((3 <= oArrayStrings.size()) && (1 == oArrayData.size()))
|
||||
{
|
||||
NSPresentationEditor::CExFilesInfo oInfo;
|
||||
PPT_FORMAT::CExFilesInfo oInfo;
|
||||
|
||||
oInfo.m_strFilePath = m_oExMedia.m_strPresentationDirectory + FILE_SEPARATOR_STR + oArrayStrings[0]->m_strText + _T(".audio");
|
||||
oInfo.m_dwID = (_UINT32)XmlUtils::GetInteger(oArrayStrings[2]->m_strText.c_str());
|
||||
@ -2300,10 +2299,10 @@ void CPPTUserInfo::LoadExternal(CRecordExObjListContainer* pExObjects)
|
||||
_UINT32 dwKeySound = oArrayAudioEmbedded[nIndex]->m_nSoundID;
|
||||
_UINT32 dwKeyObj = oArrayAudioEmbedded[nIndex]->m_oMedia.m_nExObjID;
|
||||
|
||||
NSPresentationEditor::CExFilesInfo* pInfo = m_oExMedia.LockAudioFromCollection(dwKeySound);
|
||||
PPT_FORMAT::CExFilesInfo* pInfo = m_oExMedia.LockAudioFromCollection(dwKeySound);
|
||||
if (NULL != pInfo)
|
||||
{
|
||||
NSPresentationEditor::CExFilesInfo oAudio;
|
||||
PPT_FORMAT::CExFilesInfo oAudio;
|
||||
|
||||
oAudio.m_dwID = dwKeyObj;
|
||||
oAudio.m_strFilePath = pInfo->m_strFilePath;
|
||||
@ -2316,7 +2315,7 @@ void CPPTUserInfo::LoadExternal(CRecordExObjListContainer* pExObjects)
|
||||
{
|
||||
_UINT32 dwKeyObj = oArrayAudioCD[nIndex]->m_oMedia.m_nExObjID;
|
||||
|
||||
NSPresentationEditor::CExFilesInfo* pInfo = m_oExMedia.LockAudio(dwKeyObj);
|
||||
PPT_FORMAT::CExFilesInfo* pInfo = m_oExMedia.LockAudio(dwKeyObj);
|
||||
|
||||
if (NULL != pInfo)
|
||||
{
|
||||
@ -2342,7 +2341,7 @@ void CPPTUserInfo::LoadExternal(CRecordExObjListContainer* pExObjects)
|
||||
|
||||
if (oArrayCString.size() > 0 && oArrayHyperlink.size() > 0)
|
||||
{
|
||||
NSPresentationEditor::CExFilesInfo oInfo;
|
||||
PPT_FORMAT::CExFilesInfo oInfo;
|
||||
|
||||
oInfo.m_dwID = oArrayHyperlink[0]->m_nHyperlinkID;
|
||||
for (size_t i = 0 ; i < oArrayCString.size(); i++)
|
||||
@ -2365,7 +2364,7 @@ void CPPTUserInfo::LoadExVideo(CRecordsContainer* pExObject)
|
||||
|
||||
if ((1 == oArrayExMedia.size()) && (1 == oArrayCString.size()))
|
||||
{
|
||||
NSPresentationEditor::CExFilesInfo oInfo;
|
||||
PPT_FORMAT::CExFilesInfo oInfo;
|
||||
|
||||
oInfo.m_dwID = oArrayExMedia[0]->m_nExObjID;
|
||||
oInfo.m_strFilePath = oArrayCString[0]->m_strText;
|
||||
@ -2388,7 +2387,7 @@ void CPPTUserInfo::LoadExAudio(CRecordsContainer* pExObject)
|
||||
|
||||
if ((1 == oArrayExMedia.size()) && (1 == oArrayCString.size()))
|
||||
{
|
||||
NSPresentationEditor::CExFilesInfo oInfo;
|
||||
PPT_FORMAT::CExFilesInfo oInfo;
|
||||
|
||||
oInfo.m_dwID = oArrayExMedia[0]->m_nExObjID;
|
||||
oInfo.m_strFilePath = oArrayCString[0]->m_strText;
|
||||
@ -2459,22 +2458,21 @@ void CPPTUserInfo::AddAudioTransition (_UINT32 dwSlideID, CTransition* pTransiti
|
||||
delete pAudio;
|
||||
}
|
||||
|
||||
void CPPTUserInfo::CreateDefaultStyle(NSPresentationEditor::CTextStyles& pStyle, NSPresentationEditor::CTheme* pTheme)
|
||||
void CPPTUserInfo::CreateDefaultStyle(PPT_FORMAT::CTextStyles& pStyle, PPT_FORMAT::CTheme* pTheme)
|
||||
{
|
||||
for (int i = 0; i < 10; ++i)
|
||||
{
|
||||
if (!pStyle.m_pLevels[i].is_init())
|
||||
pStyle.m_pLevels[i] = new NSPresentationEditor::CTextStyleLevel();
|
||||
pStyle.m_pLevels[i] = new PPT_FORMAT::CTextStyleLevel();
|
||||
|
||||
NSPresentationEditor::CTextPFRun* pPF = &pStyle.m_pLevels[i]->m_oPFRun;
|
||||
NSPresentationEditor::CTextCFRun* pCF = &pStyle.m_pLevels[i]->m_oCFRun;
|
||||
PPT_FORMAT::CTextPFRun* pPF = &pStyle.m_pLevels[i]->m_oPFRun;
|
||||
PPT_FORMAT::CTextCFRun* pCF = &pStyle.m_pLevels[i]->m_oCFRun;
|
||||
|
||||
pCF->Language = m_wLanguage;
|
||||
|
||||
pCF->Size = 18;
|
||||
|
||||
pCF->FontProperties = new NSPresentationEditor::CFontProperties();
|
||||
pCF->FontProperties->SetFont(pTheme->m_arFonts[0]);
|
||||
pCF->font.font = new PPT_FORMAT::CFontProperty(pTheme->m_arFonts.size() > 1 ? pTheme->m_arFonts[1] : pTheme->m_arFonts[0]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -39,13 +39,13 @@
|
||||
#include "SlideInfo.h"
|
||||
|
||||
class CPPTDocumentInfo;
|
||||
using namespace NSPresentationEditor;
|
||||
using namespace PPT_FORMAT;
|
||||
|
||||
class CPPTUserInfo : public CDocument
|
||||
{
|
||||
public:
|
||||
CUserEdit m_oUser;
|
||||
std::map<_UINT32, _UINT32> m_mapOffsetInPIDs;
|
||||
std::map<_UINT32, _UINT32> m_mapOffsetInPIDs;
|
||||
CRecordDocument m_oDocument;
|
||||
|
||||
CEncryptionHeader m_oEncryptionHeader;
|
||||
@ -55,16 +55,16 @@ public:
|
||||
POLE::Storage* m_pStorageDecrypt;
|
||||
std::vector<CFStreamPtr> m_arStreamDecrypt; // на каждый Persist свой ... оО
|
||||
|
||||
std::map<_UINT32, CRecordSlide*> m_mapSlides;
|
||||
std::map<_UINT32, CRecordSlide*> m_mapMasters;
|
||||
std::map<_UINT32, CRecordSlide*> m_mapNotes;
|
||||
std::map<_UINT32, CRecordSlide*> m_mapSlides;
|
||||
std::map<_UINT32, CRecordSlide*> m_mapMasters;
|
||||
std::map<_UINT32, CRecordSlide*> m_mapNotes;
|
||||
|
||||
std::map<_UINT32, CRecordSlide*> m_mapNotesMasters;
|
||||
std::map<_UINT32, CRecordSlide*> m_mapHandoutMasters;
|
||||
std::map<_UINT32, CRecordSlide*> m_mapNotesMasters;
|
||||
std::map<_UINT32, CRecordSlide*> m_mapHandoutMasters;
|
||||
|
||||
std::vector<_UINT32> m_arrSlidesOrder;
|
||||
std::vector<_UINT32> m_arrMastersOrder;
|
||||
std::vector<_UINT32> m_arrNotesOrder;
|
||||
std::vector<_UINT32> m_arrSlidesOrder;
|
||||
std::vector<_UINT32> m_arrMastersOrder;
|
||||
std::vector<_UINT32> m_arrNotesOrder;
|
||||
|
||||
// перевод id мастера в индекс темы/шаблона
|
||||
std::map<_UINT32, LONG> m_mapMasterToTheme;
|
||||
@ -72,7 +72,6 @@ public:
|
||||
// original id -> natural id
|
||||
std::map<_UINT32, _UINT32> m_mapMasterOriginalIds;
|
||||
|
||||
// это как бы ППT-шная обертка над слайдом
|
||||
std::vector<CSlideInfo> m_arSlideWrapper;
|
||||
std::vector<CSlideInfo> m_arMasterWrapper;
|
||||
std::vector<CSlideInfo> m_arNotesWrapper;
|
||||
@ -80,11 +79,10 @@ public:
|
||||
CSlideInfo* m_pNotesMasterWrapper;
|
||||
CSlideInfo* m_pHandoutMasterWrapper;
|
||||
|
||||
// эти параметры - одни на весь документ.
|
||||
// чтобы поддержать нашу схему (пптх) - копируем их в темы
|
||||
std::vector<CRecordBlipStoreContainer*> m_arrBlipStore;
|
||||
std::vector<CFont> m_arrFonts;
|
||||
NSPresentationEditor::CTextStyles m_oDefaultTextStyle;
|
||||
std::vector<CFontProperty> m_arrFonts;
|
||||
|
||||
PPT_FORMAT::CTextStyles m_oDefaultTextStyle;
|
||||
|
||||
vector_string m_PlaceholdersReplaceString[3]; //0-dates, 1 - headers, 2 - footers
|
||||
|
||||
@ -93,12 +91,10 @@ public:
|
||||
bool m_bHasFooter;
|
||||
int m_nFormatDate;
|
||||
|
||||
// чтобы загружать неизмененные элементы от других юзеров (предыдущих)
|
||||
CPPTDocumentInfo* m_pDocumentInfo;
|
||||
CRecordVbaProjectStg* m_VbaProjectStg;
|
||||
int m_lIndexThisUser;
|
||||
|
||||
// Animations structures
|
||||
std::map <_UINT32, Animations::CSlideTimeLine*> m_mapAnimations;
|
||||
|
||||
double m_nWriteSlideTimeOffset;
|
||||
@ -106,7 +102,6 @@ public:
|
||||
|
||||
std::map<_UINT32, CSlideShowSlideInfoAtom> m_mapTransitions;
|
||||
|
||||
// номера "пустых" картинок - в эти пути не будем сохранять
|
||||
std::vector<int> m_arOffsetPictures;
|
||||
bool m_bIsSetupEmpty;
|
||||
|
||||
@ -161,7 +156,7 @@ public:
|
||||
void LoadExVideo(CRecordsContainer* pExObject);
|
||||
void LoadExAudio(CRecordsContainer* pExObject);
|
||||
|
||||
void CreateDefaultStyle(NSPresentationEditor::CTextStyles& pStyle, NSPresentationEditor::CTheme* pTheme);
|
||||
void CreateDefaultStyle(PPT_FORMAT::CTextStyles& pStyle, PPT_FORMAT::CTheme* pTheme);
|
||||
void CorrectColorScheme(std::vector<CColor>& oScheme)
|
||||
{
|
||||
if (oScheme.size() < 1) return;
|
||||
@ -174,10 +169,10 @@ public:
|
||||
oArrayMem.push_back(oScheme[0]);//4
|
||||
oArrayMem.push_back(oScheme[4]);//5 //accent1
|
||||
oArrayMem.push_back(oScheme[5]);//6 //accent2
|
||||
oArrayMem.push_back(oScheme[0]);//7 //accent3
|
||||
oArrayMem.push_back(oScheme[5]);//8 //accent4
|
||||
oArrayMem.push_back(oScheme[4]);//9 //accent5
|
||||
oArrayMem.push_back(oScheme[7]);//10 //accent6
|
||||
oArrayMem.push_back(CColor(0xAAAAAA));//(oScheme[0]);//7 //accent3
|
||||
oArrayMem.push_back(CColor(0xDCDCDC));//(oScheme[5]);//8 //accent4
|
||||
oArrayMem.push_back(CColor(0xDBF1FA));//(oScheme[4]);//9 //accent5
|
||||
oArrayMem.push_back(CColor(0x4B9DCA));//(oScheme[7]);//10 //accent6
|
||||
oArrayMem.push_back(oScheme[6]);//11 //hlink
|
||||
oArrayMem.push_back(oScheme[7]);//12 //folHlink
|
||||
oArrayMem.push_back(oScheme[0]);//13 //lt1
|
||||
@ -201,122 +196,109 @@ public:
|
||||
{
|
||||
switch (nGeom)
|
||||
{
|
||||
case 0x00: //SL_TitleSlide
|
||||
case 0x02: //SL_MasterTitle
|
||||
return _T("title");
|
||||
case 0x01: // SL_TitleBody
|
||||
case SL_TitleSlide:
|
||||
case SL_MasterTitle: return L"title";
|
||||
case SL_TitleBody:
|
||||
{
|
||||
int ind = 0;
|
||||
if (pPlaceholders[0] == 13 && pPlaceholders[1] != 0) ind++;
|
||||
NSOfficePPT::PlaceholderEnum phbody = (NSOfficePPT::PlaceholderEnum)pPlaceholders[ind];
|
||||
ePlaceholderType phbody = (ePlaceholderType)pPlaceholders[ind];
|
||||
switch (phbody)
|
||||
{
|
||||
case NSOfficePPT::MasterTitle:
|
||||
return _T("title");
|
||||
case NSOfficePPT::Table:
|
||||
return _T("tbl");
|
||||
case NSOfficePPT::OrganizationChart:
|
||||
return _T("dgm");
|
||||
case NSOfficePPT::Graph:
|
||||
return _T("chart");
|
||||
case PT_MasterTitle: return L"title";
|
||||
case PT_Table: return L"tbl";
|
||||
case PT_OrgChart: return L"dgm";
|
||||
case PT_Graph: return L"chart";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return _T("obj");
|
||||
return L"obj";
|
||||
}
|
||||
case 0x07: //SL_TitleOnly
|
||||
return _T("titleOnly");
|
||||
case 0x08: //SL_TwoColumns
|
||||
case SL_TitleOnly: return L"titleOnly";
|
||||
case SL_TwoColumns:
|
||||
{
|
||||
NSOfficePPT::PlaceholderEnum leftType = (NSOfficePPT::PlaceholderEnum)pPlaceholders[1];
|
||||
NSOfficePPT::PlaceholderEnum rightType = (NSOfficePPT::PlaceholderEnum)pPlaceholders[2];
|
||||
ePlaceholderType leftType = (ePlaceholderType)pPlaceholders[1];
|
||||
ePlaceholderType rightType = (ePlaceholderType)pPlaceholders[2];
|
||||
|
||||
if (leftType == NSOfficePPT::Body && rightType == NSOfficePPT::Object)
|
||||
if (leftType == PT_Body && rightType == PT_Object)
|
||||
{
|
||||
return _T("txAndObj");
|
||||
return L"txAndObj";
|
||||
}
|
||||
else if (leftType == NSOfficePPT::Object && rightType == NSOfficePPT::Body)
|
||||
else if (leftType == PT_Object && rightType == PT_Body)
|
||||
{
|
||||
return _T("objAndTx");
|
||||
return L"objAndTx";
|
||||
}
|
||||
else if (leftType == NSOfficePPT::Body && rightType == NSOfficePPT::ClipArt)
|
||||
else if (leftType == PT_Body && rightType == PT_ClipArt)
|
||||
{
|
||||
return _T("txAndClipArt");
|
||||
return L"txAndClipArt";
|
||||
}
|
||||
else if (leftType == NSOfficePPT::ClipArt && rightType == NSOfficePPT::Body)
|
||||
else if (leftType == PT_ClipArt && rightType == PT_Body)
|
||||
{
|
||||
return _T("clipArtAndTx");
|
||||
return L"clipArtAndTx";
|
||||
}
|
||||
else if (leftType == NSOfficePPT::Body && rightType == NSOfficePPT::Graph)
|
||||
else if (leftType == PT_Body && rightType == PT_Graph)
|
||||
{
|
||||
return _T("txAndChart");
|
||||
return L"txAndChart";
|
||||
}
|
||||
else if (leftType == NSOfficePPT::Graph && rightType == NSOfficePPT::Body)
|
||||
else if (leftType == PT_Graph && rightType == PT_Body)
|
||||
{
|
||||
return _T("chartAndTx");
|
||||
return L"chartAndTx";
|
||||
}
|
||||
else if (leftType == NSOfficePPT::Body && rightType == NSOfficePPT::MediaClip)
|
||||
else if (leftType == PT_Body && rightType == PT_Media)
|
||||
{
|
||||
return _T("txAndMedia");
|
||||
return L"txAndMedia";
|
||||
}
|
||||
else if (leftType == NSOfficePPT::MediaClip && rightType == NSOfficePPT::Body)
|
||||
else if (leftType == PT_Media && rightType == PT_Body)
|
||||
{
|
||||
return _T("mediaAndTx");
|
||||
return L"mediaAndTx";
|
||||
}
|
||||
return _T("twoObj");
|
||||
return L"twoObj";
|
||||
}
|
||||
case 0x09: //SL_TwoRows
|
||||
case SL_TwoRows:
|
||||
{
|
||||
NSOfficePPT::PlaceholderEnum topType = (NSOfficePPT::PlaceholderEnum)pPlaceholders[1];
|
||||
NSOfficePPT::PlaceholderEnum bottomType = (NSOfficePPT::PlaceholderEnum)pPlaceholders[2];
|
||||
ePlaceholderType topType = (ePlaceholderType)pPlaceholders[1];
|
||||
ePlaceholderType bottomType = (ePlaceholderType)pPlaceholders[2];
|
||||
|
||||
if (topType == NSOfficePPT::Body && bottomType == NSOfficePPT::Object)
|
||||
if (topType == PT_Body && bottomType == PT_Object)
|
||||
{
|
||||
return _T("txOverObj");
|
||||
return L"txOverObj";
|
||||
}
|
||||
return _T("objOverTx");
|
||||
return L"objOverTx";
|
||||
}
|
||||
case 0x0A: //SL_ColumnTwoRows
|
||||
case SL_ColumnTwoRows:
|
||||
{
|
||||
NSOfficePPT::PlaceholderEnum leftType = (NSOfficePPT::PlaceholderEnum)pPlaceholders[1];
|
||||
ePlaceholderType leftType = (ePlaceholderType)pPlaceholders[1];
|
||||
|
||||
if (leftType == NSOfficePPT::Object)
|
||||
if (leftType == PT_Object)
|
||||
{
|
||||
return _T("objAndTwoObj");
|
||||
return L"objAndTwoObj";
|
||||
}
|
||||
return _T("txAndTwoObj");
|
||||
return L"txAndTwoObj";
|
||||
}
|
||||
case 0x0B: //SL_TwoRowsColumn
|
||||
case SL_TwoRowsColumn:
|
||||
{
|
||||
NSOfficePPT::PlaceholderEnum rightType = (NSOfficePPT::PlaceholderEnum)pPlaceholders[2];
|
||||
ePlaceholderType rightType = (ePlaceholderType)pPlaceholders[2];
|
||||
|
||||
if (rightType == NSOfficePPT::Object)
|
||||
if (rightType == PT_Object)
|
||||
{
|
||||
return _T("twoObjAndObj");
|
||||
return L"twoObjAndObj";
|
||||
}
|
||||
return _T("twoObjAndTx");
|
||||
return L"twoObjAndTx";
|
||||
}
|
||||
case 0x0D: //SL_TwoColumnsRow
|
||||
return _T("twoObjOverTx");
|
||||
case 0x0E://SL_FourObjects
|
||||
return _T("fourObj");
|
||||
case 0x0F: //SL_BigObject
|
||||
//return _T("tx");
|
||||
return _T("objOnly");
|
||||
case 0x10: //SL_Blank
|
||||
return _T("blank");
|
||||
case 0x11: //SL_VerticalTitleBody
|
||||
return _T("vertTitleAndTx");
|
||||
case 0x12: //SL_VerticalTwoRows
|
||||
return _T("vertTx");
|
||||
case SL_TwoColumnsRow: return L"twoObjOverTx";
|
||||
case SL_FourObjects: return L"fourObj";
|
||||
case SL_BigObject: return L"objOnly";
|
||||
case SL_Blank: return L"blank";
|
||||
case SL_VerticalTitleBody: return L"vertTitleAndTx";
|
||||
case SL_VerticalTwoRows: return L"vertTx";
|
||||
}
|
||||
return _T("blank");
|
||||
return L"blank";
|
||||
}
|
||||
|
||||
void AddAnimation (_UINT32 dwSlideID, double Width, double Height, CElementPtr pElement);
|
||||
void AddAudioTransition (_UINT32 dwSlideID, CTransition* pTransition, const std::wstring& strFilePath);
|
||||
|
||||
int AddNewLayout(NSPresentationEditor::CTheme* pTheme, CRecordSlide* pRecordSlide, bool addShapes, bool bMasterObjects);
|
||||
int AddNewLayout(PPT_FORMAT::CTheme* pTheme, CRecordSlide* pRecordSlide, bool addShapes, bool bMasterObjects);
|
||||
|
||||
CElementPtr AddNewLayoutPlaceholder (CLayout *pLayout, int placeholderType, int placeholderSizePreset = -1);
|
||||
|
||||
|
||||
@ -79,6 +79,7 @@ typedef BYTE BOOL1;
|
||||
#define RECORD_TYPE_NAMEDSHOW 1041
|
||||
#define RECORD_TYPE_NAMEDSHOW_SLIDES 1042
|
||||
#define RECORD_TYPE_SHEET_PROPERTIES 1044
|
||||
#define RECORD_TYPE_NORMALVIEW_SETINFO9 1045
|
||||
|
||||
#define RECORD_TYPE_ORIGINALMAINMASTERID 1052
|
||||
#define RECORD_TYPE_COMPOSITEMASTERID 1053
|
||||
@ -95,6 +96,7 @@ typedef BYTE BOOL1;
|
||||
|
||||
#define RECORD_TYPE_LIST 2000
|
||||
#define RECORD_TYPE_FONTCOLLECTION 2005
|
||||
#define RECORD_TYPE_FONTCOLLECTION10 2006
|
||||
#define RECORD_TYPE_BOOKMARKCOLLECTION 2019
|
||||
#define RECORD_TYPE_SOUNDCOLLECTION 2020
|
||||
#define RECORD_TYPE_SOUNDCOLL_ATOM 2021
|
||||
@ -381,6 +383,7 @@ static std::string GetRecordName(_UINT32 dwType)
|
||||
case RECORD_TYPE_PERSISTPTRINCREMENTALBLOCK : { strName = ("PersistPtrIncrementalBlock"); break; }
|
||||
case RECORD_TYPE_GSCALING_ATOM2 : { strName = ("GScalingAtom2"); break; }
|
||||
case RECORD_TYPE_GRCOLOR_ATOM2 : { strName = ("GRColorAtom2"); break; }
|
||||
case RECORD_TYPE_NORMALVIEW_SETINFO9 : { strName = ("NormalViewSetInfoAtom"); break; }
|
||||
|
||||
// Records ~12000 seem to be related to the Comments used in PPT 2000/XP
|
||||
// (Comments in PPT97 are normal Escher text boxes)
|
||||
|
||||
@ -36,9 +36,7 @@
|
||||
#include "../../../ASCOfficeDocFile/DocDocxConverter/MemoryStream.h"
|
||||
#include "../../../OfficeCryptReader/source/CryptTransform.h"
|
||||
|
||||
using namespace NSPresentationEditor;
|
||||
|
||||
namespace NSPresentationEditor
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
static CColor GetStandartPaletteColor(int index)
|
||||
{
|
||||
@ -108,7 +106,7 @@ namespace NSPresentationEditor
|
||||
|
||||
namespace NSStreamReader
|
||||
{
|
||||
void Read(POLE::Stream* pStream, NSPresentationEditor::CTextSIRun& oRun, bool bIsIndentation)
|
||||
void Read(POLE::Stream* pStream, PPT_FORMAT::CTextSIRun& oRun, bool bIsIndentation)
|
||||
{
|
||||
if (bIsIndentation)
|
||||
{
|
||||
@ -170,7 +168,7 @@ namespace NSStreamReader
|
||||
}*/
|
||||
}
|
||||
|
||||
void Read(POLE::Stream* pStream, NSPresentationEditor::CTextRuler& oRun)
|
||||
void Read(POLE::Stream* pStream, PPT_FORMAT::CTextRuler& oRun)
|
||||
{
|
||||
double dScaleX = 625 * 2.54 ;
|
||||
//1/576 inch = 72/576 pt = 360000 *72 * 2.54 /(72*576) emu
|
||||
@ -237,7 +235,7 @@ namespace NSStreamReader
|
||||
}
|
||||
|
||||
|
||||
void CTextPFRun_ppt::LoadFromStream(POLE::Stream* pStream, bool bIsIndentation)
|
||||
void CTextPFRunRecord::LoadFromStream(POLE::Stream* pStream, bool bIsIndentation)
|
||||
{
|
||||
double dScaleX = 625 * 2.54 ;
|
||||
//1/576 inch = 72/576 pt = 360000 *72 * 2.54 /(72*576) emu
|
||||
@ -345,7 +343,7 @@ void CTextPFRun_ppt::LoadFromStream(POLE::Stream* pStream, bool bIsIndentation)
|
||||
SColorAtom oColorAtom;
|
||||
NSStreamReader::Read(pStream, oColorAtom);
|
||||
|
||||
NSPresentationEditor::CColor oColor;
|
||||
ODRAW::CColor oColor;
|
||||
|
||||
oColor.R = oColorAtom.R;
|
||||
oColor.G = oColorAtom.G;
|
||||
@ -356,7 +354,7 @@ void CTextPFRun_ppt::LoadFromStream(POLE::Stream* pStream, bool bIsIndentation)
|
||||
if (oColorAtom.bSchemeIndex)
|
||||
{
|
||||
oColor.m_lSchemeIndex = oColorAtom.Index;
|
||||
NSPresentationEditor::CorrectColorPPT(oColor.m_lSchemeIndex);
|
||||
ODRAW::CorrectColorPPT(oColor.m_lSchemeIndex);
|
||||
}
|
||||
|
||||
if (oColorAtom.bSchemeIndex || oColorAtom.bPaletteRGB)
|
||||
@ -413,7 +411,7 @@ void CTextPFRun_ppt::LoadFromStream(POLE::Stream* pStream, bool bIsIndentation)
|
||||
}
|
||||
|
||||
|
||||
void CTextCFRun_ppt::LoadFromStream(POLE::Stream* pStream, bool bIsIndentation)
|
||||
void CTextCFRunRecord::LoadFromStream(POLE::Stream* pStream, bool bIsIndentation)
|
||||
{
|
||||
if (bIsIndentation)
|
||||
{
|
||||
@ -474,13 +472,13 @@ void CTextCFRun_ppt::LoadFromStream(POLE::Stream* pStream, bool bIsIndentation)
|
||||
m_oRun.fontRef = StreamUtils::ReadWORD(pStream);
|
||||
|
||||
if (EAFontRef_)
|
||||
m_oRun.EAFontRef = StreamUtils::ReadWORD(pStream);
|
||||
m_oRun.eaFontRef = StreamUtils::ReadWORD(pStream);
|
||||
|
||||
if (AnsiFontRef_)
|
||||
m_oRun.AnsiFontRef = StreamUtils::ReadWORD(pStream);
|
||||
m_oRun.ansiFontRef = StreamUtils::ReadWORD(pStream);
|
||||
|
||||
if (SymbolFontRef_)
|
||||
m_oRun.SymbolFontRef = StreamUtils::ReadWORD(pStream);
|
||||
m_oRun.symbolFontRef = StreamUtils::ReadWORD(pStream);
|
||||
|
||||
if (size_)
|
||||
m_oRun.Size = StreamUtils::ReadWORD(pStream);
|
||||
@ -490,7 +488,7 @@ void CTextCFRun_ppt::LoadFromStream(POLE::Stream* pStream, bool bIsIndentation)
|
||||
SColorAtom oColorAtom;
|
||||
NSStreamReader::Read(pStream, oColorAtom);
|
||||
|
||||
NSPresentationEditor::CColor oColor;
|
||||
ODRAW::CColor oColor;
|
||||
|
||||
oColor.R = oColorAtom.R;
|
||||
oColor.G = oColorAtom.G;
|
||||
@ -501,7 +499,7 @@ void CTextCFRun_ppt::LoadFromStream(POLE::Stream* pStream, bool bIsIndentation)
|
||||
if (oColorAtom.Index < 8 && oColorAtom.bSchemeIndex)
|
||||
{
|
||||
oColor.m_lSchemeIndex = oColorAtom.Index;
|
||||
NSPresentationEditor::CorrectColorPPT(oColor.m_lSchemeIndex);
|
||||
ODRAW::CorrectColorPPT(oColor.m_lSchemeIndex);
|
||||
}
|
||||
if (oColorAtom.bSchemeIndex || oColorAtom.bPaletteRGB)
|
||||
{
|
||||
@ -516,10 +514,10 @@ void CTextCFRun_ppt::LoadFromStream(POLE::Stream* pStream, bool bIsIndentation)
|
||||
}
|
||||
|
||||
|
||||
namespace NSPresentationEditor
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
void ConvertPPTTextToEditorStructure(std::vector<CTextPFRun_ppt>& oArrayPF, std::vector<CTextCFRun_ppt>& oArrayCF,
|
||||
std::wstring& strText, NSPresentationEditor::CTextAttributesEx& oAttributes)
|
||||
void ConvertPPTTextToEditorStructure(std::vector<CTextPFRunRecord>& oArrayPF, std::vector<CTextCFRunRecord>& oArrayCF,
|
||||
std::wstring& strText, PPT_FORMAT::CTextAttributesEx& oAttributes)
|
||||
{
|
||||
int nCountPFs = (int)oArrayPF.size();
|
||||
int nCountCFs = (int)oArrayCF.size();
|
||||
@ -536,7 +534,7 @@ namespace NSPresentationEditor
|
||||
{
|
||||
CParagraph elm;
|
||||
oAttributes.m_arParagraphs.push_back(elm);
|
||||
NSPresentationEditor::CParagraph* pPar = &oAttributes.m_arParagraphs[nIndexPF];
|
||||
PPT_FORMAT::CParagraph* pPar = &oAttributes.m_arParagraphs[nIndexPF];
|
||||
|
||||
pPar->m_lTextLevel = oArrayPF[nIndexPF].m_lLevel;
|
||||
pPar->m_oPFRun = oArrayPF[nIndexPF].m_oRun;
|
||||
@ -564,7 +562,7 @@ namespace NSPresentationEditor
|
||||
{
|
||||
nOffsetCF += nCountInPF;
|
||||
|
||||
NSPresentationEditor::CSpan oSpan;
|
||||
PPT_FORMAT::CSpan oSpan;
|
||||
oSpan.m_oRun = oArrayCF[nCurrentCF].m_oRun;
|
||||
|
||||
nCountAddTrue = nCountInPF;
|
||||
@ -586,7 +584,7 @@ namespace NSPresentationEditor
|
||||
{
|
||||
nOffsetCF = 0;
|
||||
|
||||
NSPresentationEditor::CSpan oSpan;
|
||||
PPT_FORMAT::CSpan oSpan;
|
||||
oSpan.m_oRun = oArrayCF[nCurrentCF].m_oRun;
|
||||
|
||||
if (nCountAddTrue > 0)
|
||||
@ -602,7 +600,7 @@ namespace NSPresentationEditor
|
||||
{
|
||||
nOffsetCF = 0;
|
||||
|
||||
NSPresentationEditor::CSpan oSpan;
|
||||
PPT_FORMAT::CSpan oSpan;
|
||||
oSpan.m_oRun = oArrayCF[nCurrentCF].m_oRun;
|
||||
|
||||
if (nCountAddTrue > 0)
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
#include "../../../OfficeUtils/src/OfficeUtils.h"
|
||||
|
||||
|
||||
using namespace NSPresentationEditor;
|
||||
using namespace PPT_FORMAT;
|
||||
|
||||
namespace CRYPT
|
||||
{
|
||||
@ -285,27 +285,27 @@ namespace NSStreamReader
|
||||
}
|
||||
}
|
||||
|
||||
void Read(POLE::Stream* pStream, NSPresentationEditor::CTextSIRun& oRun, bool bIsIndentation = true);
|
||||
void Read(POLE::Stream* pStream, NSPresentationEditor::CTextRuler& oRun);
|
||||
void Read(POLE::Stream* pStream, PPT_FORMAT::CTextSIRun& oRun, bool bIsIndentation = true);
|
||||
void Read(POLE::Stream* pStream, PPT_FORMAT::CTextRuler& oRun);
|
||||
}
|
||||
|
||||
class CTextPFRun_ppt
|
||||
class CTextPFRunRecord
|
||||
{
|
||||
public:
|
||||
NSPresentationEditor::CTextPFRun m_oRun;
|
||||
LONG m_lLevel;
|
||||
LONG m_lCount;
|
||||
PPT_FORMAT::CTextPFRun m_oRun;
|
||||
LONG m_lLevel;
|
||||
LONG m_lCount;
|
||||
|
||||
CTextPFRun_ppt() : m_oRun()
|
||||
CTextPFRunRecord() : m_oRun()
|
||||
{
|
||||
m_lLevel = -1;
|
||||
m_lCount = 0;
|
||||
}
|
||||
CTextPFRun_ppt(const CTextPFRun_ppt& oSrc)
|
||||
CTextPFRunRecord(const CTextPFRunRecord& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
CTextPFRun_ppt& operator=(const CTextPFRun_ppt& oSrc)
|
||||
CTextPFRunRecord& operator=(const CTextPFRunRecord& oSrc)
|
||||
{
|
||||
m_oRun = oSrc.m_oRun;
|
||||
m_lLevel = oSrc.m_lLevel;
|
||||
@ -316,21 +316,21 @@ public:
|
||||
void LoadFromStream(POLE::Stream* pStream, bool bIsIndentation = true);
|
||||
};
|
||||
|
||||
class CTextCFRun_ppt
|
||||
class CTextCFRunRecord
|
||||
{
|
||||
public:
|
||||
NSPresentationEditor::CTextCFRun m_oRun;
|
||||
LONG m_lCount;
|
||||
PPT_FORMAT::CTextCFRun m_oRun;
|
||||
LONG m_lCount;
|
||||
|
||||
CTextCFRun_ppt() : m_oRun()
|
||||
CTextCFRunRecord() : m_oRun()
|
||||
{
|
||||
m_lCount = 0;
|
||||
}
|
||||
CTextCFRun_ppt(const CTextCFRun_ppt& oSrc)
|
||||
CTextCFRunRecord(const CTextCFRunRecord& oSrc)
|
||||
{
|
||||
*this = oSrc;
|
||||
}
|
||||
CTextCFRun_ppt& operator=(const CTextCFRun_ppt& oSrc)
|
||||
CTextCFRunRecord& operator=(const CTextCFRunRecord& oSrc)
|
||||
{
|
||||
m_oRun = oSrc.m_oRun;
|
||||
m_lCount = oSrc.m_lCount;
|
||||
@ -340,8 +340,8 @@ public:
|
||||
void LoadFromStream(POLE::Stream* pStream, bool bIsIndentation = true);
|
||||
};
|
||||
|
||||
namespace NSPresentationEditor
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
void ConvertPPTTextToEditorStructure(std::vector<CTextPFRun_ppt>& oArrayPF, std::vector<CTextCFRun_ppt>& oArrayCF,
|
||||
std::wstring& strText, NSPresentationEditor::CTextAttributesEx& oAttributes);
|
||||
void ConvertPPTTextToEditorStructure(std::vector<CTextPFRunRecord>& oArrayPF, std::vector<CTextCFRunRecord>& oArrayCF,
|
||||
std::wstring& strText, PPT_FORMAT::CTextAttributesEx& oAttributes);
|
||||
}
|
||||
|
||||
@ -167,12 +167,14 @@ IRecord* CreateByType(SRecordHeader oHeader)
|
||||
{
|
||||
CREATE_BY_TYPE(RECORD_TYPE_SLIDELISTWITHTEXT , CRecordSlideListWithText)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_DOCUMENT_ATOM , CRecordDocumentAtom)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_ENDDOCUMENT , CRecordEndDocument)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_ENDDOCUMENT , CRecordEndDocument)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_SSLIDE_LAYOUT_ATOM , CRecordSSlideLayoutAtom)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_SLIDE_ATOM , CRecordSlideAtom)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_NOTES_ATOM , CRecordNotesAtom)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_SLIDE_PERSIST_ATOM , CRecordSlidePersistAtom)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_ENVIRONMENT , CRecordDocumentTextInfo)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_FONTCOLLECTION , CRecordFontCollection)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_FONTCOLLECTION10 , CRecordFontCollection)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_UNKNOWN , CRecordMasterPersistAtom)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_UNKNOWN , CRecordNotesPersistAtom)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_SSSLIDE_INFO_ATOM , CSlideShowSlideInfoAtom)
|
||||
@ -182,7 +184,7 @@ IRecord* CreateByType(SRecordHeader oHeader)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_VIEWINFO_ATOM , CRecordViewInfoAtom)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_SLIDE_VIEWINFO_ATOM , CRecordSlideViewInfoAtom)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_VBAINFO_ATOM , CRecordVBAInfoAtom)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_SSDOCINFO_ATOM , CRecordSSDocInfoAtom)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_SSDOCINFO_ATOM , CRecordSSDocInfoAtom)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_DOC_ROUTING_SLIP , CRecordDocRoutingSlipAtom)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_EXOBJLIST_ATOM , CRecordExObjListAtom)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_UNKNOWN , CRecordGridSpacing10Atom)
|
||||
@ -204,11 +206,9 @@ IRecord* CreateByType(SRecordHeader oHeader)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_ROUNDTRIPNOTESMASTERTEXTSTYLES12 , CRecordRoundTripNotesMasterTextStyles12Atom)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_ROUNDTRIPDOCFLAGS12 , CRecordRoundTripDocFlags12Atom)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_ROUNDTRIPSHAPECHECKSUMFORCUSTOMLAYOUTS12 , CRecordRoundTripShapeCheckSumForCustomLayouts12Atom)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_ROUNDTRIPCUSTOMTABLESTYLES12 , CRecordRoundTripCustomTableStyles12Atom)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_ROUNDTRIPCUSTOMTABLESTYLES12 , CRecordRoundTripCustomTableStyles12Atom)
|
||||
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_BOOKMARK_SEED_ATOM , CRecordBookmarkSeedAtom)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_COLOR_SCHEME_ATOM , CRecordSlideColorSchemeAtom)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_UNKNOWN, CRecordSchemeListElementColorSchemeAtom)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_UNKNOWN, CRecordBlipEntityAtom)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_UNKNOWN, CRecordExObjRefAtom)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_OEPLACEHOLDER_ATOM , CRecordPlaceHolderAtom)
|
||||
@ -236,7 +236,7 @@ IRecord* CreateByType(SRecordHeader oHeader)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_GUIDE_ATOM , CRecordGuideAtom)
|
||||
|
||||
CREATE_BY_TYPE(RECORD_TYPE_FONTENTITY_ATOM , CRecordFontEntityAtom)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_FONT_EMBEDDEDDATA , CRecordFontEmbedDataBlob)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_FONT_EMBEDDEDDATA , CRecordFontEmbedDataBlob)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_METAFILE , CRecordMetafileBlob)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_CSTRING , CRecordCString)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_SOUNDCOLL_ATOM , CRecordSoundCollAtom)
|
||||
@ -245,7 +245,7 @@ IRecord* CreateByType(SRecordHeader oHeader)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_BOOKMARK_ENTITY_ATOM , CRecordBookmarkEntityAtom)
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_EXLINK_ATOM , CRecordExOleLinkAtom)
|
||||
|
||||
//CREATE_BY_TYPE(RECORD_TYPE_SRKINSOKU_ATOM , CRecordKinsokuAtom)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_SRKINSOKU_ATOM , CRecordKinsokuAtom)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_EXHYPERLINK , CRecordExHyperlinkContainer)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_EXHYPERLINK_ATOM , CRecordExHyperlinkAtom)
|
||||
|
||||
@ -283,7 +283,9 @@ IRecord* CreateByType(SRecordHeader oHeader)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_ESCHER_SECONDARY_OPT , CRecordShapeProperties)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_ESCHER_TETRIARY_OPT , CRecordShapeProperties)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_ESCHER_REGROUPITEMS , CRecordRegGroupItems)
|
||||
|
||||
CREATE_BY_TYPE(RECORD_TYPE_ESCHER_SPLITMENUCOLORS , CRecordSplitMenuColorRecord)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_ESCHER_COLORMRU , CRecordMostRecentlyUserColors)
|
||||
|
||||
CREATE_BY_TYPE(RECORD_TYPE_EX_CDAUDIO , CRecordExCDAudioContainer)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_EX_WAVAUDIOLINK , CRecordWAVAudioLinkContainer)
|
||||
CREATE_BY_TYPE(RECORD_TYPE_EX_WAVAUDIOEMBEDDED , CRecordWAVAudioEmbeddedContainer)
|
||||
@ -318,7 +320,7 @@ IRecord* CreateByType(SRecordHeader oHeader)
|
||||
pRecord = new CUnknownRecord();
|
||||
#ifdef _DEBUG
|
||||
char str[1024]={};
|
||||
sprintf(str, "Unknown record type: %xd\t" , oHeader.RecType);
|
||||
sprintf(str, "Unknown record type: %x\t" , oHeader.RecType);
|
||||
std::cout << str << GetRecordName((_UINT32)oHeader.RecType) << "\n";
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -38,7 +38,9 @@
|
||||
#include "../../../Common/3dParty/pole/pole.h"
|
||||
#include "../../../OfficeCryptReader/source/CryptTransform.h"
|
||||
|
||||
using namespace NSPresentationEditor;
|
||||
#include <boost/smart_ptr/shared_array.hpp>
|
||||
|
||||
using namespace PPT_FORMAT;
|
||||
using namespace XLS;
|
||||
|
||||
class SRecordHeader
|
||||
@ -249,7 +251,6 @@ public:
|
||||
|
||||
/*
|
||||
class CRecordDocument : public CRecordsContainer {};
|
||||
class CRecordEnvironment : public CRecordsContainer {};
|
||||
class CRecordExAviMovie : public CRecordsContainer {};
|
||||
class CRecordExCDAudio : public CRecordsContainer {};
|
||||
class CRecordExControl : public CRecordsContainer {};
|
||||
@ -265,7 +266,6 @@ class CRecordExQuickTimeMovie : public CRecordsContainer {};
|
||||
class CRecordExVideo : public CRecordsContainer {};
|
||||
class CRecordExWAVAudioEmbedded : public CRecordsContainer {};
|
||||
class CRecordExWAVAudioLink : public CRecordsContainer {};
|
||||
class CRecordFontCollection : public CRecordsContainer {};
|
||||
class CRecordFontCollection10 : public CRecordsContainer {};
|
||||
class CRecordHandout : public CRecordsContainer {};
|
||||
class CRecordHeadersFooters : public CRecordsContainer {};
|
||||
|
||||
@ -83,7 +83,7 @@ public:
|
||||
std::map<LONG, CElementInfo> m_mapElements;
|
||||
std::vector<int>* m_parEmptyPictures;
|
||||
std::map<int, std::wstring>* m_mapFilePictures;
|
||||
nullable_base<NSPresentationEditor::CTextStyles> m_pStyles[9];
|
||||
nullable_base<PPT_FORMAT::CTextStyles> m_pStyles[9];
|
||||
|
||||
CSlideInfo()
|
||||
{
|
||||
|
||||
@ -34,8 +34,6 @@
|
||||
|
||||
class CRecordAnimationInfoAtom : public CUnknownRecord
|
||||
{
|
||||
// поля...
|
||||
|
||||
public:
|
||||
|
||||
CRecordAnimationInfoAtom()
|
||||
|
||||
@ -2878,7 +2878,7 @@ namespace Animations
|
||||
|
||||
namespace Animations
|
||||
{
|
||||
typedef NSPresentationEditor::CAnimationSimple Effect;
|
||||
typedef PPT_FORMAT::CAnimationSimple Effect;
|
||||
typedef std::vector <Effect> Effects;
|
||||
typedef std::map<_UINT32,Effects*> EffectsMap;
|
||||
typedef std::vector <double> TimeArray;
|
||||
|
||||
@ -34,10 +34,9 @@
|
||||
|
||||
class CRecordBlipEntityAtom : public CUnknownRecord
|
||||
{
|
||||
BYTE m_nWinBlipType;
|
||||
BYTE* m_pImage;
|
||||
|
||||
public:
|
||||
BYTE m_nWinBlipType;
|
||||
std::pair<boost::shared_array<unsigned char>, _INT32> data;
|
||||
|
||||
CRecordBlipEntityAtom()
|
||||
{
|
||||
|
||||
@ -34,10 +34,9 @@
|
||||
|
||||
class CRecordBookmarkEntityAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
UINT m_nID;
|
||||
std::wstring m_strName;
|
||||
|
||||
public:
|
||||
|
||||
CRecordBookmarkEntityAtom()
|
||||
{
|
||||
|
||||
@ -34,9 +34,8 @@
|
||||
|
||||
class CRecordBookmarkSeedAtom : public CUnknownRecord
|
||||
{
|
||||
INT m_nBookmarkID;
|
||||
|
||||
public:
|
||||
INT m_nBookmarkID;
|
||||
|
||||
CRecordBookmarkSeedAtom()
|
||||
{
|
||||
|
||||
@ -34,6 +34,7 @@
|
||||
|
||||
class CRecordDocRoutingSlipAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
struct SDocRoutingSlipAtom
|
||||
{
|
||||
USHORT m_nType;
|
||||
@ -50,8 +51,6 @@ class CRecordDocRoutingSlipAtom : public CUnknownRecord
|
||||
SDocRoutingSlipAtom m_oRgRecipientRoutingSlipStrings;
|
||||
SDocRoutingSlipAtom m_oSubjectString;
|
||||
SDocRoutingSlipAtom m_oMessageString;
|
||||
|
||||
public:
|
||||
|
||||
CRecordDocRoutingSlipAtom()
|
||||
{
|
||||
|
||||
@ -43,8 +43,8 @@ public:
|
||||
UINT m_nNotesMasterPersistIDRef;
|
||||
UINT m_nHandoutMasterPersistIDRef;
|
||||
|
||||
USHORT m_nFirstSlideNum;
|
||||
NSOfficePPT::SlideSizeType m_nSlideSizeType;
|
||||
USHORT m_nFirstSlideNum;
|
||||
USHORT m_nSlideSizeType;
|
||||
|
||||
BOOL1 m_bSaveWithFonts;
|
||||
BOOL1 m_bOmitTitlePlace;
|
||||
@ -78,12 +78,12 @@ public:
|
||||
m_nHandoutMasterPersistIDRef = (UINT)StreamUtils::ReadDWORD(pStream);
|
||||
|
||||
m_nFirstSlideNum = StreamUtils::ReadWORD(pStream);
|
||||
m_nSlideSizeType = (NSOfficePPT::SlideSizeType)StreamUtils::ReadWORD(pStream);
|
||||
m_nSlideSizeType = StreamUtils::ReadWORD(pStream);
|
||||
|
||||
m_bSaveWithFonts = StreamUtils::ReadBYTE(pStream);
|
||||
m_bOmitTitlePlace = StreamUtils::ReadBYTE(pStream);
|
||||
m_bRightToLeft = StreamUtils::ReadBYTE(pStream);
|
||||
m_bShowComments = StreamUtils::ReadBYTE(pStream);
|
||||
m_bSaveWithFonts = StreamUtils::ReadBYTE(pStream);
|
||||
m_bOmitTitlePlace = StreamUtils::ReadBYTE(pStream);
|
||||
m_bRightToLeft = StreamUtils::ReadBYTE(pStream);
|
||||
m_bShowComments = StreamUtils::ReadBYTE(pStream);
|
||||
}
|
||||
|
||||
};
|
||||
@ -49,4 +49,23 @@ public:
|
||||
CRecordsContainer::ReadFromStream(oHeader, pStream);
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
class CRecordFontCollection : public CRecordsContainer
|
||||
{
|
||||
public:
|
||||
|
||||
CRecordFontCollection()
|
||||
{
|
||||
}
|
||||
|
||||
~CRecordFontCollection()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
||||
{
|
||||
CRecordsContainer::ReadFromStream(oHeader, pStream);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@ -59,12 +59,11 @@ public:
|
||||
|
||||
class CRecordBitmapBlip : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
BYTE m_pRgbUid[16];
|
||||
BYTE m_nTag;
|
||||
|
||||
BYTE* m_pScan0;
|
||||
|
||||
public:
|
||||
//BYTE* m_pScan0;
|
||||
|
||||
CRecordBitmapBlip()
|
||||
{
|
||||
|
||||
@ -35,8 +35,8 @@
|
||||
class CRecordBlipStoreEntry : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
NSOfficeDrawing::BlipType m_btWin32;
|
||||
NSOfficeDrawing::BlipType m_btMacOS;
|
||||
ODRAW::eBlipType m_btWin32;
|
||||
ODRAW::eBlipType m_btMacOS;
|
||||
|
||||
BYTE m_pRgbUid[16];
|
||||
unsigned short m_nTag;
|
||||
@ -44,7 +44,7 @@ public:
|
||||
_UINT32 m_nCountRef;
|
||||
_UINT32 m_nFoDelay;
|
||||
|
||||
NSOfficeDrawing::BlipUsage m_eUsage;
|
||||
ODRAW::eBlipUsage m_eUsage;
|
||||
BYTE m_nLenName;
|
||||
|
||||
BYTE m_nUnused2;
|
||||
@ -62,8 +62,8 @@ public:
|
||||
{
|
||||
m_oHeader = oHeader;
|
||||
|
||||
m_btWin32 = (NSOfficeDrawing::BlipType)StreamUtils::ReadBYTE(pStream);
|
||||
m_btMacOS = (NSOfficeDrawing::BlipType)StreamUtils::ReadBYTE(pStream);
|
||||
m_btWin32 = (ODRAW::eBlipType)StreamUtils::ReadBYTE(pStream);
|
||||
m_btMacOS = (ODRAW::eBlipType)StreamUtils::ReadBYTE(pStream);
|
||||
|
||||
pStream->read(m_pRgbUid, 16);
|
||||
|
||||
@ -73,7 +73,7 @@ public:
|
||||
m_nCountRef = StreamUtils::ReadDWORD(pStream);
|
||||
m_nFoDelay = StreamUtils::ReadDWORD(pStream);
|
||||
|
||||
m_eUsage = (NSOfficeDrawing::BlipUsage)StreamUtils::ReadBYTE(pStream);
|
||||
m_eUsage = (ODRAW::eBlipUsage)StreamUtils::ReadBYTE(pStream);
|
||||
|
||||
m_nLenName = StreamUtils::ReadBYTE(pStream);
|
||||
|
||||
|
||||
@ -48,4 +48,5 @@ public:
|
||||
{
|
||||
CRecordsContainer::ReadFromStream(oHeader, pStream);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -43,9 +43,6 @@
|
||||
|
||||
#define FIXED_POINT_unsigned(val) (double)((WORD)(val >> 16) + ((WORD)(val) / 65536.0))
|
||||
|
||||
using namespace NSOfficeDrawing;
|
||||
using namespace NSPresentationEditor;
|
||||
|
||||
bool CPPTElement::ChangeBlack2ColorImage(std::wstring image_path, int rgbColor1, int rgbColor2)
|
||||
{
|
||||
CBgraFrame bgraFrame;
|
||||
@ -205,7 +202,7 @@ void CPPTElement::SetUpProperties(CElementPtr pElement, CTheme* pTheme, CSlideIn
|
||||
long lCount = pProperties->m_lCount;
|
||||
switch (pElement->m_etType)
|
||||
{
|
||||
case NSPresentationEditor::etVideo:
|
||||
case PPT_FORMAT::etVideo:
|
||||
{
|
||||
pElement->m_bLine = false;
|
||||
for (long i = 0; i < lCount; ++i)
|
||||
@ -214,7 +211,7 @@ void CPPTElement::SetUpProperties(CElementPtr pElement, CTheme* pTheme, CSlideIn
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NSPresentationEditor::etPicture:
|
||||
case PPT_FORMAT::etPicture:
|
||||
{
|
||||
pElement->m_oBrush.Type = c_BrushTypeTexture;
|
||||
pElement->m_bLine = false;
|
||||
@ -224,7 +221,7 @@ void CPPTElement::SetUpProperties(CElementPtr pElement, CTheme* pTheme, CSlideIn
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NSPresentationEditor::etAudio:
|
||||
case PPT_FORMAT::etAudio:
|
||||
{
|
||||
pElement->m_bLine = false;
|
||||
for (long i = 0; i < lCount; ++i)
|
||||
@ -233,7 +230,7 @@ void CPPTElement::SetUpProperties(CElementPtr pElement, CTheme* pTheme, CSlideIn
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NSPresentationEditor::etGroup:
|
||||
case PPT_FORMAT::etGroup:
|
||||
{
|
||||
pElement->m_bLine = false;
|
||||
pElement->m_bIsFilled = false;
|
||||
@ -242,7 +239,7 @@ void CPPTElement::SetUpProperties(CElementPtr pElement, CTheme* pTheme, CSlideIn
|
||||
SetUpProperty(pElement, pTheme, pWrapper, pSlide, &pProperties->m_arProperties[i]);
|
||||
}
|
||||
}break;
|
||||
case NSPresentationEditor::etShape:
|
||||
case PPT_FORMAT::etShape:
|
||||
{
|
||||
CShapeElement* pShapeElem = dynamic_cast<CShapeElement*>(pElement.get());
|
||||
CPPTShape* pPPTShape = dynamic_cast<CPPTShape*>(pShapeElem->m_pShape->getBaseShape().get());
|
||||
@ -321,29 +318,29 @@ void CPPTElement::SetUpProperty(CElementPtr pElement, CTheme* pTheme, CSlideInfo
|
||||
_UINT32 dwType = pProperty->m_lValue;
|
||||
switch(dwType)
|
||||
{
|
||||
case NSOfficeDrawing::fillPattern:
|
||||
case ODRAW::fillPattern:
|
||||
{
|
||||
pElement->m_oBrush.Type = c_BrushTypePattern;
|
||||
//texture + change black to color2, white to color1
|
||||
}break;
|
||||
case NSOfficeDrawing::fillTexture :
|
||||
case NSOfficeDrawing::fillPicture :
|
||||
case ODRAW::fillTexture :
|
||||
case ODRAW::fillPicture :
|
||||
{
|
||||
pElement->m_oBrush.Type = c_BrushTypeTexture;
|
||||
pElement->m_oBrush.TextureMode = (NSOfficeDrawing::fillPicture == dwType) ? c_BrushTextureModeStretch : c_BrushTextureModeTile;
|
||||
pElement->m_oBrush.TextureMode = (ODRAW::fillPicture == dwType) ? c_BrushTextureModeStretch : c_BrushTextureModeTile;
|
||||
}break;
|
||||
case NSOfficeDrawing::fillShadeCenter://1 color
|
||||
case NSOfficeDrawing::fillShadeShape:
|
||||
case ODRAW::fillShadeCenter://1 color
|
||||
case ODRAW::fillShadeShape:
|
||||
{
|
||||
pElement->m_oBrush.Type = c_BrushTypeCenter;
|
||||
}break;//
|
||||
case NSOfficeDrawing::fillShadeTitle://2 colors and more
|
||||
case NSOfficeDrawing::fillShade :
|
||||
case NSOfficeDrawing::fillShadeScale:
|
||||
case ODRAW::fillShadeTitle://2 colors and more
|
||||
case ODRAW::fillShade :
|
||||
case ODRAW::fillShadeScale:
|
||||
{
|
||||
pElement->m_oBrush.Type = c_BrushTypePathGradient1;
|
||||
}break;
|
||||
case NSOfficeDrawing::fillBackground:
|
||||
case ODRAW::fillBackground:
|
||||
{
|
||||
pElement->m_oBrush.Type = c_BrushTypeNoFill;
|
||||
}break;
|
||||
@ -532,7 +529,7 @@ void CPPTElement::SetUpProperty(CElementPtr pElement, CTheme* pTheme, CSlideInfo
|
||||
|
||||
break;
|
||||
}
|
||||
case NSOfficeDrawing::geoBoolean:
|
||||
case ODRAW::geoBoolean:
|
||||
{
|
||||
BYTE flag1 = (BYTE)(pProperty->m_lValue);
|
||||
BYTE flag2 = (BYTE)(pProperty->m_lValue >> 8);
|
||||
@ -821,7 +818,7 @@ void CPPTElement::SetUpPropertyImage(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
|
||||
switch(pProperty->m_ePID)
|
||||
{
|
||||
case Pib:
|
||||
case pib:
|
||||
{
|
||||
int dwOffset = pInfo->GetIndexPicture(pProperty->m_lValue);
|
||||
if (dwOffset >=0)
|
||||
@ -881,7 +878,7 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
|
||||
switch (pProperty->m_ePID)
|
||||
{
|
||||
case NSOfficeDrawing::metroBlob:
|
||||
case ODRAW::metroBlob:
|
||||
{
|
||||
NSFile::CFileBinary file;
|
||||
|
||||
@ -911,22 +908,22 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
}
|
||||
NSFile::CFileBinary::Remove(tempFileName);
|
||||
}break;
|
||||
case NSOfficeDrawing::geoRight:
|
||||
case ODRAW::geoRight:
|
||||
{
|
||||
if (0 < pProperty->m_lValue)
|
||||
pParentShape->m_dWidthLogic = (double)(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::geoBottom:
|
||||
case ODRAW::geoBottom:
|
||||
{
|
||||
if (0 < pProperty->m_lValue)
|
||||
pParentShape->m_dHeightLogic = (double)(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::shapePath:
|
||||
case ODRAW::shapePath:
|
||||
{
|
||||
pShape->m_oCustomVML.SetPath((RulesType)pProperty->m_lValue);
|
||||
pShape->m_bCustomShape = true;
|
||||
}break;
|
||||
case NSOfficeDrawing::pSegmentInfo:
|
||||
case ODRAW::pSegmentInfo:
|
||||
{
|
||||
if (pProperty->m_bComplex)
|
||||
{
|
||||
@ -934,7 +931,7 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
pShape->m_bCustomShape = true;
|
||||
}
|
||||
}break;
|
||||
case NSOfficeDrawing::pVertices:
|
||||
case ODRAW::pVertices:
|
||||
{
|
||||
if (pProperty->m_bComplex)
|
||||
{
|
||||
@ -942,53 +939,53 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
pShape->m_bCustomShape = true;
|
||||
}
|
||||
}break;
|
||||
case NSOfficeDrawing::pConnectionSites:
|
||||
case ODRAW::pConnectionSites:
|
||||
{
|
||||
if (pProperty->m_bComplex)
|
||||
{
|
||||
pShape->m_oCustomVML.LoadConnectionSites(pProperty);
|
||||
}
|
||||
}break;
|
||||
case NSOfficeDrawing::pConnectionSitesDir:
|
||||
case ODRAW::pConnectionSitesDir:
|
||||
{
|
||||
if (pProperty->m_bComplex)
|
||||
{
|
||||
pShape->m_oCustomVML.LoadConnectionSitesDir(pProperty);
|
||||
}
|
||||
}break;
|
||||
case NSOfficeDrawing::pGuides:
|
||||
case ODRAW::pGuides:
|
||||
{
|
||||
if (pProperty->m_bComplex/* && pShape->m_eType != sptNotchedCircularArrow*/)
|
||||
{//Тікбұрышты үшбұрыштарды.ppt - slide 25
|
||||
pShape->m_oCustomVML.LoadGuides(pProperty);
|
||||
}
|
||||
}break;
|
||||
case NSOfficeDrawing::pInscribe:
|
||||
case ODRAW::pInscribe:
|
||||
{
|
||||
if (pProperty->m_bComplex)
|
||||
{
|
||||
pShape->m_oCustomVML.LoadInscribe(pProperty);
|
||||
}
|
||||
}break;
|
||||
case NSOfficeDrawing::pAdjustHandles:
|
||||
case ODRAW::pAdjustHandles:
|
||||
{
|
||||
if (pProperty->m_bComplex)
|
||||
{
|
||||
pShape->m_oCustomVML.LoadAHs(pProperty);
|
||||
}
|
||||
}break;
|
||||
case NSOfficeDrawing::adjustValue:
|
||||
case NSOfficeDrawing::adjust2Value:
|
||||
case NSOfficeDrawing::adjust3Value:
|
||||
case NSOfficeDrawing::adjust4Value:
|
||||
case NSOfficeDrawing::adjust5Value:
|
||||
case NSOfficeDrawing::adjust6Value:
|
||||
case NSOfficeDrawing::adjust7Value:
|
||||
case NSOfficeDrawing::adjust8Value:
|
||||
case NSOfficeDrawing::adjust9Value:
|
||||
case NSOfficeDrawing::adjust10Value:
|
||||
case ODRAW::adjustValue:
|
||||
case ODRAW::adjust2Value:
|
||||
case ODRAW::adjust3Value:
|
||||
case ODRAW::adjust4Value:
|
||||
case ODRAW::adjust5Value:
|
||||
case ODRAW::adjust6Value:
|
||||
case ODRAW::adjust7Value:
|
||||
case ODRAW::adjust8Value:
|
||||
case ODRAW::adjust9Value:
|
||||
case ODRAW::adjust10Value:
|
||||
{
|
||||
LONG lIndexAdj = pProperty->m_ePID - NSOfficeDrawing::adjustValue;
|
||||
LONG lIndexAdj = pProperty->m_ePID - ODRAW::adjustValue;
|
||||
if (lIndexAdj >= 0 && lIndexAdj < (LONG)pShape->m_arAdjustments.size())
|
||||
{
|
||||
pShape->m_oCustomVML.LoadAdjusts(lIndexAdj, (LONG)pProperty->m_lValue);
|
||||
@ -1002,27 +999,27 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
case lTxid:
|
||||
{
|
||||
}break;
|
||||
case NSOfficeDrawing::dxTextLeft:
|
||||
case ODRAW::dxTextLeft:
|
||||
{
|
||||
pParentShape->m_dTextMarginX = pProperty->m_lValue;
|
||||
}break;
|
||||
case NSOfficeDrawing::dxTextRight:
|
||||
case ODRAW::dxTextRight:
|
||||
{
|
||||
pParentShape->m_dTextMarginRight = pProperty->m_lValue;
|
||||
}break;
|
||||
case NSOfficeDrawing::dyTextTop:
|
||||
case ODRAW::dyTextTop:
|
||||
{
|
||||
pParentShape->m_dTextMarginY = pProperty->m_lValue;
|
||||
}break;
|
||||
case NSOfficeDrawing::dyTextBottom:
|
||||
case ODRAW::dyTextBottom:
|
||||
{
|
||||
pParentShape->m_dTextMarginBottom = pProperty->m_lValue;
|
||||
}break;
|
||||
case NSOfficeDrawing::WrapText:
|
||||
case ODRAW::WrapText:
|
||||
{
|
||||
pParentShape->m_oText.m_lWrapMode = (LONG)pProperty->m_lValue;
|
||||
}break;
|
||||
case NSOfficeDrawing::gtextUNICODE://word art text
|
||||
case ODRAW::gtextUNICODE://word art text
|
||||
{
|
||||
if (pProperty->m_bComplex && 0 < pProperty->m_lValue)
|
||||
{
|
||||
@ -1037,15 +1034,15 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
if (str.at(i) > 13 ) break;
|
||||
length--;
|
||||
}
|
||||
NSPresentationEditor::CParagraph p;
|
||||
NSPresentationEditor::CSpan s;
|
||||
PPT_FORMAT::CParagraph p;
|
||||
PPT_FORMAT::CSpan s;
|
||||
s.m_strText = str.substr(0,length);
|
||||
p.m_arSpans.push_back(s);
|
||||
pParentShape->m_oText.m_arParagraphs.push_back(p);
|
||||
}
|
||||
}
|
||||
}break;
|
||||
case NSOfficeDrawing::gtextFont:
|
||||
case ODRAW::gtextFont:
|
||||
{
|
||||
if (pProperty->m_bComplex && 0 < pProperty->m_lValue)
|
||||
{
|
||||
@ -1053,48 +1050,48 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
pParentShape->m_oText.m_oAttributes.m_oFont.Name = str;
|
||||
}
|
||||
}break;
|
||||
case NSOfficeDrawing::gtextSize:
|
||||
case ODRAW::gtextSize:
|
||||
{
|
||||
pParentShape->m_oText.m_oAttributes.m_oFont.Size = (INT)((pProperty->m_lValue >> 16) & 0x0000FFFF);
|
||||
break;
|
||||
}
|
||||
case NSOfficeDrawing::anchorText:
|
||||
case ODRAW::anchorText:
|
||||
{
|
||||
switch (pProperty->m_lValue)
|
||||
{
|
||||
case NSOfficeDrawing::anchorTop:
|
||||
case NSOfficeDrawing::anchorTopBaseline:
|
||||
case ODRAW::anchorTop:
|
||||
case ODRAW::anchorTopBaseline:
|
||||
{
|
||||
pParentShape->m_oText.m_oAttributes.m_nTextAlignVertical = 0;
|
||||
break;
|
||||
}
|
||||
case NSOfficeDrawing::anchorMiddle:
|
||||
case ODRAW::anchorMiddle:
|
||||
{
|
||||
pParentShape->m_oText.m_oAttributes.m_nTextAlignVertical = 1;
|
||||
break;
|
||||
}
|
||||
case NSOfficeDrawing::anchorBottom:
|
||||
case NSOfficeDrawing::anchorBottomBaseline:
|
||||
case ODRAW::anchorBottom:
|
||||
case ODRAW::anchorBottomBaseline:
|
||||
{
|
||||
pParentShape->m_oText.m_oAttributes.m_nTextAlignHorizontal = 0;
|
||||
pParentShape->m_oText.m_oAttributes.m_nTextAlignVertical = 2;
|
||||
break;
|
||||
}
|
||||
case NSOfficeDrawing::anchorTopCentered:
|
||||
case NSOfficeDrawing::anchorTopCenteredBaseline:
|
||||
case ODRAW::anchorTopCentered:
|
||||
case ODRAW::anchorTopCenteredBaseline:
|
||||
{
|
||||
pParentShape->m_oText.m_oAttributes.m_nTextAlignHorizontal = 1;
|
||||
pParentShape->m_oText.m_oAttributes.m_nTextAlignVertical = 0;
|
||||
break;
|
||||
}
|
||||
case NSOfficeDrawing::anchorMiddleCentered:
|
||||
case ODRAW::anchorMiddleCentered:
|
||||
{
|
||||
pParentShape->m_oText.m_oAttributes.m_nTextAlignHorizontal = 1;
|
||||
pParentShape->m_oText.m_oAttributes.m_nTextAlignVertical = 1;
|
||||
break;
|
||||
}
|
||||
case NSOfficeDrawing::anchorBottomCentered:
|
||||
case NSOfficeDrawing::anchorBottomCenteredBaseline:
|
||||
case ODRAW::anchorBottomCentered:
|
||||
case ODRAW::anchorBottomCenteredBaseline:
|
||||
{
|
||||
pParentShape->m_oText.m_oAttributes.m_nTextAlignHorizontal = 1;
|
||||
pParentShape->m_oText.m_oAttributes.m_nTextAlignVertical = 2;
|
||||
@ -1109,19 +1106,19 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
};
|
||||
break;
|
||||
}
|
||||
case NSOfficeDrawing::gtextAlign:
|
||||
case ODRAW::gtextAlign:
|
||||
{
|
||||
switch (pProperty->m_lValue)
|
||||
{
|
||||
case NSOfficeDrawing::alignTextLeft:
|
||||
case ODRAW::alignTextLeft:
|
||||
{
|
||||
pParentShape->m_oText.m_oAttributes.m_nTextAlignHorizontal = 0;
|
||||
}break;
|
||||
case NSOfficeDrawing::alignTextCenter:
|
||||
case ODRAW::alignTextCenter:
|
||||
{
|
||||
pParentShape->m_oText.m_oAttributes.m_nTextAlignHorizontal = 1;
|
||||
}break;
|
||||
case NSOfficeDrawing::alignTextRight:
|
||||
case ODRAW::alignTextRight:
|
||||
{
|
||||
pParentShape->m_oText.m_oAttributes.m_nTextAlignHorizontal = 2;
|
||||
}break;
|
||||
@ -1132,7 +1129,7 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
};
|
||||
break;
|
||||
}
|
||||
case NSOfficeDrawing::gtextBoolean:
|
||||
case ODRAW::gtextBoolean:
|
||||
{
|
||||
// вот здесь - нужно единицы перевести в пикселы
|
||||
BYTE flag1 = (BYTE)(pProperty->m_lValue);
|
||||
@ -1182,7 +1179,7 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
pParentShape->m_oText.m_bVertical = (true == bVertical) ? true : false;
|
||||
}
|
||||
}break;
|
||||
case NSOfficeDrawing::cdirFont:
|
||||
case ODRAW::cdirFont:
|
||||
{
|
||||
switch (pProperty->m_lValue)
|
||||
{
|
||||
@ -1198,11 +1195,11 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
break;
|
||||
}
|
||||
}break;
|
||||
case NSOfficeDrawing::txflTextFlow:
|
||||
case ODRAW::txflTextFlow:
|
||||
{
|
||||
pParentShape->m_oText.m_nTextFlow = pProperty->m_lValue;
|
||||
}break;
|
||||
case NSOfficeDrawing::textBoolean:
|
||||
case ODRAW::textBoolean:
|
||||
{
|
||||
BYTE flag1 = (BYTE)(pProperty->m_lValue);
|
||||
BYTE flag2 = (BYTE)(pProperty->m_lValue >> 8);
|
||||
@ -1231,35 +1228,35 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
pParentShape->m_oText.m_bAutoFit = bFitShapeToText;
|
||||
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DSpecularAmt:
|
||||
case ODRAW::c3DSpecularAmt:
|
||||
{
|
||||
pShape->m_o3dOptions.dSpecularAmt = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DDiffuseAmt:
|
||||
case ODRAW::c3DDiffuseAmt:
|
||||
{
|
||||
pShape->m_o3dOptions.dDiffuseAmt = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DShininess:
|
||||
case ODRAW::c3DShininess:
|
||||
{
|
||||
pShape->m_o3dOptions.dShininess = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DEdgeThickness:
|
||||
case ODRAW::c3DEdgeThickness:
|
||||
{
|
||||
pShape->m_o3dOptions.nEdgeThickness = pProperty->m_lValue;
|
||||
}break;
|
||||
case NSOfficeDrawing::C3DExtrudeForward:
|
||||
case ODRAW::C3DExtrudeForward:
|
||||
{
|
||||
pShape->m_o3dOptions.nExtrudeForward = pProperty->m_lValue;
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DExtrudeBackward:
|
||||
case ODRAW::c3DExtrudeBackward:
|
||||
{
|
||||
pShape->m_o3dOptions.nExtrudeBackward = pProperty->m_lValue;
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DExtrudePlane:
|
||||
case ODRAW::c3DExtrudePlane:
|
||||
{
|
||||
//ExtrudePlane = 0;
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DExtrusionColor:
|
||||
case ODRAW::c3DExtrusionColor:
|
||||
{
|
||||
SColorAtom oAtom;
|
||||
oAtom.FromValue(pProperty->m_lValue);
|
||||
@ -1270,7 +1267,7 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
|
||||
pShape->m_o3dOptions.oExtrusionColor = tmp;
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DCrMod:
|
||||
case ODRAW::c3DCrMod:
|
||||
{
|
||||
SColorAtom oAtom;
|
||||
oAtom.FromValue(pProperty->m_lValue);
|
||||
@ -1281,7 +1278,7 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
|
||||
pShape->m_o3dOptions.oCrMod = tmp;
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DExtrusionColorExt:
|
||||
case ODRAW::c3DExtrusionColorExt:
|
||||
{
|
||||
SColorAtom oAtom;
|
||||
oAtom.FromValue(pProperty->m_lValue);
|
||||
@ -1291,35 +1288,35 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
else oAtom.ToColor(&tmp);
|
||||
pShape->m_o3dOptions.oExtrusionColorExt = tmp;
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DExtrusionColorExtMod:
|
||||
case ODRAW::c3DExtrusionColorExtMod:
|
||||
{
|
||||
pShape->m_o3dOptions.nTypeExtrusionColorExt = (pProperty->m_lValue & 0x00000300) >> 8;
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DBottomBevelWidth:
|
||||
case ODRAW::c3DBottomBevelWidth:
|
||||
{
|
||||
pShape->m_o3dOptions.dBottomBevelWidth = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DBottomBevelHeight:
|
||||
case ODRAW::c3DBottomBevelHeight:
|
||||
{
|
||||
pShape->m_o3dOptions.dBottomBevelHeight = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DBottomBevelType:
|
||||
case ODRAW::c3DBottomBevelType:
|
||||
{
|
||||
pShape->m_o3dOptions.nBottomBevelType = pProperty->m_lValue;
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DTopBevelWidth:
|
||||
case ODRAW::c3DTopBevelWidth:
|
||||
{
|
||||
pShape->m_o3dOptions.dTopBevelWidth = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DTopBevelHeight:
|
||||
case ODRAW::c3DTopBevelHeight:
|
||||
{
|
||||
pShape->m_o3dOptions.dTopBevelHeight = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DTopBevelType:
|
||||
case ODRAW::c3DTopBevelType:
|
||||
{
|
||||
pShape->m_o3dOptions.nTopBevelType = pProperty->m_lValue;
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DBoolean:
|
||||
case ODRAW::c3DBoolean:
|
||||
{
|
||||
bool fUsef3D = GETBIT(pProperty->m_lValue, 19);
|
||||
bool fUsefc3DMetallic = GETBIT(pProperty->m_lValue, 18);
|
||||
@ -1332,121 +1329,121 @@ void CPPTElement::SetUpPropertyShape(CElementPtr pElement, CTheme* pTheme, CSlid
|
||||
pShape->m_o3dOptions.bLightFace = fUsefc3DLightFace ? GETBIT(pProperty->m_lValue, 0) : true;
|
||||
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DYRotationAngle:
|
||||
case ODRAW::c3DYRotationAngle:
|
||||
{
|
||||
double val = FixedPointToDouble(pProperty->m_lValue);
|
||||
if (val < 0) val += 360;
|
||||
pShape->m_o3dOptions.dYRotationAngle = val;
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DXRotationAngle:
|
||||
case ODRAW::c3DXRotationAngle:
|
||||
{
|
||||
double val = FixedPointToDouble(pProperty->m_lValue);
|
||||
if (val < 0) val += 360;
|
||||
pShape->m_o3dOptions.dXRotationAngle = val;
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DRotationAxisX:
|
||||
case ODRAW::c3DRotationAxisX:
|
||||
{
|
||||
pShape->m_o3dOptions.dRotationAxisX = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DRotationAxisY:
|
||||
case ODRAW::c3DRotationAxisY:
|
||||
{
|
||||
pShape->m_o3dOptions.dRotationAxisY = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DRotationAxisZ:
|
||||
case ODRAW::c3DRotationAxisZ:
|
||||
{
|
||||
pShape->m_o3dOptions.dRotationAxisZ = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DRotationAngle:
|
||||
case ODRAW::c3DRotationAngle:
|
||||
{
|
||||
pShape->m_o3dOptions.dRotationAngle = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DRotationCenterX:
|
||||
case ODRAW::c3DRotationCenterX:
|
||||
{
|
||||
pShape->m_o3dOptions.dRotationCenterX = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DRotationCenterY:
|
||||
case ODRAW::c3DRotationCenterY:
|
||||
{
|
||||
pShape->m_o3dOptions.dRotationCenterY = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DRotationCenterZ:
|
||||
case ODRAW::c3DRotationCenterZ:
|
||||
{
|
||||
pShape->m_o3dOptions.dRotationCenterZ = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DRenderMode:
|
||||
case ODRAW::c3DRenderMode:
|
||||
{
|
||||
pShape->m_o3dOptions.nRenderMode = pProperty->m_lValue;
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DTolerance:
|
||||
case ODRAW::c3DTolerance:
|
||||
{
|
||||
pShape->m_o3dOptions.dTolerance = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DXViewpoint:
|
||||
case ODRAW::c3DXViewpoint:
|
||||
{
|
||||
pShape->m_o3dOptions.dXViewpoint = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DYViewpoint:
|
||||
case ODRAW::c3DYViewpoint:
|
||||
{
|
||||
pShape->m_o3dOptions.dYViewpoint = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DZViewpoint:
|
||||
case ODRAW::c3DZViewpoint:
|
||||
{
|
||||
pShape->m_o3dOptions.dZViewpoint = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DOriginX:
|
||||
case ODRAW::c3DOriginX:
|
||||
{
|
||||
pShape->m_o3dOptions.dOriginX = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DOriginY:
|
||||
case ODRAW::c3DOriginY:
|
||||
{
|
||||
pShape->m_o3dOptions.dOriginY = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DSkewAngle:
|
||||
case ODRAW::c3DSkewAngle:
|
||||
{
|
||||
double val = FixedPointToDouble(pProperty->m_lValue);
|
||||
if (val <= 0) val += 360;
|
||||
pShape->m_o3dOptions.dSkewAngle = val;
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DSkewAmount:
|
||||
case ODRAW::c3DSkewAmount:
|
||||
{
|
||||
pShape->m_o3dOptions.nSkewAmount = pProperty->m_lValue;
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DAmbientIntensity:
|
||||
case ODRAW::c3DAmbientIntensity:
|
||||
{
|
||||
pShape->m_o3dOptions.dAmbientIntensity = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DKeyX:
|
||||
case ODRAW::c3DKeyX:
|
||||
{
|
||||
pShape->m_o3dOptions.dKeyX = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DKeyY:
|
||||
case ODRAW::c3DKeyY:
|
||||
{
|
||||
pShape->m_o3dOptions.dKeyY = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DKeyZ:
|
||||
case ODRAW::c3DKeyZ:
|
||||
{
|
||||
pShape->m_o3dOptions.dKeyZ = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DKeyIntensity:
|
||||
case ODRAW::c3DKeyIntensity:
|
||||
{
|
||||
pShape->m_o3dOptions.dKeyIntensity = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DFillX:
|
||||
case ODRAW::c3DFillX:
|
||||
{
|
||||
pShape->m_o3dOptions.dFillX = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DFillY:
|
||||
case ODRAW::c3DFillY:
|
||||
{
|
||||
pShape->m_o3dOptions.dFillY = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DFillZ:
|
||||
case ODRAW::c3DFillZ:
|
||||
{
|
||||
pShape->m_o3dOptions.dFillZ = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DFillIntensity:
|
||||
case ODRAW::c3DFillIntensity:
|
||||
{
|
||||
pShape->m_o3dOptions.dFillIntensity = FixedPointToDouble(pProperty->m_lValue);
|
||||
}break;
|
||||
case NSOfficeDrawing::c3DStyleBoolean:
|
||||
case ODRAW::c3DStyleBoolean:
|
||||
{
|
||||
bool fUsefc3DConstrainRotation = GETBIT(pProperty->m_lValue, 20);
|
||||
bool fUsefc3DRotationCenterAuto = GETBIT(pProperty->m_lValue, 19);
|
||||
@ -1488,7 +1485,7 @@ CElementPtr CRecordShapeContainer::GetElement (bool inGroup, CExMedia* pMapIDs,
|
||||
GetRecordsByType(&oArrayOptions, true, /*true*/false/*secondary & tetriary*/);
|
||||
|
||||
PPTShapes::ShapeType eType = (PPTShapes::ShapeType)oArrayShape[0]->m_oHeader.RecInstance;
|
||||
ElementType elType = GetTypeElem((NSOfficeDrawing::SPT)oArrayShape[0]->m_oHeader.RecInstance);
|
||||
ElementType elType = GetTypeElem((ODRAW::eSPT)oArrayShape[0]->m_oHeader.RecInstance);
|
||||
|
||||
int lMasterID = -1;
|
||||
|
||||
@ -1813,9 +1810,9 @@ CElementPtr CRecordShapeContainer::GetElement (bool inGroup, CExMedia* pMapIDs,
|
||||
}
|
||||
else
|
||||
{
|
||||
pShapeElem->m_pShape->m_oText.m_lTextType = NSOfficePPT::NoPresent;
|
||||
pShapeElem->m_pShape->m_oText.m_lTextMasterType = NSOfficePPT::NoPresent;
|
||||
oElementInfo.m_lMasterTextType = NSOfficePPT::NoPresent;
|
||||
pShapeElem->m_pShape->m_oText.m_lTextType = NoPresent;
|
||||
pShapeElem->m_pShape->m_oText.m_lTextMasterType = NoPresent;
|
||||
oElementInfo.m_lMasterTextType = NoPresent;
|
||||
}
|
||||
|
||||
// проверка на ссылку в персист
|
||||
@ -2060,9 +2057,9 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
bool bIsPersistPresentSettings = false;
|
||||
bool bIsOwnPresentSettings = false;
|
||||
|
||||
NSOfficePPT::TextType eTypeMaster = NSOfficePPT::NoPresent;
|
||||
NSOfficePPT::TextType eTypePersist = NSOfficePPT::NoPresent;
|
||||
NSOfficePPT::TextType eTypeOwn = (NSOfficePPT::TextType)pTextSettings->m_lTextType;
|
||||
eTextType eTypeMaster = NoPresent;
|
||||
eTextType eTypePersist = NoPresent;
|
||||
eTextType eTypeOwn = (eTextType)pTextSettings->m_lTextType;
|
||||
|
||||
CShapeElement* pElementLayoutPH = NULL;
|
||||
|
||||
@ -2084,7 +2081,7 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
if ((etShape == pPh->m_etType) && (ph_type == pPh->m_lPlaceholderType) && (/*ph_pos == pPh->m_lPlaceholderID*/true))
|
||||
{
|
||||
pElementLayoutPH = dynamic_cast<CShapeElement*>(pPh.get());
|
||||
eTypeMaster = (NSOfficePPT::TextType)pElementLayoutPH->m_pShape->m_oText.m_lTextMasterType;
|
||||
eTypeMaster = (eTextType)pElementLayoutPH->m_pShape->m_oText.m_lTextMasterType;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2092,7 +2089,7 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
}
|
||||
else
|
||||
{
|
||||
eTypeMaster = (NSOfficePPT::TextType)pTextSettings->m_lTextMasterType;
|
||||
eTypeMaster = (eTextType)pTextSettings->m_lTextMasterType;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
@ -2110,7 +2107,7 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
{
|
||||
CTextFullSettings* pSettings = &pArrayPlaceHolders->at(lPersistIndex);
|
||||
|
||||
eTypePersist = (NSOfficePPT::TextType)pSettings->m_nTextType;
|
||||
eTypePersist = (eTextType)pSettings->m_nTextType;
|
||||
strText = pSettings->ApplyProperties(pTextSettings);
|
||||
|
||||
if ((0 != pSettings->m_arRanges.size()) && (0 == pShape->m_oTextActions.m_arRanges.size()))
|
||||
@ -2141,7 +2138,7 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
|
||||
pStyle->ReadFromStream(oHeader, oElemInfo.m_pStream);
|
||||
|
||||
NSPresentationEditor::ConvertPPTTextToEditorStructure(pStyle->m_arrPFs, pStyle->m_arrCFs, strText, pShape->m_pShape->m_oText);
|
||||
PPT_FORMAT::ConvertPPTTextToEditorStructure(pStyle->m_arrPFs, pStyle->m_arrCFs, strText, pShape->m_pShape->m_oText);
|
||||
|
||||
bIsOwnPresentSettings = (0 < pStyle->m_lCount);
|
||||
|
||||
@ -2160,13 +2157,13 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
{
|
||||
switch (oElemInfo.m_lMasterPlaceholderType)
|
||||
{
|
||||
case NSOfficePPT::Title:
|
||||
case NSOfficePPT::MasterTitle:
|
||||
case NSOfficePPT::VerticalTextTitle:
|
||||
case PT_Title:
|
||||
case PT_MasterTitle:
|
||||
case PT_VerticalTitle:
|
||||
{
|
||||
pTextSettings->m_lStyleThemeIndex = 1;
|
||||
|
||||
if (NSOfficePPT::_Title != eTypeMaster)
|
||||
if (Tx_TYPE_TITLE != eTypeMaster)
|
||||
{
|
||||
if (0 <= nTextMasterType && nTextMasterType < 9)
|
||||
{
|
||||
@ -2176,12 +2173,12 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NSOfficePPT::CenteredTitle:
|
||||
case NSOfficePPT::MasterCenteredTitle:
|
||||
case PT_CenterTitle:
|
||||
case PT_MasterCenterTitle:
|
||||
{
|
||||
pTextSettings->m_lStyleThemeIndex = 1;
|
||||
|
||||
if (NSOfficePPT::_Title != eTypeMaster)
|
||||
if (Tx_TYPE_TITLE != eTypeMaster)
|
||||
{
|
||||
if (0 <= nTextMasterType && nTextMasterType < 9)
|
||||
{
|
||||
@ -2191,17 +2188,17 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NSOfficePPT::Body:
|
||||
case NSOfficePPT::MasterBody:
|
||||
case NSOfficePPT::NotesBody:
|
||||
case NSOfficePPT::MasterNotesBody:
|
||||
case NSOfficePPT::VerticalTextBody:
|
||||
case NSOfficePPT::MasterSubtitle:
|
||||
case NSOfficePPT::Subtitle:
|
||||
case PT_Body:
|
||||
case PT_MasterBody:
|
||||
case PT_NotesBody:
|
||||
case PT_MasterNotesBody:
|
||||
case PT_VerticalBody:
|
||||
case PT_MasterSubTitle:
|
||||
case PT_SubTitle:
|
||||
{
|
||||
pTextSettings->m_lStyleThemeIndex = 2;
|
||||
|
||||
if ((NSOfficePPT::_Body != eTypeMaster) || !pLayout)
|
||||
if ((Tx_TYPE_BODY != eTypeMaster) || !pLayout)
|
||||
{
|
||||
if (0 <= nTextMasterType && nTextMasterType < 9)
|
||||
{
|
||||
@ -2215,7 +2212,7 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
{
|
||||
pTextSettings->m_lStyleThemeIndex = 3;
|
||||
|
||||
if ((NSOfficePPT::Other != eTypeMaster) || !pLayout)
|
||||
if ((Tx_TYPE_OTHER != eTypeMaster) || !pLayout)
|
||||
{
|
||||
if (0 <= nTextMasterType && nTextMasterType < 9)
|
||||
{
|
||||
@ -2233,7 +2230,7 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
{
|
||||
//pTextSettings->m_lTextType = 0;
|
||||
|
||||
//if (NSOfficePPT::Other != eTypeMaster)
|
||||
//if (Other != eTypeMaster)
|
||||
//{
|
||||
// if (0 <= nTextMasterType && nTextMasterType < 9)
|
||||
// {
|
||||
@ -2244,7 +2241,7 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
}
|
||||
|
||||
// теперь смотрим все остальные стили (persist и own) - просто применяем их к m_oStyles
|
||||
if (eTypePersist != NSOfficePPT::NoPresent && eTypePersist != eTypeMaster)
|
||||
if (eTypePersist != NoPresent && eTypePersist != eTypeMaster)
|
||||
{
|
||||
int nIndexType = (int)eTypePersist;
|
||||
if (0 <= nIndexType && nIndexType < 9)
|
||||
@ -2253,7 +2250,7 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
pTextSettings->m_oStyles.ApplyAfter(pThemeWrapper->m_pStyles[nIndexType].get());
|
||||
}
|
||||
}
|
||||
if (eTypeOwn != NSOfficePPT::NoPresent && eTypeOwn != eTypePersist && eTypeOwn != eTypeMaster)
|
||||
if (eTypeOwn != NoPresent && eTypeOwn != eTypePersist && eTypeOwn != eTypeMaster)
|
||||
{
|
||||
int nIndexType = (int)eTypeOwn;
|
||||
if (0 <= nIndexType && nIndexType < 9)
|
||||
@ -2277,24 +2274,24 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
{
|
||||
switch (oElemInfo.m_lMasterPlaceholderType)
|
||||
{
|
||||
case NSOfficePPT::Title:
|
||||
case NSOfficePPT::MasterTitle:
|
||||
case NSOfficePPT::VerticalTextTitle:
|
||||
case PT_Title:
|
||||
case PT_MasterTitle:
|
||||
case PT_VerticalTitle:
|
||||
{
|
||||
pTextSettings->m_lStyleThemeIndex = 1;
|
||||
break;
|
||||
}
|
||||
case NSOfficePPT::CenteredTitle:
|
||||
case NSOfficePPT::MasterCenteredTitle:
|
||||
case PT_CenterTitle:
|
||||
case PT_MasterCenterTitle:
|
||||
{
|
||||
pTextSettings->m_lStyleThemeIndex = 1;
|
||||
break;
|
||||
}
|
||||
case NSOfficePPT::Body:
|
||||
case NSOfficePPT::MasterBody:
|
||||
case NSOfficePPT::NotesBody:
|
||||
case NSOfficePPT::MasterNotesBody:
|
||||
case NSOfficePPT::VerticalTextBody:
|
||||
case PT_Body:
|
||||
case PT_MasterBody:
|
||||
case PT_NotesBody:
|
||||
case PT_MasterNotesBody:
|
||||
case PT_VerticalBody:
|
||||
{
|
||||
pTextSettings->m_lStyleThemeIndex = 2;
|
||||
break;
|
||||
@ -2313,7 +2310,7 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
}
|
||||
|
||||
// теперь смотрим все остальные стили (persist и own) - просто применяем их к m_oStyles
|
||||
if (eTypePersist != NSOfficePPT::NoPresent && eTypePersist != eTypeMaster)
|
||||
if (eTypePersist != NoPresent && eTypePersist != eTypeMaster)
|
||||
{
|
||||
int nIndexType = (int)eTypePersist;
|
||||
if (0 <= nIndexType && nIndexType < 9)
|
||||
@ -2322,13 +2319,13 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
pTextSettings->m_oStyles.ApplyAfter(pThemeWrapper->m_pStyles[nIndexType].get());
|
||||
}
|
||||
}
|
||||
if (eTypeOwn != NSOfficePPT::NoPresent/* && eTypeOwn != NSOfficePPT::Other*/ && eTypeOwn != eTypePersist && eTypeOwn != eTypeMaster)
|
||||
{
|
||||
if (eTypeOwn != NoPresent && eTypeOwn != Tx_TYPE_OTHER && eTypeOwn != eTypePersist && eTypeOwn != eTypeMaster)
|
||||
{//齐孟尧-2015年度职工考核报告.ppt
|
||||
int nIndexType = (int)eTypeOwn;
|
||||
|
||||
if (0 <= nIndexType && nIndexType < 9 && pLayout)
|
||||
{
|
||||
if (eTypeOwn == NSOfficePPT::HalfBody || eTypeOwn == NSOfficePPT::QuarterBody)
|
||||
if (eTypeOwn == Tx_TYPE_HALFBODY || eTypeOwn == Tx_TYPE_QUARTERBODY)
|
||||
{
|
||||
if (pThemeWrapper->m_pStyles[1].IsInit())//body -> (560).ppt
|
||||
{
|
||||
@ -2346,23 +2343,23 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
if ((_T("") != strText) && 0 == pTextSettings->m_arParagraphs.size())
|
||||
{
|
||||
// значит никаких своих настроек нету. Значит просто пустые свои настройки
|
||||
std::vector<CTextPFRun_ppt> oArrayPF;
|
||||
std::vector<CTextPFRunRecord> oArrayPF;
|
||||
|
||||
CTextPFRun_ppt elm;
|
||||
CTextPFRunRecord elm;
|
||||
|
||||
elm.m_lCount = strText.length();
|
||||
elm.m_lLevel = 0;
|
||||
|
||||
oArrayPF.push_back(elm);
|
||||
|
||||
std::vector<CTextCFRun_ppt> oArrayCF;
|
||||
std::vector<CTextCFRunRecord> oArrayCF;
|
||||
|
||||
CTextCFRun_ppt elm1;
|
||||
CTextCFRunRecord elm1;
|
||||
elm1.m_lCount = elm.m_lCount;
|
||||
|
||||
oArrayCF.push_back(elm1);
|
||||
|
||||
NSPresentationEditor::ConvertPPTTextToEditorStructure(oArrayPF, oArrayCF, strText, *pTextSettings);
|
||||
PPT_FORMAT::ConvertPPTTextToEditorStructure(oArrayPF, oArrayCF, strText, *pTextSettings);
|
||||
}
|
||||
|
||||
if (NULL != oElemInfo.m_pStream && -1 != oElemInfo.m_lOffsetTextProp)
|
||||
@ -2394,7 +2391,7 @@ void CRecordShapeContainer::SetUpTextStyle(std::wstring& strText, CTheme* pTheme
|
||||
if (pShape->m_oTextActions.m_bPresent)
|
||||
{
|
||||
//todooo разобраться нужно ли менять цвет на гиперлинк - 1-(34).ppt
|
||||
NSPresentationEditor::CColor oColor;
|
||||
ODRAW::CColor oColor;
|
||||
if ((NULL != pSlide) && !pSlide->m_bUseLayoutColorScheme) oColor = pSlide->GetColor(11);
|
||||
else if ((NULL != pLayout) && (!pLayout->m_bUseThemeColorScheme)) oColor = pLayout->GetColor(11);
|
||||
else if (NULL != pTheme) oColor = pTheme->GetColor(11);
|
||||
|
||||
@ -57,8 +57,8 @@
|
||||
|
||||
#define FIXED_POINT_unsigned(val) (double)((WORD)(val >> 16) + ((WORD)(val) / 65536.0))
|
||||
|
||||
using namespace NSOfficeDrawing;
|
||||
using namespace NSPresentationEditor;
|
||||
using namespace ODRAW;
|
||||
using namespace PPT_FORMAT;
|
||||
|
||||
class CPPTElement
|
||||
{
|
||||
@ -107,7 +107,7 @@ public:
|
||||
CTheme* pTheme, CLayout* pLayout,
|
||||
CSlideInfo* pThemeWrapper, CSlideInfo* pSlideWrapper, CSlide* pSlide = NULL);
|
||||
|
||||
NSPresentationEditor::ElementType GetTypeElem(SPT eType)
|
||||
PPT_FORMAT::ElementType GetTypeElem(eSPT eType)
|
||||
{
|
||||
switch (eType)
|
||||
{
|
||||
|
||||
@ -34,8 +34,6 @@
|
||||
|
||||
class CRecordTextBox : public CUnknownRecord
|
||||
{
|
||||
BYTE* m_pData;
|
||||
|
||||
public:
|
||||
|
||||
CRecordTextBox()
|
||||
|
||||
@ -34,12 +34,11 @@
|
||||
|
||||
class CRecordExOleEmbedAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
UINT m_nColorFollow;
|
||||
BOOL1 m_nCantLockServer;
|
||||
BOOL1 m_nNoSizeToServer;
|
||||
BOOL1 m_nIsTable;
|
||||
|
||||
public:
|
||||
|
||||
CRecordExOleEmbedAtom()
|
||||
{
|
||||
|
||||
@ -34,10 +34,9 @@
|
||||
|
||||
class CRecordExOleLinkAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
UINT m_nSlideID;
|
||||
UINT m_nOleUpdateMode;
|
||||
|
||||
public:
|
||||
|
||||
CRecordExOleLinkAtom()
|
||||
{
|
||||
|
||||
@ -47,15 +47,9 @@ public:
|
||||
|
||||
BYTE m_lfPitchAndFamily;
|
||||
|
||||
public:
|
||||
|
||||
CRecordFontEntityAtom()
|
||||
{
|
||||
}
|
||||
CRecordFontEntityAtom(){}
|
||||
|
||||
~CRecordFontEntityAtom()
|
||||
{
|
||||
}
|
||||
~CRecordFontEntityAtom(){}
|
||||
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
||||
{
|
||||
@ -109,3 +103,22 @@ public:
|
||||
m_lfPitchAndFamily = StreamUtils::ReadBYTE(pStream);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class CRecordFontEmbedDataBlob : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
std::pair<boost::shared_array<unsigned char>, _INT32> data;
|
||||
//font data of an embedded font
|
||||
|
||||
CRecordFontEmbedDataBlob(){}
|
||||
~CRecordFontEmbedDataBlob(){}
|
||||
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
||||
{
|
||||
m_oHeader = oHeader;
|
||||
|
||||
data = std::make_pair(boost::shared_array<unsigned char>(new unsigned char[m_oHeader.RecLen]), m_oHeader.RecLen);
|
||||
pStream->read(data.first.get(), data.second);
|
||||
}
|
||||
};
|
||||
@ -34,10 +34,9 @@
|
||||
|
||||
class CRecordGridSpacing10Atom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
INT m_nX;
|
||||
INT m_nY;
|
||||
|
||||
public:
|
||||
|
||||
CRecordGridSpacing10Atom()
|
||||
{
|
||||
|
||||
@ -34,9 +34,8 @@
|
||||
|
||||
class CRecordKinsokuAtom : public CUnknownRecord
|
||||
{
|
||||
UINT m_nLevel;
|
||||
|
||||
public:
|
||||
_UINT32 m_nLevel;
|
||||
|
||||
CRecordKinsokuAtom()
|
||||
{
|
||||
@ -48,7 +47,9 @@ public:
|
||||
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
||||
{
|
||||
return CUnknownRecord::ReadFromStream(oHeader, pStream);
|
||||
m_oHeader = oHeader;
|
||||
|
||||
m_nLevel = StreamUtils::ReadDWORD(pStream);
|
||||
}
|
||||
|
||||
};
|
||||
@ -34,10 +34,9 @@
|
||||
|
||||
class CRecordMasterPersistAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
UINT m_nPsrRef;
|
||||
INT m_nMasterID;
|
||||
|
||||
public:
|
||||
|
||||
CRecordMasterPersistAtom()
|
||||
{
|
||||
|
||||
@ -34,12 +34,11 @@
|
||||
|
||||
class CRecordMetafileBlob : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
SHORT m_nMM;
|
||||
SHORT m_nExtX;
|
||||
SHORT m_nExtY;
|
||||
BYTE* m_pData;
|
||||
|
||||
public:
|
||||
|
||||
CRecordMetafileBlob()
|
||||
{
|
||||
|
||||
@ -34,9 +34,8 @@
|
||||
|
||||
class CRecordMouseTextInteractiveInfoAtom : public CUnknownRecord
|
||||
{
|
||||
STextRange m_oRange;
|
||||
|
||||
public:
|
||||
STextRange m_oRange;
|
||||
|
||||
CRecordMouseTextInteractiveInfoAtom()
|
||||
{
|
||||
|
||||
@ -34,9 +34,8 @@
|
||||
|
||||
class CRecordNamedShowSlidesAtom : public CUnknownRecord
|
||||
{
|
||||
std::vector<UINT> m_arRgSlideIdRef;
|
||||
|
||||
public:
|
||||
std::vector<UINT> m_arRgSlideIdRef;
|
||||
|
||||
CRecordNamedShowSlidesAtom()
|
||||
{
|
||||
|
||||
@ -34,12 +34,11 @@
|
||||
|
||||
class CRecordNoZoomViewInfoAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
SScalingAtom m_oCurScale;
|
||||
SPointAtom m_nOrigin;
|
||||
|
||||
BOOL1 m_bDraftMode;
|
||||
|
||||
public:
|
||||
|
||||
CRecordNoZoomViewInfoAtom()
|
||||
{
|
||||
|
||||
@ -34,10 +34,9 @@
|
||||
|
||||
class CRecordNotesPersistAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
UINT m_nPsrRef;
|
||||
INT m_nNotesID;
|
||||
|
||||
public:
|
||||
|
||||
CRecordNotesPersistAtom()
|
||||
{
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
class CRecordRoundTripColorMappingAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
std::string m_strData;
|
||||
std::pair<boost::shared_array<unsigned char>, _INT32> data;
|
||||
|
||||
CRecordRoundTripColorMappingAtom()
|
||||
{
|
||||
@ -48,6 +48,8 @@ public:
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
||||
{
|
||||
m_oHeader = oHeader;
|
||||
m_strData = StreamUtils::ReadStringA(pStream, (long)m_oHeader.RecLen);
|
||||
|
||||
data = std::make_pair(boost::shared_array<unsigned char>(new unsigned char[m_oHeader.RecLen]), m_oHeader.RecLen);
|
||||
pStream->read(data.first.get(), data.second);
|
||||
}
|
||||
};
|
||||
|
||||
@ -34,9 +34,8 @@
|
||||
|
||||
class CRecordRoundTripNewPlaceholderId12Atom : public CUnknownRecord
|
||||
{
|
||||
BYTE m_nFlags;
|
||||
|
||||
public:
|
||||
BYTE m_nFlags;
|
||||
|
||||
CRecordRoundTripNewPlaceholderId12Atom()
|
||||
{
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
class CRecordRoundTripNotesMasterTextStyles12Atom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
std::string m_strData;
|
||||
std::pair<boost::shared_array<unsigned char>, _INT32> data;
|
||||
|
||||
CRecordRoundTripNotesMasterTextStyles12Atom()
|
||||
{
|
||||
@ -48,6 +48,30 @@ public:
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
||||
{
|
||||
m_oHeader = oHeader;
|
||||
m_strData = StreamUtils::ReadStringA(pStream, (long)m_oHeader.RecLen);
|
||||
|
||||
data = std::make_pair(boost::shared_array<unsigned char>(new unsigned char[m_oHeader.RecLen]), m_oHeader.RecLen);
|
||||
pStream->read(data.first.get(), data.second);
|
||||
}
|
||||
};
|
||||
|
||||
class CRecordRoundTripCustomTableStyles12Atom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
std::pair<boost::shared_array<unsigned char>, _INT32> data;
|
||||
|
||||
CRecordRoundTripCustomTableStyles12Atom()
|
||||
{
|
||||
}
|
||||
|
||||
~CRecordRoundTripCustomTableStyles12Atom()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
||||
{
|
||||
m_oHeader = oHeader;
|
||||
|
||||
data = std::make_pair(boost::shared_array<unsigned char>(new unsigned char[m_oHeader.RecLen]), m_oHeader.RecLen);
|
||||
pStream->read(data.first.get(), data.second);
|
||||
}
|
||||
};
|
||||
|
||||
@ -35,19 +35,16 @@
|
||||
class CRecordRoundTripThemeAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
std::string m_strData;
|
||||
std::pair<boost::shared_array<unsigned char>, _INT32> data;
|
||||
|
||||
CRecordRoundTripThemeAtom()
|
||||
{
|
||||
}
|
||||
|
||||
~CRecordRoundTripThemeAtom()
|
||||
{
|
||||
}
|
||||
CRecordRoundTripThemeAtom(){}
|
||||
~CRecordRoundTripThemeAtom(){}
|
||||
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
||||
{
|
||||
m_oHeader = oHeader;
|
||||
m_strData = StreamUtils::ReadStringA(pStream, (long)m_oHeader.RecLen);
|
||||
|
||||
data = std::make_pair(boost::shared_array<unsigned char>(new unsigned char[m_oHeader.RecLen]), m_oHeader.RecLen);
|
||||
pStream->read(data.first.get(), data.second);
|
||||
}
|
||||
};
|
||||
|
||||
@ -34,16 +34,23 @@
|
||||
|
||||
class CRecordSSDocInfoAtom : public CUnknownRecord
|
||||
{
|
||||
SColorAtom m_oColor;
|
||||
INT m_nRestartTime;
|
||||
SHORT m_nStartSlide;
|
||||
SHORT m_nEndSlide;
|
||||
|
||||
USHORT m_pName[32];
|
||||
USHORT m_nFlags;
|
||||
|
||||
public:
|
||||
SColorAtom m_oPenColor;
|
||||
_INT32 m_nRestartTime;
|
||||
short m_nStartSlide;
|
||||
short m_nEndSlide;
|
||||
std::wstring m_pName;
|
||||
|
||||
bool fAutoAdvance;
|
||||
bool fWillSkipBuilds;
|
||||
bool fUseSlideRange;
|
||||
bool fDocUseNamedShow;
|
||||
bool fBrowseMode;
|
||||
bool fKioskMode;
|
||||
bool fWillSkipNarration;
|
||||
bool fLoopContinuously;
|
||||
bool fHideScrollBar;
|
||||
|
||||
CRecordSSDocInfoAtom()
|
||||
{
|
||||
}
|
||||
@ -54,7 +61,32 @@ public:
|
||||
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
||||
{
|
||||
return CUnknownRecord::ReadFromStream(oHeader, pStream);
|
||||
m_oHeader = oHeader;
|
||||
|
||||
unsigned short flags;
|
||||
unsigned char nm[64];
|
||||
|
||||
NSStreamReader::Read(pStream, m_oPenColor);
|
||||
m_nRestartTime = StreamUtils::ReadLONG(pStream);
|
||||
m_nStartSlide = StreamUtils::ReadSHORT(pStream);
|
||||
m_nEndSlide = StreamUtils::ReadSHORT(pStream);
|
||||
|
||||
pStream->read(nm, 64);
|
||||
m_pName = NSFile::CUtf8Converter::GetWStringFromUTF16((unsigned short*)nm, 32);
|
||||
|
||||
flags = StreamUtils::ReadWORD(pStream);
|
||||
|
||||
fAutoAdvance = GETBIT(flags, 15);
|
||||
fWillSkipBuilds = GETBIT(flags, 14);
|
||||
fUseSlideRange = GETBIT(flags, 13);
|
||||
fDocUseNamedShow = GETBIT(flags, 12);
|
||||
fBrowseMode = GETBIT(flags, 11);
|
||||
fKioskMode = GETBIT(flags, 10);
|
||||
fWillSkipNarration = GETBIT(flags, 9);
|
||||
fLoopContinuously = GETBIT(flags, 8);
|
||||
fHideScrollBar = GETBIT(flags, 7);
|
||||
|
||||
unsigned short unused = StreamUtils::ReadWORD(pStream);
|
||||
}
|
||||
|
||||
};
|
||||
@ -34,10 +34,9 @@
|
||||
|
||||
class CRecordSSlideLayoutAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
INT m_nGeom;
|
||||
BYTE m_pPlaceHolderID[8];
|
||||
|
||||
public:
|
||||
|
||||
CRecordSSlideLayoutAtom()
|
||||
{
|
||||
|
||||
@ -34,9 +34,8 @@
|
||||
|
||||
class CRecordShapeFlags10Atom : public CUnknownRecord
|
||||
{
|
||||
BYTE m_nFlags;
|
||||
|
||||
public:
|
||||
BYTE m_nFlags;
|
||||
|
||||
CRecordShapeFlags10Atom()
|
||||
{
|
||||
|
||||
@ -34,9 +34,8 @@
|
||||
|
||||
class CRecordShapeFlagsAtom : public CUnknownRecord
|
||||
{
|
||||
BYTE m_nFlags;
|
||||
|
||||
public:
|
||||
BYTE m_nFlags;
|
||||
|
||||
CRecordShapeFlagsAtom()
|
||||
{
|
||||
|
||||
@ -32,23 +32,56 @@
|
||||
#pragma once
|
||||
#include "../Reader/Records.h"
|
||||
|
||||
class CRecordSlideColorSchemeAtom : public CUnknownRecord
|
||||
class CRecordSplitMenuColorRecord: public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
SColorAtom m_arColors[8];
|
||||
SColorAtom m_oFillColor;
|
||||
SColorAtom m_oLineColor;
|
||||
SColorAtom m_oShadowColor;
|
||||
SColorAtom m_o3DColor;
|
||||
|
||||
CRecordSlideColorSchemeAtom()
|
||||
CRecordSplitMenuColorRecord()
|
||||
{
|
||||
}
|
||||
|
||||
~CRecordSlideColorSchemeAtom()
|
||||
~CRecordSplitMenuColorRecord()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
||||
{
|
||||
return CUnknownRecord::ReadFromStream(oHeader, pStream);
|
||||
m_oHeader = oHeader;
|
||||
|
||||
NSStreamReader::Read(pStream, m_oFillColor);
|
||||
NSStreamReader::Read(pStream, m_oLineColor);
|
||||
NSStreamReader::Read(pStream, m_oShadowColor);
|
||||
NSStreamReader::Read(pStream, m_o3DColor);
|
||||
}
|
||||
};
|
||||
|
||||
typedef CRecordSlideColorSchemeAtom CRecordSchemeListElementColorSchemeAtom;
|
||||
class CRecordMostRecentlyUserColors : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
std::vector<SColorAtom> m_oColors;
|
||||
|
||||
CRecordMostRecentlyUserColors()
|
||||
{
|
||||
}
|
||||
|
||||
~CRecordMostRecentlyUserColors()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void ReadFromStream(SRecordHeader & oHeader, POLE::Stream* pStream)
|
||||
{
|
||||
m_oHeader = oHeader;
|
||||
|
||||
for (int i = 0; i < m_oHeader.RecLen / 4; i++)
|
||||
{
|
||||
SColorAtom color;
|
||||
NSStreamReader::Read(pStream, color);
|
||||
|
||||
m_oColors.push_back(color);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -154,7 +154,7 @@ public:
|
||||
if (RECORD_TYPE_TXINTERACTIVEINFO_ATOM == oRec.RecType)
|
||||
{
|
||||
CRecordTextInteractiveInfoAtom* pTxRanges = dynamic_cast<CRecordTextInteractiveInfoAtom*>(pRecord);
|
||||
NSPresentationEditor::CTextRange oRange;
|
||||
PPT_FORMAT::CTextRange oRange;
|
||||
oRange.m_lStart = pTxRanges->m_lStart;
|
||||
oRange.m_lEnd = pTxRanges->m_lEnd;
|
||||
m_arTextPlaceHolders[nCurrentSlide][nCurrentTextHeader].m_arRanges.push_back(oRange);
|
||||
|
||||
@ -43,8 +43,8 @@ public:
|
||||
// Text.Bytes/Chars.Atom
|
||||
_UINT32 m_lCount;
|
||||
|
||||
std::vector<CTextPFRun_ppt> m_arrPFs;
|
||||
std::vector<CTextCFRun_ppt> m_arrCFs;
|
||||
std::vector<CTextPFRunRecord> m_arrPFs;
|
||||
std::vector<CTextCFRunRecord> m_arrCFs;
|
||||
|
||||
CRecordStyleTextPropAtom()
|
||||
{
|
||||
@ -73,7 +73,7 @@ public:
|
||||
|
||||
while (lMemCount < m_lCount + 1)
|
||||
{
|
||||
CTextPFRun_ppt elm;
|
||||
CTextPFRunRecord elm;
|
||||
m_arrPFs.push_back(elm);
|
||||
m_arrPFs[lCountItems].LoadFromStream(pStream);
|
||||
lMemCount += m_arrPFs[lCountItems].m_lCount;
|
||||
@ -85,7 +85,7 @@ public:
|
||||
lCountItems = 0;
|
||||
while (lMemCount < m_lCount + 1)
|
||||
{
|
||||
CTextCFRun_ppt elm;
|
||||
CTextCFRunRecord elm;
|
||||
m_arrCFs.push_back(elm);
|
||||
|
||||
m_arrCFs[lCountItems].LoadFromStream(pStream);
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
class CRecordTextCFExceptionAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
CTextCFRun_ppt m_oCFRun;
|
||||
CTextCFRunRecord m_oCFRun;
|
||||
|
||||
CRecordTextCFExceptionAtom()
|
||||
{
|
||||
|
||||
@ -47,7 +47,7 @@ public:
|
||||
CRecordTextSpecInfoAtom* m_pTextSpecInfo;
|
||||
CRecordTextRulerAtom* m_pTextRuler;
|
||||
|
||||
std::vector<NSPresentationEditor::CTextRange> m_arRanges;
|
||||
std::vector<PPT_FORMAT::CTextRange> m_arRanges;
|
||||
|
||||
std::wstring m_strText;
|
||||
_UINT32 m_nTextType;
|
||||
@ -97,7 +97,7 @@ public:
|
||||
pTextAttributes->m_lStyleThemeIndex = m_lStyleThemeIndex;
|
||||
|
||||
if (NULL != m_pTextStyleProp)
|
||||
NSPresentationEditor::ConvertPPTTextToEditorStructure(m_pTextStyleProp->m_arrPFs, m_pTextStyleProp->m_arrCFs, m_strText, *pTextAttributes);
|
||||
PPT_FORMAT::ConvertPPTTextToEditorStructure(m_pTextStyleProp->m_arrPFs, m_pTextStyleProp->m_arrCFs, m_strText, *pTextAttributes);
|
||||
|
||||
if (NULL != m_pTextRuler)
|
||||
pTextAttributes->m_oRuler = m_pTextRuler->m_oTextRuler;
|
||||
|
||||
@ -32,14 +32,14 @@
|
||||
#pragma once
|
||||
#include "../Reader/Records.h"
|
||||
|
||||
class CRecordTextMasterStyleAtom : public CUnknownRecord, public NSPresentationEditor::CTextStyles
|
||||
class CRecordTextMasterStyleAtom : public CUnknownRecord, public PPT_FORMAT::CTextStyles
|
||||
{
|
||||
public:
|
||||
LONG m_nTextType;
|
||||
|
||||
CRecordTextMasterStyleAtom() : NSPresentationEditor::CTextStyles()
|
||||
CRecordTextMasterStyleAtom() : PPT_FORMAT::CTextStyles()
|
||||
{
|
||||
m_nTextType = 0;
|
||||
m_nTextType = -1;
|
||||
}
|
||||
|
||||
~CRecordTextMasterStyleAtom()
|
||||
@ -111,12 +111,12 @@ protected:
|
||||
if (bIsLevelPresent)
|
||||
lLevel = StreamUtils::ReadSHORT(pStream);
|
||||
|
||||
CTextPFRun_ppt oPF;
|
||||
CTextCFRun_ppt oCF;
|
||||
CTextPFRunRecord oPF;
|
||||
CTextCFRunRecord oCF;
|
||||
oPF.LoadFromStream(pStream, false);
|
||||
oCF.LoadFromStream(pStream, false);
|
||||
|
||||
m_pLevels[lLevelOld] = new NSPresentationEditor::CTextStyleLevel();
|
||||
m_pLevels[lLevelOld] = new PPT_FORMAT::CTextStyleLevel();
|
||||
m_pLevels[lLevelOld]->m_oPFRun = oPF.m_oRun;
|
||||
m_pLevels[lLevelOld]->m_oCFRun = oCF.m_oRun;
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
class CRecordTextPFExceptionAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
CTextPFRun_ppt m_oPFRun;
|
||||
CTextPFRunRecord m_oPFRun;
|
||||
|
||||
CRecordTextPFExceptionAtom()
|
||||
{
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
class CRecordTextRulerAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
NSPresentationEditor::CTextRuler m_oTextRuler;
|
||||
PPT_FORMAT::CTextRuler m_oTextRuler;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ public:
|
||||
LONG m_lOffsetInStream;
|
||||
_UINT32 m_lCount;
|
||||
|
||||
std::vector<NSPresentationEditor::CTextSIRun> m_arrSIs;
|
||||
std::vector<PPT_FORMAT::CTextSIRun> m_arrSIs;
|
||||
|
||||
|
||||
CRecordTextSpecInfoAtom()
|
||||
@ -62,7 +62,7 @@ public:
|
||||
_UINT32 lMemCount = 0;
|
||||
while (true)
|
||||
{
|
||||
NSPresentationEditor::CTextSIRun elm;
|
||||
PPT_FORMAT::CTextSIRun elm;
|
||||
m_arrSIs.push_back(elm);
|
||||
|
||||
NSStreamReader::Read(pStream, m_arrSIs.back());
|
||||
|
||||
@ -34,13 +34,12 @@
|
||||
|
||||
class CRecordZoomViewInfoAtom : public CUnknownRecord
|
||||
{
|
||||
public:
|
||||
SScalingAtom m_oCurScale;
|
||||
SPointAtom m_nOrigin;
|
||||
|
||||
BOOL1 m_bUseVarScale;
|
||||
BOOL1 m_bDraftMode;
|
||||
|
||||
public:
|
||||
|
||||
CRecordZoomViewInfoAtom()
|
||||
{
|
||||
|
||||
@ -279,9 +279,9 @@ namespace NS_DWC_Common
|
||||
// 0x00FFFFFF, 0x00000000, 0x00000000, 0x00000000,
|
||||
// 0x00000000, 0x00000000, 0x00FFFFFF, 0x00FFFFFF
|
||||
//};
|
||||
NSPresentationEditor::CColor getColorFromString(const std::wstring& colorStr)
|
||||
ODRAW::CColor getColorFromString(const std::wstring& colorStr)
|
||||
{
|
||||
NSPresentationEditor::CColor color;
|
||||
ODRAW::CColor color;
|
||||
bool bSet = false;
|
||||
if (colorStr.find(L"#") != std::wstring::npos)
|
||||
{
|
||||
@ -1780,7 +1780,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
|
||||
std::wstring strStyleAdvenced = L"";
|
||||
|
||||
NSPresentationEditor::CShapeElement oShapeElem;
|
||||
PPT_FORMAT::CShapeElement oShapeElem;
|
||||
CPPTShape* pPPTShape = NULL;
|
||||
bool bSetShape = false;
|
||||
|
||||
@ -2144,7 +2144,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
{
|
||||
eFillType = etSolidFill;
|
||||
|
||||
NSPresentationEditor::CColor color = NS_DWC_Common::getColorFromString(*sFillColor);
|
||||
ODRAW::CColor color = NS_DWC_Common::getColorFromString(*sFillColor);
|
||||
PPTX::Logic::SolidFill* pSolid = new PPTX::Logic::SolidFill();
|
||||
pSolid->m_namespace = L"a";
|
||||
|
||||
@ -2302,7 +2302,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
}
|
||||
if (sColor.is_init())
|
||||
{
|
||||
NSPresentationEditor::CColor color;
|
||||
ODRAW::CColor color;
|
||||
if (sColor->find(L"fill") != -1)
|
||||
{
|
||||
std::wstring sColorEffect = *sColor;
|
||||
@ -2341,7 +2341,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
}
|
||||
if (sColor2.is_init())
|
||||
{
|
||||
NSPresentationEditor::CColor color;
|
||||
ODRAW::CColor color;
|
||||
if (sColor2->find(L"fill") != -1)
|
||||
{
|
||||
std::wstring sColorEffect = *sColor2;
|
||||
@ -2407,7 +2407,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
|
||||
double pos = strPos.empty() ? 0 : _wtof(strPos.c_str());
|
||||
|
||||
NSPresentationEditor::CColor color = NS_DWC_Common::getColorFromString(strColor);
|
||||
ODRAW::CColor color = NS_DWC_Common::getColorFromString(strColor);
|
||||
PPTX::Logic::UniColor *oColor = new PPTX::Logic::UniColor();
|
||||
oColor->Color = new PPTX::Logic::SrgbClr();
|
||||
oColor->Color->SetRGB(color.R, color.G, color.B);
|
||||
@ -2628,7 +2628,7 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
|
||||
smart_ptr<PPTX::Logic::SolidFill> pSolid = new PPTX::Logic::SolidFill();
|
||||
pSolid->m_namespace = L"a";
|
||||
pSolid->Color.Color = new PPTX::Logic::SrgbClr();
|
||||
NSPresentationEditor::CColor color;
|
||||
ODRAW::CColor color;
|
||||
|
||||
if (sStroked.is_init())
|
||||
{
|
||||
@ -4167,7 +4167,7 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
|
||||
XmlMacroReadAttributeBase(oNode, L"fillcolor", sFillColor);
|
||||
if (sFillColor.is_init() && !pPPTShape->IsWordArt())
|
||||
{
|
||||
NSPresentationEditor::CColor color = NS_DWC_Common::getColorFromString(*sFillColor);
|
||||
ODRAW::CColor color = NS_DWC_Common::getColorFromString(*sFillColor);
|
||||
|
||||
PPTX::Logic::SolidFill* pSolid = new PPTX::Logic::SolidFill();
|
||||
pSolid->m_namespace = L"a";
|
||||
@ -4240,7 +4240,7 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
|
||||
XmlMacroReadAttributeBase(oNodeFill, L"color", sColor);
|
||||
if (sColor.is_init())
|
||||
{
|
||||
NSPresentationEditor::CColor color = NS_DWC_Common::getColorFromString(*sColor);
|
||||
ODRAW::CColor color = NS_DWC_Common::getColorFromString(*sColor);
|
||||
|
||||
PPTX::Logic::SolidFill* pSolid = new PPTX::Logic::SolidFill();
|
||||
pSolid->m_namespace = L"a";
|
||||
@ -4303,7 +4303,7 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
|
||||
|
||||
if (sColor.is_init())
|
||||
{
|
||||
NSPresentationEditor::CColor color = NS_DWC_Common::getColorFromString(*sColor);
|
||||
ODRAW::CColor color = NS_DWC_Common::getColorFromString(*sColor);
|
||||
|
||||
PPTX::Logic::Gs Gs_;
|
||||
Gs_.color.Color = new PPTX::Logic::SrgbClr();
|
||||
@ -4333,7 +4333,7 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
|
||||
}
|
||||
else
|
||||
{
|
||||
NSPresentationEditor::CColor color = NS_DWC_Common::getColorFromString(*sColor2);
|
||||
ODRAW::CColor color = NS_DWC_Common::getColorFromString(*sColor2);
|
||||
Gs_.color.Color->SetRGB(color.R, color.G, color.B);
|
||||
}
|
||||
|
||||
@ -4543,7 +4543,7 @@ void CDrawingConverter::CheckPenShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils::
|
||||
XmlMacroReadAttributeBase(oNode, L"strokecolor", sStrokeColor);
|
||||
if (sStrokeColor.is_init())
|
||||
{
|
||||
NSPresentationEditor::CColor color = NS_DWC_Common::getColorFromString(*sStrokeColor);
|
||||
ODRAW::CColor color = NS_DWC_Common::getColorFromString(*sStrokeColor);
|
||||
|
||||
if (!pSpPr->ln.is_init())
|
||||
pSpPr->ln = new PPTX::Logic::Ln();
|
||||
@ -4616,7 +4616,7 @@ void CDrawingConverter::CheckPenShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils::
|
||||
XmlMacroReadAttributeBase(oNodeStroke, L"strokecolor", sStrokeColor);
|
||||
if (sStrokeColor.is_init())
|
||||
{
|
||||
NSPresentationEditor::CColor color = NS_DWC_Common::getColorFromString(*sStrokeColor);
|
||||
ODRAW::CColor color = NS_DWC_Common::getColorFromString(*sStrokeColor);
|
||||
|
||||
if (!pSpPr->ln.is_init())
|
||||
pSpPr->ln = new PPTX::Logic::Ln();
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#pragma once
|
||||
#include "Attributes.h"
|
||||
|
||||
namespace NSPresentationEditor
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
enum PointPathType
|
||||
{
|
||||
@ -346,24 +346,24 @@ namespace NSPresentationEditor
|
||||
|
||||
// m_oQuery.clear ();
|
||||
|
||||
// m_oQuery.push_back ( _T(" id = '") + NSPresentationEditor::ToString (pEffect->m_nEffectID) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" type = '") + NSPresentationEditor::ToString (pEffect->m_nEffectType) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" dir = '") + NSPresentationEditor::ToString (pEffect->m_nEffectDir) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" id = '") + PPT_FORMAT::ToString (pEffect->m_nEffectID) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" type = '") + PPT_FORMAT::ToString (pEffect->m_nEffectType) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" dir = '") + PPT_FORMAT::ToString (pEffect->m_nEffectDir) + _T("' "));
|
||||
|
||||
// m_oQuery.push_back ( _T(" begin = '") + NSPresentationEditor::ToString (dEffectBegin) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" dur = '") + NSPresentationEditor::ToString (pEffect->m_nDuration) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" accel = '") + NSPresentationEditor::ToString (pEffect->m_dTimeAccel) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" decel = '") + NSPresentationEditor::ToString (pEffect->m_dTimeDecel) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" begin = '") + PPT_FORMAT::ToString (dEffectBegin) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" dur = '") + PPT_FORMAT::ToString (pEffect->m_nDuration) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" accel = '") + PPT_FORMAT::ToString (pEffect->m_dTimeAccel) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" decel = '") + PPT_FORMAT::ToString (pEffect->m_dTimeDecel) + _T("' "));
|
||||
|
||||
// m_oQuery.push_back ( _T(" sx = '") + NSPresentationEditor::ToString (pEffect->m_dSX) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" sy = '") + NSPresentationEditor::ToString (pEffect->m_dSY) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" alpha = '") + NSPresentationEditor::ToString (pEffect->m_dTransparency) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" sx = '") + PPT_FORMAT::ToString (pEffect->m_dSX) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" sy = '") + PPT_FORMAT::ToString (pEffect->m_dSY) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" alpha = '") + PPT_FORMAT::ToString (pEffect->m_dTransparency) + _T("' "));
|
||||
|
||||
// m_oQuery.push_back ( _T(" angle = '") + NSPresentationEditor::ToString (pEffect->m_dRotateAngle) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" color = '") + NSPresentationEditor::ToString (pEffect->m_nColorTo) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" angle = '") + PPT_FORMAT::ToString (pEffect->m_dRotateAngle) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" color = '") + PPT_FORMAT::ToString (pEffect->m_nColorTo) + _T("' "));
|
||||
|
||||
// m_oQuery.push_back ( _T(" block = '") + NSPresentationEditor::ToString (pEffect->m_nTextSequence) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" removeemptyblocks = '") + NSPresentationEditor::ToString (pEffect->m_bRemoveEmptyBlocks) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" block = '") + PPT_FORMAT::ToString (pEffect->m_nTextSequence) + _T("' "));
|
||||
// m_oQuery.push_back ( _T(" removeemptyblocks = '") + PPT_FORMAT::ToString (pEffect->m_bRemoveEmptyBlocks) + _T("' "));
|
||||
|
||||
// std::wstring Effect;
|
||||
|
||||
|
||||
@ -43,18 +43,34 @@
|
||||
#include "../../../DesktopEditor/graphics/structures.h"
|
||||
#include "../../../Common/DocxFormat/Source/XML/Utils.h"
|
||||
|
||||
namespace NSPresentationEditor
|
||||
static void ReplaceAll(std::wstring & str, const std::wstring& from, const std::wstring& to)
|
||||
{
|
||||
static void ReplaceAll(std::wstring & str, const std::wstring& from, const std::wstring& to)
|
||||
size_t start_pos = 0;
|
||||
while((start_pos = str.find(from, start_pos)) != std::wstring::npos)
|
||||
{
|
||||
size_t start_pos = 0;
|
||||
while((start_pos = str.find(from, start_pos)) != std::wstring::npos)
|
||||
{
|
||||
str.replace(start_pos, from.length(), to);
|
||||
start_pos += to.length();
|
||||
}
|
||||
str.replace(start_pos, from.length(), to);
|
||||
start_pos += to.length();
|
||||
}
|
||||
}
|
||||
static void CorrectXmlString2(std::wstring & strText)
|
||||
{
|
||||
ReplaceAll(strText, L"'", L"'");
|
||||
ReplaceAll(strText, L"<", L"<");
|
||||
ReplaceAll(strText, L">", L">");
|
||||
ReplaceAll(strText, L""", L"\"");
|
||||
ReplaceAll(strText, L"&", L"&");
|
||||
}
|
||||
static void CorrectXmlString(std::wstring & strText)
|
||||
{
|
||||
strText = XmlUtils::EncodeXmlString(strText);
|
||||
}
|
||||
static inline std::wstring BoolToString(bool bValue)
|
||||
{
|
||||
return bValue ? L"1" : L"0";
|
||||
}
|
||||
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
class CExFilesInfo
|
||||
{
|
||||
public:
|
||||
@ -239,42 +255,9 @@ namespace NSPresentationEditor
|
||||
}
|
||||
};
|
||||
|
||||
static void CorrectXmlString2(std::wstring & strText)
|
||||
{
|
||||
ReplaceAll(strText, L"'", L"'");
|
||||
ReplaceAll(strText, L"<", L"<");
|
||||
ReplaceAll(strText, L">", L">");
|
||||
ReplaceAll(strText, L""", L"\"");
|
||||
ReplaceAll(strText, L"&", L"&");
|
||||
}
|
||||
static void CorrectXmlString(std::wstring & strText)
|
||||
{
|
||||
strText = XmlUtils::EncodeXmlString(strText);
|
||||
}
|
||||
static inline std::wstring BoolToString(bool bValue)
|
||||
{
|
||||
if (bValue)
|
||||
return _T("1");
|
||||
return _T("0");
|
||||
}
|
||||
|
||||
static inline std::wstring ToString(int val)
|
||||
{
|
||||
return std::to_wstring(val);
|
||||
}
|
||||
static inline std::wstring ToString(_UINT32 val)
|
||||
{
|
||||
return std::to_wstring(val);
|
||||
}
|
||||
static inline std::wstring ToString(long val)
|
||||
{
|
||||
return std::to_wstring(val);
|
||||
}
|
||||
static inline std::wstring ToString(double val)
|
||||
{
|
||||
return std::to_wstring(val);
|
||||
}
|
||||
|
||||
}
|
||||
namespace ODRAW
|
||||
{
|
||||
class CColor
|
||||
{
|
||||
public:
|
||||
@ -296,7 +279,7 @@ namespace NSPresentationEditor
|
||||
}
|
||||
CColor(_UINT32 rgb)
|
||||
{
|
||||
CreateColor(rgb);
|
||||
(*this) = CreateColor(rgb);
|
||||
}
|
||||
CColor& operator =(const CColor& oSrc)
|
||||
{
|
||||
@ -397,7 +380,7 @@ namespace NSPresentationEditor
|
||||
dwColor |= R;
|
||||
dwColor |= (G << 8);
|
||||
dwColor |= (B << 16);
|
||||
return NSPresentationEditor::ToString((int)dwColor);
|
||||
return std::to_wstring((int)dwColor);
|
||||
}
|
||||
|
||||
void FromString(std::wstring str)
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#pragma once
|
||||
#include "Elements.h"
|
||||
|
||||
namespace NSPresentationEditor
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
class CAudioPart
|
||||
{
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#include "AudioOverlay.h"
|
||||
#include "Slide.h"
|
||||
|
||||
namespace NSPresentationEditor
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
class CDocument
|
||||
{
|
||||
@ -157,11 +157,11 @@ namespace NSPresentationEditor
|
||||
|
||||
if (NULL == pShape) return;
|
||||
|
||||
if (pElement->m_lPlaceholderType == NSOfficePPT::MasterSlideNumber) pShape->SetUpTextPlaceholder(L"<#>");
|
||||
if (pElement->m_lPlaceholderType == PT_MasterSlideNumber) pShape->SetUpTextPlaceholder(L"<#>");
|
||||
|
||||
int ind = -1;
|
||||
if (pElement->m_lPlaceholderType == NSOfficePPT::MasterDate) ind = 0;
|
||||
if (pElement->m_lPlaceholderType == NSOfficePPT::MasterFooter) ind = 2;
|
||||
if (pElement->m_lPlaceholderType == PT_MasterDate) ind = 0;
|
||||
if (pElement->m_lPlaceholderType == PT_MasterFooter) ind = 2;
|
||||
|
||||
if (pElement->m_lPlaceholderUserStr >= 0 && ind >= 0)
|
||||
{
|
||||
@ -171,7 +171,7 @@ namespace NSPresentationEditor
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pElement->m_lPlaceholderType == NSOfficePPT::MasterDate && pElement->m_nFormatDate == 1)
|
||||
if (pElement->m_lPlaceholderType == PT_MasterDate && pElement->m_nFormatDate == 1)
|
||||
{
|
||||
std::wstring current_date = L"11.11.2015";
|
||||
pShape->SetUpTextPlaceholder(current_date);
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
namespace NSPresentationEditor
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
class CEffect
|
||||
{
|
||||
|
||||
@ -34,7 +34,9 @@
|
||||
#include "Interactive.h"
|
||||
#include "Animations.h"
|
||||
|
||||
namespace NSPresentationEditor
|
||||
using namespace ODRAW;
|
||||
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
enum ElementType
|
||||
{
|
||||
@ -46,81 +48,6 @@ namespace NSPresentationEditor
|
||||
etText = 5
|
||||
};
|
||||
|
||||
enum enumPlaceholderType
|
||||
{
|
||||
PT_None = 0,
|
||||
|
||||
PT_MasterTitle,
|
||||
PT_MasterBody,
|
||||
PT_MasterCenterTitle,
|
||||
PT_MasterSubTitle,
|
||||
PT_MasterNotesSlideImage,
|
||||
PT_MasterNotesBody,
|
||||
|
||||
PT_MasterDate,
|
||||
PT_MasterSlideNumber,
|
||||
PT_MasterFooter,
|
||||
PT_MasterHeader,
|
||||
|
||||
PT_NotesSlideImage,
|
||||
PT_NotesBody,
|
||||
|
||||
PT_Title,
|
||||
PT_Body,
|
||||
PT_CenterTitle,
|
||||
PT_SubTitle,
|
||||
PT_VerticalTitle,
|
||||
PT_VerticalBody,
|
||||
PT_Object,
|
||||
PT_Graph,
|
||||
PT_Table,
|
||||
PT_ClipArt,
|
||||
PT_OrgChart,
|
||||
PT_Media,
|
||||
PT_VerticalObject,
|
||||
PT_Picture
|
||||
};
|
||||
|
||||
static void CorrectPlaceholderType(int & type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case PT_MasterTitle: type = PT_Title; break;
|
||||
case PT_MasterBody: type = PT_Body; break;
|
||||
case PT_MasterCenterTitle: type = PT_CenterTitle; break;
|
||||
case PT_MasterSubTitle: type = PT_SubTitle; break;
|
||||
case PT_MasterNotesSlideImage: type = PT_NotesSlideImage; break;
|
||||
case PT_MasterNotesBody: type = PT_NotesBody; break;
|
||||
}
|
||||
}
|
||||
|
||||
static bool isTitlePlaceholder(int type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case PT_MasterTitle:
|
||||
case PT_MasterCenterTitle:
|
||||
case PT_Title:
|
||||
case PT_CenterTitle:
|
||||
case PT_VerticalTitle:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
static bool isBodyPlaceholder(int type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case PT_MasterBody:
|
||||
case PT_Body:
|
||||
case PT_VerticalBody:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class CTheme;
|
||||
class CLayout;
|
||||
class CSlide;
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include "Slide.h"
|
||||
|
||||
void NSPresentationEditor::CShapeElement::CalculateColor(CColor& oColor, CSlide* pSlide, CTheme* pTheme, CLayout* pLayout)
|
||||
void PPT_FORMAT::CShapeElement::CalculateColor(CColor& oColor, CSlide* pSlide, CTheme* pTheme, CLayout* pLayout)
|
||||
{
|
||||
LONG lOldIndex = oColor.m_lSchemeIndex;
|
||||
if (-1 == oColor.m_lSchemeIndex)
|
||||
@ -61,9 +61,9 @@ void NSPresentationEditor::CShapeElement::CalculateColor(CColor& oColor, CSlide*
|
||||
oColor.m_lSchemeIndex = lOldIndex;
|
||||
}
|
||||
|
||||
void NSPresentationEditor::CShapeElement::SetupTextProperties(CSlide* pSlide, CTheme* pTheme, CLayout* pLayout)
|
||||
void PPT_FORMAT::CShapeElement::SetupTextProperties(CSlide* pSlide, CTheme* pTheme, CLayout* pLayout)
|
||||
{
|
||||
NSPresentationEditor::CTextAttributesEx* pAttributes = &m_pShape->m_oText;
|
||||
PPT_FORMAT::CTextAttributesEx* pAttributes = &m_pShape->m_oText;
|
||||
int nCountColors = 0;
|
||||
if (NULL != pTheme)
|
||||
nCountColors = (int)pTheme->m_arColorScheme.size();
|
||||
@ -99,31 +99,32 @@ void NSPresentationEditor::CShapeElement::SetupTextProperties(CSlide* pSlide, CT
|
||||
{
|
||||
if ((pRun->fontRef.is_init()) && (pRun->fontRef.get() < pTheme->m_arFonts.size()))
|
||||
{
|
||||
pRun->FontProperties = new CFontProperties();
|
||||
pRun->FontProperties->SetFont(pTheme->m_arFonts[pRun->fontRef.get()]);
|
||||
pRun->font.font = new CFontProperty(pTheme->m_arFonts[pRun->fontRef.get()]);
|
||||
|
||||
if (1 < pRun->fontRef.get())
|
||||
pRun->fontRef.reset();
|
||||
//if (1 < pRun->fontRef.get())
|
||||
// pRun->fontRef.reset();
|
||||
}
|
||||
if ((pRun->EAFontRef.is_init()) && (pRun->EAFontRef.get() < pTheme->m_arFonts.size()))
|
||||
if ((pRun->ansiFontRef.is_init()) && (pRun->ansiFontRef.get() < pTheme->m_arFonts.size()))
|
||||
{
|
||||
pRun->FontPropertiesEA = new CFontProperties();
|
||||
pRun->FontPropertiesEA->SetFont(pTheme->m_arFonts[pRun->EAFontRef.get()]);
|
||||
pRun->font.ansi = new CFontProperty(pTheme->m_arFonts[pRun->ansiFontRef.get()]);
|
||||
}
|
||||
if ((pRun->SymbolFontRef.is_init()) && (pRun->SymbolFontRef.get() < pTheme->m_arFonts.size()))
|
||||
if ((pRun->eaFontRef.is_init()) && (pRun->eaFontRef.get() < pTheme->m_arFonts.size()))
|
||||
{
|
||||
pRun->FontPropertiesSym = new CFontProperties();
|
||||
pRun->FontPropertiesSym->SetFont(pTheme->m_arFonts[pRun->SymbolFontRef.get()]);
|
||||
pRun->font.ea = new CFontProperty(pTheme->m_arFonts[pRun->eaFontRef.get()]);
|
||||
}
|
||||
if ((pRun->symbolFontRef.is_init()) && (pRun->symbolFontRef.get() < pTheme->m_arFonts.size()))
|
||||
{
|
||||
pRun->font.sym = new CFontProperty(pTheme->m_arFonts[pRun->symbolFontRef.get()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool NSPresentationEditor::CShapeElement::SetUpTextPlaceholder(std::wstring newText)
|
||||
bool PPT_FORMAT::CShapeElement::SetUpTextPlaceholder(std::wstring newText)
|
||||
{
|
||||
bool result = false;
|
||||
NSPresentationEditor::CTextAttributesEx* pText = &m_pShape->m_oText;
|
||||
PPT_FORMAT::CTextAttributesEx* pText = &m_pShape->m_oText;
|
||||
|
||||
for (size_t p = 0 ; p < pText->m_arParagraphs.size(); p++) //тут по всем -> 1-(33).ppt
|
||||
{
|
||||
|
||||
@ -282,7 +282,7 @@ namespace PPTX2EditorAdvanced
|
||||
}
|
||||
|
||||
|
||||
namespace NSPresentationEditor
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
class CImageElement : public CElement
|
||||
{
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
#include "../../../DesktopEditor/common/ASCVariant.h"
|
||||
|
||||
namespace NSPresentationEditor
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
class CTextRange
|
||||
{
|
||||
|
||||
@ -32,8 +32,126 @@
|
||||
#pragma once
|
||||
#include "Element.h"
|
||||
|
||||
namespace NSPresentationEditor
|
||||
namespace PPT_FORMAT
|
||||
{
|
||||
enum eSlideSize
|
||||
{
|
||||
SS_Screen = 0,
|
||||
SS_LetterPaper = 1,
|
||||
SS_A4Paper = 2,
|
||||
SS_35mm = 3,
|
||||
SS_Overhead = 4,
|
||||
SS_Banner = 5,
|
||||
SS_Custom = 6
|
||||
};
|
||||
|
||||
enum ePlaceholderType
|
||||
{
|
||||
PT_None = 0,
|
||||
PT_MasterTitle = 1,
|
||||
PT_MasterBody = 2,
|
||||
PT_MasterCenterTitle = 3,
|
||||
PT_MasterSubTitle = 4,
|
||||
PT_MasterNotesSlideImage = 5,
|
||||
PT_MasterNotesBody = 6,
|
||||
PT_MasterDate = 7,
|
||||
PT_MasterSlideNumber = 8,
|
||||
PT_MasterFooter = 9,
|
||||
PT_MasterHeader = 10,
|
||||
PT_NotesSlideImage = 11,
|
||||
PT_NotesBody = 12,
|
||||
PT_Title = 13,
|
||||
PT_Body = 14,
|
||||
PT_CenterTitle = 15,
|
||||
PT_SubTitle = 16,
|
||||
PT_VerticalTitle = 17,
|
||||
PT_VerticalBody = 18,
|
||||
PT_Object = 19,
|
||||
PT_Graph = 20,
|
||||
PT_Table = 21,
|
||||
PT_ClipArt = 22,
|
||||
PT_OrgChart = 23,
|
||||
PT_Media = 24
|
||||
};
|
||||
|
||||
enum Instances
|
||||
{
|
||||
CollectionOfSlides = 0,
|
||||
CollectionOfMasterSlides = 1,
|
||||
CollectionOfNotesSlides = 2
|
||||
};
|
||||
|
||||
enum eSlideLayoutType
|
||||
{
|
||||
SL_TitleSlide = 0,
|
||||
SL_TitleBody = 1,
|
||||
SL_MasterTitle = 2,
|
||||
SL_TitleOnly = 7,
|
||||
SL_TwoColumns = 8,
|
||||
SL_TwoRows = 9,
|
||||
SL_ColumnTwoRows = 10,
|
||||
SL_TwoRowsColumn = 11,
|
||||
SL_TwoColumnsRow = 13,
|
||||
SL_FourObjects = 14,
|
||||
SL_BigObject = 15,
|
||||
SL_Blank = 16,
|
||||
SL_VerticalTitleBody = 17,
|
||||
SL_VerticalTwoRows = 18
|
||||
};
|
||||
|
||||
enum eTextType
|
||||
{
|
||||
Tx_TYPE_TITLE = 0,
|
||||
Tx_TYPE_BODY = 1,
|
||||
Tx_TYPE_NOTES = 2,
|
||||
Tx_TYPE_OTHER = 4,
|
||||
Tx_TYPE_CENTERBODY = 5,
|
||||
Tx_TYPE_CENTERTITLE = 6,
|
||||
Tx_TYPE_HALFBODY = 7,
|
||||
Tx_TYPE_QUARTERBODY = 8,
|
||||
|
||||
NoPresent = 0xFF
|
||||
};
|
||||
static void CorrectPlaceholderType(int & type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case PT_MasterTitle: type = PT_Title; break;
|
||||
case PT_MasterBody: type = PT_Body; break;
|
||||
case PT_MasterCenterTitle: type = PT_CenterTitle; break;
|
||||
case PT_MasterSubTitle: type = PT_SubTitle; break;
|
||||
case PT_MasterNotesSlideImage: type = PT_NotesSlideImage; break;
|
||||
case PT_MasterNotesBody: type = PT_NotesBody; break;
|
||||
}
|
||||
}
|
||||
|
||||
static bool isTitlePlaceholder(int type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case PT_MasterTitle:
|
||||
case PT_MasterCenterTitle:
|
||||
case PT_Title:
|
||||
case PT_CenterTitle:
|
||||
case PT_VerticalTitle:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
static bool isBodyPlaceholder(int type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case PT_MasterBody:
|
||||
case PT_Body:
|
||||
case PT_VerticalBody:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class CLayout
|
||||
{
|
||||
public:
|
||||
@ -129,13 +247,13 @@ namespace NSPresentationEditor
|
||||
|
||||
return lFound;
|
||||
}
|
||||
NSPresentationEditor::CColor GetColor(const LONG& lIndexScheme)
|
||||
ODRAW::CColor GetColor(const LONG& lIndexScheme)
|
||||
{
|
||||
if (lIndexScheme < (LONG)m_arColorScheme.size())
|
||||
{
|
||||
return m_arColorScheme[lIndexScheme];
|
||||
}
|
||||
return NSPresentationEditor::CColor();
|
||||
return ODRAW::CColor();
|
||||
}
|
||||
|
||||
static void CheckPlaceholderStyle(std::wstring strStyleName, LONG& lType, LONG& lLevel, LONG& lTypeStyle)
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
namespace NSPresentationEditor
|
||||
namespace ODRAW
|
||||
{
|
||||
class CDoubleRect
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user