summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-06-20 16:43:04 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-07-20 01:46:23 -0400
commit2283585d82b60bb613642613525e5e1fc0dd2376 (patch)
tree2e40a65c3a8aa386c6e1b49aec207ccc9862f241 /sw
parentbce02c8547a87bc9c2270c341529d9a13142432a (diff)
Remove no longer needed SdrModel::libreOfficeKitCallback()
All former clients are changed to call SfxViewShell::libreOfficeKitViewCallback() instead. Reviewed-on: https://gerrit.libreoffice.org/26521 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 3f6ad98c4764402dc6e876106867e49e3e888f8f) Change-Id: Ic5dcf0a8a4241338fcd6941f13ce438157676481
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/viewsh.hxx5
-rw-r--r--sw/source/core/view/viewsh.cxx12
-rw-r--r--sw/source/uibase/app/docsh.cxx7
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx7
4 files changed, 2 insertions, 29 deletions
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index dbc593b60ac4..1f54481658db 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -571,11 +571,6 @@ public:
virtual void SetShowHeaderFooterSeparator( FrameControlType eControl, bool bShow ) { if ( eControl == Header ) mbShowHeaderSeparator = bShow; else mbShowFooterSeparator = bShow; }
bool IsSelectAll() { return mbSelectAll; }
- /// The actual implementation of the vcl::ITiledRenderable::registerCallback() API for Writer.
- void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData);
- /// Invokes the registered callback, if there are any.
- void libreOfficeKitCallback(int nType, const char* pPayload) const;
-
void setOutputToWindow(bool bOutputToWindow);
bool isOutputToWindow() const;
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index ed70a181b0b1..b6606746a2bf 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -115,18 +115,6 @@ void SwViewShell::ToggleHeaderFooterEdit()
GetWin()->Invalidate();
}
-void SwViewShell::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pData)
-{
- getIDocumentDrawModelAccess().GetDrawModel()->registerLibreOfficeKitCallback(pCallback, pData);
- if (SwPostItMgr* pPostItMgr = GetPostItMgr())
- pPostItMgr->registerLibreOfficeKitCallback(getIDocumentDrawModelAccess().GetDrawModel());
-}
-
-void SwViewShell::libreOfficeKitCallback(int nType, const char* pPayload) const
-{
- getIDocumentDrawModelAccess().GetDrawModel()->libreOfficeKitCallback(nType, pPayload);
-}
-
void SwViewShell::setOutputToWindow(bool bOutputToWindow)
{
mbOutputToWindow = bOutputToWindow;
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index ae41621efd33..efd89626ee62 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1337,13 +1337,8 @@ bool SwDocShell::GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPas
return bRes;
}
-void SwDocShell::libreOfficeKitCallback(int nType, const char* pPayload) const
+void SwDocShell::libreOfficeKitCallback(int /*nType*/, const char* /*pPayload*/) const
{
- if (!m_pDoc)
- return;
-
- SwDrawModel* pDrawModel = m_pDoc->getIDocumentDrawModelAccess().GetDrawModel();
- pDrawModel->libreOfficeKitCallback(nType, pPayload);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index a36455f978d0..695b33c01eb1 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3272,13 +3272,8 @@ void SwXTextDocument::initializeForTiledRendering(const css::uno::Sequence<css::
SvtSaveOptions().SetWarnAlienFormat(false);
}
-void SwXTextDocument::registerCallback(LibreOfficeKitCallback pCallback, void* pData)
+void SwXTextDocument::registerCallback(LibreOfficeKitCallback /*pCallback*/, void* /*pData*/)
{
- SolarMutexGuard aGuard;
-
- SwDoc* pDoc = pDocShell->GetDoc();
- SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
- pViewShell->registerLibreOfficeKitCallback(pCallback, pData);
}
void SwXTextDocument::postKeyEvent(int nType, int nCharCode, int nKeyCode)