sw/source/filter/ww8/wrtw8esh.cxx |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 91d909ac8ec53ea135401babe8227f9c41b779b8
Author: Szymon Kłos <szymon.k...@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 <c...@libreoffice.org>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

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));
+                    }
                 }
             }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to