diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-08-22 00:19:42 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-08-22 00:34:52 +0200 |
commit | 601bfe2ce3113719b2f8edaba2ccb6b630051a9a (patch) | |
tree | 743f83d9596ab0382ea8c1121fcf78dec63484f9 /svtools | |
parent | cd0046bca0691fdca45a030903b7cde3bfee544c (diff) |
fdo#51777: add a hack for 1 twip DOUBLE borders:
Arguably such annoyingly thin double borders don't make much sense
anyway, because they're essentially 2 hairlines with ~no space between,
but unfortunately older LO versions are able to create them;
since the refactoring in 2d045cdb69176b280812dda0b813371cf1ac72e2,
which changed the BorderWidthImpl::Get* methods to return 0 due to
rounding, they were ignored at least in the HTML import, which is a
regression.
So add a special purpose hack that essentially rounds up the first line
to 1 but not the other lines so the visual result is a hairline single
border.
Change-Id: I20ac4675bcf67ea58a6931a40bff3605390e9c0d
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index ca70c0eb23c8..96780a1c5da6 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -328,6 +328,10 @@ long BorderWidthImpl::GetLine1( long nWidth ) const result = std::max<long>(0, static_cast<long>((m_nRate1 * nWidth) + 0.5) - (nConstant2 + nConstantD)); + if (result == 0 && m_nRate1 > 0.0 && nWidth > 0) + { // fdo#51777: hack to essentially treat 1 twip DOUBLE border + result = 1; // as 1 twip SINGLE border + } } return result; } |