merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0587-svx-fix-fit-to-frame-crash.diff
blobcaa2230c8bff76b00ca5fd75e9a3dbf8630157e7
1 diff -rup svx/source/editeng-orig/impedit3.cxx svx/source/editeng/impedit3.cxx
2 --- svx/source/editeng-orig/impedit3.cxx 2009-06-05 10:19:00.000000000 +0200
3 +++ svx/source/editeng/impedit3.cxx 2009-06-05 10:45:28.000000000 +0200
4 @@ -940,7 +940,7 @@ sal_Bool ImpEditEngine::CreateLines( USH
5 // nCurPos -= rLRItem.GetTxtLeft(); // Tabs relativ zu LI
6 // Skalierung rausrechnen
7 if ( aStatus.DoStretch() && ( nStretchX != 100 ) )
8 - nCurPos = nCurPos*100/nStretchX;
9 + nCurPos = nCurPos*100/std::max(static_cast<sal_Int32>(nStretchX), static_cast<sal_Int32>(1));
11 short nAllSpaceBeforeText = static_cast< short >(rLRItem.GetTxtLeft()/* + rLRItem.GetTxtLeft()*/ + nSpaceBeforeAndMinLabelWidth);
12 aCurrentTab.aTabStop = pNode->GetContentAttribs().FindTabStop( nCurPos - nAllSpaceBeforeText /*rLRItem.GetTxtLeft()*/, aEditDoc.GetDefTab() );