summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdobj.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/svdraw/svdobj.cxx')
-rw-r--r--svx/source/svdraw/svdobj.cxx29
1 files changed, 29 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index f87ecd1b6276..0f3de29393c0 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -302,6 +302,8 @@ SdrObject::SdrObject() :
,pGrabBagItem(nullptr)
,mnNavigationPosition(SAL_MAX_UINT32)
,mnLayerID(0)
+ ,mbDelayBroadcastObjectChange(false)
+ ,mbBroadcastObjectChangePending(false)
,mpSvxShape( nullptr )
,maWeakUnoShape()
,mbDoNotInsertIntoPageAutomatically(false)
@@ -880,6 +882,12 @@ void SdrObject::BroadcastObjectChange() const
if( pModel && pModel->isLocked() )
return;
+ if (mbDelayBroadcastObjectChange)
+ {
+ mbBroadcastObjectChangePending = true;
+ return;
+ }
+
bool bPlusDataBroadcast(pPlusData && pPlusData->pBroadcast);
bool bObjectChange(IsInserted() && pModel);
@@ -3092,6 +3100,27 @@ bool SdrObject::HasText() const
return false;
}
+
+SdrDelayBroadcastObjectChange::SdrDelayBroadcastObjectChange( SdrObject& rObj ) :
+ mrObj(rObj), mbOldDelayBroadcastObjectChange( rObj.mbDelayBroadcastObjectChange)
+{
+ mrObj.mbDelayBroadcastObjectChange = true;
+}
+
+SdrDelayBroadcastObjectChange::~SdrDelayBroadcastObjectChange()
+{
+ if (!mbOldDelayBroadcastObjectChange)
+ {
+ mrObj.mbDelayBroadcastObjectChange = false;
+ if (mrObj.mbBroadcastObjectChangePending)
+ {
+ mrObj.mbBroadcastObjectChangePending = false;
+ mrObj.BroadcastObjectChange();
+ }
+ }
+}
+
+
SdrObject* SdrObjFactory::CreateObjectFromFactory( sal_uInt32 nInventor, sal_uInt16 nObjIdentifier, SdrPage* , SdrModel* )
{
SdrObjCreatorParams aParams { nInventor, nObjIdentifier };