diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-10-25 17:04:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-10-25 17:04:06 +0100 |
commit | b11318daa310721a350619cede79802974c62307 (patch) | |
tree | e06a81f84d820cceed5dc2154caaefc59ad0c4a4 /editeng | |
parent | d71d31fcec352b089bc49637f80fa99bdbaf9bc6 (diff) |
#i106131# ignore bogus tabstops
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/paraitem.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 75090984b4fe..27b3629f5d39 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -1141,9 +1141,12 @@ bool SvxTabStopItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) sal_Int32 nNewPos = 0; if (!(rVal >>= nNewPos) ) return sal_False; + if (bConvert) + nNewPos = MM100_TO_TWIP ( nNewPos ); + if (nNewPos <= 0) + return sal_False; const SvxTabStop& rTab = *(GetStart()); - SvxTabStop aNewTab ( bConvert ? MM100_TO_TWIP ( nNewPos ) : nNewPos, - rTab.GetAdjustment(), rTab.GetDecimal(), rTab.GetFill() ); + SvxTabStop aNewTab ( nNewPos, rTab.GetAdjustment(), rTab.GetDecimal(), rTab.GetFill() ); Remove ( 0 ); Insert( aNewTab ); break; |