[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - editeng/source
Miklos Vajna
vmiklos at kemper.freedesktop.org
Tue Jun 12 02:31:14 PDT 2012
editeng/source/items/frmitems.cxx | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
New commits:
commit c203a292ff523ae4e4d4d9ac70166f281a141fcc
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jun 4 18:54:34 2012 +0200
fdo#46112: tweak condition to prevent guessing only...
...if there are actually individual line widths given; fixes the
sw_rtftok test.
Change-Id: If5f6ef54b93c5bfccfd011f25d9d9301637d388e
(cherry picked from commit 30aa036181480c76f909c2dda86b2682cac1fd73)
Signed-off-by: Miklos Vajna <vmiklos at suse.cz>
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 308319d..1993eee 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1811,7 +1811,8 @@ SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, Svx
rSvxLine.SetWidth( bConvert? MM100_TO_TWIP_UNSIGNED( rLine.LineWidth ) : rLine.LineWidth );
// fdo#46112: double does not necessarily mean symmetric
// for backwards compatibility
- bGuessWidth = (DOUBLE == nStyle);
+ bGuessWidth = (DOUBLE == nStyle) &&
+ (rLine.InnerLineWidth > 0) && (rLine.OuterLineWidth > 0);
}
return lcl_lineToSvxLine(rLine, rSvxLine, bConvert, bGuessWidth);
commit 629743f0afa4a156e8809779c0fbe7ff3ffdcdc9
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jun 4 16:12:59 2012 +0200
fdo#46112: fix Calc ODF border line import:
There are 2 problems here:
- the border widths are tripled on import, because that is effectively
what SetWidth does for DOUBLE borders; set a divisor of 3 similar to
e2ffb71305c5f085eec6d396651c76d6daee3406
- the 3 individual line widths are ignored and the 3 lines end up with
the same width, while older versions had numerous pre-defined border
styles with asymmetric line widths; fix this by always guessing the
width from the 3 parts for DOUBLE lines
Change-Id: Ibdde7e034e25433835765330e81db0825efd9eb8
(cherry picked from commit 70a6a4d425558340bb49507975343a3e0a1bdde8)
Signed-off-by: Miklos Vajna <vmiklos at suse.cz>
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 69a83e2..308319d 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1733,6 +1733,13 @@ lcl_lineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_B
sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.InnerLineWidth) : rLine.InnerLineWidth ),
sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.LineDistance ) : rLine.LineDistance ));
}
+ else
+ {
+ if (DOUBLE == rSvxLine.GetStyle())
+ { // fdo#46112: divide width by 3 for outer line, gap, inner line
+ rSvxLine.ScaleMetrics(1, 3);
+ }
+ }
sal_Bool bRet = !rSvxLine.isEmpty();
return bRet;
@@ -1802,7 +1809,9 @@ SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, Svx
if ( rLine.LineWidth )
{
rSvxLine.SetWidth( bConvert? MM100_TO_TWIP_UNSIGNED( rLine.LineWidth ) : rLine.LineWidth );
- bGuessWidth = sal_False;
+ // fdo#46112: double does not necessarily mean symmetric
+ // for backwards compatibility
+ bGuessWidth = (DOUBLE == nStyle);
}
return lcl_lineToSvxLine(rLine, rSvxLine, bConvert, bGuessWidth);
More information about the Libreoffice-commits
mailing list