Kaydet (Commit) 748fea98 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:inlinefields in SvxMSDffManager

Change-Id: I30a7f593c1d2f751adcdde1a381fb616c2dfed74
Reviewed-on: https://gerrit.libreoffice.org/36347Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst fb4620f1
......@@ -5524,10 +5524,10 @@ void SvxMSDffManager::StoreShapeOrder(sal_uLong nId,
SdrObject* pObject,
SwFlyFrameFormat* pFly) const
{
sal_uInt16 nShpCnt = m_pShapeOrders->size();
sal_uInt16 nShpCnt = m_aShapeOrders.size();
for (sal_uInt16 nShapeNum=0; nShapeNum < nShpCnt; nShapeNum++)
{
SvxMSDffShapeOrder& rOrder = *(*m_pShapeOrders)[ nShapeNum ];
SvxMSDffShapeOrder& rOrder = *m_aShapeOrders[ nShapeNum ];
if( rOrder.nShapeId == nId )
{
......@@ -5543,10 +5543,10 @@ void SvxMSDffManager::ExchangeInShapeOrder( SdrObject* pOldObject,
sal_uLong nTxBx,
SdrObject* pObject) const
{
sal_uInt16 nShpCnt = m_pShapeOrders->size();
sal_uInt16 nShpCnt = m_aShapeOrders.size();
for (sal_uInt16 nShapeNum=0; nShapeNum < nShpCnt; nShapeNum++)
{
SvxMSDffShapeOrder& rOrder = *(*m_pShapeOrders)[ nShapeNum ];
SvxMSDffShapeOrder& rOrder = *m_aShapeOrders[ nShapeNum ];
if( rOrder.pObj == pOldObject )
{
......@@ -5560,10 +5560,10 @@ void SvxMSDffManager::ExchangeInShapeOrder( SdrObject* pOldObject,
void SvxMSDffManager::RemoveFromShapeOrder( SdrObject* pObject ) const
{
sal_uInt16 nShpCnt = m_pShapeOrders->size();
sal_uInt16 nShpCnt = m_aShapeOrders.size();
for (sal_uInt16 nShapeNum=0; nShapeNum < nShpCnt; nShapeNum++)
{
SvxMSDffShapeOrder& rOrder = *(*m_pShapeOrders)[ nShapeNum ];
SvxMSDffShapeOrder& rOrder = *m_aShapeOrders[ nShapeNum ];
if( rOrder.pObj == pObject )
{
......@@ -5589,7 +5589,6 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
:DffPropertyReader( *this ),
m_pBLIPInfos( new SvxMSDffBLIPInfos ),
m_xShapeInfosByTxBxComp( new SvxMSDffShapeInfos_ByTxBxComp ),
m_pShapeOrders( new SvxMSDffShapeOrders ),
nOffsDgg( nOffsDgg_ ),
nBLIPCount( USHRT_MAX ), // initialize with error, since we fist check if the
nGroupShapeFlags(0), // ensure initialization here, as some corrupted
......@@ -5636,7 +5635,6 @@ SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const OUString& rBaseURL )
:DffPropertyReader( *this ),
m_pBLIPInfos( new SvxMSDffBLIPInfos ),
m_xShapeInfosByTxBxComp( new SvxMSDffShapeInfos_ByTxBxComp ),
m_pShapeOrders( new SvxMSDffShapeOrders ),
nOffsDgg( 0 ),
nBLIPCount( USHRT_MAX ), // initialize with error, since we first have to check
nGroupShapeFlags(0),
......@@ -5660,7 +5658,6 @@ SvxMSDffManager::~SvxMSDffManager()
{
delete pSecPropSet;
delete m_pBLIPInfos;
delete m_pShapeOrders;
}
void SvxMSDffManager::InitSvxMSDffManager( sal_uInt32 nOffsDgg_, SvStream* pStData_, sal_uInt32 nOleConvFlags )
......@@ -6188,7 +6185,7 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
}
m_xShapeInfosByTxBxComp->insert(std::make_shared<SvxMSDffShapeInfo>(
aInfo));
m_pShapeOrders->push_back(o3tl::make_unique<SvxMSDffShapeOrder>(
m_aShapeOrders.push_back(o3tl::make_unique<SvxMSDffShapeOrder>(
aInfo.nShapeId ));
}
......
......@@ -401,7 +401,7 @@ class MSFILTER_DLLPUBLIC SvxMSDffManager : public DffPropertyReader
SvxMSDffBLIPInfos* m_pBLIPInfos;
std::unique_ptr<SvxMSDffShapeInfos_ByTxBxComp> m_xShapeInfosByTxBxComp;
std::unique_ptr<SvxMSDffShapeInfos_ById> m_xShapeInfosById;
SvxMSDffShapeOrders* m_pShapeOrders;
SvxMSDffShapeOrders m_aShapeOrders;
sal_uInt32 nOffsDgg;
sal_uInt16 nBLIPCount;
sal_uInt32 nGroupShapeFlags;
......@@ -684,8 +684,8 @@ public:
const SvxMSDffShapeInfos_ById* GetShapeInfos() const
{ return m_xShapeInfosById.get(); }
SvxMSDffShapeOrders* GetShapeOrders() const
{ return m_pShapeOrders; }
const SvxMSDffShapeOrders* GetShapeOrders() const
{ return &m_aShapeOrders; }
void StoreShapeOrder(sal_uLong nId,
sal_uLong nTxBx,
......
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