summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-01-25 17:44:36 +0100
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2012-01-27 09:40:41 +0100
commit7cda0a56bf3f9d09740871d85f0557cf0b4a7a76 (patch)
tree5c46a1d5e082090c0336a5d38333578822c3af98
parentf035720f00ac2b1b596ad3cfc99667be5d86d602 (diff)
fdo#38542: sw: ODF import: divide width by 3 for "double" borders
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>
-rw-r--r--sw/source/filter/xml/xmlithlp.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx
index 4db411c65fb4..f1bfca6a0090 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 );
}