summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-03-08 15:53:57 +0200
committerTor Lillqvist <tlillqvist@suse.com>2012-03-08 16:07:22 +0200
commit4b4fb33c606fd068e024669efcbd7ad2aefdaacd (patch)
tree2cea747768a081773303ba0844c0ea0f558530f9 /sfx2
parent1fad074f43e3301420900918881ad1a8b0bc8687 (diff)
Convert from tools/table.hxx to std::map in SvxMacroTableDtor
In this case, we also convert from storing pointers to storing the items directly because SvxMacroTableDtor completely controls the lifecycle of the SvxMacro objects it contains. Also add an operator== to SvxMacroTableDtor and remove the out-of-line implementations of equals from two other places.
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/bastyp/sfxhtml.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index 2f3a7ad6089e..6a3fee662876 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -177,8 +177,7 @@ IMAPOBJ_SETEVENT:
if( sTmp.Len() )
{
sTmp = convertLineEnd(sTmp, GetSystemLineEnd());
- aMacroTbl.Insert( nEvent,
- new SvxMacro( sTmp, sEmpty, eScrpType ));
+ aMacroTbl.Insert( nEvent, SvxMacro( sTmp, sEmpty, eScrpType ));
}
}
break;
@@ -198,7 +197,7 @@ IMAPOBJ_SETEVENT:
aCoords[2], aCoords[3] );
IMapRectangleObject aMapRObj( aRec, aHRef, aAlt, String(), aTarget, aName,
!bNoHRef );
- if( aMacroTbl.Count() )
+ if( !aMacroTbl.empty() )
aMapRObj.SetMacroTable( aMacroTbl );
pImageMap->InsertIMapObject( aMapRObj );
}
@@ -209,7 +208,7 @@ IMAPOBJ_SETEVENT:
Point aPoint( aCoords[0], aCoords[1] );
IMapCircleObject aMapCObj( aPoint, aCoords[2],aHRef, aAlt, String(),
aTarget, aName, !bNoHRef );
- if( aMacroTbl.Count() )
+ if( !aMacroTbl.empty() )
aMapCObj.SetMacroTable( aMacroTbl );
pImageMap->InsertIMapObject( aMapCObj );
}
@@ -223,7 +222,7 @@ IMAPOBJ_SETEVENT:
aPoly[i] = Point( aCoords[2*i], aCoords[2*i+1] );
IMapPolygonObject aMapPObj( aPoly, aHRef, aAlt, String(), aTarget, aName,
!bNoHRef );
- if( aMacroTbl.Count() )
+ if( !aMacroTbl.empty() )
aMapPObj.SetMacroTable( aMacroTbl );
pImageMap->InsertIMapObject( aMapPObj );
}