filter/source/msfilter/escherex.cxx | 91 ------------------------------------ oox/source/export/shapes.cxx | 4 - 2 files changed, 2 insertions(+), 93 deletions(-)
New commits: commit 2181f936c88811d5b6eb6081355a99a727261a8f Author: Andras Timar <[email protected]> Date: Sat Jun 13 11:46:47 2015 +0200 no need to check for pShape here Change-Id: I6de2da7d2f17a14ddbe7e70651a416a01f49164b diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 7db7c58..158de6b 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -512,7 +512,7 @@ ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape ) { WritePolyPolygon( tools::PolyPolygon( pShape->GetLineGeometry(true) ) ); } - else if (bCustGeom && pShape) + else if (bCustGeom) { WriteCustomGeometry( xShape ); } commit 98a1065499edfe595f479e4fab41c0183fc5d5d2 Author: Andras Timar <[email protected]> Date: Sat Jun 13 11:43:30 2015 +0200 amend comment Change-Id: I45a452a7dbab35ab96c04336b35857f58a0af0c5 diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index f3f57c4..7db7c58 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -494,7 +494,7 @@ ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape ) // we export non-primitive shapes to custom geometry // we also export non-ooxml shapes which have handles/equations to custom geometry, because // we cannot convert ODF equations to DrawingML equations. TODO: see what binary DOC export filter does. - // but our WritePolyPolygon() function is incomplete, therefore we use a blacklist + // but our WritePolyPolygon()/WriteCustomGeometry() functions are incomplete, therefore we use a blacklist // we use a whitelist for shapes where mapping to MSO preset shape is not optimal bool bCustGeom = true; if( sShapeType == "ooxml-non-primitive" ) commit 6f1eb0b8ef674eab193498d569c6534c393258f5 Author: Andras Timar <[email protected]> Date: Sat Jun 13 11:40:23 2015 +0200 remove unused code Change-Id: If9b7870673a47b78457f6e22ee0cfa7e3a68372a diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 1e298dc..b3dbfde 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1776,7 +1776,6 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st OUString sPolyPolygonBezier ( "PolyPolygonBezier" ); OUString sPolyPolygon ( "PolyPolygon" ); OUString sPolygon ( "Polygon" ); - OUString sCustomShapeGeometry ( "CustomShapeGeometry" ); if ( aAny >>= aXPropSet ) { @@ -1785,8 +1784,6 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sPolyPolygon, true ); if ( !bHasProperty ) bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sPolygon, true ); - if ( !bHasProperty ) - bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sCustomShapeGeometry, true ); if ( bHasProperty ) aRetPolyPoly = GetPolyPolygon( aAny ); } @@ -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; } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
