diff options
Diffstat (limited to 'svx/source/svdraw/svdoashp.cxx')
-rwxr-xr-x[-rw-r--r--] | svx/source/svdraw/svdoashp.cxx | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 30791ce216d4..ecfa3051262a 100644..100755 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -108,7 +109,7 @@ static MSO_SPT ImpGetCustomShapeType( const SdrObjCustomShape& rCustoShape ) MSO_SPT eRetValue = mso_sptNil; rtl::OUString aEngine( ( (SdrCustomShapeEngineItem&)rCustoShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_ENGINE ) ).GetValue() ); - if ( !aEngine.getLength() || aEngine.equalsAscii( "com.sun.star.drawing.EnhancedCustomShapeEngine" ) ) + if ( !aEngine.getLength() || aEngine.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.EnhancedCustomShapeEngine" ) ) ) { rtl::OUString sShapeType; const rtl::OUString sType( RTL_CONSTASCII_USTRINGPARAM ( "Type" ) ); @@ -358,7 +359,7 @@ Reference< XCustomShapeEngine > SdrObjCustomShape::GetCustomShapeEngine( const S { Sequence< Any > aArgument( 1 ); Sequence< PropertyValue > aPropValues( 1 ); - aPropValues[ 0 ].Name = rtl::OUString::createFromAscii( "CustomShape" ); + aPropValues[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CustomShape")); aPropValues[ 0 ].Value <<= aXShape; aArgument[ 0 ] <<= aPropValues; Reference< XInterface > xInterface( xFactory->createInstanceWithArguments( aEngine, aArgument ) ); @@ -507,7 +508,6 @@ sal_Bool SdrObjCustomShape::GetTextBounds( Rectangle& rTextBound ) const basegfx::B2DPolyPolygon SdrObjCustomShape::GetLineGeometry( const SdrObjCustomShape* pCustomShape, const sal_Bool bBezierAllowed ) { basegfx::B2DPolyPolygon aRetval; - sal_Bool bRet = sal_False; Reference< XCustomShapeEngine > xCustomShapeEngine( GetCustomShapeEngine( pCustomShape ) ); if ( xCustomShapeEngine.is() ) { @@ -519,7 +519,6 @@ basegfx::B2DPolyPolygon SdrObjCustomShape::GetLineGeometry( const SdrObjCustomSh { aRetval = basegfx::tools::adaptiveSubdivideByAngle(aRetval); } - bRet = sal_True; } catch ( const com::sun::star::lang::IllegalArgumentException ) { @@ -1972,12 +1971,12 @@ void SdrObjCustomShape::NbcMirror( const Point& rRef1, const Point& rRef2 ) InvalidateRenderGeometry(); } -void SdrObjCustomShape::Shear( const Point& rRef, long nWink, double tn, FASTBOOL bVShear ) +void SdrObjCustomShape::Shear( const Point& rRef, long nWink, double tn, bool bVShear ) { SdrTextObj::Shear( rRef, nWink, tn, bVShear ); InvalidateRenderGeometry(); } -void SdrObjCustomShape::NbcShear( const Point& rRef, long nWink, double tn, FASTBOOL bVShear ) +void SdrObjCustomShape::NbcShear( const Point& rRef, long nWink, double tn, bool bVShear ) { long nDrehWink = aGeo.nDrehWink; if ( nDrehWink ) @@ -2467,12 +2466,12 @@ void SdrObjCustomShape::DragCreateObject( SdrDragStat& rStat ) bSnapRectDirty=sal_True; } -FASTBOOL SdrObjCustomShape::BegCreate( SdrDragStat& rDrag ) +bool SdrObjCustomShape::BegCreate( SdrDragStat& rDrag ) { return SdrTextObj::BegCreate( rDrag ); } -FASTBOOL SdrObjCustomShape::MovCreate(SdrDragStat& rStat) +bool SdrObjCustomShape::MovCreate(SdrDragStat& rStat) { SdrView* pView = rStat.GetView(); // #i37448# if( pView && pView->IsSolidDragging() ) @@ -2484,7 +2483,7 @@ FASTBOOL SdrObjCustomShape::MovCreate(SdrDragStat& rStat) return sal_True; } -FASTBOOL SdrObjCustomShape::EndCreate( SdrDragStat& rStat, SdrCreateCmd eCmd ) +bool SdrObjCustomShape::EndCreate( SdrDragStat& rStat, SdrCreateCmd eCmd ) { DragCreateObject( rStat ); @@ -2522,18 +2521,18 @@ basegfx::B2DPolyPolygon SdrObjCustomShape::TakeCreatePoly(const SdrDragStat& /*r // in context with the SdrObjCustomShape the SdrTextAutoGrowHeightItem == true -> Resize Shape to fit text, // the SdrTextAutoGrowWidthItem == true -> Word wrap text in Shape -FASTBOOL SdrObjCustomShape::IsAutoGrowHeight() const +bool SdrObjCustomShape::IsAutoGrowHeight() const { const SfxItemSet& rSet = GetMergedItemSet(); - FASTBOOL bIsAutoGrowHeight = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); + bool bIsAutoGrowHeight = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); if ( bIsAutoGrowHeight && IsVerticalWriting() ) bIsAutoGrowHeight = ((SdrTextWordWrapItem&)(rSet.Get(SDRATTR_TEXT_WORDWRAP))).GetValue() == sal_False; return bIsAutoGrowHeight; } -FASTBOOL SdrObjCustomShape::IsAutoGrowWidth() const +bool SdrObjCustomShape::IsAutoGrowWidth() const { const SfxItemSet& rSet = GetMergedItemSet(); - FASTBOOL bIsAutoGrowWidth = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); + bool bIsAutoGrowWidth = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); if ( bIsAutoGrowWidth && !IsVerticalWriting() ) bIsAutoGrowWidth = ((SdrTextWordWrapItem&)(rSet.Get(SDRATTR_TEXT_WORDWRAP))).GetValue() == sal_False; return bIsAutoGrowWidth; @@ -2601,12 +2600,12 @@ void SdrObjCustomShape::SetVerticalWriting( sal_Bool bVertical ) } } } -FASTBOOL SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHgt, FASTBOOL bWdt) const +bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt, bool bWdt) const { if ( pModel && HasText() && !rR.IsEmpty() ) { - FASTBOOL bWdtGrow=bWdt && IsAutoGrowWidth(); - FASTBOOL bHgtGrow=bHgt && IsAutoGrowHeight(); + bool bWdtGrow=bWdt && IsAutoGrowWidth(); + bool bHgtGrow=bHgt && IsAutoGrowHeight(); if ( bWdtGrow || bHgtGrow ) { Rectangle aR0(rR); @@ -2745,7 +2744,7 @@ FASTBOOL SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOO return sal_False; } -Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const FASTBOOL bHgt, const FASTBOOL bWdt ) +Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool bWdt ) { Rectangle aReturnValue; @@ -2775,7 +2774,7 @@ Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const FASTBOOL bHgt, const F return aReturnValue; } -FASTBOOL SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bWdt) +bool SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { Rectangle aNewTextRect = ImpCalculateTextFrame( bHgt, bWdt ); sal_Bool bRet = !aNewTextRect.IsEmpty() && ( aNewTextRect != aRect ); @@ -2805,7 +2804,7 @@ FASTBOOL SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FAST } return bRet; } -FASTBOOL SdrObjCustomShape::AdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bWdt) +bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { Rectangle aNewTextRect = ImpCalculateTextFrame( bHgt, bWdt ); sal_Bool bRet = !aNewTextRect.IsEmpty() && ( aNewTextRect != aRect ); @@ -2968,7 +2967,7 @@ void SdrObjCustomShape::TakeTextAnchorRect( Rectangle& rAnchorRect ) const else SdrTextObj::TakeTextAnchorRect( rAnchorRect ); } -void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText, +void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, Rectangle* pAnchorRect, sal_Bool /*bLineWidth*/) const { Rectangle aAnkRect; // Rect innerhalb dem geankert wird @@ -3293,7 +3292,7 @@ void SdrObjCustomShape::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, } default: { - DBG_ERROR("TRSetBaseGeometry: Missing unit translation to PoolMetric!"); + OSL_FAIL("TRSetBaseGeometry: Missing unit translation to PoolMetric!"); } } } @@ -3439,7 +3438,7 @@ sal_Bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, ba } default: { - DBG_ERROR("TRGetBaseGeometry: Missing unit translation to 100th mm!"); + OSL_FAIL("TRGetBaseGeometry: Missing unit translation to 100th mm!"); } } } @@ -3502,3 +3501,5 @@ void SdrObjCustomShape::InvalidateRenderGeometry() } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |