Kaydet (Commit) 101559f8 authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS bm3 (1.7.8); FILE MERGED

2004/12/09 15:10:57 bm 1.7.8.2: arc functions: the vectors were not scaled correctly when having an ellipsis (fixed by sj)
2004/12/08 13:06:07 bm 1.7.8.1: allow coding of color-schemes into the type in the form col-xxxxxxxx, where xxxxxxxx is the hex-representation of the color string
üst e7c4c47f
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: EnhancedCustomShape2d.cxx,v $ * $RCSfile: EnhancedCustomShape2d.cxx,v $
* *
* $Revision: 1.7 $ * $Revision: 1.8 $
* *
* last change: $Author: rt $ $Date: 2004-11-26 14:26:16 $ * last change: $Author: vg $ $Date: 2004-12-23 11:08:33 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -58,7 +58,6 @@ ...@@ -58,7 +58,6 @@
* *
* *
************************************************************************/ ************************************************************************/
#ifndef _ENHANCEDCUSTOMSHAPE2D_HXX #ifndef _ENHANCEDCUSTOMSHAPE2D_HXX
#include "EnhancedCustomShape2d.hxx" #include "EnhancedCustomShape2d.hxx"
#endif #endif
...@@ -1158,6 +1157,15 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) : ...@@ -1158,6 +1157,15 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) :
case mso_sptBevel : nColorData = 0x502ad400; break; case mso_sptBevel : nColorData = 0x502ad400; break;
case mso_sptFoldedCorner : nColorData = 0x20d00000; break; case mso_sptFoldedCorner : nColorData = 0x20d00000; break;
case mso_sptSmileyFace : nColorData = 0x20d00000; break; case mso_sptSmileyFace : nColorData = 0x20d00000; break;
case mso_sptNil :
{
if( sShapeType.getLength() > 4 &&
sShapeType.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( "col-" )))
{
nColorData = sShapeType.copy( 4 ).toInt32( 16 );
}
}
break;
case mso_sptCurvedLeftArrow : case mso_sptCurvedLeftArrow :
{ {
if ( ( seqAdjustmentValues.getLength() > 2 ) && ( seqAdjustmentValues[ 2 ].State == com::sun::star::beans::PropertyState_DIRECT_VALUE ) ) if ( ( seqAdjustmentValues.getLength() > 2 ) && ( seqAdjustmentValues[ 2 ].State == com::sun::star::beans::PropertyState_DIRECT_VALUE ) )
...@@ -1949,14 +1957,18 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm ...@@ -1949,14 +1957,18 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm
for ( sal_uInt16 i = 0; ( i < nPntCount ) && ( ( rSrcPt + 3 ) < nCoordSize ); i++ ) for ( sal_uInt16 i = 0; ( i < nPntCount ) && ( ( rSrcPt + 3 ) < nCoordSize ); i++ )
{ {
Rectangle aRect( GetPoint( seqCoordinates[ rSrcPt ], sal_True, sal_True ), GetPoint( seqCoordinates[ rSrcPt + 1 ], sal_True, sal_True ) ); Rectangle aRect( GetPoint( seqCoordinates[ rSrcPt ], sal_True, sal_True ), GetPoint( seqCoordinates[ rSrcPt + 1 ], sal_True, sal_True ) );
Point aCenter( aRect.Center() ); if ( aRect.GetWidth() && aRect.GetHeight() )
Point aStart( GetPoint( seqCoordinates[ (sal_uInt16)( rSrcPt + nXor ) ], sal_True, sal_True ) ); {
Point aEnd( GetPoint( seqCoordinates[ (sal_uInt16)( rSrcPt + ( nXor ^ 1 ) ) ], sal_True, sal_True ) ); Point aCenter( aRect.Center() );
aStart.X() = (sal_Int32)( ( (double)( aStart.X() - aCenter.X() ) / fXScale ) ) + aCenter.X(); Point aStart( GetPoint( seqCoordinates[ (sal_uInt16)( rSrcPt + nXor ) ], sal_True, sal_True ) );
aStart.Y() = (sal_Int32)( ( (double)( aStart.Y() - aCenter.Y() ) / fYScale ) ) + aCenter.Y(); Point aEnd( GetPoint( seqCoordinates[ (sal_uInt16)( rSrcPt + ( nXor ^ 1 ) ) ], sal_True, sal_True ) );
aEnd.X() = (sal_Int32)( ( (double)( aEnd.X() - aCenter.X() ) / fXScale ) ) + aCenter.X(); double fRatio = (double)aRect.GetHeight() / (double)aRect.GetWidth();
aEnd.Y() = (sal_Int32)( ( (double)( aEnd.Y() - aCenter.Y() ) / fYScale ) ) + aCenter.Y(); aStart.X() = (sal_Int32)( ( (double)( aStart.X() - aCenter.X() ) ) * fRatio ) + aCenter.X();
AppendArc( aRect, aStart, aEnd, bClockwise, aPoly ); aStart.Y() = (sal_Int32)( ( (double)( aStart.Y() - aCenter.Y() ) ) ) + aCenter.Y();
aEnd.X() = (sal_Int32)( ( (double)( aEnd.X() - aCenter.X() ) ) * fRatio ) + aCenter.X();
aEnd.Y() = (sal_Int32)( ( (double)( aEnd.Y() - aCenter.Y() ) ) ) + aCenter.Y();
AppendArc( aRect, aStart, aEnd, bClockwise, aPoly );
}
rSrcPt += 4; rSrcPt += 4;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment