diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2017-09-21 11:31:53 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2017-09-23 16:37:06 +0200 |
commit | 22e94ab1860b1bdea8d107d4e8824f63c6b1c8c5 (patch) | |
tree | 6e15c6e7a0fae50664f73edecf2999b47908179a /sw | |
parent | f53b6890525abcf3ea2c1955c8ff26af53c3a8b3 (diff) |
Watermark: apply when new page style is created
Change-Id: I0d0103f8cc351ec87f7c3bf936ef4725a166d315
Reviewed-on: https://gerrit.libreoffice.org/42581
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/app/docst.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index a93bb5ab9ab0..f8c424db280f 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -324,6 +324,14 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) sName = SfxStyleDialog::GenerateUnusedName(*m_xBasePool); nRet = Edit( sName, sParent, nFamily, nMask, true, OString(), nullptr, rReq.IsAPI() ); + + // Update Watermark if new page style was created + if( nFamily == SfxStyleFamily::Page ) + { + SwWrtShell* pShell = GetWrtShell(); + const SfxWatermarkItem aWatermark = pShell->GetWatermark(); + pShell->SetWatermark( aWatermark ); + } } break; |