diff options
-rw-r--r-- | oox/source/export/vmlexport.cxx | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index a7ed878b59c8..9e8e6d29de20 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -1109,24 +1109,16 @@ sal_Int32 VMLExport::StartShape() if (!sAnchorId.isEmpty()) m_pShapeAttrList->addNS(XML_wp14, XML_anchorId, OUStringToOString(sAnchorId, RTL_TEXTENCODING_UTF8)); - if ( nShapeElement >= 0 && !m_pShapeAttrList->hasAttribute( XML_type ) ) + if ( nShapeElement >= 0 && !m_pShapeAttrList->hasAttribute( XML_type ) && bReferToShapeType ) { - if ( bReferToShapeType ) - { - m_pShapeAttrList->add( XML_type, OStringBuffer( 20 ) - .append( "shapetype_" ).append( sal_Int32( m_nShapeType ) ) - .makeStringAndClear() ); - } - - // start of the shape - m_pSerializer->startElementNS( XML_v, nShapeElement, XFastAttributeListRef( m_pShapeAttrList ) ); - } - else - { - // start of the shape - m_pSerializer->startElementNS( XML_v, nShapeElement, XFastAttributeListRef( m_pShapeAttrList ) ); + m_pShapeAttrList->add( XML_type, OStringBuffer( 20 ) + .append( "shapetype_" ).append( sal_Int32( m_nShapeType ) ) + .makeStringAndClear() ); } + // start of the shape + m_pSerializer->startElementNS( XML_v, nShapeElement, XFastAttributeListRef( m_pShapeAttrList ) ); + // now check if we have some editeng text (not associated textbox) and we have a text exporter registered const SdrTextObj* pTxtObj = PTR_CAST(SdrTextObj, m_pSdrObject); if (pTxtObj && m_pTextExport && msfilter::util::HasTextBoxContent(m_nShapeType) && !IsWaterMarkShape(m_pSdrObject->GetName()) && !lcl_isTextBox(m_pSdrObject)) |