Index: sc/source/ui/drawfunc/drawsh.cxx
===================================================================
RCS file: /cvs/sc/sc/source/ui/drawfunc/drawsh.cxx,v
retrieving revision 1.13
diff -u -p -r1.13 drawsh.cxx
--- sc/source/ui/drawfunc/drawsh.cxx	6 Jul 2007 12:42:27 -0000	1.13
+++ sc/source/ui/drawfunc/drawsh.cxx	26 Sep 2007 15:31:48 -0000
@@ -353,21 +351,21 @@ void ScDrawShell::ExecuteMacroAssign( Sd
             rtl::OUString sMacro;
             SvxMacro* pMacro = ((SvxMacroItem*)pItem)->GetMacroTable().Get( SFX_EVENT_MOUSECLICK_OBJECT );
             if ( pMacro )
+		sMacro = pMacro->GetMacName();
+
+            if ( pObj->IsGroupObject() )
             {
-                if ( pObj->IsGroupObject() )
+                SdrObjList* pOL = pObj->GetSubList();
+                ULONG nObj = pOL->GetObjCount();
+                for ( ULONG index=0; index<nObj; ++index )
                 {
-                    SdrObjList* pOL = pObj->GetSubList();
-                    ULONG nObj = pOL->GetObjCount();
-                    for ( ULONG index=0; index<nObj; ++index )
-                    {
-                        pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(index), TRUE );
-                        pInfo->SetMacro( pMacro->GetMacName() );
-                    }
+                    pInfo = ScDrawLayer::GetMacroInfo( pOL->GetObj(index), TRUE );
+                    pInfo->SetMacro( sMacro );
                 }
-                else
-                    pInfo->SetMacro( pMacro->GetMacName() );
-                lcl_setModified( GetObjectShell() );
             }
+            else
+                pInfo->SetMacro( sMacro );
+            lcl_setModified( GetObjectShell() );
         }
     }
 
