diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-13 09:52:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-13 14:44:04 +0200 |
commit | b6652dae45a469bc0e357ff4755a92992b0856e9 (patch) | |
tree | 2d13c451f208579aae8e27d6246f813de221eed4 /slideshow/source/engine/shapes | |
parent | 3c76913a5a8fa73f06197dc6b69ba6f4b7a9b33f (diff) |
loplugin:ostr in slideshow
Change-Id: I87b391b95a75a1ddc4e26dcd0bbd557f8bd3b17b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167578
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'slideshow/source/engine/shapes')
-rw-r--r-- | slideshow/source/engine/shapes/backgroundshape.cxx | 4 | ||||
-rw-r--r-- | slideshow/source/engine/shapes/drawinglayeranimation.cxx | 16 | ||||
-rw-r--r-- | slideshow/source/engine/shapes/drawshape.cxx | 2 | ||||
-rw-r--r-- | slideshow/source/engine/shapes/gdimtftools.cxx | 14 | ||||
-rw-r--r-- | slideshow/source/engine/shapes/shapeimporter.cxx | 40 | ||||
-rw-r--r-- | slideshow/source/engine/shapes/viewappletshape.cxx | 2 | ||||
-rw-r--r-- | slideshow/source/engine/shapes/viewmediashape.cxx | 20 |
7 files changed, 49 insertions, 49 deletions
diff --git a/slideshow/source/engine/shapes/backgroundshape.cxx b/slideshow/source/engine/shapes/backgroundshape.cxx index 3028b6f44c85..e3e3fb9ccc88 100644 --- a/slideshow/source/engine/shapes/backgroundshape.cxx +++ b/slideshow/source/engine/shapes/backgroundshape.cxx @@ -142,8 +142,8 @@ namespace slideshow::internal sal_Int32 nDocWidth=0; sal_Int32 nDocHeight=0; - xPropSet->getPropertyValue("Width") >>= nDocWidth; - xPropSet->getPropertyValue("Height") >>= nDocHeight; + xPropSet->getPropertyValue(u"Width"_ustr) >>= nDocWidth; + xPropSet->getPropertyValue(u"Height"_ustr) >>= nDocHeight; mpMtf = xMtf; maBounds = ::basegfx::B2DRectangle( 0,0,nDocWidth, nDocHeight ); diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx index ea765eea9649..6713f3ab95c9 100644 --- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx +++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx @@ -769,14 +769,14 @@ ActivityImpl::ActivityImpl( uno::Reference<drawing::XShape> const xShape( mpDrawShape->getXShape() ); uno::Reference<beans::XPropertySet> const xProps( xShape, uno::UNO_QUERY_THROW ); - getPropertyValue( meAnimKind, xProps, "TextAnimationKind" ); + getPropertyValue( meAnimKind, xProps, u"TextAnimationKind"_ustr ); OSL_ASSERT( meAnimKind != drawing::TextAnimationKind_NONE ); mbAlternate = (meAnimKind == drawing::TextAnimationKind_ALTERNATE); mbScrollIn = (meAnimKind == drawing::TextAnimationKind_SLIDE); // adopted from in AInfoBlinkText::ImplInit(): sal_Int16 nRepeat(0); - getPropertyValue( nRepeat, xProps, "TextAnimationCount" ); + getPropertyValue( nRepeat, xProps, u"TextAnimationCount"_ustr ); mnRepeat = nRepeat; if(mbAlternate) @@ -788,20 +788,20 @@ ActivityImpl::ActivityImpl( else { getPropertyValue( mbVisibleWhenStarted, xProps, - "TextAnimationStartInside" ); + u"TextAnimationStartInside"_ustr ); } // set visible when stopped getPropertyValue( mbVisibleWhenStopped, xProps, - "TextAnimatiogonStopInside" ); + u"TextAnimatiogonStopInside"_ustr ); // rotation: getPropertyValue( mfRotationAngle, xProps, - "RotateAngle" ); + u"RotateAngle"_ustr ); mfRotationAngle /= -100.0; // (switching direction) // set frequency sal_Int16 nDelay(0); - getPropertyValue( nDelay, xProps, "TextAnimationDelay" ); + getPropertyValue( nDelay, xProps, u"TextAnimationDelay"_ustr ); // set delay if not automatic mnFrequency = (nDelay ? nDelay : // default: @@ -821,10 +821,10 @@ ActivityImpl::ActivityImpl( } // Get animation direction - getPropertyValue( meDirection, xProps, "TextAnimationDirection" ); + getPropertyValue( meDirection, xProps, u"TextAnimationDirection"_ustr ); // Get step width. Negative means pixel, positive logical units - getPropertyValue( mnStepWidth, xProps, "TextAnimationAmount" ); + getPropertyValue( mnStepWidth, xProps, u"TextAnimationAmount"_ustr ); maContext.mpSubsettableShapeManager->addIntrinsicAnimationHandler( mpListener ); diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx index 644d2c337b58..cdeb03e34f7d 100644 --- a/slideshow/source/engine/shapes/drawshape.cxx +++ b/slideshow/source/engine/shapes/drawshape.cxx @@ -380,7 +380,7 @@ namespace slideshow::internal uno::UNO_QUERY ); if( xPropSet.is() ) getPropertyValue( eKind, xPropSet, - "TextAnimationKind" ); + u"TextAnimationKind"_ustr ); mbDrawingLayerAnim = (eKind != drawing::TextAnimationKind_NONE); // must NOT be called from within initializer list, uses diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx index d4f55928562f..d2ba02bf6cff 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -177,20 +177,20 @@ GDIMetaFileSharedPtr getMetaFile( const uno::Reference< lang::XComponent >& drawing::GraphicExportFilter::create(rxContext); uno::Sequence< beans::PropertyValue > aFilterData{ - comphelper::makePropertyValue("ScrollText", + comphelper::makePropertyValue(u"ScrollText"_ustr, ((mtfLoadFlags & MTF_LOAD_SCROLL_TEXT_MTF) != 0)), - comphelper::makePropertyValue("ExportOnlyBackground", + comphelper::makePropertyValue(u"ExportOnlyBackground"_ustr, ((mtfLoadFlags & MTF_LOAD_BACKGROUND_ONLY) != 0)), - comphelper::makePropertyValue("Version", static_cast<sal_Int32>( SOFFICE_FILEFORMAT_50 )), + comphelper::makePropertyValue(u"Version"_ustr, static_cast<sal_Int32>( SOFFICE_FILEFORMAT_50 )), comphelper::makePropertyValue( - "CurrentPage", uno::Reference< uno::XInterface >( xContainingPage, + u"CurrentPage"_ustr, uno::Reference< uno::XInterface >( xContainingPage, uno::UNO_QUERY_THROW )) }; uno::Sequence< beans::PropertyValue > aProps{ - comphelper::makePropertyValue("FilterName", OUString("SVM")), - comphelper::makePropertyValue("GraphicRenderer", uno::Reference< graphic::XGraphicRenderer >(xRenderer)), - comphelper::makePropertyValue("FilterData", aFilterData) + comphelper::makePropertyValue(u"FilterName"_ustr, u"SVM"_ustr), + comphelper::makePropertyValue(u"GraphicRenderer"_ustr, uno::Reference< graphic::XGraphicRenderer >(xRenderer)), + comphelper::makePropertyValue(u"FilterData"_ustr, aFilterData) }; xExporter->setSourceDocument( xSource ); diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx index 9872427046d0..42eed1dc9952 100644 --- a/slideshow/source/engine/shapes/shapeimporter.cxx +++ b/slideshow/source/engine/shapes/shapeimporter.cxx @@ -57,7 +57,7 @@ std::unique_ptr<GraphicObject> importShapeGraphic(uno::Reference<beans::XPropert std::unique_ptr<GraphicObject> xRet; uno::Reference<graphic::XGraphic> xGraphic; - if (!getPropertyValue(xGraphic, xPropSet, "Graphic") || !xGraphic.is()) + if (!getPropertyValue(xGraphic, xPropSet, u"Graphic"_ustr) || !xGraphic.is()) { // no or empty property - cannot import shape graphic return xRet; @@ -118,7 +118,7 @@ ShapeOfGroup::ShapeOfGroup( ShapeSharedPtr const& pGroupSha mnPrio(nPrio) { // read bound rect - uno::Any const aTmpRect_( xPropSet->getPropertyValue( "BoundRect" )); + uno::Any const aTmpRect_( xPropSet->getPropertyValue( u"BoundRect"_ustr )); awt::Rectangle const aTmpRect( aTmpRect_.get<awt::Rectangle>() ); basegfx::B2DRectangle const groupPosSize( pGroupShape->getBounds() ); maPosOffset = basegfx::B2DPoint( aTmpRect.X - groupPosSize.getMinX(), @@ -223,7 +223,7 @@ ShapeSharedPtr ShapeImporter::createShape( // (Java)Applet shape. This is a special object return createAppletShape( xCurrShape, mnAscendingPrio, - "com.sun.star.comp.sfx2.AppletObject", + u"com.sun.star.comp.sfx2.AppletObject"_ustr, aPropertyValues, SAL_N_ELEMENTS(aPropertyValues), mrContext ); @@ -278,15 +278,15 @@ ShapeSharedPtr ShapeImporter::createShape( sal_Int16 nTransparency(0); sal_Int32 nRotation(0); - getPropertyValue( eColorMode, xPropSet, "GraphicColorMode" ); - getPropertyValue( nLuminance, xPropSet, "AdjustLuminance" ); - getPropertyValue( nContrast, xPropSet, "AdjustContrast" ); - getPropertyValue( nRed, xPropSet, "AdjustRed" ); - getPropertyValue( nGreen, xPropSet, "AdjustGreen" ); - getPropertyValue( nBlue, xPropSet, "AdjustBlue" ); - getPropertyValue( nGamma, xPropSet, "Gamma" ); - getPropertyValue( nTransparency, xPropSet, "Transparency" ); - getPropertyValue( nRotation, xPropSet, "RotateAngle" ); + getPropertyValue( eColorMode, xPropSet, u"GraphicColorMode"_ustr ); + getPropertyValue( nLuminance, xPropSet, u"AdjustLuminance"_ustr ); + getPropertyValue( nContrast, xPropSet, u"AdjustContrast"_ustr ); + getPropertyValue( nRed, xPropSet, u"AdjustRed"_ustr ); + getPropertyValue( nGreen, xPropSet, u"AdjustGreen"_ustr ); + getPropertyValue( nBlue, xPropSet, u"AdjustBlue"_ustr ); + getPropertyValue( nGamma, xPropSet, u"Gamma"_ustr ); + getPropertyValue( nTransparency, xPropSet, u"Transparency"_ustr ); + getPropertyValue( nRotation, xPropSet, u"RotateAngle"_ustr ); GraphicAttr aGraphAttrs; aGraphAttrs.SetDrawMode( static_cast<GraphicDrawMode>(eColorMode) ); @@ -300,7 +300,7 @@ ShapeSharedPtr ShapeImporter::createShape( aGraphAttrs.SetRotation( Degree10(static_cast<sal_Int16>(nRotation*10)) ); text::GraphicCrop aGraphCrop; - if( getPropertyValue( aGraphCrop, xPropSet, "GraphicCrop" )) + if( getPropertyValue( aGraphCrop, xPropSet, u"GraphicCrop"_ustr )) { aGraphAttrs.SetCrop( aGraphCrop.Left, aGraphCrop.Top, @@ -342,13 +342,13 @@ bool ShapeImporter::isSkip( bool bEmpty = false; if( getPropertyValue( bEmpty, xPropSet, - "IsEmptyPresentationObject") && + u"IsEmptyPresentationObject"_ustr) && bEmpty ) { // check object have fill or linestyle, if have, it should be visible drawing::FillStyle aFillStyle{ drawing::FillStyle_NONE }; if (getPropertyValue(aFillStyle, - xPropSet, "FillStyle") && + xPropSet, u"FillStyle"_ustr) && aFillStyle != drawing::FillStyle_NONE) { bEmpty = false; @@ -356,7 +356,7 @@ bool ShapeImporter::isSkip( drawing::LineStyle aLineStyle{ drawing::LineStyle_NONE }; if (bEmpty && getPropertyValue(aLineStyle, - xPropSet, "LineStyle") && + xPropSet, u"LineStyle"_ustr) && aLineStyle != drawing::LineStyle_NONE) { bEmpty = false; @@ -370,7 +370,7 @@ bool ShapeImporter::isSkip( if(xLayer.is()) { OUString layerName; - const uno::Any& a(xLayer->getPropertyValue("Name") ); + const uno::Any& a(xLayer->getPropertyValue(u"Name"_ustr) ); bool const bRet = (a >>= layerName); if(bRet) { @@ -402,9 +402,9 @@ void ShapeImporter::importPolygons(uno::Reference<beans::XPropertySet> const& xP drawing::PointSequenceSequence aRetval; sal_Int32 nLineColor=0; double fLineWidth; - getPropertyValue( aRetval, xPropSet, "PolyPolygon" ); - getPropertyValue( nLineColor, xPropSet, "LineColor" ); - getPropertyValue( fLineWidth, xPropSet, "LineWidth" ); + getPropertyValue( aRetval, xPropSet, u"PolyPolygon"_ustr ); + getPropertyValue( nLineColor, xPropSet, u"LineColor"_ustr ); + getPropertyValue( fLineWidth, xPropSet, u"LineWidth"_ustr ); const drawing::PointSequence* pOuterSequence = aRetval.getArray(); diff --git a/slideshow/source/engine/shapes/viewappletshape.cxx b/slideshow/source/engine/shapes/viewappletshape.cxx index 55ca3880fa2d..a3878ed53b36 100644 --- a/slideshow/source/engine/shapes/viewappletshape.cxx +++ b/slideshow/source/engine/shapes/viewappletshape.cxx @@ -121,7 +121,7 @@ namespace slideshow::internal uno::UNO_QUERY_THROW ); uno::Reference< awt::XWindow2 > xParentWindow( - xPropSet->getPropertyValue("Window"), + xPropSet->getPropertyValue(u"Window"_ustr), uno::UNO_QUERY_THROW ); uno::Reference<lang::XMultiComponentFactory> xFactory( diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index f91972f8fe40..83acbd7e5207 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -168,7 +168,7 @@ namespace slideshow::internal uno::Reference< beans::XPropertySet > xPropSet( mxShape, uno::UNO_QUERY ); if (xPropSet.is()) { - xPropSet->getPropertyValue("FallbackGraphic") >>= xGraphic; + xPropSet->getPropertyValue(u"FallbackGraphic"_ustr) >>= xGraphic; } Graphic aGraphic(xGraphic); @@ -217,7 +217,7 @@ namespace slideshow::internal if( xPropSet.is() && getPropertyValue( xParentWindow, xPropSet, - "Window") ) + u"Window"_ustr) ) { const awt::Rectangle aRect( xParentWindow->getPosSize() ); @@ -286,13 +286,13 @@ namespace slideshow::internal if (xPropSet.is()) { OUString aURL; - xPropSet->getPropertyValue("MediaMimeType") >>= sMimeType; - if ((xPropSet->getPropertyValue("PrivateTempFileURL") >>= aURL) + xPropSet->getPropertyValue(u"MediaMimeType"_ustr) >>= sMimeType; + if ((xPropSet->getPropertyValue(u"PrivateTempFileURL"_ustr) >>= aURL) && !aURL.isEmpty()) { implInitializeMediaPlayer( aURL, sMimeType ); } - else if (xPropSet->getPropertyValue("MediaURL") >>= aURL) + else if (xPropSet->getPropertyValue(u"MediaURL"_ustr) >>= aURL) { implInitializeMediaPlayer( aURL, sMimeType ); } @@ -337,19 +337,19 @@ namespace slideshow::internal bool bLoop( false ); getPropertyValue( bLoop, rxProps, - "Loop"); + u"Loop"_ustr); mxPlayer->setPlaybackLoop( bLoop ); bool bMute( false ); getPropertyValue( bMute, rxProps, - "Mute"); + u"Mute"_ustr); mxPlayer->setMute( bMute || !mbIsSoundEnabled); sal_Int16 nVolumeDB(0); getPropertyValue( nVolumeDB, rxProps, - "VolumeDB"); + u"VolumeDB"_ustr); mxPlayer->setVolumeDB( nVolumeDB ); if( mxPlayerWindow.is() ) @@ -357,7 +357,7 @@ namespace slideshow::internal media::ZoomLevel eZoom(media::ZoomLevel_FIT_TO_WINDOW); getPropertyValue( eZoom, rxProps, - "Zoom"); + u"Zoom"_ustr); mxPlayerWindow->setZoomLevel( eZoom ); } } @@ -376,7 +376,7 @@ namespace slideshow::internal { if( !rMediaURL.isEmpty() ) { - mxPlayer = avmedia::MediaWindow::createPlayer( rMediaURL, ""/*TODO!*/, &rMimeType ); + mxPlayer = avmedia::MediaWindow::createPlayer( rMediaURL, u""_ustr/*TODO!*/, &rMimeType ); } } catch( uno::RuntimeException& ) |