Remove no longer needed ImpEditView::mpLibreOfficeKitSearchable

All clients has been ported to use
ImpEditView::mpLibreOfficeKitViewCallable instead.

Change-Id: I3a2513ac5900f801a2e7aec79807f4e333dfba3d
Reviewed-on: https://gerrit.libreoffice.org/26561
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 20f8b48..84dba19 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -583,11 +583,6 @@ Color EditView::GetBackgroundColor() const
    return pImpEditView->GetBackgroundColor();
}

void EditView::registerLibreOfficeKitCallback(OutlinerSearchable *pSearchable)
{
    pImpEditView->registerLibreOfficeKitCallback(pSearchable);
}

void EditView::registerLibreOfficeKitViewCallback(OutlinerViewCallable *pCallable)
{
    pImpEditView->registerLibreOfficeKitViewCallback(pCallable);
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 0641e74..61454ad 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -79,7 +79,6 @@ ImpEditView::ImpEditView( EditView* pView, EditEngine* pEng, vcl::Window* pWindo
    pOutWin             = pWindow;
    pPointer            = nullptr;
    pBackgroundColor    = nullptr;
    mpLibreOfficeKitSearchable = nullptr;
    mpLibreOfficeKitViewCallable = nullptr;
    nScrollDiffX        = 0;
    nExtraCursorFlags   = 0;
@@ -118,17 +117,6 @@ void ImpEditView::SetBackgroundColor( const Color& rColor )
    pBackgroundColor = new Color( rColor );
}

void ImpEditView::registerLibreOfficeKitCallback(OutlinerSearchable* pSearchable)
{
    mpLibreOfficeKitSearchable = pSearchable;
}

void ImpEditView::libreOfficeKitCallback(int nType, const char* pPayload) const
{
    if (mpLibreOfficeKitSearchable)
        mpLibreOfficeKitSearchable->libreOfficeKitCallback(nType, pPayload);
}

void ImpEditView::registerLibreOfficeKitViewCallback(OutlinerViewCallable* pCallable)
{
    mpLibreOfficeKitViewCallable = pCallable;
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 6c1c9f4..66b03b8 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -221,8 +221,6 @@ private:
    EditView*           pEditView;
    vcl::Cursor*        pCursor;
    Color*              pBackgroundColor;
    /// Model callback.
    OutlinerSearchable* mpLibreOfficeKitSearchable;
    /// Per-view callback.
    OutlinerViewCallable* mpLibreOfficeKitViewCallable;
    EditEngine*         pEditEngine;
@@ -369,11 +367,7 @@ public:
    const Color&    GetBackgroundColor() const {
                        return ( pBackgroundColor ? *pBackgroundColor : pOutWin->GetBackground().GetColor() ); }

    /// @see vcl::ITiledRenderable::registerCallback().
    void registerLibreOfficeKitCallback(OutlinerSearchable* pSearchable);
    /// Invokes the registered model callback, if there are any.
    void libreOfficeKitCallback(int nType, const char* pPayload) const;
    /// @see vcl::ITiledRenderable::registerCallback().
    /// @see SfxViewShell::registerLibreOfficeKitViewCallback().
    void registerLibreOfficeKitViewCallback(OutlinerViewCallable* pCallable);
    /// Invokes the registered view callback, if there are any.
    void libreOfficeKitViewCallback(int nType, const char* pPayload) const;
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index eec3ec9..ea011f2 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1421,11 +1421,6 @@ void OutlinerView::SetBackgroundColor( const Color& rColor )
    pEditView->SetBackgroundColor( rColor );
}

void OutlinerView::registerLibreOfficeKitCallback(OutlinerSearchable* pSearchable)
{
    pEditView->registerLibreOfficeKitCallback(pSearchable);
}

void OutlinerView::registerLibreOfficeKitViewCallback(OutlinerViewCallable* pCallable)
{
    pEditView->registerLibreOfficeKitViewCallback(pCallable);
@@ -1456,10 +1451,6 @@ Selection OutlinerView::GetSurroundingTextSelection() const
    return pEditView->GetSurroundingTextSelection();
}

OutlinerSearchable::~OutlinerSearchable()
{
}

// ===== some code for thesaurus sub menu within context menu


diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 909b656..829181a 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -183,8 +183,6 @@ public:
    void            SetBackgroundColor( const Color& rColor );
    Color           GetBackgroundColor() const;

    /// Register a LOK model callback.
    void registerLibreOfficeKitCallback(OutlinerSearchable *pSearchable);
    /// Register a LOK view callback.
    void registerLibreOfficeKitViewCallback(OutlinerViewCallable *pCallable);

diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 0220397..be989e5 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -270,8 +270,6 @@ public:
    void        SetBackgroundColor( const Color& rColor );
    Color       GetBackgroundColor();

    /// Registers a LOK model callback.
    void registerLibreOfficeKitCallback(OutlinerSearchable* pSearchable);
    /// Registers a LOK view callback.
    void registerLibreOfficeKitViewCallback(OutlinerViewCallable* pCallable);

@@ -375,16 +373,7 @@ public:
    void        SetEndCutPasteLinkHdl(const Link<LinkParamNone*,void> &rLink) { aEndCutPasteLink = rLink; }
};

/// Interface class to not depend on SdrModel in editeng.
class EDITENG_DLLPUBLIC OutlinerSearchable
{
public:
    virtual ~OutlinerSearchable();

    virtual void libreOfficeKitCallback(int nType, const char* pPayload) const = 0;
};

/// Interface class to not depend on SfxViewShell in editeng, meant to replace OutlinerSearchable at the end.
/// Interface class to not depend on SfxViewShell in editeng.
class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI OutlinerViewCallable
{
public:
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index fb02496..56ff91cf 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -289,8 +289,6 @@ class SwPostItMgr: public SfxListener

        void DrawNotesForPage(OutputDevice *pOutDev, sal_uInt32 nPage);
        void PaintTile(OutputDevice& rRenderContext, const Rectangle& rRect);
        /// Informs already created annotations about a newly registered LOK callback.
        void registerLibreOfficeKitCallback(OutlinerSearchable* pSearchable);
};

#endif
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 1ef3524..4e7e165 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -880,18 +880,6 @@ void SwPostItMgr::PaintTile(OutputDevice& rRenderContext, const Rectangle& /*rRe
    }
}

void SwPostItMgr::registerLibreOfficeKitCallback(OutlinerSearchable* pSearchable)
{
    for (SwSidebarItem* pItem : mvPostItFields)
    {
        SwSidebarWin* pPostIt = pItem->pPostIt;
        if (!pPostIt)
            continue;

        pPostIt->GetOutlinerView()->registerLibreOfficeKitCallback(pSearchable);
    }
}

void SwPostItMgr::Scroll(const long lScroll,const unsigned long aPage)
{
    OSL_ENSURE((lScroll % GetScrollSize() )==0,"SwPostItMgr::Scroll: scrolling by wrong value");