diff options
author | Joren De Cuyper <jorendc@libreoffice.org> | 2015-05-10 12:47:01 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-05-10 19:41:52 +0000 |
commit | 8908f10fe3b6566db469a1f2bd2674d8d0425165 (patch) | |
tree | 08e70a80885856c93fe42833b5e725e2ae6a3f15 /oox | |
parent | 0b4e3f5ebd2511c7ba39cbcc83d5faddb842404d (diff) |
Code is executed in both cases so take it outside the statement
Change-Id: I8d4c3a62d4e63d2666bfce18d6af772a29e271d4
Reviewed-on: https://gerrit.libreoffice.org/15695
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'oox')
-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)) |