[Libreoffice-commits] core.git: svx/source
David Tardon
dtardon at redhat.com
Thu Jun 27 03:15:54 PDT 2013
svx/source/svdraw/svdundo.cxx | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
New commits:
commit 66480d15a04204b0f60008b9cd8e25a66ca6db6a
Author: David Tardon <dtardon at redhat.com>
Date: Thu Jun 27 12:07:59 2013 +0200
fdo#47646 fix undo of ungrouping
Change-Id: If20e645d8d708ebe17e2d9455c896c94592993bb
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index d5ca5e2..e211122 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;
+ }
}
}
}
More information about the Libreoffice-commits
mailing list