Kaydet (Commit) 96c7ab19 authored tarafından Luboš Luňák's avatar Luboš Luňák

hack the same meaning for o:hr handling like MSO uses

This doesn't in fact change much in LO, since ShapeType::getAbsRectangle()
uses 0 as the reference size, 100% is still actually 0.

Change-Id: I81690d710402224c8477c90ad14672b593aacc24
üst c52ba433
......@@ -267,6 +267,15 @@ ShapeTypeContext::ShapeTypeContext( ContextHandler2Helper& rParent, ShapeType& r
mrTypeModel.moCoordPos = lclDecodeInt32Pair( rAttribs, XML_coordorigin );
mrTypeModel.moCoordSize = lclDecodeInt32Pair( rAttribs, XML_coordsize );
setStyle( rAttribs.getString( XML_style, OUString() ) );
if( lclDecodeBool( rAttribs, O_TOKEN( hr )).get( false ))
{ // MSO's handling of o:hr width is nowhere near what the spec says:
// - o:hrpct is not in % but in 0.1%
// - if o:hrpct is not given, 100% width is assumed
// - given width is used only if explicit o:hrpct="0" is given
OUString hrpct = rAttribs.getString( O_TOKEN( hrpct ), "1000" );
if( hrpct != "0" )
mrTypeModel.maWidth = OUString::valueOf( hrpct.toInt32() / 10 ) + "%";
}
// stroke settings (may be overridden by v:stroke element later)
mrTypeModel.maStrokeModel.moStroked = lclDecodeBool( rAttribs, XML_stroked );
......
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