[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sw/source

Szymon Kłos szymon.klos at collabora.com
Tue Sep 12 13:05:35 UTC 2017


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

New commits:
commit 60ba6063a2a9063ba1bd39ceb322d613d2129628
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>
    (cherry picked from commit 91d909ac8ec53ea135401babe8227f9c41b779b8)
    Reviewed-on: https://gerrit.libreoffice.org/42058
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index a570f9e47a15..54f82b2071a7 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -692,12 +692,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