[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source
David Tardon
dtardon at redhat.com
Thu Jun 27 12:07:59 PDT 2013
svx/source/svdraw/svdundo.cxx | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
New commits:
commit 279e329c2d52940c759f40eb59b5f931c4e68b7c
Author: David Tardon <dtardon at redhat.com>
Date: Thu Jun 27 12:07:59 2013 +0200
fdo#47646 fix undo of ungrouping
(cherry picked from commit 66480d15a04204b0f60008b9cd8e25a66ca6db6a)
Change-Id: If20e645d8d708ebe17e2d9455c896c94592993bb
Signed-off-by: David Tardon <dtardon at redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/4573
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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