diff options
Diffstat (limited to 'UnoControls/source')
-rw-r--r-- | UnoControls/source/base/basecontainercontrol.cxx | 194 | ||||
-rw-r--r-- | UnoControls/source/base/basecontrol.cxx | 290 | ||||
-rw-r--r-- | UnoControls/source/base/multiplexer.cxx | 202 | ||||
-rw-r--r-- | UnoControls/source/base/registercontrols.cxx | 266 | ||||
-rw-r--r-- | UnoControls/source/controls/OConnectionPointContainerHelper.cxx | 64 | ||||
-rw-r--r-- | UnoControls/source/controls/OConnectionPointHelper.cxx | 74 | ||||
-rw-r--r-- | UnoControls/source/controls/framecontrol.cxx | 212 | ||||
-rw-r--r-- | UnoControls/source/controls/progressbar.cxx | 160 | ||||
-rw-r--r-- | UnoControls/source/controls/progressmonitor.cxx | 514 | ||||
-rw-r--r-- | UnoControls/source/controls/statusindicator.cxx | 164 | ||||
-rw-r--r-- | UnoControls/source/inc/OConnectionPointContainerHelper.hxx | 82 | ||||
-rw-r--r-- | UnoControls/source/inc/OConnectionPointHelper.hxx | 88 | ||||
-rw-r--r-- | UnoControls/source/inc/framecontrol.hxx | 126 | ||||
-rw-r--r-- | UnoControls/source/inc/progressbar.hxx | 112 | ||||
-rw-r--r-- | UnoControls/source/inc/progressmonitor.hxx | 522 | ||||
-rw-r--r-- | UnoControls/source/inc/statusindicator.hxx | 372 |
16 files changed, 1721 insertions, 1721 deletions
diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx index 8709f3c3f331..f85dac6649ea 100644 --- a/UnoControls/source/base/basecontainercontrol.cxx +++ b/UnoControls/source/base/basecontainercontrol.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -27,41 +27,41 @@ ************************************************************************/ //____________________________________________________________________________________________________________ -// my own includes +// my own includes //____________________________________________________________________________________________________________ #include "basecontainercontrol.hxx" //____________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //____________________________________________________________________________________________________________ #include <cppuhelper/typeprovider.hxx> //____________________________________________________________________________________________________________ -// includes of my own project +// includes of my own project //____________________________________________________________________________________________________________ //____________________________________________________________________________________________________________ -// namespaces +// namespaces //____________________________________________________________________________________________________________ -using namespace ::cppu ; -using namespace ::osl ; -using namespace ::rtl ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::awt ; -using namespace ::com::sun::star::container ; +using namespace ::cppu ; +using namespace ::osl ; +using namespace ::rtl ; +using namespace ::com::sun::star::uno ; +using namespace ::com::sun::star::lang ; +using namespace ::com::sun::star::awt ; +using namespace ::com::sun::star::container ; namespace unocontrols{ //____________________________________________________________________________________________________________ -// construct/destruct +// construct/destruct //____________________________________________________________________________________________________________ BaseContainerControl::BaseContainerControl( const Reference< XMultiServiceFactory >& xFactory ) - : BaseControl ( xFactory ) - , m_aListeners ( m_aMutex ) + : BaseControl ( xFactory ) + , m_aListeners ( m_aMutex ) { // initialize info list for controls m_pControlInfoList = new IMPL_ControlInfoList ; @@ -73,13 +73,13 @@ BaseContainerControl::~BaseContainerControl() } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ Any SAL_CALL BaseContainerControl::queryInterface( const Type& rType ) throw( RuntimeException ) { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. Any aReturn ; Reference< XInterface > xDel = BaseControl::impl_getDelegator(); if ( xDel.is() == sal_True ) @@ -98,7 +98,7 @@ Any SAL_CALL BaseContainerControl::queryInterface( const Type& rType ) throw( Ru } //____________________________________________________________________________________________________________ -// XTypeProvider +// XTypeProvider //____________________________________________________________________________________________________________ Sequence< Type > SAL_CALL BaseContainerControl::getTypes() throw( RuntimeException ) @@ -117,8 +117,8 @@ Sequence< Type > SAL_CALL BaseContainerControl::getTypes() throw( RuntimeExcepti if ( pTypeCollection == NULL ) { // Create a static typecollection ... - static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XControlModel >*)NULL ) , - ::getCppuType(( const Reference< XControlContainer >*)NULL ) , + static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XControlModel >*)NULL ) , + ::getCppuType(( const Reference< XControlContainer >*)NULL ) , BaseControl::getTypes() ); // ... and set his address to static pointer! @@ -130,16 +130,16 @@ Sequence< Type > SAL_CALL BaseContainerControl::getTypes() throw( RuntimeExcepti } //____________________________________________________________________________________________________________ -// XAggregation +// XAggregation //____________________________________________________________________________________________________________ Any SAL_CALL BaseContainerControl::queryAggregation( const Type& aType ) throw( RuntimeException ) { // Ask for my own supported interfaces ... // Attention: XTypeProvider and XInterface are supported by OComponentHelper! - Any aReturn ( ::cppu::queryInterface( aType , - static_cast< XControlModel* > ( this ) , - static_cast< XControlContainer* > ( this ) + Any aReturn ( ::cppu::queryInterface( aType , + static_cast< XControlModel* > ( this ) , + static_cast< XControlContainer* > ( this ) ) ); @@ -157,11 +157,11 @@ Any SAL_CALL BaseContainerControl::queryAggregation( const Type& aType ) throw( } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ -void SAL_CALL BaseContainerControl::createPeer( const Reference< XToolkit >& xToolkit , - const Reference< XWindowPeer >& xParent ) throw( RuntimeException ) +void SAL_CALL BaseContainerControl::createPeer( const Reference< XToolkit >& xToolkit , + const Reference< XWindowPeer >& xParent ) throw( RuntimeException ) { if ( getPeer().is() == sal_False ) { @@ -169,8 +169,8 @@ void SAL_CALL BaseContainerControl::createPeer( const Reference< XToolkit >& BaseControl::createPeer( xToolkit, xParent ); // create peers at all childs - Sequence< Reference< XControl > > seqControlList = getControls(); - sal_uInt32 nControls = seqControlList.getLength(); + Sequence< Reference< XControl > > seqControlList = getControls(); + sal_uInt32 nControls = seqControlList.getLength(); for ( sal_uInt32 n=0; n<nControls; n++ ) { @@ -190,7 +190,7 @@ void SAL_CALL BaseContainerControl::createPeer( const Reference< XToolkit >& } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ sal_Bool SAL_CALL BaseContainerControl::setModel( const Reference< XControlModel >& ) throw( RuntimeException ) @@ -200,7 +200,7 @@ sal_Bool SAL_CALL BaseContainerControl::setModel( const Reference< XControlModel } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ Reference< XControlModel > SAL_CALL BaseContainerControl::getModel() throw( RuntimeException ) @@ -211,7 +211,7 @@ Reference< XControlModel > SAL_CALL BaseContainerControl::getModel() throw( Runt } //____________________________________________________________________________________________________________ -// XComponent +// XComponent //____________________________________________________________________________________________________________ void SAL_CALL BaseContainerControl::dispose() throw( RuntimeException ) @@ -223,17 +223,17 @@ void SAL_CALL BaseContainerControl::dispose() throw( RuntimeException ) MutexGuard aGuard( m_aMutex ); // remove listeners - EventObject aObject ; + EventObject aObject ; aObject.Source = Reference< XComponent > ( (XControlContainer*)this, UNO_QUERY ); m_aListeners.disposeAndClear( aObject ); // remove controls - Sequence< Reference< XControl > > seqCtrls = getControls(); - Reference< XControl > * pCtrls = seqCtrls.getArray(); - sal_uInt32 nCtrls = seqCtrls.getLength(); - sal_uInt32 nMaxCount = m_pControlInfoList->Count(); - sal_uInt32 nCount = 0; + Sequence< Reference< XControl > > seqCtrls = getControls(); + Reference< XControl > * pCtrls = seqCtrls.getArray(); + sal_uInt32 nCtrls = seqCtrls.getLength(); + sal_uInt32 nMaxCount = m_pControlInfoList->Count(); + sal_uInt32 nCount = 0; for ( nCount = 0; nCount < nMaxCount; ++nCount ) { @@ -244,8 +244,8 @@ void SAL_CALL BaseContainerControl::dispose() throw( RuntimeException ) for ( nCount = 0; nCount < nCtrls; ++nCount ) { - pCtrls [ nCount ] -> removeEventListener ( static_cast< XEventListener* >( static_cast< XWindowListener* >( this ) ) ) ; - pCtrls [ nCount ] -> dispose ( ) ; + pCtrls [ nCount ] -> removeEventListener ( static_cast< XEventListener* >( static_cast< XWindowListener* >( this ) ) ) ; + pCtrls [ nCount ] -> dispose ( ) ; } // call baseclass @@ -253,7 +253,7 @@ void SAL_CALL BaseContainerControl::dispose() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XEventListener +// XEventListener //____________________________________________________________________________________________________________ void SAL_CALL BaseContainerControl::disposing( const EventObject& rEvent ) throw( RuntimeException ) @@ -265,7 +265,7 @@ void SAL_CALL BaseContainerControl::disposing( const EventObject& rEvent ) throw } //____________________________________________________________________________________________________________ -// XControlContainer +// XControlContainer //____________________________________________________________________________________________________________ void SAL_CALL BaseContainerControl::addControl ( const OUString& rName, const Reference< XControl > & rControl ) throw( RuntimeException ) @@ -282,15 +282,15 @@ void SAL_CALL BaseContainerControl::addControl ( const OUString& rName, const Re MutexGuard aGuard (m_aMutex) ; // set control - pNewControl->sName = rName ; - pNewControl->xControl = rControl ; + pNewControl->sName = rName ; + pNewControl->xControl = rControl ; // and insert in list m_pControlInfoList->Insert ( pNewControl, LIST_APPEND ) ; // initialize new control - pNewControl->xControl->setContext ( (OWeakObject*)this ) ; - pNewControl->xControl->addEventListener ( static_cast< XEventListener* >( static_cast< XWindowListener* >( this ) ) ) ; + pNewControl->xControl->setContext ( (OWeakObject*)this ) ; + pNewControl->xControl->addEventListener ( static_cast< XEventListener* >( static_cast< XWindowListener* >( this ) ) ) ; // when container has a peer ... if (getPeer().is()) @@ -306,13 +306,13 @@ void SAL_CALL BaseContainerControl::addControl ( const OUString& rName, const Re if (pInterfaceContainer) { // Build event - ContainerEvent aEvent ; + ContainerEvent aEvent ; - aEvent.Source = *this ; + aEvent.Source = *this ; aEvent.Element <<= rControl ; // Get all listener - OInterfaceIteratorHelper aIterator (*pInterfaceContainer) ; + OInterfaceIteratorHelper aIterator (*pInterfaceContainer) ; // Send event while ( aIterator.hasMoreElements() ) @@ -324,7 +324,7 @@ void SAL_CALL BaseContainerControl::addControl ( const OUString& rName, const Re } //____________________________________________________________________________________________________________ -// XControlContainer +// XControlContainer //____________________________________________________________________________________________________________ void SAL_CALL BaseContainerControl::addContainerListener ( const Reference< XContainerListener > & rListener ) throw( RuntimeException ) @@ -336,7 +336,7 @@ void SAL_CALL BaseContainerControl::addContainerListener ( const Reference< XCon } //____________________________________________________________________________________________________________ -// XControlContainer +// XControlContainer //____________________________________________________________________________________________________________ void SAL_CALL BaseContainerControl::removeControl ( const Reference< XControl > & rControl ) throw( RuntimeException ) @@ -355,8 +355,8 @@ void SAL_CALL BaseContainerControl::removeControl ( const Reference< XControl > if ( rControl == pControl->xControl ) { //.is it found ... remove listener from control - pControl->xControl->removeEventListener (static_cast< XEventListener* >( static_cast< XWindowListener* >( this ) )) ; - pControl->xControl->setContext ( Reference< XInterface > () ) ; + pControl->xControl->removeEventListener (static_cast< XEventListener* >( static_cast< XWindowListener* >( this ) )) ; + pControl->xControl->setContext ( Reference< XInterface > () ) ; // ... free memory delete pControl ; @@ -367,12 +367,12 @@ void SAL_CALL BaseContainerControl::removeControl ( const Reference< XControl > if (pInterfaceContainer) { - ContainerEvent aEvent ; + ContainerEvent aEvent ; - aEvent.Source = *this ; - aEvent.Element <<= rControl ; + aEvent.Source = *this ; + aEvent.Element <<= rControl ; - OInterfaceIteratorHelper aIterator (*pInterfaceContainer) ; + OInterfaceIteratorHelper aIterator (*pInterfaceContainer) ; while ( aIterator.hasMoreElements() ) { @@ -387,7 +387,7 @@ void SAL_CALL BaseContainerControl::removeControl ( const Reference< XControl > } //____________________________________________________________________________________________________________ -// XControlContainer +// XControlContainer //____________________________________________________________________________________________________________ void SAL_CALL BaseContainerControl::removeContainerListener ( const Reference< XContainerListener > & rListener ) throw( RuntimeException ) @@ -399,13 +399,13 @@ void SAL_CALL BaseContainerControl::removeContainerListener ( const Reference< X } //____________________________________________________________________________________________________________ -// XControlContainer +// XControlContainer //____________________________________________________________________________________________________________ void SAL_CALL BaseContainerControl::setStatusText ( const OUString& rStatusText ) throw( RuntimeException ) { // go down to each parent - Reference< XControlContainer > xContainer ( getContext(), UNO_QUERY ) ; + Reference< XControlContainer > xContainer ( getContext(), UNO_QUERY ) ; if ( xContainer.is () ) { @@ -414,16 +414,16 @@ void SAL_CALL BaseContainerControl::setStatusText ( const OUString& rStatusText } //____________________________________________________________________________________________________________ -// XControlContainer +// XControlContainer //____________________________________________________________________________________________________________ -Reference< XControl > SAL_CALL BaseContainerControl::getControl ( const OUString& rName ) throw( RuntimeException ) +Reference< XControl > SAL_CALL BaseContainerControl::getControl ( const OUString& rName ) throw( RuntimeException ) { // Ready for multithreading - MutexGuard aGuard ( Mutex::getGlobalMutex() ) ; + MutexGuard aGuard ( Mutex::getGlobalMutex() ) ; - Reference< XControl > xRetControl = Reference< XControl > () ; - sal_uInt32 nControls = m_pControlInfoList->Count () ; + Reference< XControl > xRetControl = Reference< XControl > () ; + sal_uInt32 nControls = m_pControlInfoList->Count () ; // Search for right control for( sal_uInt32 nCount = 0; nCount < nControls; ++nCount ) @@ -443,18 +443,18 @@ Reference< XControl > SAL_CALL BaseContainerControl::getControl ( const OUString } //____________________________________________________________________________________________________________ -// XControlContainer +// XControlContainer //____________________________________________________________________________________________________________ Sequence< Reference< XControl > > SAL_CALL BaseContainerControl::getControls () throw( RuntimeException ) { // Ready for multithreading - MutexGuard aGuard ( Mutex::getGlobalMutex() ) ; + MutexGuard aGuard ( Mutex::getGlobalMutex() ) ; - sal_uInt32 nControls = m_pControlInfoList->Count () ; - Sequence< Reference< XControl > > aDescriptor ( nControls ) ; - Reference< XControl > * pDestination = aDescriptor.getArray () ; - sal_uInt32 nCount = 0 ; + sal_uInt32 nControls = m_pControlInfoList->Count () ; + Sequence< Reference< XControl > > aDescriptor ( nControls ) ; + Reference< XControl > * pDestination = aDescriptor.getArray () ; + sal_uInt32 nCount = 0 ; // Copy controls to sequence for( nCount = 0; nCount < nControls; ++nCount ) @@ -468,7 +468,7 @@ Sequence< Reference< XControl > > SAL_CALL BaseContainerControl::getControls () } //____________________________________________________________________________________________________________ -// XUnoControlContainer +// XUnoControlContainer //____________________________________________________________________________________________________________ void SAL_CALL BaseContainerControl::addTabController ( const Reference< XTabController > & rTabController ) throw( RuntimeException ) @@ -476,9 +476,9 @@ void SAL_CALL BaseContainerControl::addTabController ( const Reference< XTabCont // Ready for multithreading MutexGuard aGuard (m_aMutex) ; - sal_uInt32 nOldCount = m_xTabControllerList.getLength () ; - Sequence< Reference< XTabController > > aNewList ( nOldCount + 1 ) ; - sal_uInt32 nCount = 0 ; + sal_uInt32 nOldCount = m_xTabControllerList.getLength () ; + Sequence< Reference< XTabController > > aNewList ( nOldCount + 1 ) ; + sal_uInt32 nCount = 0 ; // Copy old elements of sequence to new list. for ( nCount = 0; nCount < nOldCount; ++nCount ) @@ -494,7 +494,7 @@ void SAL_CALL BaseContainerControl::addTabController ( const Reference< XTabCont } //____________________________________________________________________________________________________________ -// XUnoControlContainer +// XUnoControlContainer //____________________________________________________________________________________________________________ void SAL_CALL BaseContainerControl::removeTabController ( const Reference< XTabController > & rTabController ) throw( RuntimeException ) @@ -502,8 +502,8 @@ void SAL_CALL BaseContainerControl::removeTabController ( const Reference< XTabC // Ready for multithreading MutexGuard aGuard (m_aMutex) ; - sal_uInt32 nMaxCount = m_xTabControllerList.getLength () ; - sal_uInt32 nCount = 0 ; + sal_uInt32 nMaxCount = m_xTabControllerList.getLength () ; + sal_uInt32 nCount = 0 ; // Search right tabcontroller ... for ( nCount = 0; nCount < nMaxCount; ++nCount ) @@ -518,7 +518,7 @@ void SAL_CALL BaseContainerControl::removeTabController ( const Reference< XTabC } //____________________________________________________________________________________________________________ -// XUnoControlContainer +// XUnoControlContainer //____________________________________________________________________________________________________________ void SAL_CALL BaseContainerControl::setTabControllers ( const Sequence< Reference< XTabController > >& rTabControllers ) throw( RuntimeException ) @@ -538,7 +538,7 @@ Sequence<Reference< XTabController > > SAL_CALL BaseContainerControl::getTabCont } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL BaseContainerControl::setVisible ( sal_Bool bVisible ) throw( RuntimeException ) @@ -555,7 +555,7 @@ void SAL_CALL BaseContainerControl::setVisible ( sal_Bool bVisible ) throw( Runt } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ WindowDescriptor* BaseContainerControl::impl_getWindowDescriptor ( const Reference< XWindowPeer > & rParentPeer ) @@ -564,20 +564,20 @@ WindowDescriptor* BaseContainerControl::impl_getWindowDescriptor ( const Referen // - if you will change the descriptor-values, you must override thid virtuell function // - the caller must release the memory for this dynamical descriptor !!! - WindowDescriptor * aDescriptor = new WindowDescriptor ; + WindowDescriptor * aDescriptor = new WindowDescriptor ; - aDescriptor->Type = WindowClass_CONTAINER ; - aDescriptor->WindowServiceName = OUString(RTL_CONSTASCII_USTRINGPARAM("window")) ; - aDescriptor->ParentIndex = -1 ; - aDescriptor->Parent = rParentPeer ; - aDescriptor->Bounds = getPosSize () ; - aDescriptor->WindowAttributes = 0 ; + aDescriptor->Type = WindowClass_CONTAINER ; + aDescriptor->WindowServiceName = OUString(RTL_CONSTASCII_USTRINGPARAM("window")) ; + aDescriptor->ParentIndex = -1 ; + aDescriptor->Parent = rParentPeer ; + aDescriptor->Bounds = getPosSize () ; + aDescriptor->WindowAttributes = 0 ; return aDescriptor ; } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ void BaseContainerControl::impl_paint ( sal_Int32 /*nX*/, sal_Int32 /*nY*/, const Reference< XGraphics > & /*rGraphics*/ ) @@ -596,7 +596,7 @@ void BaseContainerControl::impl_paint ( sal_Int32 /*nX*/, sal_Int32 /*nY*/, cons } //____________________________________________________________________________________________________________ -// private method +// private method //____________________________________________________________________________________________________________ void BaseContainerControl::impl_activateTabControllers () @@ -604,25 +604,25 @@ void BaseContainerControl::impl_activateTabControllers () // Ready for multithreading MutexGuard aGuard (m_aMutex) ; - sal_uInt32 nMaxCount = m_xTabControllerList.getLength () ; - sal_uInt32 nCount = 0 ; + sal_uInt32 nMaxCount = m_xTabControllerList.getLength () ; + sal_uInt32 nCount = 0 ; for ( nCount = 0; nCount < nMaxCount; ++nCount ) { - m_xTabControllerList.getArray () [nCount]->setContainer ( this ) ; - m_xTabControllerList.getArray () [nCount]->activateTabOrder ( ) ; + m_xTabControllerList.getArray () [nCount]->setContainer ( this ) ; + m_xTabControllerList.getArray () [nCount]->activateTabOrder ( ) ; } } //____________________________________________________________________________________________________________ -// private method +// private method //____________________________________________________________________________________________________________ void BaseContainerControl::impl_cleanMemory () { // Get count of listitems. - sal_uInt32 nMaxCount = m_pControlInfoList->Count () ; - sal_uInt32 nCount = 0 ; + sal_uInt32 nMaxCount = m_pControlInfoList->Count () ; + sal_uInt32 nCount = 0 ; // Delete all items. for ( nCount = 0; nCount < nMaxCount; ++nCount ) diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx index f26250bed987..68d55cdb26c6 100644 --- a/UnoControls/source/base/basecontrol.cxx +++ b/UnoControls/source/base/basecontrol.cxx @@ -27,13 +27,13 @@ ************************************************************************/ //____________________________________________________________________________________________________________ -// my own include +// my own include //____________________________________________________________________________________________________________ #include "basecontrol.hxx" //____________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //____________________________________________________________________________________________________________ #include <com/sun/star/awt/XDevice.hpp> #include <com/sun/star/awt/XDisplayBitmap.hpp> @@ -43,52 +43,52 @@ #include <cppuhelper/typeprovider.hxx> //____________________________________________________________________________________________________________ -// includes of my own project +// includes of my own project //____________________________________________________________________________________________________________ //____________________________________________________________________________________________________________ -// namespaces +// namespaces //____________________________________________________________________________________________________________ -using namespace ::cppu ; -using namespace ::osl ; -using namespace ::rtl ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::awt ; +using namespace ::cppu ; +using namespace ::osl ; +using namespace ::rtl ; +using namespace ::com::sun::star::uno ; +using namespace ::com::sun::star::lang ; +using namespace ::com::sun::star::awt ; namespace unocontrols{ //____________________________________________________________________________________________________________ -// defines +// defines //____________________________________________________________________________________________________________ -#define DEFAULT_PMULTIPLEXER NULL -#define DEFAULT_X 0 -#define DEFAULT_Y 0 -#define DEFAULT_WIDTH 100 -#define DEFAULT_HEIGHT 100 -#define DEFAULT_VISIBLE sal_False -#define DEFAULT_INDESIGNMODE sal_False -#define DEFAULT_ENABLE sal_True -#define SERVICE_VCLTOOLKIT "com.sun.star.awt.Toolkit" +#define DEFAULT_PMULTIPLEXER NULL +#define DEFAULT_X 0 +#define DEFAULT_Y 0 +#define DEFAULT_WIDTH 100 +#define DEFAULT_HEIGHT 100 +#define DEFAULT_VISIBLE sal_False +#define DEFAULT_INDESIGNMODE sal_False +#define DEFAULT_ENABLE sal_True +#define SERVICE_VCLTOOLKIT "com.sun.star.awt.Toolkit" //____________________________________________________________________________________________________________ -// construct/destruct +// construct/destruct //____________________________________________________________________________________________________________ BaseControl::BaseControl( const Reference< XMultiServiceFactory >& xFactory ) - : IMPL_MutexContainer ( ) - , OComponentHelper ( m_aMutex ) - , m_xFactory ( xFactory ) - , m_pMultiplexer ( DEFAULT_PMULTIPLEXER ) - , m_nX ( DEFAULT_X ) - , m_nY ( DEFAULT_Y ) - , m_nWidth ( DEFAULT_WIDTH ) - , m_nHeight ( DEFAULT_HEIGHT ) - , m_bVisible ( DEFAULT_VISIBLE ) - , m_bInDesignMode ( DEFAULT_INDESIGNMODE ) - , m_bEnable ( DEFAULT_ENABLE ) + : IMPL_MutexContainer ( ) + , OComponentHelper ( m_aMutex ) + , m_xFactory ( xFactory ) + , m_pMultiplexer ( DEFAULT_PMULTIPLEXER ) + , m_nX ( DEFAULT_X ) + , m_nY ( DEFAULT_Y ) + , m_nWidth ( DEFAULT_WIDTH ) + , m_nHeight ( DEFAULT_HEIGHT ) + , m_bVisible ( DEFAULT_VISIBLE ) + , m_bInDesignMode ( DEFAULT_INDESIGNMODE ) + , m_bEnable ( DEFAULT_ENABLE ) { } @@ -97,7 +97,7 @@ BaseControl::~BaseControl() } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ Any SAL_CALL BaseControl::queryInterface( const Type& rType ) throw( RuntimeException ) @@ -119,33 +119,33 @@ Any SAL_CALL BaseControl::queryInterface( const Type& rType ) throw( RuntimeExce } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::acquire() throw() { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Forward to baseclass OComponentHelper::acquire(); } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::release() throw() { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Forward to baseclass OComponentHelper::release(); } //____________________________________________________________________________________________________________ -// XTypeProvider +// XTypeProvider //____________________________________________________________________________________________________________ Sequence< Type > SAL_CALL BaseControl::getTypes() throw( RuntimeException ) @@ -164,12 +164,12 @@ Sequence< Type > SAL_CALL BaseControl::getTypes() throw( RuntimeException ) if ( pTypeCollection == NULL ) { // Create a static typecollection ... - static OTypeCollection aTypeCollection( ::getCppuType(( const Reference< XPaintListener >*)NULL ) , + static OTypeCollection aTypeCollection( ::getCppuType(( const Reference< XPaintListener >*)NULL ) , ::getCppuType(( const Reference< XWindowListener>*)NULL ) , - ::getCppuType(( const Reference< XView >*)NULL ) , - ::getCppuType(( const Reference< XWindow >*)NULL ) , - ::getCppuType(( const Reference< XServiceInfo >*)NULL ) , - ::getCppuType(( const Reference< XControl >*)NULL ) , + ::getCppuType(( const Reference< XView >*)NULL ) , + ::getCppuType(( const Reference< XWindow >*)NULL ) , + ::getCppuType(( const Reference< XServiceInfo >*)NULL ) , + ::getCppuType(( const Reference< XControl >*)NULL ) , OComponentHelper::getTypes() ); @@ -182,7 +182,7 @@ Sequence< Type > SAL_CALL BaseControl::getTypes() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XTypeProvider +// XTypeProvider //____________________________________________________________________________________________________________ Sequence< sal_Int8 > SAL_CALL BaseControl::getImplementationId() throw( RuntimeException ) @@ -214,7 +214,7 @@ Sequence< sal_Int8 > SAL_CALL BaseControl::getImplementationId() throw( RuntimeE } //____________________________________________________________________________________________________________ -// XAggregation +// XAggregation //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::setDelegator( const Reference< XInterface >& xDel ) throw( RuntimeException ) @@ -225,20 +225,20 @@ void SAL_CALL BaseControl::setDelegator( const Reference< XInterface >& xDel ) t } //____________________________________________________________________________________________________________ -// XAggregation +// XAggregation //____________________________________________________________________________________________________________ Any SAL_CALL BaseControl::queryAggregation( const Type& aType ) throw( RuntimeException ) { // Ask for my own supported interfaces ... // Attention: XTypeProvider and XInterface are supported by OComponentHelper! - Any aReturn ( ::cppu::queryInterface( aType , - static_cast< XPaintListener*> ( this ) , - static_cast< XWindowListener*> ( this ) , - static_cast< XView* > ( this ) , - static_cast< XWindow* > ( this ) , - static_cast< XServiceInfo* > ( this ) , - static_cast< XControl* > ( this ) + Any aReturn ( ::cppu::queryInterface( aType , + static_cast< XPaintListener*> ( this ) , + static_cast< XWindowListener*> ( this ) , + static_cast< XView* > ( this ) , + static_cast< XWindow* > ( this ) , + static_cast< XServiceInfo* > ( this ) , + static_cast< XControl* > ( this ) ) ); @@ -256,7 +256,7 @@ Any SAL_CALL BaseControl::queryAggregation( const Type& aType ) throw( RuntimeEx } //____________________________________________________________________________________________________________ -// XServiceInfo +// XServiceInfo //____________________________________________________________________________________________________________ OUString SAL_CALL BaseControl::getImplementationName() throw( RuntimeException ) @@ -265,13 +265,13 @@ OUString SAL_CALL BaseControl::getImplementationName() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XServiceInfo +// XServiceInfo //____________________________________________________________________________________________________________ sal_Bool SAL_CALL BaseControl::supportsService( const OUString& sServiceName ) throw( RuntimeException ) { - Sequence< OUString > seqServiceNames = getSupportedServiceNames(); - const OUString* pArray = seqServiceNames.getConstArray(); + Sequence< OUString > seqServiceNames = getSupportedServiceNames(); + const OUString* pArray = seqServiceNames.getConstArray(); for ( sal_Int32 nCounter=0; nCounter<seqServiceNames.getLength(); nCounter++ ) { if ( pArray[nCounter] == sServiceName ) @@ -283,7 +283,7 @@ sal_Bool SAL_CALL BaseControl::supportsService( const OUString& sServiceName ) t } //____________________________________________________________________________________________________________ -// XServiceInfo +// XServiceInfo //____________________________________________________________________________________________________________ Sequence< OUString > SAL_CALL BaseControl::getSupportedServiceNames() throw( RuntimeException ) @@ -292,7 +292,7 @@ Sequence< OUString > SAL_CALL BaseControl::getSupportedServiceNames() throw( Run } //____________________________________________________________________________________________________________ -// XComponent +// XComponent //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::dispose() throw( RuntimeException ) @@ -321,7 +321,7 @@ void SAL_CALL BaseControl::dispose() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XComponent +// XComponent //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::addEventListener( const Reference< XEventListener >& xListener ) throw( RuntimeException ) @@ -332,7 +332,7 @@ void SAL_CALL BaseControl::addEventListener( const Reference< XEventListener >& } //____________________________________________________________________________________________________________ -// XComponent +// XComponent //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::removeEventListener( const Reference< XEventListener >& xListener ) throw( RuntimeException ) @@ -343,11 +343,11 @@ void SAL_CALL BaseControl::removeEventListener( const Reference< XEventListener } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ -void SAL_CALL BaseControl::createPeer( const Reference< XToolkit >& xToolkit , - const Reference< XWindowPeer >& xParentPeer ) throw( RuntimeException ) +void SAL_CALL BaseControl::createPeer( const Reference< XToolkit >& xToolkit , + const Reference< XWindowPeer >& xParentPeer ) throw( RuntimeException ) { // Ready for multithreading MutexGuard aGuard( m_aMutex ); @@ -370,8 +370,8 @@ void SAL_CALL BaseControl::createPeer( const Reference< XToolkit >& xToo // but first create wellknown toolkit, if it not exist xLocalToolkit = Reference< XToolkit > ( m_xFactory->createInstance( OUString::createFromAscii( SERVICE_VCLTOOLKIT ) ), UNO_QUERY ); } - m_xPeer = xLocalToolkit->createWindow( *pDescriptor ); - m_xPeerWindow = Reference< XWindow >( m_xPeer, UNO_QUERY ); + m_xPeer = xLocalToolkit->createWindow( *pDescriptor ); + m_xPeerWindow = Reference< XWindow >( m_xPeer, UNO_QUERY ); // don't forget to release the memory! delete pDescriptor ; @@ -399,15 +399,15 @@ void SAL_CALL BaseControl::createPeer( const Reference< XToolkit >& xToo } // PosSize_POSSIZE defined in <stardiv/uno/awt/window.hxx> - m_xPeerWindow->setPosSize( m_nX, m_nY, m_nWidth, m_nHeight, PosSize::POSSIZE ); - m_xPeerWindow->setEnable( m_bEnable ); - m_xPeerWindow->setVisible( m_bVisible && !m_bInDesignMode ); + m_xPeerWindow->setPosSize( m_nX, m_nY, m_nWidth, m_nHeight, PosSize::POSSIZE ); + m_xPeerWindow->setEnable( m_bEnable ); + m_xPeerWindow->setVisible( m_bVisible && !m_bInDesignMode ); } } } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::setContext( const Reference< XInterface >& xContext ) throw( RuntimeException ) @@ -418,7 +418,7 @@ void SAL_CALL BaseControl::setContext( const Reference< XInterface >& xContext ) } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::setDesignMode( sal_Bool bOn ) throw( RuntimeException ) @@ -429,7 +429,7 @@ void SAL_CALL BaseControl::setDesignMode( sal_Bool bOn ) throw( RuntimeException } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ Reference< XInterface > SAL_CALL BaseControl::getContext() throw( RuntimeException ) @@ -440,7 +440,7 @@ Reference< XInterface > SAL_CALL BaseControl::getContext() throw( RuntimeExcepti } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ Reference< XWindowPeer > SAL_CALL BaseControl::getPeer() throw( RuntimeException ) @@ -451,7 +451,7 @@ Reference< XWindowPeer > SAL_CALL BaseControl::getPeer() throw( RuntimeException } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ Reference< XView > SAL_CALL BaseControl::getView() throw( RuntimeException ) @@ -462,7 +462,7 @@ Reference< XView > SAL_CALL BaseControl::getView() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ sal_Bool SAL_CALL BaseControl::isDesignMode() throw( RuntimeException ) @@ -473,7 +473,7 @@ sal_Bool SAL_CALL BaseControl::isDesignMode() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ sal_Bool SAL_CALL BaseControl::isTransparent() throw( RuntimeException ) @@ -482,14 +482,14 @@ sal_Bool SAL_CALL BaseControl::isTransparent() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ -void SAL_CALL BaseControl::setPosSize( sal_Int32 nX , - sal_Int32 nY , - sal_Int32 nWidth , - sal_Int32 nHeight , - sal_Int16 nFlags ) throw( RuntimeException ) +void SAL_CALL BaseControl::setPosSize( sal_Int32 nX , + sal_Int32 nY , + sal_Int32 nWidth , + sal_Int32 nHeight , + sal_Int16 nFlags ) throw( RuntimeException ) { // - change size and position of window and save the values // - "nFlags" declared in <stardiv/uno/awt/window.hxx> ("#define PosSize_X .....") @@ -526,7 +526,7 @@ void SAL_CALL BaseControl::setPosSize( sal_Int32 nX , } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::setVisible( sal_Bool bVisible ) throw( RuntimeException ) @@ -545,7 +545,7 @@ void SAL_CALL BaseControl::setVisible( sal_Bool bVisible ) throw( RuntimeExcepti } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::setEnable( sal_Bool bEnable ) throw( RuntimeException ) @@ -564,7 +564,7 @@ void SAL_CALL BaseControl::setEnable( sal_Bool bEnable ) throw( RuntimeException } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::setFocus() throw( RuntimeException ) @@ -579,7 +579,7 @@ void SAL_CALL BaseControl::setFocus() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ Rectangle SAL_CALL BaseControl::getPosSize() throw( RuntimeException ) @@ -590,7 +590,7 @@ Rectangle SAL_CALL BaseControl::getPosSize() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::addWindowListener( const Reference< XWindowListener >& xListener ) throw( RuntimeException ) @@ -599,7 +599,7 @@ void SAL_CALL BaseControl::addWindowListener( const Reference< XWindowListener > } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::addFocusListener( const Reference< XFocusListener >& xListener ) throw( RuntimeException ) @@ -608,7 +608,7 @@ void SAL_CALL BaseControl::addFocusListener( const Reference< XFocusListener >& } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::addKeyListener( const Reference< XKeyListener >& xListener ) throw( RuntimeException ) @@ -617,7 +617,7 @@ void SAL_CALL BaseControl::addKeyListener( const Reference< XKeyListener >& xLis } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::addMouseListener( const Reference< XMouseListener >& xListener ) throw( RuntimeException ) @@ -626,7 +626,7 @@ void SAL_CALL BaseControl::addMouseListener( const Reference< XMouseListener >& } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::addMouseMotionListener( const Reference< XMouseMotionListener >& xListener ) throw( RuntimeException ) @@ -635,7 +635,7 @@ void SAL_CALL BaseControl::addMouseMotionListener( const Reference< XMouseMotion } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::addPaintListener( const Reference< XPaintListener >& xListener ) throw( RuntimeException ) @@ -644,7 +644,7 @@ void SAL_CALL BaseControl::addPaintListener( const Reference< XPaintListener >& } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::removeWindowListener( const Reference< XWindowListener >& xListener ) throw( RuntimeException ) @@ -653,7 +653,7 @@ void SAL_CALL BaseControl::removeWindowListener( const Reference< XWindowListene } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::removeFocusListener( const Reference< XFocusListener >& xListener ) throw( RuntimeException ) @@ -662,7 +662,7 @@ void SAL_CALL BaseControl::removeFocusListener( const Reference< XFocusListener } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::removeKeyListener( const Reference< XKeyListener >& xListener ) throw( RuntimeException ) @@ -671,7 +671,7 @@ void SAL_CALL BaseControl::removeKeyListener( const Reference< XKeyListener >& x } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::removeMouseListener( const Reference< XMouseListener >& xListener ) throw( RuntimeException ) @@ -680,7 +680,7 @@ void SAL_CALL BaseControl::removeMouseListener( const Reference< XMouseListener } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::removeMouseMotionListener( const Reference< XMouseMotionListener >& xListener ) throw( RuntimeException ) @@ -689,7 +689,7 @@ void SAL_CALL BaseControl::removeMouseMotionListener( const Reference< XMouseMo } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::removePaintListener( const Reference< XPaintListener >& xListener ) throw( RuntimeException ) @@ -698,11 +698,11 @@ void SAL_CALL BaseControl::removePaintListener( const Reference< XPaintListener } //____________________________________________________________________________________________________________ -// XView +// XView //____________________________________________________________________________________________________________ -void SAL_CALL BaseControl::draw( sal_Int32 nX , - sal_Int32 nY ) throw( RuntimeException ) +void SAL_CALL BaseControl::draw( sal_Int32 nX , + sal_Int32 nY ) throw( RuntimeException ) { // Ready for multithreading MutexGuard aGuard( m_aMutex ); @@ -714,7 +714,7 @@ void SAL_CALL BaseControl::draw( sal_Int32 nX , } //____________________________________________________________________________________________________________ -// XView +// XView //____________________________________________________________________________________________________________ sal_Bool SAL_CALL BaseControl::setGraphics( const Reference< XGraphics >& xDevice ) throw( RuntimeException ) @@ -728,25 +728,25 @@ sal_Bool SAL_CALL BaseControl::setGraphics( const Reference< XGraphics >& xDevic // Ready for multithreading MutexGuard aGuard( m_aMutex ); - m_xGraphicsView = xDevice ; - bReturn = sal_True ; + m_xGraphicsView = xDevice ; + bReturn = sal_True ; } return bReturn ; } //____________________________________________________________________________________________________________ -// XView +// XView //____________________________________________________________________________________________________________ -void SAL_CALL BaseControl::setZoom( float /*fZoomX*/ , - float /*fZoomY*/ ) throw( RuntimeException ) +void SAL_CALL BaseControl::setZoom( float /*fZoomX*/ , + float /*fZoomY*/ ) throw( RuntimeException ) { // Not implemented yet } //____________________________________________________________________________________________________________ -// XView +// XView //____________________________________________________________________________________________________________ Reference< XGraphics > SAL_CALL BaseControl::getGraphics() throw( RuntimeException ) @@ -757,7 +757,7 @@ Reference< XGraphics > SAL_CALL BaseControl::getGraphics() throw( RuntimeExcepti } //____________________________________________________________________________________________________________ -// XView +// XView //____________________________________________________________________________________________________________ Size SAL_CALL BaseControl::getSize() throw( RuntimeException ) @@ -768,7 +768,7 @@ Size SAL_CALL BaseControl::getSize() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XEventListener +// XEventListener //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::disposing( const EventObject& /*aSource*/ ) throw( RuntimeException ) @@ -792,7 +792,7 @@ void SAL_CALL BaseControl::disposing( const EventObject& /*aSource*/ ) throw( Ru } //____________________________________________________________________________________________________________ -// XPaintListener +// XPaintListener //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::windowPaint( const PaintEvent& /*aEvent*/ ) throw( RuntimeException ) @@ -807,7 +807,7 @@ void SAL_CALL BaseControl::windowPaint( const PaintEvent& /*aEvent*/ ) throw( Ru } //____________________________________________________________________________________________________________ -// XWindowListener +// XWindowListener //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::windowResized( const WindowEvent& aEvent ) throw( RuntimeException ) @@ -815,8 +815,8 @@ void SAL_CALL BaseControl::windowResized( const WindowEvent& aEvent ) throw( Run // Ready for multithreading MutexGuard aGuard( m_aMutex ); - m_nWidth = aEvent.Width ; - m_nHeight = aEvent.Height ; + m_nWidth = aEvent.Width ; + m_nHeight = aEvent.Height ; WindowEvent aMappedEvent = aEvent; aMappedEvent.X = 0; aMappedEvent.Y = 0; @@ -824,7 +824,7 @@ void SAL_CALL BaseControl::windowResized( const WindowEvent& aEvent ) throw( Run } //____________________________________________________________________________________________________________ -// XWindowListener +// XWindowListener //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::windowMoved( const WindowEvent& aEvent ) throw( RuntimeException ) @@ -832,8 +832,8 @@ void SAL_CALL BaseControl::windowMoved( const WindowEvent& aEvent ) throw( Runti // Ready for multithreading MutexGuard aGuard( m_aMutex ); - m_nWidth = aEvent.Width ; - m_nHeight = aEvent.Height ; + m_nWidth = aEvent.Width ; + m_nHeight = aEvent.Height ; WindowEvent aMappedEvent = aEvent; aMappedEvent.X = 0; aMappedEvent.Y = 0; @@ -841,7 +841,7 @@ void SAL_CALL BaseControl::windowMoved( const WindowEvent& aEvent ) throw( Runti } //____________________________________________________________________________________________________________ -// XWindowListener +// XWindowListener //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::windowShown( const EventObject& /*aEvent*/ ) throw( RuntimeException ) @@ -849,7 +849,7 @@ void SAL_CALL BaseControl::windowShown( const EventObject& /*aEvent*/ ) throw( R } //____________________________________________________________________________________________________________ -// XWindowListener +// XWindowListener //____________________________________________________________________________________________________________ void SAL_CALL BaseControl::windowHidden( const EventObject& /*aEvent*/ ) throw( RuntimeException ) @@ -857,8 +857,8 @@ void SAL_CALL BaseControl::windowHidden( const EventObject& /*aEvent*/ ) throw( } //____________________________________________________________________________________________________________ -// impl but public method to register service in DLL -// (In this BASE-implementation not implemented! Overwrite it in derived classes.) +// 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() @@ -867,8 +867,8 @@ const Sequence< OUString > BaseControl::impl_getStaticSupportedServiceNames() } //____________________________________________________________________________________________________________ -// impl but public method to register service in DLL -// (In this BASE-implementation not implemented! Overwrite it in derived classes.) +// 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() @@ -877,7 +877,7 @@ const OUString BaseControl::impl_getStaticImplementationName() } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ const Reference< XMultiServiceFactory > BaseControl::impl_getMultiServiceFactory() @@ -886,7 +886,7 @@ const Reference< XMultiServiceFactory > BaseControl::impl_getMultiServiceFactory } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ const Reference< XWindow > BaseControl::impl_getPeerWindow() @@ -895,7 +895,7 @@ const Reference< XWindow > BaseControl::impl_getPeerWindow() } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ const Reference< XGraphics > BaseControl::impl_getGraphicsPeer() @@ -904,7 +904,7 @@ const Reference< XGraphics > BaseControl::impl_getGraphicsPeer() } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ const sal_Int32& BaseControl::impl_getWidth() @@ -913,7 +913,7 @@ const sal_Int32& BaseControl::impl_getWidth() } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ const sal_Int32& BaseControl::impl_getHeight() @@ -922,7 +922,7 @@ const sal_Int32& BaseControl::impl_getHeight() } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ WindowDescriptor* BaseControl::impl_getWindowDescriptor( const Reference< XWindowPeer >& xParentPeer ) @@ -933,23 +933,23 @@ WindowDescriptor* BaseControl::impl_getWindowDescriptor( const Reference< XWindo WindowDescriptor* pDescriptor = new WindowDescriptor ; - pDescriptor->Type = WindowClass_SIMPLE ; - pDescriptor->WindowServiceName = OUString::createFromAscii( "window" ) ; - pDescriptor->ParentIndex = -1 ; - pDescriptor->Parent = xParentPeer ; - pDescriptor->Bounds = getPosSize () ; - pDescriptor->WindowAttributes = 0 ; + pDescriptor->Type = WindowClass_SIMPLE ; + pDescriptor->WindowServiceName = OUString::createFromAscii( "window" ) ; + pDescriptor->ParentIndex = -1 ; + pDescriptor->Parent = xParentPeer ; + pDescriptor->Bounds = getPosSize () ; + pDescriptor->WindowAttributes = 0 ; return pDescriptor ; } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ -void BaseControl::impl_paint( sal_Int32 /*nX*/ , - sal_Int32 /*nY*/ , - const Reference< XGraphics >& /*xGraphics*/ ) +void BaseControl::impl_paint( sal_Int32 /*nX*/ , + sal_Int32 /*nY*/ , + const Reference< XGraphics >& /*xGraphics*/ ) { // - one paint method for peer AND view !!! // (see also => "windowPaint()" and "draw()") @@ -957,7 +957,7 @@ void BaseControl::impl_paint( sal_Int32 /*nX*/ } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ void BaseControl::impl_recalcLayout( const WindowEvent& /*aEvent*/ ) @@ -967,7 +967,7 @@ void BaseControl::impl_recalcLayout( const WindowEvent& /*aEvent*/ ) } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ Reference< XInterface > BaseControl::impl_getDelegator() @@ -976,7 +976,7 @@ Reference< XInterface > BaseControl::impl_getDelegator() } //____________________________________________________________________________________________________________ -// private method +// private method //____________________________________________________________________________________________________________ void BaseControl::impl_releasePeer() @@ -991,8 +991,8 @@ void BaseControl::impl_releasePeer() } m_xPeer->dispose(); - m_xPeerWindow = Reference< XWindow >(); - m_xPeer = Reference< XWindowPeer >(); + m_xPeerWindow = Reference< XWindow >(); + m_xPeer = Reference< XWindowPeer >(); if ( m_pMultiplexer != NULL ) { @@ -1003,7 +1003,7 @@ void BaseControl::impl_releasePeer() } //____________________________________________________________________________________________________________ -// private method +// private method //____________________________________________________________________________________________________________ OMRCListenerMultiplexerHelper* BaseControl::impl_getMultiplexer() diff --git a/UnoControls/source/base/multiplexer.cxx b/UnoControls/source/base/multiplexer.cxx index 4ac7156eb2ae..59383e882eed 100644 --- a/UnoControls/source/base/multiplexer.cxx +++ b/UnoControls/source/base/multiplexer.cxx @@ -30,57 +30,57 @@ #include <osl/diagnose.h> -using namespace ::cppu ; -using namespace ::osl ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::awt ; -using namespace ::com::sun::star::lang ; +using namespace ::cppu ; +using namespace ::osl ; +using namespace ::com::sun::star::uno ; +using namespace ::com::sun::star::awt ; +using namespace ::com::sun::star::lang ; namespace unocontrols{ //____________________________________________________________________________________________________________ -// macros +// macros //____________________________________________________________________________________________________________ -#define MULTIPLEX( INTERFACE, METHOD, EVENTTYP, EVENT ) \ +#define MULTIPLEX( INTERFACE, METHOD, EVENTTYP, EVENT ) \ \ - /* First get all interfaces from container with right type.*/ \ - OInterfaceContainerHelper* pContainer = m_aListenerHolder.getContainer( ::getCppuType((const Reference< INTERFACE >*)0) ); \ - /* Do the follow only, if elements in container exist.*/ \ - if( pContainer != NULL ) \ - { \ - OInterfaceIteratorHelper aIterator( *pContainer ); \ - EVENTTYP aLocalEvent = EVENT; \ - /* Remark: The control is the event source not the peer.*/ \ - /* We must change the source of the event. */ \ - aLocalEvent.Source = m_xControl ; \ - /* Is the control not destroyed? */ \ - if( aLocalEvent.Source.is() == sal_True ) \ - { \ - if( aIterator.hasMoreElements() ) \ - { \ - INTERFACE * pListener = (INTERFACE *)aIterator.next(); \ - try \ - { \ - pListener->METHOD( aLocalEvent ); \ - } \ - catch( RuntimeException& ) \ - { \ - /* Ignore all system exceptions from the listener! */ \ - } \ - } \ - } \ + /* First get all interfaces from container with right type.*/ \ + OInterfaceContainerHelper* pContainer = m_aListenerHolder.getContainer( ::getCppuType((const Reference< INTERFACE >*)0) ); \ + /* Do the follow only, if elements in container exist.*/ \ + if( pContainer != NULL ) \ + { \ + OInterfaceIteratorHelper aIterator( *pContainer ); \ + EVENTTYP aLocalEvent = EVENT; \ + /* Remark: The control is the event source not the peer.*/ \ + /* We must change the source of the event. */ \ + aLocalEvent.Source = m_xControl ; \ + /* Is the control not destroyed? */ \ + if( aLocalEvent.Source.is() == sal_True ) \ + { \ + if( aIterator.hasMoreElements() ) \ + { \ + INTERFACE * pListener = (INTERFACE *)aIterator.next(); \ + try \ + { \ + pListener->METHOD( aLocalEvent ); \ + } \ + catch( RuntimeException& ) \ + { \ + /* Ignore all system exceptions from the listener! */ \ + } \ + } \ + } \ } //____________________________________________________________________________________________________________ -// construct/destruct +// construct/destruct //____________________________________________________________________________________________________________ -OMRCListenerMultiplexerHelper::OMRCListenerMultiplexerHelper( const Reference< XWindow >& xControl , - const Reference< XWindow >& xPeer ) - : m_xPeer ( xPeer ) - , m_xControl ( xControl ) - , m_aListenerHolder ( m_aMutex ) +OMRCListenerMultiplexerHelper::OMRCListenerMultiplexerHelper( const Reference< XWindow >& xControl , + const Reference< XWindow >& xPeer ) + : m_xPeer ( xPeer ) + , m_xControl ( xControl ) + , m_aListenerHolder ( m_aMutex ) { } @@ -93,7 +93,7 @@ OMRCListenerMultiplexerHelper::OMRCListenerMultiplexerHelper( const OMRCListener , XPaintListener() , XTopWindowListener() , OWeakObject() - , m_aListenerHolder ( m_aMutex ) + , m_aListenerHolder ( m_aMutex ) { } @@ -102,25 +102,25 @@ OMRCListenerMultiplexerHelper::~OMRCListenerMultiplexerHelper() } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ Any SAL_CALL OMRCListenerMultiplexerHelper::queryInterface( const Type& rType ) throw( RuntimeException ) { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Ask for my own supported interfaces ... // Attention: XTypeProvider and XInterface are supported by OComponentHelper! - Any aReturn ( ::cppu::queryInterface( rType , - static_cast< XWindowListener* > ( this ) , - static_cast< XKeyListener* > ( this ) , - static_cast< XFocusListener* > ( this ) , - static_cast< XMouseListener* > ( this ) , - static_cast< XMouseMotionListener* > ( this ) , - static_cast< XPaintListener* > ( this ) , - static_cast< XTopWindowListener* > ( this ) , - static_cast< XTopWindowListener* > ( this ) + Any aReturn ( ::cppu::queryInterface( rType , + static_cast< XWindowListener* > ( this ) , + static_cast< XKeyListener* > ( this ) , + static_cast< XFocusListener* > ( this ) , + static_cast< XMouseListener* > ( this ) , + static_cast< XMouseMotionListener* > ( this ) , + static_cast< XPaintListener* > ( this ) , + static_cast< XTopWindowListener* > ( this ) , + static_cast< XTopWindowListener* > ( this ) ) ); @@ -138,33 +138,33 @@ Any SAL_CALL OMRCListenerMultiplexerHelper::queryInterface( const Type& rType ) } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ void SAL_CALL OMRCListenerMultiplexerHelper::acquire() throw() { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Forward to baseclass OWeakObject::acquire(); } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ void SAL_CALL OMRCListenerMultiplexerHelper::release() throw() { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Forward to baseclass OWeakObject::release(); } //____________________________________________________________________________________________________________ -// operator +// operator //____________________________________________________________________________________________________________ OMRCListenerMultiplexerHelper::operator Reference< XInterface >() const @@ -173,16 +173,16 @@ OMRCListenerMultiplexerHelper::operator Reference< XInterface >() const } //____________________________________________________________________________________________________________ -// operator +// operator //____________________________________________________________________________________________________________ //OMRCListenerMultiplexerHelper& OMRCListenerMultiplexerHelper::operator= ( const OMRCListenerMultiplexerHelper& aCopyInstance ) //{ -// return this ; +// return this ; //} //____________________________________________________________________________________________________________ -// container method +// container method //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::setPeer( const Reference< XWindow >& xPeer ) @@ -193,9 +193,9 @@ void OMRCListenerMultiplexerHelper::setPeer( const Reference< XWindow >& xPeer ) if( m_xPeer.is() ) { // get all types from the listener added to the peer - Sequence< Type > aContainedTypes = m_aListenerHolder.getContainedTypes(); - const Type* pArray = aContainedTypes.getConstArray(); - sal_Int32 nCount = aContainedTypes.getLength(); + Sequence< Type > aContainedTypes = m_aListenerHolder.getContainedTypes(); + const Type* pArray = aContainedTypes.getConstArray(); + sal_Int32 nCount = aContainedTypes.getLength(); // loop over all listener types and remove the listeners from the peer for( sal_Int32 i=0; i<nCount; i++ ) impl_unadviseFromPeer( m_xPeer, pArray[i] ); @@ -204,9 +204,9 @@ void OMRCListenerMultiplexerHelper::setPeer( const Reference< XWindow >& xPeer ) if( m_xPeer.is() ) { // get all types from the listener added to the peer - Sequence< Type > aContainedTypes = m_aListenerHolder.getContainedTypes(); - const Type* pArray = aContainedTypes.getConstArray(); - sal_Int32 nCount = aContainedTypes.getLength(); + Sequence< Type > aContainedTypes = m_aListenerHolder.getContainedTypes(); + const Type* pArray = aContainedTypes.getConstArray(); + sal_Int32 nCount = aContainedTypes.getLength(); // loop over all listener types and add the listeners to the peer for( sal_Int32 i = 0; i < nCount; i++ ) impl_adviseToPeer( m_xPeer, pArray[i] ); @@ -215,7 +215,7 @@ void OMRCListenerMultiplexerHelper::setPeer( const Reference< XWindow >& xPeer ) } //____________________________________________________________________________________________________________ -// container method +// container method //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::disposeAndClear() @@ -226,11 +226,11 @@ void OMRCListenerMultiplexerHelper::disposeAndClear() } //____________________________________________________________________________________________________________ -// container method +// container method //____________________________________________________________________________________________________________ -void OMRCListenerMultiplexerHelper::advise( const Type& aType , - const Reference< XInterface >& xListener ) +void OMRCListenerMultiplexerHelper::advise( const Type& aType , + const Reference< XInterface >& xListener ) { MutexGuard aGuard( m_aMutex ); if( m_aListenerHolder.addInterface( aType, xListener ) == 1 ) @@ -244,11 +244,11 @@ void OMRCListenerMultiplexerHelper::advise( const Type& } //____________________________________________________________________________________________________________ -// container method +// container method //____________________________________________________________________________________________________________ -void OMRCListenerMultiplexerHelper::unadvise( const Type& aType , - const Reference< XInterface >& xListener ) +void OMRCListenerMultiplexerHelper::unadvise( const Type& aType , + const Reference< XInterface >& xListener ) { MutexGuard aGuard( m_aMutex ); if( m_aListenerHolder.removeInterface( aType, xListener ) == 0 ) @@ -262,7 +262,7 @@ void OMRCListenerMultiplexerHelper::unadvise( const Type& } //____________________________________________________________________________________________________________ -// XEventListener +// XEventListener //____________________________________________________________________________________________________________ void SAL_CALL OMRCListenerMultiplexerHelper::disposing( const EventObject& /*aSource*/ ) throw( RuntimeException ) @@ -273,7 +273,7 @@ void SAL_CALL OMRCListenerMultiplexerHelper::disposing( const EventObject& /*aSo } //____________________________________________________________________________________________________________ -// XFcousListener +// XFcousListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::focusGained(const FocusEvent& aEvent ) throw( RuntimeException ) @@ -282,7 +282,7 @@ void OMRCListenerMultiplexerHelper::focusGained(const FocusEvent& aEvent ) throw } //____________________________________________________________________________________________________________ -// XFcousListener +// XFcousListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::focusLost(const FocusEvent& aEvent ) throw( RuntimeException ) @@ -291,7 +291,7 @@ void OMRCListenerMultiplexerHelper::focusLost(const FocusEvent& aEvent ) throw( } //____________________________________________________________________________________________________________ -// XWindowListener +// XWindowListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::windowResized(const WindowEvent& aEvent ) throw( RuntimeException ) @@ -300,7 +300,7 @@ void OMRCListenerMultiplexerHelper::windowResized(const WindowEvent& aEvent ) th } //____________________________________________________________________________________________________________ -// XWindowListener +// XWindowListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::windowMoved(const WindowEvent& aEvent ) throw( RuntimeException ) @@ -309,7 +309,7 @@ void OMRCListenerMultiplexerHelper::windowMoved(const WindowEvent& aEvent ) thro } //____________________________________________________________________________________________________________ -// XWindowListener +// XWindowListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::windowShown(const EventObject& aEvent ) throw( RuntimeException ) @@ -318,7 +318,7 @@ void OMRCListenerMultiplexerHelper::windowShown(const EventObject& aEvent ) thro } //____________________________________________________________________________________________________________ -// XWindowListener +// XWindowListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::windowHidden(const EventObject& aEvent ) throw( RuntimeException ) @@ -327,7 +327,7 @@ void OMRCListenerMultiplexerHelper::windowHidden(const EventObject& aEvent ) thr } //____________________________________________________________________________________________________________ -// XKeyListener +// XKeyListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::keyPressed(const KeyEvent& aEvent) throw( RuntimeException ) @@ -336,7 +336,7 @@ void OMRCListenerMultiplexerHelper::keyPressed(const KeyEvent& aEvent) throw( Ru } //____________________________________________________________________________________________________________ -// XKeyListener +// XKeyListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::keyReleased(const KeyEvent& aEvent) throw( RuntimeException ) @@ -345,7 +345,7 @@ void OMRCListenerMultiplexerHelper::keyReleased(const KeyEvent& aEvent) throw( R } //____________________________________________________________________________________________________________ -// XMouseListener +// XMouseListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::mousePressed(const MouseEvent& aEvent) throw( RuntimeException ) @@ -354,7 +354,7 @@ void OMRCListenerMultiplexerHelper::mousePressed(const MouseEvent& aEvent) throw } //____________________________________________________________________________________________________________ -// XMouseListener +// XMouseListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::mouseReleased(const MouseEvent& aEvent) throw( RuntimeException ) @@ -363,7 +363,7 @@ void OMRCListenerMultiplexerHelper::mouseReleased(const MouseEvent& aEvent) thro } //____________________________________________________________________________________________________________ -// XMouseListener +// XMouseListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::mouseEntered(const MouseEvent& aEvent) throw( RuntimeException ) @@ -372,7 +372,7 @@ void OMRCListenerMultiplexerHelper::mouseEntered(const MouseEvent& aEvent) throw } //____________________________________________________________________________________________________________ -// XMouseListener +// XMouseListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::mouseExited(const MouseEvent& aEvent) throw( RuntimeException ) @@ -381,7 +381,7 @@ void OMRCListenerMultiplexerHelper::mouseExited(const MouseEvent& aEvent) throw( } //____________________________________________________________________________________________________________ -// XMouseMotionListener +// XMouseMotionListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::mouseDragged(const MouseEvent& aEvent) throw( RuntimeException ) @@ -390,7 +390,7 @@ void OMRCListenerMultiplexerHelper::mouseDragged(const MouseEvent& aEvent) throw } //____________________________________________________________________________________________________________ -// XMouseMotionListener +// XMouseMotionListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::mouseMoved(const MouseEvent& aEvent) throw( RuntimeException ) @@ -399,7 +399,7 @@ void OMRCListenerMultiplexerHelper::mouseMoved(const MouseEvent& aEvent) throw( } //____________________________________________________________________________________________________________ -// XPaintListener +// XPaintListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::windowPaint(const PaintEvent& aEvent) throw( RuntimeException ) @@ -408,7 +408,7 @@ void OMRCListenerMultiplexerHelper::windowPaint(const PaintEvent& aEvent) throw( } //____________________________________________________________________________________________________________ -// XTopWindowListener +// XTopWindowListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::windowOpened(const EventObject& aEvent) throw( RuntimeException ) @@ -417,7 +417,7 @@ void OMRCListenerMultiplexerHelper::windowOpened(const EventObject& aEvent) thro } //____________________________________________________________________________________________________________ -// XTopWindowListener +// XTopWindowListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::windowClosing( const EventObject& aEvent ) throw( RuntimeException ) @@ -426,7 +426,7 @@ void OMRCListenerMultiplexerHelper::windowClosing( const EventObject& aEvent ) t } //____________________________________________________________________________________________________________ -// XTopWindowListener +// XTopWindowListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::windowClosed( const EventObject& aEvent ) throw( RuntimeException ) @@ -435,7 +435,7 @@ void OMRCListenerMultiplexerHelper::windowClosed( const EventObject& aEvent ) th } //____________________________________________________________________________________________________________ -// XTopWindowListener +// XTopWindowListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::windowMinimized( const EventObject& aEvent ) throw( RuntimeException ) @@ -444,7 +444,7 @@ void OMRCListenerMultiplexerHelper::windowMinimized( const EventObject& aEvent ) } //____________________________________________________________________________________________________________ -// XTopWindowListener +// XTopWindowListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::windowNormalized( const EventObject& aEvent ) throw( RuntimeException ) @@ -453,7 +453,7 @@ void OMRCListenerMultiplexerHelper::windowNormalized( const EventObject& aEvent } //____________________________________________________________________________________________________________ -// XTopWindowListener +// XTopWindowListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::windowActivated( const EventObject& aEvent ) throw( RuntimeException ) @@ -462,7 +462,7 @@ void OMRCListenerMultiplexerHelper::windowActivated( const EventObject& aEvent ) } //____________________________________________________________________________________________________________ -// XTopWindowListener +// XTopWindowListener //____________________________________________________________________________________________________________ void OMRCListenerMultiplexerHelper::windowDeactivated( const EventObject& aEvent ) throw( RuntimeException ) @@ -471,11 +471,11 @@ void OMRCListenerMultiplexerHelper::windowDeactivated( const EventObject& aEvent } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ -void OMRCListenerMultiplexerHelper::impl_adviseToPeer( const Reference< XWindow >& xPeer , - const Type& aType ) +void OMRCListenerMultiplexerHelper::impl_adviseToPeer( const Reference< XWindow >& xPeer , + const Type& aType ) { // add a listener to the source (peer) if( aType == ::getCppuType((const Reference< XWindowListener >*)0) ) @@ -503,11 +503,11 @@ void OMRCListenerMultiplexerHelper::impl_adviseToPeer( const Reference< XWind } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ -void OMRCListenerMultiplexerHelper::impl_unadviseFromPeer( const Reference< XWindow >& xPeer , - const Type& aType ) +void OMRCListenerMultiplexerHelper::impl_unadviseFromPeer( const Reference< XWindow >& xPeer , + const Type& aType ) { // the last listener is removed, remove the listener from the source (peer) if( aType == ::getCppuType((const Reference< XWindowListener >*)0) ) diff --git a/UnoControls/source/base/registercontrols.cxx b/UnoControls/source/base/registercontrols.cxx index e8f58b8fa7f2..694250ff457b 100644 --- a/UnoControls/source/base/registercontrols.cxx +++ b/UnoControls/source/base/registercontrols.cxx @@ -27,7 +27,7 @@ ************************************************************************/ //______________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //______________________________________________________________________________________________________________ #include <cppuhelper/factory.hxx> @@ -39,7 +39,7 @@ #include <stdio.h> //______________________________________________________________________________________________________________ -// includes of my own project +// includes of my own project //______________________________________________________________________________________________________________ //============================================================================= @@ -52,7 +52,7 @@ //============================================================================= //______________________________________________________________________________________________________________ -// defines +// defines //______________________________________________________________________________________________________________ // If you will debug macros of this file ... you must define follow constant! @@ -61,169 +61,169 @@ //#define AS_DBG_SWITCH //______________________________________________________________________________________________________________ -// namespaces +// namespaces //______________________________________________________________________________________________________________ -using namespace ::rtl ; -using namespace ::cppu ; -using namespace ::unocontrols ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::container ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::registry ; +using namespace ::rtl ; +using namespace ::cppu ; +using namespace ::unocontrols ; +using namespace ::com::sun::star::uno ; +using namespace ::com::sun::star::container ; +using namespace ::com::sun::star::lang ; +using namespace ::com::sun::star::registry ; //______________________________________________________________________________________________________________ -// macros +// macros //______________________________________________________________________________________________________________ //****************************************************************************************************************************** // See AS_DBG_SWITCH below !!! #ifdef AS_DBG_SWITCH - #define AS_DBG_OUT(OUTPUT) printf( OUTPUT ); + #define AS_DBG_OUT(OUTPUT) printf( OUTPUT ); #else #define AS_DBG_OUT(OUTPUT) #endif //****************************************************************************************************************************** -#define CREATEINSTANCE(CLASS) \ +#define CREATEINSTANCE(CLASS) \ \ - static Reference< XInterface > SAL_CALL CLASS##_createInstance ( const Reference< XMultiServiceFactory >& rServiceManager ) throw ( Exception ) \ - { \ - AS_DBG_OUT ( "\tCREATEINSTANCE():\tOK\n" ) \ - return Reference< XInterface >( *(OWeakObject*)(new CLASS( rServiceManager )) ); \ + static Reference< XInterface > SAL_CALL CLASS##_createInstance ( const Reference< XMultiServiceFactory >& rServiceManager ) throw ( Exception ) \ + { \ + AS_DBG_OUT ( "\tCREATEINSTANCE():\tOK\n" ) \ + return Reference< XInterface >( *(OWeakObject*)(new CLASS( rServiceManager )) ); \ } //****************************************************************************************************************************** -#define COMPONENT_INFO(CLASS) \ +#define COMPONENT_INFO(CLASS) \ \ - AS_DBG_OUT ( "\tCOMPONENT_INFO():\t[start]\n" ) \ - try \ - { \ - /* Set default result of follow operations !!! */ \ - bReturn = sal_False ; \ + AS_DBG_OUT ( "\tCOMPONENT_INFO():\t[start]\n" ) \ + try \ + { \ + /* Set default result of follow operations !!! */ \ + bReturn = sal_False ; \ \ - /* Do the follow only, if given key is valid ! */ \ - if ( xKey.is () ) \ - { \ - AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\txkey is valid ...\n" ) \ - /* Build new keyname */ \ - sKeyName = OUString::createFromAscii( "/" ) ; \ - sKeyName += CLASS::impl_getStaticImplementationName() ; \ - sKeyName += OUString::createFromAscii( "/UNO/SERVICES" ); \ + /* Do the follow only, if given key is valid ! */ \ + if ( xKey.is () ) \ + { \ + AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\txkey is valid ...\n" ) \ + /* Build new keyname */ \ + sKeyName = OUString::createFromAscii( "/" ) ; \ + sKeyName += CLASS::impl_getStaticImplementationName() ; \ + sKeyName += OUString::createFromAscii( "/UNO/SERVICES" ); \ \ - /* Create new key with new name. */ \ - xNewKey = xKey->createKey( sKeyName ); \ + /* Create new key with new name. */ \ + xNewKey = xKey->createKey( sKeyName ); \ \ - /* If this new key valid ... */ \ - if ( xNewKey.is () ) \ - { \ - AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\txNewkey is valid ...\n" ) \ - /* Get information about supported services. */ \ - seqServiceNames = CLASS::impl_getStaticSupportedServiceNames() ; \ - pArray = seqServiceNames.getArray() ; \ - nLength = seqServiceNames.getLength() ; \ - nCounter = 0 ; \ + /* If this new key valid ... */ \ + if ( xNewKey.is () ) \ + { \ + AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\txNewkey is valid ...\n" ) \ + /* Get information about supported services. */ \ + seqServiceNames = CLASS::impl_getStaticSupportedServiceNames() ; \ + pArray = seqServiceNames.getArray() ; \ + nLength = seqServiceNames.getLength() ; \ + nCounter = 0 ; \ \ - AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\tloop ..." ) \ - /* Then set this information on this key. */ \ - for ( nCounter = 0; nCounter < nLength; ++nCounter ) \ - { \ - xNewKey->createKey( pArray [nCounter] ); \ - } \ - AS_DBG_OUT ( " OK\n" ) \ + AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\tloop ..." ) \ + /* Then set this information on this key. */ \ + for ( nCounter = 0; nCounter < nLength; ++nCounter ) \ + { \ + xNewKey->createKey( pArray [nCounter] ); \ + } \ + AS_DBG_OUT ( " OK\n" ) \ \ - /* Result of this operations = OK. */ \ - bReturn = sal_True ; \ - } \ - AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\t... leave xNewKey\n" ) \ - } \ - AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\t... leave xKey\n" ) \ - } \ - catch( InvalidRegistryException& ) \ - { \ - AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\tInvalidRegistryException detected!!!\n" ) \ - bReturn = sal_False ; \ - } \ + /* Result of this operations = OK. */ \ + bReturn = sal_True ; \ + } \ + AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\t... leave xNewKey\n" ) \ + } \ + AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\t... leave xKey\n" ) \ + } \ + catch( InvalidRegistryException& ) \ + { \ + AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\tInvalidRegistryException detected!!!\n" ) \ + bReturn = sal_False ; \ + } \ AS_DBG_OUT ( "\tCOMPONENT_INFO():\t[end]\n" ) //****************************************************************************************************************************** -#define CREATEFACTORY_ONEINSTANCE(CLASS) \ +#define CREATEFACTORY_ONEINSTANCE(CLASS) \ \ - AS_DBG_OUT ( "\tCREATEFACTORY_ONEINSTANCE():\t[start]\n" ) \ - /* Create right factory ... */ \ - xFactory = Reference< XSingleServiceFactory > \ - ( \ - cppu::createOneInstanceFactory ( xServiceManager , \ - CLASS::impl_getStaticImplementationName () , \ - CLASS##_createInstance , \ - CLASS::impl_getStaticSupportedServiceNames () ) \ - ) ; \ + AS_DBG_OUT ( "\tCREATEFACTORY_ONEINSTANCE():\t[start]\n" ) \ + /* Create right factory ... */ \ + xFactory = Reference< XSingleServiceFactory > \ + ( \ + cppu::createOneInstanceFactory ( xServiceManager , \ + CLASS::impl_getStaticImplementationName () , \ + CLASS##_createInstance , \ + CLASS::impl_getStaticSupportedServiceNames () ) \ + ) ; \ AS_DBG_OUT ( "\tCREATEFACTORY_ONEINSTANCE():\t[end]\n" ) //****************************************************************************************************************************** -#define CREATEFACTORY_SINGLE(CLASS) \ +#define CREATEFACTORY_SINGLE(CLASS) \ \ - AS_DBG_OUT ( "\tCREATEFACTORY_SINGLE():\t[start]\n" ) \ - /* Create right factory ... */ \ - xFactory = Reference< XSingleServiceFactory > \ - ( \ - cppu::createSingleFactory ( xServiceManager , \ - CLASS::impl_getStaticImplementationName () , \ - CLASS##_createInstance , \ - CLASS::impl_getStaticSupportedServiceNames () ) \ - ) ; \ + AS_DBG_OUT ( "\tCREATEFACTORY_SINGLE():\t[start]\n" ) \ + /* Create right factory ... */ \ + xFactory = Reference< XSingleServiceFactory > \ + ( \ + cppu::createSingleFactory ( xServiceManager , \ + CLASS::impl_getStaticImplementationName () , \ + CLASS##_createInstance , \ + CLASS::impl_getStaticSupportedServiceNames () ) \ + ) ; \ AS_DBG_OUT ( "\tCREATEFACTORY_SINGLE():\t[end]\n" ) //****************************************************************************************************************************** -#define IF_NAME_CREATECOMPONENTFACTORY_ONEINSTANCE(CLASS) \ +#define IF_NAME_CREATECOMPONENTFACTORY_ONEINSTANCE(CLASS) \ \ - if ( CLASS::impl_getStaticImplementationName().equals( OUString::createFromAscii( pImplementationName ) ) ) \ - { \ - AS_DBG_OUT ( "\tIF_NAME_CREATECOMPONENTFACTORY_ONEINSTANCE():\timplementationname found\n" ) \ - CREATEFACTORY_ONEINSTANCE ( CLASS ) \ + if ( CLASS::impl_getStaticImplementationName().equals( OUString::createFromAscii( pImplementationName ) ) ) \ + { \ + AS_DBG_OUT ( "\tIF_NAME_CREATECOMPONENTFACTORY_ONEINSTANCE():\timplementationname found\n" ) \ + CREATEFACTORY_ONEINSTANCE ( CLASS ) \ } //****************************************************************************************************************************** -#define IF_NAME_CREATECOMPONENTFACTORY_SINGLE(CLASS) \ +#define IF_NAME_CREATECOMPONENTFACTORY_SINGLE(CLASS) \ \ - if ( CLASS::impl_getStaticImplementationName().equals( OUString::createFromAscii( pImplementationName ) ) ) \ - { \ - AS_DBG_OUT ( "\tIF_NAME_CREATECOMPONENTFACTORY_SINGLE():\timplementationname found\n" ) \ - CREATEFACTORY_SINGLE ( CLASS ) \ + if ( CLASS::impl_getStaticImplementationName().equals( OUString::createFromAscii( pImplementationName ) ) ) \ + { \ + AS_DBG_OUT ( "\tIF_NAME_CREATECOMPONENTFACTORY_SINGLE():\timplementationname found\n" ) \ + CREATEFACTORY_SINGLE ( CLASS ) \ } //______________________________________________________________________________________________________________ -// declare functions to create a new instance of service +// declare functions to create a new instance of service //______________________________________________________________________________________________________________ //============================================================================= // Add new macro line to use new services. // -// !!! ATTENTION !!! -// Write no ";" at end of line! (see macro) +// !!! ATTENTION !!! +// Write no ";" at end of line! (see macro) //============================================================================= -CREATEINSTANCE ( FrameControl ) -CREATEINSTANCE ( ProgressBar ) -CREATEINSTANCE ( ProgressMonitor ) -CREATEINSTANCE ( StatusIndicator ) +CREATEINSTANCE ( FrameControl ) +CREATEINSTANCE ( ProgressBar ) +CREATEINSTANCE ( ProgressMonitor ) +CREATEINSTANCE ( StatusIndicator ) //============================================================================= //______________________________________________________________________________________________________________ -// return environment +// return environment //______________________________________________________________________________________________________________ -extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvironmentTypeName , - uno_Environment** /*ppEnvironment*/ ) +extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvironmentTypeName , + uno_Environment** /*ppEnvironment*/ ) { *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } //______________________________________________________________________________________________________________ -// write component info to registry +// write component info to registry //______________________________________________________________________________________________________________ -extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/ , - void* pRegistryKey ) +extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/ , + void* pRegistryKey ) { AS_DBG_OUT ( "component_writeInfo():\t[start]\n" ) @@ -236,24 +236,24 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/ // Define variables for following macros! // bReturn is set automaticly. - Reference< XRegistryKey > xKey( reinterpret_cast< XRegistryKey* >( pRegistryKey ) ) ; - Reference< XRegistryKey > xNewKey ; - Sequence< OUString > seqServiceNames ; - const OUString* pArray ; - sal_Int32 nLength ; - sal_Int32 nCounter ; - OUString sKeyName ; + Reference< XRegistryKey > xKey( reinterpret_cast< XRegistryKey* >( pRegistryKey ) ) ; + Reference< XRegistryKey > xNewKey ; + Sequence< OUString > seqServiceNames ; + const OUString* pArray ; + sal_Int32 nLength ; + sal_Int32 nCounter ; + OUString sKeyName ; //============================================================================= // Add new macro line to register new services. // - // !!! ATTENTION !!! - // Write no ";" at end of line! (see macro) + // !!! ATTENTION !!! + // Write no ";" at end of line! (see macro) //============================================================================= - COMPONENT_INFO ( FrameControl ) - COMPONENT_INFO ( ProgressBar ) - COMPONENT_INFO ( ProgressMonitor ) - COMPONENT_INFO ( StatusIndicator ) + COMPONENT_INFO ( FrameControl ) + COMPONENT_INFO ( ProgressBar ) + COMPONENT_INFO ( ProgressMonitor ) + COMPONENT_INFO ( StatusIndicator ) //============================================================================= AS_DBG_OUT ( "component_writeInfo():\t\t... leave pRegistryKey scope\n" ) @@ -266,42 +266,42 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/ } //______________________________________________________________________________________________________________ -// create right component factory +// create right component factory //______________________________________________________________________________________________________________ -extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplementationName , - void* pServiceManager , - void* /*pRegistryKey*/ ) +extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplementationName , + void* pServiceManager , + void* /*pRegistryKey*/ ) { AS_DBG_OUT( "component_getFactory():\t[start]\n" ) // Set default return value for this operation - if it failed. void* pReturn = NULL ; - if ( - ( pImplementationName != NULL ) && - ( pServiceManager != NULL ) + if ( + ( pImplementationName != NULL ) && + ( pServiceManager != NULL ) ) { AS_DBG_OUT( "component_getFactory():\t\t... enter scope - pointer are valid\n" ) // Define variables which are used in following macros. - Reference< XSingleServiceFactory > xFactory ; - Reference< XMultiServiceFactory > xServiceManager( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ; + Reference< XSingleServiceFactory > xFactory ; + Reference< XMultiServiceFactory > xServiceManager( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ; //============================================================================= // Add new macro line to handle new service. // - // !!! ATTENTION !!! - // Write no ";" at end of line and dont forget "else" ! (see macro) + // !!! ATTENTION !!! + // Write no ";" at end of line and dont forget "else" ! (see macro) //============================================================================= - IF_NAME_CREATECOMPONENTFACTORY_SINGLE( FrameControl ) + IF_NAME_CREATECOMPONENTFACTORY_SINGLE( FrameControl ) else - IF_NAME_CREATECOMPONENTFACTORY_SINGLE( ProgressBar ) + IF_NAME_CREATECOMPONENTFACTORY_SINGLE( ProgressBar ) else - IF_NAME_CREATECOMPONENTFACTORY_SINGLE( ProgressMonitor ) + IF_NAME_CREATECOMPONENTFACTORY_SINGLE( ProgressMonitor ) else - IF_NAME_CREATECOMPONENTFACTORY_SINGLE( StatusIndicator ) + IF_NAME_CREATECOMPONENTFACTORY_SINGLE( StatusIndicator ) //============================================================================= // Factory is valid - service was found. diff --git a/UnoControls/source/controls/OConnectionPointContainerHelper.cxx b/UnoControls/source/controls/OConnectionPointContainerHelper.cxx index c5bd8cfce1e9..470254f323c5 100644 --- a/UnoControls/source/controls/OConnectionPointContainerHelper.cxx +++ b/UnoControls/source/controls/OConnectionPointContainerHelper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -27,39 +27,39 @@ ************************************************************************/ //______________________________________________________________________________________________________________ -// my own include +// my own include //______________________________________________________________________________________________________________ #include "OConnectionPointContainerHelper.hxx" //______________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //______________________________________________________________________________________________________________ //______________________________________________________________________________________________________________ -// include of my own project +// include of my own project //______________________________________________________________________________________________________________ #include "OConnectionPointHelper.hxx" //______________________________________________________________________________________________________________ -// namespaces +// namespaces //______________________________________________________________________________________________________________ -using namespace ::rtl ; -using namespace ::osl ; -using namespace ::cppu ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::lang ; +using namespace ::rtl ; +using namespace ::osl ; +using namespace ::cppu ; +using namespace ::com::sun::star::uno ; +using namespace ::com::sun::star::lang ; namespace unocontrols{ //______________________________________________________________________________________________________________ -// construct/destruct +// construct/destruct //______________________________________________________________________________________________________________ OConnectionPointContainerHelper::OConnectionPointContainerHelper( Mutex& aMutex ) - : m_aSharedMutex ( aMutex ) - , m_aMultiTypeContainer ( aMutex ) + : m_aSharedMutex ( aMutex ) + , m_aMultiTypeContainer ( aMutex ) { } @@ -68,17 +68,17 @@ OConnectionPointContainerHelper::~OConnectionPointContainerHelper() } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ Any SAL_CALL OConnectionPointContainerHelper::queryInterface( const Type& aType ) throw( RuntimeException ) { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Ask for my own supported interfaces ... - Any aReturn ( ::cppu::queryInterface( aType , - static_cast< XConnectionPointContainer* > ( this ) + Any aReturn ( ::cppu::queryInterface( aType , + static_cast< XConnectionPointContainer* > ( this ) ) ); @@ -93,33 +93,33 @@ Any SAL_CALL OConnectionPointContainerHelper::queryInterface( const Type& aType } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ void SAL_CALL OConnectionPointContainerHelper::acquire() throw() { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Forward to baseclass OWeakObject::acquire(); } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ void SAL_CALL OConnectionPointContainerHelper::release() throw() { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Forward to baseclass OWeakObject::release(); } //______________________________________________________________________________________________________________ -// XConnectionPointContainer +// XConnectionPointContainer //______________________________________________________________________________________________________________ Sequence< Type > SAL_CALL OConnectionPointContainerHelper::getConnectionPointTypes() throw( RuntimeException ) @@ -129,7 +129,7 @@ Sequence< Type > SAL_CALL OConnectionPointContainerHelper::getConnectionPointTyp } //______________________________________________________________________________________________________________ -// XConnectionPointContainer +// XConnectionPointContainer //______________________________________________________________________________________________________________ Reference< XConnectionPoint > SAL_CALL OConnectionPointContainerHelper::queryConnectionPoint( const Type& aType ) throw( RuntimeException ) @@ -152,30 +152,30 @@ Reference< XConnectionPoint > SAL_CALL OConnectionPointContainerHelper::queryCon } //______________________________________________________________________________________________________________ -// XConnectionPointContainer +// XConnectionPointContainer //______________________________________________________________________________________________________________ -void SAL_CALL OConnectionPointContainerHelper::advise( const Type& aType , - const Reference< XInterface >& xListener ) throw( RuntimeException ) +void SAL_CALL OConnectionPointContainerHelper::advise( const Type& aType , + const Reference< XInterface >& xListener ) throw( RuntimeException ) { // Container is threadsafe himself ! m_aMultiTypeContainer.addInterface( aType, xListener ); } //______________________________________________________________________________________________________________ -// XConnectionPointContainer +// XConnectionPointContainer //______________________________________________________________________________________________________________ -void SAL_CALL OConnectionPointContainerHelper::unadvise( const Type& aType , - const Reference< XInterface >& xListener ) throw( RuntimeException ) +void SAL_CALL OConnectionPointContainerHelper::unadvise( const Type& aType , + const Reference< XInterface >& xListener ) throw( RuntimeException ) { // Container is threadsafe himself ! m_aMultiTypeContainer.removeInterface( aType, xListener ); } //______________________________________________________________________________________________________________ -// public but impl method! -// Is neccessary to get container member at OConnectionPoint-instance. +// public but impl method! +// Is neccessary to get container member at OConnectionPoint-instance. //______________________________________________________________________________________________________________ OMultiTypeInterfaceContainerHelper& OConnectionPointContainerHelper::impl_getMultiTypeContainer() @@ -185,6 +185,6 @@ OMultiTypeInterfaceContainerHelper& OConnectionPointContainerHelper::impl_getMul return m_aMultiTypeContainer; } -} // namespace unocontrols +} // namespace unocontrols /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/UnoControls/source/controls/OConnectionPointHelper.cxx b/UnoControls/source/controls/OConnectionPointHelper.cxx index a8b174b01a3a..a9f0e606db11 100644 --- a/UnoControls/source/controls/OConnectionPointHelper.cxx +++ b/UnoControls/source/controls/OConnectionPointHelper.cxx @@ -27,44 +27,44 @@ ************************************************************************/ //______________________________________________________________________________________________________________ -// my own include +// my own include //______________________________________________________________________________________________________________ #include "OConnectionPointHelper.hxx" //______________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //______________________________________________________________________________________________________________ //______________________________________________________________________________________________________________ -// include of my own project +// include of my own project //______________________________________________________________________________________________________________ #include "OConnectionPointContainerHelper.hxx" //______________________________________________________________________________________________________________ -// namespaces +// namespaces //______________________________________________________________________________________________________________ -using namespace ::rtl ; -using namespace ::osl ; -using namespace ::cppu ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::lang ; +using namespace ::rtl ; +using namespace ::osl ; +using namespace ::cppu ; +using namespace ::com::sun::star::uno ; +using namespace ::com::sun::star::lang ; namespace unocontrols{ //______________________________________________________________________________________________________________ -// construct/destruct +// construct/destruct //______________________________________________________________________________________________________________ OConnectionPointHelper::OConnectionPointHelper( - Mutex& aMutex , - OConnectionPointContainerHelper* pContainerImplementation , - Type aType -) : m_aSharedMutex ( aMutex ) - , m_oContainerWeakReference ( pContainerImplementation ) - , m_pContainerImplementation ( pContainerImplementation ) - , m_aInterfaceType ( aType ) + Mutex& aMutex , + OConnectionPointContainerHelper* pContainerImplementation , + Type aType +) : m_aSharedMutex ( aMutex ) + , m_oContainerWeakReference ( pContainerImplementation ) + , m_pContainerImplementation ( pContainerImplementation ) + , m_aInterfaceType ( aType ) { } @@ -73,17 +73,17 @@ OConnectionPointHelper::~OConnectionPointHelper() } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ Any SAL_CALL OConnectionPointHelper::queryInterface( const Type& aType ) throw( RuntimeException ) { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Ask for my own supported interfaces ... - Any aReturn ( ::cppu::queryInterface( aType , - static_cast< XConnectionPoint* > ( this ) + Any aReturn ( ::cppu::queryInterface( aType , + static_cast< XConnectionPoint* > ( this ) ) ); @@ -98,33 +98,33 @@ Any SAL_CALL OConnectionPointHelper::queryInterface( const Type& aType ) throw( } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ void SAL_CALL OConnectionPointHelper::acquire() throw() { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Forward to baseclass OWeakObject::acquire(); } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ void SAL_CALL OConnectionPointHelper::release() throw() { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Forward to baseclass OWeakObject::release(); } //______________________________________________________________________________________________________________ -// XConnectionPoint +// XConnectionPoint //______________________________________________________________________________________________________________ Type SAL_CALL OConnectionPointHelper::getConnectionType() throw( RuntimeException ) @@ -148,7 +148,7 @@ Type SAL_CALL OConnectionPointHelper::getConnectionType() throw( RuntimeExceptio } //______________________________________________________________________________________________________________ -// XConnectionPoint +// XConnectionPoint //______________________________________________________________________________________________________________ Reference< XConnectionPointContainer > SAL_CALL OConnectionPointHelper::getConnectionPointContainer() throw( RuntimeException ) @@ -160,12 +160,12 @@ Reference< XConnectionPointContainer > SAL_CALL OConnectionPointHelper::getConne } //______________________________________________________________________________________________________________ -// XConnectionPoint +// XConnectionPoint //______________________________________________________________________________________________________________ -void SAL_CALL OConnectionPointHelper::advise( const Reference< XInterface >& xListener ) throw( ListenerExistException , - InvalidListenerException , - RuntimeException ) +void SAL_CALL OConnectionPointHelper::advise( const Reference< XInterface >& xListener ) throw( ListenerExistException , + InvalidListenerException , + RuntimeException ) { // Ready for multithreading MutexGuard aGuard( m_aSharedMutex ); @@ -195,7 +195,7 @@ void SAL_CALL OConnectionPointHelper::advise( const Reference< XInterface >& xLi } //______________________________________________________________________________________________________________ -// XConnectionPoint +// XConnectionPoint //______________________________________________________________________________________________________________ void SAL_CALL OConnectionPointHelper::unadvise( const Reference< XInterface >& xListener ) throw( RuntimeException ) @@ -216,7 +216,7 @@ void SAL_CALL OConnectionPointHelper::unadvise( const Reference< XInterface >& x } //______________________________________________________________________________________________________________ -// XConnectionPoint +// XConnectionPoint //______________________________________________________________________________________________________________ Sequence< Reference< XInterface > > SAL_CALL OConnectionPointHelper::getConnections() throw( RuntimeException ) @@ -232,7 +232,7 @@ Sequence< Reference< XInterface > > SAL_CALL OConnectionPointHelper::getConnecti // Set default return value, if method failed. Sequence< Reference< XInterface > > seqReturnConnections = Sequence< Reference< XInterface > >(); // Get reference to private member of OConnectionPointHelperContainer! - OMultiTypeInterfaceContainerHelper& aSharedContainer = m_pContainerImplementation->impl_getMultiTypeContainer(); + OMultiTypeInterfaceContainerHelper& aSharedContainer = m_pContainerImplementation->impl_getMultiTypeContainer(); // Get pointer to specialized container which hold all interfaces of searched type. OInterfaceContainerHelper* pSpecialContainer = aSharedContainer.getContainer( m_aInterfaceType ); // Get elements of searched type, if somelse exist. @@ -247,7 +247,7 @@ Sequence< Reference< XInterface > > SAL_CALL OConnectionPointHelper::getConnecti } //______________________________________________________________________________________________________________ -// private method +// private method //______________________________________________________________________________________________________________ sal_Bool OConnectionPointHelper::impl_LockContainer() @@ -260,7 +260,7 @@ sal_Bool OConnectionPointHelper::impl_LockContainer() } //______________________________________________________________________________________________________________ -// private method +// private method //______________________________________________________________________________________________________________ void OConnectionPointHelper::impl_UnlockContainer() @@ -270,6 +270,6 @@ void OConnectionPointHelper::impl_UnlockContainer() m_xLock = Reference< XInterface >(); } -} // namespace unocontrols +} // namespace unocontrols /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx index 9987478b7b56..a111bf0973f9 100644 --- a/UnoControls/source/controls/framecontrol.cxx +++ b/UnoControls/source/controls/framecontrol.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -28,13 +28,13 @@ //______________________________________________________________________________________________________________ -// my own include +// my own include //______________________________________________________________________________________________________________ #include "framecontrol.hxx" //______________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //______________________________________________________________________________________________________________ #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/util/XURLTransformer.hpp> @@ -46,35 +46,35 @@ #include <osl/diagnose.h> //______________________________________________________________________________________________________________ -// include of my own project +// include of my own project //______________________________________________________________________________________________________________ //______________________________________________________________________________________________________________ -// namespaces +// namespaces //______________________________________________________________________________________________________________ -using namespace ::rtl ; -using namespace ::osl ; -using namespace ::cppu ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::beans ; -using namespace ::com::sun::star::awt ; -using namespace ::com::sun::star::frame ; -using namespace ::com::sun::star::util ; +using namespace ::rtl ; +using namespace ::osl ; +using namespace ::cppu ; +using namespace ::com::sun::star::uno ; +using namespace ::com::sun::star::lang ; +using namespace ::com::sun::star::beans ; +using namespace ::com::sun::star::awt ; +using namespace ::com::sun::star::frame ; +using namespace ::com::sun::star::util ; namespace unocontrols{ //______________________________________________________________________________________________________________ -// construct/destruct +// construct/destruct //______________________________________________________________________________________________________________ FrameControl::FrameControl( const Reference< XMultiServiceFactory >& xFactory ) - : BaseControl ( xFactory ) - , OBroadcastHelper ( m_aMutex ) - , OPropertySetHelper ( *SAL_STATIC_CAST( OBroadcastHelper *, this ) ) - , m_aInterfaceContainer ( m_aMutex ) - , m_aConnectionPointContainer ( m_aMutex ) + : BaseControl ( xFactory ) + , OBroadcastHelper ( m_aMutex ) + , OPropertySetHelper ( *SAL_STATIC_CAST( OBroadcastHelper *, this ) ) + , m_aInterfaceContainer ( m_aMutex ) + , m_aConnectionPointContainer ( m_aMutex ) { } @@ -83,13 +83,13 @@ FrameControl::~FrameControl() } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ Any SAL_CALL FrameControl::queryInterface( const Type& rType ) throw( RuntimeException ) { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. Any aReturn ; Reference< XInterface > xDel = BaseControl::impl_getDelegator(); if ( xDel.is() ) @@ -108,33 +108,33 @@ Any SAL_CALL FrameControl::queryInterface( const Type& rType ) throw( RuntimeExc } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ void SAL_CALL FrameControl::acquire() throw() { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Forward to baseclass BaseControl::acquire(); } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ void SAL_CALL FrameControl::release() throw() { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Forward to baseclass BaseControl::release(); } //____________________________________________________________________________________________________________ -// XTypeProvider +// XTypeProvider //____________________________________________________________________________________________________________ Sequence< Type > SAL_CALL FrameControl::getTypes() throw( RuntimeException ) @@ -153,9 +153,9 @@ Sequence< Type > SAL_CALL FrameControl::getTypes() throw( RuntimeException ) if ( pTypeCollection == NULL ) { // Create a static typecollection ... - static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XControlModel >*)NULL ) , - ::getCppuType(( const Reference< XControlContainer >*)NULL ) , - ::getCppuType(( const Reference< XConnectionPointContainer >*)NULL ) , + static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XControlModel >*)NULL ) , + ::getCppuType(( const Reference< XControlContainer >*)NULL ) , + ::getCppuType(( const Reference< XConnectionPointContainer >*)NULL ) , BaseControl::getTypes() ); // ... and set his address to static pointer! @@ -167,16 +167,16 @@ Sequence< Type > SAL_CALL FrameControl::getTypes() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XAggregation +// XAggregation //____________________________________________________________________________________________________________ Any SAL_CALL FrameControl::queryAggregation( const Type& aType ) throw( RuntimeException ) { // Ask for my own supported interfaces ... // Attention: XTypeProvider and XInterface are supported by OComponentHelper! - Any aReturn ( ::cppu::queryInterface( aType , - static_cast< XControlModel* > ( this ) , - static_cast< XConnectionPointContainer* > ( this ) + Any aReturn ( ::cppu::queryInterface( aType , + static_cast< XControlModel* > ( this ) , + static_cast< XConnectionPointContainer* > ( this ) ) ); @@ -195,11 +195,11 @@ Any SAL_CALL FrameControl::queryAggregation( const Type& aType ) throw( RuntimeE } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ -void SAL_CALL FrameControl::createPeer( const Reference< XToolkit >& xToolkit , - const Reference< XWindowPeer >& xParentPeer ) throw( RuntimeException ) +void SAL_CALL FrameControl::createPeer( const Reference< XToolkit >& xToolkit , + const Reference< XWindowPeer >& xParentPeer ) throw( RuntimeException ) { BaseControl::createPeer( xToolkit, xParentPeer ); if ( impl_getPeerWindow().is() ) @@ -212,7 +212,7 @@ void SAL_CALL FrameControl::createPeer( const Reference< XToolkit >& xToo } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ sal_Bool SAL_CALL FrameControl::setModel( const Reference< XControlModel >& /*xModel*/ ) throw( RuntimeException ) @@ -222,7 +222,7 @@ sal_Bool SAL_CALL FrameControl::setModel( const Reference< XControlModel >& /*xM } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ Reference< XControlModel > SAL_CALL FrameControl::getModel() throw( RuntimeException ) @@ -232,7 +232,7 @@ Reference< XControlModel > SAL_CALL FrameControl::getModel() throw( RuntimeExcep } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ void SAL_CALL FrameControl::dispose() throw( RuntimeException ) @@ -242,7 +242,7 @@ void SAL_CALL FrameControl::dispose() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XView +// XView //____________________________________________________________________________________________________________ sal_Bool SAL_CALL FrameControl::setGraphics( const Reference< XGraphics >& /*xDevice*/ ) throw( RuntimeException ) @@ -252,7 +252,7 @@ sal_Bool SAL_CALL FrameControl::setGraphics( const Reference< XGraphics >& /*xDe } //____________________________________________________________________________________________________________ -// XView +// XView //____________________________________________________________________________________________________________ Reference< XGraphics > SAL_CALL FrameControl::getGraphics() throw( RuntimeException ) @@ -262,7 +262,7 @@ Reference< XGraphics > SAL_CALL FrameControl::getGraphics() throw( RuntimeExcept } //____________________________________________________________________________________________________________ -// XConnectionPointContainer +// XConnectionPointContainer //____________________________________________________________________________________________________________ Sequence< Type > SAL_CALL FrameControl::getConnectionPointTypes() throw( RuntimeException ) @@ -272,7 +272,7 @@ Sequence< Type > SAL_CALL FrameControl::getConnectionPointTypes() throw( Runtime } //____________________________________________________________________________________________________________ -// XConnectionPointContainer +// XConnectionPointContainer //____________________________________________________________________________________________________________ Reference< XConnectionPoint > SAL_CALL FrameControl::queryConnectionPoint( const Type& aType ) throw( RuntimeException ) @@ -282,29 +282,29 @@ Reference< XConnectionPoint > SAL_CALL FrameControl::queryConnectionPoint( const } //____________________________________________________________________________________________________________ -// XConnectionPointContainer +// XConnectionPointContainer //____________________________________________________________________________________________________________ -void SAL_CALL FrameControl::advise( const Type& aType , - const Reference< XInterface >& xListener ) throw( RuntimeException ) +void SAL_CALL FrameControl::advise( const Type& aType , + const Reference< XInterface >& xListener ) throw( RuntimeException ) { // Forwarded to helper class m_aConnectionPointContainer.advise( aType, xListener ); } //____________________________________________________________________________________________________________ -// XConnectionPointContainer +// XConnectionPointContainer //____________________________________________________________________________________________________________ -void SAL_CALL FrameControl::unadvise( const Type& aType , - const Reference< XInterface >& xListener ) throw( RuntimeException ) +void SAL_CALL FrameControl::unadvise( const Type& aType , + const Reference< XInterface >& xListener ) throw( RuntimeException ) { // Forwarded to helper class m_aConnectionPointContainer.unadvise( aType, xListener ); } //____________________________________________________________________________________________________________ -// impl but public method to register service +// impl but public method to register service //____________________________________________________________________________________________________________ const Sequence< OUString > FrameControl::impl_getStaticSupportedServiceNames() @@ -316,7 +316,7 @@ const Sequence< OUString > FrameControl::impl_getStaticSupportedServiceNames() } //____________________________________________________________________________________________________________ -// impl but public method to register service +// impl but public method to register service //____________________________________________________________________________________________________________ const OUString FrameControl::impl_getStaticImplementationName() @@ -325,25 +325,25 @@ const OUString FrameControl::impl_getStaticImplementationName() } //____________________________________________________________________________________________________________ -// OPropertySetHelper +// OPropertySetHelper //____________________________________________________________________________________________________________ -sal_Bool FrameControl::convertFastPropertyValue( Any& rConvertedValue , - Any& rOldValue , - sal_Int32 nHandle , - const Any& rValue ) throw( IllegalArgumentException ) +sal_Bool FrameControl::convertFastPropertyValue( Any& rConvertedValue , + Any& rOldValue , + sal_Int32 nHandle , + const Any& rValue ) throw( IllegalArgumentException ) { sal_Bool bReturn = sal_False ; switch (nHandle) { - case PROPERTYHANDLE_COMPONENTURL : rConvertedValue = rValue ; - rOldValue <<= m_sComponentURL ; - bReturn = sal_True ; + case PROPERTYHANDLE_COMPONENTURL : rConvertedValue = rValue ; + rOldValue <<= m_sComponentURL ; + bReturn = sal_True ; break ; - case PROPERTYHANDLE_LOADERARGUMENTS : rConvertedValue = rValue ; - rOldValue <<= m_seqLoaderArguments ; - bReturn = sal_True ; + case PROPERTYHANDLE_LOADERARGUMENTS : rConvertedValue = rValue ; + rOldValue <<= m_seqLoaderArguments ; + bReturn = sal_True ; break ; } @@ -356,57 +356,57 @@ sal_Bool FrameControl::convertFastPropertyValue( Any& rConvertedVa } //____________________________________________________________________________________________________________ -// OPropertySetHelper +// OPropertySetHelper //____________________________________________________________________________________________________________ -void FrameControl::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , - const Any& rValue ) +void FrameControl::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , + const Any& rValue ) throw ( ::com::sun::star::uno::Exception ) { // this method only set the value - MutexGuard aGuard (m_aMutex) ; + MutexGuard aGuard (m_aMutex) ; switch (nHandle) { - case PROPERTYHANDLE_COMPONENTURL : rValue >>= m_sComponentURL ; + case PROPERTYHANDLE_COMPONENTURL : rValue >>= m_sComponentURL ; if (getPeer().is()) { impl_createFrame ( getPeer(), m_sComponentURL, m_seqLoaderArguments ) ; } break ; - case PROPERTYHANDLE_LOADERARGUMENTS : rValue >>= m_seqLoaderArguments ; + case PROPERTYHANDLE_LOADERARGUMENTS : rValue >>= m_seqLoaderArguments ; break ; - default : OSL_ENSURE ( nHandle == -1, ERRORTEXT_VOSENSHURE ) ; + default : OSL_ENSURE ( nHandle == -1, ERRORTEXT_VOSENSHURE ) ; } } //____________________________________________________________________________________________________________ -// OPropertySetHelper +// OPropertySetHelper //____________________________________________________________________________________________________________ -void FrameControl::getFastPropertyValue( Any& rRet , - sal_Int32 nHandle ) const +void FrameControl::getFastPropertyValue( Any& rRet , + sal_Int32 nHandle ) const { - MutexGuard aGuard ( Mutex::getGlobalMutex() ) ; + MutexGuard aGuard ( Mutex::getGlobalMutex() ) ; switch (nHandle) { - case PROPERTYHANDLE_COMPONENTURL : rRet <<= m_sComponentURL ; + case PROPERTYHANDLE_COMPONENTURL : rRet <<= m_sComponentURL ; break ; - case PROPERTYHANDLE_LOADERARGUMENTS : rRet <<= m_seqLoaderArguments ; + case PROPERTYHANDLE_LOADERARGUMENTS : rRet <<= m_seqLoaderArguments ; break ; - case PROPERTYHANDLE_FRAME : rRet <<= m_xFrame ; + case PROPERTYHANDLE_FRAME : rRet <<= m_xFrame ; break ; - default : OSL_ENSURE ( nHandle == -1, ERRORTEXT_VOSENSHURE ) ; + default : OSL_ENSURE ( nHandle == -1, ERRORTEXT_VOSENSHURE ) ; } } //____________________________________________________________________________________________________________ -// OPropertySetHelper +// OPropertySetHelper //____________________________________________________________________________________________________________ IPropertyArrayHelper& FrameControl::getInfoHelper() @@ -417,7 +417,7 @@ IPropertyArrayHelper& FrameControl::getInfoHelper() if (!pInfo) { // global method must be guarded - MutexGuard aGuard ( Mutex::getGlobalMutex() ) ; + MutexGuard aGuard ( Mutex::getGlobalMutex() ) ; if (!pInfo) { @@ -451,7 +451,7 @@ Uik* FrameControl::getConnectionPointUiks ( sal_Int32* pCount ) const */ //____________________________________________________________________________________________________________ -// OPropertySetHelper +// OPropertySetHelper //____________________________________________________________________________________________________________ Reference< XPropertySetInfo > SAL_CALL FrameControl::getPropertySetInfo() throw( RuntimeException ) @@ -477,35 +477,35 @@ Reference< XPropertySetInfo > SAL_CALL FrameControl::getPropertySetInfo() throw( } //____________________________________________________________________________________________________________ -// BaseControl +// BaseControl //____________________________________________________________________________________________________________ WindowDescriptor* FrameControl::impl_getWindowDescriptor( const Reference< XWindowPeer >& xParentPeer ) { - WindowDescriptor* pDescriptor = new WindowDescriptor ; + WindowDescriptor* pDescriptor = new WindowDescriptor ; - pDescriptor->Type = WindowClass_CONTAINER ; - pDescriptor->ParentIndex = -1 ; - pDescriptor->Parent = xParentPeer ; - pDescriptor->Bounds = getPosSize () ; - pDescriptor->WindowAttributes = 0 ; + pDescriptor->Type = WindowClass_CONTAINER ; + pDescriptor->ParentIndex = -1 ; + pDescriptor->Parent = xParentPeer ; + pDescriptor->Bounds = getPosSize () ; + pDescriptor->WindowAttributes = 0 ; return pDescriptor ; } //____________________________________________________________________________________________________________ -// private method +// private method //____________________________________________________________________________________________________________ -void FrameControl::impl_createFrame( const Reference< XWindowPeer >& xPeer , - const OUString& rURL , - const Sequence< PropertyValue >& rArguments ) +void FrameControl::impl_createFrame( const Reference< XWindowPeer >& xPeer , + const OUString& rURL , + const Sequence< PropertyValue >& rArguments ) { - Reference< XFrame > xOldFrame ; - Reference< XFrame > xNewFrame ; + Reference< XFrame > xOldFrame ; + Reference< XFrame > xNewFrame ; { - MutexGuard aGuard ( m_aMutex ) ; + MutexGuard aGuard ( m_aMutex ) ; xOldFrame = m_xFrame ; } @@ -517,14 +517,14 @@ void FrameControl::impl_createFrame( const Reference< XWindowPeer >& xPee Reference< XWindow > xWP ( xPeer, UNO_QUERY ) ; xNewFrame->initialize ( xWP ) ; - // option + // option //xFrame->setName( "WhatYouWant" ); Reference< XURLTransformer > xTrans ( impl_getMultiServiceFactory()->createInstance ( OUString::createFromAscii( "com.sun.star.util.URLTransformer" ) ), UNO_QUERY ) ; if(xTrans.is()) { // load file - URL aURL ; + URL aURL ; aURL.Complete = rURL ; xTrans->parseStrict( aURL ) ; @@ -544,9 +544,9 @@ void FrameControl::impl_createFrame( const Reference< XWindowPeer >& xPee } // notify the listeners - sal_Int32 nFrameId = PROPERTYHANDLE_FRAME ; - Any aNewFrame ( &xNewFrame, ::getCppuType((const Reference< XFrame >*)0) ) ; - Any aOldFrame ( &xOldFrame, ::getCppuType((const Reference< XFrame >*)0) ) ; + sal_Int32 nFrameId = PROPERTYHANDLE_FRAME ; + Any aNewFrame ( &xNewFrame, ::getCppuType((const Reference< XFrame >*)0) ) ; + Any aOldFrame ( &xOldFrame, ::getCppuType((const Reference< XFrame >*)0) ) ; fire ( &nFrameId, &aNewFrame, &aOldFrame, 1, sal_False ) ; @@ -557,7 +557,7 @@ void FrameControl::impl_createFrame( const Reference< XWindowPeer >& xPee } //____________________________________________________________________________________________________________ -// private method +// private method //____________________________________________________________________________________________________________ void FrameControl::impl_deleteFrame() @@ -584,7 +584,7 @@ void FrameControl::impl_deleteFrame() } //____________________________________________________________________________________________________________ -// private method +// private method //____________________________________________________________________________________________________________ const Sequence< Property > FrameControl::impl_getStaticPropertyDescriptor() @@ -592,9 +592,9 @@ const Sequence< Property > FrameControl::impl_getStaticPropertyDescriptor() // All Properties of this implementation. The array must be sorted! static const Property pPropertys[PROPERTY_COUNT] = { - Property( OUString::createFromAscii( PROPERTYNAME_COMPONENTURL ), PROPERTYHANDLE_COMPONENTURL , ::getCppuType((const OUString*)0) , PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED ), - Property( OUString::createFromAscii( PROPERTYNAME_FRAME ), PROPERTYHANDLE_FRAME , ::getCppuType((const Reference< XFrame >*)0) , PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT ), - Property( OUString::createFromAscii( PROPERTYNAME_LOADERARGUMENTS ), PROPERTYHANDLE_LOADERARGUMENTS , ::getCppuType((const Sequence< PropertyValue >*)0), PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED ) + Property( OUString::createFromAscii( PROPERTYNAME_COMPONENTURL ), PROPERTYHANDLE_COMPONENTURL , ::getCppuType((const OUString*)0) , PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED ), + Property( OUString::createFromAscii( PROPERTYNAME_FRAME ), PROPERTYHANDLE_FRAME , ::getCppuType((const Reference< XFrame >*)0) , PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT ), + Property( OUString::createFromAscii( PROPERTYNAME_LOADERARGUMENTS ), PROPERTYHANDLE_LOADERARGUMENTS , ::getCppuType((const Sequence< PropertyValue >*)0), PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED ) }; static const Sequence< Property > seqPropertys( pPropertys, PROPERTY_COUNT ); @@ -602,6 +602,6 @@ const Sequence< Property > FrameControl::impl_getStaticPropertyDescriptor() return seqPropertys ; } -} // namespace unocontrols +} // namespace unocontrols /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/UnoControls/source/controls/progressbar.cxx b/UnoControls/source/controls/progressbar.cxx index 7d05435e48b2..2ca79b4b425b 100644 --- a/UnoControls/source/controls/progressbar.cxx +++ b/UnoControls/source/controls/progressbar.cxx @@ -26,13 +26,13 @@ * ************************************************************************/ //____________________________________________________________________________________________________________ -// my own includes +// my own includes //____________________________________________________________________________________________________________ #include "progressbar.hxx" //____________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //____________________________________________________________________________________________________________ #include <com/sun/star/awt/GradientStyle.hpp> #include <com/sun/star/awt/RasterOperation.hpp> @@ -45,36 +45,36 @@ #include <limits.h> //____________________________________________________________________________________________________________ -// includes of my project +// includes of my project //____________________________________________________________________________________________________________ //____________________________________________________________________________________________________________ -// namespace +// namespace //____________________________________________________________________________________________________________ -using namespace ::cppu ; -using namespace ::osl ; -using namespace ::rtl ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::awt ; +using namespace ::cppu ; +using namespace ::osl ; +using namespace ::rtl ; +using namespace ::com::sun::star::uno ; +using namespace ::com::sun::star::lang ; +using namespace ::com::sun::star::awt ; namespace unocontrols{ //____________________________________________________________________________________________________________ -// construct/destruct +// construct/destruct //____________________________________________________________________________________________________________ ProgressBar::ProgressBar( const Reference< XMultiServiceFactory >& xFactory ) - : BaseControl ( xFactory ) - , m_bHorizontal ( PROGRESSBAR_DEFAULT_HORIZONTAL ) - , m_aBlockSize ( PROGRESSBAR_DEFAULT_BLOCKDIMENSION ) - , m_nForegroundColor ( PROGRESSBAR_DEFAULT_FOREGROUNDCOLOR ) - , m_nBackgroundColor ( PROGRESSBAR_DEFAULT_BACKGROUNDCOLOR ) - , m_nMinRange ( PROGRESSBAR_DEFAULT_MINRANGE ) - , m_nMaxRange ( PROGRESSBAR_DEFAULT_MAXRANGE ) - , m_nBlockValue ( PROGRESSBAR_DEFAULT_BLOCKVALUE ) - , m_nValue ( PROGRESSBAR_DEFAULT_VALUE ) + : BaseControl ( xFactory ) + , m_bHorizontal ( PROGRESSBAR_DEFAULT_HORIZONTAL ) + , m_aBlockSize ( PROGRESSBAR_DEFAULT_BLOCKDIMENSION ) + , m_nForegroundColor ( PROGRESSBAR_DEFAULT_FOREGROUNDCOLOR ) + , m_nBackgroundColor ( PROGRESSBAR_DEFAULT_BACKGROUNDCOLOR ) + , m_nMinRange ( PROGRESSBAR_DEFAULT_MINRANGE ) + , m_nMaxRange ( PROGRESSBAR_DEFAULT_MAXRANGE ) + , m_nBlockValue ( PROGRESSBAR_DEFAULT_BLOCKVALUE ) + , m_nValue ( PROGRESSBAR_DEFAULT_VALUE ) { } @@ -83,13 +83,13 @@ ProgressBar::~ProgressBar() } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ Any SAL_CALL ProgressBar::queryInterface( const Type& rType ) throw( RuntimeException ) { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. Any aReturn ; Reference< XInterface > xDel = BaseControl::impl_getDelegator(); if ( xDel.is() ) @@ -108,33 +108,33 @@ Any SAL_CALL ProgressBar::queryInterface( const Type& rType ) throw( RuntimeExce } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ void SAL_CALL ProgressBar::acquire() throw() { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Forward to baseclass BaseControl::acquire(); } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ void SAL_CALL ProgressBar::release() throw() { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Forward to baseclass BaseControl::release(); } //____________________________________________________________________________________________________________ -// XTypeProvider +// XTypeProvider //____________________________________________________________________________________________________________ Sequence< Type > SAL_CALL ProgressBar::getTypes() throw( RuntimeException ) @@ -153,8 +153,8 @@ Sequence< Type > SAL_CALL ProgressBar::getTypes() throw( RuntimeException ) if ( pTypeCollection == NULL ) { // Create a static typecollection ... - static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XControlModel >*) NULL ) , - ::getCppuType(( const Reference< XProgressBar >*) NULL ) , + static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XControlModel >*) NULL ) , + ::getCppuType(( const Reference< XProgressBar >*) NULL ) , BaseControl::getTypes() ); // ... and set his address to static pointer! @@ -166,16 +166,16 @@ Sequence< Type > SAL_CALL ProgressBar::getTypes() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XAggregation +// XAggregation //____________________________________________________________________________________________________________ Any SAL_CALL ProgressBar::queryAggregation( const Type& aType ) throw( RuntimeException ) { // Ask for my own supported interfaces ... // Attention: XTypeProvider and XInterface are supported by OComponentHelper! - Any aReturn ( ::cppu::queryInterface( aType , - static_cast< XControlModel* > ( this ) , - static_cast< XProgressBar* > ( this ) + Any aReturn ( ::cppu::queryInterface( aType , + static_cast< XControlModel* > ( this ) , + static_cast< XProgressBar* > ( this ) ) ); @@ -190,13 +190,13 @@ Any SAL_CALL ProgressBar::queryAggregation( const Type& aType ) throw( RuntimeEx } //____________________________________________________________________________________________________________ -// XProgressBar +// XProgressBar //____________________________________________________________________________________________________________ void SAL_CALL ProgressBar::setForegroundColor( sal_Int32 nColor ) throw( RuntimeException ) { // Ready for multithreading - MutexGuard aGuard (m_aMutex) ; + MutexGuard aGuard (m_aMutex) ; // Safe color for later use. m_nForegroundColor = nColor ; @@ -206,13 +206,13 @@ void SAL_CALL ProgressBar::setForegroundColor( sal_Int32 nColor ) throw( Runtime } //____________________________________________________________________________________________________________ -// XProgressBar +// XProgressBar //____________________________________________________________________________________________________________ void SAL_CALL ProgressBar::setBackgroundColor ( sal_Int32 nColor ) throw( RuntimeException ) { // Ready for multithreading - MutexGuard aGuard (m_aMutex) ; + MutexGuard aGuard (m_aMutex) ; // Safe color for later use. m_nBackgroundColor = nColor ; @@ -222,14 +222,14 @@ void SAL_CALL ProgressBar::setBackgroundColor ( sal_Int32 nColor ) throw( Runtim } //____________________________________________________________________________________________________________ -// XProgressBar +// XProgressBar //____________________________________________________________________________________________________________ void SAL_CALL ProgressBar::setValue ( sal_Int32 nValue ) throw( RuntimeException ) { // This method is defined for follow things: - // 1) Values >= _nMinRange - // 2) Values <= _nMaxRange + // 1) Values >= _nMinRange + // 2) Values <= _nMaxRange // Ready for multithreading MutexGuard aGuard (m_aMutex) ; @@ -253,15 +253,15 @@ void SAL_CALL ProgressBar::setValue ( sal_Int32 nValue ) throw( RuntimeException } //____________________________________________________________________________________________________________ -// XProgressBar +// XProgressBar //____________________________________________________________________________________________________________ void SAL_CALL ProgressBar::setRange ( sal_Int32 nMin, sal_Int32 nMax ) throw( RuntimeException ) { // This method is defined for follow things: - // 1) All values of sal_Int32 - // 2) Min < Max - // 3) Min > Max + // 1) All values of sal_Int32 + // 2) Min < Max + // 3) Min > Max // save impossible cases // This method is only defined for valid values @@ -269,20 +269,20 @@ void SAL_CALL ProgressBar::setRange ( sal_Int32 nMin, sal_Int32 nMax ) throw( Ru DBG_ASSERT ( ( nMin != nMax ) , "ProgressBar::setRange()\nValues for MIN and MAX are the same. This is not allowed!\n" ) ; // Ready for multithreading - MutexGuard aGuard (m_aMutex) ; + MutexGuard aGuard (m_aMutex) ; // control the values for min and max if ( nMin < nMax ) { // Take correct Min and Max - m_nMinRange = nMin ; - m_nMaxRange = nMax ; + m_nMinRange = nMin ; + m_nMaxRange = nMax ; } else { // Change Min and Max automaticly - m_nMinRange = nMax ; - m_nMaxRange = nMin ; + m_nMinRange = nMax ; + m_nMaxRange = nMin ; } // assure that m_nValue is within the range @@ -297,7 +297,7 @@ void SAL_CALL ProgressBar::setRange ( sal_Int32 nMin, sal_Int32 nMax ) throw( Ru } //____________________________________________________________________________________________________________ -// XProgressBar +// XProgressBar //____________________________________________________________________________________________________________ sal_Int32 SAL_CALL ProgressBar::getValue () throw( RuntimeException ) @@ -309,7 +309,7 @@ sal_Int32 SAL_CALL ProgressBar::getValue () throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL ProgressBar::setPosSize ( @@ -327,17 +327,17 @@ void SAL_CALL ProgressBar::setPosSize ( // Do only, if size has changed. if ( - ( nWidth != aBasePosSize.Width ) || - ( nHeight != aBasePosSize.Height ) + ( nWidth != aBasePosSize.Width ) || + ( nHeight != aBasePosSize.Height ) ) { - impl_recalcRange ( ) ; - impl_paint ( 0, 0, impl_getGraphicsPeer () ) ; + impl_recalcRange ( ) ; + impl_paint ( 0, 0, impl_getGraphicsPeer () ) ; } } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ sal_Bool SAL_CALL ProgressBar::setModel( const Reference< XControlModel >& /*xModel*/ ) throw( RuntimeException ) @@ -347,7 +347,7 @@ sal_Bool SAL_CALL ProgressBar::setModel( const Reference< XControlModel >& /*xMo } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ Reference< XControlModel > SAL_CALL ProgressBar::getModel() throw( RuntimeException ) @@ -357,7 +357,7 @@ Reference< XControlModel > SAL_CALL ProgressBar::getModel() throw( RuntimeExcept } //____________________________________________________________________________________________________________ -// impl but public method to register service +// impl but public method to register service //____________________________________________________________________________________________________________ const Sequence< OUString > ProgressBar::impl_getStaticSupportedServiceNames() @@ -369,7 +369,7 @@ const Sequence< OUString > ProgressBar::impl_getStaticSupportedServiceNames() } //____________________________________________________________________________________________________________ -// impl but public method to register service +// impl but public method to register service //____________________________________________________________________________________________________________ const OUString ProgressBar::impl_getStaticImplementationName() @@ -378,7 +378,7 @@ const OUString ProgressBar::impl_getStaticImplementationName() } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ void ProgressBar::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGraphics > & rGraphics ) @@ -390,13 +390,13 @@ void ProgressBar::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGra // Every request paint the completely control. ( but only, if peer exist ) if ( rGraphics.is () ) { - MutexGuard aGuard (m_aMutex) ; + MutexGuard aGuard (m_aMutex) ; // Clear background // (same color for line and fill) - rGraphics->setFillColor ( m_nBackgroundColor ) ; - rGraphics->setLineColor ( m_nBackgroundColor ) ; - rGraphics->drawRect ( nX, nY, impl_getWidth(), impl_getHeight() ) ; + rGraphics->setFillColor ( m_nBackgroundColor ) ; + rGraphics->setLineColor ( m_nBackgroundColor ) ; + rGraphics->drawRect ( nX, nY, impl_getWidth(), impl_getHeight() ) ; // same color for line and fill for blocks rGraphics->setFillColor ( m_nForegroundColor ) ; @@ -410,16 +410,16 @@ void ProgressBar::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGra if (m_bHorizontal) { // Step to left side of window - nBlockStart = nX ; + nBlockStart = nX ; for ( sal_Int16 i=1; i<=nBlockCount; ++i ) { // step free field - nBlockStart += PROGRESSBAR_FREESPACE ; + nBlockStart += PROGRESSBAR_FREESPACE ; // paint block rGraphics->drawRect (nBlockStart, nY+PROGRESSBAR_FREESPACE, m_aBlockSize.Width, m_aBlockSize.Height) ; // step next free field - nBlockStart += m_aBlockSize.Width ; + nBlockStart += m_aBlockSize.Width ; } } // draw vertikal progressbar @@ -427,38 +427,38 @@ void ProgressBar::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGra else { // step to bottom side of window - nBlockStart = nY+impl_getHeight() ; - nBlockStart -= m_aBlockSize.Height ; + nBlockStart = nY+impl_getHeight() ; + nBlockStart -= m_aBlockSize.Height ; for ( sal_Int16 i=1; i<=nBlockCount; ++i ) { // step free field - nBlockStart -= PROGRESSBAR_FREESPACE ; + nBlockStart -= PROGRESSBAR_FREESPACE ; // paint block rGraphics->drawRect (nX+PROGRESSBAR_FREESPACE, nBlockStart, m_aBlockSize.Width, m_aBlockSize.Height) ; // step next free field - nBlockStart -= m_aBlockSize.Height; + nBlockStart -= m_aBlockSize.Height; } } // Paint shadow border around the progressbar - rGraphics->setLineColor ( PROGRESSBAR_LINECOLOR_SHADOW ) ; - rGraphics->drawLine ( nX, nY, impl_getWidth(), nY ) ; - rGraphics->drawLine ( nX, nY, nX , impl_getHeight() ) ; + rGraphics->setLineColor ( PROGRESSBAR_LINECOLOR_SHADOW ) ; + rGraphics->drawLine ( nX, nY, impl_getWidth(), nY ) ; + rGraphics->drawLine ( nX, nY, nX , impl_getHeight() ) ; - rGraphics->setLineColor ( PROGRESSBAR_LINECOLOR_BRIGHT ) ; - rGraphics->drawLine ( impl_getWidth()-1, impl_getHeight()-1, impl_getWidth()-1, nY ) ; - rGraphics->drawLine ( impl_getWidth()-1, impl_getHeight()-1, nX , impl_getHeight()-1 ) ; + rGraphics->setLineColor ( PROGRESSBAR_LINECOLOR_BRIGHT ) ; + rGraphics->drawLine ( impl_getWidth()-1, impl_getHeight()-1, impl_getWidth()-1, nY ) ; + rGraphics->drawLine ( impl_getWidth()-1, impl_getHeight()-1, nX , impl_getHeight()-1 ) ; } } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ void ProgressBar::impl_recalcRange () { - MutexGuard aGuard (m_aMutex) ; + MutexGuard aGuard (m_aMutex) ; sal_Int32 nWindowWidth = impl_getWidth() ; sal_Int32 nWindowHeight = impl_getHeight() ; @@ -489,6 +489,6 @@ void ProgressBar::impl_recalcRange () m_aBlockSize.Width = (sal_Int32)fBlockWidth ; } -} // namespace unocontrols +} // namespace unocontrols /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index bf6dc153a933..cd90d00dadaf 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -27,13 +27,13 @@ ************************************************************************/ //____________________________________________________________________________________________________________ -// my own includes +// my own includes //____________________________________________________________________________________________________________ #include "progressmonitor.hxx" //____________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //____________________________________________________________________________________________________________ #include <com/sun/star/awt/GradientStyle.hpp> #include <com/sun/star/awt/RasterOperation.hpp> @@ -45,49 +45,49 @@ #include <tools/solar.h> //____________________________________________________________________________________________________________ -// includes of my project +// includes of my project //____________________________________________________________________________________________________________ #include "progressbar.hxx" //____________________________________________________________________________________________________________ -// namespace +// namespace //____________________________________________________________________________________________________________ -using namespace ::cppu ; -using namespace ::osl ; -using namespace ::rtl ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::awt ; +using namespace ::cppu ; +using namespace ::osl ; +using namespace ::rtl ; +using namespace ::com::sun::star::uno ; +using namespace ::com::sun::star::lang ; +using namespace ::com::sun::star::awt ; namespace unocontrols{ //____________________________________________________________________________________________________________ -// construct/destruct +// construct/destruct //____________________________________________________________________________________________________________ ProgressMonitor::ProgressMonitor( const Reference< XMultiServiceFactory >& xFactory ) - : BaseContainerControl ( xFactory ) + : BaseContainerControl ( xFactory ) { // Its not allowed to work with member in this method (refcounter !!!) // But with a HACK (++refcount) its "OK" :-( ++m_refCount ; // Create instances for fixedtext, button and progress ... - m_xTopic_Top = Reference< XFixedText > ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_SERVICENAME ) ), UNO_QUERY ) ; - m_xText_Top = Reference< XFixedText > ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_SERVICENAME ) ), UNO_QUERY ) ; - m_xTopic_Bottom = Reference< XFixedText > ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_SERVICENAME ) ), UNO_QUERY ) ; - m_xText_Bottom = Reference< XFixedText > ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_SERVICENAME ) ), UNO_QUERY ) ; - m_xButton = Reference< XButton > ( xFactory->createInstance ( OUString::createFromAscii( BUTTON_SERVICENAME ) ), UNO_QUERY ) ; - m_xProgressBar = Reference< XProgressBar > ( xFactory->createInstance ( OUString::createFromAscii( SERVICENAME_PROGRESSBAR ) ), UNO_QUERY ) ; + m_xTopic_Top = Reference< XFixedText > ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_SERVICENAME ) ), UNO_QUERY ) ; + m_xText_Top = Reference< XFixedText > ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_SERVICENAME ) ), UNO_QUERY ) ; + m_xTopic_Bottom = Reference< XFixedText > ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_SERVICENAME ) ), UNO_QUERY ) ; + m_xText_Bottom = Reference< XFixedText > ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_SERVICENAME ) ), UNO_QUERY ) ; + m_xButton = Reference< XButton > ( xFactory->createInstance ( OUString::createFromAscii( BUTTON_SERVICENAME ) ), UNO_QUERY ) ; + m_xProgressBar = Reference< XProgressBar > ( xFactory->createInstance ( OUString::createFromAscii( SERVICENAME_PROGRESSBAR ) ), UNO_QUERY ) ; // ... cast controls to Reference< XControl > (for "setModel"!) ... - Reference< XControl > xRef_Topic_Top ( m_xTopic_Top , UNO_QUERY ) ; - Reference< XControl > xRef_Text_Top ( m_xText_Top , UNO_QUERY ) ; - Reference< XControl > xRef_Topic_Bottom ( m_xTopic_Bottom , UNO_QUERY ) ; - Reference< XControl > xRef_Text_Bottom ( m_xText_Bottom , UNO_QUERY ) ; - Reference< XControl > xRef_Button ( m_xButton , UNO_QUERY ) ; - Reference< XControl > xRef_ProgressBar ( m_xProgressBar , UNO_QUERY ) ; + Reference< XControl > xRef_Topic_Top ( m_xTopic_Top , UNO_QUERY ) ; + Reference< XControl > xRef_Text_Top ( m_xText_Top , UNO_QUERY ) ; + Reference< XControl > xRef_Topic_Bottom ( m_xTopic_Bottom , UNO_QUERY ) ; + Reference< XControl > xRef_Text_Bottom ( m_xText_Bottom , UNO_QUERY ) ; + Reference< XControl > xRef_Button ( m_xButton , UNO_QUERY ) ; + Reference< XControl > xRef_ProgressBar ( m_xProgressBar , UNO_QUERY ) ; // ... set models ... xRef_Topic_Top->setModel ( Reference< XControlModel > ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_MODELNAME ) ), UNO_QUERY ) ) ; @@ -98,12 +98,12 @@ ProgressMonitor::ProgressMonitor( const Reference< XMultiServiceFactory >& xFact // ProgressBar has no model !!! // ... and add controls to basecontainercontrol! - addControl ( OUString::createFromAscii( CONTROLNAME_TEXT ) , xRef_Topic_Top ) ; - addControl ( OUString::createFromAscii( CONTROLNAME_TEXT ) , xRef_Text_Top ) ; - addControl ( OUString::createFromAscii( CONTROLNAME_TEXT ) , xRef_Topic_Bottom ) ; - addControl ( OUString::createFromAscii( CONTROLNAME_TEXT ) , xRef_Text_Bottom ) ; - addControl ( OUString::createFromAscii( CONTROLNAME_BUTTON ) , xRef_Button ) ; - addControl ( OUString::createFromAscii( CONTROLNAME_PROGRESSBAR ) , xRef_ProgressBar ) ; + addControl ( OUString::createFromAscii( CONTROLNAME_TEXT ) , xRef_Topic_Top ) ; + addControl ( OUString::createFromAscii( CONTROLNAME_TEXT ) , xRef_Text_Top ) ; + addControl ( OUString::createFromAscii( CONTROLNAME_TEXT ) , xRef_Topic_Bottom ) ; + addControl ( OUString::createFromAscii( CONTROLNAME_TEXT ) , xRef_Text_Bottom ) ; + addControl ( OUString::createFromAscii( CONTROLNAME_BUTTON ) , xRef_Button ) ; + addControl ( OUString::createFromAscii( CONTROLNAME_PROGRESSBAR ) , xRef_ProgressBar ) ; // FixedText make it automaticly visible by himself ... but not the progressbar !!! // it must be set explicitly @@ -121,8 +121,8 @@ ProgressMonitor::ProgressMonitor( const Reference< XMultiServiceFactory >& xFact --m_refCount ; // Initialize info lists for fixedtext's - m_pTextlist_Top = new IMPL_Textlist ; - m_pTextlist_Bottom = new IMPL_Textlist ; + m_pTextlist_Top = new IMPL_Textlist ; + m_pTextlist_Bottom = new IMPL_Textlist ; } ProgressMonitor::~ProgressMonitor() @@ -131,13 +131,13 @@ ProgressMonitor::~ProgressMonitor() } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ Any SAL_CALL ProgressMonitor::queryInterface( const Type& rType ) throw( RuntimeException ) { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. Any aReturn ; Reference< XInterface > xDel = BaseContainerControl::impl_getDelegator(); if ( xDel.is() ) @@ -156,33 +156,33 @@ Any SAL_CALL ProgressMonitor::queryInterface( const Type& rType ) throw( Runtime } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ void SAL_CALL ProgressMonitor::acquire() throw() { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Forward to baseclass BaseControl::acquire(); } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ void SAL_CALL ProgressMonitor::release() throw() { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Forward to baseclass BaseControl::release(); } //____________________________________________________________________________________________________________ -// XTypeProvider +// XTypeProvider //____________________________________________________________________________________________________________ Sequence< Type > SAL_CALL ProgressMonitor::getTypes() throw( RuntimeException ) @@ -201,9 +201,9 @@ Sequence< Type > SAL_CALL ProgressMonitor::getTypes() throw( RuntimeException ) if ( pTypeCollection == NULL ) { // Create a static typecollection ... - static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XLayoutConstrains >*)NULL ) , - ::getCppuType(( const Reference< XButton >*)NULL ) , - ::getCppuType(( const Reference< XProgressMonitor >*)NULL ) , + static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XLayoutConstrains >*)NULL ) , + ::getCppuType(( const Reference< XButton >*)NULL ) , + ::getCppuType(( const Reference< XProgressMonitor >*)NULL ) , BaseContainerControl::getTypes() ); // ... and set his address to static pointer! @@ -215,14 +215,14 @@ Sequence< Type > SAL_CALL ProgressMonitor::getTypes() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XAggregation +// XAggregation //____________________________________________________________________________________________________________ Any SAL_CALL ProgressMonitor::queryAggregation( const Type& aType ) throw( RuntimeException ) { // Ask for my own supported interfaces ... // Attention: XTypeProvider and XInterface are supported by OComponentHelper! - Any aReturn ( ::cppu::queryInterface( aType , + Any aReturn ( ::cppu::queryInterface( aType , static_cast< XLayoutConstrains* > ( this ) , static_cast< XButton* > ( this ) , static_cast< XProgressMonitor* > ( this ) @@ -240,7 +240,7 @@ Any SAL_CALL ProgressMonitor::queryAggregation( const Type& aType ) throw( Runti } //____________________________________________________________________________________________________________ -// XProgressMonitor +// XProgressMonitor //____________________________________________________________________________________________________________ void SAL_CALL ProgressMonitor::addText( @@ -251,8 +251,8 @@ void SAL_CALL ProgressMonitor::addText( { // Safe impossible cases // Check valid call of this method. - DBG_ASSERT ( impl_debug_checkParameter ( rTopic, rText, bbeforeProgress ) , "ProgressMonitor::addText()\nCall without valid parameters!\n") ; - DBG_ASSERT ( !(impl_searchTopic ( rTopic, bbeforeProgress ) != NULL ) , "ProgresMonitor::addText()\nThe text already exist.\n" ) ; + DBG_ASSERT ( impl_debug_checkParameter ( rTopic, rText, bbeforeProgress ) , "ProgressMonitor::addText()\nCall without valid parameters!\n") ; + DBG_ASSERT ( !(impl_searchTopic ( rTopic, bbeforeProgress ) != NULL ) , "ProgresMonitor::addText()\nThe text already exist.\n" ) ; // Do nothing (in Release), if topic already exist. if ( impl_searchTopic ( rTopic, bbeforeProgress ) != NULL ) @@ -261,13 +261,13 @@ void SAL_CALL ProgressMonitor::addText( } // Else ... take memory for new item ... - IMPL_TextlistItem* pTextItem = new IMPL_TextlistItem ; + IMPL_TextlistItem* pTextItem = new IMPL_TextlistItem ; if ( pTextItem != NULL ) { // Set values ... - pTextItem->sTopic = rTopic ; - pTextItem->sText = rText ; + pTextItem->sTopic = rTopic ; + pTextItem->sText = rText ; // Ready for multithreading MutexGuard aGuard ( m_aMutex ) ; @@ -284,12 +284,12 @@ void SAL_CALL ProgressMonitor::addText( } // ... update window - impl_rebuildFixedText () ; - impl_recalcLayout () ; + impl_rebuildFixedText () ; + impl_recalcLayout () ; } //____________________________________________________________________________________________________________ -// XProgressMonitor +// XProgressMonitor //____________________________________________________________________________________________________________ void SAL_CALL ProgressMonitor::removeText ( const OUString& rTopic, sal_Bool bbeforeProgress ) throw( RuntimeException ) @@ -309,7 +309,7 @@ void SAL_CALL ProgressMonitor::removeText ( const OUString& rTopic, sal_Bool bbe // ... delete item from right list ... if ( bbeforeProgress == sal_True ) { - m_pTextlist_Top->Remove ( pSearchItem ) ; + m_pTextlist_Top->Remove ( pSearchItem ) ; } else { @@ -319,13 +319,13 @@ void SAL_CALL ProgressMonitor::removeText ( const OUString& rTopic, sal_Bool bbe delete pSearchItem ; // ... and update window. - impl_rebuildFixedText () ; - impl_recalcLayout () ; + impl_rebuildFixedText () ; + impl_recalcLayout () ; } } //____________________________________________________________________________________________________________ -// XProgressMonitor +// XProgressMonitor //____________________________________________________________________________________________________________ void SAL_CALL ProgressMonitor::updateText ( @@ -350,13 +350,13 @@ void SAL_CALL ProgressMonitor::updateText ( pSearchItem->sText = rText ; // ... and update window. - impl_rebuildFixedText () ; - impl_recalcLayout () ; + impl_rebuildFixedText () ; + impl_recalcLayout () ; } } //____________________________________________________________________________________________________________ -// XProgressBar +// XProgressBar //____________________________________________________________________________________________________________ void SAL_CALL ProgressMonitor::setForegroundColor ( sal_Int32 nColor ) throw( RuntimeException ) @@ -371,7 +371,7 @@ void SAL_CALL ProgressMonitor::setForegroundColor ( sal_Int32 nColor ) throw( Ru } //____________________________________________________________________________________________________________ -// XProgressBar +// XProgressBar //____________________________________________________________________________________________________________ void SAL_CALL ProgressMonitor::setBackgroundColor ( sal_Int32 nColor ) throw( RuntimeException ) @@ -386,7 +386,7 @@ void SAL_CALL ProgressMonitor::setBackgroundColor ( sal_Int32 nColor ) throw( Ru } //____________________________________________________________________________________________________________ -// XProgressBar +// XProgressBar //____________________________________________________________________________________________________________ void SAL_CALL ProgressMonitor::setValue ( sal_Int32 nValue ) throw( RuntimeException ) @@ -401,7 +401,7 @@ void SAL_CALL ProgressMonitor::setValue ( sal_Int32 nValue ) throw( RuntimeExcep } //____________________________________________________________________________________________________________ -// XProgressBar +// XProgressBar //____________________________________________________________________________________________________________ void SAL_CALL ProgressMonitor::setRange ( sal_Int32 nMin, sal_Int32 nMax ) throw( RuntimeException ) @@ -416,7 +416,7 @@ void SAL_CALL ProgressMonitor::setRange ( sal_Int32 nMin, sal_Int32 nMax ) throw } //____________________________________________________________________________________________________________ -// XProgressBar +// XProgressBar //____________________________________________________________________________________________________________ sal_Int32 SAL_CALL ProgressMonitor::getValue () throw( RuntimeException ) @@ -433,7 +433,7 @@ sal_Int32 SAL_CALL ProgressMonitor::getValue () throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XButton +// XButton //____________________________________________________________________________________________________________ void SAL_CALL ProgressMonitor::addActionListener ( const Reference< XActionListener > & rListener ) throw( RuntimeException ) @@ -448,7 +448,7 @@ void SAL_CALL ProgressMonitor::addActionListener ( const Reference< XActionListe } //____________________________________________________________________________________________________________ -// XButton +// XButton //____________________________________________________________________________________________________________ void SAL_CALL ProgressMonitor::removeActionListener ( const Reference< XActionListener > & rListener ) throw( RuntimeException ) @@ -463,7 +463,7 @@ void SAL_CALL ProgressMonitor::removeActionListener ( const Reference< XActionLi } //____________________________________________________________________________________________________________ -// XButton +// XButton //____________________________________________________________________________________________________________ void SAL_CALL ProgressMonitor::setLabel ( const OUString& rLabel ) throw( RuntimeException ) @@ -478,7 +478,7 @@ void SAL_CALL ProgressMonitor::setLabel ( const OUString& rLabel ) throw( Runtim } //____________________________________________________________________________________________________________ -// XButton +// XButton //____________________________________________________________________________________________________________ void SAL_CALL ProgressMonitor::setActionCommand ( const OUString& rCommand ) throw( RuntimeException ) @@ -493,7 +493,7 @@ void SAL_CALL ProgressMonitor::setActionCommand ( const OUString& rCommand ) thr } //____________________________________________________________________________________________________________ -// XLayoutConstrains +// XLayoutConstrains //____________________________________________________________________________________________________________ Size SAL_CALL ProgressMonitor::getMinimumSize () throw( RuntimeException ) @@ -502,7 +502,7 @@ Size SAL_CALL ProgressMonitor::getMinimumSize () throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XLayoutConstrains +// XLayoutConstrains //____________________________________________________________________________________________________________ Size SAL_CALL ProgressMonitor::getPreferredSize () throw( RuntimeException ) @@ -511,32 +511,32 @@ Size SAL_CALL ProgressMonitor::getPreferredSize () throw( RuntimeException ) ClearableMutexGuard aGuard ( m_aMutex ) ; // get information about required place of child controls - Reference< XLayoutConstrains > xTopicLayout_Top ( m_xTopic_Top , UNO_QUERY ) ; - Reference< XLayoutConstrains > xTopicLayout_Bottom ( m_xTopic_Bottom , UNO_QUERY ) ; - Reference< XLayoutConstrains > xButtonLayout ( m_xButton , UNO_QUERY ) ; - Reference< XWindow > xProgressBarWindow ( m_xProgressBar , UNO_QUERY ) ; + Reference< XLayoutConstrains > xTopicLayout_Top ( m_xTopic_Top , UNO_QUERY ) ; + Reference< XLayoutConstrains > xTopicLayout_Bottom ( m_xTopic_Bottom , UNO_QUERY ) ; + Reference< XLayoutConstrains > xButtonLayout ( m_xButton , UNO_QUERY ) ; + Reference< XWindow > xProgressBarWindow ( m_xProgressBar , UNO_QUERY ) ; - Size aTopicSize_Top = xTopicLayout_Top->getPreferredSize (); - Size aTopicSize_Bottom = xTopicLayout_Bottom->getPreferredSize (); - Size aButtonSize = xButtonLayout->getPreferredSize (); - Rectangle aTempRectangle = xProgressBarWindow->getPosSize (); - Size aProgressBarSize = Size( aTempRectangle.Width, aTempRectangle.Height ); + Size aTopicSize_Top = xTopicLayout_Top->getPreferredSize (); + Size aTopicSize_Bottom = xTopicLayout_Bottom->getPreferredSize (); + Size aButtonSize = xButtonLayout->getPreferredSize (); + Rectangle aTempRectangle = xProgressBarWindow->getPosSize (); + Size aProgressBarSize = Size( aTempRectangle.Width, aTempRectangle.Height ); aGuard.clear () ; // calc preferred size of progressmonitor - sal_Int32 nWidth = 0 ; - sal_Int32 nHeight = 0 ; + sal_Int32 nWidth = 0 ; + sal_Int32 nHeight = 0 ; - nWidth = 3 * PROGRESSMONITOR_FREEBORDER ; - nWidth += aProgressBarSize.Width ; + nWidth = 3 * PROGRESSMONITOR_FREEBORDER ; + nWidth += aProgressBarSize.Width ; - nHeight = 6 * PROGRESSMONITOR_FREEBORDER ; - nHeight += aTopicSize_Top.Height ; - nHeight += aProgressBarSize.Height ; - nHeight += aTopicSize_Bottom.Height; - nHeight += 2 ; // 1 for black line, 1 for white line = 3D-Line! - nHeight += aButtonSize.Height ; + nHeight = 6 * PROGRESSMONITOR_FREEBORDER ; + nHeight += aTopicSize_Top.Height ; + nHeight += aProgressBarSize.Height ; + nHeight += aTopicSize_Bottom.Height; + nHeight += 2 ; // 1 for black line, 1 for white line = 3D-Line! + nHeight += aButtonSize.Height ; // norm to minimum if ( nWidth < PROGRESSMONITOR_DEFAULT_WIDTH ) @@ -553,7 +553,7 @@ Size SAL_CALL ProgressMonitor::getPreferredSize () throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XLayoutConstrains +// XLayoutConstrains //____________________________________________________________________________________________________________ Size SAL_CALL ProgressMonitor::calcAdjustedSize ( const Size& /*rNewSize*/ ) throw( RuntimeException ) @@ -562,10 +562,10 @@ Size SAL_CALL ProgressMonitor::calcAdjustedSize ( const Size& /*rNewSize*/ ) thr } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ -void SAL_CALL ProgressMonitor::createPeer ( const Reference< XToolkit > & rToolkit, const Reference< XWindowPeer > & rParent ) throw( RuntimeException ) +void SAL_CALL ProgressMonitor::createPeer ( const Reference< XToolkit > & rToolkit, const Reference< XWindowPeer > & rParent ) throw( RuntimeException ) { if (!getPeer().is()) { @@ -580,7 +580,7 @@ void SAL_CALL ProgressMonitor::createPeer ( const Reference< XToolkit > & rToolk } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ sal_Bool SAL_CALL ProgressMonitor::setModel ( const Reference< XControlModel > & /*rModel*/ ) throw( RuntimeException ) @@ -590,7 +590,7 @@ sal_Bool SAL_CALL ProgressMonitor::setModel ( const Reference< XControlModel > & } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ Reference< XControlModel > SAL_CALL ProgressMonitor::getModel () throw( RuntimeException ) @@ -601,7 +601,7 @@ Reference< XControlModel > SAL_CALL ProgressMonitor::getModel () throw( RuntimeE } //____________________________________________________________________________________________________________ -// XComponent +// XComponent //____________________________________________________________________________________________________________ void SAL_CALL ProgressMonitor::dispose () throw( RuntimeException ) @@ -610,44 +610,44 @@ void SAL_CALL ProgressMonitor::dispose () throw( RuntimeException ) MutexGuard aGuard ( m_aMutex ) ; // "removeControl()" control the state of a reference - Reference< XControl > xRef_Topic_Top ( m_xTopic_Top , UNO_QUERY ) ; - Reference< XControl > xRef_Text_Top ( m_xText_Top , UNO_QUERY ) ; - Reference< XControl > xRef_Topic_Bottom ( m_xTopic_Bottom , UNO_QUERY ) ; - Reference< XControl > xRef_Text_Bottom ( m_xText_Bottom , UNO_QUERY ) ; - Reference< XControl > xRef_Button ( m_xButton , UNO_QUERY ) ; - Reference< XControl > xRef_ProgressBar ( m_xProgressBar , UNO_QUERY ) ; - - removeControl ( xRef_Topic_Top ) ; - removeControl ( xRef_Text_Top ) ; - removeControl ( xRef_Topic_Bottom ) ; - removeControl ( xRef_Text_Bottom ) ; - removeControl ( xRef_Button ) ; - removeControl ( xRef_ProgressBar ) ; + Reference< XControl > xRef_Topic_Top ( m_xTopic_Top , UNO_QUERY ) ; + Reference< XControl > xRef_Text_Top ( m_xText_Top , UNO_QUERY ) ; + Reference< XControl > xRef_Topic_Bottom ( m_xTopic_Bottom , UNO_QUERY ) ; + Reference< XControl > xRef_Text_Bottom ( m_xText_Bottom , UNO_QUERY ) ; + Reference< XControl > xRef_Button ( m_xButton , UNO_QUERY ) ; + Reference< XControl > xRef_ProgressBar ( m_xProgressBar , UNO_QUERY ) ; + + removeControl ( xRef_Topic_Top ) ; + removeControl ( xRef_Text_Top ) ; + removeControl ( xRef_Topic_Bottom ) ; + removeControl ( xRef_Text_Bottom ) ; + removeControl ( xRef_Button ) ; + removeControl ( xRef_ProgressBar ) ; // do'nt use "...->clear ()" or "... = XFixedText ()" // when other hold a reference at this object !!! - xRef_Topic_Top->dispose () ; - xRef_Text_Top->dispose () ; - xRef_Topic_Bottom->dispose () ; - xRef_Text_Bottom->dispose () ; - xRef_Button->dispose () ; - xRef_ProgressBar->dispose () ; + xRef_Topic_Top->dispose () ; + xRef_Text_Top->dispose () ; + xRef_Topic_Bottom->dispose () ; + xRef_Text_Bottom->dispose () ; + xRef_Button->dispose () ; + xRef_ProgressBar->dispose () ; BaseContainerControl::dispose () ; } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL ProgressMonitor::setPosSize ( sal_Int32 nX, sal_Int32 nY, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nFlags ) throw( RuntimeException ) { - Rectangle aBasePosSize = getPosSize () ; + Rectangle aBasePosSize = getPosSize () ; BaseContainerControl::setPosSize (nX, nY, nWidth, nHeight, nFlags) ; // if position or size changed if ( - ( nWidth != aBasePosSize.Width ) || + ( nWidth != aBasePosSize.Width ) || ( nHeight != aBasePosSize.Height) ) { @@ -662,7 +662,7 @@ void SAL_CALL ProgressMonitor::setPosSize ( sal_Int32 nX, sal_Int32 nY, sal_Int3 } //____________________________________________________________________________________________________________ -// impl but public method to register service +// impl but public method to register service //____________________________________________________________________________________________________________ const Sequence< OUString > ProgressMonitor::impl_getStaticSupportedServiceNames() @@ -674,7 +674,7 @@ const Sequence< OUString > ProgressMonitor::impl_getStaticSupportedServiceNames( } //____________________________________________________________________________________________________________ -// impl but public method to register service +// impl but public method to register service //____________________________________________________________________________________________________________ const OUString ProgressMonitor::impl_getStaticImplementationName() @@ -683,7 +683,7 @@ const OUString ProgressMonitor::impl_getStaticImplementationName() } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ void ProgressMonitor::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGraphics > & rGraphics ) @@ -694,146 +694,146 @@ void ProgressMonitor::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< MutexGuard aGuard ( m_aMutex ) ; // paint shadowed border around the progressmonitor - rGraphics->setLineColor ( PROGRESSMONITOR_LINECOLOR_SHADOW ) ; - rGraphics->drawLine ( impl_getWidth()-1, impl_getHeight()-1, impl_getWidth()-1, nY ) ; - rGraphics->drawLine ( impl_getWidth()-1, impl_getHeight()-1, nX , impl_getHeight()-1 ) ; + rGraphics->setLineColor ( PROGRESSMONITOR_LINECOLOR_SHADOW ) ; + rGraphics->drawLine ( impl_getWidth()-1, impl_getHeight()-1, impl_getWidth()-1, nY ) ; + rGraphics->drawLine ( impl_getWidth()-1, impl_getHeight()-1, nX , impl_getHeight()-1 ) ; - rGraphics->setLineColor ( PROGRESSMONITOR_LINECOLOR_BRIGHT ) ; - rGraphics->drawLine ( nX, nY, impl_getWidth(), nY ) ; - rGraphics->drawLine ( nX, nY, nX , impl_getHeight() ) ; + rGraphics->setLineColor ( PROGRESSMONITOR_LINECOLOR_BRIGHT ) ; + rGraphics->drawLine ( nX, nY, impl_getWidth(), nY ) ; + rGraphics->drawLine ( nX, nY, nX , impl_getHeight() ) ; // Paint 3D-line - rGraphics->setLineColor ( PROGRESSMONITOR_LINECOLOR_SHADOW ) ; - rGraphics->drawLine ( m_a3DLine.X, m_a3DLine.Y, m_a3DLine.X+m_a3DLine.Width, m_a3DLine.Y ) ; + rGraphics->setLineColor ( PROGRESSMONITOR_LINECOLOR_SHADOW ) ; + rGraphics->drawLine ( m_a3DLine.X, m_a3DLine.Y, m_a3DLine.X+m_a3DLine.Width, m_a3DLine.Y ) ; - rGraphics->setLineColor ( PROGRESSMONITOR_LINECOLOR_BRIGHT ) ; - rGraphics->drawLine ( m_a3DLine.X, m_a3DLine.Y+1, m_a3DLine.X+m_a3DLine.Width, m_a3DLine.Y+1 ) ; + rGraphics->setLineColor ( PROGRESSMONITOR_LINECOLOR_BRIGHT ) ; + rGraphics->drawLine ( m_a3DLine.X, m_a3DLine.Y+1, m_a3DLine.X+m_a3DLine.Width, m_a3DLine.Y+1 ) ; } } //____________________________________________________________________________________________________________ -// private method +// private method //____________________________________________________________________________________________________________ void ProgressMonitor::impl_recalcLayout () { - sal_Int32 nX_Button ; - sal_Int32 nY_Button ; - sal_Int32 nWidth_Button ; - sal_Int32 nHeight_Button ; - - sal_Int32 nX_ProgressBar ; - sal_Int32 nY_ProgressBar ; - sal_Int32 nWidth_ProgressBar ; - sal_Int32 nHeight_ProgressBar ; - - sal_Int32 nX_3DLine ; - sal_Int32 nY_3DLine ; - sal_Int32 nWidth_3DLine ; - sal_Int32 nHeight_3DLine ; - - sal_Int32 nX_Text_Top ; - sal_Int32 nY_Text_Top ; - sal_Int32 nWidth_Text_Top ; - sal_Int32 nHeight_Text_Top ; - - sal_Int32 nX_Topic_Top ; - sal_Int32 nY_Topic_Top ; - sal_Int32 nWidth_Topic_Top ; - sal_Int32 nHeight_Topic_Top ; - - sal_Int32 nX_Text_Bottom ; - sal_Int32 nY_Text_Bottom ; - sal_Int32 nWidth_Text_Bottom ; - sal_Int32 nHeight_Text_Bottom ; - - sal_Int32 nX_Topic_Bottom ; - sal_Int32 nY_Topic_Bottom ; - sal_Int32 nWidth_Topic_Bottom ; - sal_Int32 nHeight_Topic_Bottom ; + sal_Int32 nX_Button ; + sal_Int32 nY_Button ; + sal_Int32 nWidth_Button ; + sal_Int32 nHeight_Button ; + + sal_Int32 nX_ProgressBar ; + sal_Int32 nY_ProgressBar ; + sal_Int32 nWidth_ProgressBar ; + sal_Int32 nHeight_ProgressBar ; + + sal_Int32 nX_3DLine ; + sal_Int32 nY_3DLine ; + sal_Int32 nWidth_3DLine ; + sal_Int32 nHeight_3DLine ; + + sal_Int32 nX_Text_Top ; + sal_Int32 nY_Text_Top ; + sal_Int32 nWidth_Text_Top ; + sal_Int32 nHeight_Text_Top ; + + sal_Int32 nX_Topic_Top ; + sal_Int32 nY_Topic_Top ; + sal_Int32 nWidth_Topic_Top ; + sal_Int32 nHeight_Topic_Top ; + + sal_Int32 nX_Text_Bottom ; + sal_Int32 nY_Text_Bottom ; + sal_Int32 nWidth_Text_Bottom ; + sal_Int32 nHeight_Text_Bottom ; + + sal_Int32 nX_Topic_Bottom ; + sal_Int32 nY_Topic_Bottom ; + sal_Int32 nWidth_Topic_Bottom ; + sal_Int32 nHeight_Topic_Bottom ; // Ready for multithreading MutexGuard aGuard ( m_aMutex ) ; // get information about required place of child controls - Reference< XLayoutConstrains > xTopicLayout_Top ( m_xTopic_Top , UNO_QUERY ) ; - Reference< XLayoutConstrains > xTextLayout_Top ( m_xText_Top , UNO_QUERY ) ; - Reference< XLayoutConstrains > xTopicLayout_Bottom ( m_xTopic_Bottom , UNO_QUERY ) ; - Reference< XLayoutConstrains > xTextLayout_Bottom ( m_xText_Bottom , UNO_QUERY ) ; - Reference< XLayoutConstrains > xButtonLayout ( m_xButton , UNO_QUERY ) ; - - Size aTopicSize_Top = xTopicLayout_Top->getPreferredSize () ; - Size aTextSize_Top = xTextLayout_Top->getPreferredSize () ; - Size aTopicSize_Bottom = xTopicLayout_Bottom->getPreferredSize () ; - Size aTextSize_Bottom = xTextLayout_Bottom->getPreferredSize () ; - Size aButtonSize = xButtonLayout->getPreferredSize () ; + Reference< XLayoutConstrains > xTopicLayout_Top ( m_xTopic_Top , UNO_QUERY ) ; + Reference< XLayoutConstrains > xTextLayout_Top ( m_xText_Top , UNO_QUERY ) ; + Reference< XLayoutConstrains > xTopicLayout_Bottom ( m_xTopic_Bottom , UNO_QUERY ) ; + Reference< XLayoutConstrains > xTextLayout_Bottom ( m_xText_Bottom , UNO_QUERY ) ; + Reference< XLayoutConstrains > xButtonLayout ( m_xButton , UNO_QUERY ) ; + + Size aTopicSize_Top = xTopicLayout_Top->getPreferredSize () ; + Size aTextSize_Top = xTextLayout_Top->getPreferredSize () ; + Size aTopicSize_Bottom = xTopicLayout_Bottom->getPreferredSize () ; + Size aTextSize_Bottom = xTextLayout_Bottom->getPreferredSize () ; + Size aButtonSize = xButtonLayout->getPreferredSize () ; // calc position and size of child controls // Button has preferred size! - nWidth_Button = aButtonSize.Width ; - nHeight_Button = aButtonSize.Height ; + nWidth_Button = aButtonSize.Width ; + nHeight_Button = aButtonSize.Height ; // Left column before progressbar has preferred size and fixed position. // But "Width" is oriented on left column below progressbar to!!! "max(...)" - nX_Topic_Top = PROGRESSMONITOR_FREEBORDER ; - nY_Topic_Top = PROGRESSMONITOR_FREEBORDER ; - nWidth_Topic_Top = Max ( aTopicSize_Top.Width, aTopicSize_Bottom.Width ) ; - nHeight_Topic_Top = aTopicSize_Top.Height ; + nX_Topic_Top = PROGRESSMONITOR_FREEBORDER ; + nY_Topic_Top = PROGRESSMONITOR_FREEBORDER ; + nWidth_Topic_Top = Max ( aTopicSize_Top.Width, aTopicSize_Bottom.Width ) ; + nHeight_Topic_Top = aTopicSize_Top.Height ; // Right column before progressbar has relativ position to left column ... // ... and a size as rest of dialog size! - nX_Text_Top = nX_Topic_Top+nWidth_Topic_Top+PROGRESSMONITOR_FREEBORDER; - nY_Text_Top = nY_Topic_Top ; - nWidth_Text_Top = Max ( aTextSize_Top.Width, aTextSize_Bottom.Width ) ; + nX_Text_Top = nX_Topic_Top+nWidth_Topic_Top+PROGRESSMONITOR_FREEBORDER; + nY_Text_Top = nY_Topic_Top ; + nWidth_Text_Top = Max ( aTextSize_Top.Width, aTextSize_Bottom.Width ) ; // Fix size of this column to minimum! sal_Int32 nSummaryWidth = nWidth_Text_Top+nWidth_Topic_Top+(3*PROGRESSMONITOR_FREEBORDER) ; if ( nSummaryWidth < PROGRESSMONITOR_DEFAULT_WIDTH ) - nWidth_Text_Top = PROGRESSMONITOR_DEFAULT_WIDTH-nWidth_Topic_Top-(3*PROGRESSMONITOR_FREEBORDER); + nWidth_Text_Top = PROGRESSMONITOR_DEFAULT_WIDTH-nWidth_Topic_Top-(3*PROGRESSMONITOR_FREEBORDER); // Fix size of column to maximum! if ( nSummaryWidth > impl_getWidth() ) - nWidth_Text_Top = impl_getWidth()-nWidth_Topic_Top-(3*PROGRESSMONITOR_FREEBORDER) ; - nHeight_Text_Top = nHeight_Topic_Top ; + nWidth_Text_Top = impl_getWidth()-nWidth_Topic_Top-(3*PROGRESSMONITOR_FREEBORDER) ; + nHeight_Text_Top = nHeight_Topic_Top ; // Position of progressbar is relativ to columns before. // Progressbar.Width = Dialog.Width !!! // Progressbar.Height = Button.Height - nX_ProgressBar = nX_Topic_Top ; - nY_ProgressBar = nY_Topic_Top+nHeight_Topic_Top+PROGRESSMONITOR_FREEBORDER ; - nWidth_ProgressBar = PROGRESSMONITOR_FREEBORDER+nWidth_Topic_Top+nWidth_Text_Top ; - nHeight_ProgressBar = nHeight_Button ; + nX_ProgressBar = nX_Topic_Top ; + nY_ProgressBar = nY_Topic_Top+nHeight_Topic_Top+PROGRESSMONITOR_FREEBORDER ; + nWidth_ProgressBar = PROGRESSMONITOR_FREEBORDER+nWidth_Topic_Top+nWidth_Text_Top ; + nHeight_ProgressBar = nHeight_Button ; // Oriented by left column before progressbar. - nX_Topic_Bottom = nX_Topic_Top ; - nY_Topic_Bottom = nY_ProgressBar+nHeight_ProgressBar+PROGRESSMONITOR_FREEBORDER ; - nWidth_Topic_Bottom = nWidth_Topic_Top ; - nHeight_Topic_Bottom = aTopicSize_Bottom.Height ; + nX_Topic_Bottom = nX_Topic_Top ; + nY_Topic_Bottom = nY_ProgressBar+nHeight_ProgressBar+PROGRESSMONITOR_FREEBORDER ; + nWidth_Topic_Bottom = nWidth_Topic_Top ; + nHeight_Topic_Bottom = aTopicSize_Bottom.Height ; // Oriented by right column before progressbar. - nX_Text_Bottom = nX_Topic_Bottom+nWidth_Topic_Bottom+PROGRESSMONITOR_FREEBORDER ; - nY_Text_Bottom = nY_Topic_Bottom ; - nWidth_Text_Bottom = nWidth_Text_Top ; - nHeight_Text_Bottom = nHeight_Topic_Bottom ; + nX_Text_Bottom = nX_Topic_Bottom+nWidth_Topic_Bottom+PROGRESSMONITOR_FREEBORDER ; + nY_Text_Bottom = nY_Topic_Bottom ; + nWidth_Text_Bottom = nWidth_Text_Top ; + nHeight_Text_Bottom = nHeight_Topic_Bottom ; // Oriented by progressbar. - nX_3DLine = nX_Topic_Top ; - nY_3DLine = nY_Topic_Bottom+nHeight_Topic_Bottom+(PROGRESSMONITOR_FREEBORDER/2) ; - nWidth_3DLine = nWidth_ProgressBar ; - nHeight_3DLine = 1 ; // Height for ONE line ! (But we paint two lines!) + nX_3DLine = nX_Topic_Top ; + nY_3DLine = nY_Topic_Bottom+nHeight_Topic_Bottom+(PROGRESSMONITOR_FREEBORDER/2) ; + nWidth_3DLine = nWidth_ProgressBar ; + nHeight_3DLine = 1 ; // Height for ONE line ! (But we paint two lines!) // Oriented by progressbar. - nX_Button = nX_ProgressBar+nWidth_ProgressBar-nWidth_Button ; - nY_Button = nY_Topic_Bottom+nHeight_Topic_Bottom+PROGRESSMONITOR_FREEBORDER ; + nX_Button = nX_ProgressBar+nWidth_ProgressBar-nWidth_Button ; + nY_Button = nY_Topic_Bottom+nHeight_Topic_Bottom+PROGRESSMONITOR_FREEBORDER ; // Calc offsets to center controls - sal_Int32 nDx ; - sal_Int32 nDy ; + sal_Int32 nDx ; + sal_Int32 nDy ; - nDx = ( (2*PROGRESSMONITOR_FREEBORDER)+nWidth_ProgressBar ) ; - nDy = ( (6*PROGRESSMONITOR_FREEBORDER)+nHeight_Topic_Top+nHeight_ProgressBar+nHeight_Topic_Bottom+2+nHeight_Button ) ; + nDx = ( (2*PROGRESSMONITOR_FREEBORDER)+nWidth_ProgressBar ) ; + nDy = ( (6*PROGRESSMONITOR_FREEBORDER)+nHeight_Topic_Top+nHeight_ProgressBar+nHeight_Topic_Bottom+2+nHeight_Button ) ; // At this point use original dialog size to center controls! - nDx = (impl_getWidth ()/2)-(nDx/2) ; - nDy = (impl_getHeight()/2)-(nDy/2) ; + nDx = (impl_getWidth ()/2)-(nDx/2) ; + nDy = (impl_getHeight()/2)-(nDy/2) ; if ( nDx<0 ) { @@ -845,12 +845,12 @@ void ProgressMonitor::impl_recalcLayout () } // Set new position and size on all controls - Reference< XWindow > xRef_Topic_Top ( m_xTopic_Top , UNO_QUERY ) ; - Reference< XWindow > xRef_Text_Top ( m_xText_Top , UNO_QUERY ) ; - Reference< XWindow > xRef_Topic_Bottom ( m_xTopic_Bottom , UNO_QUERY ) ; - Reference< XWindow > xRef_Text_Bottom ( m_xText_Bottom , UNO_QUERY ) ; - Reference< XWindow > xRef_Button ( m_xButton , UNO_QUERY ) ; - Reference< XWindow > xRef_ProgressBar ( m_xProgressBar , UNO_QUERY ) ; + Reference< XWindow > xRef_Topic_Top ( m_xTopic_Top , UNO_QUERY ) ; + Reference< XWindow > xRef_Text_Top ( m_xText_Top , UNO_QUERY ) ; + Reference< XWindow > xRef_Topic_Bottom ( m_xTopic_Bottom , UNO_QUERY ) ; + Reference< XWindow > xRef_Text_Bottom ( m_xText_Bottom , UNO_QUERY ) ; + Reference< XWindow > xRef_Button ( m_xButton , UNO_QUERY ) ; + Reference< XWindow > xRef_ProgressBar ( m_xProgressBar , UNO_QUERY ) ; xRef_Topic_Top->setPosSize ( nDx+nX_Topic_Top , nDy+nY_Topic_Top , nWidth_Topic_Top , nHeight_Topic_Top , 15 ) ; xRef_Text_Top->setPosSize ( nDx+nX_Text_Top , nDy+nY_Text_Top , nWidth_Text_Top , nHeight_Text_Top , 15 ) ; @@ -859,24 +859,24 @@ void ProgressMonitor::impl_recalcLayout () xRef_Button->setPosSize ( nDx+nX_Button , nDy+nY_Button , nWidth_Button , nHeight_Button , 15 ) ; xRef_ProgressBar->setPosSize ( nDx+nX_ProgressBar , nDy+nY_ProgressBar , nWidth_ProgressBar , nHeight_ProgressBar , 15 ) ; - m_a3DLine.X = nDx+nX_Topic_Top ; - m_a3DLine.Y = nDy+nY_Topic_Bottom+nHeight_Topic_Bottom+(PROGRESSMONITOR_FREEBORDER/2) ; - m_a3DLine.Width = nWidth_ProgressBar ; - m_a3DLine.Height = nHeight_ProgressBar ; + m_a3DLine.X = nDx+nX_Topic_Top ; + m_a3DLine.Y = nDy+nY_Topic_Bottom+nHeight_Topic_Bottom+(PROGRESSMONITOR_FREEBORDER/2) ; + m_a3DLine.Width = nWidth_ProgressBar ; + m_a3DLine.Height = nHeight_ProgressBar ; // All childcontrols make an implicit repaint in setPosSize()! // Make it also for this 3D-line ... Reference< XGraphics > xGraphics = impl_getGraphicsPeer () ; - xGraphics->setLineColor ( PROGRESSMONITOR_LINECOLOR_SHADOW ) ; - xGraphics->drawLine ( m_a3DLine.X, m_a3DLine.Y, m_a3DLine.X+m_a3DLine.Width, m_a3DLine.Y ) ; + xGraphics->setLineColor ( PROGRESSMONITOR_LINECOLOR_SHADOW ) ; + xGraphics->drawLine ( m_a3DLine.X, m_a3DLine.Y, m_a3DLine.X+m_a3DLine.Width, m_a3DLine.Y ) ; - xGraphics->setLineColor ( PROGRESSMONITOR_LINECOLOR_BRIGHT ) ; - xGraphics->drawLine ( m_a3DLine.X, m_a3DLine.Y+1, m_a3DLine.X+m_a3DLine.Width, m_a3DLine.Y+1 ) ; + xGraphics->setLineColor ( PROGRESSMONITOR_LINECOLOR_BRIGHT ) ; + xGraphics->drawLine ( m_a3DLine.X, m_a3DLine.Y+1, m_a3DLine.X+m_a3DLine.Width, m_a3DLine.Y+1 ) ; } //____________________________________________________________________________________________________________ -// private method +// private method //____________________________________________________________________________________________________________ void ProgressMonitor::impl_rebuildFixedText () @@ -889,17 +889,17 @@ void ProgressMonitor::impl_rebuildFixedText () // Rebuild left site of text if (m_xTopic_Top.is()) { - OUString aCollectString ; + OUString aCollectString ; // Collect all topics from list and format text. // "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!! for ( sal_uInt32 n=0; n<m_pTextlist_Top->Count(); ++n ) { IMPL_TextlistItem* pSearchItem = m_pTextlist_Top->GetObject (n) ; - aCollectString += pSearchItem->sTopic ; - aCollectString += OUString::createFromAscii("\n") ; + aCollectString += pSearchItem->sTopic ; + aCollectString += OUString::createFromAscii("\n") ; } - aCollectString += OUString::createFromAscii("\0") ; // It's better :-) + aCollectString += OUString::createFromAscii("\0") ; // It's better :-) m_xTopic_Top->setText ( aCollectString ) ; } @@ -907,17 +907,17 @@ void ProgressMonitor::impl_rebuildFixedText () // Rebuild right site of text if (m_xText_Top.is()) { - OUString aCollectString ; + OUString aCollectString ; // Collect all topics from list and format text. // "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!! for ( sal_uInt32 n=0; n<m_pTextlist_Top->Count(); ++n ) { IMPL_TextlistItem* pSearchItem = m_pTextlist_Top->GetObject (n) ; - aCollectString += pSearchItem->sText ; - aCollectString += OUString::createFromAscii("\n") ; + aCollectString += pSearchItem->sText ; + aCollectString += OUString::createFromAscii("\n") ; } - aCollectString += OUString::createFromAscii("\0") ; // It's better :-) + aCollectString += OUString::createFromAscii("\0") ; // It's better :-) m_xText_Top->setText ( aCollectString ) ; } @@ -927,17 +927,17 @@ void ProgressMonitor::impl_rebuildFixedText () // Rebuild left site of text if (m_xTopic_Bottom.is()) { - OUString aCollectString ; + OUString aCollectString ; // Collect all topics from list and format text. // "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!! for ( sal_uInt32 n=0; n<m_pTextlist_Bottom->Count(); ++n ) { IMPL_TextlistItem* pSearchItem = m_pTextlist_Bottom->GetObject (n) ; - aCollectString += pSearchItem->sTopic ; - aCollectString += OUString::createFromAscii("\n") ; + aCollectString += pSearchItem->sTopic ; + aCollectString += OUString::createFromAscii("\n") ; } - aCollectString += OUString::createFromAscii("\0") ; // It's better :-) + aCollectString += OUString::createFromAscii("\0") ; // It's better :-) m_xTopic_Bottom->setText ( aCollectString ) ; } @@ -945,24 +945,24 @@ void ProgressMonitor::impl_rebuildFixedText () // Rebuild right site of text if (m_xText_Bottom.is()) { - OUString aCollectString ; + OUString aCollectString ; // Collect all topics from list and format text. // "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!! for ( sal_uInt32 n=0; n<m_pTextlist_Bottom->Count(); ++n ) { IMPL_TextlistItem* pSearchItem = m_pTextlist_Bottom->GetObject (n) ; - aCollectString += pSearchItem->sText ; - aCollectString += OUString::createFromAscii("\n") ; + aCollectString += pSearchItem->sText ; + aCollectString += OUString::createFromAscii("\n") ; } - aCollectString += OUString::createFromAscii("\0") ; // It's better :-) + aCollectString += OUString::createFromAscii("\0") ; // It's better :-) m_xText_Bottom->setText ( aCollectString ) ; } } //____________________________________________________________________________________________________________ -// private method +// private method //____________________________________________________________________________________________________________ void ProgressMonitor::impl_cleanMemory () @@ -992,10 +992,10 @@ void ProgressMonitor::impl_cleanMemory () } //____________________________________________________________________________________________________________ -// private method +// private method //____________________________________________________________________________________________________________ -IMPL_TextlistItem* ProgressMonitor::impl_searchTopic ( const OUString& rTopic, sal_Bool bbeforeProgress ) +IMPL_TextlistItem* ProgressMonitor::impl_searchTopic ( const OUString& rTopic, sal_Bool bbeforeProgress ) { // Get right textlist for following operations. IMPL_Textlist* pTextList ; @@ -1016,8 +1016,8 @@ IMPL_TextlistItem* ProgressMonitor::impl_searchTopic ( const OUString& rTopic, s aGuard.clear () ; // Search the topic in textlist. - sal_uInt32 nPosition = 0 ; - sal_uInt32 nCount = pTextList->Count () ; + sal_uInt32 nPosition = 0 ; + sal_uInt32 nCount = pTextList->Count () ; for ( nPosition = 0; nPosition < nCount ; ++nPosition ) { @@ -1035,7 +1035,7 @@ IMPL_TextlistItem* ProgressMonitor::impl_searchTopic ( const OUString& rTopic, s } //____________________________________________________________________________________________________________ -// debug methods +// debug methods //____________________________________________________________________________________________________________ #ifdef DBG_UTIL @@ -1047,12 +1047,12 @@ sal_Bool ProgressMonitor::impl_debug_checkParameter ( sal_Bool /*bbeforeProgress*/ ) { // Check "rTopic" - if ( &rTopic == NULL ) return sal_False ; // NULL-pointer for reference ???!!! - if ( rTopic.getLength () < 1 ) return sal_False ; // "" + if ( &rTopic == NULL ) return sal_False ; // NULL-pointer for reference ???!!! + if ( rTopic.getLength () < 1 ) return sal_False ; // "" // Check "rText" - if ( &rText == NULL ) return sal_False ; // NULL-pointer for reference ???!!! - if ( rText.getLength () < 1 ) return sal_False ; // "" + if ( &rText == NULL ) return sal_False ; // NULL-pointer for reference ???!!! + if ( rText.getLength () < 1 ) return sal_False ; // "" // "bbeforeProgress" is valid in everyway! @@ -1064,8 +1064,8 @@ sal_Bool ProgressMonitor::impl_debug_checkParameter ( sal_Bool ProgressMonitor::impl_debug_checkParameter ( const OUString& rTopic, sal_Bool /*bbeforeProgress*/ ) { // Check "rTopic" - if ( &rTopic == NULL ) return sal_False ; // NULL-pointer for reference ???!!! - if ( rTopic.getLength () < 1 ) return sal_False ; // "" + if ( &rTopic == NULL ) return sal_False ; // NULL-pointer for reference ???!!! + if ( rTopic.getLength () < 1 ) return sal_False ; // "" // "bbeforeProgress" is valid in everyway! @@ -1073,8 +1073,8 @@ sal_Bool ProgressMonitor::impl_debug_checkParameter ( const OUString& rTopic, sa return sal_True ; } -#endif // #ifdef DBG_UTIL +#endif // #ifdef DBG_UTIL -} // namespace unocontrols +} // namespace unocontrols /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx index 70b195931c18..36d8afa2e4f6 100644 --- a/UnoControls/source/controls/statusindicator.cxx +++ b/UnoControls/source/controls/statusindicator.cxx @@ -27,13 +27,13 @@ ************************************************************************/ //____________________________________________________________________________________________________________ -// my own includes +// my own includes //____________________________________________________________________________________________________________ #include "statusindicator.hxx" //____________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //____________________________________________________________________________________________________________ #include <com/sun/star/awt/InvalidateStyle.hpp> #include <com/sun/star/awt/WindowAttribute.hpp> @@ -41,46 +41,46 @@ #include <tools/debug.hxx> //____________________________________________________________________________________________________________ -// includes of my project +// includes of my project //____________________________________________________________________________________________________________ #include "progressbar.hxx" //____________________________________________________________________________________________________________ -// namespace +// namespace //____________________________________________________________________________________________________________ -using namespace ::cppu ; -using namespace ::osl ; -using namespace ::rtl ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::awt ; -using namespace ::com::sun::star::task ; +using namespace ::cppu ; +using namespace ::osl ; +using namespace ::rtl ; +using namespace ::com::sun::star::uno ; +using namespace ::com::sun::star::lang ; +using namespace ::com::sun::star::awt ; +using namespace ::com::sun::star::task ; namespace unocontrols{ //____________________________________________________________________________________________________________ -// construct/destruct +// construct/destruct //____________________________________________________________________________________________________________ StatusIndicator::StatusIndicator( const Reference< XMultiServiceFactory >& xFactory ) - : BaseContainerControl ( xFactory ) + : BaseContainerControl ( xFactory ) { // Its not allowed to work with member in this method (refcounter !!!) // But with a HACK (++refcount) its "OK" :-( ++m_refCount ; // Create instances for fixedtext and progress ... - m_xText = Reference< XFixedText > ( xFactory->createInstance( OUString::createFromAscii( FIXEDTEXT_SERVICENAME ) ), UNO_QUERY ); - m_xProgressBar = Reference< XProgressBar > ( xFactory->createInstance( OUString::createFromAscii( SERVICENAME_PROGRESSBAR ) ), UNO_QUERY ); + m_xText = Reference< XFixedText > ( xFactory->createInstance( OUString::createFromAscii( FIXEDTEXT_SERVICENAME ) ), UNO_QUERY ); + m_xProgressBar = Reference< XProgressBar > ( xFactory->createInstance( OUString::createFromAscii( SERVICENAME_PROGRESSBAR ) ), UNO_QUERY ); // ... cast controls to Reference< XControl > and set model ... // ( ProgressBar has no model !!! ) - Reference< XControl > xTextControl ( m_xText , UNO_QUERY ); - Reference< XControl > xProgressControl ( m_xProgressBar, UNO_QUERY ); + Reference< XControl > xTextControl ( m_xText , UNO_QUERY ); + Reference< XControl > xProgressControl ( m_xProgressBar, UNO_QUERY ); xTextControl->setModel( Reference< XControlModel >( xFactory->createInstance( OUString::createFromAscii( FIXEDTEXT_MODELNAME ) ), UNO_QUERY ) ); // ... and add controls to basecontainercontrol! - addControl( OUString::createFromAscii( CONTROLNAME_TEXT ), xTextControl ); - addControl( OUString::createFromAscii( CONTROLNAME_PROGRESSBAR ), xProgressControl ); + addControl( OUString::createFromAscii( CONTROLNAME_TEXT ), xTextControl ); + addControl( OUString::createFromAscii( CONTROLNAME_PROGRESSBAR ), xProgressControl ); // FixedText make it automaticly visible by himself ... but not the progressbar !!! // it must be set explicitly Reference< XWindow > xProgressWindow( m_xProgressBar, UNO_QUERY ); @@ -95,18 +95,18 @@ StatusIndicator::StatusIndicator( const Reference< XMultiServiceFactory >& xFact StatusIndicator::~StatusIndicator() { // Release all references - m_xText = Reference< XFixedText >(); - m_xProgressBar = Reference< XProgressBar >(); + m_xText = Reference< XFixedText >(); + m_xProgressBar = Reference< XProgressBar >(); } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ Any SAL_CALL StatusIndicator::queryInterface( const Type& rType ) throw( RuntimeException ) { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. Any aReturn ; Reference< XInterface > xDel = BaseContainerControl::impl_getDelegator(); if ( xDel.is() ) @@ -125,33 +125,33 @@ Any SAL_CALL StatusIndicator::queryInterface( const Type& rType ) throw( Runtime } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ void SAL_CALL StatusIndicator::acquire() throw() { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Forward to baseclass BaseControl::acquire(); } //____________________________________________________________________________________________________________ -// XInterface +// XInterface //____________________________________________________________________________________________________________ void SAL_CALL StatusIndicator::release() throw() { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. // Forward to baseclass BaseControl::release(); } //____________________________________________________________________________________________________________ -// XTypeProvider +// XTypeProvider //____________________________________________________________________________________________________________ Sequence< Type > SAL_CALL StatusIndicator::getTypes() throw( RuntimeException ) @@ -170,8 +170,8 @@ Sequence< Type > SAL_CALL StatusIndicator::getTypes() throw( RuntimeException ) if ( pTypeCollection == NULL ) { // Create a static typecollection ... - static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XLayoutConstrains >*)NULL ) , - ::getCppuType(( const Reference< XStatusIndicator >*)NULL ) , + static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XLayoutConstrains >*)NULL ) , + ::getCppuType(( const Reference< XStatusIndicator >*)NULL ) , BaseContainerControl::getTypes() ); // ... and set his address to static pointer! @@ -183,16 +183,16 @@ Sequence< Type > SAL_CALL StatusIndicator::getTypes() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XAggregation +// XAggregation //____________________________________________________________________________________________________________ Any SAL_CALL StatusIndicator::queryAggregation( const Type& aType ) throw( RuntimeException ) { // Ask for my own supported interfaces ... // Attention: XTypeProvider and XInterface are supported by OComponentHelper! - Any aReturn ( ::cppu::queryInterface( aType , - static_cast< XLayoutConstrains* > ( this ) , - static_cast< XStatusIndicator* > ( this ) + Any aReturn ( ::cppu::queryInterface( aType , + static_cast< XLayoutConstrains* > ( this ) , + static_cast< XStatusIndicator* > ( this ) ) ); @@ -207,7 +207,7 @@ Any SAL_CALL StatusIndicator::queryAggregation( const Type& aType ) throw( Runti } //____________________________________________________________________________________________________________ -// XStatusIndicator +// XStatusIndicator //____________________________________________________________________________________________________________ void SAL_CALL StatusIndicator::start( const OUString& sText, sal_Int32 nRange ) throw( RuntimeException ) @@ -223,7 +223,7 @@ void SAL_CALL StatusIndicator::start( const OUString& sText, sal_Int32 nRange ) } //____________________________________________________________________________________________________________ -// XStatusIndicator +// XStatusIndicator //____________________________________________________________________________________________________________ void SAL_CALL StatusIndicator::end() throw( RuntimeException ) @@ -238,7 +238,7 @@ void SAL_CALL StatusIndicator::end() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XStatusIndicator +// XStatusIndicator //____________________________________________________________________________________________________________ void SAL_CALL StatusIndicator::setText( const OUString& sText ) throw( RuntimeException ) @@ -251,7 +251,7 @@ void SAL_CALL StatusIndicator::setText( const OUString& sText ) throw( RuntimeEx } //____________________________________________________________________________________________________________ -// XStatusIndicator +// XStatusIndicator //____________________________________________________________________________________________________________ void SAL_CALL StatusIndicator::setValue( sal_Int32 nValue ) throw( RuntimeException ) @@ -264,7 +264,7 @@ void SAL_CALL StatusIndicator::setValue( sal_Int32 nValue ) throw( RuntimeExcept } //____________________________________________________________________________________________________________ -// XStatusIndicator +// XStatusIndicator //____________________________________________________________________________________________________________ void SAL_CALL StatusIndicator::reset() throw( RuntimeException ) @@ -279,7 +279,7 @@ void SAL_CALL StatusIndicator::reset() throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XLayoutConstrains +// XLayoutConstrains //____________________________________________________________________________________________________________ Size SAL_CALL StatusIndicator::getMinimumSize () throw( RuntimeException ) @@ -288,7 +288,7 @@ Size SAL_CALL StatusIndicator::getMinimumSize () throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XLayoutConstrains +// XLayoutConstrains //____________________________________________________________________________________________________________ Size SAL_CALL StatusIndicator::getPreferredSize () throw( RuntimeException ) @@ -297,8 +297,8 @@ Size SAL_CALL StatusIndicator::getPreferredSize () throw( RuntimeException ) ClearableMutexGuard aGuard ( m_aMutex ) ; // get information about required place of child controls - Reference< XLayoutConstrains > xTextLayout ( m_xText, UNO_QUERY ); - Size aTextSize = xTextLayout->getPreferredSize(); + Reference< XLayoutConstrains > xTextLayout ( m_xText, UNO_QUERY ); + Size aTextSize = xTextLayout->getPreferredSize(); aGuard.clear () ; @@ -321,7 +321,7 @@ Size SAL_CALL StatusIndicator::getPreferredSize () throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XLayoutConstrains +// XLayoutConstrains //____________________________________________________________________________________________________________ Size SAL_CALL StatusIndicator::calcAdjustedSize ( const Size& /*rNewSize*/ ) throw( RuntimeException ) @@ -330,7 +330,7 @@ Size SAL_CALL StatusIndicator::calcAdjustedSize ( const Size& /*rNewSize*/ ) thr } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ void SAL_CALL StatusIndicator::createPeer ( @@ -351,7 +351,7 @@ void SAL_CALL StatusIndicator::createPeer ( } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ sal_Bool SAL_CALL StatusIndicator::setModel ( const Reference< XControlModel > & /*rModel*/ ) throw( RuntimeException ) @@ -361,7 +361,7 @@ sal_Bool SAL_CALL StatusIndicator::setModel ( const Reference< XControlModel > & } //____________________________________________________________________________________________________________ -// XControl +// XControl //____________________________________________________________________________________________________________ Reference< XControlModel > SAL_CALL StatusIndicator::getModel () throw( RuntimeException ) @@ -372,7 +372,7 @@ Reference< XControlModel > SAL_CALL StatusIndicator::getModel () throw( RuntimeE } //____________________________________________________________________________________________________________ -// XComponent +// XComponent //____________________________________________________________________________________________________________ void SAL_CALL StatusIndicator::dispose () throw( RuntimeException ) @@ -381,11 +381,11 @@ void SAL_CALL StatusIndicator::dispose () throw( RuntimeException ) MutexGuard aGuard ( m_aMutex ) ; // "removeControl()" control the state of a reference - Reference< XControl > xTextControl ( m_xText , UNO_QUERY ); - Reference< XControl > xProgressControl ( m_xProgressBar, UNO_QUERY ); + Reference< XControl > xTextControl ( m_xText , UNO_QUERY ); + Reference< XControl > xProgressControl ( m_xProgressBar, UNO_QUERY ); - removeControl( xTextControl ); - removeControl( xProgressControl ); + removeControl( xTextControl ); + removeControl( xProgressControl ); // do'nt use "...->clear ()" or "... = XFixedText ()" // when other hold a reference at this object !!! @@ -395,7 +395,7 @@ void SAL_CALL StatusIndicator::dispose () throw( RuntimeException ) } //____________________________________________________________________________________________________________ -// XWindow +// XWindow //____________________________________________________________________________________________________________ void SAL_CALL StatusIndicator::setPosSize ( @@ -406,12 +406,12 @@ void SAL_CALL StatusIndicator::setPosSize ( sal_Int16 nFlags ) throw( RuntimeException ) { - Rectangle aBasePosSize = getPosSize () ; + Rectangle aBasePosSize = getPosSize () ; BaseContainerControl::setPosSize (nX, nY, nWidth, nHeight, nFlags) ; // if position or size changed if ( - ( nWidth != aBasePosSize.Width ) || + ( nWidth != aBasePosSize.Width ) || ( nHeight != aBasePosSize.Height) ) { @@ -426,7 +426,7 @@ void SAL_CALL StatusIndicator::setPosSize ( } //____________________________________________________________________________________________________________ -// impl but public method to register service +// impl but public method to register service //____________________________________________________________________________________________________________ const Sequence< OUString > StatusIndicator::impl_getStaticSupportedServiceNames() @@ -438,7 +438,7 @@ const Sequence< OUString > StatusIndicator::impl_getStaticSupportedServiceNames( } //____________________________________________________________________________________________________________ -// impl but public method to register service +// impl but public method to register service //____________________________________________________________________________________________________________ const OUString StatusIndicator::impl_getStaticImplementationName() @@ -447,7 +447,7 @@ const OUString StatusIndicator::impl_getStaticImplementationName() } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ WindowDescriptor* StatusIndicator::impl_getWindowDescriptor( const Reference< XWindowPeer >& xParentPeer ) @@ -458,17 +458,17 @@ WindowDescriptor* StatusIndicator::impl_getWindowDescriptor( const Reference< XW WindowDescriptor* pDescriptor = new WindowDescriptor ; - pDescriptor->Type = WindowClass_SIMPLE ; - pDescriptor->WindowServiceName = OUString::createFromAscii( "floatingwindow" ) ; - pDescriptor->ParentIndex = -1 ; - pDescriptor->Parent = xParentPeer ; - pDescriptor->Bounds = getPosSize () ; + pDescriptor->Type = WindowClass_SIMPLE ; + pDescriptor->WindowServiceName = OUString::createFromAscii( "floatingwindow" ) ; + pDescriptor->ParentIndex = -1 ; + pDescriptor->Parent = xParentPeer ; + pDescriptor->Bounds = getPosSize () ; return pDescriptor ; } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ void StatusIndicator::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< XGraphics > & rGraphics ) @@ -477,7 +477,7 @@ void StatusIndicator::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< // Every request paint the completely control. ( but only, if peer exist ) if ( rGraphics.is () ) { - MutexGuard aGuard (m_aMutex) ; + MutexGuard aGuard (m_aMutex) ; // background = gray Reference< XWindowPeer > xPeer( impl_getPeerWindow(), UNO_QUERY ); @@ -507,27 +507,27 @@ void StatusIndicator::impl_paint ( sal_Int32 nX, sal_Int32 nY, const Reference< } //____________________________________________________________________________________________________________ -// protected method +// protected method //____________________________________________________________________________________________________________ void StatusIndicator::impl_recalcLayout ( const WindowEvent& aEvent ) { - sal_Int32 nX_ProgressBar ; - sal_Int32 nY_ProgressBar ; - sal_Int32 nWidth_ProgressBar ; - sal_Int32 nHeight_ProgressBar ; - sal_Int32 nX_Text ; - sal_Int32 nY_Text ; - sal_Int32 nWidth_Text ; - sal_Int32 nHeight_Text ; + sal_Int32 nX_ProgressBar ; + sal_Int32 nY_ProgressBar ; + sal_Int32 nWidth_ProgressBar ; + sal_Int32 nHeight_ProgressBar ; + sal_Int32 nX_Text ; + sal_Int32 nY_Text ; + sal_Int32 nWidth_Text ; + sal_Int32 nHeight_Text ; // Ready for multithreading MutexGuard aGuard ( m_aMutex ) ; // get information about required place of child controls - Size aWindowSize ( aEvent.Width, aEvent.Height ); - Reference< XLayoutConstrains > xTextLayout ( m_xText, UNO_QUERY ); - Size aTextSize = xTextLayout->getPreferredSize(); + Size aWindowSize ( aEvent.Width, aEvent.Height ); + Reference< XLayoutConstrains > xTextLayout ( m_xText, UNO_QUERY ); + Size aTextSize = xTextLayout->getPreferredSize(); if( aWindowSize.Width < STATUSINDICATOR_DEFAULT_WIDTH ) { @@ -550,13 +550,13 @@ void StatusIndicator::impl_recalcLayout ( const WindowEvent& aEvent ) nHeight_ProgressBar = nHeight_Text ; // Set new position and size on all controls - Reference< XWindow > xTextWindow ( m_xText , UNO_QUERY ); - Reference< XWindow > xProgressWindow ( m_xProgressBar, UNO_QUERY ); + Reference< XWindow > xTextWindow ( m_xText , UNO_QUERY ); + Reference< XWindow > xProgressWindow ( m_xProgressBar, UNO_QUERY ); - xTextWindow->setPosSize ( nX_Text , nY_Text , nWidth_Text , nHeight_Text , 15 ) ; - xProgressWindow->setPosSize ( nX_ProgressBar, nY_ProgressBar, nWidth_ProgressBar, nHeight_ProgressBar , 15 ) ; + xTextWindow->setPosSize ( nX_Text , nY_Text , nWidth_Text , nHeight_Text , 15 ) ; + xProgressWindow->setPosSize ( nX_ProgressBar, nY_ProgressBar, nWidth_ProgressBar, nHeight_ProgressBar , 15 ) ; } -} // namespace unocontrols +} // namespace unocontrols /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/UnoControls/source/inc/OConnectionPointContainerHelper.hxx b/UnoControls/source/inc/OConnectionPointContainerHelper.hxx index e0cc5a9b70b9..511755ded746 100644 --- a/UnoControls/source/inc/OConnectionPointContainerHelper.hxx +++ b/UnoControls/source/inc/OConnectionPointContainerHelper.hxx @@ -30,7 +30,7 @@ #define _OCONNECTIONPOINTCONTAINERHELPER_HXX //______________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //______________________________________________________________________________________________________________ #include <com/sun/star/lang/XConnectionPointContainer.hpp> @@ -39,11 +39,11 @@ #include <cppuhelper/propshlp.hxx> //______________________________________________________________________________________________________________ -// includes of my own project +// includes of my own project //______________________________________________________________________________________________________________ //______________________________________________________________________________________________________________ -// namespaces +// namespaces //______________________________________________________________________________________________________________ namespace unocontrols{ @@ -52,25 +52,25 @@ namespace unocontrols{ #define CSS_LANG ::com::sun::star::lang //______________________________________________________________________________________________________________ -// defines +// defines //______________________________________________________________________________________________________________ //______________________________________________________________________________________________________________ -// class declaration OConnectionPointContainerHelper +// class declaration OConnectionPointContainerHelper //______________________________________________________________________________________________________________ -class OConnectionPointContainerHelper : public CSS_LANG::XConnectionPointContainer - , public ::cppu::OWeakObject +class OConnectionPointContainerHelper : public CSS_LANG::XConnectionPointContainer + , public ::cppu::OWeakObject { //______________________________________________________________________________________________________________ -// public methods +// public methods //______________________________________________________________________________________________________________ public: //__________________________________________________________________________________________________________ - // construct/destruct + // construct/destruct //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -101,62 +101,62 @@ public: @onerror */ - virtual ~OConnectionPointContainerHelper(); + virtual ~OConnectionPointContainerHelper(); //________________________________________________________________________________________________________ - // XInterface + // XInterface //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ - @short give answer, if interface is supported - @descr The interfaces are searched by type. + @short give answer, if interface is supported + @descr The interfaces are searched by type. - @seealso XInterface + @seealso XInterface @param "rType" is the type of searched interface. - @return Any information about found interface + @return Any information about found interface - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual CSS_UNO::Any SAL_CALL queryInterface( const CSS_UNO::Type& aType ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short increment refcount - @descr - + @short increment refcount + @descr - - @seealso XInterface - @seealso release() + @seealso XInterface + @seealso release() - @param - + @param - - @return - + @return - - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual void SAL_CALL acquire() throw(); /**_______________________________________________________________________________________________________ - @short decrement refcount - @descr - + @short decrement refcount + @descr - - @seealso XInterface - @seealso acquire() + @seealso XInterface + @seealso acquire() - @param - + @param - - @return - + @return - - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual void SAL_CALL release() throw(); //__________________________________________________________________________________________________________ - // XConnectionPointContainer + // XConnectionPointContainer //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -206,8 +206,8 @@ public: */ virtual void SAL_CALL advise( - const CSS_UNO::Type& aType , - const CSS_UNO::Reference< CSS_UNO::XInterface >& xListener + const CSS_UNO::Type& aType , + const CSS_UNO::Reference< CSS_UNO::XInterface >& xListener ) throw( CSS_UNO::RuntimeException ); /**_________________________________________________________________________________________________________ @@ -224,8 +224,8 @@ public: */ virtual void SAL_CALL unadvise( - const CSS_UNO::Type& aType , - const CSS_UNO::Reference< CSS_UNO::XInterface >& xListener + const CSS_UNO::Type& aType , + const CSS_UNO::Reference< CSS_UNO::XInterface >& xListener ) throw( CSS_UNO::RuntimeException ); /**_________________________________________________________________________________________________________ @@ -244,22 +244,22 @@ public: ::cppu::OMultiTypeInterfaceContainerHelper& impl_getMultiTypeContainer(); //______________________________________________________________________________________________________________ -// private variables +// private variables //______________________________________________________________________________________________________________ private: - ::osl::Mutex& m_aSharedMutex ; - ::cppu::OMultiTypeInterfaceContainerHelper m_aMultiTypeContainer ; // Container to hold listener + ::osl::Mutex& m_aSharedMutex ; + ::cppu::OMultiTypeInterfaceContainerHelper m_aMultiTypeContainer ; // Container to hold listener -}; // class OConnectionPointContainerHelper +}; // class OConnectionPointContainerHelper // The namespace aliases are only used in this header #undef CSS_UNO #undef CSS_LANG -} // namespace unocontrols +} // namespace unocontrols -#endif // #ifndef _OCONNECTIONPOINTCONTAINERHELPER_HXX +#endif // #ifndef _OCONNECTIONPOINTCONTAINERHELPER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/UnoControls/source/inc/OConnectionPointHelper.hxx b/UnoControls/source/inc/OConnectionPointHelper.hxx index b36147e727cb..0f6194d90a32 100644 --- a/UnoControls/source/inc/OConnectionPointHelper.hxx +++ b/UnoControls/source/inc/OConnectionPointHelper.hxx @@ -30,7 +30,7 @@ #define _OCONNECTIONPOINTHELPER_HXX //______________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //______________________________________________________________________________________________________________ #include <com/sun/star/lang/XConnectionPointContainer.hpp> @@ -39,12 +39,12 @@ #include <cppuhelper/propshlp.hxx> //______________________________________________________________________________________________________________ -// includes of my own project +// includes of my own project //______________________________________________________________________________________________________________ #include "OConnectionPointContainerHelper.hxx" //______________________________________________________________________________________________________________ -// namespaces +// namespaces //______________________________________________________________________________________________________________ namespace unocontrols{ @@ -53,25 +53,25 @@ namespace unocontrols{ #define CSS_LANG ::com::sun::star::lang //______________________________________________________________________________________________________________ -// defines +// defines //______________________________________________________________________________________________________________ //______________________________________________________________________________________________________________ -// class declaration OConnectionPointHelper +// class declaration OConnectionPointHelper //______________________________________________________________________________________________________________ -class OConnectionPointHelper : public CSS_LANG::XConnectionPoint - , public ::cppu::OWeakObject +class OConnectionPointHelper : public CSS_LANG::XConnectionPoint + , public ::cppu::OWeakObject { //______________________________________________________________________________________________________________ -// public methods +// public methods //______________________________________________________________________________________________________________ public: //__________________________________________________________________________________________________________ - // construct/destruct + // construct/destruct //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -87,9 +87,9 @@ public: @onerror */ - OConnectionPointHelper( ::osl::Mutex& aMutex , - OConnectionPointContainerHelper* pContainerImplementation , - CSS_UNO::Type aType ); + OConnectionPointHelper( ::osl::Mutex& aMutex , + OConnectionPointContainerHelper* pContainerImplementation , + CSS_UNO::Type aType ); /**_________________________________________________________________________________________________________ @short @@ -104,62 +104,62 @@ public: @onerror */ - virtual ~OConnectionPointHelper(); + virtual ~OConnectionPointHelper(); //________________________________________________________________________________________________________ - // XInterface + // XInterface //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ - @short give answer, if interface is supported - @descr The interfaces are searched by type. + @short give answer, if interface is supported + @descr The interfaces are searched by type. - @seealso XInterface + @seealso XInterface @param "rType" is the type of searched interface. - @return Any information about found interface + @return Any information about found interface - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual CSS_UNO::Any SAL_CALL queryInterface( const CSS_UNO::Type& aType ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short increment refcount - @descr - + @short increment refcount + @descr - - @seealso XInterface - @seealso release() + @seealso XInterface + @seealso release() - @param - + @param - - @return - + @return - - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual void SAL_CALL acquire() throw(); /**_______________________________________________________________________________________________________ - @short decrement refcount - @descr - + @short decrement refcount + @descr - - @seealso XInterface - @seealso acquire() + @seealso XInterface + @seealso acquire() - @param - + @param - - @return - + @return - - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual void SAL_CALL release() throw(); //__________________________________________________________________________________________________________ - // XConnectionPoint + // XConnectionPoint //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -248,7 +248,7 @@ public: throw( CSS_UNO::RuntimeException ); //______________________________________________________________________________________________________________ -// private methods +// private methods //______________________________________________________________________________________________________________ private: @@ -284,26 +284,26 @@ private: void impl_UnlockContainer(); //______________________________________________________________________________________________________________ -// private variables +// private variables //______________________________________________________________________________________________________________ private: - ::osl::Mutex& m_aSharedMutex ; - CSS_UNO::WeakReference< CSS_LANG::XConnectionPointContainer > m_oContainerWeakReference ; // Reference to container-class!. Don't use Reference<...> + ::osl::Mutex& m_aSharedMutex ; + CSS_UNO::WeakReference< CSS_LANG::XConnectionPointContainer > m_oContainerWeakReference ; // Reference to container-class!. Don't use Reference<...> // It is a ring-reference => and must be a wekreference! - OConnectionPointContainerHelper* m_pContainerImplementation ; - CSS_UNO::Type m_aInterfaceType ; - CSS_UNO::Reference< CSS_UNO::XInterface > m_xLock ; + OConnectionPointContainerHelper* m_pContainerImplementation ; + CSS_UNO::Type m_aInterfaceType ; + CSS_UNO::Reference< CSS_UNO::XInterface > m_xLock ; -}; // class OConnectionPointHelper +}; // class OConnectionPointHelper // The namespace aliases are only used in this header #undef CSS_UNO #undef CSS_LANG -} // namespace unocontrols +} // namespace unocontrols -#endif // #ifndef _OCONNECTIONPOINTHELPER_HXX +#endif // #ifndef _OCONNECTIONPOINTHELPER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/UnoControls/source/inc/framecontrol.hxx b/UnoControls/source/inc/framecontrol.hxx index 5d068ad0cfa1..33263dfcb80f 100644 --- a/UnoControls/source/inc/framecontrol.hxx +++ b/UnoControls/source/inc/framecontrol.hxx @@ -30,7 +30,7 @@ #define _UNOCONTROLS_FRAMECONTROL_CTRL_HXX //______________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //______________________________________________________________________________________________________________ #include <com/sun/star/frame/XFrameActionListener.hpp> @@ -44,13 +44,13 @@ #include <cppuhelper/propshlp.hxx> //______________________________________________________________________________________________________________ -// includes of my own project +// includes of my own project //______________________________________________________________________________________________________________ #include "basecontrol.hxx" #include "OConnectionPointContainerHelper.hxx" //______________________________________________________________________________________________________________ -// namespaces +// namespaces //______________________________________________________________________________________________________________ namespace unocontrols{ @@ -62,39 +62,39 @@ namespace unocontrols{ #define CSS_FRAME ::com::sun::star::frame //______________________________________________________________________________________________________________ -// defines +// defines //______________________________________________________________________________________________________________ -#define SERVICENAME_FRAMECONTROL "com.sun.star.frame.FrameControl" -#define IMPLEMENTATIONNAME_FRAMECONTROL "stardiv.UnoControls.FrameControl" -#define PROPERTYNAME_LOADERARGUMENTS "LoaderArguments" -#define PROPERTYNAME_COMPONENTURL "ComponentURL" -#define PROPERTYNAME_FRAME "Frame" -#define ERRORTEXT_VOSENSHURE "This is an invalid property handle." -#define PROPERTY_COUNT 3 // you must count the propertys -#define PROPERTYHANDLE_COMPONENTURL 0 // Id must be the index into the array -#define PROPERTYHANDLE_FRAME 1 -#define PROPERTYHANDLE_LOADERARGUMENTS 2 +#define SERVICENAME_FRAMECONTROL "com.sun.star.frame.FrameControl" +#define IMPLEMENTATIONNAME_FRAMECONTROL "stardiv.UnoControls.FrameControl" +#define PROPERTYNAME_LOADERARGUMENTS "LoaderArguments" +#define PROPERTYNAME_COMPONENTURL "ComponentURL" +#define PROPERTYNAME_FRAME "Frame" +#define ERRORTEXT_VOSENSHURE "This is an invalid property handle." +#define PROPERTY_COUNT 3 // you must count the propertys +#define PROPERTYHANDLE_COMPONENTURL 0 // Id must be the index into the array +#define PROPERTYHANDLE_FRAME 1 +#define PROPERTYHANDLE_LOADERARGUMENTS 2 //______________________________________________________________________________________________________________ -// class +// class //______________________________________________________________________________________________________________ -class FrameControl : public CSS_AWT::XControlModel +class FrameControl : public CSS_AWT::XControlModel , public CSS_LANG::XConnectionPointContainer - , public BaseControl // This order is neccessary for right initialization of m_aMutex! + , public BaseControl // This order is neccessary for right initialization of m_aMutex! , public ::cppu::OBroadcastHelper , public ::cppu::OPropertySetHelper { //______________________________________________________________________________________________________________ -// public methods +// public methods //______________________________________________________________________________________________________________ public: //__________________________________________________________________________________________________________ - // construct/destruct + // construct/destruct //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -125,10 +125,10 @@ public: @onerror */ - virtual ~FrameControl(); + virtual ~FrameControl(); //__________________________________________________________________________________________________________ - // XInterface + // XInterface //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -149,39 +149,39 @@ public: ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short increment refcount - @descr - + @short increment refcount + @descr - - @seealso XInterface - @seealso release() + @seealso XInterface + @seealso release() - @param - + @param - - @return - + @return - - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual void SAL_CALL acquire() throw(); /**_______________________________________________________________________________________________________ - @short decrement refcount - @descr - + @short decrement refcount + @descr - - @seealso XInterface - @seealso acquire() + @seealso XInterface + @seealso acquire() - @param - + @param - - @return - + @return - - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual void SAL_CALL release() throw(); //__________________________________________________________________________________________________________ - // XTypeProvider + // XTypeProvider //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -201,7 +201,7 @@ public: throw( CSS_UNO::RuntimeException ); //__________________________________________________________________________________________________________ - // XAggregation + // XAggregation //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -222,7 +222,7 @@ public: ) throw( CSS_UNO::RuntimeException ); //__________________________________________________________________________________________________________ - // XControl + // XControl //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -277,7 +277,7 @@ public: throw( CSS_UNO::RuntimeException ); //__________________________________________________________________________________________________________ - // XComponent + // XComponent //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -296,7 +296,7 @@ public: virtual void SAL_CALL dispose() throw( CSS_UNO::RuntimeException ); //__________________________________________________________________________________________________________ - // XView + // XView //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -333,7 +333,7 @@ public: throw( CSS_UNO::RuntimeException ); //__________________________________________________________________________________________________________ - // XConnectionPointContainer + // XConnectionPointContainer //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -383,7 +383,7 @@ public: */ virtual void SAL_CALL advise( - const CSS_UNO::Type& aType , + const CSS_UNO::Type& aType , const CSS_UNO::Reference< CSS_UNO::XInterface >& xListener ) throw( CSS_UNO::RuntimeException ); @@ -406,7 +406,7 @@ public: ) throw( CSS_UNO::RuntimeException ); //__________________________________________________________________________________________________________ - // impl but public methods to register service! + // impl but public methods to register service! //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -440,13 +440,13 @@ public: static const ::rtl::OUString impl_getStaticImplementationName(); //______________________________________________________________________________________________________________ -// protected methods +// protected methods //______________________________________________________________________________________________________________ protected: using OPropertySetHelper::getFastPropertyValue; //__________________________________________________________________________________________________________ - // OPropertySetHelper + // OPropertySetHelper //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -484,7 +484,7 @@ protected: virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle , - const CSS_UNO::Any& rValue + const CSS_UNO::Any& rValue ) throw ( ::com::sun::star::uno::Exception ); /**_________________________________________________________________________________________________________ @@ -500,8 +500,8 @@ protected: @onerror */ - virtual void SAL_CALL getFastPropertyValue( CSS_UNO::Any& rValue , - sal_Int32 nHandle ) const ; + virtual void SAL_CALL getFastPropertyValue( CSS_UNO::Any& rValue , + sal_Int32 nHandle ) const ; /**_________________________________________________________________________________________________________ @short @@ -519,7 +519,7 @@ protected: virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); //__________________________________________________________________________________________________________ - // XPropertySet + // XPropertySet //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -539,7 +539,7 @@ protected: throw( CSS_UNO::RuntimeException ); //__________________________________________________________________________________________________________ - // BaseControl + // BaseControl //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -560,7 +560,7 @@ protected: ); //______________________________________________________________________________________________________________ -// private methods +// private methods //______________________________________________________________________________________________________________ private: @@ -578,9 +578,9 @@ private: @onerror */ - void impl_createFrame( const CSS_UNO::Reference< CSS_AWT::XWindowPeer >& xPeer , - const ::rtl::OUString& sURL , - const CSS_UNO::Sequence< CSS_BEANS::PropertyValue >& seqArguments ); + void impl_createFrame( const CSS_UNO::Reference< CSS_AWT::XWindowPeer >& xPeer , + const ::rtl::OUString& sURL , + const CSS_UNO::Sequence< CSS_BEANS::PropertyValue >& seqArguments ); /**_________________________________________________________________________________________________________ @short @@ -614,18 +614,18 @@ private: //______________________________________________________________________________________________________________ -// private variables +// private variables //______________________________________________________________________________________________________________ private: - CSS_UNO::Reference< CSS_FRAME::XFrame > m_xFrame ; - ::rtl::OUString m_sComponentURL ; - CSS_UNO::Sequence< CSS_BEANS::PropertyValue > m_seqLoaderArguments ; - ::cppu::OMultiTypeInterfaceContainerHelper m_aInterfaceContainer ; - OConnectionPointContainerHelper m_aConnectionPointContainer ; + CSS_UNO::Reference< CSS_FRAME::XFrame > m_xFrame ; + ::rtl::OUString m_sComponentURL ; + CSS_UNO::Sequence< CSS_BEANS::PropertyValue > m_seqLoaderArguments ; + ::cppu::OMultiTypeInterfaceContainerHelper m_aInterfaceContainer ; + OConnectionPointContainerHelper m_aConnectionPointContainer ; -}; // class FrameControl +}; // class FrameControl // The namespace alaises are only used in the header #undef CSS_UNO @@ -634,8 +634,8 @@ private: #undef CSS_AWT #undef CSS_FRAME -} // namespace unocontrols +} // namespace unocontrols -#endif // #ifndef _UNOCONTROLS_FRAMECONTROL_CTRL_HXX +#endif // #ifndef _UNOCONTROLS_FRAMECONTROL_CTRL_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/UnoControls/source/inc/progressbar.hxx b/UnoControls/source/inc/progressbar.hxx index 97cad21816dd..53ed3b73d575 100644 --- a/UnoControls/source/inc/progressbar.hxx +++ b/UnoControls/source/inc/progressbar.hxx @@ -30,19 +30,19 @@ #define _UNOCONTROLS_PROGRESSBAR_CTRL_HXX //____________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //____________________________________________________________________________________________________________ #include <com/sun/star/lang/XServiceName.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> //____________________________________________________________________________________________________________ -// includes of my own project +// includes of my own project //____________________________________________________________________________________________________________ #include "basecontrol.hxx" //____________________________________________________________________________________________________________ -// namespaces +// namespaces //____________________________________________________________________________________________________________ namespace unocontrols{ @@ -52,40 +52,40 @@ namespace unocontrols{ #define CSS_AWT ::com::sun::star::awt //____________________________________________________________________________________________________________ -// defines +// defines //____________________________________________________________________________________________________________ -#define SERVICENAME_PROGRESSBAR "com.sun.star.awt.XProgressBar" -#define IMPLEMENTATIONNAME_PROGRESSBAR "stardiv.UnoControls.ProgressBar" +#define SERVICENAME_PROGRESSBAR "com.sun.star.awt.XProgressBar" +#define IMPLEMENTATIONNAME_PROGRESSBAR "stardiv.UnoControls.ProgressBar" #define PROGRESSBAR_FREESPACE 4 #define PROGRESSBAR_DEFAULT_HORIZONTAL sal_True #define PROGRESSBAR_DEFAULT_BLOCKDIMENSION Size(1,1) -#define PROGRESSBAR_DEFAULT_BACKGROUNDCOLOR TRGB_COLORDATA( 0x00, 0xC0, 0xC0, 0xC0 ) // lightgray -#define PROGRESSBAR_DEFAULT_FOREGROUNDCOLOR TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x80 ) // blue +#define PROGRESSBAR_DEFAULT_BACKGROUNDCOLOR TRGB_COLORDATA( 0x00, 0xC0, 0xC0, 0xC0 ) // lightgray +#define PROGRESSBAR_DEFAULT_FOREGROUNDCOLOR TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x80 ) // blue #define PROGRESSBAR_DEFAULT_MINRANGE INT_MIN #define PROGRESSBAR_DEFAULT_MAXRANGE INT_MAX #define PROGRESSBAR_DEFAULT_BLOCKVALUE 1 #define PROGRESSBAR_DEFAULT_VALUE PROGRESSBAR_DEFAULT_MINRANGE -#define PROGRESSBAR_LINECOLOR_BRIGHT TRGB_COLORDATA( 0x00, 0xFF, 0xFF, 0xFF ) // white -#define PROGRESSBAR_LINECOLOR_SHADOW TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x00 ) // black +#define PROGRESSBAR_LINECOLOR_BRIGHT TRGB_COLORDATA( 0x00, 0xFF, 0xFF, 0xFF ) // white +#define PROGRESSBAR_LINECOLOR_SHADOW TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x00 ) // black //____________________________________________________________________________________________________________ -// classes +// classes //____________________________________________________________________________________________________________ -class ProgressBar : public CSS_AWT::XControlModel +class ProgressBar : public CSS_AWT::XControlModel , public CSS_AWT::XProgressBar , public BaseControl { //____________________________________________________________________________________________________________ -// public methods +// public methods //____________________________________________________________________________________________________________ public: //________________________________________________________________________________________________________ - // construct/destruct + // construct/destruct //________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -116,10 +116,10 @@ public: @onerror */ - virtual ~ProgressBar(); + virtual ~ProgressBar(); //__________________________________________________________________________________________________________ - // XInterface + // XInterface //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -139,39 +139,39 @@ public: throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short increment refcount - @descr - + @short increment refcount + @descr - - @seealso XInterface - @seealso release() + @seealso XInterface + @seealso release() - @param - + @param - - @return - + @return - - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual void SAL_CALL acquire() throw(); /**_______________________________________________________________________________________________________ - @short decrement refcount - @descr - + @short decrement refcount + @descr - - @seealso XInterface - @seealso acquire() + @seealso XInterface + @seealso acquire() - @param - + @param - - @return - + @return - - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual void SAL_CALL release() throw(); //__________________________________________________________________________________________________________ - // XTypeProvider + // XTypeProvider //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -191,7 +191,7 @@ public: throw( CSS_UNO::RuntimeException ); //__________________________________________________________________________________________________________ - // XAggregation + // XAggregation //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -211,7 +211,7 @@ public: throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ - // XProgressBar + // XProgressBar //________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -275,8 +275,8 @@ public: */ virtual void SAL_CALL setRange( - sal_Int32 nMin , - sal_Int32 nMax + sal_Int32 nMin , + sal_Int32 nMax ) throw( CSS_UNO::RuntimeException ); /**_________________________________________________________________________________________________________ @@ -295,7 +295,7 @@ public: virtual sal_Int32 SAL_CALL getValue() throw( CSS_UNO::RuntimeException ); //__________________________________________________________________________________________________________ - // XWindow + // XWindow //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -312,15 +312,15 @@ public: */ virtual void SAL_CALL setPosSize( - sal_Int32 nX , - sal_Int32 nY , - sal_Int32 nWidth , - sal_Int32 nHeight , - sal_Int16 nFlags + sal_Int32 nX , + sal_Int32 nY , + sal_Int32 nWidth , + sal_Int32 nHeight , + sal_Int16 nFlags ) throw( CSS_UNO::RuntimeException ); //__________________________________________________________________________________________________________ - // XControl + // XControl //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -357,7 +357,7 @@ public: throw( CSS_UNO::RuntimeException ); //__________________________________________________________________________________________________________ - // BaseControl + // BaseControl //__________________________________________________________________________________________________________ /**_________________________________________________________________________________________________________ @@ -391,7 +391,7 @@ public: static const ::rtl::OUString impl_getStaticImplementationName(); //____________________________________________________________________________________________________________ -// protected methods +// protected methods //____________________________________________________________________________________________________________ protected: @@ -412,7 +412,7 @@ protected: virtual void impl_paint( sal_Int32 nX , sal_Int32 nY , - const CSS_UNO::Reference< CSS_AWT::XGraphics >& xGraphics + const CSS_UNO::Reference< CSS_AWT::XGraphics >& xGraphics ); /**_________________________________________________________________________________________________________ @@ -431,29 +431,29 @@ protected: void impl_recalcRange(); //____________________________________________________________________________________________________________ -// private variables +// private variables //____________________________________________________________________________________________________________ private: - sal_Bool m_bHorizontal ; // orientation for steps [true=horizontal/false=vertikal] - CSS_AWT::Size m_aBlockSize ; // width and height of a block [>=0,0] - sal_Int32 m_nForegroundColor ; // (alpha,r,g,b) - sal_Int32 m_nBackgroundColor ; // (alpha,r,g,b) - sal_Int32 m_nMinRange ; // lowest value = 0% [long, <_nMaxRange] - sal_Int32 m_nMaxRange ; // highest value = 100% [long, >_nMinRange] + sal_Bool m_bHorizontal ; // orientation for steps [true=horizontal/false=vertikal] + CSS_AWT::Size m_aBlockSize ; // width and height of a block [>=0,0] + sal_Int32 m_nForegroundColor ; // (alpha,r,g,b) + sal_Int32 m_nBackgroundColor ; // (alpha,r,g,b) + sal_Int32 m_nMinRange ; // lowest value = 0% [long, <_nMaxRange] + sal_Int32 m_nMaxRange ; // highest value = 100% [long, >_nMinRange] double m_nBlockValue ; // value for one block [long, >0] - sal_Int32 m_nValue ; // value for progress [long] + sal_Int32 m_nValue ; // value for progress [long] -}; // class ProgressBar +}; // class ProgressBar // The namespace aliases are only used in the header #undef CSS_UNO #undef CSS_LANG #undef CSS_AWT -} // namespace unocontrols +} // namespace unocontrols -#endif // #ifndef _UNOCONTROLS_PROGRESSBAR_CTRL_HXX +#endif // #ifndef _UNOCONTROLS_PROGRESSBAR_CTRL_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/UnoControls/source/inc/progressmonitor.hxx b/UnoControls/source/inc/progressmonitor.hxx index 08353d11f4a0..db16f3c2722c 100644 --- a/UnoControls/source/inc/progressmonitor.hxx +++ b/UnoControls/source/inc/progressmonitor.hxx @@ -30,7 +30,7 @@ #define _UNOCONTROLS_PROGRESSMONITOR_CTRL_HXX //____________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //____________________________________________________________________________________________________________ #include <com/sun/star/awt/XFileDialog.hpp> @@ -73,12 +73,12 @@ #include <com/sun/star/awt/XProgressBar.hpp> //____________________________________________________________________________________________________________ -// includes of my own project +// includes of my own project //____________________________________________________________________________________________________________ #include "basecontainercontrol.hxx" //____________________________________________________________________________________________________________ -// namespace +// namespace //____________________________________________________________________________________________________________ namespace unocontrols{ @@ -88,37 +88,37 @@ namespace unocontrols{ #define CSS_LANG ::com::sun::star::lang //____________________________________________________________________________________________________________ -// defines +// defines //____________________________________________________________________________________________________________ -#define SERVICENAME_PROGRESSMONITOR "com.sun.star.awt.XProgressMonitor" -#define IMPLEMENTATIONNAME_PROGRESSMONITOR "stardiv.UnoControls.ProgressMonitor" -#define PROGRESSMONITOR_FREEBORDER 10 // border around and between the controls -#define FIXEDTEXT_SERVICENAME "com.sun.star.awt.UnoControlFixedText" -#define BUTTON_SERVICENAME "com.sun.star.awt.UnoControlButton" -#define FIXEDTEXT_MODELNAME "com.sun.star.awt.UnoControlFixedTextModel" -#define BUTTON_MODELNAME "com.sun.star.awt.UnoControlButtonModel" -#define CONTROLNAME_TEXT "Text" // identifier the control in container -#define CONTROLNAME_BUTTON "Button" // -||- -#define CONTROLNAME_PROGRESSBAR "ProgressBar" // -||- -#define DEFAULT_BUTTONLABEL "Abbrechen" -#define PROGRESSMONITOR_DEFAULT_TOPIC "\0" -#define PROGRESSMONITOR_DEFAULT_TEXT "\0" -#define PROGRESSMONITOR_BACKGROUNDCOLOR TRGB_COLORDATA( 0x00, 0xC0, 0xC0, 0xC0 ) // lighgray -#define PROGRESSMONITOR_LINECOLOR_BRIGHT TRGB_COLORDATA( 0x00, 0xFF, 0xFF, 0xFF ) // white -#define PROGRESSMONITOR_LINECOLOR_SHADOW TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x00 ) // black +#define SERVICENAME_PROGRESSMONITOR "com.sun.star.awt.XProgressMonitor" +#define IMPLEMENTATIONNAME_PROGRESSMONITOR "stardiv.UnoControls.ProgressMonitor" +#define PROGRESSMONITOR_FREEBORDER 10 // border around and between the controls +#define FIXEDTEXT_SERVICENAME "com.sun.star.awt.UnoControlFixedText" +#define BUTTON_SERVICENAME "com.sun.star.awt.UnoControlButton" +#define FIXEDTEXT_MODELNAME "com.sun.star.awt.UnoControlFixedTextModel" +#define BUTTON_MODELNAME "com.sun.star.awt.UnoControlButtonModel" +#define CONTROLNAME_TEXT "Text" // identifier the control in container +#define CONTROLNAME_BUTTON "Button" // -||- +#define CONTROLNAME_PROGRESSBAR "ProgressBar" // -||- +#define DEFAULT_BUTTONLABEL "Abbrechen" +#define PROGRESSMONITOR_DEFAULT_TOPIC "\0" +#define PROGRESSMONITOR_DEFAULT_TEXT "\0" +#define PROGRESSMONITOR_BACKGROUNDCOLOR TRGB_COLORDATA( 0x00, 0xC0, 0xC0, 0xC0 ) // lighgray +#define PROGRESSMONITOR_LINECOLOR_BRIGHT TRGB_COLORDATA( 0x00, 0xFF, 0xFF, 0xFF ) // white +#define PROGRESSMONITOR_LINECOLOR_SHADOW TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x00 ) // black #define PROGRESSMONITOR_DEFAULT_WIDTH 350 #define PROGRESSMONITOR_DEFAULT_HEIGHT 100 //____________________________________________________________________________________________________________ -// structs, types +// structs, types //____________________________________________________________________________________________________________ -/// Item of TextList +/// Item of TextList struct IMPL_TextlistItem { - ::rtl::OUString sTopic ; /// Left site of textline in dialog - ::rtl::OUString sText ; /// Right site of textline in dialog + ::rtl::OUString sTopic ; /// Left site of textline in dialog + ::rtl::OUString sText ; /// Right site of textline in dialog }; /// Define a list-class for struct IMPL_TextlistItem @@ -126,23 +126,23 @@ class IMPL_Textlist ; DECLARE_LIST( IMPL_Textlist, IMPL_TextlistItem* ) //____________________________________________________________________________________________________________ -// class declaration +// class declaration //____________________________________________________________________________________________________________ -class ProgressMonitor : public CSS_AWT::XLayoutConstrains +class ProgressMonitor : public CSS_AWT::XLayoutConstrains , public CSS_AWT::XButton , public CSS_AWT::XProgressMonitor , public BaseContainerControl { //____________________________________________________________________________________________________________ -// public methods +// public methods //____________________________________________________________________________________________________________ public: //________________________________________________________________________________________________________ - // construct/destruct + // construct/destruct //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ @@ -173,121 +173,121 @@ public: @onerror */ - virtual ~ProgressMonitor(); + virtual ~ProgressMonitor(); //________________________________________________________________________________________________________ - // XInterface + // XInterface //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ - @short give answer, if interface is supported - @descr The interfaces are searched by type. + @short give answer, if interface is supported + @descr The interfaces are searched by type. - @seealso XInterface + @seealso XInterface @param "rType" is the type of searched interface. - @return Any information about found interface + @return Any information about found interface - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual CSS_UNO::Any SAL_CALL queryInterface( const CSS_UNO::Type& aType ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short increment refcount - @descr - + @short increment refcount + @descr - - @seealso XInterface - @seealso release() + @seealso XInterface + @seealso release() - @param - + @param - - @return - + @return - - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual void SAL_CALL acquire() throw(); /**_______________________________________________________________________________________________________ - @short decrement refcount - @descr - + @short decrement refcount + @descr - - @seealso XInterface - @seealso acquire() + @seealso XInterface + @seealso acquire() - @param - + @param - - @return - + @return - - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual void SAL_CALL release() throw(); //________________________________________________________________________________________________________ - // XTypeProvider + // XTypeProvider //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ - @short get information about supported interfaces + @short get information about supported interfaces @descr - - @seealso XTypeProvider + @seealso XTypeProvider @param - - @return Sequence of types of all supported interfaces + @return Sequence of types of all supported interfaces - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual CSS_UNO::Sequence< CSS_UNO::Type > SAL_CALL getTypes() throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ - // XAggregation + // XAggregation //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual CSS_UNO::Any SAL_CALL queryAggregation( const CSS_UNO::Type& aType ) throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ - // XProgressMonitor + // XProgressMonitor //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ - @short add topic to dialog - @descr Add a topic with a text in right textlist (used for FixedText-member).<BR> + @short add topic to dialog + @descr Add a topic with a text in right textlist (used for FixedText-member).<BR> ( "beforeProgress" fix the right list ). The dialog metric is recalculated. - @seealso removeText(), updateText() + @seealso removeText(), updateText() - @param sTopic Name of topic<BR> + @param sTopic Name of topic<BR> [sTopic != "" && sTopic != NULL] - @param sText Value of topic<BR> + @param sText Value of topic<BR> [sText != "" && sText != NULL] - @param bbeforeProgress Position of topic<BR> + @param bbeforeProgress Position of topic<BR> [True => before progressbar / False => below progressbar] - @return - + @return - - @onerror DEBUG = Assertion<BR> - RELEASE = nothing + @onerror DEBUG = Assertion<BR> + RELEASE = nothing */ virtual void SAL_CALL addText( @@ -297,16 +297,16 @@ public: ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual void SAL_CALL removeText( @@ -315,119 +315,119 @@ public: ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual void SAL_CALL updateText( - const ::rtl::OUString& sTopic , - const ::rtl::OUString& sText , + const ::rtl::OUString& sTopic , + const ::rtl::OUString& sText , sal_Bool bbeforeProgress ) throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ - // XProgressBar + // XProgressBar //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual void SAL_CALL setForegroundColor( sal_Int32 nColor ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual void SAL_CALL setBackgroundColor( sal_Int32 nColor ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual void SAL_CALL setValue( sal_Int32 nValue ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ - virtual void SAL_CALL setRange( sal_Int32 nMin , - sal_Int32 nMax ) throw( CSS_UNO::RuntimeException ); + virtual void SAL_CALL setRange( sal_Int32 nMin , + sal_Int32 nMax ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual sal_Int32 SAL_CALL getValue() throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ - // XButton + // XButton //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual void SAL_CALL addActionListener( @@ -435,16 +435,16 @@ public: ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual void SAL_CALL removeActionListener( @@ -452,101 +452,101 @@ public: ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual void SAL_CALL setLabel( const ::rtl::OUString& sLabel ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ - virtual void SAL_CALL setActionCommand( const ::rtl::OUString& sCommand ) + virtual void SAL_CALL setActionCommand( const ::rtl::OUString& sCommand ) throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ - // XLayoutConstrains + // XLayoutConstrains //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual CSS_AWT::Size SAL_CALL getMinimumSize() throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual CSS_AWT::Size SAL_CALL getPreferredSize() throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual CSS_AWT::Size SAL_CALL calcAdjustedSize( const CSS_AWT::Size& aNewSize ) throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ - // XControl + // XControl //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual void SAL_CALL createPeer( @@ -555,130 +555,130 @@ public: ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual sal_Bool SAL_CALL setModel( const CSS_UNO::Reference< CSS_AWT::XControlModel >& xModel ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual CSS_UNO::Reference< CSS_AWT::XControlModel > SAL_CALL getModel() throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ - // XComponent + // XComponent //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual void SAL_CALL dispose() throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ - // XWindow + // XWindow //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ - virtual void SAL_CALL setPosSize( sal_Int32 nX , - sal_Int32 nY , - sal_Int32 nWidth , - sal_Int32 nHeight , - sal_Int16 nFlags ) throw( CSS_UNO::RuntimeException ); + virtual void SAL_CALL setPosSize( sal_Int32 nX , + sal_Int32 nY , + sal_Int32 nWidth , + sal_Int32 nHeight , + sal_Int16 nFlags ) throw( CSS_UNO::RuntimeException ); //________________________________________________________________________________________________________ - // BaseControl + // BaseControl //________________________________________________________________________________________________________ /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ static const CSS_UNO::Sequence< ::rtl::OUString > impl_getStaticSupportedServiceNames(); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ static const ::rtl::OUString impl_getStaticImplementationName(); //____________________________________________________________________________________________________________ -// protected methods +// protected methods //____________________________________________________________________________________________________________ protected: /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual void impl_paint( sal_Int32 nX , @@ -692,64 +692,64 @@ protected: private: using BaseControl::impl_recalcLayout; /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ void impl_recalcLayout(); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ void impl_rebuildFixedText(); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ void impl_cleanMemory(); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ - IMPL_TextlistItem* impl_searchTopic( const ::rtl::OUString& sTopic , sal_Bool bbeforeProgress ); + IMPL_TextlistItem* impl_searchTopic( const ::rtl::OUString& sTopic , sal_Bool bbeforeProgress ); //____________________________________________________________________________________________________________ // debug methods @@ -758,22 +758,22 @@ private: private: /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ #ifdef DBG_UTIL - sal_Bool impl_debug_checkParameter( const ::rtl::OUString& sTopic, const ::rtl::OUString& sText, sal_Bool bbeforeProgress ); // addText, updateText - sal_Bool impl_debug_checkParameter( const ::rtl::OUString& rTopic, sal_Bool bbeforeProgress ); // removeText + sal_Bool impl_debug_checkParameter( const ::rtl::OUString& sTopic, const ::rtl::OUString& sText, sal_Bool bbeforeProgress ); // addText, updateText + sal_Bool impl_debug_checkParameter( const ::rtl::OUString& rTopic, sal_Bool bbeforeProgress ); // removeText #endif //____________________________________________________________________________________________________________ @@ -782,27 +782,27 @@ private: private: - IMPL_Textlist* m_pTextlist_Top ; // Elements before progress - CSS_UNO::Reference< CSS_AWT::XFixedText > m_xTopic_Top ; // (used, if parameter "beforeProgress"=sal_True in "addText, updateText, removeText") + IMPL_Textlist* m_pTextlist_Top ; // Elements before progress + CSS_UNO::Reference< CSS_AWT::XFixedText > m_xTopic_Top ; // (used, if parameter "beforeProgress"=sal_True in "addText, updateText, removeText") CSS_UNO::Reference< CSS_AWT::XFixedText > m_xText_Top ; - IMPL_Textlist* m_pTextlist_Bottom ; // Elements below of progress - CSS_UNO::Reference< CSS_AWT::XFixedText > m_xTopic_Bottom ; // (used, if parameter "beforeProgress"=sal_False in "addText, updateText, removeText") + IMPL_Textlist* m_pTextlist_Bottom ; // Elements below of progress + CSS_UNO::Reference< CSS_AWT::XFixedText > m_xTopic_Bottom ; // (used, if parameter "beforeProgress"=sal_False in "addText, updateText, removeText") CSS_UNO::Reference< CSS_AWT::XFixedText > m_xText_Bottom ; CSS_UNO::Reference< CSS_AWT::XProgressBar > m_xProgressBar ; CSS_UNO::Reference< CSS_AWT::XButton > m_xButton ; CSS_AWT::Rectangle m_a3DLine ; -}; // class ProgressMonitor +}; // class ProgressMonitor // The namespaces aliases are only used the this header #undef CSS_UNO #undef CSS_AWT #undef CSS_LANG -} // namespace unocontrols +} // namespace unocontrols -#endif // #ifndef _UNOCONTROLS_PROGRESSMONITOR_CTRL_HXX +#endif // #ifndef _UNOCONTROLS_PROGRESSMONITOR_CTRL_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/UnoControls/source/inc/statusindicator.hxx b/UnoControls/source/inc/statusindicator.hxx index d8e888f9dc42..7d357e68b2a3 100644 --- a/UnoControls/source/inc/statusindicator.hxx +++ b/UnoControls/source/inc/statusindicator.hxx @@ -30,7 +30,7 @@ #define _UNOCONTROLS_STATUSINDICATOR_CTRL_HXX //____________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //____________________________________________________________________________________________________________ #include <com/sun/star/awt/XControlModel.hpp> @@ -44,12 +44,12 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> //____________________________________________________________________________________________________________ -// includes of my own project +// includes of my own project //____________________________________________________________________________________________________________ #include "basecontainercontrol.hxx" //____________________________________________________________________________________________________________ -// namespace +// namespace //____________________________________________________________________________________________________________ namespace unocontrols{ @@ -60,44 +60,44 @@ namespace unocontrols{ #define CSS_TASK ::com::sun::star::task //____________________________________________________________________________________________________________ -// defines +// defines //____________________________________________________________________________________________________________ -#define SERVICENAME_STATUSINDICATOR "com.sun.star.task.XStatusIndicator" -#define IMPLEMENTATIONNAME_STATUSINDICATOR "stardiv.UnoControls.StatusIndicator" +#define SERVICENAME_STATUSINDICATOR "com.sun.star.task.XStatusIndicator" +#define IMPLEMENTATIONNAME_STATUSINDICATOR "stardiv.UnoControls.StatusIndicator" #define STATUSINDICATOR_FREEBORDER 5 // border around and between the controls -#define FIXEDTEXT_SERVICENAME "com.sun.star.awt.UnoControlFixedText" -#define FIXEDTEXT_MODELNAME "com.sun.star.awt.UnoControlFixedTextModel" -#define CONTROLNAME_TEXT "Text" // identifier the control in container -#define CONTROLNAME_PROGRESSBAR "ProgressBar" // -||- -#define STATUSINDICATOR_DEFAULT_TEXT "\0" -#define STATUSINDICATOR_BACKGROUNDCOLOR TRGB_COLORDATA( 0x00, 0xC0, 0xC0, 0xC0 ) // lighgray -#define STATUSINDICATOR_LINECOLOR_BRIGHT TRGB_COLORDATA( 0x00, 0xFF, 0xFF, 0xFF ) // white -#define STATUSINDICATOR_LINECOLOR_SHADOW TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x00 ) // black +#define FIXEDTEXT_SERVICENAME "com.sun.star.awt.UnoControlFixedText" +#define FIXEDTEXT_MODELNAME "com.sun.star.awt.UnoControlFixedTextModel" +#define CONTROLNAME_TEXT "Text" // identifier the control in container +#define CONTROLNAME_PROGRESSBAR "ProgressBar" // -||- +#define STATUSINDICATOR_DEFAULT_TEXT "\0" +#define STATUSINDICATOR_BACKGROUNDCOLOR TRGB_COLORDATA( 0x00, 0xC0, 0xC0, 0xC0 ) // lighgray +#define STATUSINDICATOR_LINECOLOR_BRIGHT TRGB_COLORDATA( 0x00, 0xFF, 0xFF, 0xFF ) // white +#define STATUSINDICATOR_LINECOLOR_SHADOW TRGB_COLORDATA( 0x00, 0x00, 0x00, 0x00 ) // black #define STATUSINDICATOR_DEFAULT_WIDTH 300 #define STATUSINDICATOR_DEFAULT_HEIGHT 25 //____________________________________________________________________________________________________________ -// structs, types +// structs, types //____________________________________________________________________________________________________________ //____________________________________________________________________________________________________________ -// class declaration +// class declaration //____________________________________________________________________________________________________________ -class StatusIndicator : public CSS_AWT::XLayoutConstrains +class StatusIndicator : public CSS_AWT::XLayoutConstrains , public CSS_TASK::XStatusIndicator , public BaseContainerControl { //------------------------------------------------------------------------------------------------------------- - // public methods + // public methods //------------------------------------------------------------------------------------------------------------- public: //--------------------------------------------------------------------------------------------------------- - // construct/destruct + // construct/destruct //--------------------------------------------------------------------------------------------------------- /**_______________________________________________________________________________________________________ @@ -128,379 +128,379 @@ class StatusIndicator : public CSS_AWT::XLayoutConstrains @onerror */ - virtual ~StatusIndicator(); + virtual ~StatusIndicator(); //--------------------------------------------------------------------------------------------------------- - // XInterface + // XInterface //--------------------------------------------------------------------------------------------------------- /**_______________________________________________________________________________________________________ - @short give answer, if interface is supported - @descr The interfaces are searched by type. + @short give answer, if interface is supported + @descr The interfaces are searched by type. - @seealso XInterface + @seealso XInterface @param "rType" is the type of searched interface. - @return Any information about found interface + @return Any information about found interface - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual CSS_UNO::Any SAL_CALL queryInterface( const CSS_UNO::Type& aType ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short increment refcount - @descr - + @short increment refcount + @descr - - @seealso XInterface - @seealso release() + @seealso XInterface + @seealso release() - @param - + @param - - @return - + @return - - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual void SAL_CALL acquire() throw(); /**_______________________________________________________________________________________________________ - @short decrement refcount - @descr - + @short decrement refcount + @descr - - @seealso XInterface - @seealso acquire() + @seealso XInterface + @seealso acquire() - @param - + @param - - @return - + @return - - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual void SAL_CALL release() throw(); //--------------------------------------------------------------------------------------------------------- - // XTypeProvider + // XTypeProvider //--------------------------------------------------------------------------------------------------------- /**_______________________________________________________________________________________________________ - @short get information about supported interfaces + @short get information about supported interfaces @descr - - @seealso XTypeProvider + @seealso XTypeProvider @param - - @return Sequence of types of all supported interfaces + @return Sequence of types of all supported interfaces - @onerror A RuntimeException is thrown. + @onerror A RuntimeException is thrown. */ virtual CSS_UNO::Sequence< CSS_UNO::Type > SAL_CALL getTypes() throw( CSS_UNO::RuntimeException ); //--------------------------------------------------------------------------------------------------------- - // XAggregation + // XAggregation //--------------------------------------------------------------------------------------------------------- /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual CSS_UNO::Any SAL_CALL queryAggregation( const CSS_UNO::Type& aType ) throw( CSS_UNO::RuntimeException ); //--------------------------------------------------------------------------------------------------------- - // XStatusIndicator + // XStatusIndicator //--------------------------------------------------------------------------------------------------------- /*-****************************************************************************************************//** - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - *//*-*****************************************************************************************************/ virtual void SAL_CALL start( - const ::rtl::OUString& sText , + const ::rtl::OUString& sText , sal_Int32 nRange ) throw( CSS_UNO::RuntimeException ); /*-****************************************************************************************************//** - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - *//*-*****************************************************************************************************/ virtual void SAL_CALL end() throw( CSS_UNO::RuntimeException ); /*-****************************************************************************************************//** - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - *//*-*****************************************************************************************************/ virtual void SAL_CALL reset() throw( CSS_UNO::RuntimeException ); /*-****************************************************************************************************//** - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - *//*-*****************************************************************************************************/ virtual void SAL_CALL setText( const ::rtl::OUString& sText ) throw( CSS_UNO::RuntimeException ); /*-****************************************************************************************************//** - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - *//*-*****************************************************************************************************/ virtual void SAL_CALL setValue( sal_Int32 nValue ) throw( CSS_UNO::RuntimeException ); //--------------------------------------------------------------------------------------------------------- - // XLayoutConstrains + // XLayoutConstrains //--------------------------------------------------------------------------------------------------------- /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual CSS_AWT::Size SAL_CALL getMinimumSize() throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual CSS_AWT::Size SAL_CALL getPreferredSize() throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual CSS_AWT::Size SAL_CALL calcAdjustedSize( const CSS_AWT::Size& aNewSize ) throw( CSS_UNO::RuntimeException ); //--------------------------------------------------------------------------------------------------------- - // XControl + // XControl //--------------------------------------------------------------------------------------------------------- /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual void SAL_CALL createPeer( - const CSS_UNO::Reference< CSS_AWT::XToolkit >& xToolkit , - const CSS_UNO::Reference< CSS_AWT::XWindowPeer >& xParent + const CSS_UNO::Reference< CSS_AWT::XToolkit >& xToolkit , + const CSS_UNO::Reference< CSS_AWT::XWindowPeer >& xParent ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual sal_Bool SAL_CALL setModel( const CSS_UNO::Reference< CSS_AWT::XControlModel >& xModel ) throw( CSS_UNO::RuntimeException ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual CSS_UNO::Reference< CSS_AWT::XControlModel > SAL_CALL getModel() throw( CSS_UNO::RuntimeException ); //--------------------------------------------------------------------------------------------------------- - // XComponent + // XComponent //--------------------------------------------------------------------------------------------------------- /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual void SAL_CALL dispose() throw( CSS_UNO::RuntimeException ); //--------------------------------------------------------------------------------------------------------- - // XWindow + // XWindow //--------------------------------------------------------------------------------------------------------- /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ - virtual void SAL_CALL setPosSize( sal_Int32 nX , - sal_Int32 nY , - sal_Int32 nWidth , - sal_Int32 nHeight , - sal_Int16 nFlags ) throw( CSS_UNO::RuntimeException ); + virtual void SAL_CALL setPosSize( sal_Int32 nX , + sal_Int32 nY , + sal_Int32 nWidth , + sal_Int32 nHeight , + sal_Int16 nFlags ) throw( CSS_UNO::RuntimeException ); //--------------------------------------------------------------------------------------------------------- - // BaseControl + // BaseControl //--------------------------------------------------------------------------------------------------------- /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ static const CSS_UNO::Sequence< ::rtl::OUString > impl_getStaticSupportedServiceNames(); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ static const ::rtl::OUString impl_getStaticImplementationName(); //____________________________________________________________________________________________________________ -// protected methods +// protected methods //____________________________________________________________________________________________________________ protected: /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual CSS_AWT::WindowDescriptor* impl_getWindowDescriptor( @@ -508,16 +508,16 @@ protected: ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual void impl_paint ( @@ -527,16 +527,16 @@ protected: ); /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ virtual void impl_recalcLayout( const CSS_AWT::WindowEvent& aEvent ); @@ -548,16 +548,16 @@ protected: private: /**_______________________________________________________________________________________________________ - @short - - @descr - + @short - + @descr - - @seealso - + @seealso - - @param - + @param - - @return - + @return - - @onerror - + @onerror - */ //____________________________________________________________________________________________________________ @@ -566,10 +566,10 @@ private: private: - CSS_UNO::Reference< CSS_AWT::XFixedText > m_xText ; - CSS_UNO::Reference< CSS_AWT::XProgressBar > m_xProgressBar ; + CSS_UNO::Reference< CSS_AWT::XFixedText > m_xText ; + CSS_UNO::Reference< CSS_AWT::XProgressBar > m_xProgressBar ; -}; // class StatusIndicator +}; // class StatusIndicator // The name space aliases are only used in the header #undef CSS_UNO @@ -577,8 +577,8 @@ private: #undef CSS_LANG #undef CSS_TASK -} // namespace unocontrols +} // namespace unocontrols -#endif // #ifndef _UNOCONTROLS_STATUSINDICATOR_CTRL_HXX +#endif // #ifndef _UNOCONTROLS_STATUSINDICATOR_CTRL_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |