summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2017-09-07 13:48:01 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2017-09-07 15:12:32 +0200
commit91d909ac8ec53ea135401babe8227f9c41b779b8 (patch)
tree25623f0d0ae548e5fee68b81f0d0ecac600fd3a4 /sw
parentf1ceb3dca2a2d417ec8fc7661568d51b6a2063cf (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>
Diffstat (limited to 'sw')
-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 b32e64b99433..ccdc417c8e04 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -689,12 +689,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));
+ }
}
}