diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 2c48a72d04b0..e1caa29190d5 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -760,8 +760,10 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const // We have to export original size with padding const SfxItemSet& rSet = pObj->GetMergedItemSet(); - const SdrMetricItem* pItem = static_cast<const SdrMetricItem*>(rSet.GetItem(SDRATTR_TEXT_UPPERDIST)); - aRect.SetSize(Size(aRect.GetWidth(), aRect.GetHeight() + pItem->GetValue())); + long nHeight = aRect.GetHeight(); + if (const SdrMetricItem* pItem = static_cast<const SdrMetricItem*>(rSet.GetItem(SDRATTR_TEXT_UPPERDIST))) + nHeight += pItem->GetValue(); + aRect.SetSize(Size(aRect.GetWidth(), nHeight)); } } |