diff options
Diffstat (limited to 'UnoControls/source/base/basecontrol.cxx')
-rw-r--r-- | UnoControls/source/base/basecontrol.cxx | 256 |
1 files changed, 128 insertions, 128 deletions
diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx index 4659495de216..b355344467b3 100644 --- a/UnoControls/source/base/basecontrol.cxx +++ b/UnoControls/source/base/basecontrol.cxx @@ -29,9 +29,9 @@ #include <cppuhelper/supportsservice.hxx> #include <cppuhelper/typeprovider.hxx> -//____________________________________________________________________________________________________________ + // namespaces -//____________________________________________________________________________________________________________ + using namespace ::cppu ; using namespace ::osl ; @@ -51,9 +51,9 @@ namespace unocontrols{ #define DEFAULT_INDESIGNMODE false #define DEFAULT_ENABLE true -//____________________________________________________________________________________________________________ + // construct/destruct -//____________________________________________________________________________________________________________ + BaseControl::BaseControl( const Reference< XComponentContext >& rxContext ) : IMPL_MutexContainer ( ) @@ -74,9 +74,9 @@ BaseControl::~BaseControl() { } -//____________________________________________________________________________________________________________ + // XInterface -//____________________________________________________________________________________________________________ + Any SAL_CALL BaseControl::queryInterface( const Type& rType ) throw( RuntimeException ) { @@ -96,9 +96,9 @@ Any SAL_CALL BaseControl::queryInterface( const Type& rType ) throw( RuntimeExce return aReturn ; } -//____________________________________________________________________________________________________________ + // XInterface -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::acquire() throw() { @@ -109,9 +109,9 @@ void SAL_CALL BaseControl::acquire() throw() OComponentHelper::acquire(); } -//____________________________________________________________________________________________________________ + // XInterface -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::release() throw() { @@ -122,9 +122,9 @@ void SAL_CALL BaseControl::release() throw() OComponentHelper::release(); } -//____________________________________________________________________________________________________________ + // XTypeProvider -//____________________________________________________________________________________________________________ + Sequence< Type > SAL_CALL BaseControl::getTypes() throw( RuntimeException ) { @@ -159,9 +159,9 @@ Sequence< Type > SAL_CALL BaseControl::getTypes() throw( RuntimeException ) return pTypeCollection->getTypes(); } -//____________________________________________________________________________________________________________ + // XTypeProvider -//____________________________________________________________________________________________________________ + Sequence< sal_Int8 > SAL_CALL BaseControl::getImplementationId() throw( RuntimeException ) { @@ -191,9 +191,9 @@ Sequence< sal_Int8 > SAL_CALL BaseControl::getImplementationId() throw( RuntimeE return pID->getImplementationId(); } -//____________________________________________________________________________________________________________ + // XAggregation -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::setDelegator( const Reference< XInterface >& xDel ) throw( RuntimeException ) { @@ -202,9 +202,9 @@ void SAL_CALL BaseControl::setDelegator( const Reference< XInterface >& xDel ) t m_xDelegator = xDel; } -//____________________________________________________________________________________________________________ + // XAggregation -//____________________________________________________________________________________________________________ + Any SAL_CALL BaseControl::queryAggregation( const Type& aType ) throw( RuntimeException ) { @@ -233,36 +233,36 @@ Any SAL_CALL BaseControl::queryAggregation( const Type& aType ) throw( RuntimeEx } } -//____________________________________________________________________________________________________________ + // XServiceInfo -//____________________________________________________________________________________________________________ + OUString SAL_CALL BaseControl::getImplementationName() throw( RuntimeException ) { return impl_getStaticImplementationName(); } -//____________________________________________________________________________________________________________ + // XServiceInfo -//____________________________________________________________________________________________________________ + sal_Bool SAL_CALL BaseControl::supportsService( const OUString& sServiceName ) throw( RuntimeException ) { return cppu::supportsService(this, sServiceName); } -//____________________________________________________________________________________________________________ + // XServiceInfo -//____________________________________________________________________________________________________________ + Sequence< OUString > SAL_CALL BaseControl::getSupportedServiceNames() throw( RuntimeException ) { return impl_getStaticSupportedServiceNames(); } -//____________________________________________________________________________________________________________ + // XComponent -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::dispose() throw( RuntimeException ) { @@ -289,9 +289,9 @@ void SAL_CALL BaseControl::dispose() throw( RuntimeException ) } } -//____________________________________________________________________________________________________________ + // XComponent -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::addEventListener( const Reference< XEventListener >& xListener ) throw( RuntimeException ) { @@ -300,9 +300,9 @@ void SAL_CALL BaseControl::addEventListener( const Reference< XEventListener >& OComponentHelper::addEventListener( xListener ); } -//____________________________________________________________________________________________________________ + // XComponent -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::removeEventListener( const Reference< XEventListener >& xListener ) throw( RuntimeException ) { @@ -311,9 +311,9 @@ void SAL_CALL BaseControl::removeEventListener( const Reference< XEventListener OComponentHelper::removeEventListener( xListener ); } -//____________________________________________________________________________________________________________ + // XControl -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::createPeer( const Reference< XToolkit >& xToolkit , const Reference< XWindowPeer >& xParentPeer ) throw( RuntimeException ) @@ -374,9 +374,9 @@ void SAL_CALL BaseControl::createPeer( const Reference< XToolkit >& xToo } } -//____________________________________________________________________________________________________________ + // XControl -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::setContext( const Reference< XInterface >& xContext ) throw( RuntimeException ) { @@ -385,9 +385,9 @@ void SAL_CALL BaseControl::setContext( const Reference< XInterface >& xContext ) m_xContext = xContext ; } -//____________________________________________________________________________________________________________ + // XControl -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::setDesignMode( sal_Bool bOn ) throw( RuntimeException ) { @@ -396,9 +396,9 @@ void SAL_CALL BaseControl::setDesignMode( sal_Bool bOn ) throw( RuntimeException m_bInDesignMode = bOn ; } -//____________________________________________________________________________________________________________ + // XControl -//____________________________________________________________________________________________________________ + Reference< XInterface > SAL_CALL BaseControl::getContext() throw( RuntimeException ) { @@ -407,9 +407,9 @@ Reference< XInterface > SAL_CALL BaseControl::getContext() throw( RuntimeExcepti return m_xContext ; } -//____________________________________________________________________________________________________________ + // XControl -//____________________________________________________________________________________________________________ + Reference< XWindowPeer > SAL_CALL BaseControl::getPeer() throw( RuntimeException ) { @@ -418,9 +418,9 @@ Reference< XWindowPeer > SAL_CALL BaseControl::getPeer() throw( RuntimeException return m_xPeer ; } -//____________________________________________________________________________________________________________ + // XControl -//____________________________________________________________________________________________________________ + Reference< XView > SAL_CALL BaseControl::getView() throw( RuntimeException ) { @@ -429,9 +429,9 @@ Reference< XView > SAL_CALL BaseControl::getView() throw( RuntimeException ) return Reference< XView >( (OWeakObject*)this, UNO_QUERY ); } -//____________________________________________________________________________________________________________ + // XControl -//____________________________________________________________________________________________________________ + sal_Bool SAL_CALL BaseControl::isDesignMode() throw( RuntimeException ) { @@ -440,18 +440,18 @@ sal_Bool SAL_CALL BaseControl::isDesignMode() throw( RuntimeException ) return m_bInDesignMode ; } -//____________________________________________________________________________________________________________ + // XControl -//____________________________________________________________________________________________________________ + sal_Bool SAL_CALL BaseControl::isTransparent() throw( RuntimeException ) { return sal_False ; } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::setPosSize( sal_Int32 nX , sal_Int32 nY , @@ -492,9 +492,9 @@ void SAL_CALL BaseControl::setPosSize( sal_Int32 nX , } } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::setVisible( sal_Bool bVisible ) throw( RuntimeException ) { @@ -511,9 +511,9 @@ void SAL_CALL BaseControl::setVisible( sal_Bool bVisible ) throw( RuntimeExcepti } } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::setEnable( sal_Bool bEnable ) throw( RuntimeException ) { @@ -530,9 +530,9 @@ void SAL_CALL BaseControl::setEnable( sal_Bool bEnable ) throw( RuntimeException } } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::setFocus() throw( RuntimeException ) { @@ -545,9 +545,9 @@ void SAL_CALL BaseControl::setFocus() throw( RuntimeException ) } } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + Rectangle SAL_CALL BaseControl::getPosSize() throw( RuntimeException ) { @@ -556,117 +556,117 @@ Rectangle SAL_CALL BaseControl::getPosSize() throw( RuntimeException ) return Rectangle( m_nX, m_nY , m_nWidth, m_nHeight ); } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::addWindowListener( const Reference< XWindowListener >& xListener ) throw( RuntimeException ) { impl_getMultiplexer()->advise( ::getCppuType(( const Reference< XWindowListener >*)0), xListener ); } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::addFocusListener( const Reference< XFocusListener >& xListener ) throw( RuntimeException ) { impl_getMultiplexer()->advise( ::getCppuType(( const Reference< XFocusListener >*)0), xListener ); } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::addKeyListener( const Reference< XKeyListener >& xListener ) throw( RuntimeException ) { impl_getMultiplexer()->advise( ::getCppuType(( const Reference< XKeyListener >*)0), xListener ); } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::addMouseListener( const Reference< XMouseListener >& xListener ) throw( RuntimeException ) { impl_getMultiplexer()->advise( ::getCppuType(( const Reference< XMouseListener >*)0), xListener ); } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::addMouseMotionListener( const Reference< XMouseMotionListener >& xListener ) throw( RuntimeException ) { impl_getMultiplexer()->advise( ::getCppuType(( const Reference< XMouseMotionListener >*)0), xListener ); } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::addPaintListener( const Reference< XPaintListener >& xListener ) throw( RuntimeException ) { impl_getMultiplexer()->advise( ::getCppuType(( const Reference< XPaintListener >*)0), xListener ); } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::removeWindowListener( const Reference< XWindowListener >& xListener ) throw( RuntimeException ) { impl_getMultiplexer()->unadvise( ::getCppuType(( const Reference< XWindowListener >*)0), xListener ); } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::removeFocusListener( const Reference< XFocusListener >& xListener ) throw( RuntimeException ) { impl_getMultiplexer()->unadvise( ::getCppuType(( const Reference< XFocusListener >*)0), xListener ); } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::removeKeyListener( const Reference< XKeyListener >& xListener ) throw( RuntimeException ) { impl_getMultiplexer()->unadvise( ::getCppuType(( const Reference< XKeyListener >*)0), xListener ); } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::removeMouseListener( const Reference< XMouseListener >& xListener ) throw( RuntimeException ) { impl_getMultiplexer()->unadvise( ::getCppuType(( const Reference< XMouseListener >*)0), xListener ); } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::removeMouseMotionListener( const Reference< XMouseMotionListener >& xListener ) throw( RuntimeException ) { impl_getMultiplexer()->unadvise( ::getCppuType(( const Reference< XMouseMotionListener >*)0), xListener ); } -//____________________________________________________________________________________________________________ + // XWindow -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::removePaintListener( const Reference< XPaintListener >& xListener ) throw( RuntimeException ) { impl_getMultiplexer()->unadvise( ::getCppuType(( const Reference< XPaintListener >*)0), xListener ); } -//____________________________________________________________________________________________________________ + // XView -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::draw( sal_Int32 nX , sal_Int32 nY ) throw( RuntimeException ) @@ -680,9 +680,9 @@ void SAL_CALL BaseControl::draw( sal_Int32 nX , impl_paint( nX, nY, m_xGraphicsView ); } -//____________________________________________________________________________________________________________ + // XView -//____________________________________________________________________________________________________________ + sal_Bool SAL_CALL BaseControl::setGraphics( const Reference< XGraphics >& xDevice ) throw( RuntimeException ) { @@ -702,9 +702,9 @@ sal_Bool SAL_CALL BaseControl::setGraphics( const Reference< XGraphics >& xDevic return bReturn ; } -//____________________________________________________________________________________________________________ + // XView -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::setZoom( float /*fZoomX*/ , float /*fZoomY*/ ) throw( RuntimeException ) @@ -712,9 +712,9 @@ void SAL_CALL BaseControl::setZoom( float /*fZoomX*/ , // Not implemented yet } -//____________________________________________________________________________________________________________ + // XView -//____________________________________________________________________________________________________________ + Reference< XGraphics > SAL_CALL BaseControl::getGraphics() throw( RuntimeException ) { @@ -723,9 +723,9 @@ Reference< XGraphics > SAL_CALL BaseControl::getGraphics() throw( RuntimeExcepti return m_xGraphicsView ; } -//____________________________________________________________________________________________________________ + // XView -//____________________________________________________________________________________________________________ + Size SAL_CALL BaseControl::getSize() throw( RuntimeException ) { @@ -734,9 +734,9 @@ Size SAL_CALL BaseControl::getSize() throw( RuntimeException ) return Size( m_nWidth, m_nHeight ); } -//____________________________________________________________________________________________________________ + // XEventListener -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::disposing( const EventObject& /*aSource*/ ) throw( RuntimeException ) { @@ -758,9 +758,9 @@ void SAL_CALL BaseControl::disposing( const EventObject& /*aSource*/ ) throw( Ru } } -//____________________________________________________________________________________________________________ + // XPaintListener -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::windowPaint( const PaintEvent& /*aEvent*/ ) throw( RuntimeException ) { @@ -773,9 +773,9 @@ void SAL_CALL BaseControl::windowPaint( const PaintEvent& /*aEvent*/ ) throw( Ru impl_paint( 0, 0, m_xGraphicsPeer ); } -//____________________________________________________________________________________________________________ + // XWindowListener -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::windowResized( const WindowEvent& aEvent ) throw( RuntimeException ) { @@ -790,9 +790,9 @@ void SAL_CALL BaseControl::windowResized( const WindowEvent& aEvent ) throw( Run impl_recalcLayout( aMappedEvent ); } -//____________________________________________________________________________________________________________ + // XWindowListener -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::windowMoved( const WindowEvent& aEvent ) throw( RuntimeException ) { @@ -807,90 +807,90 @@ void SAL_CALL BaseControl::windowMoved( const WindowEvent& aEvent ) throw( Runti impl_recalcLayout( aMappedEvent ); } -//____________________________________________________________________________________________________________ + // XWindowListener -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::windowShown( const EventObject& /*aEvent*/ ) throw( RuntimeException ) { } -//____________________________________________________________________________________________________________ + // XWindowListener -//____________________________________________________________________________________________________________ + void SAL_CALL BaseControl::windowHidden( const EventObject& /*aEvent*/ ) throw( RuntimeException ) { } -//____________________________________________________________________________________________________________ + // impl but public method to register service in DLL // (In this BASE-implementation not implemented! Overwrite it in derived classes.) -//____________________________________________________________________________________________________________ + const Sequence< OUString > BaseControl::impl_getStaticSupportedServiceNames() { return Sequence< OUString >(); } -//____________________________________________________________________________________________________________ + // impl but public method to register service in DLL // (In this BASE-implementation not implemented! Overwrite it in derived classes.) -//____________________________________________________________________________________________________________ + const OUString BaseControl::impl_getStaticImplementationName() { return OUString(); } -//____________________________________________________________________________________________________________ + // protected method -//____________________________________________________________________________________________________________ + const Reference< XComponentContext > BaseControl::impl_getComponentContext() { return m_xComponentContext ; } -//____________________________________________________________________________________________________________ + // protected method -//____________________________________________________________________________________________________________ + const Reference< XWindow > BaseControl::impl_getPeerWindow() { return m_xPeerWindow ; } -//____________________________________________________________________________________________________________ + // protected method -//____________________________________________________________________________________________________________ + const Reference< XGraphics > BaseControl::impl_getGraphicsPeer() { return m_xGraphicsPeer ; } -//____________________________________________________________________________________________________________ + // protected method -//____________________________________________________________________________________________________________ + const sal_Int32& BaseControl::impl_getWidth() { return m_nWidth ; } -//____________________________________________________________________________________________________________ + // protected method -//____________________________________________________________________________________________________________ + const sal_Int32& BaseControl::impl_getHeight() { return m_nHeight ; } -//____________________________________________________________________________________________________________ + // protected method -//____________________________________________________________________________________________________________ + WindowDescriptor* BaseControl::impl_getWindowDescriptor( const Reference< XWindowPeer >& xParentPeer ) { @@ -910,9 +910,9 @@ WindowDescriptor* BaseControl::impl_getWindowDescriptor( const Reference< XWindo return pDescriptor ; } -//____________________________________________________________________________________________________________ + // protected method -//____________________________________________________________________________________________________________ + void BaseControl::impl_paint( sal_Int32 /*nX*/ , sal_Int32 /*nY*/ , @@ -923,9 +923,9 @@ void BaseControl::impl_paint( sal_Int32 /*nX*/ // - not used in this implementation, but its not necessary to make it pure virtual !!! } -//____________________________________________________________________________________________________________ + // protected method -//____________________________________________________________________________________________________________ + void BaseControl::impl_recalcLayout( const WindowEvent& /*aEvent*/ ) { @@ -933,18 +933,18 @@ void BaseControl::impl_recalcLayout( const WindowEvent& /*aEvent*/ ) // But we make it not pure virtual because it's not necessary for all derived classes! } -//____________________________________________________________________________________________________________ + // protected method -//____________________________________________________________________________________________________________ + Reference< XInterface > BaseControl::impl_getDelegator() { return m_xDelegator ; } -//____________________________________________________________________________________________________________ + // private method -//____________________________________________________________________________________________________________ + void BaseControl::impl_releasePeer() { @@ -969,9 +969,9 @@ void BaseControl::impl_releasePeer() } } -//____________________________________________________________________________________________________________ + // private method -//____________________________________________________________________________________________________________ + OMRCListenerMultiplexerHelper* BaseControl::impl_getMultiplexer() { |