diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-13 14:57:08 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-07-12 22:06:36 -0400 |
commit | e8f80a45942a4c26e2d7495ec46db36d753fb158 (patch) | |
tree | d3bd16cfac5c58bff93431e65e50a55aecb42dfe /sd | |
parent | 4903605762ae843c043eb2f0c72896a14ab9aa68 (diff) |
sd: implement per-view LOK_CALLBACK_DOCUMENT_SIZE_CHANGED
These callbacks were invoked from the model, so need to iterate over the
view shells and invoke them on all the views.
Change-Id: Ie8107f4782b513b874d0b94464ea372994dabbe9
Reviewed-on: https://gerrit.libreoffice.org/26221
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit cfe33278f542af05fd1a2df040af1cd0aea9ed45)
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/drawdoc2.cxx | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 5c03c169c891..1746cdfbf0ed 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -380,7 +380,17 @@ void SdDrawDocument::InsertPage(SdrPage* pPage, sal_uInt16 nPos) if (comphelper::LibreOfficeKit::isActive() && static_cast<SdPage*>(pPage)->GetPageKind() == PK_STANDARD) { - libreOfficeKitCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, ""); + if (comphelper::LibreOfficeKit::isViewCallback()) + { + SfxViewShell* pViewShell = SfxViewShell::GetFirst(); + while (pViewShell) + { + pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, ""); + pViewShell = SfxViewShell::GetNext(*pViewShell); + } + } + else + libreOfficeKitCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, ""); } } @@ -409,7 +419,17 @@ SdrPage* SdDrawDocument::RemovePage(sal_uInt16 nPgNum) if (comphelper::LibreOfficeKit::isActive() && static_cast<SdPage*>(pPage)->GetPageKind() == PK_STANDARD) { - libreOfficeKitCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, ""); + if (comphelper::LibreOfficeKit::isViewCallback()) + { + SfxViewShell* pViewShell = SfxViewShell::GetFirst(); + while (pViewShell) + { + pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, ""); + pViewShell = SfxViewShell::GetNext(*pViewShell); + } + } + else + libreOfficeKitCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, ""); } return pPage; |