summaryrefslogtreecommitdiff
path: root/libreofficekit
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2020-06-04 15:06:24 +0300
committerTor Lillqvist <tml@collabora.com>2020-06-16 11:03:54 +0200
commit82b7a260c4b43d24f47b3b22e7912684aaf49870 (patch)
tree54537c7caab5322585662578f83f4cf40a19ccfc /libreofficekit
parent4bcfd38b16611842be84dda4113ecfa8a79d5d63 (diff)
tdf#128502: Add a FIXME comment
The view id concept is badly broken. Way too many wild assumptions that the "current" view is the one we expect here and there. For instance here. Change-Id: Icf36808b2c09f0b3fd8070deecf175ba7f52b5f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95508 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96359
Diffstat (limited to 'libreofficekit')
-rw-r--r--libreofficekit/source/gtk/lokdocview.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 3f44768816d5..db83f8e9f1f3 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
@@ -873,6 +873,8 @@ static gboolean postDocumentLoad(gpointer pData)
std::unique_lock<std::mutex> aGuard(g_aLOKMutex);
priv->m_pDocument->pClass->initializeForRendering(priv->m_pDocument, priv->m_aRenderingArguments.c_str());
+ // FIXME: This returns the view id of the "current" view, but sadly if you load multiple
+ // documents that is apparently not a view showing the most recently loaded document.
priv->m_nViewId = priv->m_pDocument->pClass->getView(priv->m_pDocument);
g_aAuthorViews[getAuthorRenderingArgument(priv)] = priv->m_nViewId;
priv->m_pDocument->pClass->registerCallback(priv->m_pDocument, callbackWorker, pLOKDocView);