Kaydet (Commit) 185bb6f7 authored tarafından Rüdiger Timm's avatar Rüdiger Timm

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
üst 48c10698
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: MarkerStyle.cxx,v $ * $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 * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -130,7 +130,6 @@ sal_Bool XMLMarkerStyleImport::importXML( ...@@ -130,7 +130,6 @@ sal_Bool XMLMarkerStyleImport::importXML(
uno::Any& rValue, uno::Any& rValue,
OUString& rStrName ) OUString& rStrName )
{ {
sal_Bool bRet = sal_False;
sal_Bool bHasViewBox = sal_False; sal_Bool bHasViewBox = sal_False;
sal_Bool bHasPathData = sal_False; sal_Bool bHasPathData = sal_False;
...@@ -139,6 +138,8 @@ sal_Bool XMLMarkerStyleImport::importXML( ...@@ -139,6 +138,8 @@ sal_Bool XMLMarkerStyleImport::importXML(
SvXMLNamespaceMap& rNamespaceMap = rImport.GetNamespaceMap(); SvXMLNamespaceMap& rNamespaceMap = rImport.GetNamespaceMap();
SvXMLUnitConverter& rUnitConverter = rImport.GetMM100UnitConverter(); SvXMLUnitConverter& rUnitConverter = rImport.GetMM100UnitConverter();
OUString strPathData;
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for( sal_Int16 i = 0; i < nAttrCount; i++ ) for( sal_Int16 i = 0; i < nAttrCount; i++ )
{ {
...@@ -157,55 +158,57 @@ sal_Bool XMLMarkerStyleImport::importXML( ...@@ -157,55 +158,57 @@ sal_Bool XMLMarkerStyleImport::importXML(
bHasViewBox = sal_True; bHasViewBox = sal_True;
} }
else if( bHasViewBox && IsXMLToken( aStrAttrName, XML_D ) ) else if( IsXMLToken( aStrAttrName, XML_D ) )
{ {
SdXMLImExSvgDElement aPoints(aStrValue, *pViewBox, awt::Point( 0, 0 ), strPathData = aStrValue;
awt::Size( pViewBox->GetWidth(), pViewBox->GetHeight() ), bHasPathData = sal_True;
rUnitConverter ); }
}
if(aPoints.IsCurve()) if( bHasViewBox && bHasPathData )
{ {
drawing::PolyPolygonBezierCoords aSourcePolyPolygon( SdXMLImExSvgDElement aPoints(strPathData, *pViewBox, awt::Point( 0, 0 ),
aPoints.GetPointSequenceSequence(), awt::Size( pViewBox->GetWidth(), pViewBox->GetHeight() ),
aPoints.GetFlagSequenceSequence()); rUnitConverter );
rValue <<= aSourcePolyPolygon;
}
else
{
drawing::PolyPolygonBezierCoords aSourcePolyPolygon;
aSourcePolyPolygon.Coordinates = aPoints.GetPointSequenceSequence();
aSourcePolyPolygon.Flags.realloc(aSourcePolyPolygon.Coordinates.getLength());
// Zeiger auf innere sequences holen if(aPoints.IsCurve())
const drawing::PointSequence* pInnerSequence = aSourcePolyPolygon.Coordinates.getConstArray(); {
drawing::FlagSequence* pInnerSequenceFlags = aSourcePolyPolygon.Flags.getArray(); 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++) // Zeiger auf innere sequences holen
{ const drawing::PointSequence* pInnerSequence = aSourcePolyPolygon.Coordinates.getConstArray();
pInnerSequenceFlags->realloc(pInnerSequence->getLength()); drawing::FlagSequence* pInnerSequenceFlags = aSourcePolyPolygon.Flags.getArray();
drawing::PolygonFlags* pPolyFlags = pInnerSequenceFlags->getArray();
for(sal_Int32 b(0); b < pInnerSequence->getLength(); b++) for(sal_Int32 a(0); a < aSourcePolyPolygon.Coordinates.getLength(); a++)
*pPolyFlags++ = drawing::PolygonFlags_NORMAL; {
pInnerSequenceFlags->realloc(pInnerSequence->getLength());
drawing::PolygonFlags* pPolyFlags = pInnerSequenceFlags->getArray();
// next run for(sal_Int32 b(0); b < pInnerSequence->getLength(); b++)
pInnerSequence++; *pPolyFlags++ = drawing::PolygonFlags_NORMAL;
pInnerSequenceFlags++;
}
rValue <<= aSourcePolyPolygon; // next run
pInnerSequence++;
pInnerSequenceFlags++;
} }
bHasPathData = sal_True; rValue <<= aSourcePolyPolygon;
} }
} }
if( pViewBox ) if( pViewBox )
delete pViewBox; delete pViewBox;
bRet = bHasViewBox && bHasPathData; return bHasViewBox && bHasPathData;
return bRet;
} }
......
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