summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-07-06 15:57:50 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-07-06 17:20:16 +0200
commit661fa18d424690e1c3bce4ac70a8018dabe82637 (patch)
tree7cf24a9bd00fe0ea7587913f59a9ebe687e8c1ae
parentd5020f35aec54f0241fa58557dc6caadc149f5a9 (diff)
crashtesting: 554 crashing documents on export to .doc
regression from... commit d72e0cadceb0b43928a9b4f18d75c9d5d30afdda Date: Mon Jun 19 15:32:16 2017 +0200 Watermark: tdf#91687 correct size in the .doc hopefully this fix is correct Change-Id: I17512ffdd4db605e79b3adb97551e6f4e3816f2f Reviewed-on: https://gerrit.libreoffice.org/39661 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx6
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));
}
}