propctrlr: Return instead of using out param

Change-Id: I279e29f733237945bba57c674c0f5dae54cabf7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200281
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
Michael Weghorn
2026-02-25 09:04:16 +01:00
parent d6062c6b98
commit afb89406b8
2 changed files with 10 additions and 9 deletions
@@ -941,8 +941,7 @@ void OPropertyBrowserController::doInspection()
// obtain the properties of the object
std::vector<Property> aProperties;
PropertyHandlerArray aPropertyHandlers;
getPropertyHandlers(m_aInspectedObjects, aPropertyHandlers);
PropertyHandlerArray aPropertyHandlers = getPropertyHandlers(m_aInspectedObjects);
PropertyHandlerArray::iterator aHandler(aPropertyHandlers.begin());
while (aHandler != aPropertyHandlers.end())
@@ -1387,12 +1386,12 @@ Reference<XPropertyHandler> lcl_createHandler(const Reference<XComponentContext>
}
}
void OPropertyBrowserController::getPropertyHandlers(const InterfaceArray& _rObjects,
PropertyHandlerArray& _rHandlers)
OPropertyBrowserController::PropertyHandlerArray
OPropertyBrowserController::getPropertyHandlers(const InterfaceArray& _rObjects)
{
_rHandlers.resize(0);
PropertyHandlerArray aHandlers;
if (_rObjects.empty())
return;
return aHandlers;
Sequence<Any> aHandlerFactories;
if (m_xModel.is())
@@ -1406,7 +1405,7 @@ void OPropertyBrowserController::getPropertyHandlers(const InterfaceArray& _rObj
if (xHandler.is())
{
xHandler->inspect(_rObjects[0]);
_rHandlers.push_back(xHandler);
aHandlers.push_back(xHandler);
}
}
else
@@ -1428,12 +1427,14 @@ void OPropertyBrowserController::getPropertyHandlers(const InterfaceArray& _rObj
// then create a handler which composes information out of those single handlers
if (!aSingleHandlers.empty())
_rHandlers.push_back(new PropertyComposer(std::move(aSingleHandlers)));
aHandlers.push_back(new PropertyComposer(std::move(aSingleHandlers)));
}
}
// note that the handlers will not be used by our caller, if they indicate that there are no
// properties they feel responsible for
return aHandlers;
}
bool OPropertyBrowserController::impl_findObjectProperty_nothrow(
@@ -233,7 +233,7 @@ private:
/** retrieves special property handlers for our introspectee
*/
void getPropertyHandlers(const InterfaceArray& _rObjects, PropertyHandlerArray& _rHandlers);
PropertyHandlerArray getPropertyHandlers(const InterfaceArray& _rObjects);
/** called when a property changed, to broadcast any handlers which might have
registered for this property