Kaydet (Commit) 413771fa authored tarafından Takeshi Abe's avatar Takeshi Abe Kaydeden (comit) Caolán McNamara

fdo#75757: remove inheritance to std::map

from ItemFormatMap.

Change-Id: I956b5797e677d22eb71fe801b650db7c982d6d51
Reviewed-on: https://gerrit.libreoffice.org/11854Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst e1b15a2e
...@@ -808,12 +808,21 @@ static const NameListWrapper NO_LIST; ...@@ -808,12 +808,21 @@ static const NameListWrapper NO_LIST;
class ItemFormatMap : public ::std::map< sal_Int64, ItemFormat > class ItemFormatMap
{ {
private:
::std::map< sal_Int64, ItemFormat > maMap;
public: public:
ItemFormatMap() {} ItemFormatMap() : maMap() {}
explicit ItemFormatMap( const NameListRef& rxNameList ) { insertFormats( rxNameList ); } explicit ItemFormatMap( const NameListRef& rxNameList ) { insertFormats( rxNameList ); }
::std::map< sal_Int64, ItemFormat >::const_iterator end() const { return maMap.end(); }
::std::map< sal_Int64, ItemFormat >::const_iterator find(sal_Int64 nId) const
{
return maMap.find(nId);
}
void insertFormats( const NameListRef& rxNameList ); void insertFormats( const NameListRef& rxNameList );
}; };
......
...@@ -193,7 +193,7 @@ void DffStreamObject::dumpDffOpt() ...@@ -193,7 +193,7 @@ void DffStreamObject::dumpDffOpt()
writeHexItem( "complex-size", nValue, "CONV-DEC" ); writeHexItem( "complex-size", nValue, "CONV-DEC" );
String aName; String aName;
PropType eType = PROPTYPE_BINARY; PropType eType = PROPTYPE_BINARY;
ItemFormatMap::const_iterator aIt = maComplexProps.find( nBaseId ); ::std::map< sal_Int64, ItemFormat >::const_iterator aIt = maComplexProps.find( nBaseId );
if( aIt != maComplexProps.end() ) if( aIt != maComplexProps.end() )
{ {
const ItemFormat& rItemFmt = aIt->second; const ItemFormat& rItemFmt = aIt->second;
...@@ -211,7 +211,7 @@ void DffStreamObject::dumpDffOpt() ...@@ -211,7 +211,7 @@ void DffStreamObject::dumpDffOpt()
} }
else else
{ {
ItemFormatMap::const_iterator aIt = maSimpleProps.find( nBaseId ); ::std::map< sal_Int64, ItemFormat >::const_iterator aIt = maSimpleProps.find( nBaseId );
if( aIt != maSimpleProps.end() ) if( aIt != maSimpleProps.end() )
{ {
const ItemFormat& rItemFmt = aIt->second; const ItemFormat& rItemFmt = aIt->second;
......
...@@ -936,7 +936,7 @@ void ItemFormatMap::insertFormats( const NameListRef& rxNameList ) ...@@ -936,7 +936,7 @@ void ItemFormatMap::insertFormats( const NameListRef& rxNameList )
{ {
if( Base::isValid( rxNameList ) ) if( Base::isValid( rxNameList ) )
for( NameListBase::const_iterator aIt = rxNameList->begin(), aEnd = rxNameList->end(); aIt != aEnd; ++aIt ) for( NameListBase::const_iterator aIt = rxNameList->begin(), aEnd = rxNameList->end(); aIt != aEnd; ++aIt )
(*this)[ aIt->first ].parse( aIt->second ); maMap[ aIt->first ].parse( aIt->second );
} }
ConstList::ConstList( const SharedConfigData& rCfgData ) : ConstList::ConstList( const SharedConfigData& rCfgData ) :
...@@ -2488,7 +2488,7 @@ void RecordObjectBase::implDump() ...@@ -2488,7 +2488,7 @@ void RecordObjectBase::implDump()
// record body // record body
if( !mbBinaryOnly && cfg().hasName( xRecNames, mnRecId ) ) if( !mbBinaryOnly && cfg().hasName( xRecNames, mnRecId ) )
{ {
ItemFormatMap::const_iterator aIt = aSimpleRecs.find( mnRecId ); ::std::map< sal_Int64, ItemFormat >::const_iterator aIt = aSimpleRecs.find( mnRecId );
if( aIt != aSimpleRecs.end() ) if( aIt != aSimpleRecs.end() )
dumpItem( aIt->second ); dumpItem( aIt->second );
else else
......
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