diff options
Diffstat (limited to 'UnoControls/source/controls/progressbar.cxx')
-rw-r--r-- | UnoControls/source/controls/progressbar.cxx | 57 |
1 files changed, 13 insertions, 44 deletions
diff --git a/UnoControls/source/controls/progressbar.cxx b/UnoControls/source/controls/progressbar.cxx index 9d88ad8312f1..85653c1cc1a3 100644 --- a/UnoControls/source/controls/progressbar.cxx +++ b/UnoControls/source/controls/progressbar.cxx @@ -24,12 +24,9 @@ #include <cppuhelper/queryinterface.hxx> #include <cppuhelper/typeprovider.hxx> -#include <limits.h> - using namespace ::cppu; using namespace ::osl; using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; using namespace ::com::sun::star::awt; namespace unocontrols { @@ -54,30 +51,25 @@ ProgressBar::~ProgressBar() } // XInterface - Any SAL_CALL ProgressBar::queryInterface( const Type& rType ) { - // Attention: - // 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() ) - { - // If a delegator exists, forward question to its queryInterface. - // Delegator will ask its own queryAggregation! - aReturn = xDel->queryInterface( rType ); - } - else - { - // If a delegator is unknown, forward question to own queryAggregation. - aReturn = queryAggregation( rType ); - } + // Ask for my own supported interfaces ... + // Attention: XTypeProvider and XInterface are supported by WeakComponentImplHelper! + Any aReturn ( ::cppu::queryInterface( rType , + static_cast< XControlModel* > ( this ) , + static_cast< XProgressBar* > ( this ) + ) + ); - return aReturn; + if (aReturn.hasValue()) + return aReturn; + + // If searched interface not supported by this class ... + // ... ask baseclasses. + return BaseControl::queryInterface(rType); } // XInterface - void SAL_CALL ProgressBar::acquire() noexcept { // Attention: @@ -88,7 +80,6 @@ void SAL_CALL ProgressBar::acquire() noexcept } // XInterface - void SAL_CALL ProgressBar::release() noexcept { // Attention: @@ -110,28 +101,6 @@ Sequence< Type > SAL_CALL ProgressBar::getTypes() return ourTypeCollection.getTypes(); } -// XAggregation - -Any SAL_CALL ProgressBar::queryAggregation( const Type& aType ) -{ - // 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 ) - ) - ); - - // If searched interface not supported by this class ... - if ( !aReturn.hasValue() ) - { - // ... ask baseclasses. - aReturn = BaseControl::queryAggregation( aType ); - } - - return aReturn; -} - // XProgressBar void SAL_CALL ProgressBar::setForegroundColor( sal_Int32 nColor ) |