summaryrefslogtreecommitdiffstats
path: root/editeng
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2011-04-28 15:57:29 +0200
committerPetr Mladek <pmladek@suse.cz>2011-04-28 15:59:15 +0200
commiteb9380d8a691c3140ecc88de26aec80e4dc9e61d (patch)
treea9754325d62ffe7a33d05436d9b66c3876ae3926 /editeng
parentadd lomenubar Jobs.xcu (diff)
downloadcore-eb9380d8a691c3140ecc88de26aec80e4dc9e61d.tar.gz
core-eb9380d8a691c3140ecc88de26aec80e4dc9e61d.zip
svx-fix-fit-to-frame-crash.diff: fix for crash on Windows (bnc#508621)
root cause unknown
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit3.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index a2546cbfe1c9..1a4052799b6e 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() );