diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-03-08 13:00:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-08 13:00:45 +0000 |
commit | c0db5469d9bb289075914e60ced856698a6ae249 (patch) | |
tree | a9e9a613702a5c037a5109a91f7c6e393d377e11 | |
parent | ccfbb8647503e9e2531c4fc1fb03354a82401e3d (diff) |
Resolves: fdo#40686 dyaLinePitch only valid between [1-31680]
-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 2ca9019452ff..eca258b77dc7 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)); |