summaryrefslogtreecommitdiff
path: root/forms/source/component/ImageControl.hxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-03-19 10:53:32 +0000
committerOliver Bolte <obo@openoffice.org>2004-03-19 10:53:32 +0000
commit61d8b6c0ff5f36c1fdac0ef215adbb8af416a8f5 (patch)
treef06c5415bc11084096ac2834d50c5754dea3edf4 /forms/source/component/ImageControl.hxx
parent5e844a60ef10a78a08b54e6f2899ebf12fb1e1ad (diff)
INTEGRATION: CWS formdesign01 (1.9.4); FILE MERGED
2003/12/05 14:24:04 fs 1.9.4.1: #109708# also allow to remove the graphics if it implicitily originates from a database column (and not an explicit image URL)
Diffstat (limited to 'forms/source/component/ImageControl.hxx')
-rw-r--r--forms/source/component/ImageControl.hxx66
1 files changed, 53 insertions, 13 deletions
diff --git a/forms/source/component/ImageControl.hxx b/forms/source/component/ImageControl.hxx
index 2c83da173..77eb5b48d 100644
--- a/forms/source/component/ImageControl.hxx
+++ b/forms/source/component/ImageControl.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ImageControl.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: obo $ $Date: 2003-10-21 08:58:55 $
+ * last change: $Author: obo $ $Date: 2004-03-19 11:53:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -78,6 +78,9 @@
#ifndef _COMPHELPER_PROPERTY_MULTIPLEX_HXX_
#include <comphelper/propmultiplex.hxx>
#endif
+#ifndef _COMPHELPER_IMPLEMENTATIONREFERENCE_HXX
+#include <comphelper/implementationreference.hxx>
+#endif
#ifndef _CPPUHELPER_IMPLBASE2_HXX_
#include <cppuhelper/implbase2.hxx>
#endif
@@ -193,41 +196,78 @@ protected:
};
//==================================================================
-// OImageControlControl
+//= OImageIndicator (helper class for OImageControlControl)
//==================================================================
-class OImageControlControl : public ::com::sun::star::awt::XMouseListener,
- public OBoundControl
+typedef ::cppu::WeakImplHelper1 < ::com::sun::star::awt::XImageConsumer
+ > OImageIndicator_Base;
+
+class OImageIndicator : public OImageIndicator_Base
{
+private:
+ sal_Bool m_bIsProducing : 1;
+ sal_Bool m_bIsEmptyImage : 1;
+
+public:
+ OImageIndicator( );
+
+ void reset();
+ inline sal_Bool isEmptyImage() const { return m_bIsEmptyImage; }
+
protected:
- // UNO Anbindung
+ ~OImageIndicator( );
+ // XImageProducer
+ virtual void SAL_CALL init( sal_Int32 Width, sal_Int32 Height ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setColorModel( sal_Int16 BitCount, const ::com::sun::star::uno::Sequence< sal_Int32 >& RGBAPal, sal_Int32 RedMask, sal_Int32 GreenMask, sal_Int32 BlueMask, sal_Int32 AlphaMask ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPixelsByBytes( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, const ::com::sun::star::uno::Sequence< sal_Int8 >& aProducerData, sal_Int32 nOffset, sal_Int32 nScanSize ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPixelsByLongs( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, const ::com::sun::star::uno::Sequence< sal_Int32 >& aProducerData, sal_Int32 nOffset, sal_Int32 nScanSize ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL complete( sal_Int32 Status, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageProducer >& xProducer ) throw (::com::sun::star::uno::RuntimeException);
+
+private:
+ OImageIndicator( const OImageIndicator& ); // never implemented
+ OImageIndicator& operator=( const OImageIndicator& ); // never implemented
+};
+
+//==================================================================
+//= OImageControlControl
+//==================================================================
+class OImageControlControl :public ::com::sun::star::awt::XMouseListener
+ ,public OBoundControl
+{
+private:
+ typedef ::comphelper::ImplementationReference< OImageIndicator, ::com::sun::star::awt::XImageConsumer >
+ ImageIndicatorReference;
+ ImageIndicatorReference m_pImageIndicator;
+
+protected:
+ // XTypeProvider
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
public:
OImageControlControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
-// UNO Anbindung
+ // UNO
DECLARE_UNO3_AGG_DEFAULTS(OImageControlControl, OBoundControl);
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(const ::com::sun::star::uno::Type& _rType) throw(::com::sun::star::uno::RuntimeException);
-// ::com::sun::star::lang::XEventListener
+ // XEventListener
virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& _rSource) throw(::com::sun::star::uno::RuntimeException)
{ OBoundControl::disposing(_rSource); }
-// ::com::sun::star::lang::XServiceInfo
+ // XServiceInfo
IMPLEMENTATION_NAME(OImageControlControl);
virtual StringSequence SAL_CALL getSupportedServiceNames() throw();
-// ::com::sun::star::awt::XMouseListener
+ // XMouseListener
virtual void SAL_CALL mousePressed(const ::com::sun::star::awt::MouseEvent& e) throw ( ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL mouseReleased(const ::com::sun::star::awt::MouseEvent& e) throw ( ::com::sun::star::uno::RuntimeException) { }
virtual void SAL_CALL mouseEntered(const ::com::sun::star::awt::MouseEvent& e) throw ( ::com::sun::star::uno::RuntimeException) { }
virtual void SAL_CALL mouseExited(const ::com::sun::star::awt::MouseEvent& e) throw ( ::com::sun::star::uno::RuntimeException) { }
-// ::com::sun::star::awt::XControl
- virtual void SAL_CALL createPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit>& _rToolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer>& _rParent) throw(::com::sun::star::uno::RuntimeException);
+ // XControl
+ virtual sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference<starawt::XControlModel>& _rxModel ) throw (::com::sun::star::uno::RuntimeException);
private:
- void implClearGraphics();
+ void implClearGraphics( sal_Bool _bForce );
void implInsertGraphics();
};