Kaydet (Commit) b1fbb151 authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Markus Mohrhard

fix OOXML validation error, related fdo#42698

Missing percentage sign in type. The values of XML_d and XML_sp seem
insane.

Change-Id: If6762ed70d3536c0eeea3ee687991dad60f5e71e
üst 1ca73256
......@@ -48,6 +48,12 @@ static inline sal_Int64 TwipsToEMU( sal_Int32 nTwips )
return sal_Int64( nTwips ) * 635;
}
template <typename T>
OString writePercentage(T number)
{
return OString::number(number) + "%";
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -620,17 +620,18 @@ void DrawingML::WriteOutline( Reference< XPropertySet > rXPropSet )
if( bDashSet && aStyleLineStyle != drawing::LineStyle_DASH ) {
// line style is a dash and it was not set by the shape style
// TODO: the XML_d and XML_sp values seem insane
mpFS->startElementNS( XML_a, XML_custDash, FSEND );
int i;
for( i = 0; i < aLineDash.Dots; i ++ )
mpFS->singleElementNS( XML_a, XML_ds,
XML_d, aLineDash.DotLen ? I64S( aLineDash.DotLen*1000 ) : "100000",
XML_sp, I64S( aLineDash.Distance*1000 ),
XML_d, aLineDash.DotLen ? writePercentage( aLineDash.DotLen*1000 ) : "100000%",
XML_sp, writePercentage( aLineDash.Distance*1000 ),
FSEND );
for( i = 0; i < aLineDash.Dashes; i ++ )
mpFS->singleElementNS( XML_a, XML_ds,
XML_d, aLineDash.DashLen ? I64S( aLineDash.DashLen*1000 ) : "100000",
XML_sp, I64S( aLineDash.Distance*1000 ),
XML_d, aLineDash.DashLen ? writePercentage( aLineDash.DashLen*1000 ) : "100000%",
XML_sp, writePercentage( aLineDash.Distance*1000 ),
FSEND );
mpFS->endElementNS( XML_a, XML_custDash );
}
......
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