[Libreoffice-commits] core.git: desktop/source
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Sat Nov 21 22:22:45 UTC 2020
desktop/source/lib/init.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit a65141b2b46ad8150bafca4629b0ef924978a201
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Sep 3 22:28:29 2020 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Sat Nov 21 23:21:57 2020 +0100
Must now call the lovely SfxViewShell::SetCurrentDocId()
Fixes fallout from 4fd2679a7a2b0494da84f344ab97b835edf73377. Otherwise
the SfxViewShell doesn't know the id of its document, and counting the
number of views of a document in SfxLokHelper::getViewsCount() fails.
Change-Id: I16ba209463281aae4ab9fdfd4ee1cd6b98205774
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102025
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106254
Tested-by: Jenkins
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 9bcfff524bbf..cf8503bf136d 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2278,6 +2278,8 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
aFilterOptions[3].Value <<= nUpdateDoc;
*/
+ const int nThisDocumentId = nDocumentIdCounter++;
+ SfxViewShell::SetCurrentDocId(ViewShellDocId(nThisDocumentId));
uno::Reference<lang::XComponent> xComponent = xComponentLoader->loadComponentFromURL(
aURL, "_blank", 0,
aFilterOptions);
@@ -2291,7 +2293,7 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
return nullptr;
}
- LibLODocument_Impl* pDocument = new LibLODocument_Impl(xComponent, nDocumentIdCounter++);
+ LibLODocument_Impl* pDocument = new LibLODocument_Impl(xComponent, nThisDocumentId);
// After loading the document, its initial view is the "current" view.
if (pLib->mpCallback)
More information about the Libreoffice-commits
mailing list