diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-07-01 21:56:59 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-07-01 21:56:59 +0000 |
commit | ae64b0a47a6dcf134cc97c4e23bfb7462628b4ba (patch) | |
tree | 1cc903adf21ebbcb9a4fdc3844e3eee43ae4af39 /xmloff/source/draw | |
parent | f6978b3fa4b67675d4463afb51f109a0d33e725c (diff) |
INTEGRATION: CWS impress143 (1.126.40); FILE MERGED
2008/05/28 08:26:33 sj 1.126.40.1: #i85649# added user defined path
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r-- | xmloff/source/draw/ximpshap.cxx | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 8c644a0de44d..1fe00ced0380 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ximpshap.cxx,v $ - * $Revision: 1.127 $ + * $Revision: 1.128 $ * * This file is part of OpenOffice.org. * @@ -1765,6 +1765,35 @@ void SdXMLConnectorShapeContext::processAttribute( sal_uInt16 nPrefix, const ::r GetImport().GetMM100UnitConverter().convertMeasure(maEnd.Y, rValue); return; } + if( IsXMLToken( rLocalName, XML_D ) ) + { + SdXMLImExViewBox aViewBox( 0, 0, 1, 1 ); + awt::Point aPoint( 0, 0 ); + awt::Size aSize( 1, 1 ); + + SdXMLImExSvgDElement aPoints( rValue, aViewBox, + aPoint, aSize, GetImport().GetMM100UnitConverter() ); + + if ( aPoints.IsCurve() ) + { + drawing::PolyPolygonBezierCoords aSourcePolyPolygon( + aPoints.GetPointSequenceSequence(), + aPoints.GetFlagSequenceSequence()); + maPath <<= aSourcePolyPolygon; + } + else + { + const drawing::PointSequenceSequence& rOuterSeq = aPoints.GetPointSequenceSequence(); + drawing::FlagSequenceSequence aFlagSeqSeq( rOuterSeq.getLength() ); + for ( int a = 0; a < rOuterSeq.getLength(); a++ ) + aFlagSeqSeq[ a ] = drawing::FlagSequence( rOuterSeq[ a ].getLength() ); + + drawing::PolyPolygonBezierCoords aSourcePolyPolygon( + aPoints.GetPointSequenceSequence(), + aFlagSeqSeq ); + maPath <<= aSourcePolyPolygon; + } + } } } @@ -1831,6 +1860,9 @@ void SdXMLConnectorShapeContext::StartElement(const uno::Reference< xml::sax::XA SetStyle(); SetLayer(); + if ( maPath.hasValue() ) + xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygonBezier") ), maPath ); + SdXMLShapeContext::StartElement(xAttrList); } } |