summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2013-06-27 12:07:59 +0200
committerDavid Tardon <dtardon@redhat.com>2013-06-27 12:15:27 +0200
commit66480d15a04204b0f60008b9cd8e25a66ca6db6a (patch)
tree176dc697a121402dd5585e3e03e4b1503a52e10f
parent3f175c7728227df551ad11a4c4b8a30ca478d04b (diff)
fdo#47646 fix undo of ungrouping
Change-Id: If20e645d8d708ebe17e2d9455c896c94592993bb
-rw-r--r--svx/source/svdraw/svdundo.cxx26
1 files changed, 22 insertions, 4 deletions
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index d5ca5e2a4679..e2111226ef15 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -715,11 +715,29 @@ void SdrUndoObjList::ObjListListener::Notify(SfxBroadcaster&, const SfxHint& rHi
const SdrHint* const pSdrHint(dynamic_cast<const SdrHint*>(&rHint));
if (pSdrHint)
{
- if ((pSdrHint->GetObject() == &m_rObject) && (pSdrHint->GetKind() == HINT_OBJCHG))
+ if (pSdrHint->GetObject() == &m_rObject)
{
- const sal_uInt32 nNewOrdNum(m_rObject.GetOrdNum());
- if (nNewOrdNum != m_rThat.GetOrdNum())
- m_rThat.SetOrdNum(nNewOrdNum);
+ switch (pSdrHint->GetKind())
+ {
+ case HINT_OBJCHG :
+ if (IsListening(*m_pBroadcaster))
+ {
+ const sal_uInt32 nNewOrdNum(m_rObject.GetOrdNum());
+ if (nNewOrdNum != m_rThat.GetOrdNum())
+ m_rThat.SetOrdNum(nNewOrdNum);
+ }
+ break;
+ case HINT_OBJREMOVED :
+ SAL_WARN_IF(!IsListening(*m_pBroadcaster), "svx.sdr", "Object is not in any list");
+ EndListening(*m_pBroadcaster);
+ break;
+ case HINT_OBJINSERTED :
+ SAL_WARN_IF(IsListening(*m_pBroadcaster), "svx.sdr", "Object is already in a list");
+ StartListening(*m_pBroadcaster);
+ break;
+ default :
+ break;
+ }
}
}
}