mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 05:24:10 +08:00
add one cell anchor image conversion
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user