[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sw/source

Szymon Kłos szymon.klos at collabora.com
Sat Jun 17 11:41:38 UTC 2017


 sw/source/core/edit/edfcol.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 721efbeb117962e9b0cd547b51ede4a6736042a6
Author: Szymon Kłos <szymon.klos at collabora.com>
Date:   Tue Jun 13 10:22:58 2017 +0200

    tdf#108494 incorrect Watermark position
    
    Change-Id: Iec1dba66604af008ad8b6b1c20cd508048144463
    Reviewed-on: https://gerrit.libreoffice.org/38722
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    (cherry picked from commit f9aa57181be0cd02d07fb463410b5c1dde11ea1e)
    Reviewed-on: https://gerrit.libreoffice.org/38891
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 23f16bb8bbf9..c2cf6252dec0 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -369,6 +369,10 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& rWatermark)
         if (!bHeaderIsOn)
             xPageStyle->setPropertyValue(UNO_NAME_HEADER_IS_ON, uno::makeAny(true));
 
+        // backup header height
+        sal_Int32 nOldValue;
+        xPageStyle->getPropertyValue(UNO_NAME_HEADER_HEIGHT) >>= nOldValue;
+
         // If the header already contains a document header field, no need to do anything.
         uno::Reference<text::XText> xHeaderText;
         xPageStyle->getPropertyValue(UNO_NAME_HEADER_TEXT) >>= xHeaderText;
@@ -515,6 +519,11 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& rWatermark)
             xNamed->setName(sWatermark);
             xLockable->removeActionLock();
         }
+
+        // tdf#108494 the header height was switched to height of a watermark
+        // and shape was moved to the lower part of a page
+        xPageStyle->setPropertyValue(UNO_NAME_HEADER_HEIGHT, uno::makeAny((sal_Int32)11));
+        xPageStyle->setPropertyValue(UNO_NAME_HEADER_HEIGHT, uno::makeAny(nOldValue));
     }
 }
 


More information about the Libreoffice-commits mailing list