summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2010-10-25 17:04:06 +0100
committerCaolán McNamara <caolanm@redhat.com>2010-10-25 17:04:06 +0100
commit6eda93118097c6f0b4cf0d527e870e8101210874 (patch)
treef92c437197c7718294fad6aaf82c3760ef536ffe
parentae5cc8bd1a9191e8ae2e9271bcbd1f8c6bebffc1 (diff)
#i106131# ignore bogus tabstops
-rw-r--r--editeng/source/items/paraitem.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 0827c23dd9..a89a7a62c7 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;