'>>=' with rhs Any is a copy assignment
replace '>>=' operator with '=' where return value is not checked and simplify. (note: switches lhs with rhs) Change-Id: I0d283e8786ea996ed80d7aa9d8a4ea930a3d52f8 Reviewed-on: https://gerrit.libreoffice.org/30004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
17cbea4159
commit
7567a4c230
@@ -1438,9 +1438,7 @@ bool implUpdateObject(const Reference< XRowUpdate >& _rxUpdatedObject,
|
||||
{
|
||||
case TypeClass_ANY:
|
||||
{
|
||||
Any aInnerValue;
|
||||
_rValue >>= aInnerValue;
|
||||
bSuccessfullyReRouted = implUpdateObject(_rxUpdatedObject, _nColumnIndex, aInnerValue);
|
||||
bSuccessfullyReRouted = implUpdateObject(_rxUpdatedObject, _nColumnIndex, _rValue);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1546,9 +1544,7 @@ bool implSetObject( const Reference< XParameters >& _rxParameters,
|
||||
|
||||
case TypeClass_ANY:
|
||||
{
|
||||
Any aInnerValue;
|
||||
_rValue >>= aInnerValue;
|
||||
bSuccessfullyReRouted = implSetObject(_rxParameters, _nColumnIndex, aInnerValue);
|
||||
bSuccessfullyReRouted = implSetObject(_rxParameters, _nColumnIndex, _rValue);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@@ -1552,8 +1552,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
|
||||
OUString aName;
|
||||
column->getPropertyValue(PROPERTY_NAME) >>= aName;
|
||||
|
||||
Any aValue;
|
||||
column->getPropertyValue(PROPERTY_VALUE) >>= aValue;
|
||||
const Any aValue = column->getPropertyValue(PROPERTY_VALUE);
|
||||
|
||||
OUStringBuffer aSQL;
|
||||
const OUString aQuote = m_xMetaData->getIdentifierQuoteString();
|
||||
|
@@ -88,13 +88,12 @@ void OSQLMessageDialog::initialize(Sequence<Any> const & args) throw (css::uno::
|
||||
{
|
||||
OUString title;
|
||||
Reference< css::awt::XWindow > parentWindow;
|
||||
css::uno::Any sqlException;
|
||||
|
||||
if ((args.getLength() == 3) && (args[0] >>= title) && (args[1] >>= parentWindow) && (args[2] >>= sqlException)) {
|
||||
if ((args.getLength() == 3) && (args[0] >>= title) && (args[1] >>= parentWindow)) {
|
||||
Sequence<Any> s(3);
|
||||
s[0] <<= PropertyValue( "Title", -1, makeAny(title), PropertyState_DIRECT_VALUE);
|
||||
s[1] <<= PropertyValue( "ParentWindow", -1, makeAny(parentWindow), PropertyState_DIRECT_VALUE);
|
||||
s[2] <<= PropertyValue( "SQLException", -1, sqlException, PropertyState_DIRECT_VALUE);
|
||||
s[2] <<= PropertyValue( "SQLException", -1, args[2], PropertyState_DIRECT_VALUE);
|
||||
OGenericUnoDialog::initialize(s);
|
||||
} else {
|
||||
OGenericUnoDialog::initialize(args);
|
||||
|
@@ -133,7 +133,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, Sequence< PropertyValue >
|
||||
{
|
||||
Reference< view::XSelectionSupplier > xView( xController, UNO_QUERY );
|
||||
if( xView.is() )
|
||||
xView->getSelection() >>= maSelection;
|
||||
maSelection = xView->getSelection();
|
||||
}
|
||||
}
|
||||
catch(const RuntimeException &)
|
||||
|
@@ -445,7 +445,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
|
||||
if ( rFilterData[ nData ].Name == "PageRange" )
|
||||
rFilterData[ nData ].Value >>= aPageRange;
|
||||
else if ( rFilterData[ nData ].Name == "Selection" )
|
||||
rFilterData[ nData ].Value >>= aSelection;
|
||||
aSelection = rFilterData[ nData ].Value;
|
||||
else if ( rFilterData[ nData ].Name == "UseLosslessCompression" )
|
||||
rFilterData[ nData ].Value >>= mbUseLosslessCompression;
|
||||
else if ( rFilterData[ nData ].Name == "Quality" )
|
||||
|
@@ -65,7 +65,7 @@ namespace frm
|
||||
getPropertyDefaultByHandle( PROPERTY_ID_VSCROLL ) >>= m_bVScroll;
|
||||
getPropertyDefaultByHandle( PROPERTY_ID_READONLY ) >>= m_bReadonly;
|
||||
getPropertyDefaultByHandle( PROPERTY_ID_PRINTABLE ) >>= m_bPrintable;
|
||||
getPropertyDefaultByHandle( PROPERTY_ID_ALIGN ) >>= m_aAlign;
|
||||
m_aAlign = getPropertyDefaultByHandle( PROPERTY_ID_ALIGN );
|
||||
getPropertyDefaultByHandle( PROPERTY_ID_ECHO_CHAR ) >>= m_nEchoChar;
|
||||
getPropertyDefaultByHandle( PROPERTY_ID_MAXTEXTLEN ) >>= m_nMaxTextLength;
|
||||
getPropertyDefaultByHandle( PROPERTY_ID_MULTILINE ) >>= m_bMultiLine;
|
||||
|
@@ -1495,7 +1495,7 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
|
||||
}
|
||||
|
||||
if( mpSet->getPropertyState( nHandleSoundURL ) != STLPropertyState::Ambiguous )
|
||||
mpSet->getPropertyValue( nHandleSoundURL ) >>= aOldSoundURL;
|
||||
aOldSoundURL = mpSet->getPropertyValue( nHandleSoundURL );
|
||||
|
||||
if( aNewSoundURL != aOldSoundURL )
|
||||
pSet->setPropertyValue( nHandleSoundURL, aNewSoundURL );
|
||||
|
@@ -67,7 +67,7 @@ css::beans::PropertyValues OptimizationStats::GetStatusSequence()
|
||||
void OptimizationStats::InitializeStatusValues( const uno::Sequence< PropertyValue >& rOptimizationStats )
|
||||
{
|
||||
for( int i = 0; i < rOptimizationStats.getLength(); i++ )
|
||||
rOptimizationStats[ i ].Value >>= maStats[ TKGet( rOptimizationStats[ i ].Name ) ];
|
||||
maStats[ TKGet( rOptimizationStats[ i ].Name ) ] = rOptimizationStats[ i ].Value;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -208,7 +208,7 @@ void GraphicRendererVCL::_setPropertyValues( const comphelper::PropertyMapEntry*
|
||||
|
||||
case UNOGRAPHIC_RENDERDATA:
|
||||
{
|
||||
*pValues >>= maRenderData;
|
||||
maRenderData = *pValues;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -1439,8 +1439,6 @@ void SVTXRoadmap::propertyChange( const css::beans::PropertyChangeEvent& evt ) t
|
||||
css::uno::Any aValue = xPropertySet->getPropertyValue("ID");
|
||||
aValue >>= nID;
|
||||
|
||||
css::uno::Any rVal = evt.NewValue;
|
||||
evt.NewValue >>= rVal;
|
||||
OUString sPropertyName = evt.PropertyName;
|
||||
if ( sPropertyName == "Enabled" )
|
||||
{
|
||||
|
@@ -888,7 +888,7 @@ AccessibleControlShape* SAL_CALL AccessibleControlShape::GetLabeledByControlShap
|
||||
// get the "label by" property value of the control
|
||||
if (::comphelper::hasProperty(rAccLabelControlProperty, m_xControlModel))
|
||||
{
|
||||
m_xControlModel->getPropertyValue( rAccLabelControlProperty ) >>= sCtlLabelBy;
|
||||
sCtlLabelBy = m_xControlModel->getPropertyValue(rAccLabelControlProperty);
|
||||
if( sCtlLabelBy.hasValue() )
|
||||
{
|
||||
Reference< XPropertySet > xAsSet (sCtlLabelBy, UNO_QUERY);
|
||||
|
@@ -306,10 +306,10 @@ Sequence< Sequence<PropertyValue> > SvtHistoryOptions_Impl::GetList(EHistoryType
|
||||
xItemList->getByName(sUrl) >>= xSet;
|
||||
seqProperties[s_nOffsetURL ].Value <<= sUrl;
|
||||
|
||||
xSet->getPropertyValue(s_sFilter) >>= seqProperties[s_nOffsetFilter ].Value;
|
||||
xSet->getPropertyValue(s_sTitle) >>= seqProperties[s_nOffsetTitle ].Value;
|
||||
xSet->getPropertyValue(s_sPassword) >>= seqProperties[s_nOffsetPassword ].Value;
|
||||
xSet->getPropertyValue(s_sThumbnail)>>= seqProperties[s_nOffsetThumbnail].Value;
|
||||
seqProperties[s_nOffsetFilter ].Value = xSet->getPropertyValue(s_sFilter);
|
||||
seqProperties[s_nOffsetTitle ].Value = xSet->getPropertyValue(s_sTitle);
|
||||
seqProperties[s_nOffsetPassword ].Value = xSet->getPropertyValue(s_sPassword);
|
||||
seqProperties[s_nOffsetThumbnail].Value = xSet->getPropertyValue(s_sThumbnail);
|
||||
aRet[nCount++] = seqProperties;
|
||||
}
|
||||
catch(const uno::Exception& ex)
|
||||
|
@@ -753,16 +753,14 @@ void setDefaultPropByIntrospection( const uno::Any& aObj, const uno::Any& aValue
|
||||
|
||||
uno::Any getPropertyValue( const uno::Sequence< beans::PropertyValue >& aProp, const OUString& aName )
|
||||
{
|
||||
uno::Any result;
|
||||
for ( sal_Int32 i = 0; i < aProp.getLength(); i++ )
|
||||
{
|
||||
if ( aProp[i].Name.equals(aName) )
|
||||
{
|
||||
aProp[i].Value >>= result;
|
||||
return result;
|
||||
return aProp[i].Value;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return uno::Any();
|
||||
}
|
||||
|
||||
bool setPropertyValue( uno::Sequence< beans::PropertyValue >& aProp, const OUString& aName, const uno::Any& aValue )
|
||||
|
Reference in New Issue
Block a user