[Libreoffice-commits] core.git: sd/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Jun 13 13:36:56 UTC 2016
sd/source/core/drawdoc2.cxx | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
New commits:
commit cfe33278f542af05fd1a2df040af1cd0aea9ed45
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Jun 13 14:57:08 2016 +0200
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 at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index 200f613..d8acaf6 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;
More information about the Libreoffice-commits
mailing list