diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-03-08 13:00:45 +0000 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-03-08 14:44:52 +0100 |
commit | dbf4c479ae43cdd6ee2f8b9b42452b1a8c46765b (patch) | |
tree | fa2dbf9a632995db37e6ae29e0449b0a12842d51 | |
parent | 5ad30d4a01c27a4660b99de0c59a75c92792d1f0 (diff) |
Resolves: fdo#40686 dyaLinePitch only valid between [1-31680]
Signed-off-by: Andras Timar <atimar@suse.com>
-rw-r--r-- | sw/qa/core/data/ww8/pass/fdo40686-1.doc | bin | 0 -> 12288 bytes | |||
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 15 |
2 files changed, 9 insertions, 6 deletions
diff --git a/sw/qa/core/data/ww8/pass/fdo40686-1.doc b/sw/qa/core/data/ww8/pass/fdo40686-1.doc Binary files differnew file mode 100644 index 000000000000..bb0fd59274fd --- /dev/null +++ b/sw/qa/core/data/ww8/pass/fdo40686-1.doc diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 845a381c40ea..2f7a956bb39f 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)); |