loplugin:inlinefields in oox::vml::VMLExport

Change-Id: Ia6880212503b2945953ca4c3d62d3ddb1d159c7b
Reviewed-on: https://gerrit.libreoffice.org/36351
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2017-04-10 09:26:16 +02:00
parent 78acb910d2
commit 5ab0d0a69f
2 changed files with 4 additions and 7 deletions

View File

@@ -102,7 +102,7 @@ class OOX_DLLPUBLIC VMLExport : public EscherEx
OStringBuffer m_ShapeStyle; OStringBuffer m_ShapeStyle;
/// Remember which shape types we had already written. /// Remember which shape types we had already written.
bool *m_pShapeTypeWritten; std::vector<bool> m_aShapeTypeWritten;
public: public:
VMLExport( ::sax_fastparser::FSHelperPtr const & pSerializer, VMLTextExport* pTextExport = nullptr ); VMLExport( ::sax_fastparser::FSHelperPtr const & pSerializer, VMLTextExport* pTextExport = nullptr );

View File

@@ -65,10 +65,9 @@ VMLExport::VMLExport( ::sax_fastparser::FSHelperPtr const & pSerializer, VMLText
, m_nShapeType( ESCHER_ShpInst_Nil ) , m_nShapeType( ESCHER_ShpInst_Nil )
, m_nShapeFlags(0) , m_nShapeFlags(0)
, m_ShapeStyle( 200 ) , m_ShapeStyle( 200 )
, m_pShapeTypeWritten( new bool[ ESCHER_ShpInst_COUNT ] ) , m_aShapeTypeWritten( ESCHER_ShpInst_COUNT )
{ {
mnGroupLevel = 1; mnGroupLevel = 1;
memset( m_pShapeTypeWritten, 0, ESCHER_ShpInst_COUNT * sizeof( bool ) );
} }
void VMLExport::SetFS( const ::sax_fastparser::FSHelperPtr& pSerializer ) void VMLExport::SetFS( const ::sax_fastparser::FSHelperPtr& pSerializer )
@@ -80,8 +79,6 @@ VMLExport::~VMLExport()
{ {
delete mpOutStrm; delete mpOutStrm;
mpOutStrm = nullptr; mpOutStrm = nullptr;
delete[] m_pShapeTypeWritten;
m_pShapeTypeWritten = nullptr;
} }
void VMLExport::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance ) void VMLExport::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance )
@@ -1039,10 +1036,10 @@ sal_Int32 VMLExport::StartShape()
if ( aShapeType != "NULL" ) if ( aShapeType != "NULL" )
{ {
bReferToShapeType = true; bReferToShapeType = true;
if ( !m_pShapeTypeWritten[ m_nShapeType ] ) if ( !m_aShapeTypeWritten[ m_nShapeType ] )
{ {
m_pSerializer->write( aShapeType.getStr() ); m_pSerializer->write( aShapeType.getStr() );
m_pShapeTypeWritten[ m_nShapeType ] = true; m_aShapeTypeWritten[ m_nShapeType ] = true;
} }
} }
else else