[Libreoffice-commits] core.git: editeng/source include/editeng sc/source svx/source sw/inc sw/source

Miklos Vajna vmiklos at collabora.co.uk
Fri Feb 19 07:43:28 UTC 2016


 editeng/source/editeng/editview.cxx   |    4 ++--
 editeng/source/editeng/impedit.cxx    |    6 +-----
 editeng/source/editeng/impedit.hxx    |    4 +---
 editeng/source/outliner/outlvw.cxx    |    4 ++--
 include/editeng/editview.hxx          |    2 +-
 include/editeng/outliner.hxx          |    2 +-
 sc/source/ui/app/inputhdl.cxx         |    2 +-
 sc/source/ui/view/viewdata.cxx        |    4 +---
 svx/source/svdraw/svdedxv.cxx         |    2 +-
 sw/inc/PostItMgr.hxx                  |    2 +-
 sw/source/core/view/viewsh.cxx        |    2 +-
 sw/source/uibase/docvw/PostItMgr.cxx  |    4 ++--
 sw/source/uibase/docvw/SidebarWin.cxx |    5 +----
 13 files changed, 16 insertions(+), 27 deletions(-)

New commits:
commit 7073d20627ccfcdd705b53f9d8bc4b58fab9e82a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Feb 19 08:42:40 2016 +0100

    editeng: remove never read mpLibreOfficeKitCallback
    
    As all callback invocations happen with SdrModel's callback pointer.
    
    Change-Id: I0111040c501b7927332f88cc4797b8ebab2bc57a

diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 14c2b24..cfc6a88 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -583,9 +583,9 @@ Color EditView::GetBackgroundColor() const
     return pImpEditView->GetBackgroundColor();
 }
 
-void EditView::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData, OutlinerSearchable *pSearchable)
+void EditView::registerLibreOfficeKitCallback(OutlinerSearchable *pSearchable)
 {
-    pImpEditView->registerLibreOfficeKitCallback(pCallback, pLibreOfficeKitData, pSearchable);
+    pImpEditView->registerLibreOfficeKitCallback(pSearchable);
 }
 
 void EditView::SetControlWord( EVControlBits nWord )
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index db15166..77c0a72 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -79,8 +79,6 @@ ImpEditView::ImpEditView( EditView* pView, EditEngine* pEng, vcl::Window* pWindo
     pOutWin             = pWindow;
     pPointer            = nullptr;
     pBackgroundColor    = nullptr;
-    mpLibreOfficeKitCallback = nullptr;
-    mpLibreOfficeKitData = nullptr;
     mpLibreOfficeKitSearchable = nullptr;
     nScrollDiffX        = 0;
     nExtraCursorFlags   = 0;
@@ -119,10 +117,8 @@ void ImpEditView::SetBackgroundColor( const Color& rColor )
     pBackgroundColor = new Color( rColor );
 }
 
-void ImpEditView::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pData, OutlinerSearchable* pSearchable)
+void ImpEditView::registerLibreOfficeKitCallback(OutlinerSearchable* pSearchable)
 {
-    mpLibreOfficeKitCallback = pCallback;
-    mpLibreOfficeKitData = pData;
     mpLibreOfficeKitSearchable = pSearchable;
 }
 
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 61f50d1..5449e44 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -222,8 +222,6 @@ private:
     EditView*           pEditView;
     vcl::Cursor*        pCursor;
     Color*              pBackgroundColor;
-    LibreOfficeKitCallback mpLibreOfficeKitCallback;
-    void* mpLibreOfficeKitData;
     OutlinerSearchable* mpLibreOfficeKitSearchable;
     EditEngine*         pEditEngine;
     VclPtr<vcl::Window> pOutWin;
@@ -370,7 +368,7 @@ public:
                         return ( pBackgroundColor ? *pBackgroundColor : pOutWin->GetBackground().GetColor() ); }
 
     /// @see vcl::ITiledRenderable::registerCallback().
-    void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData, OutlinerSearchable* pSearchable);
+    void registerLibreOfficeKitCallback(OutlinerSearchable* pSearchable);
     /// Invokes the registered callback, if there are any.
     void libreOfficeKitCallback(int nType, const char* pPayload) const;
 
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index 25740cf..5a6c9f0 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1426,9 +1426,9 @@ void OutlinerView::SetBackgroundColor( const Color& rColor )
     pEditView->SetBackgroundColor( rColor );
 }
 
-void OutlinerView::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData, OutlinerSearchable* pSearchable)
+void OutlinerView::registerLibreOfficeKitCallback(OutlinerSearchable* pSearchable)
 {
-    pEditView->registerLibreOfficeKitCallback(pCallback, pLibreOfficeKitData, pSearchable);
+    pEditView->registerLibreOfficeKitCallback(pSearchable);
 }
 
 Color OutlinerView::GetBackgroundColor()
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 9c1c541..71a4b64 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -183,7 +183,7 @@ public:
     Color           GetBackgroundColor() const;
 
     /// @see vcl::ITiledRenderable::registerCallback().
-    void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData, OutlinerSearchable *pSearchable);
+    void registerLibreOfficeKitCallback(OutlinerSearchable *pSearchable);
 
     void            SetControlWord( EVControlBits nWord );
     EVControlBits   GetControlWord() const;
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index aee54ea..5512026 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -274,7 +274,7 @@ public:
     Color       GetBackgroundColor();
 
     /// @see vcl::ITiledRenderable::registerCallback().
-    void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData, OutlinerSearchable* pSearchable);
+    void registerLibreOfficeKitCallback(OutlinerSearchable* pSearchable);
 
     SfxItemSet  GetAttribs();
 
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 834cf59..d71b4e0 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1882,7 +1882,7 @@ void ScInputHandler::UpdateActiveView()
         if (comphelper::LibreOfficeKit::isActive())
         {
             ScDrawLayer *pDrawLayer = pDocShell->GetDocument().GetDrawLayer();
-            pTableView->registerLibreOfficeKitCallback(pDrawLayer->getLibreOfficeKitCallback(), pDrawLayer->getLibreOfficeKitData(), pDrawLayer);
+            pTableView->registerLibreOfficeKitCallback(pDrawLayer);
         }
     }
 
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 35ea8e0..74cf5a3 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -945,9 +945,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
 
         if (pDoc->GetDrawLayer() && comphelper::LibreOfficeKit::isActive())
         {
-            pEditView[eWhich]->registerLibreOfficeKitCallback(pDoc->GetDrawLayer()->getLibreOfficeKitCallback(),
-                                                              pDoc->GetDrawLayer()->getLibreOfficeKitData(),
-                                                              pDoc->GetDrawLayer());
+            pEditView[eWhich]->registerLibreOfficeKitCallback(pDoc->GetDrawLayer());
         }
     }
 
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index f32a798..e831650 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -460,7 +460,7 @@ OutlinerView* SdrObjEditView::ImpMakeOutlinerView(vcl::Window* pWin, bool /*bNoP
     }
     pOutlView->SetControlWord(nStat);
     pOutlView->SetBackgroundColor( aBackground );
-    pOutlView->registerLibreOfficeKitCallback(GetModel()->getLibreOfficeKitCallback(), GetModel()->getLibreOfficeKitData(), GetModel());
+    pOutlView->registerLibreOfficeKitCallback(GetModel());
     if (pText!=nullptr)
     {
         pOutlView->SetAnchorMode((EVAnchorMode)(pText->GetOutlinerViewAnchorMode()));
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index b4f96a6..8f9a220 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -291,7 +291,7 @@ 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(LibreOfficeKitCallback pCallback, void* pData, OutlinerSearchable* pSearchable);
+        void registerLibreOfficeKitCallback(OutlinerSearchable* pSearchable);
 };
 
 #endif
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index ecd8d67..01e0378 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -119,7 +119,7 @@ void SwViewShell::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallbac
 {
     getIDocumentDrawModelAccess().GetDrawModel()->registerLibreOfficeKitCallback(pCallback, pData);
     if (SwPostItMgr* pPostItMgr = GetPostItMgr())
-        pPostItMgr->registerLibreOfficeKitCallback(pCallback, pData, getIDocumentDrawModelAccess().GetDrawModel());
+        pPostItMgr->registerLibreOfficeKitCallback(getIDocumentDrawModelAccess().GetDrawModel());
 }
 
 void SwViewShell::libreOfficeKitCallback(int nType, const char* pPayload) const
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index d968eb2..b0ddb3b 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -881,7 +881,7 @@ void SwPostItMgr::PaintTile(OutputDevice& rRenderContext, const Rectangle& /*rRe
     }
 }
 
-void SwPostItMgr::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pData, OutlinerSearchable* pSearchable)
+void SwPostItMgr::registerLibreOfficeKitCallback(OutlinerSearchable* pSearchable)
 {
     for (SwSidebarItem* pItem : mvPostItFields)
     {
@@ -889,7 +889,7 @@ void SwPostItMgr::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallbac
         if (!pPostIt)
             continue;
 
-        pPostIt->GetOutlinerView()->registerLibreOfficeKitCallback(pCallback, pData, pSearchable);
+        pPostIt->GetOutlinerView()->registerLibreOfficeKitCallback(pSearchable);
     }
 }
 
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index 4bc6cfc..50a2735 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -615,10 +615,7 @@ void SwSidebarWin::InitControls()
     {
         // If there is a callback already registered, inform the new outliner view about it.
         SwDrawModel* pDrawModel = mrView.GetWrtShellPtr()->getIDocumentDrawModelAccess().GetDrawModel();
-        LibreOfficeKitCallback pCallback = nullptr;
-        void* pData = nullptr;
-        pDrawModel->getLibreOfficeKitCallback(pCallback, pData);
-        mpOutlinerView->registerLibreOfficeKitCallback(pCallback, pData, pDrawModel);
+        mpOutlinerView->registerLibreOfficeKitCallback(pDrawModel);
     }
 
     //create Scrollbars


More information about the Libreoffice-commits mailing list