loplugin:moveparam in extensions
Change-Id: Ibbf0fff9a3540d4f723b91e2979e4465648ff203 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123385 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
ebb636473f
commit
dd5dc5fa11
13 changed files with 32 additions and 36 deletions
|
@ -157,7 +157,7 @@ namespace abp
|
|||
addressconfig::writeTemplateAddressSource( getORB(), m_aSettings.bRegisterDataSource ? m_aSettings.sRegisteredDataSourceName : m_aSettings.sDataSourceName, m_aSettings.sSelectedTable );
|
||||
|
||||
// 4. write the field mapping
|
||||
fieldmapping::writeTemplateAddressFieldMapping( getORB(), m_aSettings.aFieldMapping );
|
||||
fieldmapping::writeTemplateAddressFieldMapping( getORB(), std::map(m_aSettings.aFieldMapping) );
|
||||
}
|
||||
|
||||
void OAddressBookSourcePilot::implCleanup()
|
||||
|
|
|
@ -204,11 +204,8 @@ namespace abp
|
|||
}
|
||||
|
||||
|
||||
void writeTemplateAddressFieldMapping( const Reference< XComponentContext >& _rxContext, const MapString2String& _rFieldAssignment )
|
||||
void writeTemplateAddressFieldMapping( const Reference< XComponentContext >& _rxContext, MapString2String&& aFieldAssignment )
|
||||
{
|
||||
// want to have a non-const map for easier handling
|
||||
MapString2String aFieldAssignment( _rFieldAssignment );
|
||||
|
||||
// access the configuration information which the driver uses for determining its column names
|
||||
|
||||
// create a config node for this
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace abp
|
|||
*/
|
||||
void writeTemplateAddressFieldMapping(
|
||||
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
|
||||
const MapString2String& _rFieldAssignment
|
||||
MapString2String&& _rFieldAssignment
|
||||
);
|
||||
|
||||
|
||||
|
|
|
@ -445,10 +445,10 @@ namespace pcr
|
|||
switch ( nControlType )
|
||||
{
|
||||
case PropertyControlType::ListBox:
|
||||
aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, aListEntries, false, true );
|
||||
aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, std::move(aListEntries), false, true );
|
||||
break;
|
||||
case PropertyControlType::ComboBox:
|
||||
aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, aListEntries, true );
|
||||
aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, std::move(aListEntries), true );
|
||||
break;
|
||||
default:
|
||||
aDescriptor.Control = _rxControlFactory->createPropertyControl( nControlType, false );
|
||||
|
|
|
@ -1264,10 +1264,10 @@ namespace pcr
|
|||
|
||||
// create the control
|
||||
if ( PROPERTY_ID_TARGET_FRAME == nPropId )
|
||||
aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, aListEntries, false );
|
||||
aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, std::move(aListEntries), false );
|
||||
else
|
||||
{
|
||||
aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, aListEntries, false, false );
|
||||
aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, std::move(aListEntries), false, false );
|
||||
bNeedDefaultStringIfVoidAllowed = true;
|
||||
}
|
||||
}
|
||||
|
@ -1333,7 +1333,7 @@ namespace pcr
|
|||
aListEntries.resize( aDatasources.getLength() );
|
||||
std::copy( aDatasources.begin(), aDatasources.end(), aListEntries.begin() );
|
||||
aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl(
|
||||
_rxControlFactory, aListEntries, true );
|
||||
_rxControlFactory, std::move(aListEntries), true );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1342,7 +1342,7 @@ namespace pcr
|
|||
std::vector< OUString > aFieldNames;
|
||||
impl_initFieldList_nothrow( aFieldNames );
|
||||
aDescriptor.Control = PropertyHandlerHelper::createComboBoxControl(
|
||||
_rxControlFactory, aFieldNames, false );
|
||||
_rxControlFactory, std::move(aFieldNames), false );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2461,7 +2461,7 @@ namespace pcr
|
|||
else
|
||||
impl_fillQueryNames_throw( aNames );
|
||||
}
|
||||
_out_rProperty.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, aNames, true );
|
||||
_out_rProperty.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, std::move(aNames), true );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2572,7 +2572,7 @@ namespace pcr
|
|||
else
|
||||
impl_fillTableNames_throw( aListEntries );
|
||||
}
|
||||
_out_rDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, aListEntries, false );
|
||||
_out_rDescriptor.Control = PropertyHandlerHelper::createComboBoxControl( _rxControlFactory, std::move(aListEntries), false );
|
||||
}
|
||||
break;
|
||||
case ListSourceType_SQL:
|
||||
|
|
|
@ -109,7 +109,7 @@ namespace pcr
|
|||
{
|
||||
Reference< XPropertyControl > lcl_implCreateListLikeControl(
|
||||
const Reference< XPropertyControlFactory >& _rxControlFactory,
|
||||
const std::vector< OUString >& _rInitialListEntries,
|
||||
std::vector< OUString >&& _rInitialListEntries,
|
||||
bool _bReadOnlyControl,
|
||||
bool _bSorted,
|
||||
bool _bTrueIfListBoxFalseIfComboBox
|
||||
|
@ -122,20 +122,19 @@ namespace pcr
|
|||
UNO_QUERY_THROW
|
||||
);
|
||||
|
||||
std::vector< OUString > aInitialEntries( _rInitialListEntries );
|
||||
if ( _bSorted )
|
||||
std::sort( aInitialEntries.begin(), aInitialEntries.end() );
|
||||
std::sort( _rInitialListEntries.begin(), _rInitialListEntries.end() );
|
||||
|
||||
for (auto const& initialEntry : aInitialEntries)
|
||||
for (auto const& initialEntry : _rInitialListEntries)
|
||||
xListControl->appendListEntry(initialEntry);
|
||||
return xListControl;
|
||||
}
|
||||
}
|
||||
|
||||
Reference< XPropertyControl > PropertyHandlerHelper::createListBoxControl( const Reference< XPropertyControlFactory >& _rxControlFactory,
|
||||
const std::vector< OUString >& _rInitialListEntries, bool _bReadOnlyControl, bool _bSorted )
|
||||
std::vector< OUString >&& _rInitialListEntries, bool _bReadOnlyControl, bool _bSorted )
|
||||
{
|
||||
return lcl_implCreateListLikeControl(_rxControlFactory, _rInitialListEntries, _bReadOnlyControl, _bSorted, true);
|
||||
return lcl_implCreateListLikeControl(_rxControlFactory, std::move(_rInitialListEntries), _bReadOnlyControl, _bSorted, true);
|
||||
}
|
||||
|
||||
Reference< XPropertyControl > PropertyHandlerHelper::createListBoxControl( const Reference< XPropertyControlFactory >& _rxControlFactory,
|
||||
|
@ -144,13 +143,13 @@ namespace pcr
|
|||
std::vector<OUString> aInitialListEntries;
|
||||
for (size_t i = 0; i < nElements; ++i)
|
||||
aInitialListEntries.push_back(PcrRes(pTransIds[i]));
|
||||
return lcl_implCreateListLikeControl(_rxControlFactory, aInitialListEntries, _bReadOnlyControl, /*_bSorted*/false, true);
|
||||
return lcl_implCreateListLikeControl(_rxControlFactory, std::move(aInitialListEntries), _bReadOnlyControl, /*_bSorted*/false, true);
|
||||
}
|
||||
|
||||
Reference< XPropertyControl > PropertyHandlerHelper::createComboBoxControl( const Reference< XPropertyControlFactory >& _rxControlFactory,
|
||||
const std::vector< OUString >& _rInitialListEntries, bool _bSorted )
|
||||
std::vector< OUString >&& _rInitialListEntries, bool _bSorted )
|
||||
{
|
||||
return lcl_implCreateListLikeControl( _rxControlFactory, _rInitialListEntries, /*_bReadOnlyControl*/false, _bSorted, false );
|
||||
return lcl_implCreateListLikeControl( _rxControlFactory, std::move(_rInitialListEntries), /*_bReadOnlyControl*/false, _bSorted, false );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ namespace pcr
|
|||
static css::uno::Reference< css::inspection::XPropertyControl >
|
||||
createListBoxControl(
|
||||
const css::uno::Reference< css::inspection::XPropertyControlFactory >& _rxControlFactory,
|
||||
const std::vector< OUString >& _rInitialListEntries,
|
||||
std::vector< OUString >&& _rInitialListEntries,
|
||||
bool _bReadOnlyControl,
|
||||
bool _bSorted
|
||||
);
|
||||
|
@ -139,7 +139,7 @@ namespace pcr
|
|||
static css::uno::Reference< css::inspection::XPropertyControl >
|
||||
createComboBoxControl(
|
||||
const css::uno::Reference< css::inspection::XPropertyControlFactory >& _rxControlFactory,
|
||||
const std::vector< OUString >& _rInitialListEntries,
|
||||
std::vector< OUString >&& _rInitialListEntries,
|
||||
bool _bSorted
|
||||
);
|
||||
|
||||
|
|
|
@ -208,7 +208,7 @@ namespace pcr
|
|||
|
||||
// inspect again, if we already have inspectees
|
||||
if ( !m_aInspectedObjects.empty() )
|
||||
impl_rebindToInspectee_nothrow( m_aInspectedObjects );
|
||||
impl_rebindToInspectee_nothrow( std::vector(m_aInspectedObjects) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -643,7 +643,7 @@ namespace pcr
|
|||
// Even if they had an API for this, we do not know whether they were
|
||||
// originally created read-only, or if they are read-only just because
|
||||
// the model was.
|
||||
impl_rebindToInspectee_nothrow( m_aInspectedObjects );
|
||||
impl_rebindToInspectee_nothrow( std::vector(m_aInspectedObjects) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -907,7 +907,7 @@ namespace pcr
|
|||
}
|
||||
|
||||
|
||||
void OPropertyBrowserController::impl_rebindToInspectee_nothrow( const InterfaceArray& _rObjects )
|
||||
void OPropertyBrowserController::impl_rebindToInspectee_nothrow( InterfaceArray&& _rObjects )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -915,7 +915,7 @@ namespace pcr
|
|||
stopInspection( true );
|
||||
|
||||
// inspect the new object(s)
|
||||
m_aInspectedObjects = _rObjects;
|
||||
m_aInspectedObjects = std::move(_rObjects);
|
||||
doInspection();
|
||||
|
||||
// update the user interface
|
||||
|
@ -1428,7 +1428,7 @@ namespace pcr
|
|||
|
||||
// then create a handler which composes information out of those single handlers
|
||||
if ( !aSingleHandlers.empty() )
|
||||
_rHandlers.push_back( new PropertyComposer( aSingleHandlers ) );
|
||||
_rHandlers.push_back( new PropertyComposer( std::move(aSingleHandlers) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ namespace pcr
|
|||
void doInspection();
|
||||
|
||||
// bind the browser to m_xIntrospecteeAsProperty
|
||||
void impl_rebindToInspectee_nothrow( const InterfaceArray& _rObjects );
|
||||
void impl_rebindToInspectee_nothrow( InterfaceArray&& _rObjects );
|
||||
|
||||
/** retrieves special property handlers for our introspectee
|
||||
*/
|
||||
|
|
|
@ -82,9 +82,9 @@ namespace pcr
|
|||
// of supported properties per handler). Shouldn't we cache this? So that it is O( log k )?
|
||||
|
||||
|
||||
PropertyComposer::PropertyComposer( const std::vector< Reference< XPropertyHandler > >& _rSlaveHandlers )
|
||||
PropertyComposer::PropertyComposer( std::vector< Reference< XPropertyHandler > >&& _rSlaveHandlers )
|
||||
:PropertyComposer_Base ( m_aMutex )
|
||||
,m_aSlaveHandlers ( _rSlaveHandlers )
|
||||
,m_aSlaveHandlers ( std::move(_rSlaveHandlers) )
|
||||
,m_aPropertyListeners ( m_aMutex )
|
||||
,m_bSupportedPropertiesAreKnown ( false )
|
||||
{
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace pcr
|
|||
@param _rSlaveHandlers
|
||||
the set of slave handlers to invoke. Must not be <NULL/>
|
||||
*/
|
||||
explicit PropertyComposer( const std::vector< css::uno::Reference< css::inspection::XPropertyHandler > >& _rSlaveHandlers );
|
||||
explicit PropertyComposer( std::vector< css::uno::Reference< css::inspection::XPropertyHandler > >&& _rSlaveHandlers );
|
||||
|
||||
public:
|
||||
// XPropertyHandler overridables
|
||||
|
|
|
@ -295,7 +295,7 @@ namespace pcr
|
|||
}
|
||||
|
||||
LineDescriptor aDescriptor;
|
||||
aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, aListEntries, false, true );
|
||||
aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, std::move(aListEntries), false, true );
|
||||
aDescriptor.DisplayName = m_pInfoService->getPropertyTranslation( nPropId );
|
||||
aDescriptor.Category = "General";
|
||||
aDescriptor.HelpURL = HelpIdUrl::getHelpURL( m_pInfoService->getPropertyHelpId( nPropId ) );
|
||||
|
|
|
@ -391,7 +391,7 @@ namespace pcr
|
|||
switch ( nControlType )
|
||||
{
|
||||
case PropertyControlType::ListBox:
|
||||
aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, aListEntries, false, false );
|
||||
aDescriptor.Control = PropertyHandlerHelper::createListBoxControl( _rxControlFactory, std::move(aListEntries), false, false );
|
||||
break;
|
||||
case PropertyControlType::NumericField:
|
||||
aDescriptor.Control = PropertyHandlerHelper::createNumericControl( _rxControlFactory, 0, aMinValue, aMaxValue );
|
||||
|
|
Loading…
Reference in a new issue