loplugin:referencecasting in various
Change-Id: Id4e3d9d1bbfd47181299568afec45e996eb1eed5 Reviewed-on: https://gerrit.libreoffice.org/76071 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
bac57f75cd
commit
01782ecd9f
@ -353,7 +353,7 @@ Reference< XView > SAL_CALL BaseControl::getView()
|
||||
{
|
||||
// Ready for multithreading
|
||||
MutexGuard aGuard( m_aMutex );
|
||||
return Reference< XView >( static_cast<OWeakObject*>(this), UNO_QUERY );
|
||||
return this;
|
||||
}
|
||||
|
||||
// XControl
|
||||
|
@ -111,8 +111,7 @@ Reference< XConnectionPoint > SAL_CALL OConnectionPointContainerHelper::queryCon
|
||||
// Ready for multithreading
|
||||
MutexGuard aGuard( m_aSharedMutex );
|
||||
// If this container contains elements, build a connectionpoint-instance.
|
||||
OConnectionPointHelper* pNewConnectionPoint = new OConnectionPointHelper( m_aSharedMutex, this, aType );
|
||||
xConnectionPoint.set( static_cast<OWeakObject*>(pNewConnectionPoint), UNO_QUERY );
|
||||
xConnectionPoint = new OConnectionPointHelper( m_aSharedMutex, this, aType );
|
||||
}
|
||||
|
||||
return xConnectionPoint;
|
||||
|
@ -52,8 +52,7 @@ namespace anim
|
||||
if( xEnumerationAccess.is() )
|
||||
{
|
||||
css::uno::Reference< css::container::XEnumeration >
|
||||
xEnumeration( xEnumerationAccess->createEnumeration(),
|
||||
css::uno::UNO_QUERY );
|
||||
xEnumeration = xEnumerationAccess->createEnumeration();
|
||||
|
||||
if( xEnumeration.is() )
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ VclStatusListener<T>::VclStatusListener(T* widget, const OUString& aCommand) {
|
||||
|
||||
css::uno::Reference<css::frame::XFrame> xFrame(xDesktop->getActiveFrame());
|
||||
if (!xFrame.is())
|
||||
xFrame = css::uno::Reference<css::frame::XFrame>(xDesktop, css::uno::UNO_QUERY);
|
||||
xFrame = xDesktop;
|
||||
|
||||
mxFrame = xFrame;
|
||||
|
||||
|
@ -88,7 +88,7 @@ PropertyHelper_Hyphenation& Hyphenator::GetPropHelper_Impl()
|
||||
{
|
||||
if (!pPropHelper)
|
||||
{
|
||||
Reference< XLinguProperties > xPropSet( GetLinguProperties(), UNO_QUERY );
|
||||
Reference< XLinguProperties > xPropSet = GetLinguProperties();
|
||||
|
||||
pPropHelper.reset( new PropertyHelper_Hyphenation (static_cast<XHyphenator *>(this), xPropSet ) );
|
||||
pPropHelper->AddAsPropListener(); //! after a reference is established
|
||||
|
@ -99,7 +99,7 @@ PropertyHelper_Spelling & SpellChecker::GetPropHelper_Impl()
|
||||
{
|
||||
if (!m_pPropHelper)
|
||||
{
|
||||
Reference< XLinguProperties > xPropSet( GetLinguProperties(), UNO_QUERY );
|
||||
Reference< XLinguProperties > xPropSet = GetLinguProperties();
|
||||
|
||||
m_pPropHelper.reset( new PropertyHelper_Spelling( static_cast<XSpellChecker *>(this), xPropSet ) );
|
||||
m_pPropHelper->AddAsPropListener(); //! after a reference is established
|
||||
|
@ -90,7 +90,7 @@ PropertyHelper_Thesaurus& Thesaurus::GetPropHelper_Impl()
|
||||
{
|
||||
if (!pPropHelper)
|
||||
{
|
||||
Reference< XLinguProperties > xPropSet( GetLinguProperties(), UNO_QUERY );
|
||||
Reference< XLinguProperties > xPropSet = GetLinguProperties();
|
||||
|
||||
pPropHelper = new PropertyHelper_Thesaurus( static_cast<XThesaurus *>(this), xPropSet );
|
||||
pPropHelper->AddAsPropListener(); //! after a reference is established
|
||||
|
@ -930,7 +930,7 @@ LifetimeController::LifetimeController (::sd::ViewShellBase& rBase)
|
||||
acquire();
|
||||
mbListeningToViewShellBase = true;
|
||||
|
||||
Reference<XComponent> xComponent (rBase.GetController(), UNO_QUERY);
|
||||
Reference<XComponent> xComponent = rBase.GetController();
|
||||
if (xComponent.is())
|
||||
{
|
||||
xComponent->addEventListener(this);
|
||||
|
@ -375,8 +375,7 @@ uno::Any SAL_CALL OLESimpleStorage::getByName( const OUString& aName )
|
||||
|
||||
uno::Any aResult;
|
||||
|
||||
uno::Reference< io::XStream > xTempFile(
|
||||
io::TempFile::create(m_xContext), uno::UNO_QUERY );
|
||||
uno::Reference< io::XStream > xTempFile = io::TempFile::create(m_xContext);
|
||||
uno::Reference< io::XSeekable > xSeekable( xTempFile, uno::UNO_QUERY_THROW );
|
||||
uno::Reference< io::XOutputStream > xOutputStream = xTempFile->getOutputStream();
|
||||
uno::Reference< io::XInputStream > xInputStream = xTempFile->getInputStream();
|
||||
|
@ -875,7 +875,7 @@ bool ImportContext::importGraphicOrImageProperty(
|
||||
}
|
||||
if (xGraphic.is())
|
||||
{
|
||||
Reference<beans::XPropertySet> xProps( getControlModel(), UNO_QUERY );
|
||||
Reference<beans::XPropertySet> xProps = getControlModel();
|
||||
if (xProps.is())
|
||||
{
|
||||
xProps->setPropertyValue("Graphic", makeAny(xGraphic));
|
||||
|
Loading…
x
Reference in New Issue
Block a user