This commit is contained in:
Elena.Subbotina
2024-01-18 17:15:52 +03:00
parent 7b6a706ca3
commit 14d9d2b01e
2 changed files with 42 additions and 39 deletions

View File

@ -3173,25 +3173,25 @@ void XlsxConverter::convert(OOX::Spreadsheet::CControls *oox_controls, OOX::Spre
{
{
oox_table_position from = {}, to = {};
convert(oCellAnchor->m_oFrom.GetPointer(), &from);
convert(oCellAnchor->m_oFrom.GetPointer(), &from);
convert(oCellAnchor->m_oTo.GetPointer(), &to);
double x1 = 0, y1 = 0, x2 = 0, y2 = 0;
ods_context->current_table()->convert_position(from, x1, y1);
ods_context->current_table()->convert_position(to, x2, y2);
ods_context->current_table()->convert_position(to, x2, y2);
ods_context->drawing_context()->set_drawings_rect(x1, y1, x2 - x1, y2 - y1);
}
}
ods_context->drawing_context()->start_drawing();
ods_context->drawing_context()->start_control(id);
if (pControl->m_oName.IsInit())
{
ods_context->controls_context()->set_name(*pControl->m_oName);
ods_context->drawing_context()->set_name(*pControl->m_oName);
}
//----------------------
//----------------------
if (oFormControlPr->m_oText.IsInit())
{
ods_context->controls_context()->set_label(*oFormControlPr->m_oText);
@ -3199,13 +3199,13 @@ void XlsxConverter::convert(OOX::Spreadsheet::CControls *oox_controls, OOX::Spre
if (oFormControlPr->m_oFillColor.IsInit())
{
ods_context->drawing_context()->start_area_properties(true);
ods_context->drawing_context()->set_solid_fill(oFormControlPr->m_oFillColor->ToString());
ods_context->drawing_context()->set_solid_fill(oFormControlPr->m_oFillColor->ToString());
ods_context->drawing_context()->end_area_properties();
}
if (oFormControlPr->m_oBorderColor.IsInit())
{
ods_context->drawing_context()->start_line_properties();
ods_context->drawing_context()->set_line_color(oFormControlPr->m_oBorderColor->ToString());
ods_context->drawing_context()->set_line_color(oFormControlPr->m_oBorderColor->ToString());
ods_context->drawing_context()->end_line_properties();
}
if (oFormControlPr->m_oTextHAlign.IsInit())
@ -3283,37 +3283,40 @@ void XlsxConverter::convert(OOX::Spreadsheet::CControls *oox_controls, OOX::Spre
//nullable_bool m_oPasswordEdit;
//nullable<CListItems> m_oItemLst;
//---------------------
if (pControl->m_oControlPr->m_oLinkedCell.IsInit())
if (pControl->m_oControlPr.IsInit())
{
ods_context->controls_context()->set_linkedCell(*pControl->m_oControlPr->m_oLinkedCell);
if (pControl->m_oControlPr->m_oLinkedCell.IsInit())
{
ods_context->controls_context()->set_linkedCell(*pControl->m_oControlPr->m_oLinkedCell);
}
if (pControl->m_oControlPr->m_oListFillRange.IsInit())
{
ods_context->controls_context()->set_listFillRange(*pControl->m_oControlPr->m_oListFillRange);
}
if (pControl->m_oControlPr->m_oMacro.IsInit())
{
ods_context->controls_context()->set_macro(*pControl->m_oControlPr->m_oMacro);
}
if (pControl->m_oControlPr->m_oDisabled.IsInit())
{
ods_context->controls_context()->set_disabled(*pControl->m_oControlPr->m_oDisabled);
}
if (pControl->m_oControlPr->m_oPrint.IsInit())
{
ods_context->controls_context()->set_printable(*pControl->m_oControlPr->m_oPrint);
}
if (pControl->m_oControlPr->m_oLocked.IsInit())
{
}
//nullable_string m_oAltText;
//nullable_bool m_oAutoFill;
//nullable_bool m_oAutoLine;
//nullable_bool m_oAutoPict;
//nullable_bool m_oDde;
//nullable_bool m_oDefaultSize;
//nullable_string m_oCf;
//nullable_bool m_oRecalcAlways;
}
if (pControl->m_oControlPr->m_oListFillRange.IsInit())
{
ods_context->controls_context()->set_listFillRange(*pControl->m_oControlPr->m_oListFillRange);
}
if (pControl->m_oControlPr->m_oMacro.IsInit())
{
ods_context->controls_context()->set_macro(*pControl->m_oControlPr->m_oMacro);
}
if (pControl->m_oControlPr->m_oDisabled.IsInit())
{
ods_context->controls_context()->set_disabled(*pControl->m_oControlPr->m_oDisabled);
}
if (pControl->m_oControlPr->m_oPrint.IsInit())
{
ods_context->controls_context()->set_printable(*pControl->m_oControlPr->m_oPrint);
}
if (pControl->m_oControlPr->m_oLocked.IsInit())
{
}
//nullable_string m_oAltText;
//nullable_bool m_oAutoFill;
//nullable_bool m_oAutoLine;
//nullable_bool m_oAutoPict;
//nullable_bool m_oDde;
//nullable_bool m_oDefaultSize;
//nullable_string m_oCf;
//nullable_bool m_oRecalcAlways;
//---------------------
ods_context->drawing_context()->end_control();
ods_context->drawing_context()->end_drawing();