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 /sc/source/ui/drawfunc | |
parent | 1fad074f43e3301420900918881ad1a8b0bc8687 (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 'sc/source/ui/drawfunc')
-rw-r--r-- | sc/source/ui/drawfunc/drawsh.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index 61d20f140967..1ab7def96766 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -309,7 +309,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin ) { SvxMacroTableDtor aTab; rtl::OUString sMacro = pInfo->GetMacro(); - aTab.Insert(SFX_EVENT_MOUSECLICK_OBJECT, new SvxMacro(sMacro, rtl::OUString())); + aTab.Insert(SFX_EVENT_MOUSECLICK_OBJECT, SvxMacro(sMacro, rtl::OUString())); aItem.SetMacroTable( aTab ); } @@ -334,7 +334,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin ) if( SFX_ITEM_SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, false, &pItem )) { rtl::OUString sMacro; - SvxMacro* pMacro = ((SvxMacroItem*)pItem)->GetMacroTable().Get( SFX_EVENT_MOUSECLICK_OBJECT ); + const SvxMacro* pMacro = ((SvxMacroItem*)pItem)->GetMacroTable().Get( SFX_EVENT_MOUSECLICK_OBJECT ); if ( pMacro ) sMacro = pMacro->GetMacName(); |