editeng/source/items/frmitems.cxx | 11 ++++++++++- vcl/source/glyphs/graphite_layout.cxx | 8 +++++--- 2 files changed, 15 insertions(+), 4 deletions(-)
New commits: commit 70a6a4d425558340bb49507975343a3e0a1bdde8 Author: Michael Stahl <[email protected]> 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 diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index e336ef2..c40bec9 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1789,6 +1789,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; @@ -1858,7 +1865,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); commit e18f53c624443bb2fbb9edba7b81b57487eb0e50 Author: Michael Stahl <[email protected]> Date: Mon Jun 4 13:48:59 2012 +0200 fdo#50169: skip the rest of the loop in case of wrong index Presumably that is what Martin wanted to do in the previous patch. Change-Id: I64f1da88c1802a27cf974aa6abc15b014b56126d diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index 6416f70..e3bd926 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -849,12 +849,13 @@ void GraphiteLayout::expandOrCondense(ImplLayoutArgs &rArgs) nOffset = static_cast<int>(fExtraPerCluster * nCluster); int nCharIndex = mvGlyph2Char[i]; assert(nCharIndex > -1); - if (nCharIndex < mnMinCharPos) continue; - if (static_cast<size_t>(nCharIndex-mnMinCharPos) - < mvCharDxs.size()) + if (nCharIndex < mnMinCharPos || + static_cast<size_t>(nCharIndex-mnMinCharPos) + >= mvCharDxs.size()) { - mvCharDxs[nCharIndex-mnMinCharPos] += nOffset; + continue; } + mvCharDxs[nCharIndex-mnMinCharPos] += nOffset; // adjust char dxs for rest of characters in cluster while (++nCharIndex - mnMinCharPos < static_cast<int>(mvChar2BaseGlyph.size())) { commit 981fd1612fb853287f0bb916b8600de3e587ed64 Author: Martin Hosken <[email protected]> Date: Mon Jun 4 13:38:33 2012 +0200 fdo#50169: add another index check Change-Id: I974ac27ee17219ce3f8a7e5641dbb0098da18f8e diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index 429e700..6416f70 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -849,6 +849,7 @@ void GraphiteLayout::expandOrCondense(ImplLayoutArgs &rArgs) nOffset = static_cast<int>(fExtraPerCluster * nCluster); int nCharIndex = mvGlyph2Char[i]; assert(nCharIndex > -1); + if (nCharIndex < mnMinCharPos) continue; if (static_cast<size_t>(nCharIndex-mnMinCharPos) < mvCharDxs.size()) { _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
