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-25 14:51:00 +0200
commitfa4a86135dda98c8b2de85a677ffb3cdc8f4e28b (patch)
tree9a045191ab6e0bc25636b3216a8c8a8b27811641
parent6592b505576a7daab4eb204f67f078f0465aef6c (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> (cherry picked from commit 661fa18d424690e1c3bce4ac70a8018dabe82637) Reviewed-on: https://gerrit.libreoffice.org/40406
-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 459509fac74d..fdc7c1def9fc 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));
}
}