loplugin:reftotemp in scripting..uui

Change-Id: I6953958b4429dd0fa1a44d02b0b49618f97baf90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176500
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2024-11-12 21:02:56 +02:00
parent ec3850e661
commit a34d9e3619
12 changed files with 34 additions and 34 deletions

View file

@ -76,13 +76,13 @@ public:
{ {
mbPasswordRequested = false; mbPasswordRequested = false;
css::uno::Sequence<css::uno::Reference<css::task::XInteractionContinuation>> const &rContinuations = rRequest->getContinuations(); css::uno::Sequence<css::uno::Reference<css::task::XInteractionContinuation>> const aContinuations = rRequest->getContinuations();
css::uno::Any const aRequest(rRequest->getRequest()); css::uno::Any const aRequest(rRequest->getRequest());
if (handlePasswordRequest(rContinuations, aRequest)) if (handlePasswordRequest(aContinuations, aRequest))
return true; return true;
for (auto const & cont : rContinuations) for (auto const & cont : aContinuations)
{ {
css::uno::Reference<css::task::XInteractionApprove> xApprove(cont, css::uno::UNO_QUERY); css::uno::Reference<css::task::XInteractionApprove> xApprove(cont, css::uno::UNO_QUERY);
if (xApprove.is()) if (xApprove.is())

View file

@ -16,7 +16,7 @@
inline Fraction conversionFract(o3tl::Length from, o3tl::Length to) inline Fraction conversionFract(o3tl::Length from, o3tl::Length to)
{ {
const auto & [ mul, div ] = o3tl::getConversionMulDiv(from, to); const auto[mul, div] = o3tl::getConversionMulDiv(from, to);
return { mul, div }; return { mul, div };
} }

View file

@ -554,19 +554,19 @@ namespace dlgprov
try try
{ {
// call method // call method
const Reference< XIdlMethod >& rxMethod = m_xIntrospectionAccess-> const Reference< XIdlMethod > xMethod = m_xIntrospectionAccess->
getMethod( aMethodName, MethodConcept::ALL - MethodConcept::DANGEROUS ); getMethod( aMethodName, MethodConcept::ALL - MethodConcept::DANGEROUS );
Reference< XMaterialHolder > xMaterialHolder = Reference< XMaterialHolder > xMaterialHolder =
Reference< XMaterialHolder >::query( m_xIntrospectionAccess ); Reference< XMaterialHolder >::query( m_xIntrospectionAccess );
Any aHandlerObject = xMaterialHolder->getMaterial(); Any aHandlerObject = xMaterialHolder->getMaterial();
Sequence< Reference< XIdlClass > > aParamTypeSeq = rxMethod->getParameterTypes(); Sequence< Reference< XIdlClass > > aParamTypeSeq = xMethod->getParameterTypes();
sal_Int32 nParamCount = aParamTypeSeq.getLength(); sal_Int32 nParamCount = aParamTypeSeq.getLength();
if( nParamCount == 0 ) if( nParamCount == 0 )
{ {
Sequence<Any> args; Sequence<Any> args;
rxMethod->invoke( aHandlerObject, args ); xMethod->invoke( aHandlerObject, args );
bHandled = true; bHandled = true;
} }
else if( nParamCount == 2 ) else if( nParamCount == 2 )
@ -585,7 +585,7 @@ namespace dlgprov
pArgs[0] <<= xWindow; pArgs[0] <<= xWindow;
} }
pArgs[1] = aEventObject; pArgs[1] = aEventObject;
aRet = rxMethod->invoke( aHandlerObject, Args ); aRet = xMethod->invoke( aHandlerObject, Args );
bHandled = true; bHandled = true;
} }
} }

View file

@ -692,7 +692,7 @@ OUString AccessibilityTools::debugName(accessibility::XAccessibleAction* xAct)
r.append("description=\"" + xAct->getAccessibleActionDescription(i) + "\""); r.append("description=\"" + xAct->getAccessibleActionDescription(i) + "\"");
const auto& xKeyBinding = xAct->getAccessibleActionKeyBinding(i); const auto xKeyBinding = xAct->getAccessibleActionKeyBinding(i);
if (xKeyBinding) if (xKeyBinding)
{ {
r.append(" keybindings=["); r.append(" keybindings=[");

View file

@ -175,7 +175,7 @@ void test::AccessibleTestBase::collectText(
const uno::Reference<accessibility::XAccessibleContext>& xContext, rtl::OUStringBuffer& buffer, const uno::Reference<accessibility::XAccessibleContext>& xContext, rtl::OUStringBuffer& buffer,
bool onlyChildren) bool onlyChildren)
{ {
const auto& roleName = AccessibilityTools::getRoleName(xContext->getAccessibleRole()); const auto roleName = AccessibilityTools::getRoleName(xContext->getAccessibleRole());
std::cout << "collecting text for child of role " << roleName << "..." << std::endl; std::cout << "collecting text for child of role " << roleName << "..." << std::endl;
@ -243,7 +243,7 @@ test::AccessibleTestBase::getFirstRelationTargetOfType(
{ {
for (sal_Int32 i = 0; i < relset->getRelationCount(); ++i) for (sal_Int32 i = 0; i < relset->getRelationCount(); ++i)
{ {
const auto& rel = relset->getRelation(i); const auto rel = relset->getRelation(i);
if (rel.RelationType == relationType) if (rel.RelationType == relationType)
{ {
for (const uno::Reference<accessibility::XAccessible>& targetAccessible : for (const uno::Reference<accessibility::XAccessible>& targetAccessible :
@ -280,7 +280,7 @@ void test::AccessibleTestBase::dumpA11YTree(
if (i > 0) if (i > 0)
std::cout << ", "; std::cout << ", ";
const auto& rel = xRelSet->getRelation(i); const auto rel = xRelSet->getRelation(i);
std::cout << "(type=" << AccessibilityTools::getRelationTypeName(rel.RelationType) std::cout << "(type=" << AccessibilityTools::getRelationTypeName(rel.RelationType)
<< " (" << static_cast<int>(rel.RelationType) << ")"; << " (" << static_cast<int>(rel.RelationType) << ")";
std::cout << " targets=["; std::cout << " targets=[";

View file

@ -113,7 +113,7 @@ namespace toolkit
sal_Int32 WindowStyleSettings::ImplGetStyleColor( Color const & (StyleSettings::*i_pGetter)() const ) const sal_Int32 WindowStyleSettings::ImplGetStyleColor( Color const & (StyleSettings::*i_pGetter)() const ) const
{ {
const VclPtr<vcl::Window>& pWindow = pOwningWindow->GetWindow(); const VclPtr<vcl::Window> pWindow = pOwningWindow->GetWindow();
const AllSettings aAllSettings = pWindow->GetSettings(); const AllSettings aAllSettings = pWindow->GetSettings();
const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings(); const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings();
return sal_Int32((aStyleSettings.*i_pGetter)()); return sal_Int32((aStyleSettings.*i_pGetter)());
@ -131,7 +131,7 @@ namespace toolkit
FontDescriptor WindowStyleSettings::ImplGetStyleFont( vcl::Font const & (StyleSettings::*i_pGetter)() const ) const FontDescriptor WindowStyleSettings::ImplGetStyleFont( vcl::Font const & (StyleSettings::*i_pGetter)() const ) const
{ {
const VclPtr<vcl::Window>& pWindow = pOwningWindow->GetWindow(); const VclPtr<vcl::Window> pWindow = pOwningWindow->GetWindow();
const AllSettings aAllSettings = pWindow->GetSettings(); const AllSettings aAllSettings = pWindow->GetSettings();
const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings(); const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings();
return VCLUnoHelper::CreateFontDescriptor( (aStyleSettings.*i_pGetter)() ); return VCLUnoHelper::CreateFontDescriptor( (aStyleSettings.*i_pGetter)() );
@ -375,7 +375,7 @@ namespace toolkit
::sal_Int32 SAL_CALL WindowStyleSettings::getFaceGradientColor() ::sal_Int32 SAL_CALL WindowStyleSettings::getFaceGradientColor()
{ {
StyleMethodGuard aGuard( pOwningWindow ); StyleMethodGuard aGuard( pOwningWindow );
const VclPtr<vcl::Window>& pWindow = pOwningWindow->GetWindow(); const VclPtr<vcl::Window> pWindow = pOwningWindow->GetWindow();
const AllSettings aAllSettings = pWindow->GetSettings(); const AllSettings aAllSettings = pWindow->GetSettings();
const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings(); const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings();
return sal_Int32(aStyleSettings.GetFaceGradientColor()); return sal_Int32(aStyleSettings.GetFaceGradientColor());
@ -665,7 +665,7 @@ namespace toolkit
::sal_Int32 SAL_CALL WindowStyleSettings::getSeparatorColor() ::sal_Int32 SAL_CALL WindowStyleSettings::getSeparatorColor()
{ {
StyleMethodGuard aGuard( pOwningWindow ); StyleMethodGuard aGuard( pOwningWindow );
const VclPtr<vcl::Window>& pWindow = pOwningWindow->GetWindow(); const VclPtr<vcl::Window> pWindow = pOwningWindow->GetWindow();
const AllSettings aAllSettings = pWindow->GetSettings(); const AllSettings aAllSettings = pWindow->GetSettings();
const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings(); const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings();
return sal_Int32(aStyleSettings.GetSeparatorColor()); return sal_Int32(aStyleSettings.GetSeparatorColor());
@ -731,7 +731,7 @@ namespace toolkit
sal_Bool SAL_CALL WindowStyleSettings::getHighContrastMode() sal_Bool SAL_CALL WindowStyleSettings::getHighContrastMode()
{ {
StyleMethodGuard aGuard( pOwningWindow ); StyleMethodGuard aGuard( pOwningWindow );
const VclPtr<vcl::Window>& pWindow = pOwningWindow->GetWindow(); const VclPtr<vcl::Window> pWindow = pOwningWindow->GetWindow();
const AllSettings aAllSettings = pWindow->GetSettings(); const AllSettings aAllSettings = pWindow->GetSettings();
const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings(); const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings();
return aStyleSettings.GetHighContrastMode(); return aStyleSettings.GetHighContrastMode();

View file

@ -53,7 +53,7 @@ namespace svt::table
// set proper pointer // set proper pointer
PointerStyle aNewPointer( PointerStyle::Arrow ); PointerStyle aNewPointer( PointerStyle::Arrow );
ColumnMetrics const & columnMetrics( i_tableControl.getColumnMetrics( m_nResizingColumn ) ); ColumnMetrics const columnMetrics( i_tableControl.getColumnMetrics( m_nResizingColumn ) );
if ( ( aPoint.X() > tableSize.Width() ) if ( ( aPoint.X() > tableSize.Width() )
|| ( aPoint.X() < columnMetrics.nStartPixel ) || ( aPoint.X() < columnMetrics.nStartPixel )
) )

View file

@ -3028,7 +3028,7 @@ Content::ResourceType Content::resourceTypeForLocks(
} }
} }
const OUString & rURL = m_xIdentifier->getContentIdentifier(); const OUString aURL = m_xIdentifier->getContentIdentifier();
if ( eResourceTypeForLocks == UNKNOWN ) if ( eResourceTypeForLocks == UNKNOWN )
{ {
@ -3200,7 +3200,7 @@ Content::ResourceType Content::resourceTypeForLocks(
{ {
SAL_WARN_IF( SAL_WARN_IF(
eResourceTypeForLocks != m_eResourceTypeForLocks, "ucb.ucp.webdav", eResourceTypeForLocks != m_eResourceTypeForLocks, "ucb.ucp.webdav",
"different resource types for <" << rURL << ">: " "different resource types for <" << aURL << ">: "
<< +eResourceTypeForLocks << " vs. " << +m_eResourceTypeForLocks); << +eResourceTypeForLocks << " vs. " << +m_eResourceTypeForLocks);
} }
SAL_INFO( "ucb.ucp.webdav", "resourceTypeForLocks() - URL: <" SAL_INFO( "ucb.ucp.webdav", "resourceTypeForLocks() - URL: <"
@ -3984,7 +3984,7 @@ Content::ResourceType Content::getResourceType(
osl::MutexGuard aGuard( m_aMutex ); osl::MutexGuard aGuard( m_aMutex );
xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) ); xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) );
} }
const Content::ResourceType & ret = getResourceType( xEnv, xResAccess ); const Content::ResourceType ret = getResourceType( xEnv, xResAccess );
{ {
osl::Guard< osl::Mutex > aGuard( m_aMutex ); osl::Guard< osl::Mutex > aGuard( m_aMutex );
m_xResAccess.reset( new DAVResourceAccess( *xResAccess ) ); m_xResAccess.reset( new DAVResourceAccess( *xResAccess ) );

View file

@ -91,15 +91,15 @@ const uno::Sequence< beans::Property > & PropertySetInfo::getPropertiesImpl()
xSet->getPropertySetInfo() ); xSet->getPropertySetInfo() );
if ( xInfo.is() ) if ( xInfo.is() )
{ {
const uno::Sequence< beans::Property >& rAddProps const uno::Sequence< beans::Property > aAddProps
= xInfo->getProperties(); = xInfo->getProperties();
sal_Int32 nAddProps = rAddProps.getLength(); sal_Int32 nAddProps = aAddProps.getLength();
if ( nAddProps > 0 ) if ( nAddProps > 0 )
{ {
sal_Int32 nPos = m_xProps->getLength(); sal_Int32 nPos = m_xProps->getLength();
m_xProps->realloc( nPos + nAddProps ); m_xProps->realloc( nPos + nAddProps );
std::copy(rAddProps.begin(), rAddProps.end(), std::copy(aAddProps.begin(), aAddProps.end(),
std::next(m_xProps->getArray(), nPos)); std::next(m_xProps->getArray(), nPos));
} }
} }

View file

@ -193,12 +193,12 @@ public:
SvtLinguConfigItem::SvtLinguConfigItem() : SvtLinguConfigItem::SvtLinguConfigItem() :
utl::ConfigItem( u"Office.Linguistic"_ustr ) utl::ConfigItem( u"Office.Linguistic"_ustr )
{ {
const uno::Sequence< OUString > &rPropertyNames = GetPropertyNames(); const uno::Sequence< OUString > aPropertyNames = GetPropertyNames();
LoadOptions( rPropertyNames ); LoadOptions( aPropertyNames );
ClearModified(); ClearModified();
// request notify events when properties change // request notify events when properties change
EnableNotification( rPropertyNames ); EnableNotification( aPropertyNames );
} }
void SvtLinguConfigItem::Notify( const uno::Sequence< OUString > &rPropertyNames ) void SvtLinguConfigItem::Notify( const uno::Sequence< OUString > &rPropertyNames )

View file

@ -180,8 +180,8 @@ namespace DOM
} }
Reference< XElement > aElement; Reference< XElement > aElement;
const OUString& aPrefix(SvXMLImport::getNamespacePrefixFromToken(nElement, nullptr)); const OUString aPrefix(SvXMLImport::getNamespacePrefixFromToken(nElement, nullptr));
const OUString& aURI( SvXMLImport::getNamespaceURIFromToken( nElement ) ); const OUString aURI( SvXMLImport::getNamespaceURIFromToken( nElement ) );
OUString aQualifiedName( SvXMLImport::getNameFromToken( nElement ) ); OUString aQualifiedName( SvXMLImport::getNameFromToken( nElement ) );
if( !aPrefix.isEmpty() ) if( !aPrefix.isEmpty() )
aQualifiedName = aPrefix + SvXMLImport::aNamespaceSeparator + aQualifiedName; aQualifiedName = aPrefix + SvXMLImport::aNamespaceSeparator + aQualifiedName;
@ -246,8 +246,8 @@ namespace DOM
for (auto &it : sax_fastparser::castToFastAttributeList( xAttribs )) for (auto &it : sax_fastparser::castToFastAttributeList( xAttribs ))
{ {
sal_Int32 nAttrToken = it.getToken(); sal_Int32 nAttrToken = it.getToken();
const OUString& aAttrPrefix(SvXMLImport::getNamespacePrefixFromToken(nAttrToken, nullptr)); const OUString aAttrPrefix(SvXMLImport::getNamespacePrefixFromToken(nAttrToken, nullptr));
const OUString& aAttrURI( SvXMLImport::getNamespaceURIFromToken( nAttrToken ) ); const OUString aAttrURI( SvXMLImport::getNamespaceURIFromToken( nAttrToken ) );
OUString aAttrQualifiedName( SvXMLImport::getNameFromToken( nAttrToken ) ); OUString aAttrQualifiedName( SvXMLImport::getNameFromToken( nAttrToken ) );
if( !aAttrPrefix.isEmpty() ) if( !aAttrPrefix.isEmpty() )
aAttrQualifiedName = aAttrPrefix + SvXMLImport::aNamespaceSeparator + aAttrQualifiedName; aAttrQualifiedName = aAttrPrefix + SvXMLImport::aNamespaceSeparator + aAttrQualifiedName;
@ -297,7 +297,7 @@ namespace DOM
Reference< XElement > aElement(aNode, UNO_QUERY); Reference< XElement > aElement(aNode, UNO_QUERY);
OUString aRefName; OUString aRefName;
const OUString& aPrefix = aElement->getPrefix(); const OUString aPrefix = aElement->getPrefix();
if (!aPrefix.isEmpty()) if (!aPrefix.isEmpty())
aRefName = aPrefix + SvXMLImport::aNamespaceSeparator + aElement->getTagName(); aRefName = aPrefix + SvXMLImport::aNamespaceSeparator + aElement->getTagName();
else else

View file

@ -656,7 +656,7 @@ UUIInteractionHelper::handlePasswordRequest(
// parameters to be filled for the call to handlePasswordRequest_ // parameters to be filled for the call to handlePasswordRequest_
uno::Reference<awt::XWindow> xParent = getParentXWindow(); uno::Reference<awt::XWindow> xParent = getParentXWindow();
task::PasswordRequestMode nMode = task::PasswordRequestMode_PASSWORD_ENTER; task::PasswordRequestMode nMode = task::PasswordRequestMode_PASSWORD_ENTER;
uno::Sequence< uno::Reference< task::XInteractionContinuation > > const & rContinuations = rRequest->getContinuations(); uno::Sequence< uno::Reference< task::XInteractionContinuation > > const aContinuations = rRequest->getContinuations();
OUString aDocumentName; OUString aDocumentName;
sal_uInt16 nMaxPasswordLen = 0; // any length sal_uInt16 nMaxPasswordLen = 0; // any length
bool bIsPasswordToModify = false; bool bIsPasswordToModify = false;
@ -715,7 +715,7 @@ UUIInteractionHelper::handlePasswordRequest(
if (bDoHandleRequest) if (bDoHandleRequest)
{ {
handlePasswordRequest_( Application::GetFrameWeld(xParent), nMode, rContinuations, handlePasswordRequest_( Application::GetFrameWeld(xParent), nMode, aContinuations,
aDocumentName, nMaxPasswordLen, bIsPasswordToModify ); aDocumentName, nMaxPasswordLen, bIsPasswordToModify );
return true; return true;
} }