diff options
author | Noel Grandin <noel@peralex.com> | 2012-03-08 15:53:57 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2012-03-08 16:07:22 +0200 |
commit | 4b4fb33c606fd068e024669efcbd7ad2aefdaacd (patch) | |
tree | 2cea747768a081773303ba0844c0ea0f558530f9 /sfx2 | |
parent | convert to OUString to I can use SAL_WARN (diff) | |
download | core-4b4fb33c606fd068e024669efcbd7ad2aefdaacd.tar.gz core-4b4fb33c606fd068e024669efcbd7ad2aefdaacd.zip |
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.cxx | 9 |
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 ); } |