[Libreoffice-commits] core.git: filter/source include/filter sw/source
Takeshi Abe
tabe at fixedpoint.jp
Wed Oct 8 08:18:53 PDT 2014
filter/source/msfilter/msdffimp.cxx | 12 +++---------
include/filter/msfilter/msdffimp.hxx | 8 ++------
sw/source/filter/ww8/ww8graf2.cxx | 2 +-
sw/source/filter/ww8/ww8par.cxx | 2 +-
4 files changed, 7 insertions(+), 17 deletions(-)
New commits:
commit ad8c2f7090ea2e77bb9afe77b2764f1b4560ad76
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Tue Oct 7 18:46:56 2014 +0900
fdo#75757: remove inheritance to std::vector
from SvxMSDffShapeOrders.
Change-Id: Idf551f1fbde907759d6a296141e2837264dbbb10
Reviewed-on: https://gerrit.libreoffice.org/11840
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index f76de8c..1fe026c 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -5419,7 +5419,7 @@ void SvxMSDffManager::StoreShapeOrder(sal_uLong nId,
sal_uInt16 nShpCnt = pShapeOrders->size();
for (sal_uInt16 nShapeNum=0; nShapeNum < nShpCnt; nShapeNum++)
{
- SvxMSDffShapeOrder& rOrder = *(*pShapeOrders)[ nShapeNum ];
+ SvxMSDffShapeOrder& rOrder = (*pShapeOrders)[ nShapeNum ];
if( rOrder.nShapeId == nId )
{
@@ -5440,7 +5440,7 @@ void SvxMSDffManager::ExchangeInShapeOrder( SdrObject* pOldObject,
sal_uInt16 nShpCnt = pShapeOrders->size();
for (sal_uInt16 nShapeNum=0; nShapeNum < nShpCnt; nShapeNum++)
{
- SvxMSDffShapeOrder& rOrder = *(*pShapeOrders)[ nShapeNum ];
+ SvxMSDffShapeOrder& rOrder = (*pShapeOrders)[ nShapeNum ];
if( rOrder.pObj == pOldObject )
{
@@ -5457,7 +5457,7 @@ void SvxMSDffManager::RemoveFromShapeOrder( SdrObject* pObject ) const
sal_uInt16 nShpCnt = pShapeOrders->size();
for (sal_uInt16 nShapeNum=0; nShapeNum < nShpCnt; nShapeNum++)
{
- SvxMSDffShapeOrder& rOrder = *(*pShapeOrders)[ nShapeNum ];
+ SvxMSDffShapeOrder& rOrder = (*pShapeOrders)[ nShapeNum ];
if( rOrder.pObj == pObject )
{
@@ -7345,10 +7345,4 @@ SdrObject* SvxMSDffManager::getShapeForId( sal_Int32 nShapeId )
return aIter != maShapeIdContainer.end() ? (*aIter).second : 0;
}
-SvxMSDffShapeOrders::~SvxMSDffShapeOrders()
-{
- for( const_iterator it = begin(); it != end(); ++it )
- delete *it;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx
index 33cbc41..4523462 100644
--- a/include/filter/msfilter/msdffimp.hxx
+++ b/include/filter/msfilter/msdffimp.hxx
@@ -111,11 +111,7 @@ typedef ::std::map< sal_Int32, SdrObject* > SvxMSDffShapeIdContainer;
// the following two will be sorted by the order of their appearance:
typedef boost::ptr_vector<SvxMSDffBLIPInfo> SvxMSDffBLIPInfos;
-class SvxMSDffShapeOrders : public std::vector<SvxMSDffShapeOrder*>
-{
-public:
- ~SvxMSDffShapeOrders();
-};
+typedef boost::ptr_vector<SvxMSDffShapeOrder> SvxMSDffShapeOrders;
struct MSFILTER_DLLPUBLIC CompareSvxMSDffShapeInfoById
{
@@ -695,7 +691,7 @@ public:
inline const SvxMSDffShapeInfos_ById* GetShapeInfos( void ) const
{ return m_pShapeInfosById.get(); }
- inline const SvxMSDffShapeOrders* GetShapeOrders( void ) const
+ inline SvxMSDffShapeOrders* GetShapeOrders( void ) const
{ return pShapeOrders; }
void StoreShapeOrder(sal_uLong nId,
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 0e3a491..6be482c 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 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 7c1331e..df76c20 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5203,7 +5203,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
for (sal_uInt16 nShapeNum=0; nShapeNum < nShapeCount; nShapeNum++)
{
SvxMSDffShapeOrder *pOrder =
- (*pMSDffManager->GetShapeOrders())[nShapeNum];
+ &(*pMSDffManager->GetShapeOrders())[nShapeNum];
// Insert Pointer into new Sort array
if (pOrder->nTxBxComp && pOrder->pFly)
aTxBxSort.insert(pOrder);
More information about the Libreoffice-commits
mailing list