summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-24 11:22:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-28 10:17:47 +0000
commit198c41c4fe8be4ce8a6ddab43ae0c5f17a4889ac (patch)
tree041d55126e9770b81f68fadfaaa69e82313786b3 /svx/source
parentd3981b3e8c021ee03a2ca7103a73e56cca18df81 (diff)
new loplugin unoany
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89 Reviewed-on: https://gerrit.libreoffice.org/34714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/form/fmshimp.cxx10
-rw-r--r--svx/source/form/fmvwimp.cxx2
-rw-r--r--svx/source/gallery2/galmisc.cxx2
-rw-r--r--svx/source/items/customshapeitem.cxx2
-rw-r--r--svx/source/items/drawitem.cxx2
-rw-r--r--svx/source/items/pageitem.cxx3
-rw-r--r--svx/source/svdraw/svdobj.cxx2
-rw-r--r--svx/source/svdraw/svdograf.cxx2
-rw-r--r--svx/source/tbxctrls/PaletteManager.cxx2
-rw-r--r--svx/source/tbxctrls/formatpaintbrushctrl.cxx2
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx6
-rw-r--r--svx/source/tbxctrls/layctrl.cxx8
-rw-r--r--svx/source/tbxctrls/lboxctrl.cxx2
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx10
-rw-r--r--svx/source/tbxctrls/tbunocontroller.cxx2
-rw-r--r--svx/source/unodraw/unoshape.cxx2
-rw-r--r--svx/source/unogallery/unogaltheme.cxx2
-rw-r--r--svx/source/unogallery/unogalthemeprovider.cxx2
-rw-r--r--svx/source/xoutdev/xattr.cxx18
-rw-r--r--svx/source/xoutdev/xattrbmp.cxx6
20 files changed, 43 insertions, 44 deletions
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 892b3e2aef4f..c8ba3be334e8 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -3367,7 +3367,7 @@ void FmXFormShell::CreateExternalView()
// columns props are a dispatch argument
pDispatchArgs->Name = "ColumnProperties"; // TODO : fmurl.*
- pDispatchArgs->Value = makeAny(aColumnProps);
+ pDispatchArgs->Value <<= aColumnProps;
++pDispatchArgs;
DBG_ASSERT(nDispatchArgs == (pDispatchArgs - aDispatchArgs.getConstArray()),
"FmXFormShell::CreateExternalView : forgot to adjust nDispatchArgs ?");
@@ -3407,7 +3407,7 @@ void FmXFormShell::CreateExternalView()
// content type
pListBoxDescription->Name = FM_PROP_LISTSOURCETYPE;
ListSourceType eType = ListSourceType_VALUELIST;
- pListBoxDescription->Value = makeAny(eType);
+ pListBoxDescription->Value <<= eType;
++pListBoxDescription;
// list source
@@ -3415,7 +3415,7 @@ void FmXFormShell::CreateExternalView()
DBG_ASSERT(aCurrentListSource != aRadioListSources.end(),
"FmXFormShell::CreateExternalView : inconsistent radio descriptions !");
pListBoxDescription->Name = FM_PROP_LISTSOURCE;
- pListBoxDescription->Value = makeAny((*aCurrentListSource).second);
+ pListBoxDescription->Value <<= (*aCurrentListSource).second;
++pListBoxDescription;
// value list
@@ -3423,7 +3423,7 @@ void FmXFormShell::CreateExternalView()
DBG_ASSERT(aCurrentValueList != aRadioValueLists.end(),
"FmXFormShell::CreateExternalView : inconsistent radio descriptions !");
pListBoxDescription->Name = FM_PROP_STRINGITEMLIST;
- pListBoxDescription->Value = makeAny(((*aCurrentValueList).second));
+ pListBoxDescription->Value <<= (*aCurrentValueList).second;
++pListBoxDescription;
DBG_ASSERT(nListBoxDescription == (pListBoxDescription - aListBoxDescription.getConstArray()),
@@ -3454,7 +3454,7 @@ void FmXFormShell::CreateExternalView()
// the
pDispatchArgs->Name = "ColumnProperties"; // TODO : fmurl.*
- pDispatchArgs->Value = makeAny(aListBoxDescription);
+ pDispatchArgs->Value <<= aListBoxDescription;
++pDispatchArgs;
DBG_ASSERT(nDispatchArgs == (pDispatchArgs - aDispatchArgs.getConstArray()),
"FmXFormShell::CreateExternalView : forgot to adjust nDispatchArgs ?");
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index a0f10465b8c7..8d8f7200d6f8 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -1556,7 +1556,7 @@ bool FmXFormView::createControlLabelPair( OutputDevice& _rOutDev, sal_Int32 _nXO
if ( _rxField.is() )
{
nDataType = ::comphelper::getINT32(_rxField->getPropertyValue(FM_PROP_FIELDTYPE));
- aFieldName = Any(_rxField->getPropertyValue(FM_PROP_NAME));
+ aFieldName = _rxField->getPropertyValue(FM_PROP_NAME);
aFieldName >>= sFieldName;
}
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index 65956e0187ce..5ad2f181f822 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -277,7 +277,7 @@ bool CreateDir( const INetURLObject& rURL )
uno::Sequence< uno::Any > aValues( 1 );
aProps[0] = "Title";
- aValues[0] = uno::makeAny( OUString( rURL.GetName() ) );
+ aValues[0] <<= rURL.GetName();
::ucbhelper::Content aContent( rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), aCmdEnv, comphelper::getProcessComponentContext() );
bRet = aParent.insertNewContent( "application/vnd.sun.staroffice.fsys-folder", aProps, aValues, aContent );
diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx
index 1615e64ef227..3bf513d2b335 100644
--- a/svx/source/items/customshapeitem.cxx
+++ b/svx/source/items/customshapeitem.cxx
@@ -165,7 +165,7 @@ void SdrCustomShapeGeometryItem::SetPropertyValue( const OUString& rSequenceName
css::uno::Sequence < beans::PropertyValue > aSeq;
beans::PropertyValue aValue;
aValue.Name = rSequenceName;
- aValue.Value = css::uno::makeAny( aSeq );
+ aValue.Value <<= aSeq;
assert(aPropSeq.end() == std::find_if(aPropSeq.begin(), aPropSeq.end(),
[&rSequenceName](beans::PropertyValue const& rV)
diff --git a/svx/source/items/drawitem.cxx b/svx/source/items/drawitem.cxx
index d14ab5672e53..ce1864fc1d31 100644
--- a/svx/source/items/drawitem.cxx
+++ b/svx/source/items/drawitem.cxx
@@ -78,7 +78,7 @@ SfxPoolItem* SvxColorListItem::Clone( SfxItemPool * ) const
#define QUERY_PUT_IMPL(svtype, xtype) \
bool svtype::QueryValue( css::uno::Any& rVal, sal_uInt8 ) const \
{ \
- rVal = uno::makeAny( uno::Reference< uno::XWeak >( p##xtype.get() ) ); \
+ rVal <<= uno::Reference< uno::XWeak >( p##xtype.get() ); \
return true; \
} \
\
diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx
index 40892bc7d5b0..5f85d00da589 100644
--- a/svx/source/items/pageitem.cxx
+++ b/svx/source/items/pageitem.cxx
@@ -154,8 +154,7 @@ bool SvxPageItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
}
break;
case MID_PAGE_ORIENTATION:
- //Landscape= sal_True
- rVal = css::uno::makeAny<bool>(bLandscape);
+ rVal <<= (bool) bLandscape;
break;
case MID_PAGE_LAYOUT :
{
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index de6e898a1b23..3c721d1b3c56 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -790,7 +790,7 @@ void SdrObject::GetGrabBagItem(css::uno::Any& rVal) const
pGrabBagItem->QueryValue(rVal);
else {
uno::Sequence<beans::PropertyValue> aValue(0);
- rVal = uno::makeAny(aValue);
+ rVal <<= aValue;
}
}
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 4875a4f8d6c0..1c2e93af572e 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -91,7 +91,7 @@ const Graphic ImpLoadLinkedGraphic( const OUString& aFileName, const OUString& a
// But this link is required by some filters to access the native graphic (PDF export/MS export),
// there we should create a new service to provide this data if needed
aFilterData[ 0 ].Name = "CreateNativeLink";
- aFilterData[ 0 ].Value = Any( true );
+ aFilterData[ 0 ].Value <<= true;
// #i123042# for e.g SVG the path is needed, so hand it over here. I have no real idea
// what consequences this may have; maybe this is not handed over by purpose here. Not
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx
index bdd97018135e..1354efba237c 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -332,7 +332,7 @@ void PaletteManager::DispatchColorCommand(const OUString& aCommand, const NamedC
Sequence<PropertyValue> aArgs(1);
aArgs[0].Name = aObj.GetURLPath();
- aArgs[0].Value = makeAny(sal_Int32(rColor.first.GetColor()));
+ aArgs[0].Value <<= sal_Int32(rColor.first.GetColor());
URL aTargetURL;
aTargetURL.Complete = aCommand;
diff --git a/svx/source/tbxctrls/formatpaintbrushctrl.cxx b/svx/source/tbxctrls/formatpaintbrushctrl.cxx
index c8ee4f32ff32..42165d13c10e 100644
--- a/svx/source/tbxctrls/formatpaintbrushctrl.cxx
+++ b/svx/source/tbxctrls/formatpaintbrushctrl.cxx
@@ -57,7 +57,7 @@ void FormatPaintBrushToolBoxControl::impl_executePaintBrush()
{
Sequence< PropertyValue > aArgs( 1 );
aArgs[0].Name = "PersistentCopy";
- aArgs[0].Value = makeAny( m_bPersistentCopy );
+ aArgs[0].Value <<= m_bPersistentCopy;
Dispatch( ".uno:FormatPaintbrush"
, aArgs );
}
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 1f6da2730181..9a8e4e419ab5 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -141,10 +141,10 @@ IMPL_LINK_NOARG(ImplGrafMetricField, ImplModifyHdl, Timer *, void)
maCommand == ".uno:GrafBlue" ||
maCommand == ".uno:GrafLuminance" ||
maCommand == ".uno:GrafContrast" )
- a = makeAny( sal_Int16( nVal ));
+ a <<= sal_Int16( nVal );
else if ( maCommand == ".uno:GrafGamma" ||
maCommand == ".uno:GrafTransparence" )
- a = makeAny( sal_Int32( nVal ));
+ a <<= sal_Int32( nVal );
if ( a.hasValue() )
{
@@ -350,7 +350,7 @@ void ImplGrafModeControl::Select()
{
Sequence< PropertyValue > aArgs( 1 );
aArgs[0].Name = "GrafMode";
- aArgs[0].Value = makeAny( sal_Int16( GetSelectEntryPos() ));
+ aArgs[0].Value <<= sal_Int16( GetSelectEntryPos() );
/* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() call.
This instance may be deleted in the meantime (i.e. when a dialog is opened
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index c6acafaffbe0..f552a4864a4a 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -322,9 +322,9 @@ void TableWindow::PopupModeEnd()
{
Sequence< PropertyValue > aArgs( 2 );
aArgs[0].Name = "Columns";
- aArgs[0].Value = makeAny( sal_Int16( nCol ));
+ aArgs[0].Value <<= sal_Int16( nCol );
aArgs[1].Name = "Rows";
- aArgs[1].Value = makeAny( sal_Int16( nLine ));
+ aArgs[1].Value <<= sal_Int16( nLine );
TableDialog( aArgs );
}
@@ -657,9 +657,9 @@ void ColumnsWindow::PopupModeEnd()
{
Sequence< PropertyValue > aArgs( 2 );
aArgs[0].Name = "Columns";
- aArgs[0].Value = makeAny( sal_Int16( nCol ));
+ aArgs[0].Value <<= sal_Int16( nCol );
aArgs[1].Name = "Modifier";
- aArgs[1].Value = makeAny( sal_Int16( m_bMod1 ? KEY_MOD1 : 0 ));
+ aArgs[1].Value <<= sal_Int16( m_bMod1 ? KEY_MOD1 : 0 );
SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ),
maCommand,
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx
index 3c1c504cb1b1..e79095e5c360 100644
--- a/svx/source/tbxctrls/lboxctrl.cxx
+++ b/svx/source/tbxctrls/lboxctrl.cxx
@@ -132,7 +132,7 @@ IMPL_LINK_NOARG(SvxUndoRedoControl, PopupModeEndHdl, FloatingWindow*, void)
Sequence< PropertyValue > aArgs( 1 );
aArgs[0].Name = aObj.GetURLPath();
- aArgs[0].Value = makeAny( sal_Int16( nCount ));
+ aArgs[0].Value <<= sal_Int16( nCount );
SfxToolBoxControl::Dispatch( m_aCommandURL, aArgs );
}
}
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index a73c223b1ee0..484c1b52e41b 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -410,9 +410,9 @@ IMPL_LINK( SvxStyleBox_Impl, MenuSelectHdl, Menu*, pMenu, bool)
ToggleDropDown();
Sequence< PropertyValue > aArgs( 2 );
aArgs[0].Name = "Param";
- aArgs[0].Value = makeAny( sEntry );
+ aArgs[0].Value <<= sEntry;
aArgs[1].Name = "Family";
- aArgs[1].Value = makeAny( sal_Int16( eStyleFamily ));
+ aArgs[1].Value <<= sal_Int16( eStyleFamily );
switch(nMenuId) {
case RID_SVX_UPDATE_STYLE:
@@ -497,9 +497,9 @@ void SvxStyleBox_Impl::Select()
SaveValue();
Sequence< PropertyValue > aArgs( 2 );
- aArgs[0].Value = makeAny( OUString( aSearchEntry ) );
+ aArgs[0].Value <<= aSearchEntry;
aArgs[1].Name = "Family";
- aArgs[1].Value = makeAny( sal_Int16( eStyleFamily ));
+ aArgs[1].Value <<= sal_Int16( eStyleFamily );
if( bCreateNew )
{
aArgs[0].Name = "Param";
@@ -3106,7 +3106,7 @@ void SvxCurrencyToolBoxControl::Select( sal_uInt16 nSelectModifier )
{
Sequence< PropertyValue > aArgs( 1 );
aArgs[0].Name = "NumberFormatCurrency";
- aArgs[0].Value = makeAny( nFormatKey );
+ aArgs[0].Value <<= nFormatKey;
Dispatch( m_aCommandURL, aArgs );
m_nFormatKey = nFormatKey;
}
diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx
index 3cfd2f61afe2..24b72d56e4f0 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -148,7 +148,7 @@ void SvxFontSizeBox_Impl::Select()
uno::Sequence< beans::PropertyValue > aArgs( 1 );
aArgs[0].Name = "FontHeight.Height";
- aArgs[0].Value = uno::makeAny( fSelVal );
+ aArgs[0].Value <<= fSelVal;
/* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() call.
This instance may be deleted in the meantime (i.e. when a dialog is opened
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 52774014cd5b..1f2688921915 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2777,7 +2777,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
}
case SDRATTR_OBJMOVEPROTECT:
- rValue = uno::makeAny( mpObj->IsMoveProtect() );
+ rValue <<= mpObj->IsMoveProtect();
break;
case SDRATTR_OBJECTNAME:
diff --git a/svx/source/unogallery/unogaltheme.cxx b/svx/source/unogallery/unogaltheme.cxx
index 72b641bf7d1c..2eb0894430e7 100644
--- a/svx/source/unogallery/unogaltheme.cxx
+++ b/svx/source/unogallery/unogaltheme.cxx
@@ -141,7 +141,7 @@ uno::Any SAL_CALL GalleryTheme::getByIndex( ::sal_Int32 nIndex )
const GalleryObject* pObj = mpTheme->ImplGetGalleryObject( nIndex );
if( pObj )
- aRet = uno::makeAny( uno::Reference< gallery::XGalleryItem >( new GalleryItem( *this, *pObj ) ) );
+ aRet <<= uno::Reference< gallery::XGalleryItem >( new GalleryItem( *this, *pObj ) );
}
}
diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx
index e248d31210d9..0bab17f58139 100644
--- a/svx/source/unogallery/unogalthemeprovider.cxx
+++ b/svx/source/unogallery/unogalthemeprovider.cxx
@@ -169,7 +169,7 @@ uno::Any SAL_CALL GalleryThemeProvider::getByName( const OUString& rName )
}
else
{
- aRet = uno::makeAny( uno::Reference< gallery::XGalleryTheme >( new ::unogallery::GalleryTheme( rName ) ) );
+ aRet <<= uno::Reference< gallery::XGalleryTheme >( new ::unogallery::GalleryTheme( rName ) );
}
return aRet;
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 73eb20dc5ba1..4f84f675e63b 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -765,10 +765,10 @@ bool XLineDashItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) const
OUString aApiName = SvxUnogetApiNameForItem(Which(), GetName());
aPropSeq[0].Name = "Name";
- aPropSeq[0].Value = uno::makeAny( aApiName );
+ aPropSeq[0].Value <<= aApiName;
aPropSeq[1].Name = "LineDash";
- aPropSeq[1].Value = uno::makeAny( aLineDash );
- rVal = uno::makeAny( aPropSeq );
+ aPropSeq[1].Value <<= aLineDash;
+ rVal <<= aPropSeq;
break;
}
@@ -2535,10 +2535,10 @@ bool XFillGradientItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) c
OUString aApiName = SvxUnogetApiNameForItem(Which(), GetName());
aPropSeq[0].Name = "Name";
- aPropSeq[0].Value = uno::makeAny( aApiName );
+ aPropSeq[0].Value <<= aApiName;
aPropSeq[1].Name = "FillGradient";
- aPropSeq[1].Value = uno::makeAny( aGradient2 );
- rVal = uno::makeAny( aPropSeq );
+ aPropSeq[1].Value <<= aGradient2;
+ rVal <<= aPropSeq;
break;
}
@@ -3000,10 +3000,10 @@ bool XFillHatchItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) cons
OUString aApiName = SvxUnogetApiNameForItem(Which(), GetName());
aPropSeq[0].Name = "Name";
- aPropSeq[0].Value = uno::makeAny( aApiName );
+ aPropSeq[0].Value <<= aApiName;
aPropSeq[1].Name = "FillHatch";
- aPropSeq[1].Value = uno::makeAny( aUnoHatch );
- rVal = uno::makeAny( aPropSeq );
+ aPropSeq[1].Value <<= aUnoHatch;
+ rVal <<= aPropSeq;
break;
}
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index 231870ad64fb..de7e28c2c743 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -381,11 +381,11 @@ bool XFillBitmapItem::QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId) const
uno::Sequence< beans::PropertyValue > aPropSeq( 3 );
aPropSeq[0].Name = "Name";
- aPropSeq[0].Value = uno::makeAny( aInternalName );
+ aPropSeq[0].Value <<= aInternalName;
aPropSeq[1].Name = "FillBitmapURL";
- aPropSeq[1].Value = uno::makeAny( aURL );
+ aPropSeq[1].Value <<= aURL;
aPropSeq[2].Name = "Bitmap";
- aPropSeq[2].Value = uno::makeAny( xBmp );
+ aPropSeq[2].Value <<= xBmp;
rVal <<= aPropSeq;
}