From 8e184c376ce77b3c27d7a2722b15b8f36de71ea5 Mon Sep 17 00:00:00 2001
From: Michael Stahl <mstahl@redhat.com>
Date: Wed, 25 Jan 2012 17:44:36 +0100
Subject: [PATCH 3/4] fdo#38542: sw: ODF import: divide width by 3 for
"double" borders
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The problem is that the width from the fo:border{,-left,-right,-top,-bottom}
attributes is effectively tripled for "double" borders.
Signed-off-by: C├ędric Bosdonnat <cedric.bosdonnat.ooo@free.fr>
Signed-off-by: Noel Power <noel.power@novell.com>
---
sw/source/filter/xml/xmlithlp.cxx | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx
index 6a50937..7946b81 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -212,6 +212,10 @@ sal_Bool lcl_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
rpLine->GetOutWidth();
rpLine->SetWidth( nWidth );
+ if (bDouble)
+ { // fdo#38542: divide width by 3 for outer line, gap, inner line
+ rpLine->ScaleMetrics(1, 3);
+ }
}
lcl_frmitems_setXMLBorderStyle( *rpLine, nStyle );
}
--
1.7.7.6