diff --git a/MsBinaryFile/XlsFile/Format/Logic/Biff_records/MsoDrawing.cpp b/MsBinaryFile/XlsFile/Format/Logic/Biff_records/MsoDrawing.cpp index e6480be9c7..7282935dee 100644 --- a/MsBinaryFile/XlsFile/Format/Logic/Biff_records/MsoDrawing.cpp +++ b/MsBinaryFile/XlsFile/Format/Logic/Biff_records/MsoDrawing.cpp @@ -191,6 +191,11 @@ void MsoDrawing::prepareDrawing(const DrawingType Type, const unsigned int Drawi clientAnchor->colR = col2; clientAnchor->rwT = row1; clientAnchor->rwB = row2; + if(row1==row2 && col1==col2) + { + clientAnchor->dxR = 200; + clientAnchor->dyB = 200; + } SpContainer->m_OfficeArtAnchor = ODRAW::OfficeArtRecordPtr(clientAnchor); auto clientData = new ODRAW::OfficeArtClientData; SpContainer->m_oOfficeArtClientData = ODRAW::OfficeArtRecordPtr(clientData); @@ -250,8 +255,18 @@ void MsoDrawing::prepareDrawing(const DrawingType Type, const unsigned int Drawi PicOp->op = param; commentOptions->fopt.Text_props.push_back(ODRAW::OfficeArtFOPTEPtr(PicOp)); } + { + auto PicOp = new ODRAW::OfficeArtFOPTE; + PicOp->opid = 0x01BF; + PicOp->fComplex = false; + PicOp->fBid = false; + PicOp->op = 0x100000; + commentOptions->fopt.Text_props.push_back(ODRAW::OfficeArtFOPTEPtr(PicOp)); + } + + commentOptions->fopt.options_count += 2; + SpContainer->m_oOfficeArtFOPT = ODRAW::OfficeArtRecordPtr(commentOptions); - commentOptions->fopt.options_count += 1; } } } diff --git a/MsBinaryFile/XlsFile/Format/Logic/Biff_structures/ODRAW/OfficeArtBStoreContainerFileBlock.cpp b/MsBinaryFile/XlsFile/Format/Logic/Biff_structures/ODRAW/OfficeArtBStoreContainerFileBlock.cpp index acfe979103..c0a3fd0853 100644 --- a/MsBinaryFile/XlsFile/Format/Logic/Biff_structures/ODRAW/OfficeArtBStoreContainerFileBlock.cpp +++ b/MsBinaryFile/XlsFile/Format/Logic/Biff_structures/ODRAW/OfficeArtBStoreContainerFileBlock.cpp @@ -290,6 +290,8 @@ void OfficeArtBStoreContainerFileBlock::save(XLS::CFRecord& record) FbseHeader.recInstance = 0x2; else if(pict_type == L".wmf") FbseHeader.recInstance = 0x3; + else if(pict_type == L".png") + FbseHeader.recInstance = 0x6; else FbseHeader.recInstance = 0x5; FbseHeader.recType = 0xF007; @@ -367,8 +369,16 @@ void OfficeArtBStoreContainerFileBlock::save(XLS::CFRecord& record) { OfficeArtRecordHeader rc_header; rc_header.recVer = 0; - rc_header.recInstance = 0x46A; - rc_header.recType = 0xF01D; + if(pict_type == L".png") + { + rc_header.recInstance = 0x6E0; + rc_header.recType = 0xF01E; + } + else + { + rc_header.recInstance = 0x46A; + rc_header.recType = 0xF01D; + } rc_header.recLen = pict_size + 17; record << rc_header; record.reserveNunBytes(16); diff --git a/OOXML/XlsxFormat/Drawing/CellAnchor.cpp b/OOXML/XlsxFormat/Drawing/CellAnchor.cpp index c5ad4b481c..f61b03df43 100644 --- a/OOXML/XlsxFormat/Drawing/CellAnchor.cpp +++ b/OOXML/XlsxFormat/Drawing/CellAnchor.cpp @@ -318,6 +318,31 @@ namespace OOX } } + else if(m_oAnchorType == SimpleTypes::Spreadsheet::ECellAnchorType::cellanchorOneCell) + { + if(m_oFrom.IsInit()) + { + if(m_oFrom->m_oCol.IsInit()) + colL = m_oFrom->m_oCol->GetValue(); + if(m_oFrom->m_oRow.IsInit()) + rwT = m_oFrom->m_oRow->GetValue(); + if(m_oFrom->m_oRowOff.IsInit()) + dyT = m_oFrom->m_oRowOff->GetValue(); + if(m_oFrom->m_oColOff.IsInit()) + dxL = m_oFrom->m_oColOff->GetValue(); + rwB = rwT; + colR = colL; + } + if(m_oExt.IsInit()) + { + if(m_oExt->m_oCx.IsInit()) + dxR = m_oExt->m_oCx->GetValue(); + + if(m_oExt->m_oCy.IsInit()) + dyB = m_oExt->m_oCy->GetValue(); + } + + } } void CCellAnchor::ReadAttributes(XmlUtils::CXmlLiteReader& oReader) { diff --git a/OOXML/XlsxFormat/Styles/XlsxStyles.cpp b/OOXML/XlsxFormat/Styles/XlsxStyles.cpp index 5bfb4c5743..9bdbd44ea0 100644 --- a/OOXML/XlsxFormat/Styles/XlsxStyles.cpp +++ b/OOXML/XlsxFormat/Styles/XlsxStyles.cpp @@ -351,6 +351,8 @@ namespace OOX workbookPtr->m_Formating = XLS::BaseObjectPtr(FormatPtr); auto globalInfo = workbookPtr->global_info_; //prepare colors + if(m_oColors.IsInit() &&(!m_oColors->m_oIndexedColors.IsInit())) + m_oColors.reset(); if(!m_oColors.IsInit()) { m_oColors = OOX::Spreadsheet::CColors();