diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-06-20 22:36:14 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-06-20 22:36:14 +0200 |
commit | 576af3ed3cca970801d12b0459e68d02b9264f92 (patch) | |
tree | 467820ea48c9113fbcbdd377876ad7d497e289bf /forms/source/component/ImageControl.cxx | |
parent | f86b554ecdad865978a821661c274d4b419c32cc (diff) |
unoawt: now that the image control/model are not connected via XImageProducer/Consumer anymore, ensure that images loaded from a database document are displayed, too
Diffstat (limited to 'forms/source/component/ImageControl.cxx')
-rw-r--r-- | forms/source/component/ImageControl.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index a69ec26a6..da88d6bc0 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -190,6 +190,7 @@ void OImageControlModel::implConstruct() { m_pImageProducer = new ImageProducer; m_xImageProducer = m_pImageProducer; + m_pImageProducer->SetDoneHdl( LINK( this, OImageControlModel, OnImageImportDone ) ); } //------------------------------------------------------------------ @@ -630,6 +631,16 @@ void SAL_CALL OImageControlModel::startProduction( ) throw (RuntimeException) GetImageProducer()->startProduction(); } +//------------------------------------------------------------------------------ +IMPL_LINK( OImageControlModel, OnImageImportDone, ::Graphic*, i_pGraphic ) +{ + ENSURE_OR_RETURN( i_pGraphic, "OImageControlModel::OnImageImportDone: illegal graphic!", 0L ); + setPropertyValue( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Graphic" ) ), + makeAny( Image( i_pGraphic->GetBitmapEx() ).GetXGraphic() ) + ); + return 1L; +} //================================================================== // OImageControlControl |