diff options
author | Radek Doulik <rodo@novell.com> | 2011-04-28 15:57:29 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2011-04-28 15:59:15 +0200 |
commit | 796bd6da745128e24eec6cf386ae8a9469c03307 (patch) | |
tree | adcf5b3d267c61e1c5408e0565db0a8841a98da4 | |
parent | 7c9f5af586c717d4ad08fc4b025d36ac33c78b40 (diff) |
svx-fix-fit-to-frame-crash.diff: fix for crash on Windows (bnc#508621)
root cause unknown
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index a2546cbfe1..1a4052799b 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -934,7 +934,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY ) long nCurPos = nTmpWidth+nStartX; // consider scaling if ( aStatus.DoStretch() && ( nStretchX != 100 ) ) - nCurPos = nCurPos*100/nStretchX; + nCurPos = nCurPos*100/std::max(static_cast<sal_Int32>(nStretchX), static_cast<sal_Int32>(1)); short nAllSpaceBeforeText = static_cast< short >(rLRItem.GetTxtLeft()/* + rLRItem.GetTxtLeft()*/ + nSpaceBeforeAndMinLabelWidth); aCurrentTab.aTabStop = pNode->GetContentAttribs().FindTabStop( nCurPos - nAllSpaceBeforeText /*rLRItem.GetTxtLeft()*/, aEditDoc.GetDefTab() ); |