From cbf5b21f2a65bbb342295200f6ad93a00f90733e Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 9 Dec 2016 20:00:26 +0100 Subject: Catch some misuses of VclPtr construction ...that go unnoticed due to the non-explicit VclPtr::oeprator reference_type * Change-Id: Ia63edf8425d3ecb7c7f98eb56a710ac0cceccb67 --- UnoControls/source/controls/progressmonitor.cxx | 2 +- UnoControls/source/controls/statusindicator.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'UnoControls') diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index 7016e347b716..1cb5695cc5ed 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -57,7 +57,7 @@ ProgressMonitor::ProgressMonitor( const css::uno::Reference< XComponentContext > m_xTopic_Bottom.set( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY ); m_xText_Bottom.set ( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY ); m_xButton.set ( rxContext->getServiceManager()->createInstanceWithContext( BUTTON_SERVICENAME, rxContext ), UNO_QUERY ); - m_xProgressBar = VclPtr::Create(rxContext); + m_xProgressBar = new ProgressBar(rxContext); // ... cast controls to Reference< XControl > (for "setModel"!) ... css::uno::Reference< XControl > xRef_Topic_Top ( m_xTopic_Top , UNO_QUERY ); diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx index 8df082e8f12d..a9c901dad70a 100644 --- a/UnoControls/source/controls/statusindicator.cxx +++ b/UnoControls/source/controls/statusindicator.cxx @@ -46,7 +46,7 @@ StatusIndicator::StatusIndicator( const css::uno::Reference< XComponentContext > // Create instances for fixedtext and progress ... m_xText.set( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_SERVICENAME, rxContext ), UNO_QUERY ); - m_xProgressBar = VclPtr::Create(rxContext); + m_xProgressBar = new ProgressBar(rxContext); // ... cast controls to css::uno::Reference< XControl > and set model ... // ( ProgressBar has no model !!! ) css::uno::Reference< XControl > xTextControl ( m_xText , UNO_QUERY ); -- cgit v1.2.3