diff options
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 25 | ||||
-rw-r--r-- | include/filter/msfilter/msdffimp.hxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8graf2.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 2 |
4 files changed, 16 insertions, 21 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 1a49e875efa1..05fd7ea82a68 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -5470,10 +5470,10 @@ void SvxMSDffManager::StoreShapeOrder(sal_uLong nId, SwFlyFrameFormat* pFly, short nHdFtSection) const { - sal_uInt16 nShpCnt = pShapeOrders->size(); + sal_uInt16 nShpCnt = m_pShapeOrders->size(); for (sal_uInt16 nShapeNum=0; nShapeNum < nShpCnt; nShapeNum++) { - SvxMSDffShapeOrder& rOrder = (*pShapeOrders)[ nShapeNum ]; + SvxMSDffShapeOrder& rOrder = *(*m_pShapeOrders)[ nShapeNum ]; if( rOrder.nShapeId == nId ) { @@ -5491,10 +5491,10 @@ void SvxMSDffManager::ExchangeInShapeOrder( SdrObject* pOldObject, SwFlyFrameFormat* pFly, SdrObject* pObject) const { - sal_uInt16 nShpCnt = pShapeOrders->size(); + sal_uInt16 nShpCnt = m_pShapeOrders->size(); for (sal_uInt16 nShapeNum=0; nShapeNum < nShpCnt; nShapeNum++) { - SvxMSDffShapeOrder& rOrder = (*pShapeOrders)[ nShapeNum ]; + SvxMSDffShapeOrder& rOrder = *(*m_pShapeOrders)[ nShapeNum ]; if( rOrder.pObj == pOldObject ) { @@ -5508,10 +5508,10 @@ void SvxMSDffManager::ExchangeInShapeOrder( SdrObject* pOldObject, void SvxMSDffManager::RemoveFromShapeOrder( SdrObject* pObject ) const { - sal_uInt16 nShpCnt = pShapeOrders->size(); + sal_uInt16 nShpCnt = m_pShapeOrders->size(); for (sal_uInt16 nShapeNum=0; nShapeNum < nShpCnt; nShapeNum++) { - SvxMSDffShapeOrder& rOrder = (*pShapeOrders)[ nShapeNum ]; + SvxMSDffShapeOrder& rOrder = *(*m_pShapeOrders)[ nShapeNum ]; if( rOrder.pObj == pObject ) { @@ -5523,12 +5523,8 @@ void SvxMSDffManager::RemoveFromShapeOrder( SdrObject* pObject ) const } - - - // exported class: Public Methods - SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_, const OUString& rBaseURL, sal_uInt32 nOffsDgg_, @@ -5542,7 +5538,7 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_, pFormModel( NULL ), m_pBLIPInfos( new SvxMSDffBLIPInfos ), m_xShapeInfosByTxBxComp( new SvxMSDffShapeInfos_ByTxBxComp ), - pShapeOrders( new SvxMSDffShapeOrders ), + 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 @@ -5591,7 +5587,7 @@ SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const OUString& rBaseURL ) pFormModel( NULL ), m_pBLIPInfos( new SvxMSDffBLIPInfos ), m_xShapeInfosByTxBxComp( new SvxMSDffShapeInfos_ByTxBxComp ), - pShapeOrders( new SvxMSDffShapeOrders ), + m_pShapeOrders( new SvxMSDffShapeOrders ), nOffsDgg( 0 ), nBLIPCount( USHRT_MAX ), // initialize with error, since we first have to check nGroupShapeFlags(0), @@ -5616,7 +5612,7 @@ SvxMSDffManager::~SvxMSDffManager() { delete pSecPropSet; delete m_pBLIPInfos; - delete pShapeOrders; + delete m_pShapeOrders; delete pFormModel; } @@ -6146,7 +6142,8 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt, } m_xShapeInfosByTxBxComp->insert(std::shared_ptr<SvxMSDffShapeInfo>( new SvxMSDffShapeInfo(aInfo))); - pShapeOrders->push_back( new SvxMSDffShapeOrder( aInfo.nShapeId ) ); + m_pShapeOrders->push_back(std::unique_ptr<SvxMSDffShapeOrder>( + new SvxMSDffShapeOrder( aInfo.nShapeId ))); } // and position the Stream correctly again diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx index 14fa1e5e2a24..f3ce6b58627c 100644 --- a/include/filter/msfilter/msdffimp.hxx +++ b/include/filter/msfilter/msdffimp.hxx @@ -27,8 +27,6 @@ #include <set> #include <vector> -#include <boost/ptr_container/ptr_vector.hpp> - #include <com/sun/star/uno/Reference.h> #include <com/sun/star/embed/XEmbeddedObject.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -110,7 +108,7 @@ typedef ::std::map< sal_Int32, SdrObject* > SvxMSDffShapeIdContainer; #define SVEXT_PERSIST_STREAM "\002OlePres000" /// the following will be sorted by the order of their appearance: -typedef boost::ptr_vector<SvxMSDffShapeOrder> SvxMSDffShapeOrders; +typedef std::vector<std::unique_ptr<SvxMSDffShapeOrder>> SvxMSDffShapeOrders; struct MSFILTER_DLLPUBLIC CompareSvxMSDffShapeInfoById { @@ -402,7 +400,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* pShapeOrders; + SvxMSDffShapeOrders* m_pShapeOrders; sal_uInt32 nOffsDgg; sal_uInt16 nBLIPCount; sal_uInt32 nGroupShapeFlags; @@ -675,7 +673,7 @@ public: { return m_xShapeInfosById.get(); } inline SvxMSDffShapeOrders* GetShapeOrders() const - { return pShapeOrders; } + { return m_pShapeOrders; } void StoreShapeOrder(sal_uLong nId, sal_uLong nTxBx, diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx index c2c0a65ae547..2c1182d115f5 100644 --- a/sw/source/filter/ww8/ww8graf2.cxx +++ b/sw/source/filter/ww8/ww8graf2.cxx @@ -99,7 +99,7 @@ sal_uInt16 wwZOrderer::GetEscherObjectIdx(sal_uLong nSpId) // First, find out what position this shape is in the Escher order. for (sal_uInt16 nShapePos=0; nShapePos < nShapeCount; nShapePos++) { - const SvxMSDffShapeOrder& rOrder = (*mpShapeOrders)[nShapePos]; + const SvxMSDffShapeOrder& rOrder = *(*mpShapeOrders)[nShapePos]; if (rOrder.nShapeId == nSpId) { nFound = nShapePos; diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 9ae8606fe228..8641ff07888e 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -5167,7 +5167,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) for (sal_uInt16 nShapeNum=0; nShapeNum < nShapeCount; nShapeNum++) { SvxMSDffShapeOrder *pOrder = - &(*m_pMSDffManager->GetShapeOrders())[nShapeNum]; + (*m_pMSDffManager->GetShapeOrders())[nShapeNum].get(); // Insert Pointer into new Sort array if (pOrder->nTxBxComp && pOrder->pFly) aTxBxSort.insert(pOrder); |