fix/bug73635

fix bug #73635

(cherry picked from commit 84b2849f53730af5f544c8245800da4478e95463)
This commit is contained in:
Timofey Derevyankin
2026-03-02 20:10:48 +03:00
committed by Elena Subbotina
parent 7dffc8245a
commit 90eb06ac20
3 changed files with 8 additions and 3 deletions

View File

@ -522,10 +522,10 @@ void docx_serialize_wps(std::wostream & strm, _docx_drawing & val, oox::docx_con
CP_XML_NODE(L"w:drawing")
{
std::wstring strWp = L"wp:anchor";
if (val.isInline)strWp = L"wp:inline";
if (val.isInline || val.m_isChar)strWp = L"wp:inline";
CP_XML_NODE(strWp)
{
if (val.isInline)
if (val.isInline || val.m_isChar)
{
CP_XML_NODE(L"wp:extent")
{

View File

@ -44,10 +44,11 @@ namespace oox {
class _docx_drawing : public _oox_drawing
{
public:
_docx_drawing() : _oox_drawing(), parallel(0), isInline(false), inFrame(false), number_wrapped_paragraphs(0), posOffsetV(0), posOffsetH(0)
_docx_drawing() : _oox_drawing(), parallel(0), isInline(false), m_isChar(false), inFrame(false), number_wrapped_paragraphs(0), posOffsetV(0), posOffsetH(0)
{
}
bool isInline;
bool m_isChar;
bool inFrame;
unsigned int parallel;

View File

@ -888,6 +888,10 @@ void common_draw_docx_convert(oox::docx_conversion_context & Context, union_comm
{
drawing->isInline = true;
}
if( anchor && anchor->get_type() == anchor_type::Char )
{
drawing->m_isChar = true;
}
if (attlists_.shape_with_text_and_styles_.common_shape_draw_attlist_.draw_transform_)
{
std::wstring transformStr = attlists_.shape_with_text_and_styles_.common_shape_draw_attlist_.draw_transform_.get();