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