summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-06-20 16:43:04 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-06-20 15:16:07 +0000
commit3f6ad98c4764402dc6e876106867e49e3e888f8f (patch)
tree1cd35548cfb4dc55e5d2fc43ea48872791b1aa12
parentc544a8b674dd7ac9dd466a84a440ede030942438 (diff)
Remove no longer needed SdrModel::libreOfficeKitCallback()
All former clients are changed to call SfxViewShell::libreOfficeKitViewCallback() instead. Change-Id: Ic5dcf0a8a4241338fcd6941f13ce438157676481 Reviewed-on: https://gerrit.libreoffice.org/26521 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r--include/svx/svdmodel.hxx16
-rw-r--r--sc/source/ui/docshell/docsh.cxx3
-rw-r--r--sc/source/ui/unoobj/docuno.cxx4
-rw-r--r--sd/source/ui/docshell/docshell.cxx4
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx4
-rw-r--r--svx/source/svdraw/svdmodel.cxx42
-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
10 files changed, 7 insertions, 97 deletions
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index b0e4d56c8e20..709844dce915 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -143,7 +143,7 @@ public:
struct SdrModelImpl;
-class SVX_DLLPUBLIC SdrModel : public SfxBroadcaster, public tools::WeakBase< SdrModel >, public OutlinerSearchable
+class SVX_DLLPUBLIC SdrModel : public SfxBroadcaster, public tools::WeakBase< SdrModel >
{
protected:
std::vector<SdrPage*> maMaPag; // master pages
@@ -168,10 +168,6 @@ protected:
SdrOutliner* pChainingOutliner; // an Outliner for chaining overflowing text
sal_uIntPtr nDefTextHgt; // Default text height in logical units
VclPtr<OutputDevice> pRefOutDev; // ReferenceDevice for the EditEngine
- LibreOfficeKitCallback mpLibreOfficeKitCallback;
- void* mpLibreOfficeKitData;
- /// Set if we are in the middle of a tiled search.
- bool mbTiledSearching;
sal_uIntPtr nProgressAkt; // for the
sal_uIntPtr nProgressMax; // ProgressBar-
sal_uIntPtr nProgressOfs; // -Handler
@@ -328,16 +324,6 @@ public:
// ReferenceDevice for the EditEngine
void SetRefDevice(OutputDevice* pDev);
OutputDevice* GetRefDevice() const { return pRefOutDev.get(); }
- /// The actual implementation of the vcl::ITiledRenderable::registerCallback() API.
- void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData);
- /// Gets the LOK data registered by registerLibreOfficeKitCallback().
- void* getLibreOfficeKitData() const;
- /// Invokes the registered callback, if there are any.
- void libreOfficeKitCallback(int nType, const char* pPayload) const override;
- /// Set if we are doing tiled searching.
- void setTiledSearching(bool bTiledSearching);
- /// Are we doing tiled searching?
- bool isTiledSearching() const;
// If a new MapMode is set on the RefDevice (or similar)
void RefDeviceChanged(); // not yet implemented
// default font height in logical units
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 95bb72d16f6e..12f8b5de7ef5 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -3220,9 +3220,8 @@ bool ScDocShell::GetProtectionHash( /*out*/ css::uno::Sequence< sal_Int8 > &rPas
return bRes;
}
-void ScDocShell::libreOfficeKitCallback(int nType, const char* pPayload) const
+void ScDocShell::libreOfficeKitCallback(int /*nType*/, const char* /*pPayload*/) const
{
- aDocument.GetDrawLayer()->libreOfficeKitCallback(nType, pPayload);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index ac0314a6ca42..2dfbc2cde289 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -554,10 +554,8 @@ Size ScModelObj::getDocumentSize()
return aSize;
}
-void ScModelObj::registerCallback(LibreOfficeKitCallback pCallback, void* pData)
+void ScModelObj::registerCallback(LibreOfficeKitCallback /*pCallback*/, void* /*pData*/)
{
- SolarMutexGuard aGuard;
- pDocShell->GetDocument().GetDrawLayer()->registerLibreOfficeKitCallback(pCallback, pData);
}
void ScModelObj::postKeyEvent(int nType, int nCharCode, int nKeyCode)
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 65dafa0fff21..b948bd94680c 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -478,10 +478,8 @@ void DrawDocShell::ClearUndoBuffer()
pUndoManager->Clear();
}
-void DrawDocShell::libreOfficeKitCallback(int nType, const char* pPayload) const
+void DrawDocShell::libreOfficeKitCallback(int /*nType*/, const char* /*pPayload*/) const
{
- if (mpDoc)
- mpDoc->libreOfficeKitCallback(nType, pPayload);
}
} // end of namespace sd
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index e0f6dbfa4cae..ebc6103255ed 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2415,10 +2415,8 @@ void SdXImpressDocument::initializeForTiledRendering(const css::uno::Sequence<cs
SvtSaveOptions().SetWarnAlienFormat(false);
}
-void SdXImpressDocument::registerCallback(LibreOfficeKitCallback pCallback, void* pData)
+void SdXImpressDocument::registerCallback(LibreOfficeKitCallback /*pCallback*/, void* /*pData*/)
{
- SolarMutexGuard aGuard;
- mpDoc->registerLibreOfficeKitCallback(pCallback, pData);
}
void SdXImpressDocument::postKeyEvent(int nType, int nCharCode, int nKeyCode)
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 721a63a9c9a3..ed9b0f79a1d2 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -126,9 +126,6 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
pDrawOutliner=nullptr;
pHitTestOutliner=nullptr;
pRefOutDev=nullptr;
- mpLibreOfficeKitCallback = nullptr;
- mpLibreOfficeKitData = nullptr;
- mbTiledSearching = false;
nProgressAkt=0;
nProgressMax=0;
nProgressOfs=0;
@@ -808,45 +805,6 @@ void SdrModel::SetRefDevice(OutputDevice* pDev)
RefDeviceChanged();
}
-void SdrModel::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pData)
-{
- mpLibreOfficeKitCallback = pCallback;
- mpLibreOfficeKitData = pData;
-}
-
-void SdrModel::libreOfficeKitCallback(int nType, const char* pPayload) const
-{
- if (mbTiledSearching)
- {
- switch (nType)
- {
- case LOK_CALLBACK_TEXT_SELECTION:
- case LOK_CALLBACK_TEXT_SELECTION_START:
- case LOK_CALLBACK_TEXT_SELECTION_END:
- case LOK_CALLBACK_GRAPHIC_SELECTION:
- return;
- }
- }
-
- if (mpLibreOfficeKitCallback)
- mpLibreOfficeKitCallback(nType, pPayload, mpLibreOfficeKitData);
-}
-
-void SdrModel::setTiledSearching(bool bTiledSearching)
-{
- mbTiledSearching = bTiledSearching;
-}
-
-bool SdrModel::isTiledSearching() const
-{
- return mbTiledSearching;
-}
-
-void* SdrModel::getLibreOfficeKitData() const
-{
- return mpLibreOfficeKitData;
-}
-
void SdrModel::ImpReformatAllTextObjects()
{
if( isLocked() )
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index c014cbb56237..abeea02675da 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 f2cb6a1fa4f6..0dd248da9dc2 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 40d5233821d1..fada17aeaeb6 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1338,13 +1338,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 3256047eb187..5815ec08493b 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3299,13 +3299,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)