diff options
Diffstat (limited to 'filter/source/graphicfilter/icgm/actimpr.cxx')
-rw-r--r-- | filter/source/graphicfilter/icgm/actimpr.cxx | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx index 8ea437c45f12..ce0d5f191238 100644 --- a/filter/source/graphicfilter/icgm/actimpr.cxx +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -130,11 +130,11 @@ void CGMImpressOutAct::ImplSetOrientation( FloatPoint& rRefPoint, double& rOrien { uno::Any aAny; aAny <<= (sal_Int32)rRefPoint.X; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotationPointX"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotationPointX" )), aAny ); aAny <<= (sal_Int32)rRefPoint.Y; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotationPointY"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotationPointY" )), aAny ); aAny <<= (sal_Int32)( rOrientation * 100.0 ); - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotateAngle"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotateAngle" )), aAny ); } // --------------------------------------------------------------- @@ -162,10 +162,10 @@ void CGMImpressOutAct::ImplSetLineBundle() fLineWidth = mpCGM->pElement->aLineBundle.nLineWidth; aAny <<= (sal_Int32)nLineColor; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineColor"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineColor" )), aAny ); aAny <<= (sal_Int32)fLineWidth; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineWidth"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineWidth" )), aAny ); switch( eLineType ) { @@ -186,12 +186,12 @@ void CGMImpressOutAct::ImplSetLineBundle() break; } aAny <<= eLS; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineStyle"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineStyle" )), aAny ); if ( eLS == drawing::LineStyle_DASH ) { drawing::LineDash aLineDash( drawing::DashStyle_RECTRELATIVE, 1, 50, 3, 33, 100 ); aAny <<= aLineDash; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineDash"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineDash" )), aAny ); } }; @@ -249,7 +249,7 @@ void CGMImpressOutAct::ImplSetFillBundle() nPatternIndex = mpCGM->pElement->aFillBundle.nFillPatternIndex; aAny <<= (sal_Int32)nFillColor; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("FillColor"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillColor" )), aAny ); switch ( eFillStyle ) { @@ -297,27 +297,27 @@ void CGMImpressOutAct::ImplSetFillBundle() if ( eFS == drawing::FillStyle_GRADIENT ) { aAny <<= *mpGradient; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("FillGradient"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillGradient" )), aAny ); } aAny <<= eFS; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("FillStyle"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" )), aAny ); eLS = drawing::LineStyle_NONE; if ( eFillStyle == FIS_HOLLOW ) { eLS = drawing::LineStyle_SOLID; aAny <<= (sal_Int32)nFillColor; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineColor"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineColor" )), aAny ); aAny <<= (sal_Int32)0; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineWidth"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineWidth" )), aAny ); } else if ( eEdgeType != ET_NONE ) { aAny <<= (sal_Int32)nEdgeColor; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineColor"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineColor" )), aAny ); aAny <<= (sal_Int32)fEdgeWidth; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineWidth"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineWidth" )), aAny ); switch( eEdgeType ) { @@ -346,7 +346,7 @@ void CGMImpressOutAct::ImplSetFillBundle() } aAny <<= eLS; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineStyle"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineStyle" )), aAny ); if ( eFS == drawing::FillStyle_HATCH ) { @@ -375,7 +375,7 @@ void CGMImpressOutAct::ImplSetFillBundle() aHatch.Angle = 15 * ( ( nHatchIndex & 0x1f ) - 5 ); } aAny <<= aHatch; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("FillHatch"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillHatch" )), aAny ); } }; @@ -412,7 +412,7 @@ void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XProperty nTextColor = mpCGM->pElement->aTextBundle.GetColor(); aAny <<= (sal_Int32)nTextColor; - rProperty->setPropertyValue( rtl::OUString::createFromAscii("CharColor"), aAny ); + rProperty->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharColor" )), aAny ); sal_uInt32 nFontType = 0; awt::FontDescriptor aFontDescriptor; @@ -435,7 +435,7 @@ void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XProperty aFontDescriptor.Underline = awt::FontUnderline::SINGLE; } aAny <<= aFontDescriptor; - rProperty->setPropertyValue( rtl::OUString::createFromAscii("FontDescriptor"), aAny ); + rProperty->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontDescriptor" )), aAny ); }; // --------------------------------------------------------------- @@ -485,7 +485,7 @@ void CGMImpressOutAct::EndGroup() uno::Reference< drawing::XShapes > aXShapes; // if ( maXServiceManagerSC->createInstance( L"stardiv.one.drawing.ShapeCollection" )->queryInterface( ::getCppuType((const Reference< drawing::XShapes >*)0), aXShapes ) ) - uno::Reference< drawing::XShape > aXShapeCollection( maXServiceManagerSC->createInstance( rtl::OUString::createFromAscii("com.sun.star.drawing.ShapeCollection") ), uno::UNO_QUERY ); + uno::Reference< drawing::XShape > aXShapeCollection( maXServiceManagerSC->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.ShapeCollection" )) ), uno::UNO_QUERY ); if ( aXShapeCollection.is() ) { aXShapes = uno::Reference< drawing::XShapes >( aXShapeCollection, uno::UNO_QUERY ); @@ -523,7 +523,7 @@ void CGMImpressOutAct::DrawRectangle( FloatRect& rFloatRect ) { if ( mnGroupActCount != ( mpCGM->mnActCount - 1 ) ) // POWERPOINT HACK !!! { - if ( ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.RectangleShape") ) ) + if ( ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.RectangleShape" )) ) ) { awt::Size aSize( (long)(rFloatRect.Right - rFloatRect.Left ), (long)(rFloatRect.Bottom-rFloatRect.Top ) ); maXShape->setSize( aSize ); @@ -537,11 +537,11 @@ void CGMImpressOutAct::DrawRectangle( FloatRect& rFloatRect ) void CGMImpressOutAct::DrawEllipse( FloatPoint& rCenter, FloatPoint& rSize, double& rOrientation ) { - if ( ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.EllipseShape") ) ) + if ( ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.EllipseShape" )) ) ) { drawing::CircleKind eCircleKind = drawing::CircleKind_FULL; uno::Any aAny( &eCircleKind, ::getCppuType((const drawing::CircleKind*)0) ); - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("CircleKind"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CircleKind" )), aAny ); long nXSize = (long)( rSize.X * 2.0 ); // Merkwuerdigkes Verhalten bei einer awt::Size von 0 long nYSize = (long)( rSize.Y * 2.0 ); @@ -565,7 +565,7 @@ void CGMImpressOutAct::DrawEllipse( FloatPoint& rCenter, FloatPoint& rSize, doub void CGMImpressOutAct::DrawEllipticalArc( FloatPoint& rCenter, FloatPoint& rSize, double& rOrientation, sal_uInt32 nType, double& fStartAngle, double& fEndAngle ) { - if ( ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.EllipseShape") ) ) + if ( ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.EllipseShape" )) ) ) { uno::Any aAny; drawing::CircleKind eCircleKind; @@ -604,11 +604,11 @@ void CGMImpressOutAct::DrawEllipticalArc( FloatPoint& rCenter, FloatPoint& rSize else { aAny.setValue( &eCircleKind, ::getCppuType((const drawing::CircleKind*)0) ); - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("CircleKind"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CircleKind" )), aAny ); aAny <<= (sal_Int32)( (long)( fStartAngle * 100 ) ); - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("CircleStartAngle"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CircleStartAngle" )), aAny ); aAny <<= (sal_Int32)( (long)( fEndAngle * 100 ) ); - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("CircleEndAngle"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CircleEndAngle" )), aAny ); } maXShape->setPosition( awt::Point( (long)( rCenter.X - rSize.X ), (long)( rCenter.Y - rSize.Y ) ) ); if ( rOrientation != 0 ) @@ -627,7 +627,7 @@ void CGMImpressOutAct::DrawEllipticalArc( FloatPoint& rCenter, FloatPoint& rSize ImplSetLineBundle(); drawing::FillStyle eFillStyle = drawing::FillStyle_NONE; aAny.setValue( &eFillStyle, ::getCppuType((const drawing::FillStyle*)0) ); - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("FillStyle"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" )), aAny ); } } } @@ -655,7 +655,7 @@ void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc ) mpCGM->ImplMapX( fdx ); mpCGM->ImplMapY( fdy ); - if ( ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.GraphicObjectShape") ) ) + if ( ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.GraphicObjectShape" )) ) ) { maXShape->setSize( awt::Size( (long)fdx, (long)fdy ) ); maXShape->setPosition( awt::Point( (long)aOrigin.X, (long)aOrigin.Y ) ); @@ -668,7 +668,7 @@ void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc ) uno::Reference< awt::XBitmap > xBitmap( VCLUnoHelper::CreateBitmap( BitmapEx( *( pBmpDesc->mpBitmap ) ) ) ); uno::Any aAny; aAny <<= xBitmap; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("GraphicObjectFillBitmap"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GraphicObjectFillBitmap" )), aAny ); } } @@ -680,7 +680,7 @@ void CGMImpressOutAct::DrawPolygon( Polygon& rPoly ) { sal_uInt16 nPoints = rPoly.GetSize(); - if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.PolyPolygonShape") ) ) + if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.PolyPolygonShape" )) ) ) { drawing::PointSequenceSequence aRetval; @@ -701,7 +701,7 @@ void CGMImpressOutAct::DrawPolygon( Polygon& rPoly ) uno::Any aParam; aParam <<= aRetval; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("PolyPolygon"), aParam ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PolyPolygon" )), aParam ); ImplSetFillBundle(); } }; @@ -713,7 +713,7 @@ void CGMImpressOutAct::DrawPolyLine( Polygon& rPoly ) { sal_uInt16 nPoints = rPoly.GetSize(); - if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.PolyLineShape") ) ) + if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.PolyLineShape" )) ) ) { drawing::PointSequenceSequence aRetval; @@ -734,7 +734,7 @@ void CGMImpressOutAct::DrawPolyLine( Polygon& rPoly ) uno::Any aParam; aParam <<= aRetval; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("PolyPolygon"), aParam ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PolyPolygon" )), aParam ); ImplSetLineBundle(); } }; @@ -744,7 +744,7 @@ void CGMImpressOutAct::DrawPolyLine( Polygon& rPoly ) void CGMImpressOutAct::DrawPolybezier( Polygon& rPolygon ) { USHORT nPoints = rPolygon.GetSize(); - if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.OpenBezierShape") ) ) + if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.OpenBezierShape" )) ) ) { drawing::PolyPolygonBezierCoords aRetval; @@ -769,7 +769,7 @@ void CGMImpressOutAct::DrawPolybezier( Polygon& rPolygon ) } uno::Any aParam; aParam <<= aRetval; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("PolyPolygonBezier"), aParam ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PolyPolygonBezier" )), aParam ); ImplSetLineBundle(); } }; @@ -779,7 +779,7 @@ void CGMImpressOutAct::DrawPolybezier( Polygon& rPolygon ) void CGMImpressOutAct::DrawPolyPolygon( PolyPolygon& rPolyPolygon ) { sal_uInt32 nNumPolys = rPolyPolygon.Count(); - if ( nNumPolys && ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.ClosedBezierShape") ) ) + if ( nNumPolys && ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.ClosedBezierShape" )) ) ) { drawing::PolyPolygonBezierCoords aRetval; @@ -814,7 +814,7 @@ void CGMImpressOutAct::DrawPolyPolygon( PolyPolygon& rPolyPolygon ) } uno::Any aParam; aParam <<= aRetval; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("PolyPolygonBezier"), aParam); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PolyPolygonBezier" )), aParam); ImplSetFillBundle(); } }; @@ -823,7 +823,7 @@ void CGMImpressOutAct::DrawPolyPolygon( PolyPolygon& rPolyPolygon ) void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, char* pString, sal_uInt32 /*nSize*/, FinalFlag eFlag ) { - if ( ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.TextShape") ) ) + if ( ImplCreateShape( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.TextShape" )) ) ) { uno::Any aAny; long nWidth = rTextSize.Width; @@ -876,17 +876,17 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha if ( nOrientation ) { aAny <<= (sal_Int32)( aTextPos.X ); - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotationPointX"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotationPointX" )), aAny ); aAny <<= (sal_Int32)( aTextPos.Y + nHeight ); - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotationPointY"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotationPointY" )), aAny ); aAny <<= (sal_Int32)( (sal_Int32)( nOrientation * 100 ) ); - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotateAngle"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RotateAngle" )), aAny ); } if ( nWidth == -1 ) { sal_Bool bTrue( sal_True ); aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0 )); - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("TextAutoGrowWidth"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextAutoGrowWidth" )), aAny ); drawing::TextAdjust eTextAdjust; switch ( mpCGM->pElement->eTextAlignmentH ) @@ -904,13 +904,13 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha break; } aAny <<= eTextAdjust; - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("TextHorizontalAdjust"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextHorizontalAdjust" )), aAny ); } if ( nHeight == -1 ) { sal_Bool bTrue = sal_True; aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0) ); - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("TextAutoGrowHeight"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextAutoGrowHeight" )), aAny ); } uno::Reference< text::XText > xText; uno::Any aFirstQuery( maXShape->queryInterface( ::getCppuType((const uno::Reference< text::XText >*)0) )); @@ -946,13 +946,13 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha aAny <<= (sal_Int16)style::HorizontalAlignment_CENTER; break; } - aCursorPropSet->setPropertyValue( rtl::OUString::createFromAscii("ParaAdjust"), aAny ); + aCursorPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParaAdjust" )), aAny ); } if ( nWidth > 0 && nHeight > 0 ) // restricted text { sal_Bool bTrue = sal_True; aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0)); - maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("TextFitToSize"), aAny ); + maXPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextFitToSize" )), aAny ); } aCursorText->setString( aStr ); aXTextCursor->gotoEnd( sal_True ); |