diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-12-09 20:00:26 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-12-09 20:00:26 +0100 |
commit | cbf5b21f2a65bbb342295200f6ad93a00f90733e (patch) | |
tree | 2920078d64bccf3cff38ad35a1d5b0899470f471 /UnoControls | |
parent | c260580daa4fe78093265c1359c4d54677d76470 (diff) |
Catch some misuses of VclPtr construction
...that go unnoticed due to the non-explicit VclPtr::oeprator reference_type *
Change-Id: Ia63edf8425d3ecb7c7f98eb56a710ac0cceccb67
Diffstat (limited to 'UnoControls')
-rw-r--r-- | UnoControls/source/controls/progressmonitor.cxx | 2 | ||||
-rw-r--r-- | UnoControls/source/controls/statusindicator.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
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<ProgressBar>::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<ProgressBar>::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 ); |