Extended loplugin:referencecasting/redundantcast (clang-cl): embeddedobj

Change-Id: I345b6535df2df4770191dc1aae0ca024b747a50a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122887
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2021-09-30 12:45:33 +02:00
parent 75e2e19add
commit 89732e5bbf
2 changed files with 2 additions and 4 deletions

View file

@ -966,8 +966,7 @@ void OleEmbeddedObject::CreateOleComponent_Impl(
m_pOleComponent = pOleComponent ? pOleComponent : new OleComponent( m_xContext, this );
if ( !m_xClosePreventer.is() )
m_xClosePreventer.set( static_cast< ::cppu::OWeakObject* >( new OClosePreventer ),
uno::UNO_QUERY );
m_xClosePreventer = new OClosePreventer;
m_pOleComponent->addCloseListener( m_xClosePreventer );
}

View file

@ -307,8 +307,7 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceInitF
2 );
uno::Reference< embed::XEmbeddedObject > xResult(
static_cast< ::cppu::OWeakObject* > ( new OleEmbeddedObject( m_xContext ) ),
uno::UNO_QUERY );
new OleEmbeddedObject( m_xContext ) );
uno::Reference< embed::XEmbedPersist > xPersist( xResult, uno::UNO_QUERY_THROW );
xPersist->setPersistentEntry( xStorage,