summaryrefslogtreecommitdiff
path: root/vcl/source/filter/wmf/enhwmf.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/filter/wmf/enhwmf.cxx')
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx36
1 files changed, 24 insertions, 12 deletions
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 5904e0928889..af35d6da5c6e 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -1008,20 +1008,38 @@ bool EnhWMFReader::ReadEnhWMF()
aLineInfo.SetWidth( nWidth );
bool bTransparent = false;
- sal_uInt16 nDashCount = 0;
- sal_uInt16 nDotCount = 0;
switch( nStyle & PS_STYLE_MASK )
{
case PS_DASHDOTDOT :
- nDotCount++;
+ aLineInfo.SetStyle( LINE_DASH );
+ aLineInfo.SetDashCount( 1 );
+ aLineInfo.SetDotCount( 2 );
+ aLineInfo.SetDashLen( 150 );
+ aLineInfo.SetDotLen( 30 );
+ aLineInfo.SetDistance( 50 );
+ break;
case PS_DASHDOT :
- nDashCount++;
+ aLineInfo.SetStyle( LINE_DASH );
+ aLineInfo.SetDashCount( 1 );
+ aLineInfo.SetDotCount( 1 );
+ aLineInfo.SetDashLen( 150 );
+ aLineInfo.SetDotLen( 30 );
+ aLineInfo.SetDistance( 90 );
+ break;
case PS_DOT :
- nDotCount++;
+ aLineInfo.SetStyle( LINE_DASH );
+ aLineInfo.SetDashCount( 0 );
+ aLineInfo.SetDotCount( 1 );
+ aLineInfo.SetDotLen( 30 );
+ aLineInfo.SetDistance( 50 );
break;
case PS_DASH :
- nDashCount++;
+ aLineInfo.SetStyle( LINE_DASH );
+ aLineInfo.SetDashCount( 1 );
+ aLineInfo.SetDotCount( 0 );
+ aLineInfo.SetDashLen( 225 );
+ aLineInfo.SetDistance( 100 );
break;
case PS_NULL :
bTransparent = true;
@@ -1033,12 +1051,6 @@ bool EnhWMFReader::ReadEnhWMF()
default :
aLineInfo.SetStyle( LINE_SOLID );
}
- if ( nDashCount | nDotCount )
- {
- aLineInfo.SetStyle( LINE_DASH );
- aLineInfo.SetDashCount( nDashCount );
- aLineInfo.SetDotCount( nDotCount );
- }
pOut->CreateObject( nIndex, GDI_PEN, new WinMtfLineStyle( aColorRef, aLineInfo, bTransparent ) );
}
}