Kaydet (Commit) cfe33278 authored tarafından Miklos Vajna's avatar Miklos Vajna

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/26221Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 9dee3fe2
...@@ -380,7 +380,17 @@ void SdDrawDocument::InsertPage(SdrPage* pPage, sal_uInt16 nPos) ...@@ -380,7 +380,17 @@ void SdDrawDocument::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
if (comphelper::LibreOfficeKit::isActive() && if (comphelper::LibreOfficeKit::isActive() &&
static_cast<SdPage*>(pPage)->GetPageKind() == PK_STANDARD) 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) ...@@ -409,7 +419,17 @@ SdrPage* SdDrawDocument::RemovePage(sal_uInt16 nPgNum)
if (comphelper::LibreOfficeKit::isActive() && if (comphelper::LibreOfficeKit::isActive() &&
static_cast<SdPage*>(pPage)->GetPageKind() == PK_STANDARD) 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; return pPage;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment