summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedricbosdo@openoffice.org>2010-12-24 10:05:14 +0100
committerCédric Bosdonnat <cedricbosdo@openoffice.org>2011-03-19 15:31:25 +0100
commita9a953c06844aab3f2a09201caf6f073d1ad57d6 (patch)
treebff17fa16d9bd9f8555bdcc7e52ce45955a0f2df
parente93c59d0c1978bda7d38b8fa5e79b2592caa25a6 (diff)
Fixed the WW1 filters to use new borders widths
-rw-r--r--sw/source/filter/ww1/w1sprm.cxx27
1 files changed, 6 insertions, 21 deletions
diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx
index f821438df8b0..22ef566da3e3 100644
--- a/sw/source/filter/ww1/w1sprm.cxx
+++ b/sw/source/filter/ww1/w1sprm.cxx
@@ -228,34 +228,19 @@ SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc
eStyle = DASHED;
break;
}
- pLine->SetOutWidth(nCode);
- pLine->SetInWidth(0);
+ pLine->SetWidth( nCode );
pLine->SetStyle( eStyle );
}
else
{
- switch(pBrc->dxpLine1WidthGet())
- {
- default: OSL_FAIL("unknown linewidth");
- case 1: nCode = DEF_DOUBLE_LINE0_IN; break;
- }
- pLine->SetOutWidth(nCode);
- switch(pBrc->dxpLine2WidthGet())
+ if ( pBrc->dxpLine1WidthGet() == 1 && pBrc->dxpLine2WidthGet() == 1 )
{
- default: OSL_FAIL("unknown linewidth");
- case 1: nCode = DEF_DOUBLE_LINE0_OUT; break;
+ pLine->SetStyle( DOUBLE );
+ pLine->SetWidth( DEF_LINE_WIDTH_0 );
}
- pLine->SetInWidth(nCode);
- }
- switch(pBrc->dxpLine1WidthGet())
- {
- default: OSL_FAIL("unknown space");
- case 0: nCode = DEF_DOUBLE_LINE0_DIST; break;
- case 1: nCode = DEF_DOUBLE_LINE1_DIST; break;
- case 2: nCode = DEF_DOUBLE_LINE2_DIST; break;
- case 3: nCode = DEF_DOUBLE_LINE3_DIST; break;
+ else
+ OSL_ENSURE(sal_False, "unknown linewidth");
}
- pLine->SetDistance(nCode);
return pLine;
}