Bugzilla – Attachment 56161 Details for
Bug 38542
FORMATTING TABLE double borders incompatibility with old LibO / OOo Versions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
add a custom double border style
0003-fdo-38542-SvxBorderLine-GuessLinesWidths.patch (text/plain), 2.47 KB, created by
Michael Stahl (allotropia)
on 2012-01-25 13:48:33 UTC
(
hide
)
Description:
add a custom double border style
Filename:
MIME Type:
Creator:
Michael Stahl (allotropia)
Created:
2012-01-25 13:48:33 UTC
Size:
2.47 KB
patch
obsolete
>From 6a2d6e08631e6dc5f31af36909c1bc206038fb74 Mon Sep 17 00:00:00 2001 >From: Michael Stahl <mstahl@redhat.com> >Date: Wed, 25 Jan 2012 22:43:39 +0100 >Subject: [PATCH] fdo#38542: SvxBorderLine::GuessLinesWidths: > >Importing style:border-line-width="0.002cm 0.088cm 0.141cm" (which older >OOo/LO apparently could write) fails, because GuessLinesWidths can't find >a matching style (result: standard "double" border, 3 equal width parts). >Try to create a custom BorderWidthImpl of type DOUBLE instead, that >preserves the individual widths. >--- > editeng/qa/items/borderline_test.cxx | 2 +- > editeng/source/items/borderline.cxx | 21 ++++++++++++++++++--- > 2 files changed, 19 insertions(+), 4 deletions(-) > >diff --git a/editeng/qa/items/borderline_test.cxx b/editeng/qa/items/borderline_test.cxx >index 80a840c..4b32ec6 100644 >--- a/editeng/qa/items/borderline_test.cxx >+++ b/editeng/qa/items/borderline_test.cxx >@@ -106,7 +106,7 @@ void BorderLineTest::testGuessWidthNoMatch() > line.GuessLinesWidths( DOUBLE, > TEST_WIDTH + 1, TEST_WIDTH + 2, TEST_WIDTH + 3 ); > CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetStyle() ); >- CPPUNIT_ASSERT_EQUAL( long( 0 ), line.GetWidth() ); >+ CPPUNIT_ASSERT_EQUAL( long( (3 * TEST_WIDTH) + 6 ), line.GetWidth() ); > } > > void BorderLineTest::testGuessWidthThinthickSmallgap() >diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx >index 8dadd5d..8d073c6 100644 >--- a/editeng/source/items/borderline.cxx >+++ b/editeng/source/items/borderline.cxx >@@ -275,10 +275,25 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa > > // If anything matched, then set it > if ( nWidth > 0 ) >+ { > nStyle = nTestStyle; >- >- SetStyle( nStyle ); >- m_nWidth = nWidth; >+ SetStyle( nStyle ); >+ m_nWidth = nWidth; >+ } >+ else >+ { >+ // fdo#38542: not a known double, default to something custom... >+ SetStyle( nStyle ); >+ m_nWidth = nOut + nIn + nDist; >+ if (nOut + nIn + nDist) >+ { >+ m_aWidthImpl = BorderWidthImpl( >+ CHANGE_LINE1 | CHANGE_LINE2 | CHANGE_DIST, >+ static_cast<double>(nOut ) / static_cast<double>(m_nWidth), >+ static_cast<double>(nIn ) / static_cast<double>(m_nWidth), >+ static_cast<double>(nDist) / static_cast<double>(m_nWidth)); >+ } >+ } > } > else > { >-- >1.7.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 38542
:
48258
|
48259
|
48504
|
49327
|
55271
|
55272
|
55448
|
55449
|
55450
|
56150
|
56151
| 56161