summaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2020-06-25 07:14:44 +0200
committerTor Lillqvist <tml@collabora.com>2020-06-25 08:13:24 +0200
commitf583d42c48c2ac5a800d29e764df77f7904c432b (patch)
treeb1839e3ef99a009dfa66d6a9a4874036dd6e29fb /desktop
parentFix .uno:SidebarHide command works for online (diff)
downloadcore-f583d42c48c2ac5a800d29e764df77f7904c432b.tar.gz
core-f583d42c48c2ac5a800d29e764df77f7904c432b.zip
Revert "tdf#128502: Try to support multiple documents in LibreOfficeKit-using process"
This reverts commit 3d9e60524fcb4d62fbf17af0ccd1f9613b1b8470. Reason for revert: The commit dc13c656dc25ed35c31bec7b6c8ae7d0c6b258e3 that was merged in the meantime means that this change that now is reverted doesn't compile, and besides it doesn't handle the additional SfxViewShell loop that dc13c656dc25ed35c31bec7b6c8ae7d0c6b258e3 introduced. More work needed... Change-Id: I9886445d2f7b6ce939546c0673bdb8a32afe1abf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97053 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/inc/lib/init.hxx3
-rw-r--r--desktop/source/lib/init.cxx14
2 files changed, 4 insertions, 13 deletions
diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx
index 237a17a59eee..5957f56ed344 100644
--- a/desktop/inc/lib/init.hxx
+++ b/desktop/inc/lib/init.hxx
@@ -149,9 +149,8 @@ namespace desktop {
css::uno::Reference<css::lang::XComponent> mxComponent;
std::shared_ptr< LibreOfficeKitDocumentClass > m_pDocumentClass;
std::map<size_t, std::shared_ptr<CallbackFlushHandler>> mpCallbackFlushHandlers;
- const int mnDocumentId;
- explicit LibLODocument_Impl(const css::uno::Reference <css::lang::XComponent> &xComponent, int nDocumentId = -1);
+ explicit LibLODocument_Impl(const css::uno::Reference <css::lang::XComponent> &xComponent);
~LibLODocument_Impl();
};
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 568363fea289..2e5f9380fa44 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1207,9 +1207,8 @@ VclPtr<Window> getSidebarWindow()
} // anonymous namespace
-LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XComponent> &xComponent, int nDocumentId)
+LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XComponent> &xComponent)
: mxComponent(xComponent)
- , mnDocumentId(nDocumentId)
{
if (!(m_pDocumentClass = gDocumentClass.lock()))
{
@@ -2151,8 +2150,6 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
SolarMutexGuard aGuard;
- static int nDocumentIdCounter = 0;
-
LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
pLib->maLastExceptionMsg.clear();
@@ -2249,10 +2246,7 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
return nullptr;
}
- LibLODocument_Impl* pDocument = new LibLODocument_Impl(xComponent, nDocumentIdCounter++);
-
- // Do we know that after loading the document, its initial view is the "current" view?
- SfxLokHelper::setDocumentIdOfView(pDocument->mnDocumentId);
+ LibLODocument_Impl* pDocument = new LibLODocument_Impl(xComponent);
if (pLib->mpCallback)
{
int nState = doc_getSignatureState(pDocument);
@@ -3143,9 +3137,7 @@ static void doc_paintPartTile(LibreOfficeKitDocument* pThis,
{
// tile painting always needs a SfxViewShell::Current(), but actually
// it does not really matter which one - all of them should paint the
- // same thing. It's important to get a view for the correct document,
- // though.
- // doc_getViewsCount() returns the count of views for the document in the current view.
+ // same thing.
int viewCount = doc_getViewsCount(pThis);
if (viewCount == 0)
return;