aDataAvailableLink in SfxMedium was never called.
Also remove all callback functions that would never get called because of this. Change-Id: I5dd5d64ccca9dd3d655428218957753d3200299e
This commit is contained in:
@@ -739,8 +739,6 @@ namespace frm
|
|||||||
delete m_pMedium;
|
delete m_pMedium;
|
||||||
|
|
||||||
m_pMedium = new SfxMedium(rURL, STREAM_STD_READ);
|
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
|
// Das XModel suchen, um an die Object-Shell oder zumindest den
|
||||||
// Referer zu gelangen.
|
// Referer zu gelangen.
|
||||||
@@ -847,14 +845,6 @@ namespace frm
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
IMPL_STATIC_LINK( OClickableImageBaseModel, DataAvailableLink, void*, EMPTYARG )
|
|
||||||
{
|
|
||||||
::osl::MutexGuard aGuard( pThis->m_aMutex );
|
|
||||||
pThis->DataAvailable();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
void OClickableImageBaseModel::_propertyChanged( const PropertyChangeEvent& rEvt )
|
void OClickableImageBaseModel::_propertyChanged( const PropertyChangeEvent& rEvt )
|
||||||
throw( RuntimeException )
|
throw( RuntimeException )
|
||||||
|
@@ -74,8 +74,6 @@ namespace frm
|
|||||||
::com::sun::star::uno::Reference< ::com::sun::star::form::submission::XSubmission >
|
::com::sun::star::uno::Reference< ::com::sun::star::form::submission::XSubmission >
|
||||||
m_xSubmissionDelegate;
|
m_xSubmissionDelegate;
|
||||||
|
|
||||||
|
|
||||||
DECL_STATIC_LINK( OClickableImageBaseModel, DataAvailableLink, void* );
|
|
||||||
DECL_STATIC_LINK( OClickableImageBaseModel, DownloadDoneLink, void* );
|
DECL_STATIC_LINK( OClickableImageBaseModel, DownloadDoneLink, void* );
|
||||||
|
|
||||||
inline ImageProducer* GetImageProducer() { return m_pProducer; }
|
inline ImageProducer* GetImageProducer() { return m_pProducer; }
|
||||||
|
@@ -145,7 +145,6 @@ public:
|
|||||||
sal_Bool IsOpen() const; // { return aStorage.Is() || pInStream; }
|
sal_Bool IsOpen() const; // { return aStorage.Is() || pInStream; }
|
||||||
void DownLoad( const Link& aLink = Link());
|
void DownLoad( const Link& aLink = Link());
|
||||||
void SetDoneLink( const Link& rLink );
|
void SetDoneLink( const Link& rLink );
|
||||||
void SetDataAvailableLink( const Link& rLink );
|
|
||||||
|
|
||||||
sal_uInt32 GetErrorCode() const;
|
sal_uInt32 GetErrorCode() const;
|
||||||
sal_uInt32 GetError() const
|
sal_uInt32 GetError() const
|
||||||
|
@@ -81,7 +81,6 @@ SvFileObject::~SvFileObject()
|
|||||||
{
|
{
|
||||||
if ( xMed.Is() )
|
if ( xMed.Is() )
|
||||||
{
|
{
|
||||||
xMed->SetDataAvailableLink( Link() );
|
|
||||||
xMed->SetDoneLink( Link() );
|
xMed->SetDoneLink( Link() );
|
||||||
xMed.Clear();
|
xMed.Clear();
|
||||||
}
|
}
|
||||||
@@ -274,7 +273,6 @@ sal_Bool SvFileObject::LoadFile_Impl()
|
|||||||
bWaitForData = sal_True;
|
bWaitForData = sal_True;
|
||||||
|
|
||||||
SfxMediumRef xTmpMed = xMed;
|
SfxMediumRef xTmpMed = xMed;
|
||||||
xMed->SetDataAvailableLink( STATIC_LINK( this, SvFileObject, LoadGrfNewData_Impl ) );
|
|
||||||
bInCallDownLoad = sal_True;
|
bInCallDownLoad = sal_True;
|
||||||
xMed->DownLoad( STATIC_LINK( this, SvFileObject, LoadGrfReady_Impl ) );
|
xMed->DownLoad( STATIC_LINK( this, SvFileObject, LoadGrfReady_Impl ) );
|
||||||
bInCallDownLoad = sal_False;
|
bInCallDownLoad = sal_False;
|
||||||
@@ -337,7 +335,6 @@ sal_Bool SvFileObject::GetGraphic_Impl( Graphic& rGrf, SvStream* pStream )
|
|||||||
|
|
||||||
if( !pDownLoadData->aGrf.GetContext() )
|
if( !pDownLoadData->aGrf.GetContext() )
|
||||||
{
|
{
|
||||||
xMed->SetDataAvailableLink( Link() );
|
|
||||||
delete pDownLoadData, pDownLoadData = 0;
|
delete pDownLoadData, pDownLoadData = 0;
|
||||||
bDataReady = sal_True;
|
bDataReady = sal_True;
|
||||||
bWaitForData = sal_False;
|
bWaitForData = sal_False;
|
||||||
@@ -513,7 +510,6 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, EMPTYARG )
|
|||||||
pThis->bLoadAgain = sal_True;
|
pThis->bLoadAgain = sal_True;
|
||||||
if( pThis->xMed.Is() )
|
if( pThis->xMed.Is() )
|
||||||
{
|
{
|
||||||
pThis->xMed->SetDataAvailableLink( Link() );
|
|
||||||
pThis->xMed->SetDoneLink( Link() );
|
pThis->xMed->SetDoneLink( Link() );
|
||||||
|
|
||||||
Application::PostUserEvent(
|
Application::PostUserEvent(
|
||||||
@@ -535,56 +531,6 @@ IMPL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef*, pDelMed )
|
|||||||
return 0;
|
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 )
|
IMPL_LINK( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg )
|
||||||
{
|
{
|
||||||
String sFile;
|
String sFile;
|
||||||
|
@@ -58,7 +58,6 @@ class SvFileObject : public sfx2::SvLinkSource
|
|||||||
|
|
||||||
DECL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef* );
|
DECL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef* );
|
||||||
DECL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void* );
|
DECL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void* );
|
||||||
DECL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void* );
|
|
||||||
DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
|
DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -287,7 +287,6 @@ public:
|
|||||||
SvKeyValueIteratorRef xAttributes;
|
SvKeyValueIteratorRef xAttributes;
|
||||||
|
|
||||||
svtools::AsynchronLink aDoneLink;
|
svtools::AsynchronLink aDoneLink;
|
||||||
svtools::AsynchronLink aAvailableLink;
|
|
||||||
|
|
||||||
uno::Sequence < util::RevisionTag > aVersions;
|
uno::Sequence < util::RevisionTag > aVersions;
|
||||||
|
|
||||||
@@ -358,7 +357,6 @@ SfxMedium_Impl::SfxMedium_Impl( SfxMedium* pAntiImplP ) :
|
|||||||
SfxMedium_Impl::~SfxMedium_Impl()
|
SfxMedium_Impl::~SfxMedium_Impl()
|
||||||
{
|
{
|
||||||
aDoneLink.ClearPendingCall();
|
aDoneLink.ClearPendingCall();
|
||||||
aAvailableLink.ClearPendingCall();
|
|
||||||
|
|
||||||
delete pTempFile;
|
delete pTempFile;
|
||||||
delete m_pSet;
|
delete m_pSet;
|
||||||
@@ -2404,13 +2402,6 @@ void SfxMedium::SetDoneLink( const Link& rLink )
|
|||||||
pImp->aDoneLink = rLink;
|
pImp->aDoneLink = rLink;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------
|
|
||||||
|
|
||||||
void SfxMedium::SetDataAvailableLink( const Link& rLink )
|
|
||||||
{
|
|
||||||
pImp->aAvailableLink = rLink;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SfxMedium::DownLoad( const Link& aLink )
|
void SfxMedium::DownLoad( const Link& aLink )
|
||||||
{
|
{
|
||||||
SetDoneLink( aLink );
|
SetDoneLink( aLink );
|
||||||
|
Reference in New Issue
Block a user