summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-06-13 14:57:08 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-06-13 13:36:30 +0000
commitcfe33278f542af05fd1a2df040af1cd0aea9ed45 (patch)
treefb015b425501dac24f65bb41b45c9a42fa3eff57 /sd
parent9dee3fe26e9fe3b343128315f3250914d70a2922 (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>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/drawdoc2.cxx24
1 files changed, 22 insertions, 2 deletions
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index 200f613f4972..d8acaf60d68d 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;