diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2004-06-17 14:00:32 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2004-06-17 14:00:32 +0000 |
commit | b92b8055e570c11f10514929dee4e29b96fb5417 (patch) | |
tree | 8fe6e644462cbc2686b7f83f1f4a15f9a4b53ee7 /xmloff | |
parent | 08344c498dfc1e7e66dabb3c4bf446f9be7dcf81 (diff) |
INTEGRATION: CWS impress11ea (1.7.320); FILE MERGED
2004/05/26 11:54:14 cl 1.7.320.1: #i24392# allow different attribute order for marker styles
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/MarkerStyle.cxx | 79 |
1 files changed, 41 insertions, 38 deletions
diff --git a/xmloff/source/style/MarkerStyle.cxx b/xmloff/source/style/MarkerStyle.cxx index ab8a7627dd..7cec2c30d8 100644 --- a/xmloff/source/style/MarkerStyle.cxx +++ b/xmloff/source/style/MarkerStyle.cxx @@ -2,9 +2,9 @@ * * $RCSfile: MarkerStyle.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: thb $ $Date: 2001-10-23 10:05:52 $ + * last change: $Author: rt $ $Date: 2004-06-17 15:00:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -130,7 +130,6 @@ sal_Bool XMLMarkerStyleImport::importXML( uno::Any& rValue, OUString& rStrName ) { - sal_Bool bRet = sal_False; sal_Bool bHasViewBox = sal_False; sal_Bool bHasPathData = sal_False; @@ -139,6 +138,8 @@ sal_Bool XMLMarkerStyleImport::importXML( SvXMLNamespaceMap& rNamespaceMap = rImport.GetNamespaceMap(); SvXMLUnitConverter& rUnitConverter = rImport.GetMM100UnitConverter(); + OUString strPathData; + sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i = 0; i < nAttrCount; i++ ) { @@ -157,55 +158,57 @@ sal_Bool XMLMarkerStyleImport::importXML( bHasViewBox = sal_True; } - else if( bHasViewBox && IsXMLToken( aStrAttrName, XML_D ) ) + else if( IsXMLToken( aStrAttrName, XML_D ) ) { - SdXMLImExSvgDElement aPoints(aStrValue, *pViewBox, awt::Point( 0, 0 ), - awt::Size( pViewBox->GetWidth(), pViewBox->GetHeight() ), - rUnitConverter ); + strPathData = aStrValue; + bHasPathData = sal_True; + } + } - if(aPoints.IsCurve()) - { - drawing::PolyPolygonBezierCoords aSourcePolyPolygon( - aPoints.GetPointSequenceSequence(), - aPoints.GetFlagSequenceSequence()); - rValue <<= aSourcePolyPolygon; - } - else - { - drawing::PolyPolygonBezierCoords aSourcePolyPolygon; - aSourcePolyPolygon.Coordinates = aPoints.GetPointSequenceSequence(); - aSourcePolyPolygon.Flags.realloc(aSourcePolyPolygon.Coordinates.getLength()); + if( bHasViewBox && bHasPathData ) + { + SdXMLImExSvgDElement aPoints(strPathData, *pViewBox, awt::Point( 0, 0 ), + awt::Size( pViewBox->GetWidth(), pViewBox->GetHeight() ), + rUnitConverter ); - // Zeiger auf innere sequences holen - const drawing::PointSequence* pInnerSequence = aSourcePolyPolygon.Coordinates.getConstArray(); - drawing::FlagSequence* pInnerSequenceFlags = aSourcePolyPolygon.Flags.getArray(); + if(aPoints.IsCurve()) + { + drawing::PolyPolygonBezierCoords aSourcePolyPolygon( + aPoints.GetPointSequenceSequence(), + aPoints.GetFlagSequenceSequence()); + rValue <<= aSourcePolyPolygon; + } + else + { + drawing::PolyPolygonBezierCoords aSourcePolyPolygon; + aSourcePolyPolygon.Coordinates = aPoints.GetPointSequenceSequence(); + aSourcePolyPolygon.Flags.realloc(aSourcePolyPolygon.Coordinates.getLength()); - for(sal_Int32 a(0); a < aSourcePolyPolygon.Coordinates.getLength(); a++) - { - pInnerSequenceFlags->realloc(pInnerSequence->getLength()); - drawing::PolygonFlags* pPolyFlags = pInnerSequenceFlags->getArray(); + // Zeiger auf innere sequences holen + const drawing::PointSequence* pInnerSequence = aSourcePolyPolygon.Coordinates.getConstArray(); + drawing::FlagSequence* pInnerSequenceFlags = aSourcePolyPolygon.Flags.getArray(); - for(sal_Int32 b(0); b < pInnerSequence->getLength(); b++) - *pPolyFlags++ = drawing::PolygonFlags_NORMAL; + for(sal_Int32 a(0); a < aSourcePolyPolygon.Coordinates.getLength(); a++) + { + pInnerSequenceFlags->realloc(pInnerSequence->getLength()); + drawing::PolygonFlags* pPolyFlags = pInnerSequenceFlags->getArray(); - // next run - pInnerSequence++; - pInnerSequenceFlags++; - } + for(sal_Int32 b(0); b < pInnerSequence->getLength(); b++) + *pPolyFlags++ = drawing::PolygonFlags_NORMAL; - rValue <<= aSourcePolyPolygon; + // next run + pInnerSequence++; + pInnerSequenceFlags++; } - bHasPathData = sal_True; - } + rValue <<= aSourcePolyPolygon; + } } if( pViewBox ) delete pViewBox; - bRet = bHasViewBox && bHasPathData; - - return bRet; + return bHasViewBox && bHasPathData; } |