From 97eb8a6e0eb830f37dcba64a51d725aab4c5ff53 Mon Sep 17 00:00:00 2001 From: Jean-Noël Rouvignac Date: Wed, 30 Jan 2013 11:44:23 +0100 Subject: Removed several useless macros: A2OU, A2S, C2U, C2S, OUSTR, OUSTRING MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie859cb2dfdc7103c379fce56be88eef8fe390afd Reviewed-on: https://gerrit.libreoffice.org/1924 Tested-by: Luboš Luňák Reviewed-by: Luboš Luňák --- .../source/engine/shapes/drawinglayeranimation.cxx | 16 +++++------ slideshow/source/engine/shapes/drawshape.cxx | 2 +- slideshow/source/engine/shapes/gdimtftools.cxx | 18 ++++++------ slideshow/source/engine/shapes/shapeimporter.cxx | 32 +++++++++++----------- slideshow/source/engine/slideshowimpl.cxx | 20 +++++++------- slideshow/source/inc/tools.hxx | 2 -- 6 files changed, 44 insertions(+), 46 deletions(-) (limited to 'slideshow') diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx index ced759233ad5..1d8ef74dcd1b 100644 --- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx +++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx @@ -798,14 +798,14 @@ ActivityImpl::ActivityImpl( uno::Reference const xShape( mpDrawShape->getXShape() ); uno::Reference const xProps( xShape, uno::UNO_QUERY_THROW ); - getPropertyValue( meAnimKind, xProps, OUSTR("TextAnimationKind") ); + getPropertyValue( meAnimKind, xProps, "TextAnimationKind" ); 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, OUSTR("TextAnimationCount") ); + getPropertyValue( nRepeat, xProps, "TextAnimationCount" ); mnRepeat = nRepeat; if(mbAlternate) @@ -817,20 +817,20 @@ ActivityImpl::ActivityImpl( else { getPropertyValue( mbVisibleWhenStarted, xProps, - OUSTR("TextAnimationStartInside") ); + "TextAnimationStartInside" ); } // set visible when stopped getPropertyValue( mbVisibleWhenStopped, xProps, - OUSTR("TextAnimatiogonStopInside") ); + "TextAnimatiogonStopInside" ); // rotation: getPropertyValue( mfRotationAngle, xProps, - OUSTR("RotateAngle") ); + "RotateAngle" ); mfRotationAngle /= -100.0; // (switching direction) // set frequency sal_Int16 nDelay(0); - getPropertyValue( nDelay, xProps, OUSTR("TextAnimationDelay") ); + getPropertyValue( nDelay, xProps, "TextAnimationDelay" ); // set delay if not automatic mnFrequency = (nDelay ? nDelay : // default: @@ -850,10 +850,10 @@ ActivityImpl::ActivityImpl( } // Get animation direction - getPropertyValue( meDirection, xProps, OUSTR("TextAnimationDirection") ); + getPropertyValue( meDirection, xProps, "TextAnimationDirection" ); // Get step width. Negative means pixel, positive logical units - getPropertyValue( mnStepWidth, xProps, OUSTR("TextAnimationAmount") ); + getPropertyValue( mnStepWidth, xProps, "TextAnimationAmount" ); maContext.mpSubsettableShapeManager->addIntrinsicAnimationHandler( mpListener ); diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx index e10882aec601..79c6d4ab672c 100644 --- a/slideshow/source/engine/shapes/drawshape.cxx +++ b/slideshow/source/engine/shapes/drawshape.cxx @@ -411,7 +411,7 @@ namespace slideshow uno::UNO_QUERY ); if( xPropSet.is() ) getPropertyValue( eKind, xPropSet, - OUSTR("TextAnimationKind") ); + "TextAnimationKind" ); 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 6292ec585056..10e65b3c5a09 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -199,7 +199,7 @@ bool getMetaFile( const uno::Reference< lang::XComponent >& xSource, // creating the graphic exporter uno::Reference< document::XExporter > xExporter( xFactory->createInstanceWithContext( - OUSTR("com.sun.star.drawing.GraphicExportFilter"), + "com.sun.star.drawing.GraphicExportFilter", rxContext), uno::UNO_QUERY ); uno::Reference< document::XFilter > xFilter( xExporter, uno::UNO_QUERY ); @@ -209,27 +209,27 @@ bool getMetaFile( const uno::Reference< lang::XComponent >& xSource, return false; uno::Sequence< beans::PropertyValue > aProps(3); - aProps[0].Name = OUSTR("FilterName"); - aProps[0].Value <<= OUSTR("SVM"); + aProps[0].Name = "FilterName"; + aProps[0].Value <<= OUString("SVM"); - aProps[1].Name = OUSTR("GraphicRenderer"); + aProps[1].Name = "GraphicRenderer"; aProps[1].Value <<= xRenderer; uno::Sequence< beans::PropertyValue > aFilterData(4); - aFilterData[0].Name = OUSTR("ScrollText"); + aFilterData[0].Name = "ScrollText"; aFilterData[0].Value <<= ((mtfLoadFlags & MTF_LOAD_SCROLL_TEXT_MTF) != 0); - aFilterData[1].Name = OUSTR("ExportOnlyBackground"); + aFilterData[1].Name = "ExportOnlyBackground"; aFilterData[1].Value <<= ((mtfLoadFlags & MTF_LOAD_BACKGROUND_ONLY) != 0); - aFilterData[2].Name = OUSTR("Version"); + aFilterData[2].Name = "Version"; aFilterData[2].Value <<= static_cast( SOFFICE_FILEFORMAT_50 ); - aFilterData[3].Name = OUSTR("CurrentPage"); + aFilterData[3].Name = "CurrentPage"; aFilterData[3].Value <<= uno::Reference< uno::XInterface >( xContainingPage, uno::UNO_QUERY_THROW ); - aProps[2].Name = OUSTR("FilterData"); + aProps[2].Name = "FilterData"; aProps[2].Value <<= aFilterData; xExporter->setSourceDocument( xSource ); diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx index 1cead4b58d6f..1aef0501601a 100644 --- a/slideshow/source/engine/shapes/shapeimporter.cxx +++ b/slideshow/source/engine/shapes/shapeimporter.cxx @@ -78,7 +78,7 @@ bool importShapeGraphic( uno::Reference const& xPropSet ) { rtl::OUString aURL; - if( !getPropertyValue( aURL, xPropSet, OUSTR("GraphicURL")) || + if( !getPropertyValue( aURL, xPropSet, "GraphicURL") || aURL.isEmpty() ) { // no or empty property - cannot import shape graphic @@ -198,7 +198,7 @@ ShapeOfGroup::ShapeOfGroup( ShapeSharedPtr const& pGroupSha mnPrio(nPrio) { // read bound rect - uno::Any const aTmpRect_( xPropSet->getPropertyValue( OUSTR("BoundRect") )); + uno::Any const aTmpRect_( xPropSet->getPropertyValue( "BoundRect" )); awt::Rectangle const aTmpRect( aTmpRect_.get() ); basegfx::B2DRectangle const groupPosSize( pGroupShape->getBounds() ); maPosOffset = basegfx::B2DPoint( aTmpRect.X - groupPosSize.getMinX(), @@ -378,15 +378,15 @@ ShapeSharedPtr ShapeImporter::createShape( sal_Int16 nTransparency(0); sal_Int32 nRotation(0); - getPropertyValue( eColorMode, xPropSet, OUSTR("GraphicColorMode") ); - getPropertyValue( nLuminance, xPropSet, OUSTR("AdjustLuminance") ); - getPropertyValue( nContrast, xPropSet, OUSTR("AdjustContrast") ); - getPropertyValue( nRed, xPropSet, OUSTR("AdjustRed") ); - getPropertyValue( nGreen, xPropSet, OUSTR("AdjustGreen") ); - getPropertyValue( nBlue, xPropSet, OUSTR("AdjustBlue") ); - getPropertyValue( nGamma, xPropSet, OUSTR("Gamma") ); - getPropertyValue( nTransparency, xPropSet, OUSTR("Transparency") ); - getPropertyValue( nRotation, xPropSet, OUSTR("RotateAngle") ); + 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" ); GraphicAttr aGraphAttrs; aGraphAttrs.SetDrawMode( (GraphicDrawMode)eColorMode ); @@ -400,7 +400,7 @@ ShapeSharedPtr ShapeImporter::createShape( aGraphAttrs.SetRotation( static_cast(nRotation*10) ); text::GraphicCrop aGraphCrop; - if( getPropertyValue( aGraphCrop, xPropSet, OUSTR("GraphicCrop") )) + if( getPropertyValue( aGraphCrop, xPropSet, "GraphicCrop" )) { aGraphAttrs.SetCrop( aGraphCrop.Left, aGraphCrop.Top, @@ -443,7 +443,7 @@ bool ShapeImporter::isSkip( bool bEmpty = false; if( getPropertyValue( bEmpty, xPropSet, - OUSTR("IsEmptyPresentationObject")) && + "IsEmptyPresentationObject") && bEmpty ) { return true; @@ -487,9 +487,9 @@ void ShapeImporter::importPolygons(uno::Reference const& xP drawing::PointSequenceSequence aRetval; sal_Int32 nLineColor=0; double fLineWidth; - getPropertyValue( aRetval, xPropSet, OUSTR("PolyPolygon") ); - getPropertyValue( nLineColor, xPropSet, OUSTR("LineColor") ); - getPropertyValue( fLineWidth, xPropSet, OUSTR("LineWidth") ); + getPropertyValue( aRetval, xPropSet, "PolyPolygon" ); + getPropertyValue( nLineColor, xPropSet, "LineColor" ); + getPropertyValue( fLineWidth, xPropSet, "LineWidth" ); drawing::PointSequence* pOuterSequence = aRetval.getArray(); awt::Point* pInnerSequence = pOuterSequence->getArray(); diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index cf672ae296ac..f64f68136da4 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -767,7 +767,7 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition( sal_Int16 nTransitionType(0); if( !getPropertyValue( nTransitionType, xPropSet, - OUSTR("TransitionType" )) ) + "TransitionType") ) { OSL_TRACE( "createSlideTransition(): " "Could not extract slide transition type from XDrawPage - assuming no transition\n" ); @@ -777,7 +777,7 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition( sal_Int16 nTransitionSubType(0); if( !getPropertyValue( nTransitionSubType, xPropSet, - OUSTR("TransitionSubtype" )) ) + "TransitionSubtype") ) { OSL_TRACE( "createSlideTransition(): " "Could not extract slide transition subtype from XDrawPage - assuming no transition\n" ); @@ -787,7 +787,7 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition( bool bTransitionDirection(false); if( !getPropertyValue( bTransitionDirection, xPropSet, - OUSTR("TransitionDirection")) ) + "TransitionDirection") ) { OSL_TRACE( "createSlideTransition(): " "Could not extract slide transition direction from XDrawPage - assuming default direction\n" ); @@ -796,7 +796,7 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition( sal_Int32 aUnoColor(0); if( !getPropertyValue( aUnoColor, xPropSet, - OUSTR("TransitionFadeColor")) ) + "TransitionFadeColor") ) { OSL_TRACE( "createSlideTransition(): " "Could not extract slide transition fade color from XDrawPage - assuming black\n" ); @@ -807,10 +807,10 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition( uno::Any aSound; sal_Bool bLoopSound = sal_False; - if( !getPropertyValue( aSound, xPropSet, OUSTR("Sound")) ) + if( !getPropertyValue( aSound, xPropSet, "Sound") ) OSL_TRACE( "createSlideTransition(): Could not determine transition sound effect URL from XDrawPage - using no sound" ); - if( !getPropertyValue( bLoopSound, xPropSet, OUSTR("LoopSound") ) ) + if( !getPropertyValue( bLoopSound, xPropSet, "LoopSound" ) ) OSL_TRACE( "createSlideTransition(): Could not get slide property 'LoopSound' - using no sound" ); NumberAnimationSharedPtr pTransition( @@ -836,7 +836,7 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition( double nTransitionDuration(0.0); if( !getPropertyValue( nTransitionDuration, xPropSet, - OUSTR("TransitionDuration")) ) + "TransitionDuration") ) { OSL_TRACE( "createSlideTransition(): " "Could not extract slide transition duration from XDrawPage - assuming no transition\n" ); @@ -846,7 +846,7 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition( sal_Int32 nMinFrames(5); if( !getPropertyValue( nMinFrames, xPropSet, - OUSTR("MinimalFrameNumber")) ) + "MinimalFrameNumber") ) { OSL_TRACE( "createSlideTransition(): " "No minimal number of frames given - assuming 5\n" ); @@ -2310,10 +2310,10 @@ void SlideShowImpl::notifySlideEnded (const bool bReverse) if (xPropSet.is()) { xPropSet->setPropertyValue( - OUSTR("Change"), + "Change", uno::Any( static_cast(1) ) ); xPropSet->setPropertyValue( - OUSTR("Duration"), + "Duration", uno::Any( static_cast(time) ) ); } } diff --git a/slideshow/source/inc/tools.hxx b/slideshow/source/inc/tools.hxx index 15d723b09fa2..9aefb98857b8 100644 --- a/slideshow/source/inc/tools.hxx +++ b/slideshow/source/inc/tools.hxx @@ -39,8 +39,6 @@ #include -#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) ) - namespace com { namespace sun { namespace star { namespace beans { struct NamedValue; -- cgit