mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Compare commits
46 Commits
core/devel
...
core/devel
| Author | SHA1 | Date | |
|---|---|---|---|
| 7c97941acc | |||
| 01a4cd2289 | |||
| 202b58fb10 | |||
| b221150797 | |||
| 2084587e9a | |||
| 8332c28ac2 | |||
| 435a11d75c | |||
| 9a5329f5d6 | |||
| 8eecbf5fa5 | |||
| 9e1773df65 | |||
| 39e4140524 | |||
| bd90de857e | |||
| 57f2ec7b96 | |||
| 634098a6fa | |||
| bdbf208f6c | |||
| a652f5d73f | |||
| 1602843aa6 | |||
| cdb7fb8ea6 | |||
| 6387e9fa69 | |||
| 4e8097c93d | |||
| 65254b57b2 | |||
| 95899e23a8 | |||
| 5c8757d346 | |||
| 234e19d68a | |||
| 62145b7204 | |||
| 8bcc6d1501 | |||
| 09ef46f333 | |||
| 1839350526 | |||
| d7587e91b1 | |||
| 7b0a342cf9 | |||
| 3d01b0782e | |||
| fecfcfa7d2 | |||
| 29b5fa513a | |||
| f9a19badbf | |||
| d2630ea73c | |||
| a4a58c4782 | |||
| 29a3d80071 | |||
| 598bb419c0 | |||
| 087da9d2ce | |||
| c505aced48 | |||
| 959d5e5fcd | |||
| 8ee0cf4b2c | |||
| 426342074e | |||
| d2c092fe62 | |||
| a336917338 | |||
| 95c472c15c |
@ -136,14 +136,18 @@ namespace DocFileFormat
|
||||
}
|
||||
return btWin32;
|
||||
}
|
||||
bool ParseEmbeddedEquation( const std::string & xmlString, std::wstring & newXmlString)
|
||||
bool VMLPictureMapping::ParseEmbeddedEquation( const std::string & xmlString, std::wstring & newXmlString)
|
||||
{
|
||||
newXmlString.clear();
|
||||
std::wstring sTempXmlFile = NSDirectory::CreateTempFileWithUniqueName(
|
||||
NSDirectory::GetTempPath(), L"emb");
|
||||
|
||||
sTempXmlFile += L".xml";
|
||||
|
||||
std::wstring sTempFolder = m_ctx->_doc->m_sTempFolder;
|
||||
if (sTempFolder.empty())
|
||||
{
|
||||
sTempFolder = NSFile::CFileBinary::GetTempPath();
|
||||
}
|
||||
|
||||
std::wstring sTempXmlFile = NSDirectory::CreateTempFileWithUniqueName(sTempFolder, L"emb");
|
||||
|
||||
NSFile::CFileBinary file;
|
||||
file.CreateFileW(sTempXmlFile);
|
||||
file.WriteFile((BYTE*)xmlString.c_str(), xmlString.size());
|
||||
@ -186,6 +190,7 @@ namespace DocFileFormat
|
||||
if (res) break;
|
||||
}
|
||||
}
|
||||
NSFile::CFileBinary::Remove(sTempXmlFile);
|
||||
return res;
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
@ -297,8 +302,13 @@ namespace DocFileFormat
|
||||
case metroBlob:
|
||||
{
|
||||
//встроенная неведомая хуйня
|
||||
m_isEmbedded = true;
|
||||
m_embeddedData = std::string((char*)iter->opComplex, iter->op);
|
||||
m_isEmbedded = true;
|
||||
m_embeddedData = std::string((char*)iter->opComplex, iter->op);
|
||||
|
||||
//if (ParseEmbeddedBlob( m_embeddedData, m_blobXml)) // todoooo
|
||||
//{
|
||||
// m_isEmbedded = false;
|
||||
//}
|
||||
}break;
|
||||
//BORDERS
|
||||
case borderBottomColor:
|
||||
|
||||
@ -46,7 +46,6 @@ namespace DocFileFormat
|
||||
{
|
||||
class OleObject;
|
||||
|
||||
bool ParseEmbeddedEquation( const std::string & xmlString, std::wstring & newXmlString );
|
||||
|
||||
class VMLPictureMapping: public PropertiesMapping, public IMapping
|
||||
{
|
||||
@ -58,6 +57,7 @@ namespace DocFileFormat
|
||||
/// Writes a border element
|
||||
void writePictureBorder (const std::wstring & name, const BorderCode* brc);
|
||||
void appendStyleProperty( std::wstring* b, const std::wstring& propName, const std::wstring& propValue ) const;
|
||||
bool ParseEmbeddedEquation( const std::string & xmlString, std::wstring & newXmlString );
|
||||
protected:
|
||||
/// Copies the picture from the binary stream to the zip archive
|
||||
/// and creates the relationships for the image.
|
||||
|
||||
@ -86,6 +86,7 @@ namespace DocFileFormat
|
||||
friend class Table;
|
||||
friend class TableRow;
|
||||
friend class VMLShapeMapping;
|
||||
friend class VMLPictureMapping;
|
||||
friend class OpenXmlPackage;
|
||||
friend class TextboxMapping;
|
||||
|
||||
|
||||
@ -61,6 +61,26 @@ enum ETblStyleOverrideType
|
||||
tblstyleoverridetypeSwCell = 11,
|
||||
tblstyleoverridetypeWholeTable = 12
|
||||
};
|
||||
class SdtWraper
|
||||
{
|
||||
public:
|
||||
|
||||
OOX::Logic::CSdt m_oSdt;
|
||||
rPr* m_oEndPr;
|
||||
rPr* m_oRPr;
|
||||
int m_nType;
|
||||
SdtWraper(int nType)
|
||||
{
|
||||
m_nType = nType;
|
||||
m_oEndPr = NULL;
|
||||
m_oRPr = NULL;
|
||||
}
|
||||
~SdtWraper()
|
||||
{
|
||||
RELEASEOBJECT(m_oEndPr)
|
||||
RELEASEOBJECT(m_oRPr)
|
||||
}
|
||||
};
|
||||
|
||||
#define READ1_DEF(stLen, fReadFunction, arg, res) {\
|
||||
res = c_oSerConstants::ReadOk;\
|
||||
@ -3635,6 +3655,11 @@ public:
|
||||
//сбрасываем Shd
|
||||
oBinary_tblPrReader.m_sCurTableShd.clear();
|
||||
}
|
||||
else if(c_oSerParType::Sdt == type)
|
||||
{
|
||||
SdtWraper oSdt(0);
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadSdt, this, &oSdt);
|
||||
}
|
||||
else if ( c_oSerParType::sectPr == type )
|
||||
{
|
||||
SectPr oSectPr;
|
||||
@ -3746,6 +3771,11 @@ public:
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadDelIns, this, &oTrackRevision);
|
||||
oTrackRevision.Write(&GetRunStringWriter(), _T("w:del"));
|
||||
}
|
||||
else if(c_oSerParType::Sdt == type)
|
||||
{
|
||||
SdtWraper oSdt(1);
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadSdt, this, &oSdt);
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -6412,6 +6442,11 @@ public:
|
||||
res = Read1(length, &Binary_DocumentTableReader::Read_Row, this, poResult);
|
||||
pCStringWriter->WriteString(std::wstring(_T("</w:tr>")));
|
||||
}
|
||||
else if(c_oSerDocTableType::Sdt == type)
|
||||
{
|
||||
SdtWraper oSdt(2);
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadSdt, this, &oSdt);
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -6444,6 +6479,11 @@ public:
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadCell, this, poResult);
|
||||
pCStringWriter->WriteString(std::wstring(_T("</w:tc>")));
|
||||
}
|
||||
else if(c_oSerDocTableType::Sdt == type)
|
||||
{
|
||||
SdtWraper oSdt(3);
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadSdt, this, &oSdt);
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
@ -7147,6 +7187,309 @@ public:
|
||||
{
|
||||
return oBinary_pPrReader.Read_SecPr(type, length, poResult);
|
||||
}
|
||||
int ReadSdt(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = 0;
|
||||
SdtWraper* pSdt = static_cast<SdtWraper*>(poResult);
|
||||
if (c_oSerSdt::Pr == type)
|
||||
{
|
||||
pSdt->m_oSdt.m_oSdtPr.Init();
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadSdtPr, this, pSdt);
|
||||
}
|
||||
else if (c_oSerSdt::EndPr == type)
|
||||
{
|
||||
pSdt->m_oEndPr = new rPr(m_oFontTableWriter.m_mapFonts);
|
||||
res = oBinary_rPrReader.Read(length, pSdt->m_oEndPr);
|
||||
}
|
||||
else if (c_oSerSdt::Content == type)
|
||||
{
|
||||
m_oDocumentWriter.m_oContent.WriteString(L"<w:sdt>");
|
||||
if ( pSdt->m_oSdt.m_oSdtPr.IsInit() )
|
||||
{
|
||||
m_oDocumentWriter.m_oContent.WriteString(pSdt->m_oSdt.m_oSdtPr->toXMLStart());
|
||||
if (NULL != pSdt->m_oRPr)
|
||||
{
|
||||
pSdt->m_oRPr->Write(&m_oDocumentWriter.m_oContent);
|
||||
}
|
||||
m_oDocumentWriter.m_oContent.WriteString(pSdt->m_oSdt.m_oSdtPr->toXMLEnd());
|
||||
}
|
||||
if (NULL != pSdt->m_oEndPr)
|
||||
{
|
||||
m_oDocumentWriter.m_oContent.WriteString(L"<w:sdtEndPr>");
|
||||
pSdt->m_oEndPr->Write(&m_oDocumentWriter.m_oContent);
|
||||
m_oDocumentWriter.m_oContent.WriteString(L"</w:sdtEndPr>");
|
||||
}
|
||||
|
||||
m_oDocumentWriter.m_oContent.WriteString(L"<w:sdtContent>");
|
||||
switch(pSdt->m_nType)
|
||||
{
|
||||
case 0:
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadDocumentContent, this, this);
|
||||
break;
|
||||
case 1:
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadParagraphContent, this, this);
|
||||
break;
|
||||
case 2:
|
||||
res = Read1(length, &Binary_DocumentTableReader::Read_TableContent, this, &m_oDocumentWriter.m_oContent);
|
||||
break;
|
||||
case 3:
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadRowContent, this, &m_oDocumentWriter.m_oContent);
|
||||
break;
|
||||
}
|
||||
m_oDocumentWriter.m_oContent.WriteString(L"</w:sdtContent>");
|
||||
m_oDocumentWriter.m_oContent.WriteString(L"</w:sdt>");
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
}
|
||||
int ReadSdtPr(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = 0;
|
||||
SdtWraper* pSdtWraper = static_cast<SdtWraper*>(poResult);
|
||||
OOX::Logic::CSdtPr* pSdtPr = pSdtWraper->m_oSdt.m_oSdtPr.GetPointer();
|
||||
if (c_oSerSdt::Type == type)
|
||||
{
|
||||
pSdtPr->m_eType = (OOX::Logic::ESdtType)m_oBufferedStream.GetUChar();
|
||||
}
|
||||
else if (c_oSerSdt::Alias == type)
|
||||
{
|
||||
pSdtPr->m_oAlias.Init();
|
||||
pSdtPr->m_oAlias->m_sVal.Init();
|
||||
pSdtPr->m_oAlias->m_sVal->append(m_oBufferedStream.GetString3(length));
|
||||
}
|
||||
else if (c_oSerSdt::ComboBox == type)
|
||||
{
|
||||
pSdtPr->m_oComboBox.Init();
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadSdtComboBox, this, pSdtPr->m_oComboBox.GetPointer());
|
||||
}
|
||||
else if (c_oSerSdt::DataBinding == type)
|
||||
{
|
||||
pSdtPr->m_oDataBinding.Init();
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadSdtPrDataBinding, this, pSdtPr->m_oDataBinding.GetPointer());
|
||||
}
|
||||
else if (c_oSerSdt::PrDate == type)
|
||||
{
|
||||
pSdtPr->m_oDate.Init();
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadSdtPrDate, this, pSdtPr->m_oDate.GetPointer());
|
||||
}
|
||||
else if (c_oSerSdt::DocPartList == type)
|
||||
{
|
||||
pSdtPr->m_oDocPartList.Init();
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadDocPartList, this, pSdtPr->m_oDocPartList.GetPointer());
|
||||
}
|
||||
else if (c_oSerSdt::DocPartObj == type)
|
||||
{
|
||||
pSdtPr->m_oDocPartObj.Init();
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadDocPartList, this, pSdtPr->m_oDocPartObj.GetPointer());
|
||||
}
|
||||
else if (c_oSerSdt::DropDownList == type)
|
||||
{
|
||||
pSdtPr->m_oDropDownList.Init();
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadDropDownList, this, pSdtPr->m_oDropDownList.GetPointer());
|
||||
}
|
||||
else if (c_oSerSdt::Id == type)
|
||||
{
|
||||
pSdtPr->m_oId.Init();
|
||||
pSdtPr->m_oId->m_oVal.Init();
|
||||
pSdtPr->m_oId->m_oVal->SetValue(m_oBufferedStream.GetULong());
|
||||
}
|
||||
else if (c_oSerSdt::Label == type)
|
||||
{
|
||||
pSdtPr->m_oLabel.Init();
|
||||
pSdtPr->m_oLabel->m_oVal.Init();
|
||||
pSdtPr->m_oLabel->m_oVal->SetValue(m_oBufferedStream.GetULong());
|
||||
}
|
||||
else if (c_oSerSdt::Lock == type)
|
||||
{
|
||||
pSdtPr->m_oLock.Init();
|
||||
pSdtPr->m_oLock->m_oVal.SetValue((SimpleTypes::ELock)m_oBufferedStream.GetUChar());
|
||||
}
|
||||
else if (c_oSerSdt::PlaceHolder == type)
|
||||
{
|
||||
pSdtPr->m_oPlaceHolder.Init();
|
||||
pSdtPr->m_oPlaceHolder->m_oDocPart.Init();
|
||||
pSdtPr->m_oPlaceHolder->m_oDocPart->m_sVal.Init();
|
||||
pSdtPr->m_oPlaceHolder->m_oDocPart->m_sVal->append(m_oBufferedStream.GetString3(length));
|
||||
}
|
||||
else if (c_oSerSdt::RPr == type)
|
||||
{
|
||||
pSdtWraper->m_oRPr = new rPr(m_oFontTableWriter.m_mapFonts);
|
||||
res = oBinary_rPrReader.Read(length, pSdtWraper->m_oRPr);
|
||||
}
|
||||
else if (c_oSerSdt::ShowingPlcHdr == type)
|
||||
{
|
||||
pSdtPr->m_oShowingPlcHdr.Init();
|
||||
pSdtPr->m_oShowingPlcHdr->m_oVal.FromBool(m_oBufferedStream.GetBool());
|
||||
}
|
||||
else if (c_oSerSdt::TabIndex == type)
|
||||
{
|
||||
pSdtPr->m_oTabIndex.Init();
|
||||
pSdtPr->m_oTabIndex->m_oVal.Init();
|
||||
pSdtPr->m_oTabIndex->m_oVal->SetValue(m_oBufferedStream.GetULong());
|
||||
}
|
||||
else if (c_oSerSdt::Tag == type)
|
||||
{
|
||||
pSdtPr->m_oTag.Init();
|
||||
pSdtPr->m_oTag->m_sVal.Init();
|
||||
pSdtPr->m_oTag->m_sVal->append(m_oBufferedStream.GetString3(length));
|
||||
}
|
||||
else if (c_oSerSdt::Temporary == type)
|
||||
{
|
||||
pSdtPr->m_oTemporary.Init();
|
||||
pSdtPr->m_oTemporary->m_oVal.FromBool(m_oBufferedStream.GetBool());
|
||||
}
|
||||
else if (c_oSerSdt::MultiLine == type)
|
||||
{
|
||||
pSdtPr->m_oText.Init();
|
||||
pSdtPr->m_oText->m_oMultiLine.Init();
|
||||
pSdtPr->m_oText->m_oMultiLine->FromBool(m_oBufferedStream.GetBool());
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
}
|
||||
int ReadSdtComboBox(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = 0;
|
||||
OOX::Logic::CSdtComboBox* pSdtComboBox = static_cast<OOX::Logic::CSdtComboBox*>(poResult);
|
||||
if (c_oSerSdt::LastValue == type)
|
||||
{
|
||||
pSdtComboBox->m_sLastValue.Init();
|
||||
pSdtComboBox->m_sLastValue->append(m_oBufferedStream.GetString3(length));
|
||||
}
|
||||
else if (c_oSerSdt::SdtListItem == type)
|
||||
{
|
||||
ComplexTypes::Word::CSdtListItem* pSdtListItem = new ComplexTypes::Word::CSdtListItem();
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadSdtListItem, this, pSdtListItem);
|
||||
pSdtComboBox->m_arrListItem.push_back(pSdtListItem); }
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
}
|
||||
int ReadSdtListItem(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = 0;
|
||||
ComplexTypes::Word::CSdtListItem* pSdtListItem = static_cast<ComplexTypes::Word::CSdtListItem*>(poResult);
|
||||
if (c_oSerSdt::DisplayText == type)
|
||||
{
|
||||
pSdtListItem->m_sDisplayText.Init();
|
||||
pSdtListItem->m_sDisplayText->append(m_oBufferedStream.GetString3(length));
|
||||
}
|
||||
else if (c_oSerSdt::Value == type)
|
||||
{
|
||||
pSdtListItem->m_sValue.Init();
|
||||
pSdtListItem->m_sValue->append(m_oBufferedStream.GetString3(length));
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
}
|
||||
int ReadSdtPrDataBinding(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = 0;
|
||||
ComplexTypes::Word::CDataBinding* pDataBinding = static_cast<ComplexTypes::Word::CDataBinding*>(poResult);
|
||||
if (c_oSerSdt::PrefixMappings == type)
|
||||
{
|
||||
pDataBinding->m_sPrefixMappings.Init();
|
||||
pDataBinding->m_sPrefixMappings->append(m_oBufferedStream.GetString3(length));
|
||||
}
|
||||
else if (c_oSerSdt::StoreItemID == type)
|
||||
{
|
||||
pDataBinding->m_sStoreItemID.Init();
|
||||
pDataBinding->m_sStoreItemID->append(m_oBufferedStream.GetString3(length));
|
||||
}
|
||||
else if (c_oSerSdt::XPath == type)
|
||||
{
|
||||
pDataBinding->m_sXPath.Init();
|
||||
pDataBinding->m_sXPath->append(m_oBufferedStream.GetString3(length));
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
}
|
||||
int ReadSdtPrDate(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = 0;
|
||||
OOX::Logic::CDate* pDate = static_cast<OOX::Logic::CDate*>(poResult);
|
||||
if (c_oSerSdt::FullDate == type)
|
||||
{
|
||||
std::wstring sVal = m_oBufferedStream.GetString3(length);
|
||||
|
||||
pDate->m_oFullDate.Init();
|
||||
pDate->m_oFullDate->SetValue(sVal);
|
||||
}
|
||||
else if (c_oSerSdt::Calendar == type)
|
||||
{
|
||||
pDate->m_oCalendar.Init();
|
||||
pDate->m_oCalendar->m_oVal.SetValue((SimpleTypes::ECalendarType)m_oBufferedStream.GetUChar());
|
||||
}
|
||||
else if (c_oSerSdt::DateFormat == type)
|
||||
{
|
||||
pDate->m_oDateFormat.Init();
|
||||
pDate->m_oDateFormat->m_sVal.Init();
|
||||
pDate->m_oDateFormat->m_sVal->append(m_oBufferedStream.GetString3(length));
|
||||
}
|
||||
else if (c_oSerSdt::Lid == type)
|
||||
{
|
||||
pDate->m_oLid.Init();
|
||||
pDate->m_oLid->m_oVal.Init();
|
||||
std::wstring sVal = m_oBufferedStream.GetString3(length);
|
||||
pDate->m_oLid->m_oVal->SetValue(sVal);
|
||||
}
|
||||
else if (c_oSerSdt::StoreMappedDataAs == type)
|
||||
{
|
||||
pDate->m_oStoreMappedDateAs.Init();
|
||||
pDate->m_oStoreMappedDateAs->m_oVal.SetValue((SimpleTypes::ESdtDateMappingType)m_oBufferedStream.GetUChar());
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
}
|
||||
int ReadDocPartList(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = 0;
|
||||
OOX::Logic::CSdtDocPart* pDocPart = static_cast<OOX::Logic::CSdtDocPart*>(poResult);
|
||||
if (c_oSerSdt::DocPartCategory == type)
|
||||
{
|
||||
pDocPart->m_oDocPartCategory.Init();
|
||||
pDocPart->m_oDocPartCategory->m_sVal.Init();
|
||||
pDocPart->m_oDocPartCategory->m_sVal->append(m_oBufferedStream.GetString3(length));
|
||||
}
|
||||
else if (c_oSerSdt::DocPartGallery == type)
|
||||
{
|
||||
pDocPart->m_oDocPartGallery.Init();
|
||||
pDocPart->m_oDocPartGallery->m_sVal.Init();
|
||||
pDocPart->m_oDocPartGallery->m_sVal->append(m_oBufferedStream.GetString3(length));
|
||||
}
|
||||
else if (c_oSerSdt::DocPartUnique == type)
|
||||
{
|
||||
pDocPart->m_oDocPartUnique.Init();
|
||||
pDocPart->m_oDocPartUnique->m_oVal.FromBool(m_oBufferedStream.GetBool());
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
}
|
||||
int ReadDropDownList(BYTE type, long length, void* poResult)
|
||||
{
|
||||
int res = 0;
|
||||
OOX::Logic::CSdtDropDownList* pDropDownList = static_cast<OOX::Logic::CSdtDropDownList*>(poResult);
|
||||
if (c_oSerSdt::LastValue == type)
|
||||
{
|
||||
pDropDownList->m_sLastValue.Init();
|
||||
pDropDownList->m_sLastValue->append(m_oBufferedStream.GetString3(length));
|
||||
}
|
||||
else if (c_oSerSdt::SdtListItem == type)
|
||||
{
|
||||
ComplexTypes::Word::CSdtListItem* pSdtListItem = new ComplexTypes::Word::CSdtListItem();
|
||||
res = Read1(length, &Binary_DocumentTableReader::ReadSdtListItem, this, pSdtListItem);
|
||||
pDropDownList->m_arrListItem.push_back(pSdtListItem);
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
}
|
||||
};
|
||||
class Binary_NotesTableReader : public Binary_CommonReader<Binary_NotesTableReader>
|
||||
{
|
||||
|
||||
@ -463,7 +463,8 @@ extern int g_nCurFormatVersion;
|
||||
FldSimple = 11,
|
||||
Del = 12,
|
||||
Ins = 13,
|
||||
Background = 14
|
||||
Background = 14,
|
||||
Sdt = 15
|
||||
};}
|
||||
namespace c_oSerDocTableType{enum c_oSerDocTableType
|
||||
{
|
||||
@ -477,7 +478,8 @@ extern int g_nCurFormatVersion;
|
||||
Cell = 6,
|
||||
Cell_Pr = 7,
|
||||
Cell_Content = 8,
|
||||
tblGridChange = 9
|
||||
tblGridChange = 9,
|
||||
Sdt = 10
|
||||
};}
|
||||
namespace c_oSerRunType{enum c_oSerRunType
|
||||
{
|
||||
@ -1003,6 +1005,45 @@ extern int g_nCurFormatVersion;
|
||||
Data = 1,
|
||||
Program = 2
|
||||
};}
|
||||
namespace c_oSerSdt{enum c_oSerSdt
|
||||
{
|
||||
Pr = 0,
|
||||
EndPr = 1,
|
||||
Content = 2,
|
||||
Type = 3,
|
||||
Alias = 4,
|
||||
ComboBox = 5,
|
||||
LastValue = 6,
|
||||
SdtListItem = 7,
|
||||
DisplayText = 8,
|
||||
Value = 9,
|
||||
DataBinding = 10,
|
||||
PrefixMappings = 11,
|
||||
StoreItemID = 12,
|
||||
XPath = 13,
|
||||
PrDate = 14,
|
||||
FullDate = 15,
|
||||
Calendar = 16,
|
||||
DateFormat = 17,
|
||||
Lid = 18,
|
||||
StoreMappedDataAs = 19,
|
||||
DocPartList = 20,
|
||||
DocPartObj = 21,
|
||||
DocPartCategory = 22,
|
||||
DocPartGallery = 23,
|
||||
DocPartUnique = 24,
|
||||
DropDownList = 25,
|
||||
Id = 26,
|
||||
Label = 27,
|
||||
Lock = 28,
|
||||
PlaceHolder = 29,
|
||||
RPr = 30,
|
||||
ShowingPlcHdr = 31,
|
||||
TabIndex = 32,
|
||||
Tag = 33,
|
||||
Temporary = 34,
|
||||
MultiLine = 35
|
||||
};}
|
||||
}
|
||||
|
||||
#endif // #ifndef DOCX_BIN_READER_WRITER_DEFINES
|
||||
|
||||
@ -3047,8 +3047,9 @@ namespace BinDocxRW
|
||||
case OOX::et_w_sdt:
|
||||
{
|
||||
OOX::Logic::CSdt* pStd = static_cast<OOX::Logic::CSdt*>(item);
|
||||
if(pStd->m_oSdtContent.IsInit())
|
||||
WriteDocumentContent(pStd->m_oSdtContent.get().m_arrItems);
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerParType::Sdt);
|
||||
WriteSdt(pStd, 0, NULL, 0, 0, 0);
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}break;
|
||||
case OOX::et_w_smartTag:
|
||||
{
|
||||
@ -3189,8 +3190,9 @@ namespace BinDocxRW
|
||||
case OOX::et_w_sdt:
|
||||
{
|
||||
OOX::Logic::CSdt* pStd = static_cast<OOX::Logic::CSdt*>(item);
|
||||
if(pStd->m_oSdtContent.IsInit())
|
||||
WriteParagraphContent(pStd->m_oSdtContent.get().m_arrItems);
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerParType::Sdt);
|
||||
WriteSdt(pStd, 1, NULL, 0, 0, 0);
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
break;
|
||||
}
|
||||
case OOX::et_w_smartTag:
|
||||
@ -6366,8 +6368,9 @@ namespace BinDocxRW
|
||||
else if(OOX::et_w_sdt == item->getType())
|
||||
{
|
||||
OOX::Logic::CSdt* pStd = static_cast<OOX::Logic::CSdt*>(item);
|
||||
if(pStd->m_oSdtContent.IsInit())
|
||||
WriteTableContent(pStd->m_oSdtContent->m_arrItems, pTblPr, nRows, nCols);
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerDocTableType::Sdt);
|
||||
WriteSdt(pStd, 2, pTblPr, 0, nRows, nCols);
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
else if(OOX::et_w_smartTag == item->getType())
|
||||
{
|
||||
@ -6425,8 +6428,9 @@ namespace BinDocxRW
|
||||
else if(OOX::et_w_sdt == item->getType())
|
||||
{
|
||||
OOX::Logic::CSdt* pStd = static_cast<OOX::Logic::CSdt*>(item);
|
||||
if(pStd->m_oSdtContent.IsInit())
|
||||
WriteRowContent(pStd->m_oSdtContent.get().m_arrItems, pTblPr, nCurRowIndex, nRows, nCols);
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerDocTableType::Sdt);
|
||||
WriteSdt(pStd, 3, pTblPr, nCurRowIndex, nRows, nCols);
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
else if(OOX::et_w_smartTag == item->getType())
|
||||
{
|
||||
@ -6462,6 +6466,287 @@ namespace BinDocxRW
|
||||
oBinaryDocumentTableWriter.WriteDocumentContent(tc.m_arrItems);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
void WriteSdt(OOX::Logic::CSdt* pStd, int type, OOX::Logic::CTableProperty* pTblPr, int nCurRowIndex, int nRows, int nCols)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if(pStd->m_oSdtPr.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::Pr);
|
||||
WriteSdtPr(pStd->m_oSdtPr.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(pStd->m_oSdtEndPr.IsInit() && pStd->m_oSdtEndPr->m_oRPr.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::EndPr);
|
||||
brPrs.Write_rPr(pStd->m_oSdtEndPr->m_oRPr.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(pStd->m_oSdtContent.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::Content);
|
||||
switch(type)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
BinaryDocumentTableWriter oBinaryDocumentTableWriter(m_oParamsWriter, m_oParamsDocumentWriter, m_mapIgnoreComments, bpPrs.m_oBinaryHeaderFooterTableWriter);
|
||||
oBinaryDocumentTableWriter.WriteDocumentContent(pStd->m_oSdtContent.get().m_arrItems);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
WriteParagraphContent(pStd->m_oSdtContent.get().m_arrItems);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
WriteTableContent(pStd->m_oSdtContent->m_arrItems, pTblPr, nRows, nCols);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
WriteRowContent(pStd->m_oSdtContent.get().m_arrItems, pTblPr, nCurRowIndex, nRows, nCols);
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
void WriteSdtPr(const OOX::Logic::CSdtPr& oStdPr)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::Type);
|
||||
m_oBcw.m_oStream.WriteBYTE(oStdPr.m_eType);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
|
||||
if(oStdPr.m_oAlias.IsInit() && oStdPr.m_oAlias->m_sVal.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::Alias);
|
||||
m_oBcw.m_oStream.WriteStringW3(oStdPr.m_oAlias->m_sVal.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oStdPr.m_oComboBox.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::ComboBox);
|
||||
WriteSdtComboBox(oStdPr.m_oComboBox.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oStdPr.m_oDataBinding.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::DataBinding);
|
||||
WriteSdtPrDataBinding(oStdPr.m_oDataBinding.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oStdPr.m_oDate.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::PrDate);
|
||||
WriteSdtPrDate(oStdPr.m_oDate.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oStdPr.m_oDocPartList.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::DocPartList);
|
||||
WriteDocPartList(oStdPr.m_oDocPartList.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oStdPr.m_oDocPartObj.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::DocPartObj);
|
||||
WriteDocPartList(oStdPr.m_oDocPartObj.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oStdPr.m_oDropDownList.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::DropDownList);
|
||||
WriteDropDownList(oStdPr.m_oDropDownList.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oStdPr.m_oId.IsInit() && oStdPr.m_oId->m_oVal.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::Id);
|
||||
m_oBcw.m_oStream.WriteULONG(oStdPr.m_oId->m_oVal->GetValue());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oStdPr.m_oLabel.IsInit() && oStdPr.m_oLabel->m_oVal.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::Label);
|
||||
m_oBcw.m_oStream.WriteULONG(oStdPr.m_oLabel->m_oVal->GetValue());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oStdPr.m_oLock.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::Lock);
|
||||
m_oBcw.m_oStream.WriteBYTE(oStdPr.m_oLock->m_oVal.GetValue());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oStdPr.m_oPlaceHolder.IsInit() && oStdPr.m_oPlaceHolder->m_oDocPart.IsInit() && oStdPr.m_oPlaceHolder->m_oDocPart->m_sVal.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::PlaceHolder);
|
||||
m_oBcw.m_oStream.WriteStringW3(oStdPr.m_oPlaceHolder->m_oDocPart->m_sVal.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oStdPr.m_oRPr.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::RPr);
|
||||
brPrs.Write_rPr(oStdPr.m_oRPr.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oStdPr.m_oShowingPlcHdr.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::ShowingPlcHdr);
|
||||
m_oBcw.m_oStream.WriteBOOL(oStdPr.m_oShowingPlcHdr->m_oVal.ToBool());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oStdPr.m_oTabIndex.IsInit() && oStdPr.m_oTabIndex->m_oVal.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::TabIndex);
|
||||
m_oBcw.m_oStream.WriteULONG(oStdPr.m_oTabIndex->m_oVal->GetValue());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oStdPr.m_oTag.IsInit() && oStdPr.m_oTag->m_sVal.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::Tag);
|
||||
m_oBcw.m_oStream.WriteStringW3(oStdPr.m_oTag->m_sVal.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oStdPr.m_oTemporary.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::Temporary);
|
||||
m_oBcw.m_oStream.WriteBOOL(oStdPr.m_oTemporary->m_oVal.ToBool());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oStdPr.m_oText.IsInit() && oStdPr.m_oText->m_oMultiLine.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::MultiLine);
|
||||
m_oBcw.m_oStream.WriteBOOL(oStdPr.m_oText->m_oMultiLine->ToBool());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
void WriteSdtComboBox(const OOX::Logic::CSdtComboBox& oSdtComboBox)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if(oSdtComboBox.m_sLastValue.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::LastValue);
|
||||
m_oBcw.m_oStream.WriteStringW3(oSdtComboBox.m_sLastValue.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
for(size_t i = 0; i < oSdtComboBox.m_arrListItem.size(); ++i)
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::SdtListItem);
|
||||
WriteSdtListItem(*oSdtComboBox.m_arrListItem[i]);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
void WriteSdtListItem(const ComplexTypes::Word::CSdtListItem& oSdtListItem)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if(oSdtListItem.m_sDisplayText.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::DisplayText);
|
||||
m_oBcw.m_oStream.WriteStringW3(oSdtListItem.m_sDisplayText.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oSdtListItem.m_sValue.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::Value);
|
||||
m_oBcw.m_oStream.WriteStringW3(oSdtListItem.m_sValue.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
void WriteSdtPrDataBinding(const ComplexTypes::Word::CDataBinding& oDataBinding)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if(oDataBinding.m_sPrefixMappings.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::PrefixMappings);
|
||||
m_oBcw.m_oStream.WriteStringW3(oDataBinding.m_sPrefixMappings.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oDataBinding.m_sStoreItemID.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::StoreItemID);
|
||||
m_oBcw.m_oStream.WriteStringW3(oDataBinding.m_sStoreItemID.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oDataBinding.m_sXPath.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::XPath);
|
||||
m_oBcw.m_oStream.WriteStringW3(oDataBinding.m_sXPath.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
void WriteSdtPrDate(const OOX::Logic::CDate& oDate)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if(oDate.m_oFullDate.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::FullDate);
|
||||
m_oBcw.m_oStream.WriteStringW3(oDate.m_oFullDate->GetValue());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oDate.m_oCalendar.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::Calendar);
|
||||
m_oBcw.m_oStream.WriteBYTE(oDate.m_oCalendar->m_oVal.GetValue());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oDate.m_oDateFormat.IsInit() && oDate.m_oDateFormat->m_sVal.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::DateFormat);
|
||||
m_oBcw.m_oStream.WriteStringW3(oDate.m_oDateFormat->m_sVal.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oDate.m_oLid.IsInit() && oDate.m_oLid->m_oVal.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::Lid);
|
||||
m_oBcw.m_oStream.WriteStringW3(oDate.m_oLid->m_oVal->GetValue());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oDate.m_oStoreMappedDateAs.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::StoreMappedDataAs);
|
||||
m_oBcw.m_oStream.WriteBYTE(oDate.m_oStoreMappedDateAs->m_oVal.GetValue());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
void WriteDocPartList(const OOX::Logic::CSdtDocPart& oSdtDocPart)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if(oSdtDocPart.m_oDocPartCategory.IsInit() && oSdtDocPart.m_oDocPartCategory->m_sVal.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::DocPartCategory);
|
||||
m_oBcw.m_oStream.WriteStringW3(oSdtDocPart.m_oDocPartCategory->m_sVal.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oSdtDocPart.m_oDocPartGallery.IsInit() && oSdtDocPart.m_oDocPartGallery->m_sVal.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::DocPartGallery);
|
||||
m_oBcw.m_oStream.WriteStringW3(oSdtDocPart.m_oDocPartGallery->m_sVal.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if(oSdtDocPart.m_oDocPartUnique.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::DocPartUnique);
|
||||
m_oBcw.m_oStream.WriteBOOL(oSdtDocPart.m_oDocPartUnique->m_oVal.ToBool());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
void WriteDropDownList(const OOX::Logic::CSdtDropDownList& oDropDownList)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if(oDropDownList.m_sLastValue.IsInit())
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::LastValue);
|
||||
m_oBcw.m_oStream.WriteStringW3(oDropDownList.m_sLastValue.get());
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
for(size_t i = 0; i < oDropDownList.m_arrListItem.size(); ++i)
|
||||
{
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerSdt::SdtListItem);
|
||||
WriteSdtListItem(*oDropDownList.m_arrListItem[i]);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
};
|
||||
class BinaryCommentsTableWriter
|
||||
{
|
||||
@ -6909,80 +7194,94 @@ namespace BinDocxRW
|
||||
}
|
||||
}
|
||||
}
|
||||
void WriteColorSchemeMapping(const OOX::Settings::CColorSchemeMapping& oColorSchemeMapping)
|
||||
void WriteColorSchemeMapping(const PPTX::Logic::ClrMap& oColorSchemeMapping)
|
||||
{
|
||||
int nCurPos = 0;
|
||||
if(oColorSchemeMapping.m_oAccent1.IsInit())
|
||||
std::map<std::wstring, PPTX::Limit::ColorSchemeIndex>::const_iterator pFind;
|
||||
|
||||
pFind = oColorSchemeMapping.ColorMap.find(L"accent1");
|
||||
if(pFind != oColorSchemeMapping.ColorMap.end())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_ClrSchemeMappingType::Accent1);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(oColorSchemeMapping.m_oAccent1->GetValue());
|
||||
m_oBcw.m_oStream.WriteBYTE(pFind->second.GetBYTECode());
|
||||
}
|
||||
if(oColorSchemeMapping.m_oAccent2.IsInit())
|
||||
pFind = oColorSchemeMapping.ColorMap.find(L"accent2");
|
||||
if(pFind != oColorSchemeMapping.ColorMap.end())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_ClrSchemeMappingType::Accent2);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(oColorSchemeMapping.m_oAccent2->GetValue());
|
||||
m_oBcw.m_oStream.WriteBYTE(pFind->second.GetBYTECode());
|
||||
}
|
||||
if(oColorSchemeMapping.m_oAccent3.IsInit())
|
||||
pFind = oColorSchemeMapping.ColorMap.find(L"accent3");
|
||||
if(pFind != oColorSchemeMapping.ColorMap.end())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_ClrSchemeMappingType::Accent3);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(oColorSchemeMapping.m_oAccent3->GetValue());
|
||||
m_oBcw.m_oStream.WriteBYTE(pFind->second.GetBYTECode());
|
||||
}
|
||||
if(oColorSchemeMapping.m_oAccent4.IsInit())
|
||||
pFind = oColorSchemeMapping.ColorMap.find(L"accent4");
|
||||
if(pFind != oColorSchemeMapping.ColorMap.end())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_ClrSchemeMappingType::Accent4);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(oColorSchemeMapping.m_oAccent4->GetValue());
|
||||
m_oBcw.m_oStream.WriteBYTE(pFind->second.GetBYTECode());
|
||||
}
|
||||
if(oColorSchemeMapping.m_oAccent5.IsInit())
|
||||
pFind = oColorSchemeMapping.ColorMap.find(L"accent5");
|
||||
if(pFind != oColorSchemeMapping.ColorMap.end())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_ClrSchemeMappingType::Accent5);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(oColorSchemeMapping.m_oAccent5->GetValue());
|
||||
m_oBcw.m_oStream.WriteBYTE(pFind->second.GetBYTECode());
|
||||
}
|
||||
if(oColorSchemeMapping.m_oAccent6.IsInit())
|
||||
pFind = oColorSchemeMapping.ColorMap.find(L"accent6");
|
||||
if(pFind != oColorSchemeMapping.ColorMap.end())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_ClrSchemeMappingType::Accent6);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(oColorSchemeMapping.m_oAccent6->GetValue());
|
||||
m_oBcw.m_oStream.WriteBYTE(pFind->second.GetBYTECode());
|
||||
}
|
||||
if(oColorSchemeMapping.m_oBg1.IsInit())
|
||||
pFind = oColorSchemeMapping.ColorMap.find(L"bg1");
|
||||
if(pFind != oColorSchemeMapping.ColorMap.end())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_ClrSchemeMappingType::Bg1);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(oColorSchemeMapping.m_oBg1->GetValue());
|
||||
m_oBcw.m_oStream.WriteBYTE(pFind->second.GetBYTECode());
|
||||
}
|
||||
if(oColorSchemeMapping.m_oBg2.IsInit())
|
||||
pFind = oColorSchemeMapping.ColorMap.find(L"bg2");
|
||||
if(pFind != oColorSchemeMapping.ColorMap.end())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_ClrSchemeMappingType::Bg2);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(oColorSchemeMapping.m_oBg2->GetValue());
|
||||
m_oBcw.m_oStream.WriteBYTE(pFind->second.GetBYTECode());
|
||||
}
|
||||
if(oColorSchemeMapping.m_oFollowedHyperlink.IsInit())
|
||||
pFind = oColorSchemeMapping.ColorMap.find(L"folHlink");
|
||||
if(pFind != oColorSchemeMapping.ColorMap.end())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_ClrSchemeMappingType::FollowedHyperlink);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(oColorSchemeMapping.m_oFollowedHyperlink->GetValue());
|
||||
m_oBcw.m_oStream.WriteBYTE(pFind->second.GetBYTECode());
|
||||
}
|
||||
if(oColorSchemeMapping.m_oHyperlink.IsInit())
|
||||
pFind = oColorSchemeMapping.ColorMap.find(L"hlink");
|
||||
if(pFind != oColorSchemeMapping.ColorMap.end())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_ClrSchemeMappingType::Hyperlink);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(oColorSchemeMapping.m_oHyperlink->GetValue());
|
||||
m_oBcw.m_oStream.WriteBYTE(pFind->second.GetBYTECode());
|
||||
}
|
||||
if(oColorSchemeMapping.m_oT1.IsInit())
|
||||
pFind = oColorSchemeMapping.ColorMap.find(L"tx1");
|
||||
if(pFind != oColorSchemeMapping.ColorMap.end())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_ClrSchemeMappingType::T1);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(oColorSchemeMapping.m_oT1->GetValue());
|
||||
m_oBcw.m_oStream.WriteBYTE(pFind->second.GetBYTECode());
|
||||
}
|
||||
if(oColorSchemeMapping.m_oT2.IsInit())
|
||||
pFind = oColorSchemeMapping.ColorMap.find(L"tx2");
|
||||
if(pFind != oColorSchemeMapping.ColorMap.end())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_ClrSchemeMappingType::T2);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
|
||||
m_oBcw.m_oStream.WriteBYTE(oColorSchemeMapping.m_oT2->GetValue());
|
||||
m_oBcw.m_oStream.WriteBYTE(pFind->second.GetBYTECode());
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@ -54,7 +54,7 @@ int _tmain(int argc, _TCHAR* argv[])
|
||||
HRESULT hr = S_OK;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
std::wstring srcFileName = argv[1];
|
||||
std::wstring dstPath = argc > 2 ? argv[2] : srcFileName + L"-my.pptx"; //xlsx pptx docx
|
||||
std::wstring dstPath = argc > 2 ? argv[2] : srcFileName + L"-my.docx"; //xlsx pptx docx
|
||||
|
||||
std::wstring outputDir = NSDirectory::GetFolderPath(dstPath);
|
||||
|
||||
|
||||
@ -453,6 +453,7 @@ void draw_enhanced_geometry_attlist::add_attributes( const xml::attributes_wc_pt
|
||||
CP_APPLY_ATTR(L"draw:modifiers" , draw_modifiers_);
|
||||
CP_APPLY_ATTR(L"draw:text-path" , draw_text_path_);
|
||||
CP_APPLY_ATTR(L"draw:enhanced-path" , draw_enhanced_path_);
|
||||
CP_APPLY_ATTR(L"drawooo:enhanced-path" , drawooo_enhanced_path_);
|
||||
CP_APPLY_ATTR(L"drawooo:sub-view-size" , drawooo_sub_view_size_);
|
||||
}
|
||||
// draw:enhanced_geometry
|
||||
@ -485,6 +486,9 @@ void draw_enhanced_geometry::add_child_element( xml::sax * Reader, const std::ws
|
||||
}
|
||||
void draw_enhanced_geometry::find_draw_type_oox()
|
||||
{
|
||||
word_art_ = false;
|
||||
bOoxType_ = false;
|
||||
|
||||
if (draw_enhanced_geometry_attlist_.draw_text_path_ &&
|
||||
*draw_enhanced_geometry_attlist_.draw_text_path_ == true)
|
||||
{
|
||||
@ -501,7 +505,7 @@ void draw_enhanced_geometry::find_draw_type_oox()
|
||||
{
|
||||
int count = sizeof(_OO_OOX_wordart) / sizeof(_shape_converter);
|
||||
|
||||
for (long i=0; i< count; i++)
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
if (_OO_OOX_wordart[i].odf_reader == odf_type)
|
||||
{
|
||||
@ -518,7 +522,7 @@ void draw_enhanced_geometry::find_draw_type_oox()
|
||||
|
||||
if (pos < 0)
|
||||
{
|
||||
for (long i=0; i< count; i++)
|
||||
for (long i = 0; i< count; i++)
|
||||
{
|
||||
if (_OO_OOX_custom_shapes[i].odf_reader == odf_type)
|
||||
{
|
||||
@ -529,8 +533,9 @@ void draw_enhanced_geometry::find_draw_type_oox()
|
||||
}
|
||||
else
|
||||
{
|
||||
bOoxType_ = true;
|
||||
std::wstring oox_type = odf_type.substr(pos + 6);
|
||||
for (long i=0; i< count; i++)
|
||||
for (long i = 0; i< count; i++)
|
||||
{
|
||||
if (_OO_OOX_custom_shapes[i].oox == oox_type)
|
||||
{
|
||||
@ -547,18 +552,18 @@ void draw_enhanced_geometry::find_draw_type_oox()
|
||||
}
|
||||
std::wstringstream str;
|
||||
|
||||
BOOST_FOREACH(const office_element_ptr & parElement, draw_handle_)
|
||||
for (size_t i = 0; i < draw_handle_.size(); i++)
|
||||
{
|
||||
draw_handle * handle = dynamic_cast<draw_handle *>(parElement.get());
|
||||
|
||||
int min = -1;
|
||||
int max = -1;
|
||||
draw_handle * handle = dynamic_cast<draw_handle *>(draw_handle_[i].get());
|
||||
if (!handle) continue;
|
||||
|
||||
int min = -1, max = -1;
|
||||
|
||||
try
|
||||
{
|
||||
min = parsing(handle->draw_handle_attlist_.draw_handle_range_y_minimum_);//пока статик .. и выдается только цыфровое значение
|
||||
if (min<0)min = parsing(handle->draw_handle_attlist_.draw_handle_range_x_minimum_);
|
||||
if (min<0)min = parsing(handle->draw_handle_attlist_.draw_handle_radius_range_minimum_);
|
||||
if (min < 0) min = parsing(handle->draw_handle_attlist_.draw_handle_range_x_minimum_);
|
||||
if (min < 0) min = parsing(handle->draw_handle_attlist_.draw_handle_radius_range_minimum_);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
@ -574,7 +579,7 @@ void draw_enhanced_geometry::find_draw_type_oox()
|
||||
catch(...)
|
||||
{
|
||||
}
|
||||
draw_handle_geometry elm={min, max};
|
||||
draw_handle_geometry elm = {min, max};
|
||||
draw_handle_geometry_.push_back(elm);
|
||||
}
|
||||
}
|
||||
|
||||
@ -437,6 +437,7 @@ public:
|
||||
_CP_OPT(std::wstring) draw_modifiers_;
|
||||
_CP_OPT(bool) draw_text_path_;
|
||||
_CP_OPT(std::wstring) draw_enhanced_path_;
|
||||
_CP_OPT(std::wstring) drawooo_enhanced_path_;
|
||||
_CP_OPT(std::wstring) drawooo_sub_view_size_;
|
||||
};
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
@ -464,7 +465,9 @@ public:
|
||||
_CP_OPT(int) sub_type_;
|
||||
_CP_OPT(int) draw_type_oox_index_;
|
||||
_CP_OPT(std::wstring) svg_viewbox_;
|
||||
|
||||
bool word_art_;
|
||||
bool bOoxType_;
|
||||
|
||||
typedef std::pair<std::wstring,std::wstring> pair_string_value;
|
||||
|
||||
|
||||
@ -253,13 +253,19 @@ void draw_enhanced_geometry::docx_convert(oox::docx_conversion_context & Context
|
||||
|
||||
set_shape = true;
|
||||
}
|
||||
|
||||
if (sub_type_)
|
||||
{
|
||||
shape->sub_type_ = sub_type_.get();
|
||||
set_shape = true;
|
||||
}
|
||||
std::wstring odf_path;
|
||||
if (draw_enhanced_geometry_attlist_.drawooo_enhanced_path_)
|
||||
odf_path = draw_enhanced_geometry_attlist_.drawooo_enhanced_path_.get();
|
||||
else if (draw_enhanced_geometry_attlist_.draw_enhanced_path_)
|
||||
odf_path = draw_enhanced_geometry_attlist_.draw_enhanced_path_.get();
|
||||
|
||||
if (draw_enhanced_geometry_attlist_.draw_enhanced_path_)
|
||||
if (!odf_path.empty())
|
||||
{
|
||||
std::vector<::svg_path::_polyline> o_Polyline;
|
||||
|
||||
@ -267,7 +273,7 @@ void draw_enhanced_geometry::docx_convert(oox::docx_conversion_context & Context
|
||||
|
||||
try
|
||||
{
|
||||
res = ::svg_path::parseSvgD(o_Polyline, draw_enhanced_geometry_attlist_.draw_enhanced_path_.get(), true);
|
||||
res = ::svg_path::parseSvgD(o_Polyline, odf_path, true);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
@ -316,8 +322,8 @@ void draw_enhanced_geometry::docx_convert(oox::docx_conversion_context & Context
|
||||
{
|
||||
if (draw_handle_geometry_[0].min < draw_handle_geometry_[0].max)
|
||||
{
|
||||
shape->additional_.push_back(_property(L"draw-modifiers-min",draw_handle_geometry_[0].min));
|
||||
shape->additional_.push_back(_property(L"draw-modifiers-max",draw_handle_geometry_[0].max));
|
||||
shape->additional_.push_back(_property(L"draw-modifiers-min", draw_handle_geometry_[0].min));
|
||||
shape->additional_.push_back(_property(L"draw-modifiers-max", draw_handle_geometry_[0].max));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -326,7 +332,6 @@ void draw_enhanced_geometry::docx_convert(oox::docx_conversion_context & Context
|
||||
{
|
||||
shape->bad_shape_ = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -65,7 +65,7 @@ static const _sh_typ Shape_Types_Mapping[] = // index === OOX::Drawing::EShapeTy
|
||||
{ L"mso-spt36" , 7}, // shapetypeBentConnector5,
|
||||
{ L"mso-spt90" , 7}, // shapetypeBentUpArrow,
|
||||
{ L"quad-bevel" , 7}, // shapetypeBevel,
|
||||
{ L"block-arc" , 7}, // shapetypeBlockArc,
|
||||
{ L"" , 7}, // shapetypeBlockArc,
|
||||
{ L"mso-spt49" , 7}, // shapetypeBorderCallout1,
|
||||
{ L"mso-spt50" , 7}, // shapetypeBorderCallout2,
|
||||
{ L"mso-spt51" , 7}, // shapetypeBorderCallout3,
|
||||
@ -98,7 +98,7 @@ static const _sh_typ Shape_Types_Mapping[] = // index === OOX::Drawing::EShapeTy
|
||||
{ L"" , 7}, // shapetypeDiagStripe,
|
||||
{ L"diamond" , 7}, // shapetypeDiamond,
|
||||
{ L"" , 7}, // shapetypeDodecagon,
|
||||
{ L"ring" , 7}, // shapetypeDonut,
|
||||
{ L"" , 7}, // shapetypeDonut,
|
||||
{ L"" , 7}, // shapetypeDoubleWave,
|
||||
{ L"down-arrow" , 7}, // shapetypeDownArrow,
|
||||
{ L"down-arrow-callout" , 7}, // shapetypeDownArrowCallout,
|
||||
@ -174,7 +174,7 @@ static const _sh_typ Shape_Types_Mapping[] = // index === OOX::Drawing::EShapeTy
|
||||
{ L"octagon" , 7}, // shapetypeOctagon,
|
||||
{ L"parallelogram" , 7}, // shapetypeParallelogram,
|
||||
{ L"pentagon" , 7}, // shapetypePentagon,
|
||||
{ L"mso-spt100" , 7}, // shapetypePie,
|
||||
{ L"" , 7}, // shapetypePie,
|
||||
{ L"" , 7}, // shapetypePieWedge,
|
||||
{ L"" , 7}, // shapetypePlaque,
|
||||
{ L"" , 7}, // shapetypePlaqueTabs,
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#include "../oox_shape_defines.h"
|
||||
// +shapetypeLeftCircularArrow,
|
||||
// shapetypeLeftRightCircularArrow,
|
||||
// shapetypeSwooshArrow,
|
||||
// +shapetypeSwooshArrow,
|
||||
// +shapetypeCircularArrow
|
||||
namespace cpdoccore
|
||||
{
|
||||
@ -43,158 +43,243 @@ public:
|
||||
{
|
||||
odf_type_name =L"ooxml-leftCircularArrow";
|
||||
|
||||
enhanced_path = L"M 529769 128373 L 570534 225808 A ?f91 ?f92 ?f93 ?f94 570534 225808 ?f88 ?f90 W ?f95 ?f96 ?f97 ?f98 570534 225808 ?f88 ?f90 L 246425 854941 139301 967187 5691 907641 74093 892667 A ?f138 ?f139 ?f140 ?f141 74093 892667 ?f135 ?f137 W ?f142 ?f143 ?f144 ?f145 74093 892667 ?f135 ?f137 Z N";
|
||||
text_areas = L"?f48 ?f50 ?f49 ?f51";
|
||||
glue_points = L"?f40 ?f41 ?f42 ?f43 ?f44 ?f45 ?f46 ?f47";
|
||||
view_box = L"0 0 1637004 1637004";
|
||||
enhanced_path = L"M ?f63 ?f64 L ?f69 ?f70 G ?f13 ?f14 ?f210 ?f211 L ?f185 ?f186 ?f57 ?f58 ?f183 ?f184 ?f126 ?f127 G ?f10 ?f12 ?f212 ?f213 Z N";
|
||||
text_areas = L"?f206 ?f208 ?f207 ?f209";
|
||||
modifiers = L"10980 1142322 6300000 18900000 12500";
|
||||
view_box = L"0 0 0 0";
|
||||
|
||||
add(L"f0", L"10800000");
|
||||
add(L"f1", L"5400000");
|
||||
add(L"f2", L"left");
|
||||
add(L"f3", L"right");
|
||||
add(L"f4", L"top");
|
||||
add(L"f5", L"bottom");
|
||||
add(L"f6", L"?f5 - ?f4");
|
||||
add(L"f7", L"?f3 - ?f2");
|
||||
add(L"f8", L"5419351 / 1725033");
|
||||
add(L"f9", L"180");
|
||||
add(L"f10", L"?f7 / 1637004");
|
||||
add(L"f11", L"?f6 / 1637004");
|
||||
add(L"f12", L"139301 - 818502");
|
||||
add(L"f13", L"967187 - 818502");
|
||||
add(L"f14", L"sqrt(?f12 * ?f12 + ?f13 * ?f13 + 0 * 0)");
|
||||
add(L"f15", L"atan2(?f12, ?f13)");
|
||||
add(L"f16", L"?f15 + ?f1");
|
||||
add(L"f17", L"?f16 * ?f9 / ?f0");
|
||||
add(L"f18", L"0 - ?f17");
|
||||
add(L"f19", L"529769 - 818502");
|
||||
add(L"f20", L"128373 - 818502");
|
||||
add(L"f21", L"sqrt(?f19 * ?f19 + ?f20 * ?f20 + 0 * 0)");
|
||||
add(L"f22", L"atan2(?f19, ?f20)");
|
||||
add(L"f23", L"?f22 + ?f1");
|
||||
add(L"f24", L"?f23 * ?f9 / ?f0");
|
||||
add(L"f25", L"0 - ?f24");
|
||||
add(L"f26", L"74093 - 818502");
|
||||
add(L"f27", L"892667 - 818502");
|
||||
add(L"f28", L"sqrt(?f26 * ?f26 + ?f27 * ?f27 + 0 * 0)");
|
||||
add(L"f29", L"atan2(?f26, ?f27)");
|
||||
add(L"f30", L"?f29 + ?f1");
|
||||
add(L"f31", L"?f30 * ?f9 / ?f0");
|
||||
add(L"f32", L"0 - ?f31");
|
||||
add(L"f33", L"246425 - 818502");
|
||||
add(L"f34", L"854941 - 818502");
|
||||
add(L"f35", L"sqrt(?f33 * ?f33 + ?f34 * ?f34 + 0 * 0)");
|
||||
add(L"f36", L"atan2(?f33, ?f34)");
|
||||
add(L"f37", L"?f36 + ?f1");
|
||||
add(L"f38", L"?f37 * ?f9 / ?f0");
|
||||
add(L"f39", L"0 - ?f38");
|
||||
add(L"f40", L"550151 / ?f10");
|
||||
add(L"f41", L"177091 / ?f11");
|
||||
add(L"f42", L"5691 / ?f10");
|
||||
add(L"f43", L"907641 / ?f11");
|
||||
add(L"f44", L"139301 / ?f10");
|
||||
add(L"f45", L"967187 / ?f11");
|
||||
add(L"f46", L"246425 / ?f10");
|
||||
add(L"f47", L"854941 / ?f11");
|
||||
add(L"f48", L"289519 / ?f10");
|
||||
add(L"f49", L"1347485 / ?f10");
|
||||
add(L"f50", L"289519 / ?f11");
|
||||
add(L"f51", L"1347485 / ?f11");
|
||||
add(L"f52", L"21550000 - -4313128");
|
||||
add(L"f53", L"if(?f52, -4313128, 21550000)");
|
||||
add(L"f54", L"-21550000 - ?f53");
|
||||
add(L"f55", L"if(?f54, -21550000, ?f53)");
|
||||
add(L"f56", L"14837806 + ?f55");
|
||||
add(L"f57", L"14837806 + ?f1");
|
||||
add(L"f58", L"?f57 * ?f8 / ?f0");
|
||||
add(L"f59", L"0 - ?f58");
|
||||
add(L"f60", L"cos(?f59)");
|
||||
add(L"f61", L"0 - ?f60");
|
||||
add(L"f62", L"?f61 * 642475");
|
||||
add(L"f63", L"sin(?f59)");
|
||||
add(L"f64", L"0 - ?f63");
|
||||
add(L"f65", L"?f64 * 642475");
|
||||
add(L"f66", L"sqrt(?f62 * ?f62 + ?f65 * ?f65 + 0 * 0)");
|
||||
add(L"f67", L"642475 * 642475 / ?f66");
|
||||
add(L"f68", L"?f64 * ?f67");
|
||||
add(L"f69", L"570534 - ?f68");
|
||||
add(L"f70", L"?f61 * ?f67");
|
||||
add(L"f71", L"225808 - ?f70");
|
||||
add(L"f72", L"?f69 - 642475");
|
||||
add(L"f73", L"?f71 - 642475");
|
||||
add(L"f74", L"?f69 + 642475");
|
||||
add(L"f75", L"?f71 + 642475");
|
||||
add(L"f76", L"?f56 + ?f1");
|
||||
add(L"f77", L"?f76 * ?f8 / ?f0");
|
||||
add(L"f78", L"0 - ?f77");
|
||||
add(L"f79", L"cos(?f78)");
|
||||
add(L"f80", L"0 - ?f79");
|
||||
add(L"f81", L"?f80 * 642475");
|
||||
add(L"f82", L"sin(?f78)");
|
||||
add(L"f83", L"0 - ?f82");
|
||||
add(L"f84", L"?f83 * 642475");
|
||||
add(L"f85", L"sqrt(?f81 * ?f81 + ?f84 * ?f84 + 0 * 0)");
|
||||
add(L"f86", L"642475 * 642475 / ?f85");
|
||||
add(L"f87", L"?f83 * ?f86");
|
||||
add(L"f88", L"?f69 + ?f87");
|
||||
add(L"f89", L"?f80 * ?f86");
|
||||
add(L"f90", L"?f71 + ?f89");
|
||||
add(L"f91", L"if(?f55, 570534, ?f72)");
|
||||
add(L"f92", L"if(?f55, 225808, ?f73)");
|
||||
add(L"f93", L"if(?f55, 570534, ?f74)");
|
||||
add(L"f94", L"if(?f55, 225808, ?f75)");
|
||||
add(L"f95", L"if(?f55, ?f72, ?f88)");
|
||||
add(L"f96", L"if(?f55, ?f73, ?f90)");
|
||||
add(L"f97", L"if(?f55, ?f74, ?f88)");
|
||||
add(L"f98", L"if(?f55, ?f75, ?f90)");
|
||||
add(L"f99", L"21550000 - 4379179");
|
||||
add(L"f100", L"if(?f99, 4379179, 21550000)");
|
||||
add(L"f101", L"-21550000 - ?f100");
|
||||
add(L"f102", L"if(?f101, -21550000, ?f100)");
|
||||
add(L"f103", L"10458627 + ?f102");
|
||||
add(L"f104", L"10458627 + ?f1");
|
||||
add(L"f105", L"?f104 * ?f8 / ?f0");
|
||||
add(L"f106", L"0 - ?f105");
|
||||
add(L"f107", L"cos(?f106)");
|
||||
add(L"f108", L"0 - ?f107");
|
||||
add(L"f109", L"?f108 * 748094");
|
||||
add(L"f110", L"sin(?f106)");
|
||||
add(L"f111", L"0 - ?f110");
|
||||
add(L"f112", L"?f111 * 748094");
|
||||
add(L"f113", L"sqrt(?f109 * ?f109 + ?f112 * ?f112 + 0 * 0)");
|
||||
add(L"f114", L"748094 * 748094 / ?f113");
|
||||
add(L"f115", L"?f111 * ?f114");
|
||||
add(L"f116", L"74093 - ?f115");
|
||||
add(L"f117", L"?f108 * ?f114");
|
||||
add(L"f118", L"892667 - ?f117");
|
||||
add(L"f119", L"?f116 - 748094");
|
||||
add(L"f120", L"?f118 - 748094");
|
||||
add(L"f121", L"?f116 + 748094");
|
||||
add(L"f122", L"?f118 + 748094");
|
||||
add(L"f123", L"?f103 + ?f1");
|
||||
add(L"f124", L"?f123 * ?f8 / ?f0");
|
||||
add(L"f125", L"0 - ?f124");
|
||||
add(L"f126", L"cos(?f125)");
|
||||
add(L"f127", L"0 - ?f126");
|
||||
add(L"f128", L"?f127 * 748094");
|
||||
add(L"f129", L"sin(?f125)");
|
||||
add(L"f130", L"0 - ?f129");
|
||||
add(L"f131", L"?f130 * 748094");
|
||||
add(L"f132", L"sqrt(?f128 * ?f128 + ?f131 * ?f131 + 0 * 0)");
|
||||
add(L"f133", L"748094 * 748094 / ?f132");
|
||||
add(L"f134", L"?f130 * ?f133");
|
||||
add(L"f135", L"?f116 + ?f134");
|
||||
add(L"f136", L"?f127 * ?f133");
|
||||
add(L"f137", L"?f118 + ?f136");
|
||||
add(L"f138", L"if(?f102, 74093, ?f119)");
|
||||
add(L"f139", L"if(?f102, 892667, ?f120)");
|
||||
add(L"f140", L"if(?f102, 74093, ?f121)");
|
||||
add(L"f141", L"if(?f102, 892667, ?f122)");
|
||||
add(L"f142", L"if(?f102, ?f119, ?f135)");
|
||||
add(L"f143", L"if(?f102, ?f120, ?f137)");
|
||||
add(L"f144", L"if(?f102, ?f121, ?f135)");
|
||||
add(L"f145", L"if(?f102, ?f122, ?f137)");
|
||||
add(L"f0", L"if(0-$4 ,0,if(25000-$4 ,$4 ,25000))");
|
||||
add(L"f1", L"?f0 *2/1");
|
||||
add(L"f2", L"if(0-$0 ,0,if(?f1 -$0 ,$0 ,?f1 ))");
|
||||
add(L"f3", L"if(1-$2 ,1,if(21599999-$2 ,$2 ,21599999))");
|
||||
add(L"f4", L"if(0-$3 ,0,if(21599999-$3 ,$3 ,21599999))");
|
||||
add(L"f5", L"min(logwidth,logheight)");
|
||||
add(L"f6", L"?f5 *?f2 /100000");
|
||||
add(L"f7", L"?f5 *?f0 /100000");
|
||||
add(L"f8", L"?f6 *1/2");
|
||||
add(L"f9", L"logwidth/2");
|
||||
add(L"f10", L"?f9 +?f8 -?f7 ");
|
||||
add(L"f11", L"logheight/2");
|
||||
add(L"f12", L"?f11 +?f8 -?f7 ");
|
||||
add(L"f13", L"?f10 +0-?f6 ");
|
||||
add(L"f14", L"?f12 +0-?f6 ");
|
||||
add(L"f15", L"?f13 +?f8 -0");
|
||||
add(L"f16", L"?f14 +?f8 -0");
|
||||
add(L"f17", L"?f15 *sin(pi*(?f3 )/10800000)");
|
||||
add(L"f18", L"?f16 *cos(pi*(?f3 )/10800000)");
|
||||
add(L"f19", L"?f15 *(cos(atan2(?f17 ,?f18 )))");
|
||||
add(L"f20", L"?f16 *(sin(atan2(?f17 ,?f18 )))");
|
||||
add(L"f21", L"logwidth/2");
|
||||
add(L"f22", L"?f21 +?f19 -0");
|
||||
add(L"f23", L"logheight/2");
|
||||
add(L"f24", L"?f23 +?f20 -0");
|
||||
add(L"f25", L"min(?f13 ,?f14 )");
|
||||
add(L"f26", L"?f19 *?f19 /1");
|
||||
add(L"f27", L"?f20 *?f20 /1");
|
||||
add(L"f28", L"?f25 *?f25 /1");
|
||||
add(L"f29", L"?f26 +0-?f28 ");
|
||||
add(L"f30", L"?f27 +0-?f28 ");
|
||||
add(L"f31", L"?f29 *?f30 /?f26 ");
|
||||
add(L"f32", L"?f31 *1/?f27 ");
|
||||
add(L"f33", L"1+0-?f32 ");
|
||||
add(L"f34", L"sqrt(?f33 )");
|
||||
add(L"f35", L"?f29 *1/?f19 ");
|
||||
add(L"f36", L"?f35 *1/?f20 ");
|
||||
add(L"f37", L"(1+?f34 )/?f36 ");
|
||||
add(L"f38", L"(10800000*atan2(?f37 ,1))/pi");
|
||||
add(L"f39", L"?f38 +21600000-0");
|
||||
add(L"f40", L"if(?f38 ,?f38 ,?f39 )");
|
||||
add(L"f41", L"?f40 +0-?f3 ");
|
||||
add(L"f42", L"?f41 +21600000-0");
|
||||
add(L"f43", L"if(?f41 ,?f41 ,?f42 )");
|
||||
add(L"f44", L"?f43 +0-10800000");
|
||||
add(L"f45", L"?f43 +0-21600000");
|
||||
add(L"f46", L"if(?f44 ,?f45 ,?f43 )");
|
||||
add(L"f47", L"abs(?f46 )");
|
||||
add(L"f48", L"?f47 *-1/1");
|
||||
add(L"f49", L"abs($1 )");
|
||||
add(L"f50", L"?f49 *-1/1");
|
||||
add(L"f51", L"if(?f48 -?f50 ,?f48 ,if(0-?f50 ,?f50 ,0))");
|
||||
add(L"f52", L"?f3 +?f51 -0");
|
||||
add(L"f53", L"?f15 *sin(pi*(?f52 )/10800000)");
|
||||
add(L"f54", L"?f16 *cos(pi*(?f52 )/10800000)");
|
||||
add(L"f55", L"?f15 *(cos(atan2(?f53 ,?f54 )))");
|
||||
add(L"f56", L"?f16 *(sin(atan2(?f53 ,?f54 )))");
|
||||
add(L"f57", L"?f21 +?f55 -0");
|
||||
add(L"f58", L"?f23 +?f56 -0");
|
||||
add(L"f59", L"?f10 *sin(pi*(?f4 )/10800000)");
|
||||
add(L"f60", L"?f12 *cos(pi*(?f4 )/10800000)");
|
||||
add(L"f61", L"?f10 *(cos(atan2(?f59 ,?f60 )))");
|
||||
add(L"f62", L"?f12 *(sin(atan2(?f59 ,?f60 )))");
|
||||
add(L"f63", L"?f21 +?f61 -0");
|
||||
add(L"f64", L"?f23 +?f62 -0");
|
||||
add(L"f65", L"?f13 *sin(pi*(?f4 )/10800000)");
|
||||
add(L"f66", L"?f14 *cos(pi*(?f4 )/10800000)");
|
||||
add(L"f67", L"?f13 *(cos(atan2(?f65 ,?f66 )))");
|
||||
add(L"f68", L"?f14 *(sin(atan2(?f65 ,?f66 )))");
|
||||
add(L"f69", L"?f21 +?f67 -0");
|
||||
add(L"f70", L"?f23 +?f68 -0");
|
||||
add(L"f71", L"?f7 *cos(pi*(?f52 )/10800000)");
|
||||
add(L"f72", L"?f7 *sin(pi*(?f52 )/10800000)");
|
||||
add(L"f73", L"?f22 +?f71 -0");
|
||||
add(L"f74", L"?f24 +?f72 -0");
|
||||
add(L"f75", L"?f7 *cos(pi*(?f52 )/10800000)");
|
||||
add(L"f76", L"?f7 *sin(pi*(?f52 )/10800000)");
|
||||
add(L"f77", L"?f22 +0-?f75 ");
|
||||
add(L"f78", L"?f24 +0-?f76 ");
|
||||
add(L"f79", L"?f77 +0-?f21 ");
|
||||
add(L"f80", L"?f78 +0-?f23 ");
|
||||
add(L"f81", L"?f73 +0-?f21 ");
|
||||
add(L"f82", L"?f74 +0-?f23 ");
|
||||
add(L"f83", L"min(?f10 ,?f12 )");
|
||||
add(L"f84", L"?f79 *?f83 /?f10 ");
|
||||
add(L"f85", L"?f80 *?f83 /?f12 ");
|
||||
add(L"f86", L"?f81 *?f83 /?f10 ");
|
||||
add(L"f87", L"?f82 *?f83 /?f12 ");
|
||||
add(L"f88", L"?f86 +0-?f84 ");
|
||||
add(L"f89", L"?f87 +0-?f85 ");
|
||||
add(L"f90", L"sqrt(?f88 *?f88 +?f89 *?f89 +0*0)");
|
||||
add(L"f91", L"?f84 *?f87 /1");
|
||||
add(L"f92", L"?f86 *?f85 /1");
|
||||
add(L"f93", L"?f91 +0-?f92 ");
|
||||
add(L"f94", L"?f83 *?f83 /1");
|
||||
add(L"f95", L"?f90 *?f90 /1");
|
||||
add(L"f96", L"?f94 *?f95 /1");
|
||||
add(L"f97", L"?f93 *?f93 /1");
|
||||
add(L"f98", L"?f96 +0-?f97 ");
|
||||
add(L"f99", L"max(?f98 ,0)");
|
||||
add(L"f100", L"sqrt(?f99 )");
|
||||
add(L"f101", L"?f89 *-1/1");
|
||||
add(L"f102", L"if(?f101 ,-1,1)");
|
||||
add(L"f103", L"?f102 *?f88 /1");
|
||||
add(L"f104", L"?f103 *?f100 /1");
|
||||
add(L"f105", L"?f93 *?f89 /1");
|
||||
add(L"f106", L"(?f105 +?f104 )/?f95 ");
|
||||
add(L"f107", L"?f105 +0-?f104 ");
|
||||
add(L"f108", L"?f107 *1/?f95 ");
|
||||
add(L"f109", L"abs(?f89 )");
|
||||
add(L"f110", L"?f109 *?f100 /1");
|
||||
add(L"f111", L"?f93 *?f88 /-1");
|
||||
add(L"f112", L"(?f111 +?f110 )/?f95 ");
|
||||
add(L"f113", L"?f111 +0-?f110 ");
|
||||
add(L"f114", L"?f113 *1/?f95 ");
|
||||
add(L"f115", L"?f86 +0-?f106 ");
|
||||
add(L"f116", L"?f86 +0-?f108 ");
|
||||
add(L"f117", L"?f87 +0-?f112 ");
|
||||
add(L"f118", L"?f87 +0-?f114 ");
|
||||
add(L"f119", L"sqrt(?f115 *?f115 +?f117 *?f117 +0*0)");
|
||||
add(L"f120", L"sqrt(?f116 *?f116 +?f118 *?f118 +0*0)");
|
||||
add(L"f121", L"?f120 +0-?f119 ");
|
||||
add(L"f122", L"if(?f121 ,?f106 ,?f108 )");
|
||||
add(L"f123", L"if(?f121 ,?f112 ,?f114 )");
|
||||
add(L"f124", L"?f122 *?f10 /?f83 ");
|
||||
add(L"f125", L"?f123 *?f12 /?f83 ");
|
||||
add(L"f126", L"?f21 +?f124 -0");
|
||||
add(L"f127", L"?f23 +?f125 -0");
|
||||
add(L"f128", L"?f79 *?f25 /?f13 ");
|
||||
add(L"f129", L"?f80 *?f25 /?f14 ");
|
||||
add(L"f130", L"?f81 *?f25 /?f13 ");
|
||||
add(L"f131", L"?f82 *?f25 /?f14 ");
|
||||
add(L"f132", L"?f130 +0-?f128 ");
|
||||
add(L"f133", L"?f131 +0-?f129 ");
|
||||
add(L"f134", L"sqrt(?f132 *?f132 +?f133 *?f133 +0*0)");
|
||||
add(L"f135", L"?f128 *?f131 /1");
|
||||
add(L"f136", L"?f130 *?f129 /1");
|
||||
add(L"f137", L"?f135 +0-?f136 ");
|
||||
add(L"f138", L"?f25 *?f25 /1");
|
||||
add(L"f139", L"?f134 *?f134 /1");
|
||||
add(L"f140", L"?f138 *?f139 /1");
|
||||
add(L"f141", L"?f137 *?f137 /1");
|
||||
add(L"f142", L"?f140 +0-?f141 ");
|
||||
add(L"f143", L"max(?f142 ,0)");
|
||||
add(L"f144", L"sqrt(?f143 )");
|
||||
add(L"f145", L"?f102 *?f132 /1");
|
||||
add(L"f146", L"?f145 *?f144 /1");
|
||||
add(L"f147", L"?f137 *?f133 /1");
|
||||
add(L"f148", L"(?f147 +?f146 )/?f139 ");
|
||||
add(L"f149", L"?f147 +0-?f146 ");
|
||||
add(L"f150", L"?f149 *1/?f139 ");
|
||||
add(L"f151", L"abs(?f133 )");
|
||||
add(L"f152", L"?f151 *?f144 /1");
|
||||
add(L"f153", L"?f137 *?f132 /-1");
|
||||
add(L"f154", L"(?f153 +?f152 )/?f139 ");
|
||||
add(L"f155", L"?f153 +0-?f152 ");
|
||||
add(L"f156", L"?f155 *1/?f139 ");
|
||||
add(L"f157", L"?f128 +0-?f148 ");
|
||||
add(L"f158", L"?f128 +0-?f150 ");
|
||||
add(L"f159", L"?f129 +0-?f154 ");
|
||||
add(L"f160", L"?f129 +0-?f156 ");
|
||||
add(L"f161", L"sqrt(?f157 *?f157 +?f159 *?f159 +0*0)");
|
||||
add(L"f162", L"sqrt(?f158 *?f158 +?f160 *?f160 +0*0)");
|
||||
add(L"f163", L"?f162 +0-?f161 ");
|
||||
add(L"f164", L"if(?f163 ,?f148 ,?f150 )");
|
||||
add(L"f165", L"if(?f163 ,?f154 ,?f156 )");
|
||||
add(L"f166", L"?f164 *?f13 /?f25 ");
|
||||
add(L"f167", L"?f165 *?f14 /?f25 ");
|
||||
add(L"f168", L"?f21 +?f166 -0");
|
||||
add(L"f169", L"?f23 +?f167 -0");
|
||||
add(L"f170", L"(10800000*atan2(?f167 ,?f166 ))/pi");
|
||||
add(L"f171", L"?f170 +21600000-0");
|
||||
add(L"f172", L"if(?f170 ,?f170 ,?f171 )");
|
||||
add(L"f173", L"?f4 +0-?f172 ");
|
||||
add(L"f174", L"?f173 +21600000-0");
|
||||
add(L"f175", L"if(?f173 ,?f173 ,?f174 )");
|
||||
add(L"f176", L"?f172 +?f175 -0");
|
||||
add(L"f177", L"0+0-?f175 ");
|
||||
add(L"f178", L"?f126 +0-?f168 ");
|
||||
add(L"f179", L"?f127 +0-?f169 ");
|
||||
add(L"f180", L"sqrt(?f178 *?f178 +?f179 *?f179 +0*0)");
|
||||
add(L"f181", L"?f180 *1/2");
|
||||
add(L"f182", L"?f181 +0-?f7 ");
|
||||
add(L"f183", L"if(?f182 ,?f126 ,?f73 )");
|
||||
add(L"f184", L"if(?f182 ,?f127 ,?f74 )");
|
||||
add(L"f185", L"if(?f182 ,?f168 ,?f77 )");
|
||||
add(L"f186", L"if(?f182 ,?f169 ,?f78 )");
|
||||
add(L"f187", L"(10800000*atan2(?f125 ,?f124 ))/pi");
|
||||
add(L"f188", L"?f187 +21600000-0");
|
||||
add(L"f189", L"if(?f187 ,?f187 ,?f188 )");
|
||||
add(L"f190", L"?f189 +0-?f4 ");
|
||||
add(L"f191", L"?f190 +0-21600000");
|
||||
add(L"f192", L"if(?f190 ,?f191 ,?f190 )");
|
||||
add(L"f193", L"?f4 +?f192 -0");
|
||||
add(L"f194", L"0+0-?f192 ");
|
||||
add(L"f195", L"?f15 *sin(pi*(?f4 )/10800000)");
|
||||
add(L"f196", L"?f16 *cos(pi*(?f4 )/10800000)");
|
||||
add(L"f197", L"?f15 *(cos(atan2(?f195 ,?f196 )))");
|
||||
add(L"f198", L"?f16 *(sin(atan2(?f195 ,?f196 )))");
|
||||
add(L"f199", L"?f21 +?f197 -0");
|
||||
add(L"f200", L"?f23 +?f198 -0");
|
||||
add(L"f201", L"?f4 +5400000-0");
|
||||
add(L"f202", L"?f52 +0-5400000");
|
||||
add(L"f203", L"?f52 +10800000-0");
|
||||
add(L"f204", L"?f10 *cos(pi*(2700000)/10800000)");
|
||||
add(L"f205", L"?f12 *sin(pi*(2700000)/10800000)");
|
||||
add(L"f206", L"?f21 +0-?f204 ");
|
||||
add(L"f207", L"?f21 +?f204 -0");
|
||||
add(L"f208", L"?f23 +0-?f205 ");
|
||||
add(L"f209", L"?f23 +?f205 -0");
|
||||
add(L"f210", L"(?f176 )/60000.0");
|
||||
add(L"f211", L"(?f177 )/60000.0");
|
||||
add(L"f212", L"(?f193 )/60000.0");
|
||||
add(L"f213", L"(?f194 )/60000.0");
|
||||
/////////////////////////////////////////////////////////
|
||||
_handle h;
|
||||
|
||||
h.position = L"?f57 ?f58";
|
||||
handles.push_back(h);
|
||||
|
||||
h.position = L"?f63 ?f64";
|
||||
handles.push_back(h);
|
||||
|
||||
h.position = L"?f126 ?f127";
|
||||
h.r_minimum = L"0";
|
||||
h.r_maximum = L"?f1";
|
||||
handles.push_back(h);
|
||||
|
||||
h.position = L"?f77 ?f78";
|
||||
h.r_minimum = L"0";
|
||||
h.r_maximum = L"25000";
|
||||
handles.push_back(h);
|
||||
}
|
||||
};
|
||||
class oox_shape_CircularArrow : public oox_shape
|
||||
@ -202,160 +287,291 @@ class oox_shape_CircularArrow : public oox_shape
|
||||
public:
|
||||
oox_shape_CircularArrow()
|
||||
{
|
||||
odf_type_name =L"ooxml-circularArrow";
|
||||
odf_type_name = L"ooxml-circularArrow";
|
||||
|
||||
enhanced_path = L"M 832838 101692 A ?f91 ?f92 ?f93 ?f94 832838 101692 ?f88 ?f90 W ?f95 ?f96 ?f97 ?f98 832838 101692 ?f88 ?f90 L 1755675 1929758 1616897 1879250 1618409 1725100 1657499 1783381 A ?f138 ?f139 ?f140 ?f141 1657499 1783381 ?f135 ?f137 W ?f142 ?f143 ?f144 ?f145 1657499 1783381 ?f135 ?f137 Z N";
|
||||
text_areas = L"?f48 ?f50 ?f49 ?f51";
|
||||
glue_points = L"?f40 ?f41 ?f42 ?f43 ?f44 ?f45 ?f46 ?f47";
|
||||
view_box = L"0 0 2165070 2165070";
|
||||
enhanced_path = L"M ?f60 ?f61 G ?f10 ?f12 ?f197 ?f198 L ?f172 ?f173 ?f54 ?f55 ?f174 ?f175 ?f159 ?f160 G ?f13 ?f14 ?f199 ?f200 Z N";
|
||||
text_areas = L"?f193 ?f195 ?f194 ?f196";
|
||||
modifiers = L"12500 515062 20457681 17744048 18489";
|
||||
view_box = L"0 0 0 0";
|
||||
|
||||
add(L"f0", L"10800000");
|
||||
add(L"f1", L"5400000");
|
||||
add(L"f2", L"left");
|
||||
add(L"f3", L"right");
|
||||
add(L"f4", L"top");
|
||||
add(L"f5", L"bottom");
|
||||
add(L"f6", L"?f5 - ?f4");
|
||||
add(L"f7", L"?f3 - ?f2");
|
||||
add(L"f8", L"5419351 / 1725033");
|
||||
add(L"f9", L"180");
|
||||
add(L"f10", L"?f7 / 2165070");
|
||||
add(L"f11", L"?f6 / 2165070");
|
||||
add(L"f12", L"1616897 - 1082535");
|
||||
add(L"f13", L"1879250 - 1082535");
|
||||
add(L"f14", L"sqrt(?f12 * ?f12 + ?f13 * ?f13 + 0 * 0)");
|
||||
add(L"f15", L"atan2(?f12, ?f13)");
|
||||
add(L"f16", L"?f15 + ?f1");
|
||||
add(L"f17", L"?f16 * ?f9 / ?f0");
|
||||
add(L"f18", L"0 - ?f17");
|
||||
add(L"f19", L"832838 - 1082535");
|
||||
add(L"f20", L"101692 - 1082535");
|
||||
add(L"f21", L"sqrt(?f19 * ?f19 + ?f20 * ?f20 + 0 * 0)");
|
||||
add(L"f22", L"atan2(?f19, ?f20)");
|
||||
add(L"f23", L"?f22 + ?f1");
|
||||
add(L"f24", L"?f23 * ?f9 / ?f0");
|
||||
add(L"f25", L"0 - ?f24");
|
||||
add(L"f26", L"1716572 - 1082535");
|
||||
add(L"f27", L"1871457 - 1082535");
|
||||
add(L"f28", L"sqrt(?f26 * ?f26 + ?f27 * ?f27 + 0 * 0)");
|
||||
add(L"f29", L"atan2(?f26, ?f27)");
|
||||
add(L"f30", L"?f29 + ?f1");
|
||||
add(L"f31", L"?f30 * ?f9 / ?f0");
|
||||
add(L"f32", L"0 - ?f31");
|
||||
add(L"f33", L"1618409 - 1082535");
|
||||
add(L"f34", L"1725100 - 1082535");
|
||||
add(L"f35", L"sqrt(?f33 * ?f33 + ?f34 * ?f34 + 0 * 0)");
|
||||
add(L"f36", L"atan2(?f33, ?f34)");
|
||||
add(L"f37", L"?f36 + ?f1");
|
||||
add(L"f38", L"?f37 * ?f9 / ?f0");
|
||||
add(L"f39", L"0 - ?f38");
|
||||
add(L"f40", L"845866 / ?f10");
|
||||
add(L"f41", L"152866 / ?f11");
|
||||
add(L"f42", L"1755675 / ?f10");
|
||||
add(L"f43", L"1929758 / ?f11");
|
||||
add(L"f44", L"1616897 / ?f10");
|
||||
add(L"f45", L"1879250 / ?f11");
|
||||
add(L"f46", L"1618409 / ?f10");
|
||||
add(L"f47", L"1725100 / ?f11");
|
||||
add(L"f48", L"366853 / ?f10");
|
||||
add(L"f49", L"1798217 / ?f10");
|
||||
add(L"f50", L"366853 / ?f11");
|
||||
add(L"f51", L"1798217 / ?f11");
|
||||
add(L"f52", L"21550000 - 9329679");
|
||||
add(L"f53", L"if(?f52, 9329679, 21550000)");
|
||||
add(L"f54", L"-21550000 - ?f53");
|
||||
add(L"f55", L"if(?f54, -21550000, ?f53)");
|
||||
add(L"f56", L"15343043 + ?f55");
|
||||
add(L"f57", L"15343043 + ?f1");
|
||||
add(L"f58", L"?f57 * ?f8 / ?f0");
|
||||
add(L"f59", L"0 - ?f58");
|
||||
add(L"f60", L"cos(?f59)");
|
||||
add(L"f61", L"0 - ?f60");
|
||||
add(L"f62", L"?f61 * 1012127");
|
||||
add(L"f63", L"sin(?f59)");
|
||||
add(L"f64", L"0 - ?f63");
|
||||
add(L"f65", L"?f64 * 1012127");
|
||||
add(L"f66", L"sqrt(?f62 * ?f62 + ?f65 * ?f65 + 0 * 0)");
|
||||
add(L"f67", L"1012127 * 1012127 / ?f66");
|
||||
add(L"f68", L"?f64 * ?f67");
|
||||
add(L"f69", L"832838 - ?f68");
|
||||
add(L"f70", L"?f61 * ?f67");
|
||||
add(L"f71", L"101692 - ?f70");
|
||||
add(L"f72", L"?f69 - 1012127");
|
||||
add(L"f73", L"?f71 - 1012127");
|
||||
add(L"f74", L"?f69 + 1012127");
|
||||
add(L"f75", L"?f71 + 1012127");
|
||||
add(L"f76", L"?f56 + ?f1");
|
||||
add(L"f77", L"?f76 * ?f8 / ?f0");
|
||||
add(L"f78", L"0 - ?f77");
|
||||
add(L"f79", L"cos(?f78)");
|
||||
add(L"f80", L"0 - ?f79");
|
||||
add(L"f81", L"?f80 * 1012127");
|
||||
add(L"f82", L"sin(?f78)");
|
||||
add(L"f83", L"0 - ?f82");
|
||||
add(L"f84", L"?f83 * 1012127");
|
||||
add(L"f85", L"sqrt(?f81 * ?f81 + ?f84 * ?f84 + 0 * 0)");
|
||||
add(L"f86", L"1012127 * 1012127 / ?f85");
|
||||
add(L"f87", L"?f83 * ?f86");
|
||||
add(L"f88", L"?f69 + ?f87");
|
||||
add(L"f89", L"?f80 * ?f86");
|
||||
add(L"f90", L"?f71 + ?f89");
|
||||
add(L"f91", L"if(?f55, 832838, ?f72)");
|
||||
add(L"f92", L"if(?f55, 101692, ?f73)");
|
||||
add(L"f93", L"if(?f55, 832838, ?f74)");
|
||||
add(L"f94", L"if(?f55, 101692, ?f75)");
|
||||
add(L"f95", L"if(?f55, ?f72, ?f88)");
|
||||
add(L"f96", L"if(?f55, ?f73, ?f90)");
|
||||
add(L"f97", L"if(?f55, ?f74, ?f88)");
|
||||
add(L"f98", L"if(?f55, ?f75, ?f90)");
|
||||
add(L"f99", L"21550000 - -9295060");
|
||||
add(L"f100", L"if(?f99, -9295060, 21550000)");
|
||||
add(L"f101", L"-21550000 - ?f100");
|
||||
add(L"f102", L"if(?f101, -21550000, ?f100)");
|
||||
add(L"f103", L"3038103 + ?f102");
|
||||
add(L"f104", L"3038103 + ?f1");
|
||||
add(L"f105", L"?f104 * ?f8 / ?f0");
|
||||
add(L"f106", L"0 - ?f105");
|
||||
add(L"f107", L"cos(?f106)");
|
||||
add(L"f108", L"0 - ?f107");
|
||||
add(L"f109", L"?f108 * 906515");
|
||||
add(L"f110", L"sin(?f106)");
|
||||
add(L"f111", L"0 - ?f110");
|
||||
add(L"f112", L"?f111 * 906515");
|
||||
add(L"f113", L"sqrt(?f109 * ?f109 + ?f112 * ?f112 + 0 * 0)");
|
||||
add(L"f114", L"906515 * 906515 / ?f113");
|
||||
add(L"f115", L"?f111 * ?f114");
|
||||
add(L"f116", L"1657499 - ?f115");
|
||||
add(L"f117", L"?f108 * ?f114");
|
||||
add(L"f118", L"1783381 - ?f117");
|
||||
add(L"f119", L"?f116 - 906515");
|
||||
add(L"f120", L"?f118 - 906515");
|
||||
add(L"f121", L"?f116 + 906515");
|
||||
add(L"f122", L"?f118 + 906515");
|
||||
add(L"f123", L"?f103 + ?f1");
|
||||
add(L"f124", L"?f123 * ?f8 / ?f0");
|
||||
add(L"f125", L"0 - ?f124");
|
||||
add(L"f126", L"cos(?f125)");
|
||||
add(L"f127", L"0 - ?f126");
|
||||
add(L"f128", L"?f127 * 906515");
|
||||
add(L"f129", L"sin(?f125)");
|
||||
add(L"f130", L"0 - ?f129");
|
||||
add(L"f131", L"?f130 * 906515");
|
||||
add(L"f132", L"sqrt(?f128 * ?f128 + ?f131 * ?f131 + 0 * 0)");
|
||||
add(L"f133", L"906515 * 906515 / ?f132");
|
||||
add(L"f134", L"?f130 * ?f133");
|
||||
add(L"f135", L"?f116 + ?f134");
|
||||
add(L"f136", L"?f127 * ?f133");
|
||||
add(L"f137", L"?f118 + ?f136");
|
||||
add(L"f138", L"if(?f102, 1657499, ?f119)");
|
||||
add(L"f139", L"if(?f102, 1783381, ?f120)");
|
||||
add(L"f140", L"if(?f102, 1657499, ?f121)");
|
||||
add(L"f141", L"if(?f102, 1783381, ?f122)");
|
||||
add(L"f142", L"if(?f102, ?f119, ?f135)");
|
||||
add(L"f143", L"if(?f102, ?f120, ?f137)");
|
||||
add(L"f144", L"if(?f102, ?f121, ?f135)");
|
||||
add(L"f145", L"if(?f102, ?f122, ?f137)");
|
||||
add(L"f0", L"if(0-$4 ,0,if(25000-$4 ,$4 ,25000))");
|
||||
add(L"f1", L"?f0 *2/1");
|
||||
add(L"f2", L"if(0-$0 ,0,if(?f1 -$0 ,$0 ,?f1 ))");
|
||||
add(L"f3", L"if(1-$2 ,1,if(21599999-$2 ,$2 ,21599999))");
|
||||
add(L"f4", L"if(0-$3 ,0,if(21599999-$3 ,$3 ,21599999))");
|
||||
add(L"f5", L"min(logwidth,logheight)");
|
||||
add(L"f6", L"?f5 *?f2 /100000");
|
||||
add(L"f7", L"?f5 *?f0 /100000");
|
||||
add(L"f8", L"?f6 *1/2");
|
||||
add(L"f9", L"logwidth/2");
|
||||
add(L"f10", L"?f9 +?f8 -?f7 ");
|
||||
add(L"f11", L"logheight/2");
|
||||
add(L"f12", L"?f11 +?f8 -?f7 ");
|
||||
add(L"f13", L"?f10 +0-?f6 ");
|
||||
add(L"f14", L"?f12 +0-?f6 ");
|
||||
add(L"f15", L"?f13 +?f8 -0");
|
||||
add(L"f16", L"?f14 +?f8 -0");
|
||||
add(L"f17", L"?f15 *sin(pi*(?f3 )/10800000)");
|
||||
add(L"f18", L"?f16 *cos(pi*(?f3 )/10800000)");
|
||||
add(L"f19", L"?f15 *(cos(atan2(?f17 ,?f18 )))");
|
||||
add(L"f20", L"?f16 *(sin(atan2(?f17 ,?f18 )))");
|
||||
add(L"f21", L"logwidth/2");
|
||||
add(L"f22", L"?f21 +?f19 -0");
|
||||
add(L"f23", L"logheight/2");
|
||||
add(L"f24", L"?f23 +?f20 -0");
|
||||
add(L"f25", L"min(?f13 ,?f14 )");
|
||||
add(L"f26", L"?f19 *?f19 /1");
|
||||
add(L"f27", L"?f20 *?f20 /1");
|
||||
add(L"f28", L"?f25 *?f25 /1");
|
||||
add(L"f29", L"?f26 +0-?f28 ");
|
||||
add(L"f30", L"?f27 +0-?f28 ");
|
||||
add(L"f31", L"?f29 *?f30 /?f26 ");
|
||||
add(L"f32", L"?f31 *1/?f27 ");
|
||||
add(L"f33", L"1+0-?f32 ");
|
||||
add(L"f34", L"sqrt(?f33 )");
|
||||
add(L"f35", L"?f29 *1/?f19 ");
|
||||
add(L"f36", L"?f35 *1/?f20 ");
|
||||
add(L"f37", L"(1+?f34 )/?f36 ");
|
||||
add(L"f38", L"(10800000*atan2(?f37 ,1))/pi");
|
||||
add(L"f39", L"?f38 +21600000-0");
|
||||
add(L"f40", L"if(?f38 ,?f38 ,?f39 )");
|
||||
add(L"f41", L"?f40 +0-?f3 ");
|
||||
add(L"f42", L"?f41 +21600000-0");
|
||||
add(L"f43", L"if(?f41 ,?f41 ,?f42 )");
|
||||
add(L"f44", L"?f43 +0-10800000");
|
||||
add(L"f45", L"?f43 +0-21600000");
|
||||
add(L"f46", L"if(?f44 ,?f45 ,?f43 )");
|
||||
add(L"f47", L"abs(?f46 )");
|
||||
add(L"f48", L"if(0-$1 ,0,if(?f47 -$1 ,$1 ,?f47 ))");
|
||||
add(L"f49", L"?f3 +?f48 -0");
|
||||
add(L"f50", L"?f15 *sin(pi*(?f49 )/10800000)");
|
||||
add(L"f51", L"?f16 *cos(pi*(?f49 )/10800000)");
|
||||
add(L"f52", L"?f15 *(cos(atan2(?f50 ,?f51 )))");
|
||||
add(L"f53", L"?f16 *(sin(atan2(?f50 ,?f51 )))");
|
||||
add(L"f54", L"?f21 +?f52 -0");
|
||||
add(L"f55", L"?f23 +?f53 -0");
|
||||
add(L"f56", L"?f10 *sin(pi*(?f4 )/10800000)");
|
||||
add(L"f57", L"?f12 *cos(pi*(?f4 )/10800000)");
|
||||
add(L"f58", L"?f10 *(cos(atan2(?f56 ,?f57 )))");
|
||||
add(L"f59", L"?f12 *(sin(atan2(?f56 ,?f57 )))");
|
||||
add(L"f60", L"?f21 +?f58 -0");
|
||||
add(L"f61", L"?f23 +?f59 -0");
|
||||
add(L"f62", L"?f7 *cos(pi*(?f49 )/10800000)");
|
||||
add(L"f63", L"?f7 *sin(pi*(?f49 )/10800000)");
|
||||
add(L"f64", L"?f22 +?f62 -0");
|
||||
add(L"f65", L"?f24 +?f63 -0");
|
||||
add(L"f66", L"?f7 *cos(pi*(?f49 )/10800000)");
|
||||
add(L"f67", L"?f7 *sin(pi*(?f49 )/10800000)");
|
||||
add(L"f68", L"?f22 +0-?f66 ");
|
||||
add(L"f69", L"?f24 +0-?f67 ");
|
||||
add(L"f70", L"?f68 +0-?f21 ");
|
||||
add(L"f71", L"?f69 +0-?f23 ");
|
||||
add(L"f72", L"?f64 +0-?f21 ");
|
||||
add(L"f73", L"?f65 +0-?f23 ");
|
||||
add(L"f74", L"min(?f10 ,?f12 )");
|
||||
add(L"f75", L"?f70 *?f74 /?f10 ");
|
||||
add(L"f76", L"?f71 *?f74 /?f12 ");
|
||||
add(L"f77", L"?f72 *?f74 /?f10 ");
|
||||
add(L"f78", L"?f73 *?f74 /?f12 ");
|
||||
add(L"f79", L"?f77 +0-?f75 ");
|
||||
add(L"f80", L"?f78 +0-?f76 ");
|
||||
add(L"f81", L"sqrt(?f79 *?f79 +?f80 *?f80 +0*0)");
|
||||
add(L"f82", L"?f75 *?f78 /1");
|
||||
add(L"f83", L"?f77 *?f76 /1");
|
||||
add(L"f84", L"?f82 +0-?f83 ");
|
||||
add(L"f85", L"?f74 *?f74 /1");
|
||||
add(L"f86", L"?f81 *?f81 /1");
|
||||
add(L"f87", L"?f85 *?f86 /1");
|
||||
add(L"f88", L"?f84 *?f84 /1");
|
||||
add(L"f89", L"?f87 +0-?f88 ");
|
||||
add(L"f90", L"max(?f89 ,0)");
|
||||
add(L"f91", L"sqrt(?f90 )");
|
||||
add(L"f92", L"?f80 *-1/1");
|
||||
add(L"f93", L"if(?f92 ,-1,1)");
|
||||
add(L"f94", L"?f93 *?f79 /1");
|
||||
add(L"f95", L"?f94 *?f91 /1");
|
||||
add(L"f96", L"?f84 *?f80 /1");
|
||||
add(L"f97", L"(?f96 +?f95 )/?f86 ");
|
||||
add(L"f98", L"?f96 +0-?f95 ");
|
||||
add(L"f99", L"?f98 *1/?f86 ");
|
||||
add(L"f100", L"abs(?f80 )");
|
||||
add(L"f101", L"?f100 *?f91 /1");
|
||||
add(L"f102", L"?f84 *?f79 /-1");
|
||||
add(L"f103", L"(?f102 +?f101 )/?f86 ");
|
||||
add(L"f104", L"?f102 +0-?f101 ");
|
||||
add(L"f105", L"?f104 *1/?f86 ");
|
||||
add(L"f106", L"?f77 +0-?f97 ");
|
||||
add(L"f107", L"?f77 +0-?f99 ");
|
||||
add(L"f108", L"?f78 +0-?f103 ");
|
||||
add(L"f109", L"?f78 +0-?f105 ");
|
||||
add(L"f110", L"sqrt(?f106 *?f106 +?f108 *?f108 +0*0)");
|
||||
add(L"f111", L"sqrt(?f107 *?f107 +?f109 *?f109 +0*0)");
|
||||
add(L"f112", L"?f111 +0-?f110 ");
|
||||
add(L"f113", L"if(?f112 ,?f97 ,?f99 )");
|
||||
add(L"f114", L"if(?f112 ,?f103 ,?f105 )");
|
||||
add(L"f115", L"?f113 *?f10 /?f74 ");
|
||||
add(L"f116", L"?f114 *?f12 /?f74 ");
|
||||
add(L"f117", L"?f21 +?f115 -0");
|
||||
add(L"f118", L"?f23 +?f116 -0");
|
||||
add(L"f119", L"?f70 *?f25 /?f13 ");
|
||||
add(L"f120", L"?f71 *?f25 /?f14 ");
|
||||
add(L"f121", L"?f72 *?f25 /?f13 ");
|
||||
add(L"f122", L"?f73 *?f25 /?f14 ");
|
||||
add(L"f123", L"?f121 +0-?f119 ");
|
||||
add(L"f124", L"?f122 +0-?f120 ");
|
||||
add(L"f125", L"sqrt(?f123 *?f123 +?f124 *?f124 +0*0)");
|
||||
add(L"f126", L"?f119 *?f122 /1");
|
||||
add(L"f127", L"?f121 *?f120 /1");
|
||||
add(L"f128", L"?f126 +0-?f127 ");
|
||||
add(L"f129", L"?f25 *?f25 /1");
|
||||
add(L"f130", L"?f125 *?f125 /1");
|
||||
add(L"f131", L"?f129 *?f130 /1");
|
||||
add(L"f132", L"?f128 *?f128 /1");
|
||||
add(L"f133", L"?f131 +0-?f132 ");
|
||||
add(L"f134", L"max(?f133 ,0)");
|
||||
add(L"f135", L"sqrt(?f134 )");
|
||||
add(L"f136", L"?f93 *?f123 /1");
|
||||
add(L"f137", L"?f136 *?f135 /1");
|
||||
add(L"f138", L"?f128 *?f124 /1");
|
||||
add(L"f139", L"(?f138 +?f137 )/?f130 ");
|
||||
add(L"f140", L"?f138 +0-?f137 ");
|
||||
add(L"f141", L"?f140 *1/?f130 ");
|
||||
add(L"f142", L"abs(?f124 )");
|
||||
add(L"f143", L"?f142 *?f135 /1");
|
||||
add(L"f144", L"?f128 *?f123 /-1");
|
||||
add(L"f145", L"(?f144 +?f143 )/?f130 ");
|
||||
add(L"f146", L"?f144 +0-?f143 ");
|
||||
add(L"f147", L"?f146 *1/?f130 ");
|
||||
add(L"f148", L"?f119 +0-?f139 ");
|
||||
add(L"f149", L"?f119 +0-?f141 ");
|
||||
add(L"f150", L"?f120 +0-?f145 ");
|
||||
add(L"f151", L"?f120 +0-?f147 ");
|
||||
add(L"f152", L"sqrt(?f148 *?f148 +?f150 *?f150 +0*0)");
|
||||
add(L"f153", L"sqrt(?f149 *?f149 +?f151 *?f151 +0*0)");
|
||||
add(L"f154", L"?f153 +0-?f152 ");
|
||||
add(L"f155", L"if(?f154 ,?f139 ,?f141 )");
|
||||
add(L"f156", L"if(?f154 ,?f145 ,?f147 )");
|
||||
add(L"f157", L"?f155 *?f13 /?f25 ");
|
||||
add(L"f158", L"?f156 *?f14 /?f25 ");
|
||||
add(L"f159", L"?f21 +?f157 -0");
|
||||
add(L"f160", L"?f23 +?f158 -0");
|
||||
add(L"f161", L"(10800000*atan2(?f158 ,?f157 ))/pi");
|
||||
add(L"f162", L"?f161 +21600000-0");
|
||||
add(L"f163", L"if(?f161 ,?f161 ,?f162 )");
|
||||
add(L"f164", L"?f4 +0-?f163 ");
|
||||
add(L"f165", L"?f164 +0-21600000");
|
||||
add(L"f166", L"if(?f164 ,?f165 ,?f164 )");
|
||||
add(L"f167", L"?f117 +0-?f159 ");
|
||||
add(L"f168", L"?f118 +0-?f160 ");
|
||||
add(L"f169", L"sqrt(?f167 *?f167 +?f168 *?f168 +0*0)");
|
||||
add(L"f170", L"?f169 *1/2");
|
||||
add(L"f171", L"?f170 +0-?f7 ");
|
||||
add(L"f172", L"if(?f171 ,?f117 ,?f64 )");
|
||||
add(L"f173", L"if(?f171 ,?f118 ,?f65 )");
|
||||
add(L"f174", L"if(?f171 ,?f159 ,?f68 )");
|
||||
add(L"f175", L"if(?f171 ,?f160 ,?f69 )");
|
||||
add(L"f176", L"(10800000*atan2(?f116 ,?f115 ))/pi");
|
||||
add(L"f177", L"?f176 +21600000-0");
|
||||
add(L"f178", L"if(?f176 ,?f176 ,?f177 )");
|
||||
add(L"f179", L"?f178 +0-?f4 ");
|
||||
add(L"f180", L"?f179 +21600000-0");
|
||||
add(L"f181", L"if(?f179 ,?f179 ,?f180 )");
|
||||
add(L"f182", L"?f15 *sin(pi*(?f4 )/10800000)");
|
||||
add(L"f183", L"?f16 *cos(pi*(?f4 )/10800000)");
|
||||
add(L"f184", L"?f15 *(cos(atan2(?f182 ,?f183 )))");
|
||||
add(L"f185", L"?f16 *(sin(atan2(?f182 ,?f183 )))");
|
||||
add(L"f186", L"?f21 +?f184 -0");
|
||||
add(L"f187", L"?f23 +?f185 -0");
|
||||
add(L"f188", L"?f4 +0-5400000");
|
||||
add(L"f189", L"?f49 +5400000-0");
|
||||
add(L"f190", L"?f49 +10800000-0");
|
||||
add(L"f191", L"?f10 *cos(pi*(2700000)/10800000)");
|
||||
add(L"f192", L"?f12 *sin(pi*(2700000)/10800000)");
|
||||
add(L"f193", L"?f21 +0-?f191 ");
|
||||
add(L"f194", L"?f21 +?f191 -0");
|
||||
add(L"f195", L"?f23 +0-?f192 ");
|
||||
add(L"f196", L"?f23 +?f192 -0");
|
||||
add(L"f197", L"(?f4 )/60000.0");
|
||||
add(L"f198", L"(?f181 )/60000.0");
|
||||
add(L"f199", L"(?f163 )/60000.0");
|
||||
add(L"f200", L"(?f166 )/60000.0");
|
||||
/////////////////////////////////////////////////////////
|
||||
_handle h;
|
||||
|
||||
h.position = L"?f54 ?f55";
|
||||
handles.push_back(h);
|
||||
|
||||
h.position = L"?f60 ?f61";
|
||||
handles.push_back(h);
|
||||
|
||||
h.position = L"?f117 ?f118";
|
||||
h.r_minimum = L"0";
|
||||
h.r_maximum = L"?f1";
|
||||
handles.push_back(h);
|
||||
|
||||
h.position = L"?f68 ?f69";
|
||||
h.r_minimum = L"0";
|
||||
h.r_maximum = L"25000";
|
||||
handles.push_back(h);
|
||||
}
|
||||
};
|
||||
class oox_shape_SwooshArrow : public oox_shape
|
||||
{
|
||||
public:
|
||||
oox_shape_SwooshArrow()
|
||||
{
|
||||
odf_type_name = L"ooxml-swooshArrow";
|
||||
|
||||
enhanced_path = L"M 0 ?f30 Q ?f25 ?f23 ?f6 ?f8 L ?f11 0 ?f31 ?f20 ?f15 ?f16 ?f14 ?f13 Q ?f29 ?f27 0 ?f30 Z N";
|
||||
text_areas = L"0 0 ?f31 ?f30";
|
||||
modifiers = L"25000 25000";
|
||||
view_box = L"0 0 0 0";
|
||||
|
||||
add(L"f0", L"if(1-$0 ,1,if(75000-$0 ,$0 ,75000))");
|
||||
add(L"f1", L"min(logwidth,logheight)");
|
||||
add(L"f2", L"70000*logwidth/?f1 ");
|
||||
add(L"f3", L"if(0-$1 ,0,if(?f2 -$1 ,$1 ,?f2 ))");
|
||||
add(L"f4", L"logheight*?f0 /100000");
|
||||
add(L"f5", L"?f1 *?f3 /100000");
|
||||
add(L"f6", L"logwidth+0-?f5 ");
|
||||
add(L"f7", L"min(logwidth,logheight)/8");
|
||||
add(L"f8", L"0+?f7 -0");
|
||||
add(L"f9", L"5400000*1/14");
|
||||
add(L"f10", L"?f7 *tan(pi*(?f9 )/10800000)");
|
||||
add(L"f11", L"?f6 +0-?f10 ");
|
||||
add(L"f12", L"?f4 *tan(pi*(?f9 )/10800000)");
|
||||
add(L"f13", L"?f8 +?f4 -0");
|
||||
add(L"f14", L"?f6 +?f12 -0");
|
||||
add(L"f15", L"?f14 +?f10 -0");
|
||||
add(L"f16", L"?f13 +?f7 -0");
|
||||
add(L"f17", L"?f16 +0-0");
|
||||
add(L"f18", L"?f17 *1/2");
|
||||
add(L"f19", L"logheight*1/20");
|
||||
add(L"f20", L"0+?f18 -?f19 ");
|
||||
add(L"f21", L"logheight/6");
|
||||
add(L"f22", L"?f21 *1/1");
|
||||
add(L"f23", L"?f21 +?f22 -0");
|
||||
add(L"f24", L"logwidth/6");
|
||||
add(L"f25", L"?f24 ");
|
||||
add(L"f26", L"?f21 *1/2");
|
||||
add(L"f27", L"?f13 +?f26 -0");
|
||||
add(L"f28", L"logwidth/4");
|
||||
add(L"f29", L"?f28 ");
|
||||
add(L"f30", L"logheight");
|
||||
add(L"f31", L"logwidth");
|
||||
/////////////////////////////////////////////////////////
|
||||
_handle h1, h2;
|
||||
|
||||
h1.position = L"?f54 ?f55";
|
||||
h1.y_minimum = L"1";
|
||||
h1.y_maximum = L"75000";
|
||||
|
||||
handles.push_back(h1);
|
||||
|
||||
h2.position = L"?f60 ?f61";
|
||||
h2.x_minimum = L"0";
|
||||
h2.x_maximum = L"?f2";
|
||||
handles.push_back(h2);
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -30,11 +30,11 @@
|
||||
*
|
||||
*/
|
||||
#include "../oox_shape_defines.h"
|
||||
// shapetypeMathDivide,
|
||||
// shapetypeMathEqual,
|
||||
// shapetypeMathMinus,
|
||||
//+ // shapetypeMathMultiply,
|
||||
// shapetypeMathNotEqual,
|
||||
// shapetypeMathDivide,
|
||||
//+ shapetypeMathEqual,
|
||||
// shapetypeMathMinus,
|
||||
//+ shapetypeMathMultiply,
|
||||
// shapetypeMathNotEqual,
|
||||
namespace cpdoccore
|
||||
{
|
||||
class oox_shape_mathMultiply : public oox_shape
|
||||
@ -117,4 +117,47 @@ public:
|
||||
handles.push_back(h);
|
||||
}
|
||||
};
|
||||
class oox_shape_mathEqual : public oox_shape
|
||||
{
|
||||
public:
|
||||
oox_shape_mathEqual()
|
||||
{
|
||||
odf_type_name =L"ooxml-mathEqual";
|
||||
|
||||
enhanced_path = L"M ?f13 ?f10 L ?f14 ?f10 ?f14 ?f8 ?f13 ?f8 Z M ?f13 ?f9 L ?f14 ?f9 ?f14 ?f11 ?f13 ?f11 Z N";
|
||||
text_areas = L"?f13 ?f10 ?f14 ?f11";
|
||||
view_box = L"0 0 0 0";
|
||||
modifiers = L"23520 11760";
|
||||
|
||||
add(L"f0", L"if(0-$0 ,0,if(36745-$0 ,$0 ,36745))");
|
||||
add(L"f1", L"?f0 *2/1");
|
||||
add(L"f2", L"100000+0-2");
|
||||
add(L"f3", L"if(0-$1 ,0,if(?f2 -$1 ,$1 ,?f2 ))");
|
||||
add(L"f4", L"logheight*?f0 /100000");
|
||||
add(L"f5", L"logheight*?f3 /200000");
|
||||
add(L"f6", L"logwidth*73490/200000");
|
||||
add(L"f7", L"logheight/2");
|
||||
add(L"f8", L"?f7 +0-?f5 ");
|
||||
add(L"f9", L"?f7 +?f5 -0");
|
||||
add(L"f10", L"?f8 +0-?f4 ");
|
||||
add(L"f11", L"?f9 +?f4 -0");
|
||||
add(L"f12", L"logwidth/2");
|
||||
add(L"f13", L"?f12 +0-?f6 ");
|
||||
add(L"f14", L"?f12 +?f6 -0");
|
||||
add(L"f15", L"(?f10 +?f8 )/2");
|
||||
add(L"f16", L"(?f9 +?f11 )/2");
|
||||
add(L"f17", L"logwidth");
|
||||
/////////////////////////////////////////////////////////
|
||||
_handle h;
|
||||
h.position = L"0 ?f10";
|
||||
h.y_maximum= L"36745";
|
||||
h.y_minimum= L"0";
|
||||
handles.push_back(h);
|
||||
|
||||
h.position = L"?f17 ?f8";
|
||||
h.y_maximum= L"?f2";
|
||||
h.y_minimum= L"0";
|
||||
handles.push_back(h);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -30,8 +30,8 @@
|
||||
*
|
||||
*/
|
||||
// shapetypeArc,
|
||||
// shapetypeChord,
|
||||
// shapetypeCorner,
|
||||
//+ shapetypeChord,
|
||||
//+ shapetypeCorner,
|
||||
// shapetypeCornerTabs,
|
||||
// shapetypeDecagon,
|
||||
// shapetypeDiagStripe,
|
||||
@ -43,12 +43,14 @@
|
||||
// shapetypeHalfFrame,
|
||||
// shapetypeHeptagon,
|
||||
// shapetypeNonIsoscelesTrapezoid,
|
||||
// shapetypePie,
|
||||
//+ shapetypePie,
|
||||
//+ shapetypePieWedge,
|
||||
//+ shapetypePlaque,
|
||||
// shapetypePlaqueTabs,
|
||||
// shapetypeSquareTabs,
|
||||
// shapetypeTeardrop,
|
||||
//+ shapetypeBlockArc
|
||||
//+ shapetypeDonut
|
||||
|
||||
#include "../oox_shape_defines.h"
|
||||
|
||||
@ -785,4 +787,320 @@ public:
|
||||
/////////////////////////////////////////////////////////
|
||||
}
|
||||
};
|
||||
class oox_shape_Pie : public oox_shape
|
||||
{
|
||||
public:
|
||||
oox_shape_Pie()
|
||||
{
|
||||
odf_type_name =L"ooxml-pie";
|
||||
|
||||
enhanced_path = L"M ?f12 ?f14 G ?f5 ?f7 ?f29 ?f30 L ?f11 ?f13 Z N";
|
||||
text_areas = L"?f23 ?f24 ?f25 ?f26";
|
||||
view_box = L"0 0 0 0";
|
||||
modifiers = L"9000000 16200000";
|
||||
|
||||
add(L"f0", L"if(0-$0 ,0,if(21599999-$0 ,$0 ,21599999))");
|
||||
add(L"f1", L"if(0-$1 ,0,if(21599999-$1 ,$1 ,21599999))");
|
||||
add(L"f2", L"?f1 +0-?f0 ");
|
||||
add(L"f3", L"?f2 +21600000-0");
|
||||
add(L"f4", L"if(?f2 ,?f2 ,?f3 )");
|
||||
add(L"f5", L"logwidth/2");
|
||||
add(L"f6", L"?f5 *sin(pi*(?f0 )/10800000)");
|
||||
add(L"f7", L"logheight/2");
|
||||
add(L"f8", L"?f7 *cos(pi*(?f0 )/10800000)");
|
||||
add(L"f9", L"?f5 *(cos(atan2(?f6 ,?f8 )))");
|
||||
add(L"f10", L"?f7 *(sin(atan2(?f6 ,?f8 )))");
|
||||
add(L"f11", L"logwidth/2");
|
||||
add(L"f12", L"?f11 +?f9 -0");
|
||||
add(L"f13", L"logheight/2");
|
||||
add(L"f14", L"?f13 +?f10 -0");
|
||||
add(L"f15", L"?f5 *sin(pi*(?f1 )/10800000)");
|
||||
add(L"f16", L"?f7 *cos(pi*(?f1 )/10800000)");
|
||||
add(L"f17", L"?f5 *(cos(atan2(?f15 ,?f16 )))");
|
||||
add(L"f18", L"?f7 *(sin(atan2(?f15 ,?f16 )))");
|
||||
add(L"f19", L"?f11 +?f17 -0");
|
||||
add(L"f20", L"?f13 +?f18 -0");
|
||||
add(L"f21", L"?f5 *cos(pi*(2700000)/10800000)");
|
||||
add(L"f22", L"?f7 *sin(pi*(2700000)/10800000)");
|
||||
add(L"f23", L"?f11 +0-?f21 ");
|
||||
add(L"f24", L"?f11 +?f21 -0");
|
||||
add(L"f25", L"?f13 +0-?f22 ");
|
||||
add(L"f26", L"?f13 +?f22 -0");
|
||||
add(L"f27", L"logwidth");
|
||||
add(L"f28", L"logheight");
|
||||
add(L"f29", L"(?f0 )/60000.0");
|
||||
add(L"f30", L"(?f4 )/60000.0");
|
||||
/////////////////////////////////////////////////////////
|
||||
_handle h;
|
||||
|
||||
h.position = L"?f12 ?f14";
|
||||
handles.push_back(h);
|
||||
|
||||
h.position = L"?f19 ?f20";
|
||||
handles.push_back(h);
|
||||
}
|
||||
};
|
||||
class oox_shape_BlockArc : public oox_shape
|
||||
{
|
||||
public:
|
||||
oox_shape_BlockArc()
|
||||
{
|
||||
odf_type_name =L"ooxml-blockArc";
|
||||
|
||||
enhanced_path = L"M ?f18 ?f20 G ?f7 ?f9 ?f76 ?f77 L ?f35 ?f36 G ?f25 ?f26 ?f78 ?f79 Z N";
|
||||
text_areas = L"f60 ?f68 ?f44 ?f52";
|
||||
modifiers = L"13500000 10800000 12740";
|
||||
view_box = L"0 0 0 0";
|
||||
|
||||
add(L"f0", L"if(0-$0 ,0,if(21599999-$0 ,$0 ,21599999))");
|
||||
add(L"f1", L"if(0-$1 ,0,if(21599999-$1 ,$1 ,21599999))");
|
||||
add(L"f2", L"if(0-$2 ,0,if(50000-$2 ,$2 ,50000))");
|
||||
add(L"f3", L"?f1 +0-?f0 ");
|
||||
add(L"f4", L"?f3 +21600000-0");
|
||||
add(L"f5", L"if(?f3 ,?f3 ,?f4 )");
|
||||
add(L"f6", L"0+0-?f5 ");
|
||||
add(L"f7", L"logwidth/2");
|
||||
add(L"f8", L"?f7 *sin(pi*(?f0 )/10800000)");
|
||||
add(L"f9", L"logheight/2");
|
||||
add(L"f10", L"?f9 *cos(pi*(?f0 )/10800000)");
|
||||
add(L"f11", L"?f7 *sin(pi*(?f1 )/10800000)");
|
||||
add(L"f12", L"?f9 *cos(pi*(?f1 )/10800000)");
|
||||
add(L"f13", L"?f7 *(cos(atan2(?f8 ,?f10 )))");
|
||||
add(L"f14", L"?f9 *(sin(atan2(?f8 ,?f10 )))");
|
||||
add(L"f15", L"?f7 *(cos(atan2(?f11 ,?f12 )))");
|
||||
add(L"f16", L"?f9 *(sin(atan2(?f11 ,?f12 )))");
|
||||
add(L"f17", L"logwidth/2");
|
||||
add(L"f18", L"?f17 +?f13 -0");
|
||||
add(L"f19", L"logheight/2");
|
||||
add(L"f20", L"?f19 +?f14 -0");
|
||||
add(L"f21", L"?f17 +?f15 -0");
|
||||
add(L"f22", L"?f19 +?f16 -0");
|
||||
add(L"f23", L"min(logwidth,logheight)");
|
||||
add(L"f24", L"?f23 *?f2 /100000");
|
||||
add(L"f25", L"?f7 +0-?f24 ");
|
||||
add(L"f26", L"?f9 +0-?f24 ");
|
||||
add(L"f27", L"?f25 *sin(pi*(?f1 )/10800000)");
|
||||
add(L"f28", L"?f26 *cos(pi*(?f1 )/10800000)");
|
||||
add(L"f29", L"?f25 *sin(pi*(?f0 )/10800000)");
|
||||
add(L"f30", L"?f26 *cos(pi*(?f0 )/10800000)");
|
||||
add(L"f31", L"?f25 *(cos(atan2(?f27 ,?f28 )))");
|
||||
add(L"f32", L"?f26 *(sin(atan2(?f27 ,?f28 )))");
|
||||
add(L"f33", L"?f25 *(cos(atan2(?f29 ,?f30 )))");
|
||||
add(L"f34", L"?f26 *(sin(atan2(?f29 ,?f30 )))");
|
||||
add(L"f35", L"?f17 +?f31 -0");
|
||||
add(L"f36", L"?f19 +?f32 -0");
|
||||
add(L"f37", L"?f17 +?f33 -0");
|
||||
add(L"f38", L"?f19 +?f34 -0");
|
||||
add(L"f39", L"21600000+0-?f0 ");
|
||||
add(L"f40", L"?f5 +0-?f39 ");
|
||||
add(L"f41", L"max(?f18 ,?f35 )");
|
||||
add(L"f42", L"max(?f21 ,?f37 )");
|
||||
add(L"f43", L"max(?f41 ,?f42 )");
|
||||
add(L"f44", L"if(?f40 ,logwidth,?f43 )");
|
||||
add(L"f45", L"5400000+0-?f0 ");
|
||||
add(L"f46", L"27000000+0-?f0 ");
|
||||
add(L"f47", L"if(?f45 ,?f45 ,?f46 )");
|
||||
add(L"f48", L"?f5 +0-?f47 ");
|
||||
add(L"f49", L"max(?f20 ,?f36 )");
|
||||
add(L"f50", L"max(?f22 ,?f38 )");
|
||||
add(L"f51", L"max(?f49 ,?f50 )");
|
||||
add(L"f52", L"if(?f48 ,logheight,?f51 )");
|
||||
add(L"f53", L"10800000+0-?f0 ");
|
||||
add(L"f54", L"32400000+0-?f0 ");
|
||||
add(L"f55", L"if(?f53 ,?f53 ,?f54 )");
|
||||
add(L"f56", L"?f5 +0-?f55 ");
|
||||
add(L"f57", L"min(?f18 ,?f35 )");
|
||||
add(L"f58", L"min(?f21 ,?f37 )");
|
||||
add(L"f59", L"min(?f57 ,?f58 )");
|
||||
add(L"f60", L"if(?f56 ,0,?f59 )");
|
||||
add(L"f61", L"16200000+0-?f0 ");
|
||||
add(L"f62", L"37800000+0-?f0 ");
|
||||
add(L"f63", L"if(?f61 ,?f61 ,?f62 )");
|
||||
add(L"f64", L"?f5 +0-?f63 ");
|
||||
add(L"f65", L"min(?f20 ,?f36 )");
|
||||
add(L"f66", L"min(?f22 ,?f38 )");
|
||||
add(L"f67", L"min(?f65 ,?f66 )");
|
||||
add(L"f68", L"if(?f64 ,0,?f67 )");
|
||||
add(L"f69", L"(?f18 +?f37 )/2");
|
||||
add(L"f70", L"(?f20 +?f38 )/2");
|
||||
add(L"f71", L"(?f21 +?f35 )/2");
|
||||
add(L"f72", L"(?f22 +?f36 )/2");
|
||||
add(L"f73", L"?f0 +0-5400000");
|
||||
add(L"f74", L"?f1 +5400000-0");
|
||||
add(L"f75", L"(?f73 +?f74 )/2");
|
||||
add(L"f76", L"(?f0 )/60000.0");
|
||||
add(L"f77", L"(?f5 )/60000.0");
|
||||
add(L"f78", L"(?f1 )/60000.0");
|
||||
add(L"f79", L"(?f6 )/60000.0");
|
||||
/////////////////////////////////////////////////////////
|
||||
_handle h;
|
||||
|
||||
h.position = L"?f18 ?f20";
|
||||
handles.push_back(h);
|
||||
|
||||
h.position = L"?f35 ?f36";
|
||||
h.r_minimum = L"0";
|
||||
h.r_maximum = L"50000";
|
||||
|
||||
handles.push_back(h);
|
||||
}
|
||||
};
|
||||
class oox_shape_Corner : public oox_shape
|
||||
{
|
||||
public:
|
||||
oox_shape_Corner()
|
||||
{
|
||||
odf_type_name =L"ooxml-corner";
|
||||
|
||||
enhanced_path = L"M 0 0 L ?f5 0 ?f5 ?f7 ?f13 ?f7 ?f13 ?f15 0 ?f15 Z N";
|
||||
text_areas = L"0 ?f11 ?f12 ?f15";
|
||||
view_box = L"0 0 0 0";
|
||||
modifiers = L"16120 16110";
|
||||
|
||||
add(L"f0", L"min(logwidth,logheight)");
|
||||
add(L"f1", L"100000*logheight/?f0 ");
|
||||
add(L"f2", L"100000*logwidth/?f0 ");
|
||||
add(L"f3", L"if(0-$0 ,0,if(?f1 -$0 ,$0 ,?f1 ))");
|
||||
add(L"f4", L"if(0-$1 ,0,if(?f2 -$1 ,$1 ,?f2 ))");
|
||||
add(L"f5", L"?f0 *?f4 /100000");
|
||||
add(L"f6", L"?f0 *?f3 /100000");
|
||||
add(L"f7", L"logheight+0-?f6 ");
|
||||
add(L"f8", L"?f5 *1/2");
|
||||
add(L"f9", L"(?f7 +logheight)/2");
|
||||
add(L"f10", L"logwidth+0-logheight");
|
||||
add(L"f11", L"if(?f10 ,?f7 ,0)");
|
||||
add(L"f12", L"if(?f10 ,logwidth,?f5 )");
|
||||
add(L"f13", L"logwidth");
|
||||
add(L"f14", L"logwidth/2");
|
||||
add(L"f15", L"logheight");
|
||||
add(L"f16", L"logheight/2");
|
||||
/////////////////////////////////////////////////////////
|
||||
_handle h1, h2;
|
||||
|
||||
h1.position = L"0 ?f7";
|
||||
h1.y_minimum = L"0";
|
||||
h1.y_maximum = L"?f1";
|
||||
handles.push_back(h1);
|
||||
|
||||
h2.position = L"?f5 0";
|
||||
h2.x_minimum = L"0";
|
||||
h2.x_maximum = L"?f2";
|
||||
handles.push_back(h2);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class oox_shape_Chord : public oox_shape
|
||||
{
|
||||
public:
|
||||
oox_shape_Chord()
|
||||
{
|
||||
odf_type_name =L"ooxml-chord";
|
||||
|
||||
enhanced_path = L"M ?f16 ?f18 G ?f5 ?f7 ?f31 ?f32 Z N";
|
||||
text_areas = L"?f27 ?f29 ?f28 ?f30";
|
||||
view_box = L"0 0 0 0";
|
||||
modifiers = L"1168272 9631728";
|
||||
|
||||
add(L"f0", L"if(0-$0 ,0,if(21599999-$0 ,$0 ,21599999))");
|
||||
add(L"f1", L"if(0-$1 ,0,if(21599999-$1 ,$1 ,21599999))");
|
||||
add(L"f2", L"?f1 +0-?f0 ");
|
||||
add(L"f3", L"?f2 +21600000-0");
|
||||
add(L"f4", L"if(?f2 ,?f2 ,?f3 )");
|
||||
add(L"f5", L"logwidth/2");
|
||||
add(L"f6", L"?f5 *sin(pi*(?f0 )/10800000)");
|
||||
add(L"f7", L"logheight/2");
|
||||
add(L"f8", L"?f7 *cos(pi*(?f0 )/10800000)");
|
||||
add(L"f9", L"?f5 *(cos(atan2(?f6 ,?f8 )))");
|
||||
add(L"f10", L"?f7 *(sin(atan2(?f6 ,?f8 )))");
|
||||
add(L"f11", L"?f5 *sin(pi*(?f1 )/10800000)");
|
||||
add(L"f12", L"?f7 *cos(pi*(?f1 )/10800000)");
|
||||
add(L"f13", L"?f5 *(cos(atan2(?f11 ,?f12 )))");
|
||||
add(L"f14", L"?f7 *(sin(atan2(?f11 ,?f12 )))");
|
||||
add(L"f15", L"logwidth/2");
|
||||
add(L"f16", L"?f15 +?f9 -0");
|
||||
add(L"f17", L"logheight/2");
|
||||
add(L"f18", L"?f17 +?f10 -0");
|
||||
add(L"f19", L"?f15 +?f13 -0");
|
||||
add(L"f20", L"?f17 +?f14 -0");
|
||||
add(L"f21", L"(?f16 +?f19 )/2");
|
||||
add(L"f22", L"(?f18 +?f20 )/2");
|
||||
add(L"f23", L"?f4 *1/2");
|
||||
add(L"f24", L"?f0 +?f23 -10800000");
|
||||
add(L"f25", L"?f5 *cos(pi*(2700000)/10800000)");
|
||||
add(L"f26", L"?f7 *sin(pi*(2700000)/10800000)");
|
||||
add(L"f27", L"?f15 +0-?f25 ");
|
||||
add(L"f28", L"?f15 +?f25 -0");
|
||||
add(L"f29", L"?f17 +0-?f26 ");
|
||||
add(L"f30", L"?f17 +?f26 -0");
|
||||
add(L"f31", L"(?f0 )/60000.0");
|
||||
add(L"f32", L"(?f4 )/60000.0");
|
||||
/////////////////////////////////////////////////////////
|
||||
_handle h;
|
||||
|
||||
h.position = L"?f16 ?f18";
|
||||
handles.push_back(h);
|
||||
|
||||
h.position = L"?f19 ?f20";
|
||||
handles.push_back(h);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class oox_shape_Donut : public oox_shape
|
||||
{
|
||||
public:
|
||||
oox_shape_Donut()
|
||||
{
|
||||
odf_type_name =L"ooxml-donut";
|
||||
|
||||
enhanced_path = L"M 0 ?f12 G ?f3 ?f5 ?f17 ?f18 ?f3 ?f5 ?f19 ?f20 ?f3 ?f5 ?f21 ?f22 ?f3 ?f5 ?f23 ?f24 Z M ?f2 ?f12 G ?f4 ?f6 ?f25 ?f26 ?f4 ?f6 ?f27 ?f28 ?f4 ?f6 ?f29 ?f30 ?f4 ?f6 ?f31 ?f32 Z N";
|
||||
text_areas = L"?f10 ?f13 ?f11 ?f14";
|
||||
view_box = L"0 0 0 0";
|
||||
modifiers = L"20000";
|
||||
|
||||
add(L"f0", L"if(0-$0 ,0,if(50000-$0 ,$0 ,50000))");
|
||||
add(L"f1", L"min(logwidth,logheight)");
|
||||
add(L"f2", L"?f1 *?f0 /100000");
|
||||
add(L"f3", L"logwidth/2");
|
||||
add(L"f4", L"?f3 +0-?f2 ");
|
||||
add(L"f5", L"logheight/2");
|
||||
add(L"f6", L"?f5 +0-?f2 ");
|
||||
add(L"f7", L"?f3 *cos(pi*(2700000)/10800000)");
|
||||
add(L"f8", L"?f5 *sin(pi*(2700000)/10800000)");
|
||||
add(L"f9", L"logwidth/2");
|
||||
add(L"f10", L"?f9 +0-?f7 ");
|
||||
add(L"f11", L"?f9 +?f7 -0");
|
||||
add(L"f12", L"logheight/2");
|
||||
add(L"f13", L"?f12 +0-?f8 ");
|
||||
add(L"f14", L"?f12 +?f8 -0");
|
||||
add(L"f15", L"logheight");
|
||||
add(L"f16", L"logwidth");
|
||||
add(L"f17", L"(10800000)/60000.0");
|
||||
add(L"f18", L"(5400000)/60000.0");
|
||||
add(L"f19", L"(16200000)/60000.0");
|
||||
add(L"f20", L"(5400000)/60000.0");
|
||||
add(L"f21", L"(0)/60000.0");
|
||||
add(L"f22", L"(5400000)/60000.0");
|
||||
add(L"f23", L"(5400000)/60000.0");
|
||||
add(L"f24", L"(5400000)/60000.0");
|
||||
add(L"f25", L"(10800000)/60000.0");
|
||||
add(L"f26", L"(-5400000)/60000.0");
|
||||
add(L"f27", L"(5400000)/60000.0");
|
||||
add(L"f28", L"(-5400000)/60000.0");
|
||||
add(L"f29", L"(0)/60000.0");
|
||||
add(L"f30", L"(-5400000)/60000.0");
|
||||
add(L"f31", L"(16200000)/60000.0");
|
||||
add(L"f32", L"(-5400000)/60000.0");
|
||||
/////////////////////////////////////////////////////////
|
||||
_handle h;
|
||||
|
||||
h.position = L"?f2 ?f12";
|
||||
h.r_minimum = L"0";
|
||||
h.r_maximum = L"50000";
|
||||
handles.push_back(h);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -29,4 +29,83 @@
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
//{ L"" , 7}, // shapetypeLeftRightRibbon,
|
||||
//+ shapetypeLeftRightRibbon
|
||||
namespace cpdoccore
|
||||
{
|
||||
class oox_shape_LeftRightRibbon : public oox_shape
|
||||
{
|
||||
public:
|
||||
oox_shape_LeftRightRibbon()
|
||||
{
|
||||
odf_type_name =L"ooxml-leftRightRibbon";
|
||||
|
||||
enhanced_path = L"M 0 ?f16 L ?f9 0 ?f9 ?f14 ?f23 ?f14 G ?f4 ?f22 ?f30 ?f31 ?f4 ?f22 ?f32 ?f33 L ?f10 ?f21 ?f10 ?f19 ?f28 ?f17 ?f10 ?f29 ?f10 ?f15 ?f23 ?f15 G ?f4 ?f22 ?f34 ?f35 L ?f24 ?f20 ?f9 ?f20 ?f9 ?f18 Z S N M ?f25 ?f26 G ?f4 ?f22 ?f36 ?f37 ?f4 ?f22 ?f38 ?f39 L ?f25 ?f21 Z I S N M 0 ?f16 L ?f9 0 ?f9 ?f14 ?f23 ?f14 G ?f4 ?f22 ?f40 ?f41 ?f4 ?f22 ?f42 ?f43 L ?f10 ?f21 ?f10 ?f19 ?f28 ?f17 ?f10 ?f29 ?f10 ?f15 ?f23 ?f15 G ?f4 ?f22 ?f44 ?f45 L ?f24 ?f20 ?f9 ?f20 ?f9 ?f18 Z M ?f25 ?f26 L ?f25 ?f21 M ?f24 ?f27 L ?f24 ?f20 F N";
|
||||
text_areas = L"?f9 ?f14 ?f10 ?f15";
|
||||
view_box = L"0 0 0 0";
|
||||
modifiers = L"50000 50000 16667";
|
||||
|
||||
add(L"f0", L"if(0-$2 ,0,if(33333-$2 ,$2 ,33333))");
|
||||
add(L"f1", L"100000+0-?f0 ");
|
||||
add(L"f2", L"if(0-$0 ,0,if(?f1 -$0 ,$0 ,?f1 ))");
|
||||
add(L"f3", L"logwidth/2");
|
||||
add(L"f4", L"logwidth/32");
|
||||
add(L"f5", L"?f3 +0-?f4 ");
|
||||
add(L"f6", L"min(logwidth,logheight)");
|
||||
add(L"f7", L"100000*?f5 /?f6 ");
|
||||
add(L"f8", L"if(0-$1 ,0,if(?f7 -$1 ,$1 ,?f7 ))");
|
||||
add(L"f9", L"?f6 *?f8 /100000");
|
||||
add(L"f10", L"logwidth+0-?f9 ");
|
||||
add(L"f11", L"logheight*?f2 /200000");
|
||||
add(L"f12", L"logheight*?f0 /-200000");
|
||||
add(L"f13", L"logheight/2");
|
||||
add(L"f14", L"?f13 +?f12 -?f11 ");
|
||||
add(L"f15", L"?f13 +?f11 -?f12 ");
|
||||
add(L"f16", L"?f14 +?f11 -0");
|
||||
add(L"f17", L"logheight+0-?f16 ");
|
||||
add(L"f18", L"?f16 *2/1");
|
||||
add(L"f19", L"logheight+0-?f18 ");
|
||||
add(L"f20", L"?f18 +0-?f14 ");
|
||||
add(L"f21", L"logheight+0-?f20 ");
|
||||
add(L"f22", L"?f0 *?f6 /400000");
|
||||
add(L"f23", L"logwidth/2");
|
||||
add(L"f24", L"?f23 +0-?f4 ");
|
||||
add(L"f25", L"?f23 +?f4 -0");
|
||||
add(L"f26", L"?f14 +?f22 -0");
|
||||
add(L"f27", L"?f21 +0-?f22 ");
|
||||
add(L"f28", L"logwidth");
|
||||
add(L"f29", L"logheight");
|
||||
add(L"f30", L"(16200000)/60000.0");
|
||||
add(L"f31", L"(10800000)/60000.0");
|
||||
add(L"f32", L"(16200000)/60000.0");
|
||||
add(L"f33", L"(-10800000)/60000.0");
|
||||
add(L"f34", L"(5400000)/60000.0");
|
||||
add(L"f35", L"(5400000)/60000.0");
|
||||
add(L"f36", L"(0)/60000.0");
|
||||
add(L"f37", L"(5400000)/60000.0");
|
||||
add(L"f38", L"(16200000)/60000.0");
|
||||
add(L"f39", L"(-10800000)/60000.0");
|
||||
add(L"f40", L"(16200000)/60000.0");
|
||||
add(L"f41", L"(10800000)/60000.0");
|
||||
add(L"f42", L"(16200000)/60000.0");
|
||||
add(L"f43", L"(-10800000)/60000.0");
|
||||
add(L"f44", L"(5400000)/60000.0");
|
||||
add(L"f45", L"(5400000)/60000.0");
|
||||
/////////////////////////////////////////////////////////
|
||||
_handle h1, h2, h3;
|
||||
h1.position = L"??f10 ?f21";
|
||||
h1.y_maximum= L"?f1";
|
||||
h1.y_minimum= L"0";
|
||||
handles.push_back(h1);
|
||||
|
||||
h2.position = L"?f9 0";
|
||||
h2.x_maximum= L"?f7";
|
||||
h2.x_minimum= L"0";
|
||||
handles.push_back(h2);
|
||||
|
||||
h3.position = L"?f25 ?f21";
|
||||
h3.y_maximum= L"33333";
|
||||
h3.y_minimum= L"0";
|
||||
handles.push_back(h3);
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -67,30 +67,41 @@ public:
|
||||
odf_type_name =L"ooxml-snip2DiagRect";
|
||||
|
||||
modifiers = L"0 16667";
|
||||
enhanced_path = L"M ?f9 ?f2 L ?f13 ?f2 ?f1 ?f12 ?f1 ?f11 ?f10 ?f3 ?f12 ?f3 ?f0 ?f14 ?f0 ?f9 Z N";
|
||||
text_areas = L"?f17 ?f17 ?f18 ?f19";
|
||||
view_box = L"0 0 21600 21600";
|
||||
enhanced_path = L"M ?f3 0 L ?f7 0 ?f14 ?f6 ?f14 ?f5 ?f4 ?f17 ?f6 ?f17 0 ?f8 0 ?f3 Z N";
|
||||
text_areas = L"?f11 ?f11 ?f12 ?f13";
|
||||
view_box = L"0 0 0 0";
|
||||
|
||||
add(L"f0", L"left");
|
||||
add(L"f1", L"right");
|
||||
add(L"f2", L"top");
|
||||
add(L"f3", L"bottom");
|
||||
add(L"f4", L"?f3 - ?f2");
|
||||
add(L"f5", L"?f1 - ?f0");
|
||||
add(L"f6", L"min(?f5, ?f4)");
|
||||
add(L"f7", L"$0");
|
||||
add(L"f8", L"$1");
|
||||
add(L"f9", L"?f6 * ?f7 / 100000");
|
||||
add(L"f10", L"?f1 - ?f9");
|
||||
add(L"f11", L"?f3 - ?f9");
|
||||
add(L"f12", L"?f6 * ?f8 / 100000");
|
||||
add(L"f13", L"?f1 - ?f12");
|
||||
add(L"f14", L"?f3 - ?f12");
|
||||
add(L"f15", L"?f9 - ?f12");
|
||||
add(L"f16", L"if(?f15, ?f9, ?f12)");
|
||||
add(L"f17", L"?f16 / 2");
|
||||
add(L"f18", L"?f1 - ?f17");
|
||||
add(L"f19", L"?f3 - ?f17");
|
||||
add(L"f0", L"if(0-$0 ,0,if(50000-$0 ,$0 ,50000))");
|
||||
add(L"f1", L"if(0-$1 ,0,if(50000-$1 ,$1 ,50000))");
|
||||
add(L"f2", L"min(logwidth,logheight)");
|
||||
add(L"f3", L"?f2 *?f0 /100000");
|
||||
add(L"f4", L"logwidth+0-?f3 ");
|
||||
add(L"f5", L"logheight+0-?f3 ");
|
||||
add(L"f6", L"?f2 *?f1 /100000");
|
||||
add(L"f7", L"logwidth+0-?f6 ");
|
||||
add(L"f8", L"logheight+0-?f6 ");
|
||||
add(L"f9", L"?f3 +0-?f6 ");
|
||||
add(L"f10", L"if(?f9 ,?f3 ,?f6 )");
|
||||
add(L"f11", L"?f10 *1/2");
|
||||
add(L"f12", L"logwidth+0-?f11 ");
|
||||
add(L"f13", L"logheight+0-?f11 ");
|
||||
add(L"f14", L"logwidth");
|
||||
add(L"f15", L"logheight/2");
|
||||
add(L"f16", L"logwidth/2");
|
||||
add(L"f17", L"logheight");
|
||||
|
||||
_handle h;
|
||||
|
||||
h.position = L"?f3 0";
|
||||
h.x_maximum= L"50000";
|
||||
h.x_minimum= L"0";
|
||||
handles.push_back(h);
|
||||
|
||||
h.position = L"?f7 0";
|
||||
h.x_maximum= L"50000";
|
||||
h.x_minimum= L"0";
|
||||
handles.push_back(h);
|
||||
|
||||
}
|
||||
};
|
||||
class oox_shape_snip2SameRect : public oox_shape
|
||||
|
||||
@ -289,7 +289,15 @@ office_element_ptr odf_conversion_context::start_tabs()
|
||||
create_element(L"style", L"tab-stops", temporary_.elm, this,true);
|
||||
return temporary_.elm;
|
||||
}
|
||||
std::wstring odf_conversion_context::add_image(const std::wstring & image_file_name)
|
||||
{
|
||||
if (image_file_name.empty()) return L"";
|
||||
|
||||
std::wstring odf_ref_name ;
|
||||
mediaitems()->add_or_find(image_file_name,_mediaitems::typeImage, odf_ref_name);
|
||||
|
||||
return odf_ref_name;
|
||||
}
|
||||
void odf_conversion_context::add_tab(_CP_OPT(int) type, _CP_OPT(length) _length, _CP_OPT(int) leader)
|
||||
{
|
||||
if (!temporary_.elm) return;
|
||||
|
||||
@ -95,7 +95,7 @@ public:
|
||||
virtual void start_text_context() = 0;
|
||||
virtual void end_text_context() = 0;
|
||||
|
||||
virtual void start_image(const std::wstring & image_file_name) = 0;
|
||||
std::wstring add_image(const std::wstring & image_file_name);
|
||||
|
||||
virtual odf_style_context * styles_context();
|
||||
|
||||
|
||||
@ -317,6 +317,11 @@ void odf_drawing_context::set_presentation (bool bMaster)
|
||||
impl_->is_presentation_ = bMaster;
|
||||
}
|
||||
|
||||
_CP_OPT(bool) odf_drawing_context::get_presentation ()
|
||||
{
|
||||
return impl_->is_presentation_;
|
||||
}
|
||||
|
||||
void odf_drawing_context::set_footer_state(bool Val)
|
||||
{
|
||||
impl_->is_footer_ = Val;
|
||||
@ -331,6 +336,7 @@ void odf_drawing_context::set_background_state(bool Val)
|
||||
impl_->is_background_ = Val;
|
||||
|
||||
impl_->current_graphic_properties = new graphic_format_properties();
|
||||
start_area_properties();
|
||||
}
|
||||
|
||||
void odf_drawing_context::check_anchor()
|
||||
@ -347,6 +353,10 @@ void odf_drawing_context::check_anchor()
|
||||
set_vertical_pos(0);
|
||||
}
|
||||
}
|
||||
int odf_drawing_context::get_group_level()
|
||||
{
|
||||
return impl_->current_level_.size();
|
||||
}
|
||||
void odf_drawing_context::start_group()
|
||||
{
|
||||
office_element_ptr group_elm = impl_->create_draw_element(5000);
|
||||
@ -468,6 +478,7 @@ void odf_drawing_context::start_drawing()
|
||||
}
|
||||
void odf_drawing_context::end_drawing_background(odf_types::common_draw_fill_attlist & common_draw_attlist)
|
||||
{
|
||||
end_area_properties();
|
||||
if (impl_->current_drawing_state_.elements_.empty() == false) return;
|
||||
|
||||
if (!impl_->is_background_ || !impl_->current_graphic_properties) return;
|
||||
@ -486,19 +497,23 @@ void odf_drawing_context::end_drawing()
|
||||
draw_base* draw = dynamic_cast<draw_base*>(impl_->current_drawing_state_.elements_[0].elm.get());
|
||||
if (draw)
|
||||
{
|
||||
if (impl_->is_presentation_)
|
||||
if (impl_->current_drawing_state_.presentation_class_ || impl_->current_drawing_state_.presentation_placeholder_)
|
||||
{
|
||||
_CP_OPT(std::wstring) draw_layer;
|
||||
if (impl_->is_presentation_.get() == true)
|
||||
{//master
|
||||
if (impl_->current_drawing_state_.presentation_class_)
|
||||
draw_layer = L"backgroundobjects";
|
||||
else draw_layer = L"layout";
|
||||
draw_layer = L"backgroundobjects";
|
||||
|
||||
if (!impl_->current_drawing_state_.presentation_class_)
|
||||
impl_->current_drawing_state_.presentation_class_ = presentation_class::outline;
|
||||
|
||||
draw->common_draw_attlists_.shape_with_text_and_styles_.common_presentation_attlist_.presentation_user_transformed_ = true;
|
||||
draw->common_draw_attlists_.shape_with_text_and_styles_.common_presentation_attlist_.presentation_placeholder_ = false;
|
||||
}
|
||||
else
|
||||
{//slide
|
||||
if (impl_->current_drawing_state_.presentation_class_)
|
||||
draw_layer = L"layout";
|
||||
draw_layer = L"layout";
|
||||
}
|
||||
draw->common_draw_attlists_.shape_with_text_and_styles_.common_presentation_attlist_.presentation_class_ = impl_->current_drawing_state_.presentation_class_;
|
||||
draw->common_draw_attlists_.shape_with_text_and_styles_.common_shape_draw_attlist_.draw_layer_ = draw_layer;
|
||||
@ -696,7 +711,10 @@ void odf_drawing_context::Impl::create_draw_base(int type)
|
||||
draw_base* draw = dynamic_cast<draw_base*>(draw_elm.get());
|
||||
if (draw == NULL)return;
|
||||
//////////
|
||||
styles_context_->create_style(L"", style_family::Graphic, true, false, -1);
|
||||
if (is_presentation_ && current_drawing_state_.presentation_class_)
|
||||
styles_context_->create_style(L"", style_family::Presentation, true, false, -1);
|
||||
else
|
||||
styles_context_->create_style(L"", style_family::Graphic, true, false, -1);
|
||||
|
||||
office_element_ptr & style_shape_elm = styles_context_->last_state()->get_office_element();
|
||||
std::wstring style_name;
|
||||
@ -708,7 +726,10 @@ void odf_drawing_context::Impl::create_draw_base(int type)
|
||||
current_graphic_properties = style_->content_.get_graphic_properties();
|
||||
}
|
||||
|
||||
draw->common_draw_attlists_.shape_with_text_and_styles_.common_shape_draw_attlist_.draw_style_name_ = style_name;
|
||||
if (is_presentation_ && current_drawing_state_.presentation_class_)
|
||||
draw->common_draw_attlists_.shape_with_text_and_styles_.common_presentation_attlist_.presentation_style_name_ = style_name;
|
||||
else
|
||||
draw->common_draw_attlists_.shape_with_text_and_styles_.common_shape_draw_attlist_.draw_style_name_ = style_name;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
int level = current_level_.size();
|
||||
@ -832,7 +853,7 @@ void odf_drawing_context::end_shape()
|
||||
draw_path* path = dynamic_cast<draw_path*>(impl_->current_drawing_state_.elements_[0].elm.get());
|
||||
if (path)
|
||||
{
|
||||
if (impl_->current_drawing_state_.view_box_.length() < 1 && impl_->current_drawing_state_.svg_width_ && impl_->current_drawing_state_.svg_height_)
|
||||
if (impl_->current_drawing_state_.view_box_.empty() && impl_->current_drawing_state_.svg_width_ && impl_->current_drawing_state_.svg_height_)
|
||||
set_viewBox( impl_->current_drawing_state_.svg_width_->get_value_unit(length::cm) * 1000,
|
||||
impl_->current_drawing_state_.svg_height_->get_value_unit(length::cm) *1000);
|
||||
|
||||
@ -941,7 +962,11 @@ void odf_drawing_context::end_shape()
|
||||
|
||||
if (shape_define)
|
||||
{
|
||||
enhanced->svg_viewbox_ = shape_define->view_box;
|
||||
if (impl_->current_drawing_state_.oox_shape_ && impl_->current_drawing_state_.oox_shape_->view_box)
|
||||
enhanced->svg_viewbox_ = impl_->current_drawing_state_.oox_shape_->view_box;
|
||||
else
|
||||
enhanced->svg_viewbox_ = shape_define->view_box;
|
||||
|
||||
enhanced->draw_enhanced_geometry_attlist_.draw_type_ = shape_define->odf_type_name;
|
||||
enhanced->draw_enhanced_geometry_attlist_.draw_text_areas_ = shape_define->text_areas;
|
||||
|
||||
@ -987,6 +1012,9 @@ void odf_drawing_context::end_shape()
|
||||
if (shape_define->handles[i].y_maximum) h->draw_handle_attlist_.draw_handle_range_y_maximum_ = *shape_define->handles[i].y_maximum;
|
||||
if (shape_define->handles[i].x_minimum) h->draw_handle_attlist_.draw_handle_range_x_minimum_ = *shape_define->handles[i].x_minimum;
|
||||
if (shape_define->handles[i].x_maximum) h->draw_handle_attlist_.draw_handle_range_x_maximum_ = *shape_define->handles[i].x_maximum;
|
||||
|
||||
if (shape_define->handles[i].r_maximum) h->draw_handle_attlist_.draw_handle_radius_range_maximum_ = *shape_define->handles[i].r_maximum;
|
||||
if (shape_define->handles[i].r_minimum) h->draw_handle_attlist_.draw_handle_radius_range_minimum_ = *shape_define->handles[i].r_minimum;
|
||||
}
|
||||
end_element();
|
||||
}
|
||||
@ -1135,7 +1163,6 @@ void odf_drawing_context::set_hidden (bool bVal)
|
||||
void odf_drawing_context::set_opacity(double percent_)
|
||||
{
|
||||
if (!impl_->current_graphic_properties)return;
|
||||
if (percent_ < 0.01) return;
|
||||
|
||||
switch(impl_->current_drawing_part_)
|
||||
{
|
||||
@ -1169,22 +1196,26 @@ void odf_drawing_context::set_shadow(int type, std::wstring hexColor, _CP_OPT(do
|
||||
|
||||
void odf_drawing_context::set_placeholder_id (std::wstring val)
|
||||
{
|
||||
if (!impl_->is_presentation_) return;
|
||||
|
||||
impl_->current_drawing_state_.presentation_placeholder_ = val;
|
||||
}
|
||||
void odf_drawing_context::set_placeholder_type (int val)
|
||||
{
|
||||
if (!impl_->is_presentation_) return;
|
||||
|
||||
switch(val)
|
||||
{
|
||||
case 0: impl_->current_drawing_state_.presentation_class_ = presentation_class::text; break;
|
||||
case 1: impl_->current_drawing_state_.presentation_class_ = presentation_class::chart; break;
|
||||
case 0: impl_->current_drawing_state_.presentation_class_ = presentation_class::outline; break;
|
||||
case 1: impl_->current_drawing_state_.presentation_class_ = presentation_class::chart; break;
|
||||
case 2: impl_->current_drawing_state_.presentation_class_ = presentation_class::graphic; break;
|
||||
case 3: impl_->current_drawing_state_.presentation_class_ = presentation_class::title; break;
|
||||
case 4: impl_->current_drawing_state_.presentation_class_ = presentation_class::graphic; break;
|
||||
case 5: impl_->current_drawing_state_.presentation_class_ = presentation_class::date_time; break;
|
||||
case 6: impl_->current_drawing_state_.presentation_class_ = presentation_class::footer; break;
|
||||
case 7: impl_->current_drawing_state_.presentation_class_ = presentation_class::header; break;
|
||||
case 8: impl_->current_drawing_state_.presentation_class_ = presentation_class::object; break;
|
||||
case 9: impl_->current_drawing_state_.presentation_class_ = presentation_class::object; break;
|
||||
case 6: impl_->current_drawing_state_.presentation_class_ = presentation_class::footer; break;
|
||||
case 7: impl_->current_drawing_state_.presentation_class_ = presentation_class::header; break;
|
||||
case 8: impl_->current_drawing_state_.presentation_class_ = presentation_class::object; break;
|
||||
case 9: impl_->current_drawing_state_.presentation_class_ = presentation_class::object; break;
|
||||
case 10: impl_->current_drawing_state_.presentation_class_ = presentation_class::graphic; break;
|
||||
case 11: impl_->current_drawing_state_.presentation_class_ = presentation_class::graphic; break;
|
||||
case 12: impl_->current_drawing_state_.presentation_class_ = presentation_class::page_number;break;
|
||||
@ -1192,7 +1223,7 @@ void odf_drawing_context::set_placeholder_type (int val)
|
||||
case 14: impl_->current_drawing_state_.presentation_class_ = presentation_class::table; break;
|
||||
case 15: impl_->current_drawing_state_.presentation_class_ = presentation_class::title; break;
|
||||
default:
|
||||
impl_->current_drawing_state_.presentation_class_ = presentation_class::text; break;
|
||||
impl_->current_drawing_state_.presentation_class_ = presentation_class::outline; break;
|
||||
}
|
||||
//todooo draw_layer for master for sldnum, datetime ...
|
||||
}
|
||||
@ -1239,7 +1270,8 @@ _CP_OPT(odf_types::color) odf_drawing_context::get_line_color()
|
||||
}
|
||||
void odf_drawing_context::set_solid_fill(std::wstring hexColor)
|
||||
{
|
||||
if (!impl_->current_graphic_properties)return;
|
||||
if (!impl_->current_graphic_properties) return;
|
||||
if (hexColor.empty()) return;
|
||||
|
||||
int res = 0;
|
||||
if ((res = hexColor.find(L"#")) < 0) hexColor = std::wstring(L"#") + hexColor;
|
||||
@ -1248,7 +1280,7 @@ void odf_drawing_context::set_solid_fill(std::wstring hexColor)
|
||||
{
|
||||
case Area:
|
||||
impl_->current_graphic_properties->common_draw_fill_attlist_.draw_fill_color_ = hexColor;
|
||||
impl_->current_graphic_properties->common_background_color_attlist_.fo_background_color_ = color(hexColor);
|
||||
//impl_->current_graphic_properties->common_background_color_attlist_.fo_background_color_ = color(hexColor); - default transparent
|
||||
//последнее нужно - что если будут вводить текст - под текстом будет цвет фона (или он поменяется в полях текста)
|
||||
|
||||
if ((impl_->is_footer_ || impl_->is_header_ || impl_->is_background_) &&
|
||||
@ -1488,6 +1520,8 @@ void odf_drawing_context::set_viewBox (double W, double H)
|
||||
|
||||
if (impl_->current_drawing_state_.oox_shape_)
|
||||
{
|
||||
impl_->current_drawing_state_.oox_shape_->view_box = impl_->current_drawing_state_.view_box_;
|
||||
|
||||
if (impl_->current_drawing_state_.oox_shape_->sub_view_size)
|
||||
impl_->current_drawing_state_.oox_shape_->sub_view_size = *impl_->current_drawing_state_.oox_shape_->sub_view_size + L" " + std::to_wstring((int)W) + L" " + std::to_wstring((int)H);
|
||||
else
|
||||
@ -1730,8 +1764,8 @@ void odf_drawing_context::set_group_position(_CP_OPT(double) x, _CP_OPT(double)
|
||||
impl_->current_group_->x = *change_x ;
|
||||
impl_->current_group_->y = *change_y ;
|
||||
|
||||
impl_->current_group_->shift_x = (*x - *change_x) ;
|
||||
impl_->current_group_->shift_y = (*y - *change_y) ;
|
||||
impl_->current_group_->shift_x = (*x /impl_->current_group_->scale_cx - *change_x) ;
|
||||
impl_->current_group_->shift_y = (*y /impl_->current_group_->scale_cy - *change_y) ;
|
||||
}
|
||||
|
||||
void odf_drawing_context::set_group_size( _CP_OPT(double) cx, _CP_OPT(double) cy, _CP_OPT(double) change_cx, _CP_OPT(double) change_cy)
|
||||
@ -1980,7 +2014,7 @@ std::wstring odf_drawing_context::add_marker_style(int type)
|
||||
{
|
||||
if (type == 2) return L"";
|
||||
|
||||
std::wstring str_types [] = {L"ArrowMarker", L"DiamondMarker", L"None", L"OvalMarker", L"StealthMarker", L"TriangleMarker"};
|
||||
std::wstring str_types [] = {L"None", L"ArrowMarker", L"DiamondMarker", L"OvalMarker", L"StealthMarker", L"TriangleMarker"};
|
||||
|
||||
style * style_=NULL;
|
||||
if (impl_->styles_context_->find_odf_style(str_types[type],style_family::Marker,style_)) return str_types[type];
|
||||
@ -2001,7 +2035,7 @@ std::wstring odf_drawing_context::add_marker_style(int type)
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
marker->svg_d_ = L"M0 564l564 567 567-567-567-564z";
|
||||
marker->svg_viewBox_ = L"0 0 1131 1131";
|
||||
break;
|
||||
@ -2017,7 +2051,7 @@ std::wstring odf_drawing_context::add_marker_style(int type)
|
||||
marker->svg_d_ = L"M1321 3493h-1321l702-3493z";
|
||||
marker->svg_viewBox_ = L"0 0 1321 3493";
|
||||
break;
|
||||
case 0:
|
||||
case 1:
|
||||
default:
|
||||
marker->svg_d_ =L"M0 2108v17 17l12 42 30 34 38 21 43 4 29-8 30-21 25-26 13-34 343-1532 339 1520 13 42 29 34 39 21 42 4 42-12 34-30 21-42v-39-12l-4 4-440-1998-9-42-25-39-38-25-43-8-42 8-38 25-26 39-8 42z";
|
||||
marker->svg_viewBox_ = L"0 0 1122 2243";
|
||||
@ -2081,17 +2115,15 @@ void odf_drawing_context::set_textarea_wrap(bool Val)
|
||||
impl_->current_graphic_properties->fo_wrap_option_ = wrap_option(wrap_option::NoWrap);
|
||||
|
||||
}
|
||||
|
||||
void odf_drawing_context::set_textarea_font(std::wstring & latin, std::wstring & cs, std::wstring & ea)
|
||||
{
|
||||
if (impl_->current_drawing_state_.elements_.empty())return;
|
||||
|
||||
if (!impl_->current_text_properties)
|
||||
odf_style_state_ptr style_state = impl_->styles_context_->last_state(style_family::Paragraph);
|
||||
if (style_state)
|
||||
{
|
||||
odf_style_state_ptr style_state = impl_->styles_context_->last_state(style_family::Paragraph);
|
||||
if (style_state)
|
||||
{
|
||||
impl_->current_text_properties = style_state->get_text_properties();
|
||||
}
|
||||
impl_->current_text_properties = style_state->get_text_properties();
|
||||
}
|
||||
|
||||
if (!impl_->current_text_properties) return;
|
||||
@ -2105,13 +2137,10 @@ void odf_drawing_context::set_textarea_fontcolor(std::wstring hexColor)
|
||||
{
|
||||
if (impl_->current_drawing_state_.elements_.empty())return;
|
||||
|
||||
if (!impl_->current_text_properties)
|
||||
odf_style_state_ptr style_state = impl_->styles_context_->last_state(style_family::Paragraph);
|
||||
if (style_state)
|
||||
{
|
||||
odf_style_state_ptr style_state = impl_->styles_context_->last_state(style_family::Paragraph);
|
||||
if (style_state)
|
||||
{
|
||||
impl_->current_text_properties = style_state->get_text_properties();
|
||||
}
|
||||
impl_->current_text_properties = style_state->get_text_properties();
|
||||
}
|
||||
|
||||
if (!impl_->current_text_properties) return;
|
||||
@ -2156,27 +2185,47 @@ void odf_drawing_context::set_textarea_writing_mode(int mode)
|
||||
paragraph_properties = style_->content_.get_style_paragraph_properties();
|
||||
}
|
||||
}
|
||||
if (paragraph_properties == NULL && impl_->current_paragraph_properties == NULL)return;
|
||||
|
||||
switch(mode)
|
||||
if (paragraph_properties)
|
||||
{
|
||||
case 5://textverticaltypeWordArtVert:
|
||||
case 6://textverticaltypeWordArtVertRtl:
|
||||
case 4://SimpleTypes::textverticaltypeVert270: //нужно отзеркалить по горизонтали текст
|
||||
case 3://SimpleTypes::textverticaltypeVert:
|
||||
case 2://SimpleTypes::textverticaltypeMongolianVert:
|
||||
paragraph_properties->content_.style_writing_mode_ = odf_types::writing_mode(odf_types::writing_mode::TbRl);
|
||||
impl_->current_paragraph_properties->content_.style_writing_mode_ = odf_types::writing_mode(odf_types::writing_mode::TbRl);
|
||||
break;
|
||||
case 0://SimpleTypes::textverticaltypeEaVert:
|
||||
paragraph_properties->content_.style_writing_mode_ = odf_types::writing_mode(odf_types::writing_mode::TbRl);
|
||||
impl_->current_paragraph_properties->content_.style_writing_mode_ = odf_types::writing_mode(odf_types::writing_mode::TbRl);
|
||||
break;
|
||||
case 1://SimpleTypes::textverticaltypeHorz:
|
||||
default:
|
||||
paragraph_properties->content_.style_writing_mode_ = odf_types::writing_mode(odf_types::writing_mode::LrTb);
|
||||
impl_->current_paragraph_properties->content_.style_writing_mode_ = odf_types::writing_mode(odf_types::writing_mode::LrTb);
|
||||
break;
|
||||
switch(mode)
|
||||
{
|
||||
case 5://textverticaltypeWordArtVert:
|
||||
case 6://textverticaltypeWordArtVertRtl:
|
||||
case 4://SimpleTypes::textverticaltypeVert270: //нужно отзеркалить по горизонтали текст
|
||||
case 3://SimpleTypes::textverticaltypeVert:
|
||||
case 2://SimpleTypes::textverticaltypeMongolianVert:
|
||||
|
||||
paragraph_properties->content_.style_writing_mode_ = odf_types::writing_mode(odf_types::writing_mode::TbRl);
|
||||
break;
|
||||
case 0://SimpleTypes::textverticaltypeEaVert:
|
||||
paragraph_properties->content_.style_writing_mode_ = odf_types::writing_mode(odf_types::writing_mode::TbRl);
|
||||
break;
|
||||
case 1://SimpleTypes::textverticaltypeHorz:
|
||||
default:
|
||||
paragraph_properties->content_.style_writing_mode_ = odf_types::writing_mode(odf_types::writing_mode::LrTb);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (impl_->current_paragraph_properties)
|
||||
{
|
||||
switch(mode)
|
||||
{
|
||||
case 5://textverticaltypeWordArtVert:
|
||||
case 6://textverticaltypeWordArtVertRtl:
|
||||
case 4://SimpleTypes::textverticaltypeVert270: //нужно отзеркалить по горизонтали текст
|
||||
case 3://SimpleTypes::textverticaltypeVert:
|
||||
case 2://SimpleTypes::textverticaltypeMongolianVert:
|
||||
impl_->current_paragraph_properties->content_.style_writing_mode_ = odf_types::writing_mode(odf_types::writing_mode::TbRl);
|
||||
break;
|
||||
case 0://SimpleTypes::textverticaltypeEaVert:
|
||||
impl_->current_paragraph_properties->content_.style_writing_mode_ = odf_types::writing_mode(odf_types::writing_mode::TbRl);
|
||||
break;
|
||||
case 1://SimpleTypes::textverticaltypeHorz:
|
||||
default:
|
||||
impl_->current_paragraph_properties->content_.style_writing_mode_ = odf_types::writing_mode(odf_types::writing_mode::LrTb);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
void odf_drawing_context::set_paragraph_properties(style_paragraph_properties *paragraph_properties)
|
||||
@ -2455,7 +2504,7 @@ void odf_drawing_context::set_text(odf_text_context* text_context)
|
||||
{
|
||||
if (text_context == NULL || impl_->current_level_.size() < 1 ) return;
|
||||
|
||||
if (impl_->is_presentation_ && *impl_->is_presentation_) return;
|
||||
//if (impl_->is_presentation_ && *impl_->is_presentation_) return;
|
||||
|
||||
for (size_t i = 0; i < text_context->text_elements_list_.size(); i++)
|
||||
{
|
||||
|
||||
@ -60,7 +60,8 @@ public:
|
||||
odf_drawing_context (odf_conversion_context *odf_context);
|
||||
~odf_drawing_context ();
|
||||
|
||||
void set_presentation (bool bMaster);
|
||||
void set_presentation (bool bMaster);
|
||||
_CP_OPT(bool) get_presentation ();
|
||||
|
||||
void set_drawings_rect (_CP_OPT(double) x_pt, _CP_OPT(double) y_pt, _CP_OPT(double) width_pt, _CP_OPT(double) height_pt);
|
||||
void clear ();
|
||||
@ -103,6 +104,7 @@ public:
|
||||
void end_drawing();
|
||||
void end_drawing_background(odf_types::common_draw_fill_attlist & common_draw_attlist);
|
||||
|
||||
int get_group_level();
|
||||
void start_group();
|
||||
void set_group_flip_H (bool bVal);
|
||||
void set_group_flip_V (bool bVal);
|
||||
@ -125,7 +127,7 @@ public:
|
||||
void start_frame ();
|
||||
void end_frame ();
|
||||
|
||||
void start_image (std::wstring file_path);
|
||||
void start_image (std::wstring odf_file_path);
|
||||
void end_image ();
|
||||
|
||||
bool change_text_box_2_wordart ();
|
||||
@ -165,8 +167,6 @@ public:
|
||||
void finalize(office_element_ptr & root_elm);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
void get_position (_CP_OPT(double) & x_pt, _CP_OPT(double) & y_pt);
|
||||
void set_position (_CP_OPT(double) & x_pt, _CP_OPT(double) & y_pt);
|
||||
void set_position_line (_CP_OPT(double) & x_pt, _CP_OPT(double) & y_pt, _CP_OPT(double) & x1_pt, _CP_OPT(double) & y1_pt);
|
||||
|
||||
@ -108,7 +108,7 @@ std::wstring odf_lists_styles_context::get_style_name(int oox_style_num)
|
||||
return L"";
|
||||
}
|
||||
}
|
||||
void odf_lists_styles_context::start_style(int based_number)
|
||||
void odf_lists_styles_context::start_style(bool bMaster, int based_number)
|
||||
{
|
||||
list_format_state state;
|
||||
|
||||
@ -120,14 +120,13 @@ void odf_lists_styles_context::start_style(int based_number)
|
||||
{
|
||||
state.oox_based_number = lists_format_array_.size();
|
||||
state.odf_list_style_name = std::wstring(L"L") + boost::lexical_cast<std::wstring>(state.oox_based_number + 1);
|
||||
state.automatic = true; //document automatic style
|
||||
}
|
||||
else
|
||||
{
|
||||
state.oox_based_number = based_number;
|
||||
state.odf_list_style_name = std::wstring(L"WWNum") + boost::lexical_cast<std::wstring>(state.oox_based_number + 1);
|
||||
state.automatic = false; //office style
|
||||
}
|
||||
state.automatic = !bMaster;
|
||||
|
||||
text_list_style *style = dynamic_cast<text_list_style *>(elm.get());
|
||||
if (style == NULL)return;
|
||||
@ -560,8 +559,8 @@ void odf_lists_styles_context::set_bullet_image_size(double size)
|
||||
|
||||
if(!props) return;
|
||||
|
||||
props->fo_width_ = length(length(size,length::pt).get_value_unit(length::cm),length::cm);
|
||||
props->fo_height_ = length(length(size,length::pt).get_value_unit(length::cm),length::cm);
|
||||
props->fo_width_ = length(length(size, length::pt).get_value_unit(length::cm), length::cm);
|
||||
props->fo_height_ = length(length(size, length::pt).get_value_unit(length::cm), length::cm);
|
||||
}
|
||||
void odf_lists_styles_context::set_bullet_image (std::wstring ref)
|
||||
{
|
||||
@ -574,9 +573,9 @@ void odf_lists_styles_context::set_bullet_image (std::wstring ref)
|
||||
|
||||
style_image_->text_list_level_style_image_attr_.common_xlink_attlist_.href_ = ref;
|
||||
|
||||
style_image_->text_list_level_style_image_attr_.common_xlink_attlist_.type_= xlink_type::Simple;
|
||||
style_image_->text_list_level_style_image_attr_.common_xlink_attlist_.show_ = xlink_show::Embed;
|
||||
style_image_->text_list_level_style_image_attr_.common_xlink_attlist_.actuate_= xlink_actuate::OnLoad;
|
||||
style_image_->text_list_level_style_image_attr_.common_xlink_attlist_.type_ = xlink_type::Simple;
|
||||
style_image_->text_list_level_style_image_attr_.common_xlink_attlist_.show_ = xlink_show::Embed;
|
||||
style_image_->text_list_level_style_image_attr_.common_xlink_attlist_.actuate_ = xlink_actuate::OnLoad;
|
||||
}
|
||||
void odf_lists_styles_context::set_start_number(int val)
|
||||
{
|
||||
|
||||
@ -64,7 +64,7 @@ public:
|
||||
odf_lists_styles_context();
|
||||
void set_odf_context(odf_conversion_context * Context);
|
||||
|
||||
void start_style(int abstract_number = -1);
|
||||
void start_style(bool bMaster, int abstract_number = -1);
|
||||
int start_style_level(int level, int type);
|
||||
style_list_level_properties * get_list_level_properties();
|
||||
style_list_level_label_alignment * get_list_level_alignment_properties();
|
||||
|
||||
@ -154,13 +154,35 @@ void odf_text_context::add_text_content(const std::wstring & text)
|
||||
std::wstring last = text.substr(pos);
|
||||
if (last.length() > 0)current_level_.back().elm->add_text(last);
|
||||
}
|
||||
void odf_text_context::add_text_date(const std::wstring & text)
|
||||
{
|
||||
office_element_ptr s_elm;
|
||||
create_element(L"text", L"date", s_elm, odf_context_);
|
||||
|
||||
text_date* s = dynamic_cast<text_date*>(s_elm.get());
|
||||
if (s) s->add_text(text);
|
||||
|
||||
if (current_level_.size()>0)
|
||||
current_level_.back().elm->add_child_element(s_elm);
|
||||
}
|
||||
void odf_text_context::add_text_page_number(const std::wstring & text)
|
||||
{
|
||||
office_element_ptr s_elm;
|
||||
create_element(L"text", L"page-number", s_elm, odf_context_);
|
||||
|
||||
text_page_number* s = dynamic_cast<text_page_number*>(s_elm.get());
|
||||
if (s) s->add_text(text);
|
||||
|
||||
if (current_level_.size()>0)
|
||||
current_level_.back().elm->add_child_element(s_elm);
|
||||
}
|
||||
void odf_text_context::add_text_space(int count)
|
||||
{
|
||||
office_element_ptr s_elm;
|
||||
create_element(L"text", L"s", s_elm, odf_context_);
|
||||
|
||||
text_s* s = dynamic_cast<text_s*>(s_elm.get());
|
||||
if (s)s->text_c_ = count;
|
||||
if (s) s->text_c_ = count;
|
||||
|
||||
//необязательно хранить..
|
||||
//int level = current_level_.size();
|
||||
|
||||
@ -67,8 +67,10 @@ public:
|
||||
|
||||
void add_text_content (const std::wstring & text);
|
||||
void add_text_space (int count);
|
||||
|
||||
void set_symbol_font (const std::wstring & font);
|
||||
void add_text_date (const std::wstring & text);
|
||||
void add_text_page_number(const std::wstring & text);
|
||||
|
||||
void set_symbol_font (const std::wstring & font);
|
||||
void set_symbol_text (int sym);
|
||||
|
||||
void start_paragraph (bool styled = false);
|
||||
|
||||
@ -147,14 +147,7 @@ void odp_conversion_context::end_drawings()
|
||||
{
|
||||
current_slide().drawing_context()->clear();
|
||||
}
|
||||
void odp_conversion_context::start_image(const std::wstring & image_file_name)
|
||||
{
|
||||
std::wstring odf_ref_name ;
|
||||
|
||||
mediaitems()->add_or_find(image_file_name,_mediaitems::typeImage,odf_ref_name);
|
||||
|
||||
current_slide().drawing_context()->start_image(odf_ref_name);
|
||||
}
|
||||
void odp_conversion_context::start_comment(int oox_comm_id)
|
||||
{
|
||||
office_element_ptr comm_elm;
|
||||
|
||||
@ -72,8 +72,6 @@ public:
|
||||
void start_drawings();
|
||||
void end_drawings();
|
||||
|
||||
virtual void start_image(const std::wstring & image_file_name);
|
||||
|
||||
void start_comment (int oox_comment_id);
|
||||
void end_comment ();
|
||||
void start_comment_content ();
|
||||
|
||||
@ -527,14 +527,7 @@ void ods_conversion_context::end_drawings()
|
||||
{
|
||||
current_table().drawing_context()->clear();
|
||||
}
|
||||
void ods_conversion_context::start_image(const std::wstring & image_file_name)
|
||||
{
|
||||
std::wstring odf_ref_name ;
|
||||
|
||||
mediaitems()->add_or_find(image_file_name,_mediaitems::typeImage,odf_ref_name);
|
||||
|
||||
current_table().drawing_context()->start_image(odf_ref_name);
|
||||
}
|
||||
double ods_conversion_context::convert_symbol_width(double val)
|
||||
{
|
||||
//width = ((int)((column_width * Digit_Width + 5) / Digit_Width * 256 )) / 256.;
|
||||
|
||||
@ -101,8 +101,6 @@ public:
|
||||
void start_drawings();
|
||||
void end_drawings();
|
||||
|
||||
virtual void start_image(const std::wstring & image_file_name);
|
||||
|
||||
double convert_symbol_width(double val);
|
||||
|
||||
void add_defined_range (const std::wstring & name, const std::wstring & cell_range, int sheet_id, bool printable = false);
|
||||
|
||||
@ -163,6 +163,11 @@ odf_table_context* odt_conversion_context::table_context()
|
||||
{
|
||||
return &table_context_;
|
||||
}
|
||||
|
||||
odf_notes_context* odt_conversion_context::notes_context()
|
||||
{
|
||||
return ¬es_context_;
|
||||
}
|
||||
|
||||
odf_text_context* odt_conversion_context::text_context()
|
||||
{
|
||||
@ -266,8 +271,11 @@ void odt_conversion_context::end_drawings()
|
||||
}
|
||||
else
|
||||
{
|
||||
text_context()->start_element(elm);
|
||||
text_context()->end_element();
|
||||
if (elm)
|
||||
{
|
||||
text_context()->start_element(elm);
|
||||
text_context()->end_element();
|
||||
}
|
||||
|
||||
drawing_context()->clear();
|
||||
drawing_context_.pop_back();
|
||||
@ -915,14 +923,6 @@ void odt_conversion_context::end_change (int id, int type)
|
||||
// return (text_changes_state_.current_types.back() == 2);
|
||||
//}
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
void odt_conversion_context::start_image(const std::wstring & image_file_name)
|
||||
{
|
||||
std::wstring odf_ref_name ;
|
||||
|
||||
mediaitems()->add_or_find(image_file_name, _mediaitems::typeImage,odf_ref_name);
|
||||
|
||||
drawing_context()->start_image(odf_ref_name);
|
||||
}
|
||||
|
||||
void odt_conversion_context::start_drop_cap(style_paragraph_properties *paragraph_properties)
|
||||
{
|
||||
|
||||
@ -79,11 +79,11 @@ public:
|
||||
odf_comment_context * comment_context();
|
||||
odf_table_context * table_context();
|
||||
|
||||
odf_notes_context * notes_context();
|
||||
void start_drawings ();
|
||||
void end_drawings ();
|
||||
|
||||
virtual void start_image(const std::wstring & image_file_name);
|
||||
void add_text_content (const std::wstring & text);
|
||||
void add_text_content (const std::wstring & text);
|
||||
|
||||
void start_paragraph (bool styled = false);
|
||||
void end_paragraph ();
|
||||
|
||||
@ -53,7 +53,6 @@ namespace cpdoccore
|
||||
oox_shape::oox_shape()
|
||||
{
|
||||
odf_type_name = L"ooxml-non-primitive";
|
||||
view_box = L"0 0 0 0";
|
||||
}
|
||||
|
||||
oox_shape_ptr oox_shape::create(int ooxPrstGeomType)
|
||||
@ -61,6 +60,7 @@ oox_shape_ptr oox_shape::create(int ooxPrstGeomType)
|
||||
switch (ooxPrstGeomType)
|
||||
{
|
||||
case SimpleTypes::shapetypeMathMultiply: return boost::make_shared<oox_shape_mathMultiply>();
|
||||
case SimpleTypes::shapetypeMathEqual: return boost::make_shared<oox_shape_mathEqual>();
|
||||
case SimpleTypes::shapetypeSun: return boost::make_shared<oox_shape_sun>();
|
||||
case SimpleTypes::shapetypeRound1Rect: return boost::make_shared<oox_shape_round1Rect>();
|
||||
case SimpleTypes::shapetypeRound2DiagRect: return boost::make_shared<oox_shape_round2DiagRect>();
|
||||
@ -82,11 +82,17 @@ oox_shape_ptr oox_shape::create(int ooxPrstGeomType)
|
||||
case SimpleTypes::shapetypeCurvedLeftArrow: return boost::make_shared<oox_shape_curvedLeftArrow>();
|
||||
case SimpleTypes::shapetypeCurvedDownArrow: return boost::make_shared<oox_shape_curvedDownArrow>();
|
||||
case SimpleTypes::shapetypeLeftCircularArrow: return boost::make_shared<oox_shape_LeftCircularArrow>();
|
||||
case SimpleTypes::shapetypeSwooshArrow: return boost::make_shared<oox_shape_SwooshArrow>();
|
||||
case SimpleTypes::shapetypeBlockArc: return boost::make_shared<oox_shape_BlockArc>();
|
||||
case SimpleTypes::shapetypeCorner: return boost::make_shared<oox_shape_Corner>();
|
||||
case SimpleTypes::shapetypeChord: return boost::make_shared<oox_shape_Chord>();
|
||||
|
||||
case SimpleTypes::shapetypePlaque: return boost::make_shared<oox_shape_Plaque>();
|
||||
case SimpleTypes::shapetypeDoubleWave: return boost::make_shared<oox_shape_DoubleWave>();
|
||||
case SimpleTypes::shapetypePieWedge: return boost::make_shared<oox_shape_PieWedge>();
|
||||
|
||||
case SimpleTypes::shapetypePie: return boost::make_shared<oox_shape_Pie>();
|
||||
case SimpleTypes::shapetypeDonut: return boost::make_shared<oox_shape_Donut>();
|
||||
case SimpleTypes::shapetypeLeftRightRibbon: return boost::make_shared<oox_shape_LeftRightRibbon>();
|
||||
|
||||
|
||||
//case (2001 + SimpleTypes::textshapetypeTextArchDown):
|
||||
|
||||
@ -64,6 +64,8 @@ namespace cpdoccore
|
||||
_CP_OPT(std::wstring) y_maximum;
|
||||
_CP_OPT(std::wstring) x_minimum;
|
||||
_CP_OPT(std::wstring) x_maximum;
|
||||
_CP_OPT(std::wstring) r_minimum;
|
||||
_CP_OPT(std::wstring) r_maximum;
|
||||
};
|
||||
|
||||
void add(std::wstring name,std::wstring frmla)
|
||||
@ -78,7 +80,8 @@ namespace cpdoccore
|
||||
std::wstring enhanced_path;
|
||||
std::wstring modifiers;
|
||||
std::wstring text_areas;
|
||||
std::wstring view_box;
|
||||
|
||||
_CP_OPT(std::wstring) view_box;
|
||||
_CP_OPT(std::wstring) sub_view_size;
|
||||
_CP_OPT(std::wstring) glue_points;
|
||||
|
||||
|
||||
@ -207,6 +207,8 @@ void text_list::create_child_element(const std::wstring & Ns, const std::wstring
|
||||
}
|
||||
void text_list::add_child_element( const office_element_ptr & child_element)
|
||||
{
|
||||
if (!child_element) return;
|
||||
|
||||
ElementType type = child_element->get_type();
|
||||
|
||||
if (type == typeTextListHeader)
|
||||
|
||||
@ -30,6 +30,8 @@
|
||||
*
|
||||
*/
|
||||
#include "PptxConverter.h"
|
||||
#include "DocxConverter.h"
|
||||
|
||||
#include "../utils.h"
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/DocxFormat/Diagram/DiagramDrawing.h"
|
||||
@ -96,9 +98,6 @@ void OoxConverter::convert(PPTX::Logic::GraphicFrame *oox_graphic_frame)
|
||||
{
|
||||
if (!oox_graphic_frame)return;
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
odf_context()->drawing_context()->start_drawing();
|
||||
|
||||
convert(&oox_graphic_frame->nvGraphicFramePr);
|
||||
convert(oox_graphic_frame->xfrm.GetPointer());
|
||||
|
||||
@ -124,7 +123,6 @@ void OoxConverter::convert(PPTX::Logic::GraphicFrame *oox_graphic_frame)
|
||||
{
|
||||
OoxConverter::convert(oox_graphic_frame->element.GetElem().operator->());
|
||||
}
|
||||
odf_context()->drawing_context()->end_drawing();
|
||||
}
|
||||
void OoxConverter::convert(PPTX::Logic::NvGraphicFramePr *oox_framePr)
|
||||
{
|
||||
@ -192,7 +190,6 @@ void OoxConverter::convert(PPTX::Logic::Pic *oox_picture)
|
||||
|
||||
if (type != SimpleTypes::shapetypeRect)
|
||||
{
|
||||
odf_context()->drawing_context()->start_drawing();
|
||||
odf_context()->drawing_context()->start_shape(type);
|
||||
|
||||
convert(&oox_picture->spPr, oox_picture->style.GetPointer());
|
||||
@ -203,28 +200,30 @@ void OoxConverter::convert(PPTX::Logic::Pic *oox_picture)
|
||||
odf_context()->drawing_context()->end_area_properties();
|
||||
|
||||
odf_context()->drawing_context()->end_shape();
|
||||
odf_context()->drawing_context()->end_drawing();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
std::wstring pathImage;
|
||||
std::wstring odf_ref;
|
||||
std::wstring pathImage;
|
||||
if (oox_picture->blipFill.blip.IsInit())
|
||||
{
|
||||
std::wstring sID;
|
||||
|
||||
bool bEmbedded = true;
|
||||
if (oox_picture->blipFill.blip->embed.IsInit())
|
||||
{
|
||||
sID = oox_picture->blipFill.blip->embed->get();
|
||||
std::wstring sID = oox_picture->blipFill.blip->embed->get();
|
||||
pathImage = find_link_by_id(sID, 1);
|
||||
|
||||
odf_ref = odf_context()->add_image(pathImage);
|
||||
}
|
||||
else if (oox_picture->blipFill.blip->link.IsInit())
|
||||
{
|
||||
pathImage = oox_picture->blipFill.blip->link->get();
|
||||
odf_ref = oox_picture->blipFill.blip->link->get();
|
||||
bEmbedded = false;
|
||||
}
|
||||
}
|
||||
odf_context()->drawing_context()->start_drawing();
|
||||
odf_context()->start_image(pathImage);
|
||||
|
||||
odf_context()->drawing_context()->start_image(odf_ref);
|
||||
{
|
||||
double Width = 0, Height = 0;
|
||||
_graphics_utils_::GetResolution(pathImage.c_str(), Width, Height);
|
||||
@ -251,7 +250,6 @@ void OoxConverter::convert(PPTX::Logic::Pic *oox_picture)
|
||||
|
||||
}
|
||||
odf_context()->drawing_context()->end_image();
|
||||
odf_context()->drawing_context()->end_drawing();
|
||||
}
|
||||
|
||||
void OoxConverter::convert(PPTX::Logic::SmartArt *oox_smart_art)
|
||||
@ -259,11 +257,11 @@ void OoxConverter::convert(PPTX::Logic::SmartArt *oox_smart_art)
|
||||
if (oox_smart_art == NULL) return;
|
||||
if (oox_smart_art->id_data.IsInit() == false) return;
|
||||
|
||||
oox_smart_art->LoadDrawing();
|
||||
oox_smart_art->LoadDrawing(current_document());
|
||||
|
||||
if (oox_smart_art->m_diag.IsInit())
|
||||
{
|
||||
_CP_OPT(double) x, y, width, height, cx, cy;
|
||||
_CP_OPT(double) x, y, width, height, cx = 1., cy= 1.;
|
||||
|
||||
odf_context()->drawing_context()->get_size (width, height);
|
||||
odf_context()->drawing_context()->get_position (x, y);
|
||||
@ -277,7 +275,9 @@ void OoxConverter::convert(PPTX::Logic::SmartArt *oox_smart_art)
|
||||
|
||||
for (size_t i = 0; i < oox_smart_art->m_diag->SpTreeElems.size(); i++)
|
||||
{
|
||||
convert(&oox_smart_art->m_diag->SpTreeElems[i]);
|
||||
odf_context()->drawing_context()->start_drawing();
|
||||
convert(&oox_smart_art->m_diag->SpTreeElems[i]);
|
||||
odf_context()->drawing_context()->end_drawing();
|
||||
}
|
||||
|
||||
odf_context()->drawing_context()->end_group();
|
||||
@ -358,7 +358,7 @@ void OoxConverter::convert(PPTX::Logic::GrpSpPr *oox_grpSpPr)
|
||||
|
||||
odf_context()->drawing_context()->set_group_size( cx, cy, ch_cx, ch_cy );
|
||||
|
||||
_CP_OPT(double) x, y, ch_x, ch_y;
|
||||
_CP_OPT(double) x, y, ch_x, ch_y, ext_x, ext_y;
|
||||
|
||||
if (oox_grpSpPr->xfrm->offX.IsInit())
|
||||
x = oox_grpSpPr->xfrm->offX.get() / 12700.;
|
||||
@ -370,6 +370,16 @@ void OoxConverter::convert(PPTX::Logic::GrpSpPr *oox_grpSpPr)
|
||||
if (oox_grpSpPr->xfrm->chOffY.IsInit())
|
||||
ch_y = oox_grpSpPr->xfrm->chOffY.get() / 12700.;
|
||||
|
||||
int group_level = odf_context()->drawing_context()->get_group_level();
|
||||
|
||||
odf_context()->drawing_context()->get_position(ext_x, ext_y);
|
||||
|
||||
if (ext_x && ext_y && group_level < 2)
|
||||
{
|
||||
x = ext_x;
|
||||
y = ext_y;
|
||||
}
|
||||
|
||||
odf_context()->drawing_context()->set_group_position( x, y, ch_x, ch_y );
|
||||
|
||||
if (oox_grpSpPr->xfrm->rot.IsInit())
|
||||
@ -394,7 +404,9 @@ void OoxConverter::convert(PPTX::Logic::SpTree *oox_shape_tree)
|
||||
|
||||
for (size_t i = 0; i < oox_shape_tree->SpTreeElems.size(); i++)
|
||||
{
|
||||
convert(oox_shape_tree->SpTreeElems[i].GetElem().operator->());
|
||||
odf_context()->drawing_context()->start_drawing();
|
||||
convert(oox_shape_tree->SpTreeElems[i].GetElem().operator->());
|
||||
odf_context()->drawing_context()->end_drawing();
|
||||
}
|
||||
|
||||
odf_context()->drawing_context()->end_group();
|
||||
@ -404,80 +416,112 @@ void OoxConverter::convert(PPTX::Logic::CxnSp *oox_connect)
|
||||
{
|
||||
if (oox_connect == NULL) return;
|
||||
|
||||
odf_context()->drawing_context()->start_drawing();
|
||||
|
||||
int type = SimpleTypes::shapetypeLine;
|
||||
int type = SimpleTypes::shapetypeLine;
|
||||
|
||||
if ( oox_connect->spPr.Geometry.is<PPTX::Logic::PrstGeom>() )
|
||||
{
|
||||
const PPTX::Logic::PrstGeom& prstGeom = oox_connect->spPr.Geometry.as<PPTX::Logic::PrstGeom>();
|
||||
|
||||
SimpleTypes::CShapeType<> preset;
|
||||
preset.FromString(prstGeom.prst.get());
|
||||
type = preset.GetValue();
|
||||
}
|
||||
odf_context()->drawing_context()->start_shape(type);
|
||||
if ( oox_connect->spPr.Geometry.is<PPTX::Logic::PrstGeom>() )
|
||||
{
|
||||
const PPTX::Logic::PrstGeom& prstGeom = oox_connect->spPr.Geometry.as<PPTX::Logic::PrstGeom>();
|
||||
|
||||
SimpleTypes::CShapeType<> preset;
|
||||
preset.FromString(prstGeom.prst.get());
|
||||
type = preset.GetValue();
|
||||
}
|
||||
odf_context()->drawing_context()->start_shape(type);
|
||||
|
||||
convert(&oox_connect->spPr, oox_connect->style.GetPointer());
|
||||
convert(&oox_connect->nvCxnSpPr);
|
||||
|
||||
odf_context()->drawing_context()->end_shape();
|
||||
|
||||
odf_context()->drawing_context()->end_drawing();
|
||||
}
|
||||
void OoxConverter::convert(PPTX::Logic::Shape *oox_shape)
|
||||
{
|
||||
if (oox_shape == NULL) return;
|
||||
|
||||
odf_context()->drawing_context()->start_drawing();
|
||||
_CP_OPT(bool) bMasterPresentation = odf_context()->drawing_context()->get_presentation();
|
||||
|
||||
int type = 1000; //custom
|
||||
if (oox_shape->txXfrm.IsInit())
|
||||
{
|
||||
odf_context()->drawing_context()->start_group();
|
||||
odf_context()->drawing_context()->start_drawing();
|
||||
}
|
||||
|
||||
int type = 1000; //custom
|
||||
|
||||
if (oox_shape->spPr.Geometry.is_init())
|
||||
if (oox_shape->spPr.Geometry.is_init())
|
||||
{
|
||||
if ( oox_shape->spPr.Geometry.is<PPTX::Logic::PrstGeom>() )
|
||||
{
|
||||
if ( oox_shape->spPr.Geometry.is<PPTX::Logic::PrstGeom>() )
|
||||
const PPTX::Logic::PrstGeom& prstGeom = oox_shape->spPr.Geometry.as<PPTX::Logic::PrstGeom>();
|
||||
|
||||
SimpleTypes::CShapeType<> preset;
|
||||
preset.FromString(prstGeom.prst.get());
|
||||
type = preset.GetValue();
|
||||
}
|
||||
|
||||
if (type == SimpleTypes::shapetypeRect && (oox_shape->txBody.IsInit() || oox_shape->oTextBoxShape.IsInit()))
|
||||
type = 2000;
|
||||
|
||||
if (type == 2000)
|
||||
{
|
||||
PPTX::Logic::BodyPr *bodyPr = NULL;
|
||||
if (oox_shape->txBody.IsInit()) bodyPr = oox_shape->txBody->bodyPr.GetPointer();
|
||||
else bodyPr = oox_shape->oTextBoxBodyPr.GetPointer();
|
||||
|
||||
if (bodyPr && bodyPr->fromWordArt.get_value_or(false))
|
||||
{
|
||||
const PPTX::Logic::PrstGeom& prstGeom = oox_shape->spPr.Geometry.as<PPTX::Logic::PrstGeom>();
|
||||
|
||||
SimpleTypes::CShapeType<> preset;
|
||||
preset.FromString(prstGeom.prst.get());
|
||||
type = preset.GetValue();
|
||||
}
|
||||
|
||||
if (type == SimpleTypes::shapetypeRect && oox_shape->txBody.IsInit()) type = 2000;
|
||||
|
||||
if (type == 2000 && oox_shape->txBody->bodyPr.IsInit()
|
||||
&& oox_shape->txBody->bodyPr->fromWordArt.get_value_or(false))
|
||||
{
|
||||
int wordart_type = convert(oox_shape->txBody->bodyPr->prstTxWarp.GetPointer());
|
||||
|
||||
int wordart_type = convert(bodyPr->prstTxWarp.GetPointer());
|
||||
if (wordart_type > 0) type = wordart_type;
|
||||
}
|
||||
}
|
||||
else if (oox_shape->nvSpPr.nvPr.ph.is_init())
|
||||
{
|
||||
type = 2000;
|
||||
}
|
||||
}
|
||||
else if (oox_shape->nvSpPr.nvPr.ph.is_init())
|
||||
{
|
||||
type = 2000;
|
||||
}
|
||||
|
||||
if (type < 0)return;
|
||||
if (type < 0)return;
|
||||
//-----------------------------------------------------------------------------
|
||||
odf_context()->drawing_context()->start_shape(type);
|
||||
|
||||
convert(&oox_shape->spPr, oox_shape->style.GetPointer());
|
||||
odf_context()->drawing_context()->start_shape(type);
|
||||
|
||||
convert(&oox_shape->spPr, oox_shape->style.GetPointer());
|
||||
|
||||
convert(&oox_shape->nvSpPr);
|
||||
convert(&oox_shape->nvSpPr);
|
||||
|
||||
if (oox_shape->txXfrm.IsInit() == false)
|
||||
if (oox_shape->txXfrm.IsInit() == false)
|
||||
{
|
||||
if (oox_shape->oTextBoxShape.IsInit()) //docx sdt
|
||||
{
|
||||
convert(oox_shape->txBody.GetPointer(), oox_shape->style.GetPointer());
|
||||
DocxConverter *docx_converter = dynamic_cast<DocxConverter*>(this);
|
||||
if (docx_converter)
|
||||
{
|
||||
odf_context()->start_text_context();
|
||||
|
||||
//docx_converter->convert(oox_shape->oTextBoxShape.GetPointer());
|
||||
|
||||
for (size_t i = 0; i < oox_shape->oTextBoxShape->m_arrItems.size(); i++)
|
||||
{
|
||||
docx_converter->convert(oox_shape->oTextBoxShape->m_arrItems[i]);
|
||||
|
||||
convert(oox_shape->oTextBoxBodyPr.GetPointer());
|
||||
|
||||
if (oox_shape->style.IsInit())
|
||||
convert(&oox_shape->style->fontRef);
|
||||
}
|
||||
odf_context()->drawing_context()->set_text( odf_context()->text_context());
|
||||
|
||||
odf_context()->end_text_context();
|
||||
}
|
||||
}
|
||||
else
|
||||
convert(oox_shape->txBody.GetPointer(), oox_shape->style.GetPointer());
|
||||
}
|
||||
|
||||
odf_context()->drawing_context()->end_shape();
|
||||
|
||||
odf_context()->drawing_context()->end_drawing();
|
||||
|
||||
if (oox_shape->txXfrm.IsInit())
|
||||
{
|
||||
odf_context()->drawing_context()->end_drawing();
|
||||
|
||||
odf_context()->drawing_context()->start_drawing();
|
||||
odf_context()->drawing_context()->start_text_box();
|
||||
|
||||
@ -490,6 +534,8 @@ void OoxConverter::convert(PPTX::Logic::Shape *oox_shape)
|
||||
|
||||
odf_context()->drawing_context()->end_text_box();
|
||||
odf_context()->drawing_context()->end_drawing();
|
||||
|
||||
odf_context()->drawing_context()->end_group();
|
||||
}
|
||||
}
|
||||
|
||||
@ -880,12 +926,19 @@ void OoxConverter::convert(PPTX::Logic::UniColor * color, std::wstring & hexStri
|
||||
if (!color) return;
|
||||
|
||||
convert(color, nARGB);
|
||||
|
||||
hexString = XmlUtils::IntToString(nARGB & 0x00FFFFFF, L"#%06X");
|
||||
|
||||
if ((nARGB >> 24) != 0xff)
|
||||
if (nARGB != 0)
|
||||
{
|
||||
hexString = XmlUtils::IntToString(nARGB & 0x00FFFFFF, L"#%06X");
|
||||
|
||||
if ((nARGB >> 24) != 0xff)
|
||||
{
|
||||
opacity = ((nARGB >> 24) /255.) * 100.;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
opacity = ((nARGB >> 24) /255.) * 100.;
|
||||
//not found in theme
|
||||
}
|
||||
}
|
||||
|
||||
@ -958,7 +1011,7 @@ void OoxConverter::convert(PPTX::Logic::Ln *oox_line_prop, DWORD ARGB, PPTX::Log
|
||||
{
|
||||
if (oox_line_prop->headEnd->len.IsInit() || oox_line_prop->headEnd->type.IsInit() || oox_line_prop->headEnd->w.IsInit())
|
||||
{
|
||||
int type = 0, w = 1, len = 1;//medium arrow
|
||||
int type = 1, w = 1, len = 1;//medium arrow
|
||||
if (oox_line_prop->headEnd->len.IsInit()) len = oox_line_prop->headEnd->len->GetBYTECode();
|
||||
if (oox_line_prop->headEnd->type.IsInit()) type = oox_line_prop->headEnd->type->GetBYTECode();
|
||||
if (oox_line_prop->headEnd->w.IsInit()) w = oox_line_prop->headEnd->w->GetBYTECode();
|
||||
@ -970,11 +1023,11 @@ void OoxConverter::convert(PPTX::Logic::Ln *oox_line_prop, DWORD ARGB, PPTX::Log
|
||||
{
|
||||
if (oox_line_prop->tailEnd->len.IsInit() || oox_line_prop->tailEnd->type.IsInit() || oox_line_prop->tailEnd->w.IsInit())
|
||||
{
|
||||
int type = 0, w = 1, len = 1;//medium arrow
|
||||
int type = 1, w = 1, len = 1;//medium arrow
|
||||
if (oox_line_prop->tailEnd->len.IsInit()) len = oox_line_prop->tailEnd->len->GetBYTECode();
|
||||
if (oox_line_prop->tailEnd->type.IsInit()) type = oox_line_prop->tailEnd->type->GetBYTECode();
|
||||
if (oox_line_prop->tailEnd->w.IsInit()) w = oox_line_prop->tailEnd->w->GetBYTECode();
|
||||
|
||||
|
||||
odf_context()->drawing_context()->set_line_tail(type, len, w);
|
||||
}
|
||||
}
|
||||
@ -1096,16 +1149,7 @@ void OoxConverter::convert(PPTX::Logic::NvPr *oox_nvPr)
|
||||
{
|
||||
if (!oox_nvPr) return;
|
||||
|
||||
if (oox_nvPr->ph.is_init())
|
||||
{
|
||||
if (oox_nvPr->ph->type.IsInit())
|
||||
odf_context()->drawing_context()->set_placeholder_type(oox_nvPr->ph->type->GetBYTECode());
|
||||
if (oox_nvPr->ph->idx.IsInit())
|
||||
odf_context()->drawing_context()->set_placeholder_id(oox_nvPr->ph->idx.get());
|
||||
//nullable_bool hasCustomPrompt;
|
||||
//nullable_limit<Limit::Orient> orient;
|
||||
//nullable_limit<Limit::PlaceholderSize> sz;
|
||||
}
|
||||
//ph уровнем выше
|
||||
}
|
||||
|
||||
void OoxConverter::convert_list_level(PPTX::Logic::TextParagraphPr *oox_para_props, int level)
|
||||
@ -1120,18 +1164,19 @@ void OoxConverter::convert_list_level(PPTX::Logic::TextParagraphPr *oox_para_pro
|
||||
|
||||
if (bullet.is<PPTX::Logic::BuNone>())return;
|
||||
|
||||
int odf_list_type = 13; // 1, 2, 3 ...
|
||||
|
||||
if (bullet.is<PPTX::Logic::BuAutoNum>())
|
||||
{
|
||||
const PPTX::Logic::BuAutoNum & buAutoNum = bullet.as<PPTX::Logic::BuAutoNum>();
|
||||
int type = 13;
|
||||
int pptx_type = buAutoNum.type.GetBYTECode();
|
||||
|
||||
if ( pptx_type < 3) type = 46;
|
||||
if (pptx_type > 2 && pptx_type < 6) type = 60;
|
||||
if (pptx_type > 28 && pptx_type < 32) type = 47;
|
||||
if (pptx_type > 31 && pptx_type < 35) type = 61;
|
||||
if ( pptx_type < 3) odf_list_type = 46;
|
||||
if (pptx_type > 2 && pptx_type < 6) odf_list_type = 60;
|
||||
if (pptx_type > 28 && pptx_type < 32) odf_list_type = 47;
|
||||
if (pptx_type > 31 && pptx_type < 35) odf_list_type = 61;
|
||||
|
||||
odf_context()->styles_context()->lists_styles().start_style_level(level, type);
|
||||
odf_context()->styles_context()->lists_styles().start_style_level(level, odf_list_type);
|
||||
|
||||
if (buAutoNum.startAt.IsInit())
|
||||
{
|
||||
@ -1142,18 +1187,48 @@ void OoxConverter::convert_list_level(PPTX::Logic::TextParagraphPr *oox_para_pro
|
||||
}
|
||||
if (bullet.is<PPTX::Logic::BuChar>())
|
||||
{
|
||||
odf_list_type = 5;
|
||||
|
||||
const PPTX::Logic::BuChar & buChar = bullet.as<PPTX::Logic::BuChar>();
|
||||
odf_context()->styles_context()->lists_styles().start_style_level(level, 5 );
|
||||
odf_context()->styles_context()->lists_styles().start_style_level(level, odf_list_type);
|
||||
|
||||
odf_context()->styles_context()->lists_styles().set_bullet_char(buChar.Char);
|
||||
}
|
||||
if (bullet.is<PPTX::Logic::BuBlip>())
|
||||
{
|
||||
const PPTX::Logic::BuBlip & buBlip = bullet.as<PPTX::Logic::BuBlip>();
|
||||
|
||||
std::wstring odf_ref;
|
||||
bool bEmbedded = true;
|
||||
|
||||
if (buBlip.blip.embed.IsInit())
|
||||
{
|
||||
std::wstring sID = buBlip.blip.embed->get();
|
||||
std::wstring pathImage = find_link_by_id(sID, 1);
|
||||
|
||||
odf_context()->styles_context()->lists_styles().start_style_level(level, 1000 );
|
||||
|
||||
odf_context()->styles_context()->lists_styles().set_bullet_image(odf_context()->mediaitems()->items().back().odf_ref);
|
||||
if (pathImage.empty())
|
||||
pathImage = buBlip.blip.GetFullPicName(); // only for presentation merge shapes !!
|
||||
|
||||
odf_ref = odf_context()->add_image(pathImage);
|
||||
}
|
||||
else if (buBlip.blip.link.IsInit())
|
||||
{
|
||||
odf_ref = buBlip.blip.link->get();
|
||||
bEmbedded = false;
|
||||
}
|
||||
|
||||
if (!odf_ref.empty())
|
||||
{
|
||||
odf_list_type = 1000;
|
||||
odf_context()->styles_context()->lists_styles().start_style_level(level, odf_list_type );
|
||||
odf_context()->styles_context()->lists_styles().set_bullet_image(odf_ref);
|
||||
}
|
||||
else
|
||||
{
|
||||
odf_list_type = 5;
|
||||
odf_context()->styles_context()->lists_styles().start_style_level(level, odf_list_type );
|
||||
odf_context()->styles_context()->lists_styles().set_bullet_char(L"\x2022");
|
||||
}
|
||||
}
|
||||
|
||||
//odf_writer::style_list_level_label_alignment * aligment_props = odf_context()->styles_context()->lists_styles().get_list_level_alignment_properties();
|
||||
@ -1162,10 +1237,10 @@ void OoxConverter::convert_list_level(PPTX::Logic::TextParagraphPr *oox_para_pro
|
||||
|
||||
convert(oox_para_props->defRPr.GetPointer(), text_properties);
|
||||
|
||||
if (oox_para_props->indent.IsInit())
|
||||
if (oox_para_props->indent.IsInit() && level_props)
|
||||
{
|
||||
level_props->text_space_before_ = odf_types::length(- oox_para_props->indent.get() / 12700., odf_types::length::pt);
|
||||
level_props->text_min_label_width_ = odf_types::length(1, odf_types::length::pt);
|
||||
level_props->text_min_label_width_ = odf_types::length(- oox_para_props->indent.get() / 12700., odf_types::length::pt);
|
||||
level_props->text_space_before_ = odf_types::length(1, odf_types::length::pt);
|
||||
|
||||
}else
|
||||
{
|
||||
@ -1189,29 +1264,71 @@ void OoxConverter::convert_list_level(PPTX::Logic::TextParagraphPr *oox_para_pro
|
||||
{
|
||||
int res = 0;
|
||||
if ((res = hexColor.find(L"#")) < 0) hexColor = std::wstring(L"#") + hexColor;
|
||||
text_properties->content_.fo_color_ = odf_types::color(hexColor);
|
||||
if (text_properties) text_properties->content_.fo_color_ = odf_types::color(hexColor);
|
||||
}
|
||||
}
|
||||
if (oox_para_props->buSize.is<PPTX::Logic::BuSzTx>())
|
||||
{
|
||||
const PPTX::Logic::BuSzTx & buSzTx = oox_para_props->buSize.as<PPTX::Logic::BuSzTx>();
|
||||
}
|
||||
else if (oox_para_props->buSize.is<PPTX::Logic::BuSzPct>())
|
||||
{
|
||||
const PPTX::Logic::BuSzPct & buSzPct = oox_para_props->buSize.as<PPTX::Logic::BuSzPct>();
|
||||
if (buSzPct.val.IsInit())
|
||||
text_properties->content_.fo_font_size_ = odf_types::percent(*buSzPct.val / 1000.);
|
||||
}
|
||||
else
|
||||
text_properties->content_.fo_font_size_ = odf_types::percent(100.);
|
||||
|
||||
//-----------------------------------
|
||||
if (oox_para_props->buSize.is<PPTX::Logic::BuSzPts>())
|
||||
{
|
||||
const PPTX::Logic::BuSzPts & buSzPts = oox_para_props->buSize.as<PPTX::Logic::BuSzPts>();
|
||||
if (buSzPts.val.IsInit())
|
||||
text_properties->content_.fo_font_size_ = odf_types::length(*buSzPts.val, odf_types::length::pt);
|
||||
{
|
||||
if (text_properties)
|
||||
text_properties->content_.fo_font_size_ = odf_types::length(*buSzPts.val, odf_types::length::pt);
|
||||
else if (odf_list_type == 1000)
|
||||
odf_context()->styles_context()->lists_styles().set_bullet_image_size(*buSzPts.val);
|
||||
}
|
||||
}
|
||||
else if (oox_para_props->buTypeface.is<PPTX::Logic::BuFontTx>())
|
||||
else
|
||||
{
|
||||
double size_pt = oox_para_props->defRPr.IsInit() ? (oox_para_props->defRPr->sz.IsInit() ? *oox_para_props->defRPr->sz /100. : 0) : 0;
|
||||
|
||||
if (size_pt < 0.001 && odf_list_type == 1000)
|
||||
{
|
||||
odf_writer::style_text_properties * text_props = odf_context()->styles_context()->last_state(odf_types::style_family::Paragraph)->get_text_properties();
|
||||
if (text_props && text_props->content_.fo_font_size_)
|
||||
{
|
||||
size_pt = text_props->content_.fo_font_size_->get_length().get_value_unit(odf_types::length::pt);
|
||||
}
|
||||
if (size_pt < 0.001)
|
||||
{
|
||||
odf_writer::odf_style_state_ptr style_state;
|
||||
odf_context()->styles_context()->find_odf_default_style_state(odf_types::style_family::Text, style_state);
|
||||
if (style_state)
|
||||
text_props = style_state->get_text_properties();
|
||||
|
||||
if (text_props && text_props->content_.fo_font_size_)
|
||||
{
|
||||
size_pt = text_props->content_.fo_font_size_->get_length().get_value_unit(odf_types::length::pt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (oox_para_props->buSize.is<PPTX::Logic::BuSzTx>())
|
||||
{
|
||||
//equal tet size
|
||||
}
|
||||
|
||||
if (oox_para_props->buSize.is<PPTX::Logic::BuSzPct>())
|
||||
{
|
||||
const PPTX::Logic::BuSzPct & buSzPct = oox_para_props->buSize.as<PPTX::Logic::BuSzPct>();
|
||||
if (buSzPct.val.IsInit())
|
||||
{
|
||||
if (text_properties)
|
||||
text_properties->content_.fo_font_size_ = odf_types::percent(*buSzPct.val / 1000.);
|
||||
|
||||
size_pt *= *buSzPct.val / 100000.;
|
||||
}
|
||||
}
|
||||
if (text_properties && !text_properties->content_.fo_font_size_)
|
||||
text_properties->content_.fo_font_size_ = odf_types::percent(100.);
|
||||
else if (odf_list_type == 1000)
|
||||
{
|
||||
odf_context()->styles_context()->lists_styles().set_bullet_image_size(size_pt);
|
||||
}
|
||||
}
|
||||
//----------------
|
||||
if (oox_para_props->buTypeface.is<PPTX::Logic::BuFontTx>())
|
||||
{
|
||||
const PPTX::Logic::BuFontTx & buFontTx = oox_para_props->buTypeface.as<PPTX::Logic::BuFontTx>();
|
||||
}
|
||||
@ -1221,45 +1338,41 @@ void OoxConverter::convert_list_level(PPTX::Logic::TextParagraphPr *oox_para_pro
|
||||
|
||||
std::wstring font = textFont.typeface;
|
||||
convert_font(theme, font);
|
||||
if (!font.empty()) text_properties->content_.fo_font_family_ = font;
|
||||
if (!font.empty() && text_properties)
|
||||
text_properties->content_.fo_font_family_ = font;
|
||||
}
|
||||
|
||||
odf_context()->styles_context()->lists_styles().end_style_level();
|
||||
}
|
||||
|
||||
void OoxConverter::convert_list (PPTX::Logic::TextListStyle *oox_list_style)
|
||||
{
|
||||
if (!oox_list_style) return;
|
||||
|
||||
odf_context()->styles_context()->lists_styles().start_style();
|
||||
for (int i = 0; i < 9; i++)
|
||||
{
|
||||
convert_list_level(oox_list_style->levels[0].GetPointer(), i);
|
||||
}
|
||||
odf_context()->styles_context()->lists_styles().end_style();
|
||||
}
|
||||
|
||||
void OoxConverter::convert(PPTX::Logic::Paragraph *oox_paragraph, PPTX::Logic::TextListStyle *oox_list_style)
|
||||
{
|
||||
if (!oox_paragraph)return;
|
||||
|
||||
bool styled = false;
|
||||
|
||||
bool list_local = false;
|
||||
bool list_present = false;
|
||||
std::wstring list_style_name;
|
||||
|
||||
int list_level = 0;
|
||||
int list_level = 0;//-1;
|
||||
|
||||
NSCommon::nullable<PPTX::Logic::TextParagraphPr> paraPr;
|
||||
|
||||
if (oox_paragraph->pPr.IsInit() && oox_paragraph->pPr->lvl.IsInit())
|
||||
if (oox_paragraph->pPr.IsInit())
|
||||
{
|
||||
list_level = *oox_paragraph->pPr->lvl;
|
||||
if (oox_paragraph->pPr->lvl.IsInit())
|
||||
list_level = *oox_paragraph->pPr->lvl;
|
||||
if (oox_paragraph->pPr->ParagraphBullet.is_init())
|
||||
list_local = true;
|
||||
}
|
||||
if (oox_list_style && list_level >= 0 && list_level < 10)
|
||||
|
||||
if (oox_list_style)
|
||||
{
|
||||
if (oox_list_style->levels[list_level].IsInit())
|
||||
oox_list_style->levels[list_level]->Merge(paraPr);
|
||||
int i = (list_level >= 0 && list_level < 10) ? list_level : 0;
|
||||
|
||||
if (oox_list_style->levels[i].IsInit())
|
||||
oox_list_style->levels[i]->Merge(paraPr);
|
||||
}
|
||||
if (oox_paragraph->pPr.IsInit())
|
||||
oox_paragraph->pPr->Merge(paraPr);
|
||||
@ -1274,7 +1387,6 @@ void OoxConverter::convert(PPTX::Logic::Paragraph *oox_paragraph, PPTX::Logic::T
|
||||
list_present = true;
|
||||
if (paraPr->ParagraphBullet.is<PPTX::Logic::BuNone>())
|
||||
list_present = false;
|
||||
else if (list_level == 0) list_level = 1;
|
||||
}
|
||||
//свойства могут быть приписаны не только к параграфу, но и к самому объекту
|
||||
odf_writer::style_paragraph_properties* paragraph_properties = odf_context()->text_context()->get_paragraph_properties();
|
||||
@ -1310,26 +1422,32 @@ void OoxConverter::convert(PPTX::Logic::Paragraph *oox_paragraph, PPTX::Logic::T
|
||||
odf_context()->text_context()->list_state_.style_name = L"";
|
||||
}
|
||||
|
||||
if (odf_context()->text_context()->list_state_.started_list == false)
|
||||
if (list_local)
|
||||
{
|
||||
odf_context()->styles_context()->lists_styles().start_style();
|
||||
convert_list_level(paraPr.GetPointer(), list_level - 1);
|
||||
_CP_OPT(bool) inStyles = odf_context()->drawing_context()->get_presentation();
|
||||
|
||||
odf_context()->styles_context()->lists_styles().start_style(inStyles && *inStyles);
|
||||
convert_list_level(oox_paragraph->pPr.GetPointer(), list_level /*- 1*/);
|
||||
odf_context()->styles_context()->lists_styles().end_style();
|
||||
|
||||
}
|
||||
list_style_name = odf_context()->styles_context()->lists_styles().get_style_name(); //last added
|
||||
|
||||
list_style_name = odf_context()->styles_context()->lists_styles().get_style_name();
|
||||
|
||||
odf_context()->text_context()->start_list(list_style_name);
|
||||
}
|
||||
odf_context()->text_context()->start_list_item();
|
||||
list_level++;
|
||||
|
||||
if (odf_context()->text_context()->list_state_.style_name == list_style_name)
|
||||
list_style_name = L"";
|
||||
|
||||
while (odf_context()->text_context()->list_state_.levels.size() < list_level)
|
||||
if (odf_context()->text_context()->list_state_.levels.size() < list_level)
|
||||
{
|
||||
odf_context()->text_context()->start_list(list_style_name);
|
||||
odf_context()->text_context()->start_list_item();
|
||||
while (odf_context()->text_context()->list_state_.levels.size() < list_level)
|
||||
{
|
||||
odf_context()->text_context()->start_list(list_style_name);
|
||||
odf_context()->text_context()->start_list_item();
|
||||
|
||||
if (odf_context()->text_context()->list_state_.style_name == list_style_name)
|
||||
list_style_name = L"";
|
||||
}
|
||||
}
|
||||
else
|
||||
odf_context()->text_context()->start_list_item();
|
||||
}
|
||||
else if (odf_context()->text_context()->list_state_.started_list == true)
|
||||
{
|
||||
@ -1343,10 +1461,10 @@ void OoxConverter::convert(PPTX::Logic::Paragraph *oox_paragraph, PPTX::Logic::T
|
||||
}
|
||||
odf_context()->text_context()->end_paragraph();
|
||||
|
||||
if(list_present)
|
||||
{
|
||||
odf_context()->text_context()->end_list_item();
|
||||
}
|
||||
//if(list_present)
|
||||
//{
|
||||
// odf_context()->text_context()->end_list_item();
|
||||
//}
|
||||
}
|
||||
void OoxConverter::convert(PPTX::Logic::TextListStyle *oox_list_style, int level, odf_writer::style_paragraph_properties * paragraph_properties
|
||||
, odf_writer::style_text_properties * text_properties)
|
||||
@ -1658,6 +1776,45 @@ void OoxConverter::convert(PPTX::Logic::Run *oox_run)
|
||||
void OoxConverter::convert(PPTX::Logic::Fld *oox_fld)
|
||||
{
|
||||
if (!oox_fld) return;
|
||||
|
||||
bool styled = false;
|
||||
|
||||
if (oox_fld->rPr.IsInit())
|
||||
{
|
||||
odf_writer::style_text_properties * text_properties = odf_context()->text_context()->get_text_properties();
|
||||
|
||||
if (!text_properties)
|
||||
{
|
||||
odf_context()->styles_context()->create_style(L"", odf_types::style_family::Text, true, false, -1);
|
||||
text_properties = odf_context()->styles_context()->last_state()->get_text_properties();
|
||||
styled = true;
|
||||
}
|
||||
convert(oox_fld->rPr.GetPointer(), text_properties);
|
||||
}
|
||||
|
||||
odf_context()->text_context()->start_span(styled);
|
||||
|
||||
std::wstring fld_type = oox_fld->type.get_value_or(L"");
|
||||
|
||||
if ((oox_fld->rPr.IsInit()) && (oox_fld->rPr->hlinkClick.IsInit()) && (oox_fld->rPr->hlinkClick->id.IsInit()))
|
||||
{
|
||||
std::wstring hlink = find_link_by_id(oox_fld->rPr->hlinkClick->id.get(), 2);
|
||||
odf_context()->text_context()->add_hyperlink(hlink, oox_fld->GetText());
|
||||
|
||||
}
|
||||
else if (fld_type == L"slidenum")
|
||||
{
|
||||
odf_context()->text_context()->add_text_page_number( oox_fld->GetText());
|
||||
}
|
||||
else if (fld_type == L"datetime1")
|
||||
{
|
||||
odf_context()->text_context()->add_text_date( oox_fld->GetText());
|
||||
}
|
||||
else
|
||||
{
|
||||
odf_context()->text_context()->add_text_content( oox_fld->GetText());
|
||||
}
|
||||
odf_context()->text_context()->end_span();
|
||||
}
|
||||
void OoxConverter::convert(PPTX::Logic::Br *oox_br)
|
||||
{
|
||||
@ -1684,7 +1841,20 @@ void OoxConverter::convert(PPTX::Logic::MoveTo *oox_geom_path)
|
||||
|
||||
odf_context()->drawing_context()->add_path_element(std::wstring(L"M"), path_elm);
|
||||
}
|
||||
void OoxConverter::convert(PPTX::Logic::TextListStyle *oox_list_style)
|
||||
{
|
||||
if (!oox_list_style) return;
|
||||
if (oox_list_style->IsListStyleEmpty()) return;
|
||||
|
||||
_CP_OPT(bool) inStyles = odf_context()->drawing_context()->get_presentation();
|
||||
|
||||
odf_context()->styles_context()->lists_styles().start_style(inStyles && *inStyles);
|
||||
for (int i = 0; i < 9; i++)
|
||||
{
|
||||
OoxConverter::convert_list_level(oox_list_style->levels[i].GetPointer(), i);
|
||||
}
|
||||
odf_context()->styles_context()->lists_styles().end_style();
|
||||
}
|
||||
void OoxConverter::convert(PPTX::Logic::TxBody *oox_txBody, PPTX::Logic::ShapeStyle* oox_style)
|
||||
{
|
||||
if (!oox_txBody) return;
|
||||
@ -1692,6 +1862,8 @@ void OoxConverter::convert(PPTX::Logic::TxBody *oox_txBody, PPTX::Logic::ShapeSt
|
||||
|
||||
odf_context()->start_text_context();
|
||||
|
||||
convert(oox_txBody->lstStyle.GetPointer());
|
||||
|
||||
for (size_t i = 0; i < oox_txBody->Paragrs.size(); i++)
|
||||
{
|
||||
convert(&oox_txBody->Paragrs[i], oox_txBody->lstStyle.GetPointer());
|
||||
@ -1711,8 +1883,11 @@ void OoxConverter::convert(PPTX::Logic::TxBody *oox_txBody, PPTX::Logic::ShapeSt
|
||||
void OoxConverter::convert(PPTX::Logic::ArcTo *oox_geom_path)
|
||||
{
|
||||
if (!oox_geom_path) return;
|
||||
|
||||
int stAng = XmlUtils::GetInteger(oox_geom_path->stAng);
|
||||
int swAng = XmlUtils::GetInteger(oox_geom_path->swAng);
|
||||
|
||||
std::wstring path_elm = oox_geom_path->hR + L" " + oox_geom_path->wR + L" " + oox_geom_path->swAng + L" " + oox_geom_path->stAng;
|
||||
std::wstring path_elm = oox_geom_path->wR + L" " + oox_geom_path->hR + L" " + std::to_wstring(stAng/60000) + L" " + std::to_wstring(swAng /60000);
|
||||
|
||||
odf_context()->drawing_context()->add_path_element(std::wstring(L"G"), path_elm);
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ void OoxConverter::convert(OOX::Vml::CShapeType *vml_shape_type)
|
||||
}
|
||||
//m_oPreferRelative//типо можно менять размер
|
||||
|
||||
for (unsigned int i=0 ; i < vml_shape_type->m_arrItems.size();i++)
|
||||
for (size_t i = 0; i < vml_shape_type->m_arrItems.size(); i++)
|
||||
{
|
||||
convert(vml_shape_type->m_arrItems[i]);
|
||||
}
|
||||
@ -86,6 +86,18 @@ void OoxConverter::convert(OOX::Vml::CShapeType *vml_shape_type)
|
||||
//m_arrItems
|
||||
//CVmlCommonElements
|
||||
}
|
||||
void OoxConverter::convert(OOX::Vml::CFormulas *vml_formulas)
|
||||
{
|
||||
if (vml_formulas == NULL) return;
|
||||
|
||||
for (size_t i = 0; i < vml_formulas->m_arrItems.size(); i++)
|
||||
{
|
||||
OOX::Vml::CF *cf = dynamic_cast<OOX::Vml::CF *>(vml_formulas->m_arrItems[i]);
|
||||
if (cf == NULL) continue;
|
||||
|
||||
//odf_context()->drawing_context()->add_formula(L"", cf->m_sEqn);
|
||||
}
|
||||
}
|
||||
|
||||
void OoxConverter::convert(SimpleTypes::Vml::CCssStyle *vml_style, bool group)
|
||||
{
|
||||
@ -95,7 +107,7 @@ void OoxConverter::convert(SimpleTypes::Vml::CCssStyle *vml_style, bool group)
|
||||
|
||||
_CP_OPT(int) anchor_type_x, anchor_type_y;
|
||||
|
||||
for (unsigned int i=0; i < vml_style->m_arrProperties.size(); i++)
|
||||
for (size_t i = 0; i < vml_style->m_arrProperties.size(); i++)
|
||||
{
|
||||
if (vml_style->m_arrProperties[i] == NULL) continue;
|
||||
|
||||
@ -639,15 +651,15 @@ void OoxConverter::convert(OOX::Vml::CStroke *vml_stroke)
|
||||
switch(vml_stroke->m_oStartArrow.GetValue())
|
||||
{
|
||||
case SimpleTypes::strokearrowtypeBlock:
|
||||
odf_context()->drawing_context()->set_line_head(SimpleTypes::lineendtypeStealth,vml_stroke->m_oStartArrowLength.GetValue(),vml_stroke->m_oStartArrowWidth.GetValue()); break;
|
||||
odf_context()->drawing_context()->set_line_head(4, vml_stroke->m_oStartArrowLength.GetValue(), vml_stroke->m_oStartArrowWidth.GetValue()); break;
|
||||
case SimpleTypes::strokearrowtypeClassic:
|
||||
odf_context()->drawing_context()->set_line_head(SimpleTypes::lineendtypeArrow,vml_stroke->m_oStartArrowLength.GetValue(),vml_stroke->m_oStartArrowWidth.GetValue()); break;
|
||||
odf_context()->drawing_context()->set_line_head(1, vml_stroke->m_oStartArrowLength.GetValue(), vml_stroke->m_oStartArrowWidth.GetValue()); break;
|
||||
case SimpleTypes::strokearrowtypeDiamond:
|
||||
odf_context()->drawing_context()->set_line_head(SimpleTypes::lineendtypeDiamond,vml_stroke->m_oStartArrowLength.GetValue(),vml_stroke->m_oStartArrowWidth.GetValue()); break;
|
||||
odf_context()->drawing_context()->set_line_head(2, vml_stroke->m_oStartArrowLength.GetValue(), vml_stroke->m_oStartArrowWidth.GetValue()); break;
|
||||
case SimpleTypes::strokearrowtypeOpen:
|
||||
odf_context()->drawing_context()->set_line_head(SimpleTypes::lineendtypeTriangle,vml_stroke->m_oStartArrowLength.GetValue(),vml_stroke->m_oStartArrowWidth.GetValue()); break;
|
||||
odf_context()->drawing_context()->set_line_head(5, vml_stroke->m_oStartArrowLength.GetValue(), vml_stroke->m_oStartArrowWidth.GetValue()); break;
|
||||
case SimpleTypes::strokearrowtypeOval:
|
||||
odf_context()->drawing_context()->set_line_head(SimpleTypes::lineendtypeOval,vml_stroke->m_oStartArrowLength.GetValue(),vml_stroke->m_oStartArrowWidth.GetValue()); break;
|
||||
odf_context()->drawing_context()->set_line_head(3, vml_stroke->m_oStartArrowLength.GetValue(), vml_stroke->m_oStartArrowWidth.GetValue()); break;
|
||||
case SimpleTypes::strokearrowtypeNone:
|
||||
default:
|
||||
break;
|
||||
@ -655,15 +667,15 @@ void OoxConverter::convert(OOX::Vml::CStroke *vml_stroke)
|
||||
switch(vml_stroke->m_oEndArrow.GetValue())
|
||||
{
|
||||
case SimpleTypes::strokearrowtypeBlock:
|
||||
odf_context()->drawing_context()->set_line_tail(SimpleTypes::lineendtypeStealth,vml_stroke->m_oEndArrowLength.GetValue(),vml_stroke->m_oEndArrowWidth.GetValue()); break;
|
||||
odf_context()->drawing_context()->set_line_tail(4, vml_stroke->m_oEndArrowLength.GetValue(), vml_stroke->m_oEndArrowWidth.GetValue()); break;
|
||||
case SimpleTypes::strokearrowtypeClassic:
|
||||
odf_context()->drawing_context()->set_line_tail(SimpleTypes::lineendtypeArrow,vml_stroke->m_oEndArrowLength.GetValue(),vml_stroke->m_oEndArrowWidth.GetValue()); break;
|
||||
odf_context()->drawing_context()->set_line_tail(1, vml_stroke->m_oEndArrowLength.GetValue(), vml_stroke->m_oEndArrowWidth.GetValue()); break;
|
||||
case SimpleTypes::strokearrowtypeDiamond:
|
||||
odf_context()->drawing_context()->set_line_tail(SimpleTypes::lineendtypeDiamond,vml_stroke->m_oEndArrowLength.GetValue(),vml_stroke->m_oEndArrowWidth.GetValue()); break;
|
||||
odf_context()->drawing_context()->set_line_tail(2, vml_stroke->m_oEndArrowLength.GetValue(), vml_stroke->m_oEndArrowWidth.GetValue()); break;
|
||||
case SimpleTypes::strokearrowtypeOpen:
|
||||
odf_context()->drawing_context()->set_line_tail(SimpleTypes::lineendtypeTriangle,vml_stroke->m_oEndArrowLength.GetValue(),vml_stroke->m_oEndArrowWidth.GetValue()); break;
|
||||
odf_context()->drawing_context()->set_line_tail(5, vml_stroke->m_oEndArrowLength.GetValue(), vml_stroke->m_oEndArrowWidth.GetValue()); break;
|
||||
case SimpleTypes::strokearrowtypeOval:
|
||||
odf_context()->drawing_context()->set_line_tail(SimpleTypes::lineendtypeOval,vml_stroke->m_oEndArrowLength.GetValue(),vml_stroke->m_oEndArrowWidth.GetValue()); break;
|
||||
odf_context()->drawing_context()->set_line_tail(3, vml_stroke->m_oEndArrowLength.GetValue(), vml_stroke->m_oEndArrowWidth.GetValue()); break;
|
||||
case SimpleTypes::strokearrowtypeNone:
|
||||
default:
|
||||
break;
|
||||
@ -693,17 +705,18 @@ void OoxConverter::convert(OOX::Vml::CTextbox *vml_textbox)
|
||||
odf_context()->drawing_context()->set_textarea_wrap(true);
|
||||
|
||||
DocxConverter *docx_converter = dynamic_cast<DocxConverter*>(this);
|
||||
|
||||
odf_context()->start_text_context();
|
||||
if (docx_converter)
|
||||
{
|
||||
for (unsigned int i=0 ; i < vml_textbox->m_oTxtbxContent->m_arrItems.size();i++)
|
||||
odf_context()->start_text_context();
|
||||
{
|
||||
if (docx_converter)
|
||||
for (size_t i = 0; i < vml_textbox->m_oTxtbxContent->m_arrItems.size(); i++)
|
||||
{
|
||||
docx_converter->convert(vml_textbox->m_oTxtbxContent->m_arrItems[i]);
|
||||
}
|
||||
odf_context()->drawing_context()->set_text( odf_context()->text_context());
|
||||
}
|
||||
odf_context()->drawing_context()->set_text( odf_context()->text_context());
|
||||
odf_context()->end_text_context();
|
||||
}
|
||||
odf_context()->end_text_context();
|
||||
|
||||
}
|
||||
void OoxConverter::convert(OOX::Vml::CTextPath *vml_textpath)
|
||||
@ -869,7 +882,7 @@ void OoxConverter::convert(OOX::Vml::CVmlCommonElements *vml_common)
|
||||
delete oRgbColor;
|
||||
}
|
||||
}
|
||||
for (unsigned int i=0 ; i < vml_common->m_arrItems.size();i++)
|
||||
for (size_t i = 0; i < vml_common->m_arrItems.size(); i++)
|
||||
{
|
||||
convert(vml_common->m_arrItems[i]);
|
||||
}
|
||||
@ -899,7 +912,7 @@ void OoxConverter::convert(OOX::Vml::CGroup *vml_group)
|
||||
odf_context()->drawing_context()->set_group_shift(vml_group->m_oCoordOrigin->GetX(), vml_group->m_oCoordOrigin->GetY());
|
||||
}
|
||||
|
||||
for (unsigned int i=0; i < vml_group->m_arrItems.size(); i++)
|
||||
for (size_t i = 0; i < vml_group->m_arrItems.size(); i++)
|
||||
{
|
||||
if (vml_group->m_arrItems[i] == NULL) continue;
|
||||
|
||||
|
||||
@ -130,6 +130,8 @@ bool OoxConverter::UpdateProgress(long nComplete)
|
||||
|
||||
void OoxConverter::set_fonts_directory(const std::wstring &fontsPath)
|
||||
{
|
||||
if (odf_context() == NULL) return;
|
||||
|
||||
odf_context()->set_fonts_directory(fontsPath);
|
||||
}
|
||||
|
||||
@ -143,18 +145,15 @@ void OoxConverter::convert(OOX::WritingElement *oox_unknown)
|
||||
{
|
||||
case OOX::et_graphicFrame:
|
||||
{
|
||||
PPTX::Logic::GraphicFrame* pGraphicFrame= dynamic_cast<PPTX::Logic::GraphicFrame*>(oox_unknown);
|
||||
convert(pGraphicFrame);
|
||||
convert(dynamic_cast<PPTX::Logic::GraphicFrame*>(oox_unknown));
|
||||
}break;
|
||||
case OOX::et_pic:
|
||||
{
|
||||
PPTX::Logic::Pic* pPic= dynamic_cast<PPTX::Logic::Pic*>(oox_unknown);
|
||||
convert(pPic);
|
||||
convert(dynamic_cast<PPTX::Logic::Pic*>(oox_unknown));
|
||||
}break;
|
||||
case OOX::et_dgm_DiagrammParts:
|
||||
{
|
||||
PPTX::Logic::SmartArt* pDiagrammParts = dynamic_cast<PPTX::Logic::SmartArt*>(oox_unknown);
|
||||
convert(pDiagrammParts);
|
||||
convert(dynamic_cast<PPTX::Logic::SmartArt*>(oox_unknown));
|
||||
}break;
|
||||
case OOX::et_a_Shape:
|
||||
case OOX::et_p_Shape:
|
||||
@ -266,18 +265,19 @@ void OoxConverter::convert(OOX::WritingElement *oox_unknown)
|
||||
}break;
|
||||
case OOX::et_v_fill:
|
||||
{
|
||||
OOX::Vml::CFill *vml = dynamic_cast<OOX::Vml::CFill*>(oox_unknown);
|
||||
convert(vml);
|
||||
convert(dynamic_cast<OOX::Vml::CFill*>(oox_unknown));
|
||||
}break;
|
||||
case OOX::et_v_stroke:
|
||||
{
|
||||
OOX::Vml::CStroke *vml = dynamic_cast<OOX::Vml::CStroke*>(oox_unknown);
|
||||
convert(vml);
|
||||
convert(dynamic_cast<OOX::Vml::CStroke*>(oox_unknown));
|
||||
}break;
|
||||
case OOX::et_v_formulas:
|
||||
{
|
||||
convert(dynamic_cast<OOX::Vml::CFormulas*>(oox_unknown));
|
||||
}break;
|
||||
case OOX::et_v_shadow:
|
||||
{
|
||||
OOX::Vml::CShadow *vml = dynamic_cast<OOX::Vml::CShadow*>(oox_unknown);
|
||||
convert(vml);
|
||||
convert(dynamic_cast<OOX::Vml::CShadow*>(oox_unknown));
|
||||
}break;
|
||||
case OOX::et_v_image:
|
||||
{
|
||||
|
||||
@ -245,6 +245,7 @@ namespace OOX
|
||||
class CTextPath;
|
||||
class CGroup;
|
||||
class CVmlCommonElements;
|
||||
class CFormulas;
|
||||
}
|
||||
namespace VmlWord
|
||||
{
|
||||
@ -354,10 +355,11 @@ public:
|
||||
double getSystemDPI();
|
||||
|
||||
//.......................................................................................................................
|
||||
virtual OOX::IFileContainer *current_document() = 0;
|
||||
virtual cpdoccore::odf_writer::odf_conversion_context *odf_context() = 0;
|
||||
virtual PPTX::Theme *oox_theme() = 0;
|
||||
virtual PPTX::Logic::ClrMap *oox_clrMap() {return NULL;}
|
||||
|
||||
|
||||
virtual std::wstring find_link_by_id(std::wstring sId, int t) = 0;
|
||||
virtual NSCommon::smart_ptr<OOX::File> find_file_by_id(std::wstring sId) = 0;
|
||||
|
||||
@ -405,9 +407,9 @@ public:
|
||||
void convert(PPTX::Logic::NvGrpSpPr *oox_nvSpPr);
|
||||
void convert(PPTX::Logic::NvPr *oox_nvPr);
|
||||
void convert(PPTX::Logic::Paragraph *oox_para, PPTX::Logic::TextListStyle *oox_list_style = NULL);
|
||||
void convert(PPTX::Logic::TextListStyle *oox_list_style);
|
||||
|
||||
void convert_list_level (PPTX::Logic::TextParagraphPr *oox_para_props, int level);
|
||||
void convert_list (PPTX::Logic::TextListStyle *oox_list_style);
|
||||
|
||||
void convert(PPTX::Logic::TextListStyle *oox_list_style, int level, cpdoccore::odf_writer::style_paragraph_properties *paragraph_properties,
|
||||
cpdoccore::odf_writer::style_text_properties *text_properties);
|
||||
@ -510,6 +512,7 @@ public:
|
||||
void convert(OOX::VmlWord::CWrap *vml_wrap);
|
||||
void convert(OOX::Vml::CGroup *vml_group);
|
||||
void convert(OOX::Vml::CVmlCommonElements *vml_attr);
|
||||
void convert(OOX::Vml::CFormulas *vml_formulas);
|
||||
};
|
||||
|
||||
} // namespace Oox2Odf
|
||||
|
||||
@ -103,7 +103,16 @@ PPTX::Theme* DocxConverter::oox_theme()
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
OOX::IFileContainer* DocxConverter::current_document()
|
||||
{
|
||||
if (oox_current_child_document)
|
||||
return oox_current_child_document;
|
||||
else
|
||||
{
|
||||
OOX::CDocument *oox_doc = docx_document->GetDocument();
|
||||
return dynamic_cast<OOX::IFileContainer*>(oox_doc);
|
||||
}
|
||||
}
|
||||
NSCommon::smart_ptr<OOX::File> DocxConverter::find_file_by_id(std::wstring sId)
|
||||
{
|
||||
OOX::CDocument *oox_doc = docx_document->GetDocument();
|
||||
@ -317,16 +326,16 @@ void DocxConverter::convert(OOX::WritingElement *oox_unknown)
|
||||
// OOX::Logic::CShape* pShape = dynamic_cast<OOX::Logic::CShape*>(oox_unknown);
|
||||
// convert(pShape);
|
||||
//}break;
|
||||
//case OOX::et_w_pict:
|
||||
//{
|
||||
// OOX::Logic::CPicture* pPic = dynamic_cast<OOX::Logic::CPicture*>(oox_unknown);
|
||||
// convert(pPic);
|
||||
//}break;
|
||||
//case OOX::et_w_object:
|
||||
//{
|
||||
// OOX::Logic::CObject* pObj = dynamic_cast<OOX::Logic::CObject*>(oox_unknown);
|
||||
// convert(pObj);
|
||||
//}break;
|
||||
case OOX::et_w_pict:
|
||||
{
|
||||
OOX::Logic::CPicture* pPic = dynamic_cast<OOX::Logic::CPicture*>(oox_unknown);
|
||||
convert(pPic);
|
||||
}break;
|
||||
case OOX::et_w_object:
|
||||
{
|
||||
OOX::Logic::CObject* pObj = dynamic_cast<OOX::Logic::CObject*>(oox_unknown);
|
||||
convert(pObj);
|
||||
}break;
|
||||
case OOX::et_pic_pic:
|
||||
case OOX::et_pic:
|
||||
case OOX::et_p_pic:
|
||||
@ -353,23 +362,27 @@ void DocxConverter::convert(OOX::WritingElement *oox_unknown)
|
||||
}break;
|
||||
case OOX::et_w_commentReference:
|
||||
{
|
||||
OOX::Logic::CCommentReference* pCommRef = dynamic_cast<OOX::Logic::CCommentReference*>(oox_unknown);
|
||||
convert(pCommRef); //если нет Start - означает начало с предыдущего Run
|
||||
convert(dynamic_cast<OOX::Logic::CCommentReference*>(oox_unknown)); //если нет Start - означает начало с предыдущего Run
|
||||
}break;
|
||||
case OOX::et_w_footnoteReference:
|
||||
{
|
||||
OOX::Logic::CFootnoteReference* pRef= dynamic_cast<OOX::Logic::CFootnoteReference*>(oox_unknown);
|
||||
convert(pRef);
|
||||
convert(dynamic_cast<OOX::Logic::CFootnoteReference*>(oox_unknown));
|
||||
}break;
|
||||
case OOX::et_w_endnoteReference:
|
||||
{
|
||||
OOX::Logic::CEndnoteReference* pRef= dynamic_cast<OOX::Logic::CEndnoteReference*>(oox_unknown);
|
||||
convert(pRef);
|
||||
convert(dynamic_cast<OOX::Logic::CEndnoteReference*>(oox_unknown));
|
||||
}break;
|
||||
case OOX::et_w_endnoteRef:
|
||||
{
|
||||
//add ref ??? todoooo
|
||||
}break;
|
||||
case OOX::et_w_footnoteRef:
|
||||
{
|
||||
//add ref
|
||||
}break;
|
||||
case OOX::et_w_tbl:
|
||||
{
|
||||
OOX::Logic::CTbl* pTable= dynamic_cast<OOX::Logic::CTbl*>(oox_unknown);
|
||||
convert(pTable);
|
||||
convert(dynamic_cast<OOX::Logic::CTbl*>(oox_unknown));
|
||||
}break;
|
||||
case OOX::et_w_tr:
|
||||
{
|
||||
@ -381,6 +394,12 @@ void DocxConverter::convert(OOX::WritingElement *oox_unknown)
|
||||
OOX::Logic::CTc* pCell= dynamic_cast<OOX::Logic::CTc*>(oox_unknown);
|
||||
convert(pCell);
|
||||
}break;
|
||||
case OOX::et_w_bookmarkStart:
|
||||
{
|
||||
}break;
|
||||
case OOX::et_w_bookmarkEnd:
|
||||
{
|
||||
}break;
|
||||
default:
|
||||
{
|
||||
OoxConverter::convert(oox_unknown);
|
||||
@ -394,12 +413,15 @@ void DocxConverter::convert(OOX::Logic::CSdt *oox_sdt)
|
||||
//nullable<OOX::Logic::CSdtEndPr > m_oSdtEndPr;
|
||||
//nullable<OOX::Logic::CSdtPr > m_oSdtPr;
|
||||
|
||||
if (oox_sdt->m_oSdtContent.IsInit())
|
||||
convert(oox_sdt->m_oSdtContent.GetPointer());
|
||||
}
|
||||
void DocxConverter::convert(OOX::Logic::CSdtContent *oox_sdt)
|
||||
{
|
||||
if (oox_sdt == NULL) return;
|
||||
|
||||
for (size_t i = 0; i < oox_sdt->m_arrItems.size(); i++)
|
||||
{
|
||||
for (unsigned int i=0; i< oox_sdt->m_oSdtContent->m_arrItems.size(); i++)
|
||||
{
|
||||
convert(oox_sdt->m_oSdtContent->m_arrItems[i]);
|
||||
}
|
||||
convert(oox_sdt->m_arrItems[i]);
|
||||
}
|
||||
}
|
||||
void DocxConverter::convert(OOX::Logic::CParagraph *oox_paragraph)
|
||||
@ -1271,6 +1293,15 @@ void DocxConverter::convert(OOX::Logic::CParagraphProperty *oox_paragraph_pr, cp
|
||||
|
||||
}
|
||||
|
||||
if (odt_context->notes_context()->is_started() && !paragraph_properties->content_.fo_margin_left_
|
||||
&& !paragraph_properties->content_.fo_text_indent_)
|
||||
{
|
||||
paragraph_properties->content_.fo_margin_left_ = odf_types::length( 0.2, odf_types::length::cm);
|
||||
paragraph_properties->content_.fo_text_indent_ = odf_types::length(-0.2, odf_types::length::cm);
|
||||
paragraph_properties->content_.fo_line_height_ = odf_types::percent(100.);
|
||||
paragraph_properties->content_.style_auto_text_indent_ = false;
|
||||
}
|
||||
|
||||
if (oox_paragraph_pr->m_oTabs.IsInit())
|
||||
{
|
||||
paragraph_properties->add_child_element(odf_context()->start_tabs());
|
||||
@ -2692,9 +2723,12 @@ void DocxConverter::convert(OOX::Drawing::CAnchor *oox_anchor)
|
||||
int id = oox_anchor->m_oRelativeHeight->GetValue();
|
||||
odf_context()->drawing_context()->set_z_order(id);
|
||||
}
|
||||
|
||||
OoxConverter::convert(oox_anchor->m_oDocPr.GetPointer());
|
||||
|
||||
convert(&oox_anchor->m_oGraphic);
|
||||
odf_context()->drawing_context()->start_drawing();
|
||||
OoxConverter::convert(&oox_anchor->m_oGraphic);
|
||||
odf_context()->drawing_context()->end_drawing();
|
||||
|
||||
odf_context()->drawing_context()->check_anchor();
|
||||
}
|
||||
@ -2724,9 +2758,12 @@ void DocxConverter::convert(OOX::Drawing::CInline *oox_inline)
|
||||
|
||||
odt_context->drawing_context()->set_vertical_rel(2);//line
|
||||
odt_context->drawing_context()->set_vertical_pos(1);//middle
|
||||
|
||||
|
||||
OoxConverter::convert(oox_inline->m_oDocPr.GetPointer());
|
||||
convert(&oox_inline->m_oGraphic);
|
||||
|
||||
odf_context()->drawing_context()->start_drawing();
|
||||
OoxConverter::convert(&oox_inline->m_oGraphic);
|
||||
odf_context()->drawing_context()->end_drawing();
|
||||
}
|
||||
|
||||
void DocxConverter::convert(SimpleTypes::CHexColor<> *color,
|
||||
@ -2781,11 +2818,19 @@ void DocxConverter::convert(ComplexTypes::Word::CColor *color, _CP_OPT(odf_types
|
||||
if (!color)return;
|
||||
convert(color->m_oVal.GetPointer(), color->m_oThemeColor.GetPointer(),color->m_oThemeTint.GetPointer(),color->m_oThemeShade.GetPointer(), odf_color);
|
||||
}
|
||||
PPTX::Logic::ClrMap* DocxConverter::oox_clrMap()
|
||||
{
|
||||
//return current_clrMap; todoooo
|
||||
OOX::CSettings * docx_settings = docx_document->GetSettings();
|
||||
if (!docx_settings) return NULL;
|
||||
|
||||
return docx_settings->m_oClrSchemeMapping.GetPointer();
|
||||
}
|
||||
void DocxConverter::convert_settings()
|
||||
{
|
||||
if (!odt_context) return;
|
||||
OOX::CSettings * docx_settings = docx_document->GetSettings();
|
||||
|
||||
OOX::CSettings * docx_settings = docx_document->GetSettings();
|
||||
if (!docx_settings) return;
|
||||
|
||||
if (docx_settings->m_oZoom.IsInit())
|
||||
@ -3017,7 +3062,7 @@ void DocxConverter::convert(OOX::Numbering::CAbstractNum* oox_num_style)
|
||||
if (oox_num_style->m_oAbstractNumId.IsInit() == false) return;
|
||||
|
||||
|
||||
odt_context->styles_context()->lists_styles().start_style(oox_num_style->m_oAbstractNumId->GetValue());
|
||||
odt_context->styles_context()->lists_styles().start_style(true, oox_num_style->m_oAbstractNumId->GetValue());
|
||||
//// Childs
|
||||
//std::vector<OOX::Numbering::CLvl > m_arrLvl;
|
||||
//nullable<ComplexTypes::Word::CMultiLevelType > m_oMultiLevelType;
|
||||
@ -3184,7 +3229,9 @@ void DocxConverter::convert(OOX::Numbering::CLvl* oox_num_lvl)
|
||||
|
||||
}
|
||||
if (type_list == 2 || type_list == 3)
|
||||
{
|
||||
odt_context->styles_context()->lists_styles().set_bullet_image_size(size_bullet_number_marker);
|
||||
}
|
||||
|
||||
if (oox_num_lvl->m_oLvlRestart.IsInit() && oox_num_lvl->m_oLvlRestart->m_oVal.IsInit() && type_list == 1)
|
||||
{
|
||||
|
||||
@ -95,6 +95,7 @@ namespace OOX
|
||||
class CTcBorders;
|
||||
class CTblBorders;
|
||||
class CSdt;
|
||||
class CSdtContent;
|
||||
class CBackground;
|
||||
class CLockedCanvas;
|
||||
|
||||
@ -146,12 +147,15 @@ namespace Oox2Odf
|
||||
virtual void convertDocument();
|
||||
virtual void write(const std::wstring & path);
|
||||
|
||||
virtual OOX::IFileContainer *current_document();
|
||||
virtual odf_writer::odf_conversion_context *odf_context();
|
||||
virtual PPTX::Theme *oox_theme();
|
||||
virtual PPTX::Logic::ClrMap *oox_clrMap();
|
||||
virtual std::wstring find_link_by_id (std::wstring sId, int t);
|
||||
virtual NSCommon::smart_ptr<OOX::File> find_file_by_id(std::wstring sId);
|
||||
|
||||
void convert(OOX::WritingElement *oox_unknown);
|
||||
void convert(OOX::WritingElement *oox_unknown);
|
||||
void convert(OOX::Logic::CSdtContent *oox_sdt);
|
||||
private:
|
||||
struct _section
|
||||
{
|
||||
@ -220,7 +224,7 @@ namespace Oox2Odf
|
||||
|
||||
void convert(OOX::Drawing::CAnchor *oox_anchor);
|
||||
void convert(OOX::Drawing::CInline *oox_inline);
|
||||
|
||||
|
||||
void convert(SimpleTypes::CTheme<> *oox_font_theme,_CP_OPT(std::wstring) & odf_font_name);
|
||||
void convert(ComplexTypes::Word::CColor *color, _CP_OPT(odf_types::color) & odf_color);
|
||||
void convert(SimpleTypes::CUniversalMeasure *oox_size, _CP_OPT(odf_types::length) & odf_size);
|
||||
|
||||
@ -60,7 +60,18 @@ namespace Oox2Odf
|
||||
{
|
||||
PptxConverter::PptxConverter(const std::wstring & path, const ProgressCallback* CallBack)
|
||||
{
|
||||
const OOX::CPath oox_path(std::wstring(path.c_str()));
|
||||
current_clrMap = NULL;
|
||||
current_slide = NULL;
|
||||
current_theme = NULL;
|
||||
current_tableStyles = NULL;
|
||||
|
||||
presentation = NULL;
|
||||
output_document = NULL;
|
||||
odp_context = NULL;
|
||||
|
||||
pCallBack = CallBack;
|
||||
|
||||
const OOX::CPath oox_path(std::wstring(path.c_str()));
|
||||
|
||||
pptx_document = new PPTX::Folder();
|
||||
if (!pptx_document->isValid(oox_path.GetPath())) // true ???
|
||||
@ -82,13 +93,6 @@ PptxConverter::PptxConverter(const std::wstring & path, const ProgressCallback*
|
||||
output_document = new odf_writer::package::odf_document(L"presentation");
|
||||
odp_context = new odf_writer::odp_conversion_context(output_document);
|
||||
|
||||
current_clrMap = NULL;
|
||||
current_slide = NULL;
|
||||
current_theme = NULL;
|
||||
current_tableStyles = NULL;
|
||||
|
||||
pCallBack = CallBack;
|
||||
|
||||
if (UpdateProgress(290000))return;
|
||||
}
|
||||
PptxConverter::~PptxConverter()
|
||||
@ -123,7 +127,15 @@ PPTX::Logic::ClrMap* PptxConverter::oox_clrMap()
|
||||
{
|
||||
return current_clrMap;
|
||||
}
|
||||
|
||||
OOX::IFileContainer* PptxConverter::current_document()
|
||||
{
|
||||
if (oox_current_child_document)
|
||||
return oox_current_child_document;
|
||||
else if (current_slide)
|
||||
return current_slide;
|
||||
else
|
||||
return pptx_document;
|
||||
}
|
||||
NSCommon::smart_ptr<OOX::File> PptxConverter::find_file_by_id(std::wstring sId)
|
||||
{
|
||||
smart_ptr<OOX::File> oFile;
|
||||
@ -259,6 +271,8 @@ void PptxConverter::convert_styles()
|
||||
odp_context->page_layout_context()->create_layer_sets();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void PptxConverter::convert_settings()
|
||||
{
|
||||
|
||||
@ -317,12 +331,15 @@ void PptxConverter::convert_slides()
|
||||
if (pFind == m_mapMasters.end())
|
||||
{
|
||||
master_style_name = L"MasterPage";
|
||||
if (bShowMasterSp)
|
||||
{
|
||||
if (slide->Master->cSld.attrName.IsInit()) master_style_name = slide->Master->cSld.attrName.get();
|
||||
else if (current_theme->name.IsInit()) master_style_name = current_theme->name.get();
|
||||
}
|
||||
|
||||
bool bShowLayoutMasterAnim = slide->Layout->showMasterPhAnim.get_value_or(true);
|
||||
bool bShowLayoutMasterSp = slide->Layout->showMasterSp.get_value_or(true);
|
||||
|
||||
if (slide->Master->cSld.attrName.IsInit()) master_style_name = slide->Master->cSld.attrName.get();
|
||||
else if (current_theme->name.IsInit()) master_style_name = current_theme->name.get();
|
||||
|
||||
master_style_name += L"_" ;
|
||||
|
||||
if (slide->Layout->cSld.attrName.IsInit()) master_style_name += slide->Layout->cSld.attrName.get();
|
||||
else if (slide->Layout->attrType.IsInit()) master_style_name += slide->Layout->attrType->get();
|
||||
else
|
||||
@ -332,15 +349,18 @@ void PptxConverter::convert_slides()
|
||||
convert_common();
|
||||
|
||||
current_slide = slide->Master.operator->();
|
||||
if (bShowMasterSp)
|
||||
convert_slide(&slide->Master->cSld, current_txStyles, false);
|
||||
|
||||
if (bShowLayoutMasterSp && bShowMasterSp)
|
||||
convert_slide(&slide->Master->cSld, current_txStyles, false, true);
|
||||
else
|
||||
convert(slide->Master->cSld.bg.GetPointer());
|
||||
|
||||
if (slide->Layout->clrMapOvr.IsInit() && slide->Layout->clrMapOvr->overrideClrMapping.IsInit())
|
||||
current_clrMap = slide->Layout->clrMapOvr->overrideClrMapping.GetPointer();
|
||||
current_slide = slide->Layout.operator->();
|
||||
convert_slide(&slide->Layout->cSld, current_txStyles, true);
|
||||
|
||||
convert_slide(&slide->Layout->cSld, current_txStyles, true, bShowLayoutMasterSp);
|
||||
//add note master
|
||||
odp_context->end_master_slide();
|
||||
|
||||
m_mapMasters.insert(std::make_pair(master_name, master_style_name));
|
||||
@ -379,7 +399,7 @@ void PptxConverter::convert_slides()
|
||||
odp_context->current_slide().set_master_page (master_style_name);
|
||||
odp_context->current_slide().set_layout_page (layout_style_name);
|
||||
|
||||
convert_slide (slide->cSld.GetPointer(), current_txStyles, true);
|
||||
convert_slide (slide->cSld.GetPointer(), current_txStyles, true, bShowMasterSp);
|
||||
convert (slide->comments.operator->());
|
||||
convert (slide->Note.operator->());
|
||||
|
||||
@ -935,7 +955,7 @@ void PptxConverter::convert(PPTX::Logic::Bg *oox_background)
|
||||
odp_context->end_drawings();
|
||||
}
|
||||
|
||||
void PptxConverter::convert_slide(PPTX::Logic::CSld *oox_slide, PPTX::Logic::TxStyles* txStyles, bool bPlaceholders)
|
||||
void PptxConverter::convert_slide(PPTX::Logic::CSld *oox_slide, PPTX::Logic::TxStyles* txStyles, bool bPlaceholders, bool bFillUp)
|
||||
{
|
||||
if (oox_slide == NULL) return;
|
||||
|
||||
@ -946,63 +966,90 @@ void PptxConverter::convert_slide(PPTX::Logic::CSld *oox_slide, PPTX::Logic::TxS
|
||||
odp_context->current_slide().set_page_name(oox_slide->attrName.get());
|
||||
|
||||
convert(oox_slide->bg.GetPointer());
|
||||
|
||||
bool bMaster = *odf_context()->drawing_context()->get_presentation();
|
||||
|
||||
for (size_t i = 0 ; i < oox_slide->spTree.SpTreeElems.size(); i++)
|
||||
{
|
||||
smart_ptr<PPTX::WrapperWritingElement> pElem = oox_slide->spTree.SpTreeElems[i].GetElem();
|
||||
smart_ptr<PPTX::Logic::Shape> pShape = pElem.smart_dynamic_cast<PPTX::Logic::Shape>();
|
||||
|
||||
if (pShape.IsInit() && pShape->nvSpPr.nvPr.ph.is_init())
|
||||
odf_context()->drawing_context()->start_drawing();
|
||||
|
||||
if (pShape.IsInit())
|
||||
{
|
||||
pShape->FillLevelUp();
|
||||
|
||||
if (!bPlaceholders)
|
||||
continue;
|
||||
|
||||
PPTX::Logic::TextListStyle * listMasterStyle = NULL;
|
||||
|
||||
if (txStyles)
|
||||
if (pShape->nvSpPr.nvPr.ph.is_init())
|
||||
{
|
||||
std::wstring type = pShape->nvSpPr.nvPr.ph->type.get_value_or(_T("body"));
|
||||
if ((type == L"title") || (type == L"ctrTitle"))
|
||||
listMasterStyle = txStyles->titleStyle.GetPointer();
|
||||
else if ((type == L"body") || (type == L"subTitle") || (type == L"obj"))
|
||||
listMasterStyle = txStyles->bodyStyle.GetPointer();
|
||||
else if (type != L"")
|
||||
listMasterStyle = txStyles->otherStyle.GetPointer();
|
||||
}
|
||||
PPTX::Logic::Shape update_shape;
|
||||
|
||||
if (listMasterStyle)
|
||||
{
|
||||
update_shape.txBody = new PPTX::Logic::TxBody();
|
||||
if (bFillUp)
|
||||
pShape->FillLevelUp();
|
||||
|
||||
PPTX::Logic::TextListStyle *newListStyle = new PPTX::Logic::TextListStyle();
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
if (pShape->nvSpPr.nvPr.ph->type.IsInit())
|
||||
{
|
||||
if(listMasterStyle->levels[i].is_init())
|
||||
listMasterStyle->levels[i]->Merge(newListStyle->levels[i]);
|
||||
int ph_type = pShape->nvSpPr.nvPr.ph->type->GetBYTECode();
|
||||
|
||||
//if (!bMaster && (ph_type == 5 || ph_type == 6 || ph_type == 7 || ph_type == 12))
|
||||
// continue;
|
||||
|
||||
odf_context()->drawing_context()->set_placeholder_type(ph_type);
|
||||
}
|
||||
update_shape.txBody->lstStyle.reset(newListStyle);
|
||||
else
|
||||
odf_context()->drawing_context()->set_placeholder_type(0);
|
||||
|
||||
if (pShape->nvSpPr.nvPr.ph->idx.IsInit())
|
||||
odf_context()->drawing_context()->set_placeholder_id(pShape->nvSpPr.nvPr.ph->idx.get());
|
||||
|
||||
if (!bPlaceholders)
|
||||
continue;
|
||||
|
||||
PPTX::Logic::TextListStyle * listMasterStyle = NULL;
|
||||
|
||||
if (txStyles)
|
||||
{
|
||||
std::wstring type = pShape->nvSpPr.nvPr.ph->type.get_value_or(_T("body"));
|
||||
if ((type == L"title") || (type == L"ctrTitle"))
|
||||
listMasterStyle = txStyles->titleStyle.GetPointer();
|
||||
else if ((type == L"body") || (type == L"subTitle") || (type == L"obj"))
|
||||
listMasterStyle = txStyles->bodyStyle.GetPointer();
|
||||
else if (type != L"")
|
||||
listMasterStyle = txStyles->otherStyle.GetPointer();
|
||||
}
|
||||
PPTX::Logic::Shape update_shape;
|
||||
|
||||
if (listMasterStyle)
|
||||
{
|
||||
update_shape.txBody = new PPTX::Logic::TxBody();
|
||||
|
||||
PPTX::Logic::TextListStyle *newListStyle = new PPTX::Logic::TextListStyle();
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
if(listMasterStyle->levels[i].is_init())
|
||||
listMasterStyle->levels[i]->Merge(newListStyle->levels[i]);
|
||||
}
|
||||
update_shape.txBody->lstStyle.reset(newListStyle);
|
||||
}
|
||||
pShape->Merge(update_shape);
|
||||
OoxConverter::convert(&update_shape);
|
||||
}
|
||||
|
||||
pShape->Merge(update_shape);
|
||||
else if (pShape->txBody.IsInit() && presentation->defaultTextStyle.IsInit())
|
||||
{//default text style with master clrScheme
|
||||
PPTX::Logic::Shape update_shape;
|
||||
|
||||
update_shape.txBody = new PPTX::Logic::TxBody();
|
||||
|
||||
//if (pShape->IsListStyleEmpty() == false)
|
||||
//{
|
||||
// //create list style
|
||||
//}else if (listMasterStyle)
|
||||
//{
|
||||
//}
|
||||
presentation->defaultTextStyle->Merge(update_shape.txBody->lstStyle);
|
||||
|
||||
OoxConverter::convert(&update_shape);
|
||||
pShape->Merge(update_shape);
|
||||
OoxConverter::convert(&update_shape);
|
||||
}
|
||||
else
|
||||
OoxConverter::convert(pShape.operator->());
|
||||
}
|
||||
else
|
||||
{
|
||||
OoxConverter::convert(pElem.operator->());
|
||||
}
|
||||
//convert(oox_slide->spTree.SpTreeElems[i].GetElem().operator->());
|
||||
odf_context()->drawing_context()->end_drawing();
|
||||
}
|
||||
convert(oox_slide->controls.GetPointer());
|
||||
}
|
||||
@ -1030,7 +1077,11 @@ void PptxConverter::convert_layout(PPTX::Logic::CSld *oox_slide)
|
||||
odf_context()->drawing_context()->start_drawing();
|
||||
odf_context()->drawing_context()->start_element(elm);
|
||||
|
||||
OoxConverter::convert(&pShape->nvSpPr.nvPr);
|
||||
odf_context()->drawing_context()->set_placeholder_type(type);
|
||||
|
||||
if (pShape->nvSpPr.nvPr.ph->idx.IsInit())
|
||||
odf_context()->drawing_context()->set_placeholder_id(*pShape->nvSpPr.nvPr.ph->idx);
|
||||
|
||||
OoxConverter::convert(pShape->spPr.xfrm.GetPointer());
|
||||
|
||||
odf_context()->drawing_context()->end_element();
|
||||
|
||||
@ -97,16 +97,17 @@ namespace Oox2Odf
|
||||
virtual void convertDocument();
|
||||
virtual void write(const std::wstring & path);
|
||||
|
||||
virtual OOX::IFileContainer *current_document();
|
||||
virtual odf_writer::odf_conversion_context *odf_context();
|
||||
virtual PPTX::Theme *oox_theme();
|
||||
virtual PPTX::Logic::ClrMap *oox_clrMap();
|
||||
|
||||
|
||||
virtual std::wstring find_link_by_id (std::wstring sId, int t);
|
||||
virtual NSCommon::smart_ptr<OOX::File> find_file_by_id (std::wstring sId);
|
||||
|
||||
void convert(OOX::WritingElement *oox_unknown);
|
||||
|
||||
void convert_slide (PPTX::Logic::CSld *oox_slide, PPTX::Logic::TxStyles* txStyles, bool bPlaceholders = true);
|
||||
void convert_slide (PPTX::Logic::CSld *oox_slide, PPTX::Logic::TxStyles* txStyles, bool bPlaceholders, bool bFillUp);
|
||||
void convert_layout (PPTX::Logic::CSld *oox_slide);
|
||||
void convert (PPTX::Comments *oox_comments);
|
||||
void convert (PPTX::NotesSlide *oox_note);
|
||||
|
||||
@ -94,6 +94,15 @@ PPTX::Theme* XlsxConverter::oox_theme()
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
OOX::IFileContainer* XlsxConverter::current_document()
|
||||
{
|
||||
if (xlsx_current_container)
|
||||
return xlsx_current_container;
|
||||
else if (oox_current_child_document)
|
||||
return oox_current_child_document;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
smart_ptr<OOX::File> XlsxConverter::find_file_by_id(std::wstring sId)
|
||||
{
|
||||
smart_ptr<OOX::File> oFile;
|
||||
@ -1718,7 +1727,9 @@ void XlsxConverter::convert(OOX::Spreadsheet::CCellAnchor *oox_anchor)
|
||||
if (oox_anchor->m_oExt.IsInit())
|
||||
{
|
||||
}
|
||||
OoxConverter::convert(oox_anchor->m_oElement.GetPointer());
|
||||
odf_context()->drawing_context()->start_drawing();
|
||||
OoxConverter::convert(oox_anchor->m_oElement.GetPointer());
|
||||
odf_context()->drawing_context()->end_drawing();
|
||||
}
|
||||
|
||||
void XlsxConverter::convert(OOX::Spreadsheet::CDrawing *oox_drawing)
|
||||
@ -1748,236 +1759,6 @@ void XlsxConverter::convert(OOX::Spreadsheet::CFromTo* oox_from_to, oox_table_po
|
||||
if (oox_from_to->m_oColOff.IsInit()) pos->col_off = oox_from_to->m_oColOff->GetValue();//pt
|
||||
}
|
||||
|
||||
//void XlsxConverter::convert(OOX::Spreadsheet::CGroupShape* oox_group_shape)
|
||||
//{
|
||||
// if (!oox_group_shape)return;
|
||||
// if (oox_group_shape->m_arrItems.size() < 1) return;
|
||||
//
|
||||
// ods_context->drawing_context()->start_group();
|
||||
//
|
||||
// if (oox_group_shape->m_oNvGroupSpPr.IsInit())
|
||||
// {
|
||||
// if (oox_group_shape->m_oNvGroupSpPr->m_oCNvPr.IsInit())
|
||||
// {
|
||||
// if (oox_group_shape->m_oNvGroupSpPr->m_oCNvPr->m_sName.IsInit())
|
||||
// ods_context->drawing_context()->set_group_name(*oox_group_shape->m_oNvGroupSpPr->m_oCNvPr->m_sName);
|
||||
// if (oox_group_shape->m_oNvGroupSpPr->m_oCNvPr->m_oId.IsInit())
|
||||
// ods_context->drawing_context()->set_group_z_order(oox_group_shape->m_oNvGroupSpPr->m_oCNvPr->m_oId->GetValue());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// OoxConverter::convert(oox_group_shape->m_oGroupSpPr.GetPointer());
|
||||
//
|
||||
// for (unsigned int i=0; i < oox_group_shape->m_arrItems.size(); i++)
|
||||
// {
|
||||
// switch(oox_group_shape->m_arrItems[i]->getType())
|
||||
// {
|
||||
// case OOX::et_x_Shape:
|
||||
// {
|
||||
// OOX::Spreadsheet::CShape* item = dynamic_cast<OOX::Spreadsheet::CShape*>(oox_group_shape->m_arrItems[i]);
|
||||
// convert(item);
|
||||
// }break;
|
||||
// case OOX::et_x_ConnShape:
|
||||
// {
|
||||
// OOX::Spreadsheet::CConnShape* item = dynamic_cast<OOX::Spreadsheet::CConnShape*>(oox_group_shape->m_arrItems[i]);
|
||||
// convert(item);
|
||||
// }break;
|
||||
// case OOX::et_x_GroupShape:
|
||||
// {
|
||||
// OOX::Spreadsheet::CGroupShape* item = dynamic_cast<OOX::Spreadsheet::CGroupShape*>(oox_group_shape->m_arrItems[i]);
|
||||
// convert(item);
|
||||
// }break;
|
||||
// case OOX::et_x_Pic:
|
||||
// {
|
||||
// OOX::Spreadsheet::CPic* item = dynamic_cast<OOX::Spreadsheet::CPic*>(oox_group_shape->m_arrItems[i]);
|
||||
// convert(item);
|
||||
// }break;
|
||||
// }
|
||||
// }
|
||||
// ods_context->drawing_context()->end_group();
|
||||
//}
|
||||
//
|
||||
//void XlsxConverter::convert(OOX::Spreadsheet::CShape* oox_shape)
|
||||
//{
|
||||
// if (!oox_shape)return;
|
||||
// if (!oox_shape->m_oSpPr.IsInit()) return;
|
||||
//
|
||||
// ods_context->drawing_context()->start_drawing();
|
||||
//
|
||||
// int type = -1;
|
||||
// if (oox_shape->m_oSpPr->m_oCustGeom.IsInit())
|
||||
// {
|
||||
// type = 1000;//6???
|
||||
// }
|
||||
// if (oox_shape->m_oSpPr->m_oPrstGeom.IsInit())
|
||||
// {
|
||||
// OOX::Drawing::CPresetGeometry2D * geometry = oox_shape->m_oSpPr->m_oPrstGeom.GetPointer();
|
||||
// type =(geometry->m_oPrst.GetValue());
|
||||
// }
|
||||
//
|
||||
// if ((oox_shape->m_oNvSpPr.IsInit()) && (oox_shape->m_oNvSpPr->m_oCNvSpPr.IsInit()))
|
||||
// {
|
||||
// if (oox_shape->m_oNvSpPr->m_oCNvSpPr->m_otxBox.GetValue() == 1)
|
||||
// type = 2000; //textBox
|
||||
// }
|
||||
//
|
||||
// if (type < 0)return;
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// if (type == 2000) ods_context->drawing_context()->start_text_box();
|
||||
// else ods_context->drawing_context()->start_shape(type);
|
||||
//
|
||||
// {
|
||||
// OoxConverter::convert(oox_shape->m_oSpPr.GetPointer(), oox_shape->m_oShapeStyle.GetPointer());
|
||||
//
|
||||
// if (oox_shape->m_oNvSpPr.IsInit())
|
||||
// {
|
||||
// OoxConverter::convert(oox_shape->m_oNvSpPr->m_oCNvPr.GetPointer()); //имя, описалово, номер ...
|
||||
// convert(oox_shape->m_oNvSpPr->m_oCNvSpPr.GetPointer()); //заблокированности ... todooo
|
||||
// }
|
||||
// if (oox_shape->m_oShapeStyle.IsInit())
|
||||
// {
|
||||
// //доп эффекты
|
||||
//
|
||||
// }
|
||||
// if (oox_shape->m_oTxBody.IsInit())
|
||||
// {
|
||||
// ods_context->start_text_context();
|
||||
// OoxConverter::convert(oox_shape->m_oTxBody->m_oBodyPr.GetPointer());
|
||||
//
|
||||
// for (unsigned int i=0 ; i < oox_shape->m_oTxBody->m_arrItems.size();i++)
|
||||
// {
|
||||
// OoxConverter::convert(oox_shape->m_oTxBody->m_arrItems[i]);
|
||||
// }
|
||||
// ods_context->drawing_context()->set_text( ods_context->text_context());
|
||||
// ods_context->end_text_context();
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// if (type == 2000)ods_context->drawing_context()->end_text_box();
|
||||
// else ods_context->drawing_context()->end_shape();
|
||||
//
|
||||
// ods_context->drawing_context()->end_drawing();
|
||||
//
|
||||
//}
|
||||
//
|
||||
//void XlsxConverter::convert(OOX::Spreadsheet::CConnShape* oox_shape)
|
||||
//{
|
||||
// if (!oox_shape)return;
|
||||
// if (!oox_shape->m_oSpPr.IsInit()) return;
|
||||
//
|
||||
// ods_context->drawing_context()->start_drawing();
|
||||
//
|
||||
// int type = -1;
|
||||
// if (oox_shape->m_oSpPr->m_eGeomType == OOX::Drawing::geomtypeCustom)
|
||||
// {
|
||||
// type = 1000;//?????
|
||||
// }
|
||||
// else if (oox_shape->m_oSpPr->m_eGeomType == OOX::Drawing::geomtypePreset)
|
||||
// {
|
||||
// if (oox_shape->m_oSpPr->m_oPrstGeom.IsInit())
|
||||
// {
|
||||
// OOX::Drawing::CPresetGeometry2D * geometry = oox_shape->m_oSpPr->m_oPrstGeom.GetPointer();
|
||||
// type = (int)(geometry->m_oPrst.GetValue());
|
||||
// }
|
||||
// }
|
||||
// if (type < 0)return;
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// ods_context->drawing_context()->start_shape(type);
|
||||
// {
|
||||
// OoxConverter::convert(oox_shape->m_oSpPr.GetPointer(), oox_shape->m_oShapeStyle.GetPointer());
|
||||
//
|
||||
// //частенько приплывает из стиля заполенение объекта .. а он то одномерный :)
|
||||
// odf_context()->drawing_context()->start_area_properties();
|
||||
// odf_context()->drawing_context()->set_no_fill();
|
||||
// odf_context()->drawing_context()->end_area_properties();
|
||||
//
|
||||
// if (oox_shape->m_oNvConnSpPr.IsInit())
|
||||
// {
|
||||
// if (oox_shape->m_oNvConnSpPr->m_oCNvPr.IsInit())
|
||||
// {
|
||||
// OoxConverter::convert(oox_shape->m_oNvConnSpPr->m_oCNvPr.GetPointer());
|
||||
// }
|
||||
//
|
||||
// if (oox_shape->m_oNvConnSpPr->m_oCNvConnSpPr.IsInit())
|
||||
// {
|
||||
// }
|
||||
// }
|
||||
// //avLst
|
||||
// }
|
||||
// ods_context->drawing_context()->end_shape();
|
||||
// ods_context->drawing_context()->end_drawing();
|
||||
//}
|
||||
//
|
||||
//
|
||||
//void XlsxConverter::convert(OOX::Spreadsheet::CPic* oox_picture)
|
||||
//{
|
||||
// if (!oox_picture)return;
|
||||
// if (!oox_picture->m_oBlipFill.IsInit()) return; // невeрная структура оох
|
||||
//
|
||||
// ods_context->drawing_context()->start_drawing();
|
||||
//
|
||||
// std::wstring pathImage;
|
||||
// double Width=0, Height = 0;
|
||||
//
|
||||
// if (oox_picture->m_oBlipFill->m_oBlip.IsInit())
|
||||
// {
|
||||
// std::wstring sID = oox_picture->m_oBlipFill->m_oBlip->m_oEmbed.GetValue();
|
||||
// pathImage = find_link_by_id(sID,1);
|
||||
//
|
||||
// if (pathImage.empty())
|
||||
// {
|
||||
// sID = oox_picture->m_oBlipFill->m_oBlip->m_oLink.GetValue();
|
||||
// //???
|
||||
// }
|
||||
// _graphics_utils_::GetResolution(pathImage.c_str(), Width, Height);
|
||||
// }
|
||||
// ods_context->start_image(pathImage);
|
||||
// {
|
||||
// if (oox_picture->m_oBlipFill->m_oTile.IsInit())
|
||||
// {
|
||||
// ods_context->drawing_context()->set_image_style_repeat(2);
|
||||
// }
|
||||
// if (oox_picture->m_oBlipFill->m_oStretch.IsInit())
|
||||
// {
|
||||
// ods_context->drawing_context()->set_image_style_repeat(1);
|
||||
// }
|
||||
// if (oox_picture->m_oBlipFill->m_oSrcRect.IsInit() && Width >0 && Height >0)
|
||||
// {
|
||||
// ods_context->drawing_context()->set_image_client_rect_inch(
|
||||
// oox_picture->m_oBlipFill->m_oSrcRect->m_oL.GetValue()/100. * Width / currentSystemDPI ,
|
||||
// oox_picture->m_oBlipFill->m_oSrcRect->m_oT.GetValue()/100. * Height / currentSystemDPI ,
|
||||
// oox_picture->m_oBlipFill->m_oSrcRect->m_oR.GetValue()/100. * Width / currentSystemDPI ,
|
||||
// oox_picture->m_oBlipFill->m_oSrcRect->m_oB.GetValue()/100. * Height / currentSystemDPI );
|
||||
// }
|
||||
// if (oox_picture->m_oNvPicPr.IsInit())
|
||||
// {
|
||||
// OoxConverter::convert(oox_picture->m_oNvPicPr->m_oCNvPr.GetPointer());
|
||||
//
|
||||
// if (oox_picture->m_oNvPicPr->m_oCNvPicPr.IsInit())
|
||||
// {
|
||||
// if (oox_picture->m_oNvPicPr->m_oCNvPicPr->m_oPicLocks.IsInit())
|
||||
// {
|
||||
// //if (oox_picture->m_oNvPicPr->m_oCNvPicPr->m_oPicLocks->m_oNoChangeAspect)
|
||||
// //{
|
||||
// //}
|
||||
// //if (oox_picture->m_oNvPicPr->m_oCNvPicPr->m_oPicLocks->m_oNoCrop))
|
||||
// //{
|
||||
// //}
|
||||
// //if (oox_picture->m_oNvPicPr->m_oCNvPicPr->m_oPicLocks->m_oNoResize)
|
||||
// //{
|
||||
// //}
|
||||
// }
|
||||
// //m_oExtLst
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// OoxConverter::convert(oox_picture->m_oSpPr.GetPointer(), oox_picture->m_oShapeStyle.GetPointer());
|
||||
//
|
||||
// }
|
||||
// ods_context->drawing_context()->end_image();
|
||||
// ods_context->drawing_context()->end_drawing();
|
||||
//}
|
||||
//
|
||||
void XlsxConverter::convert(OOX::Spreadsheet::CConditionalFormatting *oox_cond_fmt)
|
||||
{
|
||||
if (!oox_cond_fmt)return;
|
||||
|
||||
@ -130,6 +130,7 @@ namespace Oox2Odf
|
||||
virtual void convertDocument();
|
||||
virtual void write(const std::wstring & path);
|
||||
|
||||
virtual OOX::IFileContainer *current_document();
|
||||
virtual odf_writer::odf_conversion_context *odf_context();
|
||||
virtual PPTX::Theme *oox_theme();
|
||||
virtual std::wstring find_link_by_id (std::wstring sId, int t);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Version="8,00"
|
||||
Name="Oox2OdfConverter"
|
||||
ProjectGUID="{BEE01B53-244A-44E6-8947-ED9342D9247E}"
|
||||
RootNamespace="Oox2OdfConverter"
|
||||
|
||||
@ -4309,7 +4309,8 @@ HRESULT CDrawingConverter::LoadClrMap(const std::wstring& bsXml)
|
||||
|
||||
if (oNode.IsValid())
|
||||
{
|
||||
pClrMap->fromXMLW(oNode.ReadNode(L"w:clrSchemeMapping"));
|
||||
XmlUtils::CXmlNode nodeMap = oNode.ReadNode(L"w:clrSchemeMapping");
|
||||
pClrMap->fromXML(nodeMap);
|
||||
}
|
||||
|
||||
*m_pClrMap = pClrMap;
|
||||
|
||||
@ -95,7 +95,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("dx"), x)
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("dy"), y)
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("dz"), z)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -63,7 +63,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("w"), w)
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("h"), h)
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("prst"), prst)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -120,21 +120,29 @@ namespace PPTX
|
||||
oAttr.Write(_T("noResize"), noResize);
|
||||
oAttr.Write(_T("noSelect"), noSelect);
|
||||
|
||||
return XmlUtils::CreateNode(m_namespace + L":cNvGraphicFramePr", oAttr.m_strValue.empty() ? L"" : XmlUtils::CreateNode(L"a:graphicFrameLocks", oAttr));
|
||||
std::wstring namespaceLocks = L"a";
|
||||
if (m_namespace == L"wp") namespaceLocks = L"wp";
|
||||
|
||||
return XmlUtils::CreateNode(m_namespace + L":cNvGraphicFramePr", oAttr.m_strValue.empty() ? L"" : XmlUtils::CreateNode(namespaceLocks + L":graphicFrameLocks", oAttr));
|
||||
}
|
||||
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
std::wstring namespace_ = m_namespace;
|
||||
std::wstring namespace_ = m_namespace;
|
||||
std::wstring namespaceLock_ = L"a";
|
||||
|
||||
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_XLSX) namespace_ = L"xdr";
|
||||
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_DOCX) namespace_ = L"wp";
|
||||
if (pWriter->m_lDocType == XMLWRITER_DOC_TYPE_DOCX)
|
||||
{
|
||||
namespaceLock_ = L"wp";
|
||||
namespace_ = L"wp";
|
||||
}
|
||||
|
||||
pWriter->StartNode(namespace_ + L":cNvGraphicFramePr");
|
||||
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->StartNode(_T("a:graphicFrameLocks"));
|
||||
pWriter->StartNode(namespaceLock_ + L":graphicFrameLocks");
|
||||
|
||||
pWriter->StartAttributes();
|
||||
|
||||
@ -147,7 +155,7 @@ namespace PPTX
|
||||
|
||||
pWriter->EndAttributes();
|
||||
|
||||
pWriter->EndNode(_T("a:graphicFrameLocks"));
|
||||
pWriter->EndNode(namespaceLock_ + L":graphicFrameLocks");
|
||||
|
||||
pWriter->EndNode(namespace_ + L":cNvGraphicFramePr");
|
||||
}
|
||||
@ -228,4 +236,4 @@ namespace PPTX
|
||||
} // namespace Logic
|
||||
} // namespace PPTX
|
||||
|
||||
#endif // PPTX_LOGIC_CNVGRAPHICFRAMESPPR_INCLUDE_H
|
||||
#endif // PPTX_LOGIC_CNVGRAPHICFRAMESPPR_INCLUDE_H
|
||||
|
||||
@ -78,7 +78,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("prst"), prst)
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("fov"), fov)
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("zoom"), zoom)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -88,7 +88,7 @@ namespace PPTX
|
||||
Limit::ColorSchemeIndex lColorIndex_folHlink;
|
||||
Limit::ColorSchemeIndex lColorIndex_hlink;
|
||||
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("accent1"), lColorIndex_accent1)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("accent2"), lColorIndex_accent2 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("accent3"), lColorIndex_accent3 )
|
||||
@ -98,10 +98,15 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("bg1"), lColorIndex_bg1 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("bg2"), lColorIndex_bg2 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("tx1"), lColorIndex_tx1 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("tx1"), lColorIndex_tx2 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("tx2"), lColorIndex_tx2 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("folHlink"), lColorIndex_folHlink )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("hlink"), lColorIndex_hlink )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("t1"), lColorIndex_tx1 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("t2"), lColorIndex_tx2 )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("followedHyperlink"), lColorIndex_folHlink )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("hyperlink"), lColorIndex_hlink )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent1"), lColorIndex_accent1));
|
||||
ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent2"), lColorIndex_accent2));
|
||||
@ -123,6 +128,23 @@ namespace PPTX
|
||||
ColorMap.clear();
|
||||
|
||||
Limit::ColorSchemeIndex lColorIndex;
|
||||
|
||||
if (m_name == L"w:clrSchemeMapping")
|
||||
{
|
||||
lColorIndex._set(node.GetAttribute(_T("w:accent1"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent1"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:accent2"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent2"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:accent3"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent3"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:accent4"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent4"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:accent5"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent5"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:accent6"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent6"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:bg1"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("bg1"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:bg2"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("bg2"), lColorIndex));
|
||||
|
||||
lColorIndex._set(node.GetAttribute(_T("w:t1"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("tx1"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:t2"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("tx2"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:followedHyperlink"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("folHlink"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:hyperlink"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("hlink"), lColorIndex));
|
||||
}
|
||||
|
||||
lColorIndex._set(node.GetAttribute(_T("accent1"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent1"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("accent2"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent2"), lColorIndex));
|
||||
@ -138,37 +160,29 @@ namespace PPTX
|
||||
lColorIndex._set(node.GetAttribute(_T("hlink"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("hlink"), lColorIndex));
|
||||
}
|
||||
|
||||
void fromXMLW(const XmlUtils::CXmlNode& cnode)
|
||||
{
|
||||
XmlUtils::CXmlNode& node = const_cast<XmlUtils::CXmlNode&> (cnode);
|
||||
|
||||
m_name = node.GetName();
|
||||
|
||||
ColorMap.clear();
|
||||
|
||||
Limit::ColorSchemeIndex lColorIndex;
|
||||
|
||||
lColorIndex._set(node.GetAttribute(_T("w:accent1"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent1"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:accent2"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent2"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:accent3"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent3"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:accent4"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent4"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:accent5"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent5"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:accent6"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("accent6"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:bg1"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("bg1"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:bg2"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("bg2"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:t1"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("tx1"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:t2"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("tx2"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:followedHyperlink"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("folHlink"), lColorIndex));
|
||||
lColorIndex._set(node.GetAttribute(_T("w:hyperlink"))); ColorMap.insert(std::pair<std::wstring,Limit::ColorSchemeIndex>(_T("hlink"), lColorIndex));
|
||||
}
|
||||
|
||||
virtual std::wstring toXML() const
|
||||
{
|
||||
XmlUtils::CAttribute oAttr;
|
||||
|
||||
for (std::map<std::wstring, Limit::ColorSchemeIndex>::const_iterator pPair = ColorMap.begin(); pPair != ColorMap.end(); ++pPair)
|
||||
if (m_name == L"w:clrSchemeMapping")
|
||||
{
|
||||
oAttr.Write(pPair->first, pPair->second.get());
|
||||
for (std::map<std::wstring, Limit::ColorSchemeIndex>::const_iterator pPair = ColorMap.begin(); pPair != ColorMap.end(); ++pPair)
|
||||
{
|
||||
std::wstring att_name = L"w:" + pPair->first;
|
||||
if (pPair->first == L"tx1") att_name = L"w:t1";
|
||||
else if (pPair->first == L"tx2") att_name = L"w:t2";
|
||||
else if (pPair->first == L"folHlink") att_name = L"w:followedHyperlink";
|
||||
else if (pPair->first == L"hlink") att_name = L"w:hyperlink";
|
||||
|
||||
oAttr.Write(att_name, pPair->second.get());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (std::map<std::wstring, Limit::ColorSchemeIndex>::const_iterator pPair = ColorMap.begin(); pPair != ColorMap.end(); ++pPair)
|
||||
{
|
||||
oAttr.Write(pPair->first, pPair->second.get());
|
||||
}
|
||||
}
|
||||
|
||||
return XmlUtils::CreateNode(m_name, oAttr);
|
||||
@ -229,12 +243,9 @@ namespace PPTX
|
||||
pReader->Seek(_e);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
std::map<std::wstring, Limit::ColorSchemeIndex> ColorMap;
|
||||
|
||||
public:
|
||||
std::wstring m_name;
|
||||
std::wstring m_name;
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds(){};
|
||||
};
|
||||
|
||||
@ -496,13 +496,13 @@ namespace PPTX
|
||||
|
||||
static void HSL2RGB(unsigned char* HSL, unsigned char* RGB)
|
||||
{
|
||||
if ( HSL[1] == 0 )
|
||||
{
|
||||
RGB[0] = HSL[2];
|
||||
RGB[1] = HSL[2];
|
||||
RGB[2] = HSL[2];
|
||||
}
|
||||
else
|
||||
//if ( HSL[1] == 0 )
|
||||
//{
|
||||
// RGB[0] = HSL[2];
|
||||
// RGB[1] = HSL[2];
|
||||
// RGB[2] = HSL[2];
|
||||
//}
|
||||
//else
|
||||
{
|
||||
double H = double(HSL[0])/240.0;
|
||||
double S = double(HSL[1])/240.0;
|
||||
|
||||
@ -53,28 +53,36 @@ namespace PPTX
|
||||
{
|
||||
name = oReader.GetName();
|
||||
|
||||
ReadAttributes( oReader );
|
||||
|
||||
if (XmlUtils::GetNameNoNS(name) == _T("alpha"))
|
||||
{
|
||||
ReadAttributes2( oReader );
|
||||
}
|
||||
else
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
}
|
||||
}
|
||||
void ReadAttributes2(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
nullable_string sTmp;
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle ( oReader, _T("val"), sTmp)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
if (val.is_init() && sTmp.is_init() && sTmp->find(wchar_t('%')) != -1)
|
||||
*val = (*val) * 1000;
|
||||
if (sTmp.is_init())
|
||||
{
|
||||
val = sTmp.get();
|
||||
if (val.is_init() && std::wstring::npos != sTmp->find(L"%"))
|
||||
{
|
||||
*val = (*val) * 1000;
|
||||
}
|
||||
}
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle ( oReader, _T("val"), val)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
@ -86,7 +94,7 @@ namespace PPTX
|
||||
nullable_string sTmp;
|
||||
node.ReadAttributeBase(L"val", sTmp);
|
||||
|
||||
if (val.is_init() && sTmp.is_init() && sTmp->find(wchar_t('%')) != -1)
|
||||
if (val.is_init() && sTmp.is_init() && std::wstring::npos != sTmp->find(L"%"))
|
||||
*val = (*val) * 1000;
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ namespace PPTX
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle ( oReader, _T("val"), val)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -60,7 +60,7 @@ namespace PPTX
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("val"), val)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const
|
||||
{
|
||||
|
||||
@ -57,7 +57,7 @@ namespace PPTX
|
||||
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("val"), val)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
if (6 == val.length())
|
||||
{
|
||||
|
||||
@ -172,7 +172,7 @@ namespace PPTX
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("val"), val)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
|
||||
virtual std::wstring toXML() const
|
||||
|
||||
@ -70,7 +70,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Start_No_NS ( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, L"name", name)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, L"type", type)
|
||||
WritingElement_ReadAttributes_End ( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS ( oReader )
|
||||
}
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node);
|
||||
|
||||
@ -67,7 +67,7 @@ namespace PPTX
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle ( oReader, _T("thresh"), thresh)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
Normalize();
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ namespace PPTX
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("amt"), amt)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
Normalize();
|
||||
}
|
||||
|
||||
@ -66,8 +66,8 @@ namespace PPTX
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("rad"), rad)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("rad"), rad)
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -66,7 +66,7 @@ namespace PPTX
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("a"), a)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
Normalize();
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ namespace PPTX
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("thresh"), thresh)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
Normalize();
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ namespace PPTX
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("blend"), blend)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -69,7 +69,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("rad"), rad)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("grow"), grow)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -83,7 +83,7 @@ namespace PPTX
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("useA"), useA)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
|
||||
@ -67,7 +67,7 @@ namespace PPTX
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("ref"), ref)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
|
||||
@ -83,7 +83,7 @@ namespace PPTX
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("blend"), blend)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -79,7 +79,7 @@ namespace PPTX
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("rad"), rad)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
Normalize();
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("hue"), hue)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("sat"), sat)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("lum"), lum)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
Normalize();
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("blurRad"), blurRad)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("dir"), dir)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("dist"), dist)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
Normalize();
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("bright"), bright)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("contrast"), contrast)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -99,7 +99,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("rotWithShape"), rotWithShape)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("sx"), sx)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("sy"), sy)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
Normalize();
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("prst"), prst)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("dir"), dir)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("dist"), dist)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
Normalize();
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("endA"), endA)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("stPos"), stPos)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("endPos"), endPos)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
Normalize();
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("tx"), tx)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("ty"), ty)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -66,7 +66,7 @@ namespace PPTX
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle ( oReader, _T("rad"), rad)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -68,7 +68,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("amt"), amt)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("hue"), hue)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
Normalize();
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("sy"), sy)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("tx"), tx)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("ty"), ty)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
Normalize();
|
||||
}
|
||||
|
||||
@ -99,10 +99,10 @@ namespace PPTX
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS ( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("dpi"), dpi)
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("rotWithShape"), rotWithShape )
|
||||
WritingElement_ReadAttributes_End ( oReader )
|
||||
WritingElement_ReadAttributes_Start_No_NS (oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("dpi"), dpi)
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("rotWithShape"), rotWithShape )
|
||||
WritingElement_ReadAttributes_End_No_NS ( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -112,10 +112,10 @@ namespace PPTX
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS ( oReader )
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("rotWithShape"), rotWithShape )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("flip"), flip )
|
||||
WritingElement_ReadAttributes_End ( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -86,9 +86,9 @@ namespace PPTX
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS ( oReader )
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle ( oReader, _T("prst"), prst )
|
||||
WritingElement_ReadAttributes_End ( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -80,7 +80,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("sy"), sy )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("tx"), tx )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("ty"), ty )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -122,8 +122,8 @@ namespace PPTX
|
||||
|
||||
if (L"xfrm" == strName && strNamespace != L"xdr")
|
||||
xfrm = oReader;
|
||||
else if (L"nvGraphicFramePr" == strName)
|
||||
nvGraphicFramePr.fromXML( oReader );
|
||||
else if (L"cNvGraphicFramePr" == strName)
|
||||
nvGraphicFramePr.cNvGraphicFramePr.fromXML( oReader );
|
||||
|
||||
else if (L"graphic" == strName)
|
||||
{
|
||||
|
||||
@ -80,7 +80,7 @@ namespace PPTX
|
||||
nullable_int tmp;
|
||||
WritingElement_ReadAttributes_Start_No_NS ( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle ( oReader, _T("pos"), tmp)
|
||||
WritingElement_ReadAttributes_End ( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
pos = tmp.get_value_or(0);
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("dir"), dir)
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("rig"), rig)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -59,7 +59,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Start_No_NS ( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("ang"), ang)
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("scaled"), scaled)
|
||||
WritingElement_ReadAttributes_End ( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
Normalize();
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("w"), w )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("type"), type )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("len"), len )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -80,9 +80,9 @@ namespace PPTX
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS ( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("lim"), lim )
|
||||
WritingElement_ReadAttributes_End ( oReader )
|
||||
WritingElement_ReadAttributes_Start_No_NS ( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("lim"), lim )
|
||||
WritingElement_ReadAttributes_End_No_NS ( oReader )
|
||||
}
|
||||
|
||||
virtual void GetJoinFrom(XmlUtils::CXmlNode& element)
|
||||
|
||||
@ -129,7 +129,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("cap"), cap )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("cmpd"), cmpd )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("w"), w )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
Normalize();
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ namespace PPTX
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("val"), val )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -61,7 +61,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("l"), l )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("r"), r )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("b"), b )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
|
||||
@ -62,7 +62,7 @@ namespace PPTX
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, _T("lat"), lat_)
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("lon"), lon_)
|
||||
WritingElement_ReadAttributes_Read_else_if ( oReader, _T("rev"), rev_)
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
|
||||
lat = lat_.get_value_or(0);
|
||||
lon = lon_.get_value_or(0);
|
||||
|
||||
@ -457,13 +457,8 @@ namespace PPTX
|
||||
|
||||
if (txBody.IsInit() == false) return true;
|
||||
if (txBody->lstStyle.IsInit() == false) return true;
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
if (txBody->lstStyle->levels[i].IsInit())
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
return txBody->lstStyle->IsListStyleEmpty();
|
||||
}
|
||||
|
||||
void Shape::Merge(Shape& shape, bool bIsSlidePlaceholder)
|
||||
|
||||
@ -48,17 +48,15 @@ namespace PPTX
|
||||
{
|
||||
namespace Logic
|
||||
{
|
||||
void SmartArt::LoadDrawing(NSBinPptxRW::CBinaryFileWriter* pWriter)
|
||||
bool SmartArt::LoadDrawing(OOX::IFileContainer* pRels)
|
||||
{
|
||||
if (m_diag.IsInit())
|
||||
return ;
|
||||
return true;
|
||||
|
||||
OOX::IFileContainer* pRels = NULL;
|
||||
if (pWriter)
|
||||
{
|
||||
if (pWriter->m_pCurrentContainer->is_init())
|
||||
pRels = pWriter->m_pCurrentContainer->operator ->();
|
||||
}
|
||||
if(id_data.IsInit() == false) return false;
|
||||
if (pRels == NULL) return false;
|
||||
|
||||
bool result = false;
|
||||
|
||||
smart_ptr<OOX::File> oFileData;
|
||||
smart_ptr<OOX::File> oFileDrawing;
|
||||
@ -67,15 +65,12 @@ namespace PPTX
|
||||
OOX::CDiagramData* pDiagramData = NULL;
|
||||
OOX::CDiagramDrawing* pDiagramDrawing = NULL;
|
||||
|
||||
if(id_data.IsInit())
|
||||
{
|
||||
if (parentFileIs<OOX::IFileContainer>()) oFileData = parentFileAs<OOX::IFileContainer>().Find(*id_data);
|
||||
else if (pRels != NULL) oFileData = pRels->Find(*id_data);
|
||||
}
|
||||
oFileData = pRels->Find(*id_data);
|
||||
|
||||
if (oFileData.IsInit())
|
||||
{
|
||||
pDiagramData = dynamic_cast<OOX::CDiagramData*>(oFileData.operator->());
|
||||
if (pDiagramData) result = true; // это smart art ..есть у него drawing или нет - неважно
|
||||
|
||||
if ((pDiagramData) && (pDiagramData->m_oExtLst.IsInit()))
|
||||
{
|
||||
@ -131,6 +126,25 @@ namespace PPTX
|
||||
{
|
||||
//parse pDiagramData !!
|
||||
}
|
||||
return true;
|
||||
}
|
||||
void SmartArt::LoadDrawing(NSBinPptxRW::CBinaryFileWriter* pWriter)
|
||||
{
|
||||
if (m_diag.IsInit())
|
||||
return ;
|
||||
|
||||
OOX::IFileContainer & pRelsPPTX = parentFileAs<OOX::IFileContainer>();
|
||||
OOX::IFileContainer * pRels = NULL;
|
||||
|
||||
if (pWriter)
|
||||
{
|
||||
if (pWriter->m_pCurrentContainer->is_init())
|
||||
pRels = pWriter->m_pCurrentContainer->operator ->();
|
||||
}
|
||||
|
||||
bool result = LoadDrawing(&pRelsPPTX);
|
||||
if (!result)
|
||||
result = LoadDrawing( pRels );
|
||||
}
|
||||
void SmartArt::toPPTY(NSBinPptxRW::CBinaryFileWriter* pWriter) const
|
||||
{
|
||||
|
||||
@ -115,6 +115,7 @@ namespace PPTX
|
||||
|
||||
public:
|
||||
void LoadDrawing(NSBinPptxRW::CBinaryFileWriter* pWriter = NULL);
|
||||
bool LoadDrawing(OOX::IFileContainer* pRels);
|
||||
};
|
||||
|
||||
class ChartRec : public WrapperWritingElement
|
||||
|
||||
@ -171,6 +171,20 @@ namespace PPTX
|
||||
|
||||
pReader->Seek(_end_rec);
|
||||
}
|
||||
bool IsListStyleEmpty()
|
||||
{
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
if (levels[i].IsInit())
|
||||
{
|
||||
if (levels[i]->ParagraphBullet.is_init() == false) continue;
|
||||
if (levels[i]->ParagraphBullet.is<PPTX::Logic::BuNone>())continue;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Merge(nullable<TextListStyle>& lstStyle)const
|
||||
{
|
||||
|
||||
@ -156,6 +156,16 @@ namespace PPTX
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pShape->nvSpPr.nvPr.ph->idx.IsInit())
|
||||
{
|
||||
//not found in layout !! 100818_건강보험과_보건의료_김용익_최종.pptx
|
||||
bool bShapeMaster = showMasterSp.get_value_or(true);
|
||||
if (Master.IsInit() && bShapeMaster)
|
||||
{
|
||||
Master->GetLevelUp(pShape);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
virtual std::wstring GetMediaFullPathNameFromRId(const OOX::RId& rid)const
|
||||
|
||||
@ -26,10 +26,8 @@
|
||||
17C1FCBE1ACC429D006B99B3 /* EffectProperties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A443D1AC57B83005A27F7 /* EffectProperties.cpp */; };
|
||||
17C1FCBF1ACC429D006B99B3 /* EffectLst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A443B1AC57B83005A27F7 /* EffectLst.cpp */; };
|
||||
17C1FCC11ACC429D006B99B3 /* FileMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A43A31AC57B83005A27F7 /* FileMap.cpp */; };
|
||||
17C1FCC21ACC429D006B99B3 /* ShapeTextProperties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A44AC1AC57B83005A27F7 /* ShapeTextProperties.cpp */; };
|
||||
17C1FCC31ACC429D006B99B3 /* TransitionBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A45051AC57B83005A27F7 /* TransitionBase.cpp */; };
|
||||
17C1FCC51ACC429D006B99B3 /* Shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A44A71AC57B83005A27F7 /* Shape.cpp */; };
|
||||
17C1FCC61ACC429D006B99B3 /* ShapeProperties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A44A91AC57B83005A27F7 /* ShapeProperties.cpp */; };
|
||||
17C1FCC71ACC429D006B99B3 /* BuildNodeBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A44DE1AC57B83005A27F7 /* BuildNodeBase.cpp */; };
|
||||
17C1FCC81ACC429D006B99B3 /* ContentPart.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A44311AC57B83005A27F7 /* ContentPart.cpp */; };
|
||||
17C1FCC91ACC429D006B99B3 /* CNvGrpSpPr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 179A44241AC57B83005A27F7 /* CNvGrpSpPr.cpp */; };
|
||||
@ -306,7 +304,6 @@
|
||||
17C1FDFE1ACC429D006B99B3 /* XfrmEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 179A445C1AC57B83005A27F7 /* XfrmEffect.h */; };
|
||||
17C1FDFF1ACC429D006B99B3 /* ChartBuildType.h in Headers */ = {isa = PBXBuildFile; fileRef = 179A43B51AC57B83005A27F7 /* ChartBuildType.h */; };
|
||||
17C1FE001ACC429D006B99B3 /* SndAc.h in Headers */ = {isa = PBXBuildFile; fileRef = 179A45011AC57B83005A27F7 /* SndAc.h */; };
|
||||
17C1FE011ACC429D006B99B3 /* ShapeProperties.h in Headers */ = {isa = PBXBuildFile; fileRef = 179A44AA1AC57B83005A27F7 /* ShapeProperties.h */; };
|
||||
17C1FE021ACC429D006B99B3 /* AlphaModFix.h in Headers */ = {isa = PBXBuildFile; fileRef = 179A44451AC57B83005A27F7 /* AlphaModFix.h */; };
|
||||
17C1FE041ACC429D006B99B3 /* Duotone.h in Headers */ = {isa = PBXBuildFile; fileRef = 179A444D1AC57B83005A27F7 /* Duotone.h */; };
|
||||
17C1FE061ACC429D006B99B3 /* ColorBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 179A442A1AC57B83005A27F7 /* ColorBase.h */; };
|
||||
@ -396,7 +393,6 @@
|
||||
17C1FE601ACC429D006B99B3 /* Set.h in Headers */ = {isa = PBXBuildFile; fileRef = 179A44EB1AC57B83005A27F7 /* Set.h */; };
|
||||
17C1FE611ACC429D006B99B3 /* ShapeStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 179A44AB1AC57B83005A27F7 /* ShapeStyle.h */; };
|
||||
17C1FE621ACC429D006B99B3 /* BaseLimit.h in Headers */ = {isa = PBXBuildFile; fileRef = 179A43AE1AC57B83005A27F7 /* BaseLimit.h */; };
|
||||
17C1FE631ACC429D006B99B3 /* ShapeTextProperties.h in Headers */ = {isa = PBXBuildFile; fileRef = 179A44AD1AC57B83005A27F7 /* ShapeTextProperties.h */; };
|
||||
17C1FE641ACC429D006B99B3 /* BinReaderWriterDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 17D91A171AC5A4DF0096D788 /* BinReaderWriterDefines.h */; };
|
||||
17C1FE651ACC429D006B99B3 /* ClrMapOvr.h in Headers */ = {isa = PBXBuildFile; fileRef = 179A44211AC57B83005A27F7 /* ClrMapOvr.h */; };
|
||||
17C1FE661ACC429D006B99B3 /* Glow.h in Headers */ = {isa = PBXBuildFile; fileRef = 179A44511AC57B83005A27F7 /* Glow.h */; };
|
||||
@ -705,11 +701,7 @@
|
||||
179A44A61AC57B83005A27F7 /* Scene3d.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scene3d.h; sourceTree = "<group>"; };
|
||||
179A44A71AC57B83005A27F7 /* Shape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Shape.cpp; sourceTree = "<group>"; };
|
||||
179A44A81AC57B83005A27F7 /* Shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shape.h; sourceTree = "<group>"; };
|
||||
179A44A91AC57B83005A27F7 /* ShapeProperties.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShapeProperties.cpp; sourceTree = "<group>"; };
|
||||
179A44AA1AC57B83005A27F7 /* ShapeProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeProperties.h; sourceTree = "<group>"; };
|
||||
179A44AB1AC57B83005A27F7 /* ShapeStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeStyle.h; sourceTree = "<group>"; };
|
||||
179A44AC1AC57B83005A27F7 /* ShapeTextProperties.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShapeTextProperties.cpp; sourceTree = "<group>"; };
|
||||
179A44AD1AC57B83005A27F7 /* ShapeTextProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapeTextProperties.h; sourceTree = "<group>"; };
|
||||
179A44AE1AC57B83005A27F7 /* SmartArt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SmartArt.cpp; sourceTree = "<group>"; };
|
||||
179A44AF1AC57B83005A27F7 /* SmartArt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SmartArt.h; sourceTree = "<group>"; };
|
||||
179A44B01AC57B83005A27F7 /* Sp3d.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sp3d.h; sourceTree = "<group>"; };
|
||||
@ -1176,11 +1168,7 @@
|
||||
179A44A61AC57B83005A27F7 /* Scene3d.h */,
|
||||
179A44A71AC57B83005A27F7 /* Shape.cpp */,
|
||||
179A44A81AC57B83005A27F7 /* Shape.h */,
|
||||
179A44A91AC57B83005A27F7 /* ShapeProperties.cpp */,
|
||||
179A44AA1AC57B83005A27F7 /* ShapeProperties.h */,
|
||||
179A44AB1AC57B83005A27F7 /* ShapeStyle.h */,
|
||||
179A44AC1AC57B83005A27F7 /* ShapeTextProperties.cpp */,
|
||||
179A44AD1AC57B83005A27F7 /* ShapeTextProperties.h */,
|
||||
179A44AE1AC57B83005A27F7 /* SmartArt.cpp */,
|
||||
179A44AF1AC57B83005A27F7 /* SmartArt.h */,
|
||||
179A44B01AC57B83005A27F7 /* Sp3d.h */,
|
||||
@ -1783,7 +1771,6 @@
|
||||
17C1FDFE1ACC429D006B99B3 /* XfrmEffect.h in Headers */,
|
||||
17C1FDFF1ACC429D006B99B3 /* ChartBuildType.h in Headers */,
|
||||
17C1FE001ACC429D006B99B3 /* SndAc.h in Headers */,
|
||||
17C1FE011ACC429D006B99B3 /* ShapeProperties.h in Headers */,
|
||||
17C1FE021ACC429D006B99B3 /* AlphaModFix.h in Headers */,
|
||||
17C1FE041ACC429D006B99B3 /* Duotone.h in Headers */,
|
||||
17C1FE061ACC429D006B99B3 /* ColorBase.h in Headers */,
|
||||
@ -1873,7 +1860,6 @@
|
||||
17C1FE601ACC429D006B99B3 /* Set.h in Headers */,
|
||||
17C1FE611ACC429D006B99B3 /* ShapeStyle.h in Headers */,
|
||||
17C1FE621ACC429D006B99B3 /* BaseLimit.h in Headers */,
|
||||
17C1FE631ACC429D006B99B3 /* ShapeTextProperties.h in Headers */,
|
||||
17C1FE641ACC429D006B99B3 /* BinReaderWriterDefines.h in Headers */,
|
||||
17C1FE651ACC429D006B99B3 /* ClrMapOvr.h in Headers */,
|
||||
17C1FE661ACC429D006B99B3 /* Glow.h in Headers */,
|
||||
@ -1981,11 +1967,9 @@
|
||||
17C1FCBF1ACC429D006B99B3 /* EffectLst.cpp in Sources */,
|
||||
695BC03A1C070DEF00817D7E /* ASCSVGWriter.cpp in Sources */,
|
||||
17C1FCC11ACC429D006B99B3 /* FileMap.cpp in Sources */,
|
||||
17C1FCC21ACC429D006B99B3 /* ShapeTextProperties.cpp in Sources */,
|
||||
696791821D9E8B81002CA4BA /* MathParaWrapper.cpp in Sources */,
|
||||
17C1FCC31ACC429D006B99B3 /* TransitionBase.cpp in Sources */,
|
||||
17C1FCC51ACC429D006B99B3 /* Shape.cpp in Sources */,
|
||||
17C1FCC61ACC429D006B99B3 /* ShapeProperties.cpp in Sources */,
|
||||
17C1FCC71ACC429D006B99B3 /* BuildNodeBase.cpp in Sources */,
|
||||
17C1FCC81ACC429D006B99B3 /* ContentPart.cpp in Sources */,
|
||||
17C1FCC91ACC429D006B99B3 /* CNvGrpSpPr.cpp in Sources */,
|
||||
|
||||
@ -246,4 +246,7 @@ HEADERS += docxformatlib.h \
|
||||
../Source/XlsxFormat/Worksheets/Sparkline.h \
|
||||
../Source/XlsxFormat/Ole/OleObjects.h \
|
||||
../Source/DocxFormat/Diagram/DiagramData.h \
|
||||
../Source/DocxFormat/Diagram/DiagramDrawing.h
|
||||
../Source/DocxFormat/Diagram/DiagramDrawing.h \
|
||||
../Source/XlsxFormat/Pivot/PivotTable.h \
|
||||
../Source/XlsxFormat/Pivot/PivotCacheDefinition.h \
|
||||
../Source/XlsxFormat/Pivot/PivotCacheRecords.h
|
||||
|
||||
@ -86,7 +86,7 @@ namespace OOX
|
||||
// Читаем атрибуты
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if( oReader, _T("spid"), m_sSpId )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
|
||||
public:
|
||||
@ -136,7 +136,7 @@ namespace OOX
|
||||
// Читаем атрибуты
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if( oReader, _T("relId"), m_oRelId )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
|
||||
public:
|
||||
@ -181,7 +181,7 @@ namespace OOX
|
||||
// Читаем атрибуты
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if( oReader, _T("uri"), m_sUri )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user