summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-07-25 20:37:27 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-07-25 21:19:56 -0400
commit66e4540041f09b4e779d27190f0925479f74103b (patch)
tree11cdcbe494b47e4a1e7296f2c3b15e4d08c70a35
parent8a88273e75de0081c4284c9f09739da7f7f9bc3a (diff)
aDataAvailableLink in SfxMedium was never called.
Also remove all callback functions that would never get called because of this. Change-Id: I5dd5d64ccca9dd3d655428218957753d3200299e
-rw-r--r--forms/source/component/clickableimage.cxx10
-rw-r--r--forms/source/component/clickableimage.hxx2
-rw-r--r--sfx2/inc/sfx2/docfile.hxx1
-rw-r--r--sfx2/source/appl/fileobj.cxx54
-rw-r--r--sfx2/source/appl/fileobj.hxx1
-rw-r--r--sfx2/source/doc/docfile.cxx9
6 files changed, 0 insertions, 77 deletions
diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx
index e58d91443674..783a13f8d0fb 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -739,8 +739,6 @@ namespace frm
delete m_pMedium;
m_pMedium = new SfxMedium(rURL, STREAM_STD_READ);
- m_pMedium->SetDataAvailableLink(
- STATIC_LINK(this, OClickableImageBaseModel, DataAvailableLink));
// Das XModel suchen, um an die Object-Shell oder zumindest den
// Referer zu gelangen.
@@ -848,14 +846,6 @@ namespace frm
}
//------------------------------------------------------------------------------
- IMPL_STATIC_LINK( OClickableImageBaseModel, DataAvailableLink, void*, EMPTYARG )
- {
- ::osl::MutexGuard aGuard( pThis->m_aMutex );
- pThis->DataAvailable();
- return 0;
- }
-
- //------------------------------------------------------------------------------
void OClickableImageBaseModel::_propertyChanged( const PropertyChangeEvent& rEvt )
throw( RuntimeException )
{
diff --git a/forms/source/component/clickableimage.hxx b/forms/source/component/clickableimage.hxx
index 09105c2f06db..45e51157a275 100644
--- a/forms/source/component/clickableimage.hxx
+++ b/forms/source/component/clickableimage.hxx
@@ -74,8 +74,6 @@ namespace frm
::com::sun::star::uno::Reference< ::com::sun::star::form::submission::XSubmission >
m_xSubmissionDelegate;
-
- DECL_STATIC_LINK( OClickableImageBaseModel, DataAvailableLink, void* );
DECL_STATIC_LINK( OClickableImageBaseModel, DownloadDoneLink, void* );
inline ImageProducer* GetImageProducer() { return m_pProducer; }
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index b4da325eabee..044ae4ba8ce1 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -145,7 +145,6 @@ public:
sal_Bool IsOpen() const; // { return aStorage.Is() || pInStream; }
void DownLoad( const Link& aLink = Link());
void SetDoneLink( const Link& rLink );
- void SetDataAvailableLink( const Link& rLink );
sal_uInt32 GetErrorCode() const;
sal_uInt32 GetError() const
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 9a9c6ff3cc7d..d715f4d3dd88 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -81,7 +81,6 @@ SvFileObject::~SvFileObject()
{
if ( xMed.Is() )
{
- xMed->SetDataAvailableLink( Link() );
xMed->SetDoneLink( Link() );
xMed.Clear();
}
@@ -274,7 +273,6 @@ sal_Bool SvFileObject::LoadFile_Impl()
bWaitForData = sal_True;
SfxMediumRef xTmpMed = xMed;
- xMed->SetDataAvailableLink( STATIC_LINK( this, SvFileObject, LoadGrfNewData_Impl ) );
bInCallDownLoad = sal_True;
xMed->DownLoad( STATIC_LINK( this, SvFileObject, LoadGrfReady_Impl ) );
bInCallDownLoad = sal_False;
@@ -337,7 +335,6 @@ sal_Bool SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream )
if( !pDownLoadData->aGrf.GetContext() )
{
- xMed->SetDataAvailableLink( Link() );
delete pDownLoadData, pDownLoadData = 0;
bDataReady = sal_True;
bWaitForData = sal_False;
@@ -513,7 +510,6 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, EMPTYARG )
pThis->bLoadAgain = sal_True;
if( pThis->xMed.Is() )
{
- pThis->xMed->SetDataAvailableLink( Link() );
pThis->xMed->SetDoneLink( Link() );
Application::PostUserEvent(
@@ -535,56 +531,6 @@ IMPL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef*, pDelMed )
return 0;
}
-IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG )
-{
- // When we come form here there it can not be an error no more.
- if( pThis->bInNewData )
- return 0;
-
- pThis->bInNewData = sal_True;
- pThis->bLoadError = sal_False;
-
- if( !pThis->pDownLoadData )
- {
- pThis->pDownLoadData = new Impl_DownLoadData(
- STATIC_LINK( pThis, SvFileObject, LoadGrfNewData_Impl ) );
- // Set Zero-link, so that no temporary graphics can be swapped out,
- // the filter checks whether a link is set already => if so, is _no_
- // new link set, the link here must be set (before it is first
- // filtered), to prevent, that the context will be reset
- // (aynchronous loading)
- if( !pThis->bNativFormat )
- {
- static GfxLink aDummyLink;
- pThis->pDownLoadData->aGrf.SetLink( aDummyLink );
- }
- }
-
- pThis->NotifyDataChanged();
-
- SvStream* pStrm = pThis->xMed.Is() ? pThis->xMed->GetInStream() : 0;
- if( pStrm && pStrm->GetError() )
- {
- if( ERRCODE_IO_PENDING == pStrm->GetError() )
- pStrm->ResetError();
-
- // a DataReady in DataChanged?
- else if( pThis->bWaitForData && pThis->pDownLoadData )
- {
- pThis->bLoadError = sal_True;
- }
- }
-
- if( pThis->bDataReady )
- {
- // Graphic is finished, also send DataChanged from Status change
- pThis->SendStateChg_Impl( pStrm->GetError() ? sfx2::LinkManager::STATE_LOAD_ERROR : sfx2::LinkManager::STATE_LOAD_OK );
- }
-
- pThis->bInNewData = sal_False;
- return 0;
-}
-
IMPL_LINK( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
{
String sFile;
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index 7c7ab2a18ac2..b1b56997d32c 100644
--- a/sfx2/source/appl/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -58,7 +58,6 @@ class SvFileObject : public sfx2::SvLinkSource
DECL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef* );
DECL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void* );
- DECL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void* );
DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
protected:
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 14cfd8f0f1db..b0e0640b810f 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -287,7 +287,6 @@ public:
SvKeyValueIteratorRef xAttributes;
svtools::AsynchronLink aDoneLink;
- svtools::AsynchronLink aAvailableLink;
uno::Sequence < util::RevisionTag > aVersions;
@@ -358,7 +357,6 @@ SfxMedium_Impl::SfxMedium_Impl( SfxMedium* pAntiImplP ) :
SfxMedium_Impl::~SfxMedium_Impl()
{
aDoneLink.ClearPendingCall();
- aAvailableLink.ClearPendingCall();
delete pTempFile;
delete m_pSet;
@@ -2404,13 +2402,6 @@ void SfxMedium::SetDoneLink( const Link& rLink )
pImp->aDoneLink = rLink;
}
-//----------------------------------------------------------------
-
-void SfxMedium::SetDataAvailableLink( const Link& rLink )
-{
- pImp->aAvailableLink = rLink;
-}
-
void SfxMedium::DownLoad( const Link& aLink )
{
SetDoneLink( aLink );