sw/source/filter/ww8/ww8graf.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit 0b8e6b2ba733719fc09dfe379b0d6b738723cdee Author: Miklos Vajna <vmik...@suse.cz> Date: Fri Apr 27 14:30:16 2012 +0200 n#757910 fix WW8 import of textboxes with thin border/inner margin There were two problems here: First, nLineThick was already in twips, so converting it again from EMU rendered thin borders invisible. Second, when the border width is set to zero, that means a minimal border, but we interpreted it as default width (which resulted in less space for the textbox contents than required). (cherry picked from commit e652ba3c7357e0396498629891a1391ace67c4d7) Signed-off-by: Michael Stahl <mst...@redhat.com> diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 7aec55a..5ac204b 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -1569,7 +1569,7 @@ sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor, SvxBorderLine aLine; aLine.SetColor( rLineColor ); - aLine.SetWidth( long ( nLineThick / 65 ) ); // Convert EMUs to Twips + aLine.SetWidth( nLineThick ); // No conversion here, nLineThick is already in twips aLine.SetStyle( nIdx ); for(sal_uInt16 nLine = 0; nLine < 4; ++nLine) @@ -1626,7 +1626,8 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, // Rahmen-GROESSE benoetigt! SvxBoxItem aBox(sw::util::ItemGet<SvxBoxItem>(rFlySet, RES_BOX)); // dashed oder solid wird zu solid - sal_Int32 nLineThick = 0, nOutside=0; + // WW-default: 0.75 pt = 15 twips + sal_Int32 nLineThick = 15, nOutside=0; // check if LineStyle is *really* set! const SfxPoolItem* pItem; @@ -1641,7 +1642,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, nLineThick = WW8ITEMVALUE(rOldSet, XATTR_LINEWIDTH, XLineWidthItem); if( !nLineThick ) - nLineThick = 15; // WW-default: 0.75 pt + nLineThick = 1; // for Writer, zero is "no border", so set a minimal value nOutside = MatchSdrBoxIntoFlyBoxItem(aLineColor, eLineStyle, eDashing, eShapeType, nLineThick, aBox); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits