Kaydet (Commit) d13469c3 authored tarafından Cédric Bosdonnat's avatar Cédric Bosdonnat

Fixed lines width guessing: gap are no smaller than 1pt

üst 5aa3e4a3
......@@ -80,7 +80,7 @@ void BorderLineTest::testGuessWidthNoMatch()
{
SvxBorderLine line;
line.GuessLinesWidths( DOUBLE,
1, 2, 3 );
TEST_WIDTH + 1, TEST_WIDTH + 2, TEST_WIDTH + 3 );
CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetStyle() );
CPPUNIT_ASSERT_EQUAL( long( 0 ), line.GetWidth() );
}
......
......@@ -1736,7 +1736,7 @@ lcl_lineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_B
sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.LineDistance ) : rLine.LineDistance ));
}
sal_Bool bRet = rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0;
sal_Bool bRet = !rSvxLine.isEmpty();
return bRet;
}
......@@ -1799,11 +1799,11 @@ SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, Svx
}
rSvxLine.SetStyle( nStyle );
sal_Bool bGuessWidth = true;
sal_Bool bGuessWidth = sal_True;
if ( rLine->LineWidth )
{
rSvxLine.SetWidth( bConvert? MM100_TO_TWIP_UNSIGNED( rLine->LineWidth ) : rLine->LineWidth );
bGuessWidth = false;
bGuessWidth = sal_False;
}
return lcl_lineToSvxLine(rLine, rSvxLine, bConvert, bGuessWidth);
......
......@@ -272,6 +272,7 @@ sal_Bool XMLBorderHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue
aBorderLine.InnerLineWidth = 0;
aBorderLine.OuterLineWidth = 0;
aBorderLine.LineDistance = 0;
aBorderLine.LineWidth = 0;
}
// first of all, delete an empty line
......@@ -281,6 +282,7 @@ sal_Bool XMLBorderHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue
aBorderLine.InnerLineWidth = 0;
aBorderLine.OuterLineWidth = 0;
aBorderLine.LineDistance = 0;
aBorderLine.LineWidth = 0;
}
else if( bHasWidth )
{
......
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