oox/source/vml/vmlshapecontext.cxx | 9 ++++++++- sw/source/writerfilter/ooxml/ShadowContext.cxx | 3 --- 2 files changed, 8 insertions(+), 4 deletions(-)
New commits: commit bbfe17f32459419fd2bc1f145c9232dd3801a561 Author: Oliver Specht <oliver.spe...@cib.de> AuthorDate: Wed Dec 4 07:23:07 2024 +0100 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Wed Dec 4 12:34:50 2024 +0100 tdf#164065 load vml textbox in a group shape Adds changes of patchset 26 from https://gerrit.libreoffice.org/c/core/+/174902 to the branch. Change-Id: I1e727724f821e157a5013bc5cf76ba22ff18e8b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177767 Tested-by: allotropia jenkins <jenk...@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx index 7a1dacca3f10..146bf2e017eb 100644 --- a/oox/source/vml/vmlshapecontext.cxx +++ b/oox/source/vml/vmlshapecontext.cxx @@ -548,7 +548,14 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 nElement, const Attri if (mrShapeModel.mbInGroup) // FIXME: without this a text will be added into the group-shape instead of its // parent shape - dynamic_cast<SimpleShape&>(mrShape).setService(u"com.sun.star.drawing.TextShape"_ustr); + { + if (mrShape.isTextBox()) + dynamic_cast<SimpleShape&>(mrShape).setService( + u"com.sun.star.drawing.CustomShape"_ustr); + else + dynamic_cast<SimpleShape&>(mrShape).setService( + u"com.sun.star.drawing.TextShape"_ustr); + } else // FIXME: without this we does not handle some properties like shadow dynamic_cast<SimpleShape&>(mrShape).setService(u"com.sun.star.text.TextFrame"_ustr); diff --git a/sw/source/writerfilter/ooxml/ShadowContext.cxx b/sw/source/writerfilter/ooxml/ShadowContext.cxx index 3d1c82e2da99..d850092c9adc 100644 --- a/sw/source/writerfilter/ooxml/ShadowContext.cxx +++ b/sw/source/writerfilter/ooxml/ShadowContext.cxx @@ -43,9 +43,6 @@ void ShadowContext::startFastElement( ++m_nElementLevel; CallData callData(m_nElementLevel, nElement, rAttribs, CallDataType::ElementAttr); m_aCallDataDeque.push_back(callData); - //TODO: determine shape vs. frame - // tables require frames - // rotation requires shapes if (nElement == (oox::NMSP_doc | oox::XML_tbl)) { m_bImportAsWriterFrame = true;