summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2017-06-13 10:22:58 +0200
committerAndras Timar <andras.timar@collabora.com>2017-06-13 23:16:10 +0200
commitf9aa57181be0cd02d07fb463410b5c1dde11ea1e (patch)
tree62a2f517ac1c09897061cbd351508bc2951e041e /sw
parent557f5eb1d962e0f3ca934be5643e8c31bb7de6c9 (diff)
tdf#108494 incorrect Watermark position
Change-Id: Iec1dba66604af008ad8b6b1c20cd508048144463 Reviewed-on: https://gerrit.libreoffice.org/38722 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/edit/edfcol.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 94c066e98c2f..b44cdf43a115 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;
@@ -519,6 +523,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));
}
}