summaryrefslogtreecommitdiff
path: root/include
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 /include
parentd046bad4fad89b1afeed78703afa695528338299 (diff)
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 'include')
-rw-r--r--include/editeng/outliner.hxx2
-rw-r--r--include/sfx2/lokhelper.hxx12
-rw-r--r--include/sfx2/viewsh.hxx2
-rw-r--r--include/svl/undo.hxx2
4 files changed, 4 insertions, 14 deletions
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 05a1aae85851..68b13a311f36 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -376,8 +376,6 @@ class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI OutlinerViewShell
public:
virtual void libreOfficeKitViewCallback(int nType, const char* pPayload) const = 0;
virtual ViewShellId GetViewShellId() const = 0;
- virtual void SetDocId(ViewShellDocId nId) = 0;
- virtual ViewShellDocId GetDocId() const = 0;
/// Wrapper around SfxLokHelper::notifyOtherViews().
virtual void NotifyOtherViews(int nType, const OString& rKey, const OString& rPayload) = 0;
/// Wrapper around SfxLokHelper::notifyOtherView().
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index d88ae25adcff..63c88b988b2e 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -53,12 +53,8 @@ public:
static int getView(SfxViewShell* pViewShell = nullptr);
/// Get the number of views of the current object shell.
static std::size_t getViewsCount();
- /// Get viewIds of views of the current object shell.
+ /// Get viewIds of all existing views.
static bool getViewIds(int* pArray, size_t nSize);
- /// Set the document id of the currently active view
- static void setDocumentIdOfView(int nId);
- /// Get the document id for a view
- static int getDocumentIdOfView(int nViewId);
/// Get the default language that should be used for views
static LanguageTag getDefaultLanguage();
/// Set language of the given view.
@@ -74,7 +70,7 @@ public:
/// Iterate over any view shell, except pThisViewShell, passing it to the f function.
template<typename ViewShellType, typename FunctionType>
static void forEachOtherView(ViewShellType* pThisViewShell, FunctionType f);
- /// Invoke the LOK callback of all other views showing the same document as pThisView, with a payload of rKey-rPayload.
+ /// Invoke the LOK callback of all views except pThisView, with a payload of rKey-rPayload.
static void notifyOtherViews(SfxViewShell* pThisView, int nType, const OString& rKey, const OString& rPayload);
/// Same as notifyOtherViews(), but works on a selected "other" view, not on all of them.
static void notifyOtherView(SfxViewShell* pThisView, SfxViewShell const* pOtherView, int nType, const OString& rKey, const OString& rPayload);
@@ -87,7 +83,7 @@ public:
const std::vector<vcl::LOKPayloadItem>& rPayload = std::vector<vcl::LOKPayloadItem>());
/// Emits a LOK_CALLBACK_DOCUMENT_SIZE_CHANGED - if @bInvalidateAll - first invalidates all parts
static void notifyDocumentSizeChanged(SfxViewShell const* pThisView, const OString& rPayload, vcl::ITiledRenderable* pDoc, bool bInvalidateAll = true);
- /// Emits a LOK_CALLBACK_DOCUMENT_SIZE_CHANGED for all views of the same document - if @bInvalidateAll - first invalidates all parts
+ /// Emits a LOK_CALLBACK_DOCUMENT_SIZE_CHANGED for all views - if @bInvalidateAll - first invalidates all parts
static void notifyDocumentSizeChangedAllViews(vcl::ITiledRenderable* pDoc, bool bInvalidateAll = true);
/// Emits a LOK_CALLBACK_INVALIDATE_TILES, but tweaks it according to setOptionalFeatures() if needed.
static void notifyInvalidation(SfxViewShell const* pThisView, const OString& rPayload);
@@ -122,7 +118,7 @@ void SfxLokHelper::forEachOtherView(ViewShellType* pThisViewShell, FunctionType
while (pViewShell)
{
auto pOtherViewShell = dynamic_cast<ViewShellType*>(pViewShell);
- if (pOtherViewShell != nullptr && pOtherViewShell != pThisViewShell && pOtherViewShell->GetDocId() == pThisViewShell->GetDocId())
+ if (pOtherViewShell != nullptr && pOtherViewShell != pThisViewShell)
{
f(pOtherViewShell);
}
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index a54909ace2b5..6628b7f822aa 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -341,8 +341,6 @@ public:
virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const;
/// See OutlinerViewShell::GetViewShellId().
ViewShellId GetViewShellId() const override;
- void SetDocId(ViewShellDocId nId) override;
- ViewShellDocId GetDocId() const override;
/// See OutlinerViewShell::NotifyOtherViews().
void NotifyOtherViews(int nType, const OString& rKey, const OString& rPayload) override;
/// See OutlinerViewShell::NotifyOtherView().
diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx
index 1ca989fd4a5d..c2862b886c6f 100644
--- a/include/svl/undo.hxx
+++ b/include/svl/undo.hxx
@@ -28,8 +28,6 @@
#include <vector>
typedef o3tl::strong_int<sal_Int32, struct ViewShellIdTag> ViewShellId;
-typedef o3tl::strong_int<int, struct ViewShellDocIdTag> ViewShellDocId;
-
class SVL_DLLPUBLIC SfxRepeatTarget
{