Kaydet (Commit) 6f1eb0b8 authored tarafından Andras Timar's avatar Andras Timar

remove unused code

Change-Id: If9b7870673a47b78457f6e22ee0cfa7e3a68372a
üst 113adfe3
...@@ -1776,7 +1776,6 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st ...@@ -1776,7 +1776,6 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st
OUString sPolyPolygonBezier ( "PolyPolygonBezier" ); OUString sPolyPolygonBezier ( "PolyPolygonBezier" );
OUString sPolyPolygon ( "PolyPolygon" ); OUString sPolyPolygon ( "PolyPolygon" );
OUString sPolygon ( "Polygon" ); OUString sPolygon ( "Polygon" );
OUString sCustomShapeGeometry ( "CustomShapeGeometry" );
if ( aAny >>= aXPropSet ) if ( aAny >>= aXPropSet )
{ {
...@@ -1785,8 +1784,6 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st ...@@ -1785,8 +1784,6 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st
bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sPolyPolygon, true ); bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sPolyPolygon, true );
if ( !bHasProperty ) if ( !bHasProperty )
bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sPolygon, true ); bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sPolygon, true );
if ( !bHasProperty )
bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sCustomShapeGeometry, true );
if ( bHasProperty ) if ( bHasProperty )
aRetPolyPoly = GetPolyPolygon( aAny ); aRetPolyPoly = GetPolyPolygon( aAny );
} }
...@@ -1912,94 +1909,6 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st ...@@ -1912,94 +1909,6 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st
} }
} }
} }
else if ( rAny.getValueType() == cppu::UnoType<uno::Sequence< beans::PropertyValue >>::get() )
{
uno::Sequence< beans::PropertyValue > const * pGeometrySeq =
static_cast<uno::Sequence< beans::PropertyValue > const *>(rAny.getValue());
if ( pGeometrySeq )
{
for( int i = 0; i < pGeometrySeq->getLength(); ++i )
{
const beans::PropertyValue& rProp = (*pGeometrySeq)[ i ];
if ( rProp.Name == "Path" )
{
uno::Sequence<beans::PropertyValue> aPathProp;
rProp.Value >>= aPathProp;
uno::Sequence<drawing::EnhancedCustomShapeParameterPair> aPairs;
uno::Sequence<drawing::EnhancedCustomShapeSegment> aSegments;
for (int j = 0; j < aPathProp.getLength(); ++j )
{
const beans::PropertyValue& rPathProp = aPathProp[j];
if (rPathProp.Name == "Coordinates")
rPathProp.Value >>= aPairs;
else if (rPathProp.Name == "Segments")
rPathProp.Value >>= aSegments;
}
aPolygon = Polygon( aPairs.getLength() );
for( int j = 0; j < aPairs.getLength(); ++j )
{
aPolygon[j] = Point( aPairs[j].First.Value.get<sal_Int32>(), aPairs[j].Second.Value.get<sal_Int32>() );
}
int nPointIndex = 0;
for( int j = 0; j < aSegments.getLength(); ++j )
{
for ( int k = 0; k < aSegments[j].Count; ++k )
{
switch( aSegments[ j ].Command )
{
case drawing::EnhancedCustomShapeSegmentCommand::UNKNOWN: break;
case drawing::EnhancedCustomShapeSegmentCommand::MOVETO :
case drawing::EnhancedCustomShapeSegmentCommand::LINETO :
nPointIndex++;
break;
case drawing::EnhancedCustomShapeSegmentCommand::CURVETO :
{
aPolygon.SetFlags( nPointIndex, POLY_CONTROL);
aPolygon.SetFlags( nPointIndex+1, POLY_CONTROL);
aPolygon.SetFlags( nPointIndex+2, POLY_NORMAL);
nPointIndex += 3;
break;
}
case drawing::EnhancedCustomShapeSegmentCommand::CLOSESUBPATH :
case drawing::EnhancedCustomShapeSegmentCommand::ENDSUBPATH :
case drawing::EnhancedCustomShapeSegmentCommand::NOFILL :
case drawing::EnhancedCustomShapeSegmentCommand::NOSTROKE :
break;
case drawing::EnhancedCustomShapeSegmentCommand::ANGLEELLIPSETO :
case drawing::EnhancedCustomShapeSegmentCommand::ANGLEELLIPSE :
nPointIndex += 3;
break;
case drawing::EnhancedCustomShapeSegmentCommand::ARCTO :
case drawing::EnhancedCustomShapeSegmentCommand::ARC :
case drawing::EnhancedCustomShapeSegmentCommand::CLOCKWISEARCTO :
case drawing::EnhancedCustomShapeSegmentCommand::CLOCKWISEARC :
nPointIndex += 4;
break;
case drawing::EnhancedCustomShapeSegmentCommand::ELLIPTICALQUADRANTX :
case drawing::EnhancedCustomShapeSegmentCommand::ELLIPTICALQUADRANTY :
nPointIndex++;
break;
case drawing::EnhancedCustomShapeSegmentCommand::QUADRATICCURVETO :
case drawing::EnhancedCustomShapeSegmentCommand::ARCANGLETO :
nPointIndex += 2;
break;
case drawing::EnhancedCustomShapeSegmentCommand::DARKEN :
case drawing::EnhancedCustomShapeSegmentCommand::DARKENLESS :
case drawing::EnhancedCustomShapeSegmentCommand::LIGHTEN :
case drawing::EnhancedCustomShapeSegmentCommand::LIGHTENLESS :
break;
}
}
}
aPolyPolygon.Insert( aPolygon, POLYPOLY_APPEND );
}
}
}
}
return aPolyPolygon; return aPolyPolygon;
} }
......
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