summaryrefslogtreecommitdiffstats
path: root/UnoControls/source/controls/progressbar.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'UnoControls/source/controls/progressbar.cxx')
-rw-r--r--UnoControls/source/controls/progressbar.cxx56
1 files changed, 13 insertions, 43 deletions
diff --git a/UnoControls/source/controls/progressbar.cxx b/UnoControls/source/controls/progressbar.cxx
index 9d88ad8312f1..1cf0bc08a36f 100644
--- a/UnoControls/source/controls/progressbar.cxx
+++ b/UnoControls/source/controls/progressbar.cxx
@@ -24,8 +24,6 @@
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/typeprovider.hxx>
-#include <limits.h>
-
using namespace ::cppu;
using namespace ::osl;
using namespace ::com::sun::star::uno;
@@ -54,30 +52,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 +81,6 @@ void SAL_CALL ProgressBar::acquire() noexcept
}
// XInterface
-
void SAL_CALL ProgressBar::release() noexcept
{
// Attention:
@@ -110,28 +102,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 )