[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sw/source
Szymon Kłos
szymon.klos at collabora.com
Tue Sep 19 11:36:46 UTC 2017
sw/source/filter/ww8/wrtw8esh.cxx | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
New commits:
commit c7fe1daf67e99beea78fee8d7cef70443ff4e54f
Author: Szymon Kłos <szymon.klos at collabora.com>
Date: Thu Sep 7 13:48:01 2017 +0200
tdf#112247 correct the size only for Watermark
Change-Id: I770cd36d5f8bca0f2fa97b7ad4afaaf539bf5f1f
Reviewed-on: https://gerrit.libreoffice.org/42052
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/42351
Reviewed-by: Michael Stahl <mstahl at redhat.com>
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));
+ }
}
}
More information about the Libreoffice-commits
mailing list