sw/qa/core/data/ww8/pass/fdo40686-1.doc |binary sw/source/filter/ww8/ww8par6.cxx | 15 +++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-)
New commits: commit c0db5469d9bb289075914e60ced856698a6ae249 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Mar 8 13:00:45 2012 +0000 Resolves: fdo#40686 dyaLinePitch only valid between [1-31680] diff --git a/sw/qa/core/data/ww8/pass/fdo40686-1.doc b/sw/qa/core/data/ww8/pass/fdo40686-1.doc new file mode 100644 index 0000000..bb0fd59 Binary files /dev/null and b/sw/qa/core/data/ww8/pass/fdo40686-1.doc differ diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 2ca9019..eca258b 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -270,14 +270,11 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection) if (eType != GRID_NONE) rDoc.set(IDocumentSettingAccess::ADD_EXT_LEADING, false); - //force to set document as standard page mode + //force to set document as standard page mode sal_Bool bSquaredMode = sal_False; rDoc.SetDefaultPageMode( bSquaredMode ); aGrid.SetSquaredMode( bSquaredMode ); - //sep.dyaLinePitch - sal_Int32 nLinePitch = rSection.maSep.dyaLinePitch; - //Get the size of word's default styles font sal_uInt32 nCharWidth=240; for (sal_uInt16 nI = 0; nI < pStyles->GetCount(); ++nI) @@ -306,8 +303,14 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection) } aGrid.SetBaseWidth( writer_cast<sal_uInt16>(nCharWidth)); - aGrid.SetLines(writer_cast<sal_uInt16>(nTextareaHeight/nLinePitch)); - aGrid.SetBaseHeight(writer_cast<sal_uInt16>(nLinePitch)); + + //sep.dyaLinePitch + sal_Int32 nLinePitch = rSection.maSep.dyaLinePitch; + if (nLinePitch >= 1 && nLinePitch <= 31680) + { + aGrid.SetLines(writer_cast<sal_uInt16>(nTextareaHeight/nLinePitch)); + aGrid.SetBaseHeight(writer_cast<sal_uInt16>(nLinePitch)); + } sal_Int32 nRubyHeight = 0; aGrid.SetRubyHeight(writer_cast<sal_uInt16>(nRubyHeight));
_______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits