summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-01-14 14:20:40 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-01-14 16:00:08 +0100
commit8cdc1e85f60bdb8340ef7a001222b777b194fab3 (patch)
tree5002999bfb7e7fc590e279918c8153f208fac534 /sw
parent70c946d1682d019e12cd447fdf4d6a523b899ba4 (diff)
editeng: handle SdrModel::isTiledSearching()
Given that the edit/outliner views can come and go, avoid the lifecycle problems with just passing a pointer to the sdr model to editeng, and then it'll always have the up to date "are we searching" information. editeng can't depend on svx, so provide an interface class SdrModel can implement. (cherry picked from commit 7b5d20983dfbfb458898eeab54828ba5fef5841f) Conflicts: editeng/source/editeng/editview.cxx editeng/source/editeng/impedit.cxx include/editeng/outliner.hxx sd/qa/unit/tiledrendering/tiledrendering.cxx svx/source/svdraw/svdedxv.cxx sw/inc/PostItMgr.hxx sw/source/uibase/docvw/PostItMgr.cxx sw/source/uibase/docvw/SidebarWin.cxx Change-Id: I3b98011593b00ac0fab05b6b9c591dd20d94c579
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/PostItMgr.hxx3
-rw-r--r--sw/source/core/view/viewsh.cxx2
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx4
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx2
4 files changed, 6 insertions, 5 deletions
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index fb69d29386ac..b0c77057798a 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -63,6 +63,7 @@ class SwSidebarItem;
class SwFrm;
namespace vcl { class Window; }
struct ImplSVEvent;
+class OutlinerSearchable;
#define COL_NOTES_SIDEPANE_ARROW_ENABLED RGB_COLORDATA(0,0,0)
#define COL_NOTES_SIDEPANE_ARROW_DISABLED RGB_COLORDATA(172,168,153)
@@ -294,7 +295,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);
+ void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pData, OutlinerSearchable* pSearchable);
};
#endif
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index a660c96a6345..c6ee06a6abea 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -121,7 +121,7 @@ void SwViewShell::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallbac
{
getIDocumentDrawModelAccess()->GetDrawModel()->registerLibreOfficeKitCallback(pCallback, pData);
if (SwPostItMgr* pPostItMgr = GetPostItMgr())
- pPostItMgr->registerLibreOfficeKitCallback(pCallback, pData);
+ pPostItMgr->registerLibreOfficeKitCallback(pCallback, pData, 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 e0ea88fd86b4..b50724738e35 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)
+void SwPostItMgr::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pData, OutlinerSearchable* pSearchable)
{
for (SwSidebarItem* pItem : mvPostItFields)
{
@@ -890,7 +890,7 @@ void SwPostItMgr::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallbac
continue;
pPostIt->GetOutlinerView()->setTiledRendering(mpWrtShell->isTiledRendering());
- pPostIt->GetOutlinerView()->registerLibreOfficeKitCallback(pCallback, pData);
+ pPostIt->GetOutlinerView()->registerLibreOfficeKitCallback(pCallback, pData, pSearchable);
}
}
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index 78733b648972..a66f9486ac27 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -619,7 +619,7 @@ void SwSidebarWin::InitControls()
void* pData = 0;
pDrawModel->getLibreOfficeKitCallback(pCallback, pData);
mpOutlinerView->setTiledRendering(mrView.GetWrtShellPtr()->isTiledRendering());
- mpOutlinerView->registerLibreOfficeKitCallback(pCallback, pData);
+ mpOutlinerView->registerLibreOfficeKitCallback(pCallback, pData, pDrawModel);
}
//create Scrollbars