Lines 7957-7981
Link Here
|
7957 |
delete pWrapPolygon; |
7957 |
delete pWrapPolygon; |
7958 |
} |
7958 |
} |
7959 |
|
7959 |
|
7960 |
/* vi:set tabstop=4 shiftwidth=4 expandtab: */ |
|
|
7961 |
|
7962 |
void SvxMSDffManager::insertShapeId( sal_Int32 nShapeId, SdrObject* pShape ) |
7960 |
void SvxMSDffManager::insertShapeId( sal_Int32 nShapeId, SdrObject* pShape ) |
7963 |
{ |
7961 |
{ |
7964 |
maShapeIdContainer[nShapeId] = pShape; |
7962 |
maShapeIdContainer[nShapeId] = pShape; |
7965 |
} |
7963 |
} |
7966 |
|
7964 |
|
7967 |
void SvxMSDffManager::removeShapeId( SdrObject* pShape ) |
7965 |
namespace |
7968 |
{ |
7966 |
{ |
7969 |
SvxMSDffShapeIdContainer::iterator aIter( maShapeIdContainer.begin() ); |
7967 |
class IsShape : public std::unary_function<SvxMSDffShapeIdContainer::value_type, bool> |
7970 |
const SvxMSDffShapeIdContainer::iterator aEnd( maShapeIdContainer.end() ); |
|
|
7971 |
while( aIter != aEnd ) |
7972 |
{ |
7968 |
{ |
7973 |
if( (*aIter).second == pShape ) |
7969 |
const SdrObject *mpShape; |
|
|
7970 |
public: |
7971 |
IsShape(const SdrObject *pShape) : mpShape(pShape) {} |
7972 |
bool operator()(const SvxMSDffShapeIdContainer::value_type& rVal) |
7974 |
{ |
7973 |
{ |
7975 |
maShapeIdContainer.erase( aIter ); |
7974 |
return rVal.second == mpShape; |
7976 |
break; |
|
|
7977 |
} |
7975 |
} |
7978 |
} |
7976 |
}; |
|
|
7977 |
} |
7978 |
|
7979 |
void SvxMSDffManager::removeShapeId( SdrObject* pShape ) |
7980 |
{ |
7981 |
const SvxMSDffShapeIdContainer::iterator aEnd( maShapeIdContainer.end() ); |
7982 |
SvxMSDffShapeIdContainer::iterator aIter = std::find_if(maShapeIdContainer.begin(), aEnd, IsShape(pShape)); |
7983 |
if (aIter != aEnd) |
7984 |
maShapeIdContainer.erase( aIter ); |
7979 |
} |
7985 |
} |
7980 |
|
7986 |
|
7981 |
SdrObject* SvxMSDffManager::getShapeForId( sal_Int32 nShapeId ) |
7987 |
SdrObject* SvxMSDffManager::getShapeForId( sal_Int32 nShapeId ) |
Lines 7983-7985
Link Here
|
7983 |
SvxMSDffShapeIdContainer::iterator aIter( maShapeIdContainer.find(nShapeId) ); |
7989 |
SvxMSDffShapeIdContainer::iterator aIter( maShapeIdContainer.find(nShapeId) ); |
7984 |
return aIter != maShapeIdContainer.end() ? (*aIter).second : 0; |
7990 |
return aIter != maShapeIdContainer.end() ? (*aIter).second : 0; |
7985 |
} |
7991 |
} |
|
|
7992 |
|
7993 |
/* vi:set tabstop=4 shiftwidth=4 expandtab: */ |