diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-06 09:23:33 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-09 08:34:40 +0000 |
commit | 6c80a8fe89fadf9a2c7260a09c037a09462f53d1 (patch) | |
tree | d36da9ee2a5fdc579d2a57ff6ba02deaddfa785a /sd | |
parent | e1fc599eb764186e5d511ace9785463eebbc7028 (diff) |
new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/filter/xml/sdxmlwrp.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 9 | ||||
-rw-r--r-- | sd/source/ui/table/tablefunction.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 3 |
5 files changed, 9 insertions, 19 deletions
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 190edaa38a24..de06bbea82d5 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -375,8 +375,7 @@ sal_Int32 ReadThroughComponent( DBG_ASSERT( xInfoSet.is(), "missing property set" ); if( xInfoSet.is() ) { - OUString sPropName( "StreamName" ); - xInfoSet->setPropertyValue( sPropName, makeAny( sStreamName ) ); + xInfoSet->setPropertyValue( "StreamName", makeAny( sStreamName ) ); } try diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index c6c144577a82..bac92fa6c6f4 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -867,7 +867,6 @@ static sal_Int32 calcMaxParaDepth( Reference< XShape > xTargetShape ) if( xText.is() ) { Reference< XPropertySet > xParaSet; - const OUString strNumberingLevel( "NumberingLevel" ); Reference< XEnumeration > xEnumeration( xText->createEnumeration(), UNO_QUERY_THROW ); while( xEnumeration->hasMoreElements() ) @@ -876,7 +875,7 @@ static sal_Int32 calcMaxParaDepth( Reference< XShape > xTargetShape ) if( xParaSet.is() ) { sal_Int32 nParaDepth = 0; - xParaSet->getPropertyValue( strNumberingLevel ) >>= nParaDepth; + xParaSet->getPropertyValue( "NumberingLevel" ) >>= nParaDepth; if( nParaDepth > nMaxParaDepth ) nMaxParaDepth = nParaDepth; @@ -1027,15 +1026,13 @@ static bool hasVisibleShape( const Reference< XShape >& xShape ) if( sShapeType == "com.sun.star.presentation.TitleTextShape" || sShapeType == "com.sun.star.presentation.OutlinerShape" || sShapeType == "com.sun.star.presentation.SubtitleShape" || sShapeType == "com.sun.star.drawing.TextShape" ) { - const OUString sFillStyle( "FillStyle" ); - const OUString sLineStyle( "LineStyle" ); Reference< XPropertySet > xSet( xShape, UNO_QUERY_THROW ); FillStyle eFillStyle; - xSet->getPropertyValue( sFillStyle ) >>= eFillStyle; + xSet->getPropertyValue( "FillStyle" ) >>= eFillStyle; css::drawing::LineStyle eLineStyle; - xSet->getPropertyValue( sLineStyle ) >>= eLineStyle; + xSet->getPropertyValue( "LineStyle" ) >>= eLineStyle; return eFillStyle != FillStyle_NONE || eLineStyle != css::drawing::LineStyle_NONE; } diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index 5f1a09abda98..7ec28cbb21e2 100644 --- a/sd/source/ui/table/tablefunction.cxx +++ b/sd/source/ui/table/tablefunction.cxx @@ -87,8 +87,7 @@ static void apply_table_style( SdrTableObj* pObj, SdrModel* pModel, const OUStri Reference< XNameAccess > xPool( dynamic_cast< XNameAccess* >( pModel->GetStyleSheetPool() ) ); if( xPool.is() ) try { - const OUString sFamilyName("table" ); - Reference< XNameContainer > xTableFamily( xPool->getByName( sFamilyName ), UNO_QUERY_THROW ); + Reference< XNameContainer > xTableFamily( xPool->getByName( "table" ), UNO_QUERY_THROW ); OUString aStdName( "default" ); if( !sTableStyle.isEmpty() ) aStdName = sTableStyle; diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index f1e5614aa731..d1d352cbf855 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1638,11 +1638,7 @@ void ImplPDFExportComments( uno::Reference< drawing::XDrawPage > xPage, vcl::PDF void ImplPDFExportShapeInteraction( uno::Reference< drawing::XShape > xShape, SdDrawDocument& rDoc, vcl::PDFExtOutDevData& rPDFExtOutDevData ) { - const OUString sGroup ( "com.sun.star.drawing.GroupShape"); - const OUString sOnClick ( "OnClick" ); - const OUString sBookmark( "Bookmark" ); - - if ( xShape->getShapeType().equals( sGroup ) ) + if ( xShape->getShapeType() == "com.sun.star.drawing.GroupShape" ) { uno::Reference< container::XIndexAccess > xIndexAccess( xShape, uno::UNO_QUERY ); if ( xIndexAccess.is() ) @@ -1670,7 +1666,7 @@ void ImplPDFExportShapeInteraction( uno::Reference< drawing::XShape > xShape, Sd Rectangle aLinkRect( Point( aShapePos.X, aShapePos.Y ), Size( aShapeSize.Width, aShapeSize.Height ) ); presentation::ClickAction eCa; - uno::Any aAny( xShapePropSet->getPropertyValue( sOnClick ) ); + uno::Any aAny( xShapePropSet->getPropertyValue( "OnClick" ) ); if ( aAny >>= eCa ) { switch ( eCa ) @@ -1717,7 +1713,7 @@ void ImplPDFExportShapeInteraction( uno::Reference< drawing::XShape > xShape, Sd case presentation::ClickAction_DOCUMENT : { OUString aBookmark; - xShapePropSet->getPropertyValue( sBookmark ) >>= aBookmark; + xShapePropSet->getPropertyValue( "Bookmark" ) >>= aBookmark; if( !aBookmark.isEmpty() ) { switch( eCa ) diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 60002348136d..6133fe3bb1cf 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1757,10 +1757,9 @@ namespace slideshowhelp //show settings if any were set Sequence< PropertyValue > aArguments(1); PropertyValue aPage; - OUString sValue("0"); aPage.Name = "FirstPage"; - aPage.Value <<= sValue; + aPage.Value <<= OUString("0"); aArguments[0] = aPage; |