sc/source/core/data/attarray.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 296834c2da5c5a9e733b209d68cdb831441e8a64 Author: abdulmajeed ahmed <[email protected]> Date: Mon May 27 23:50:52 2013 +0200 prevent increase indent from running outside the cell i have used ColWidth- SC_INDENT_STEP value to keep at lesat one letter inside the cell Change-Id: I08e121623ed1a55f6002a6a38586ab3d4fb8b850 Change-Id: I8d4518845f64044dea2f4ecd393cc625eebc6302 Reviewed-on: https://gerrit.libreoffice.org/4030 Reviewed-by: abdulmajeed ahmed <[email protected]> Tested-by: abdulmajeed ahmed <[email protected]> diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index 0744247..631874b 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -1657,12 +1657,14 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, bool bIncrement ((const SvxHorJustifyItem*)pItem)->GetValue() != SVX_HOR_JUSTIFY_RIGHT )); sal_uInt16 nOldValue = ((const SfxUInt16Item&)rOldSet.Get( ATTR_INDENT )).GetValue(); sal_uInt16 nNewValue = nOldValue; + //to keep Increment indent from running outside the cell1659 + long nColWidth = (long)pDocument->GetColWidth(nCol,nTab); if ( bIncrement ) { - if ( nNewValue < SC_MAX_INDENT ) + if ( nNewValue < nColWidth-SC_INDENT_STEP ) { nNewValue += SC_INDENT_STEP; - if ( nNewValue > SC_MAX_INDENT ) nNewValue = SC_MAX_INDENT; + if ( nNewValue > nColWidth-SC_INDENT_STEP ) nNewValue = nColWidth-SC_INDENT_STEP; } } else _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
