summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-05-25 14:48:41 -0400
committerKohei Yoshida <kyoshida@novell.com>2011-05-25 14:48:41 -0400
commit2dc20121a8f9fc09b6a39ee8330323463b896c3e (patch)
tree86b253caa5185183fbfd46dee4ce65e7dd7410c0 /svx
parente0483315269a616acd2ee00fb50208cc03a6ea22 (diff)
Change the signature of DataChanged in the base class.
This change allows the caller to see if DataChanged operation was successful or not.
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdograf.cxx10
-rw-r--r--svx/source/svdraw/svdoole2.cxx10
-rw-r--r--svx/source/svdraw/svdotxln.cxx10
3 files changed, 18 insertions, 12 deletions
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 000771a6e10a..34d691484d05 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -131,8 +131,9 @@ public:
virtual ~SdrGraphicLink();
virtual void Closed();
- virtual void DataChanged( const String& rMimeType,
- const ::com::sun::star::uno::Any & rValue );
+
+ virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
+ const String& rMimeType, const ::com::sun::star::uno::Any & rValue );
void DataChanged( const Graphic& rGraphic );
sal_Bool Connect() { return 0 != GetRealObject(); }
@@ -242,8 +243,8 @@ void SdrGraphicLink::RemoveGraphicUpdater()
// -----------------------------------------------------------------------------
-void SdrGraphicLink::DataChanged( const String& rMimeType,
- const ::com::sun::star::uno::Any & rValue )
+::sfx2::SvBaseLink::UpdateResult SdrGraphicLink::DataChanged(
+ const String& rMimeType, const ::com::sun::star::uno::Any & rValue )
{
SdrModel* pModel = pGrafObj ? pGrafObj->GetModel() : 0;
sfx2::LinkManager* pLinkManager= pModel ? pModel->GetLinkManager() : 0;
@@ -264,6 +265,7 @@ void SdrGraphicLink::DataChanged( const String& rMimeType,
pGrafObj->BroadcastObjectChange();
}
}
+ return SUCCESS;
}
// -----------------------------------------------------------------------------
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 648907f72201..c406da42f6ca 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -612,8 +612,8 @@ public:
virtual ~SdrEmbedObjectLink();
virtual void Closed();
- virtual void DataChanged( const String& rMimeType,
- const ::com::sun::star::uno::Any & rValue );
+ virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
+ const String& rMimeType, const ::com::sun::star::uno::Any & rValue );
sal_Bool Connect() { return GetRealObject() != NULL; }
};
@@ -635,8 +635,8 @@ SdrEmbedObjectLink::~SdrEmbedObjectLink()
// -----------------------------------------------------------------------------
-void SdrEmbedObjectLink::DataChanged( const String& /*rMimeType*/,
- const ::com::sun::star::uno::Any & /*rValue*/ )
+::sfx2::SvBaseLink::UpdateResult SdrEmbedObjectLink::DataChanged(
+ const String& /*rMimeType*/, const ::com::sun::star::uno::Any & /*rValue*/ )
{
if ( !pObj->UpdateLinkURL_Impl() )
{
@@ -666,6 +666,8 @@ void SdrEmbedObjectLink::DataChanged( const String& /*rMimeType*/,
pObj->GetNewReplacement();
pObj->SetChanged();
+
+ return SUCCESS;
}
// -----------------------------------------------------------------------------
diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx
index d287bf04d77f..2cb8038e1271 100644
--- a/svx/source/svdraw/svdotxln.cxx
+++ b/svx/source/svdraw/svdotxln.cxx
@@ -75,8 +75,8 @@ public:
virtual ~ImpSdrObjTextLink();
virtual void Closed();
- virtual void DataChanged( const String& rMimeType,
- const ::com::sun::star::uno::Any & rValue );
+ virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
+ const String& rMimeType, const ::com::sun::star::uno::Any & rValue );
sal_Bool Connect() { return 0 != SvBaseLink::GetRealObject(); }
};
@@ -98,8 +98,8 @@ void ImpSdrObjTextLink::Closed()
}
-void ImpSdrObjTextLink::DataChanged( const String& /*rMimeType*/,
- const ::com::sun::star::uno::Any & /*rValue */)
+::sfx2::SvBaseLink::UpdateResult ImpSdrObjTextLink::DataChanged(
+ const String& /*rMimeType*/, const ::com::sun::star::uno::Any & /*rValue */)
{
bool bForceReload = false;
SdrModel* pModel = pSdrObj ? pSdrObj->GetModel() : 0;
@@ -125,6 +125,8 @@ void ImpSdrObjTextLink::DataChanged( const String& /*rMimeType*/,
}
if (pSdrObj )
pSdrObj->ReloadLinkedText( bForceReload );
+
+ return SUCCESS;
}
////////////////////////////////////////////////////////////////////////////////////////////////////