summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2017-09-07 13:48:01 +0200
committerMichael Stahl <mstahl@redhat.com>2017-09-19 13:36:21 +0200
commitc7fe1daf67e99beea78fee8d7cef70443ff4e54f (patch)
tree5f18791ae6390fd2d781303faf6e801105aa85ce
parent324d7f28beaf36c91361debf478e74b9fced7bfb (diff)
tdf#112247 correct the size only for Watermark
Change-Id: I770cd36d5f8bca0f2fa97b7ad4afaaf539bf5f1f Reviewed-on: https://gerrit.libreoffice.org/42052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/42351 Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index fdc7c1def9fc..bbb6e8b634f9 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -758,12 +758,15 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
{
aRect = pObj->GetLogicRect();
- // We have to export original size with padding
- const SfxItemSet& rSet = pObj->GetMergedItemSet();
- 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));
+ // We have to export Watermark original size with padding
+ if (pObj->GetName().match("PowerPlusWaterMarkObject"))
+ {
+ const SfxItemSet& rSet = pObj->GetMergedItemSet();
+ 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));
+ }
}
}