This commit is contained in:
Elena Subbotina
2025-10-15 12:37:04 +03:00
parent 4899ed4e7f
commit 3b85841ea6
2 changed files with 19 additions and 1 deletions

View File

@ -665,6 +665,18 @@ void _xlsx_drawing::serialize_vml(std::wostream & strm)
if (*sVal == L"horizontal") CP_XML_NODE(L"x:Horiz");
else CP_XML_NODE(L"x:Vert");
}
if (sub_type == OBJ_DropdownList)
{
CP_XML_NODE(L"x:DropStyle")
{
CP_XML_STREAM() << L"Combo";
}
CP_XML_NODE(L"x:DropLines")
{
CP_XML_STREAM() << 8;
}
}
}
}
}

View File

@ -968,6 +968,9 @@ void form_listbox::add_attributes( const xml::attributes_wc_ptr & Attributes )
CP_APPLY_ATTR(L"form:list-linkage-type", list_linkage_type_);
CP_APPLY_ATTR(L"form:size", size_);
CP_APPLY_ATTR(L"form:value", n_value_);
if (dropdown_ && dropdown_->get())
object_type_ = OBJ_DropdownList;
}
void form_listbox::docx_convert(oox::docx_conversion_context & Context)
{
@ -978,7 +981,10 @@ void form_listbox::docx_convert(oox::docx_conversion_context & Context)
}
void form_listbox::xlsx_convert(oox::xlsx_conversion_context & Context)
{
Context.get_forms_context().start_element(oox::formListbox);
if (dropdown_ && dropdown_->get())
Context.get_forms_context().start_element(oox::formCombobox);
else
Context.get_forms_context().start_element(oox::formListbox);
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
form_element::xlsx_convert(Context);