Use getXWeak in svtools

Change-Id: Ia985e96eb441d03ace050f4f184a899fba897830
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150873
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski
2023-04-23 20:15:01 +03:00
parent d590454062
commit 6276e7c28e
3 changed files with 10 additions and 10 deletions

View File

@@ -387,7 +387,7 @@ void ValueItemAcc::FireAccessibleEvent( short nEventId, const uno::Any& rOldValu
accessibility::AccessibleEventObject aEvtObject;
aEvtObject.EventId = nEventId;
aEvtObject.Source = static_cast<uno::XWeak*>(this);
aEvtObject.Source = getXWeak();
aEvtObject.NewValue = rNewValue;
aEvtObject.OldValue = rOldValue;
@@ -418,7 +418,7 @@ void ValueSetAcc::FireAccessibleEvent( short nEventId, const uno::Any& rOldValue
accessibility::AccessibleEventObject aEvtObject;
aEvtObject.EventId = nEventId;
aEvtObject.Source = static_cast<uno::XWeak*>(this);
aEvtObject.Source = getXWeak();
aEvtObject.NewValue = rNewValue;
aEvtObject.OldValue = rOldValue;
@@ -952,7 +952,7 @@ void ValueSetAcc::ThrowIfDisposed()
SAL_WARN("svx", "Calling disposed object. Throwing exception:");
throw lang::DisposedException (
"object has been already disposed",
static_cast<uno::XWeak*>(this));
getXWeak());
}
else
{

View File

@@ -804,7 +804,7 @@ void ValueSet::SelectItem( sal_uInt16 nItemId )
{
Any aOldAny;
Any aNewAny;
aOldAny <<= Reference<XInterface>(static_cast<cppu::OWeakObject*>(pItemAcc));
aOldAny <<= Reference(getXWeak(pItemAcc));
ImplFireAccessibleEvent(AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldAny, aNewAny );
}
}
@@ -827,7 +827,7 @@ void ValueSet::SelectItem( sal_uInt16 nItemId )
{
Any aOldAny;
Any aNewAny;
aNewAny <<= Reference<XInterface>(static_cast<cppu::OWeakObject*>(pItemAcc));
aNewAny <<= Reference(getXWeak(pItemAcc));
ImplFireAccessibleEvent(AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, aOldAny, aNewAny);
}

View File

@@ -671,27 +671,27 @@ void SvUnoImageMap::fillImageMap( ImageMap& rMap ) const
Reference< XInterface > SvUnoImageMapRectangleObject_createInstance( const SvEventDescription* pSupportedMacroItems )
{
return static_cast<XWeak*>(new SvUnoImageMapObject( IMapObjectType::Rectangle, pSupportedMacroItems ));
return getXWeak(new SvUnoImageMapObject( IMapObjectType::Rectangle, pSupportedMacroItems ));
}
Reference< XInterface > SvUnoImageMapCircleObject_createInstance( const SvEventDescription* pSupportedMacroItems )
{
return static_cast<XWeak*>(new SvUnoImageMapObject( IMapObjectType::Circle, pSupportedMacroItems ));
return getXWeak(new SvUnoImageMapObject( IMapObjectType::Circle, pSupportedMacroItems ));
}
Reference< XInterface > SvUnoImageMapPolygonObject_createInstance( const SvEventDescription* pSupportedMacroItems )
{
return static_cast<XWeak*>(new SvUnoImageMapObject( IMapObjectType::Polygon, pSupportedMacroItems ));
return getXWeak(new SvUnoImageMapObject( IMapObjectType::Polygon, pSupportedMacroItems ));
}
Reference< XInterface > SvUnoImageMap_createInstance()
{
return static_cast<XWeak*>(new SvUnoImageMap);
return getXWeak(new SvUnoImageMap);
}
Reference< XInterface > SvUnoImageMap_createInstance( const ImageMap& rMap, const SvEventDescription* pSupportedMacroItems )
{
return static_cast<XWeak*>(new SvUnoImageMap( rMap, pSupportedMacroItems ));
return getXWeak(new SvUnoImageMap( rMap, pSupportedMacroItems ));
}
bool SvUnoImageMap_fillImageMap( const Reference< XInterface >& xImageMap, ImageMap& rMap )