Kaydet (Commit) 8908f10f authored tarafından Joren De Cuyper's avatar Joren De Cuyper Kaydeden (comit) Caolán McNamara

Code is executed in both cases so take it outside the statement

Change-Id: I8d4c3a62d4e63d2666bfce18d6af772a29e271d4
Reviewed-on: https://gerrit.libreoffice.org/15695Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 0b4e3f5e
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment