Access safe members directly
Change-Id: Ib1195f4704de845448e280fabbe40580de46a97d
This commit is contained in:
parent
4f843f2bc8
commit
dd7b477e9d
@ -24,7 +24,6 @@
|
|||||||
// include files of own module
|
// include files of own module
|
||||||
|
|
||||||
#include <helper/statusindicatorfactory.hxx>
|
#include <helper/statusindicatorfactory.hxx>
|
||||||
#include <threadhelp/threadhelpbase.hxx>
|
|
||||||
#include <macros/xinterface.hxx>
|
#include <macros/xinterface.hxx>
|
||||||
#include <macros/xtypeprovider.hxx>
|
#include <macros/xtypeprovider.hxx>
|
||||||
#include <macros/generic.hxx>
|
#include <macros/generic.hxx>
|
||||||
@ -59,8 +58,7 @@ namespace framework{
|
|||||||
@devstatus ready to use
|
@devstatus ready to use
|
||||||
@threadsafe yes
|
@threadsafe yes
|
||||||
*/
|
*/
|
||||||
class StatusIndicator : private ThreadHelpBase // Order of baseclasses is necessary for right initializaton!
|
class StatusIndicator : public ::cppu::WeakImplHelper1< css::task::XStatusIndicator >
|
||||||
, public ::cppu::WeakImplHelper1< css::task::XStatusIndicator >
|
|
||||||
{
|
{
|
||||||
|
|
||||||
// member
|
// member
|
||||||
|
@ -28,8 +28,7 @@ namespace framework{
|
|||||||
|
|
||||||
|
|
||||||
StatusIndicator::StatusIndicator(StatusIndicatorFactory* pFactory)
|
StatusIndicator::StatusIndicator(StatusIndicatorFactory* pFactory)
|
||||||
: ThreadHelpBase ( )
|
: m_xFactory (pFactory)
|
||||||
, m_xFactory (pFactory)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,11 +46,7 @@ void SAL_CALL StatusIndicator::start(const OUString& sText ,
|
|||||||
(void) sText;
|
(void) sText;
|
||||||
(void) nRange;
|
(void) nRange;
|
||||||
#else
|
#else
|
||||||
// SAFE ->
|
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory);
|
||||||
Guard aReadLock(m_aLock);
|
|
||||||
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory.get(), css::uno::UNO_QUERY);
|
|
||||||
aReadLock.unlock();
|
|
||||||
// <- SAFE
|
|
||||||
if (xFactory.is())
|
if (xFactory.is())
|
||||||
{
|
{
|
||||||
StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get();
|
StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get();
|
||||||
@ -65,11 +60,7 @@ void SAL_CALL StatusIndicator::end()
|
|||||||
throw(css::uno::RuntimeException, std::exception)
|
throw(css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
#if HAVE_FEATURE_DESKTOP
|
#if HAVE_FEATURE_DESKTOP
|
||||||
// SAFE ->
|
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory);
|
||||||
Guard aReadLock(m_aLock);
|
|
||||||
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory.get(), css::uno::UNO_QUERY);
|
|
||||||
aReadLock.unlock();
|
|
||||||
// <- SAFE
|
|
||||||
if (xFactory.is())
|
if (xFactory.is())
|
||||||
{
|
{
|
||||||
StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get();
|
StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get();
|
||||||
@ -83,11 +74,7 @@ void SAL_CALL StatusIndicator::reset()
|
|||||||
throw(css::uno::RuntimeException, std::exception)
|
throw(css::uno::RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
#if HAVE_FEATURE_DESKTOP
|
#if HAVE_FEATURE_DESKTOP
|
||||||
// SAFE ->
|
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory);
|
||||||
Guard aReadLock(m_aLock);
|
|
||||||
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory.get(), css::uno::UNO_QUERY);
|
|
||||||
aReadLock.unlock();
|
|
||||||
// <- SAFE
|
|
||||||
if (xFactory.is())
|
if (xFactory.is())
|
||||||
{
|
{
|
||||||
StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get();
|
StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get();
|
||||||
@ -103,11 +90,7 @@ void SAL_CALL StatusIndicator::setText(const OUString& sText)
|
|||||||
#if !HAVE_FEATURE_DESKTOP
|
#if !HAVE_FEATURE_DESKTOP
|
||||||
(void) sText;
|
(void) sText;
|
||||||
#else
|
#else
|
||||||
// SAFE ->
|
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory);
|
||||||
Guard aReadLock(m_aLock);
|
|
||||||
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory.get(), css::uno::UNO_QUERY);
|
|
||||||
aReadLock.unlock();
|
|
||||||
// <- SAFE
|
|
||||||
if (xFactory.is())
|
if (xFactory.is())
|
||||||
{
|
{
|
||||||
StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get();
|
StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get();
|
||||||
@ -123,11 +106,7 @@ void SAL_CALL StatusIndicator::setValue(sal_Int32 nValue)
|
|||||||
#if !HAVE_FEATURE_DESKTOP
|
#if !HAVE_FEATURE_DESKTOP
|
||||||
(void) nValue;
|
(void) nValue;
|
||||||
#else
|
#else
|
||||||
// SAFE ->
|
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory);
|
||||||
Guard aReadLock(m_aLock);
|
|
||||||
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory.get(), css::uno::UNO_QUERY);
|
|
||||||
aReadLock.unlock();
|
|
||||||
// <- SAFE
|
|
||||||
if (xFactory.is())
|
if (xFactory.is())
|
||||||
{
|
{
|
||||||
StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get();
|
StatusIndicatorFactory* pFactory = (StatusIndicatorFactory*)xFactory.get();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user