diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-24 11:22:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-28 10:17:47 +0000 |
commit | 198c41c4fe8be4ce8a6ddab43ae0c5f17a4889ac (patch) | |
tree | 041d55126e9770b81f68fadfaaa69e82313786b3 /vcl | |
parent | d3981b3e8c021ee03a2ca7103a73e56cca18df81 (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 'vcl')
-rw-r--r-- | vcl/source/app/svmain.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/FilterConfigCache.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/FilterConfigItem.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/oldprintadaptor.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 42 | ||||
-rw-r--r-- | vcl/source/uitest/uno/uiobject_uno.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/mouse.cxx | 8 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 10 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salgdi.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk/a11y/atktextattributes.cxx | 26 |
10 files changed, 54 insertions, 54 deletions
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index b5700d5a8cc9..c97080e46c1c 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -249,7 +249,7 @@ uno::Any SAL_CALL DesktopEnvironmentContext::getValueByName( const OUString& Nam if ( Name == "system.desktop-environment" ) { - retVal = uno::makeAny( Application::GetDesktopEnvironment() ); + retVal <<= Application::GetDesktopEnvironment(); } else if( m_xNextContext.is() ) { diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx index 8067a1ee2256..4929241407f2 100644 --- a/vcl/source/filter/FilterConfigCache.cxx +++ b/vcl/source/filter/FilterConfigCache.cxx @@ -135,7 +135,7 @@ Reference< XInterface > openConfig(const char* sPackage) aParam.Value <<= OUString( "/org.openoffice.TypeDetection.Types/Types" ); if (rtl_str_compareIgnoreAsciiCase(sPackage, "filters") == 0) aParam.Value <<= OUString( "/org.openoffice.TypeDetection.GraphicFilter/Filters" ); - lParams[0] = makeAny(aParam); + lParams[0] <<= aParam; // get access to file xCfg = xConfigProvider->createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", lParams); diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx index 0d1f6b87e1ce..fd66345dfb1f 100644 --- a/vcl/source/filter/FilterConfigItem.cxx +++ b/vcl/source/filter/FilterConfigItem.cxx @@ -57,7 +57,7 @@ static bool ImpIsTreeAvailable( Reference< XMultiServiceFactory >& rXCfgProv, co // creation arguments: nodepath PropertyValue aPathArgument; aPathArgument.Name = "nodepath"; - aPathArgument.Value = Any(rTree.getToken(i++, '/')); + aPathArgument.Value <<= rTree.getToken(i++, '/'); Sequence< Any > aArguments( 1 ); aArguments[ 0 ] <<= aPathArgument; @@ -113,13 +113,13 @@ void FilterConfigItem::ImpInitTree( const OUString& rSubTree ) // creation arguments: nodepath PropertyValue aPathArgument; aPathArgument.Name = "nodepath"; - aPathArgument.Value = Any(sTree); + aPathArgument.Value <<= sTree; // creation arguments: commit mode PropertyValue aModeArgument; bool bAsynchron = true; aModeArgument.Name = "lazywrite"; - aModeArgument.Value = Any(bAsynchron); + aModeArgument.Value <<= bAsynchron; Sequence< Any > aArguments( 2 ); aArguments[ 0 ] <<= aPathArgument; diff --git a/vcl/source/gdi/oldprintadaptor.cxx b/vcl/source/gdi/oldprintadaptor.cxx index f142fa46972c..d8e13aaede0b 100644 --- a/vcl/source/gdi/oldprintadaptor.cxx +++ b/vcl/source/gdi/oldprintadaptor.cxx @@ -87,11 +87,11 @@ Sequence< PropertyValue > OldStylePrintAdaptor::getPageParameters( int i_nPage ) Sequence< PropertyValue > aRet( 1 ); aRet[0].Name = "PageSize"; if( i_nPage < int(mpData->maPages.size() ) ) - aRet[0].Value = makeAny( mpData->maPages[i_nPage].maPageSize ); + aRet[0].Value <<= mpData->maPages[i_nPage].maPageSize; else { awt::Size aEmpty( 0, 0 ); - aRet[0].Value = makeAny( aEmpty ); + aRet[0].Value <<= aEmpty; } return aRet; } diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index a047e78d0dc8..63da93c899b2 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -354,7 +354,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController, // Argh ! That sure needs cleaning up if( pContentVal ) { - pContentVal->Value = css::uno::makeAny( sal_Int32( 1 ) ); + pContentVal->Value <<= sal_Int32( 1 ); xController->setValue("PageRange", pPagesVal->Value); } } @@ -1824,7 +1824,7 @@ void PrinterOptionsHelper::appendPrintUIOptions( css::uno::Sequence< css::beans: io_rProps.realloc( nIndex+1 ); css::beans::PropertyValue aVal; aVal.Name = "ExtraPrintUIOptions"; - aVal.Value = css::uno::makeAny( comphelper::containerToSequence(m_aUIProperties) ); + aVal.Value <<= comphelper::containerToSequence(m_aUIProperties); io_rProps[ nIndex ] = aVal; } } @@ -1860,35 +1860,35 @@ css::uno::Any PrinterOptionsHelper::setUIControlOpt(const css::uno::Sequence< OU if( !i_rTitle.isEmpty() ) { aCtrl[nUsed ].Name = "Text"; - aCtrl[nUsed++].Value = css::uno::makeAny( i_rTitle ); + aCtrl[nUsed++].Value <<= i_rTitle; } if( i_rHelpIds.getLength() ) { aCtrl[nUsed ].Name = "HelpId"; - aCtrl[nUsed++].Value = css::uno::makeAny( i_rHelpIds ); + aCtrl[nUsed++].Value <<= i_rHelpIds; } aCtrl[nUsed ].Name = "ControlType"; - aCtrl[nUsed++].Value = css::uno::makeAny( i_rType ); + aCtrl[nUsed++].Value <<= i_rType; aCtrl[nUsed ].Name = "ID"; - aCtrl[nUsed++].Value = css::uno::makeAny( i_rIDs ); + aCtrl[nUsed++].Value <<= i_rIDs; if( i_pVal ) { aCtrl[nUsed ].Name = "Property"; - aCtrl[nUsed++].Value = css::uno::makeAny( *i_pVal ); + aCtrl[nUsed++].Value <<= *i_pVal; } if( !i_rControlOptions.maDependsOnName.isEmpty() ) { aCtrl[nUsed ].Name = "DependsOnName"; - aCtrl[nUsed++].Value = css::uno::makeAny( i_rControlOptions.maDependsOnName ); + aCtrl[nUsed++].Value <<= i_rControlOptions.maDependsOnName; if( i_rControlOptions.mnDependsOnEntry != -1 ) { aCtrl[nUsed ].Name = "DependsOnEntry"; - aCtrl[nUsed++].Value = css::uno::makeAny( i_rControlOptions.mnDependsOnEntry ); + aCtrl[nUsed++].Value <<= i_rControlOptions.mnDependsOnEntry; } if( i_rControlOptions.mbAttachToDependency ) { aCtrl[nUsed ].Name = "AttachToDependency"; - aCtrl[nUsed++].Value = css::uno::makeAny( i_rControlOptions.mbAttachToDependency ); + aCtrl[nUsed++].Value <<= i_rControlOptions.mbAttachToDependency; } } if( !i_rControlOptions.maGroupHint.isEmpty() ) @@ -1960,7 +1960,7 @@ css::uno::Any PrinterOptionsHelper::setBoolControlOpt(const OUString& i_rID, } css::beans::PropertyValue aVal; aVal.Name = i_rProperty; - aVal.Value = css::uno::makeAny( i_bValue ); + aVal.Value <<= i_bValue; css::uno::Sequence< OUString > aIds { i_rID }; return setUIControlOpt(aIds, i_rTitle, aHelpId, "Bool", &aVal, i_rControlOptions); } @@ -1978,16 +1978,16 @@ css::uno::Any PrinterOptionsHelper::setChoiceRadiosControlOpt(const css::uno::Se sal_Int32 nUsed = aOpt.maAddProps.size(); aOpt.maAddProps.resize( nUsed + 1 + (i_rDisabledChoices.getLength() ? 1 : 0) ); aOpt.maAddProps[nUsed].Name = "Choices"; - aOpt.maAddProps[nUsed].Value = css::uno::makeAny( i_rChoices ); + aOpt.maAddProps[nUsed].Value <<= i_rChoices; if( i_rDisabledChoices.getLength() ) { aOpt.maAddProps[nUsed+1].Name = "ChoicesDisabled"; - aOpt.maAddProps[nUsed+1].Value = css::uno::makeAny( i_rDisabledChoices ); + aOpt.maAddProps[nUsed+1].Value <<= i_rDisabledChoices; } css::beans::PropertyValue aVal; aVal.Name = i_rProperty; - aVal.Value = css::uno::makeAny( i_nValue ); + aVal.Value <<= i_nValue; return setUIControlOpt(i_rIDs, i_rTitle, i_rHelpId, "Radio", &aVal, aOpt); } @@ -2004,16 +2004,16 @@ css::uno::Any PrinterOptionsHelper::setChoiceListControlOpt(const OUString& i_rI sal_Int32 nUsed = aOpt.maAddProps.size(); aOpt.maAddProps.resize( nUsed + 1 + (i_rDisabledChoices.getLength() ? 1 : 0) ); aOpt.maAddProps[nUsed].Name = "Choices"; - aOpt.maAddProps[nUsed].Value = css::uno::makeAny( i_rChoices ); + aOpt.maAddProps[nUsed].Value <<= i_rChoices; if( i_rDisabledChoices.getLength() ) { aOpt.maAddProps[nUsed+1].Name = "ChoicesDisabled"; - aOpt.maAddProps[nUsed+1].Value = css::uno::makeAny( i_rDisabledChoices ); + aOpt.maAddProps[nUsed+1].Value <<= i_rDisabledChoices; } css::beans::PropertyValue aVal; aVal.Name = i_rProperty; - aVal.Value = css::uno::makeAny( i_nValue ); + aVal.Value <<= i_nValue; css::uno::Sequence< OUString > aIds { i_rID }; return setUIControlOpt(aIds, i_rTitle, i_rHelpId, "List", &aVal, aOpt); } @@ -2033,9 +2033,9 @@ css::uno::Any PrinterOptionsHelper::setRangeControlOpt(const OUString& i_rID, sal_Int32 nUsed = aOpt.maAddProps.size(); aOpt.maAddProps.resize( nUsed + 2 ); aOpt.maAddProps[nUsed ].Name = "MinValue"; - aOpt.maAddProps[nUsed++].Value = css::uno::makeAny( i_nMinValue ); + aOpt.maAddProps[nUsed++].Value <<= i_nMinValue; aOpt.maAddProps[nUsed ].Name = "MaxValue"; - aOpt.maAddProps[nUsed++].Value = css::uno::makeAny( i_nMaxValue ); + aOpt.maAddProps[nUsed++].Value <<= i_nMaxValue; } css::uno::Sequence< OUString > aHelpId; @@ -2046,7 +2046,7 @@ css::uno::Any PrinterOptionsHelper::setRangeControlOpt(const OUString& i_rID, } css::beans::PropertyValue aVal; aVal.Name = i_rProperty; - aVal.Value = css::uno::makeAny( i_nValue ); + aVal.Value <<= i_nValue; css::uno::Sequence< OUString > aIds { i_rID }; return setUIControlOpt(aIds, i_rTitle, aHelpId, "Range", &aVal, aOpt); } @@ -2066,7 +2066,7 @@ css::uno::Any PrinterOptionsHelper::setEditControlOpt(const OUString& i_rID, } css::beans::PropertyValue aVal; aVal.Name = i_rProperty; - aVal.Value = css::uno::makeAny( i_rValue ); + aVal.Value <<= i_rValue; css::uno::Sequence< OUString > aIds { i_rID }; return setUIControlOpt(aIds, i_rTitle, aHelpId, "Edit", &aVal, i_rControlOptions); } diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx b/vcl/source/uitest/uno/uiobject_uno.cxx index ec2e3f7b31d5..14268cee9367 100644 --- a/vcl/source/uitest/uno/uiobject_uno.cxx +++ b/vcl/source/uitest/uno/uiobject_uno.cxx @@ -154,7 +154,7 @@ css::uno::Sequence<css::beans::PropertyValue> UIObjectUnoObj::getState() for (auto itr = aMap.begin(), itrEnd = aMap.end(); itr != itrEnd; ++itr, ++i) { aProps[i].Name = itr->first; - aProps[i].Value = css::uno::makeAny(itr->second); + aProps[i].Value <<= itr->second; } return aProps; diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index d1cc051721bc..d0349d8c4f54 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -747,10 +747,10 @@ Reference< css::datatransfer::dnd::XDragSource > Window::GetDragSource() aDragSourceSN = "com.sun.star.datatransfer.dnd.X11DragSource"; aDropTargetSN = "com.sun.star.datatransfer.dnd.X11DropTarget"; - aDragSourceAL[ 0 ] = makeAny( Application::GetDisplayConnection() ); - aDragSourceAL[ 1 ] = makeAny(static_cast<sal_IntPtr>(pEnvData->aShellWindow)); - aDropTargetAL[ 0 ] = makeAny( Application::GetDisplayConnection() ); - aDropTargetAL[ 1 ] = makeAny(static_cast<sal_IntPtr>(pEnvData->aShellWindow)); + aDragSourceAL[ 0 ] <<= Application::GetDisplayConnection(); + aDragSourceAL[ 1 ] <<= static_cast<sal_IntPtr>(pEnvData->aShellWindow); + aDropTargetAL[ 0 ] <<= Application::GetDisplayConnection(); + aDropTargetAL[ 1 ] <<= static_cast<sal_IntPtr>(pEnvData->aShellWindow); #endif if( !aDragSourceSN.isEmpty() ) mpWindowImpl->mpFrameData->mxDragSource.set( diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 14d0e935c60d..4eee9667c792 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3568,13 +3568,13 @@ Reference< css::rendering::XCanvas > Window::ImplGetCanvas( bool bSpriteCanvas ) // Feed any with operating system's window handle // common: first any is VCL pointer to window (for VCL canvas) - aArg[ 0 ] = makeAny( reinterpret_cast<sal_Int64>(this) ); + aArg[ 0 ] <<= reinterpret_cast<sal_Int64>(this); aArg[ 1 ] = GetSystemDataAny(); - aArg[ 2 ] = makeAny( css::awt::Rectangle( mnOutOffX, mnOutOffY, mnOutWidth, mnOutHeight ) ); - aArg[ 3 ] = makeAny( mpWindowImpl->mbAlwaysOnTop ); - aArg[ 4 ] = makeAny( Reference< css::awt::XWindow >( + aArg[ 2 ] <<= css::awt::Rectangle( mnOutOffX, mnOutOffY, mnOutWidth, mnOutHeight ); + aArg[ 3 ] <<= mpWindowImpl->mbAlwaysOnTop; + aArg[ 4 ] <<= Reference< css::awt::XWindow >( const_cast<vcl::Window*>(this)->GetComponentInterface(), - UNO_QUERY )); + UNO_QUERY ); aArg[ 5 ] = GetSystemGfxDataAny(); Reference< XComponentContext > xContext = comphelper::getProcessComponentContext(); diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index e8683dfbc37c..0db00ba9d777 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -567,9 +567,9 @@ css::uno::Any X11SalGraphics::GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rS { cairo::X11Surface& rXlibSurface=dynamic_cast<cairo::X11Surface&>(*rSurface.get()); css::uno::Sequence< css::uno::Any > args( 3 ); - args[0] = css::uno::Any( false ); // do not call XFreePixmap on it - args[1] = css::uno::Any( rXlibSurface.getPixmap()->mhDrawable ); - args[2] = css::uno::Any( sal_Int32( rXlibSurface.getDepth() ) ); + args[0] <<= false; // do not call XFreePixmap on it + args[1] <<= rXlibSurface.getPixmap()->mhDrawable; + args[2] <<= sal_Int32( rXlibSurface.getDepth() ); return css::uno::Any(args); } diff --git a/vcl/unx/gtk/a11y/atktextattributes.cxx b/vcl/unx/gtk/a11y/atktextattributes.cxx index 75971173f978..da78072d2b45 100644 --- a/vcl/unx/gtk/a11y/atktextattributes.cxx +++ b/vcl/unx/gtk/a11y/atktextattributes.cxx @@ -201,7 +201,7 @@ String2Float( uno::Any& rAny, const gchar * value ) if( 1 != sscanf( value, "%g", &fval ) ) return false; - rAny = uno::makeAny( fval ); + rAny <<= fval; return true; } @@ -288,7 +288,7 @@ String2Color( uno::Any& rAny, const gchar * value ) return false; sal_Int32 nColor = (sal_Int32) blue | ( (sal_Int32) green << 8 ) | ( ( sal_Int32 ) red << 16 ); - rAny = uno::makeAny( nColor ); + rAny <<= nColor; return true; } @@ -353,7 +353,7 @@ Style2FontSlant( uno::Any& rAny, const gchar * value ) else return false; - rAny = uno::makeAny( aFontSlant ); + rAny <<= aFontSlant; return true; } @@ -373,7 +373,7 @@ String2Weight( uno::Any& rAny, const gchar * value ) if( 1 != sscanf( value, "%g", &weight ) ) return false; - rAny = uno::makeAny( weight / 4 ); + rAny <<= weight / 4; return true; } @@ -429,7 +429,7 @@ Justification2Adjust( uno::Any& rAny, const gchar * value ) else return false; - rAny = uno::makeAny( nParagraphAdjust ); + rAny <<= nParagraphAdjust; return true; } @@ -466,7 +466,7 @@ String2Strikeout( uno::Any& rAny, const gchar * value ) if( ( nullptr != font_strikethrough[n] ) && 0 == strncmp( value, font_strikethrough[n], strlen( font_strikethrough[n] ) ) ) { - rAny = uno::makeAny( n ); + rAny <<= n; return true; } } @@ -519,7 +519,7 @@ String2Underline( uno::Any& rAny, const gchar * value ) else return false; - rAny = uno::makeAny( nUnderline ); + rAny <<= nUnderline; return true; } @@ -543,7 +543,7 @@ SetString( uno::Any& rAny, const gchar * value ) if( !aFontName.isEmpty() ) { - rAny = uno::makeAny( OStringToOUString( aFontName, RTL_TEXTENCODING_UTF8 ) ); + rAny <<= OStringToOUString( aFontName, RTL_TEXTENCODING_UTF8 ); return true; } @@ -574,7 +574,7 @@ UnitString2CMM( uno::Any& rAny, const gchar * value ) fValue = fValue * 100; - rAny = uno::makeAny( (sal_Int32) fValue); + rAny <<= (sal_Int32) fValue; return true; } @@ -605,7 +605,7 @@ String2Bool( uno::Any& rAny, const gchar * value ) else return false; - rAny = uno::makeAny(bValue); + rAny <<= bValue; return true; } @@ -625,7 +625,7 @@ String2Scale( uno::Any& rAny, const gchar * value ) if( 1 != sscanf( value, "%lg", &dval ) ) return false; - rAny = uno::makeAny((sal_Int16) (dval * 100)); + rAny <<= (sal_Int16) (dval * 100); return true; } @@ -662,7 +662,7 @@ String2CaseMap( uno::Any& rAny, const gchar * value ) else return false; - rAny = uno::makeAny( nCaseMap ); + rAny <<= nCaseMap; return true; } @@ -729,7 +729,7 @@ String2Locale( uno::Any& rAny, const gchar * value ) g_free(country); } - rAny = uno::makeAny(aLocale); + rAny <<= aLocale; } g_strfreev(str_array); |