summaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/editeng/editview.hxx3
-rw-r--r--include/editeng/outliner.hxx11
-rw-r--r--include/svx/svdmodel.hxx3
3 files changed, 14 insertions, 3 deletions
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 41146fac63a5..d3a1c04d6e5a 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -36,6 +36,7 @@
class EditEngine;
class ImpEditEngine;
class ImpEditView;
+class OutlinerSearchable;
class SvxSearchItem;
class SvxFieldItem;
namespace vcl { class Window; }
@@ -178,7 +179,7 @@ public:
void setTiledRendering(bool bTiledRendering);
bool isTiledRendering();
/// @see vcl::ITiledRenderable::registerCallback().
- void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData);
+ void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData, OutlinerSearchable *pSearchable);
void SetControlWord( EVControlBits nWord );
EVControlBits GetControlWord() const;
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index dddb221ec9cc..c6c078f9fc6e 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -72,6 +72,7 @@ class SvxLRSpaceItem;
class EditEngine;
class SvKeyValueIterator;
class SvxForbiddenCharactersTable;
+class OutlinerSearchable;
namespace svl
{
@@ -274,7 +275,7 @@ public:
/// Set if we are doing tiled rendering.
void setTiledRendering(bool bTiledRendering);
/// @see vcl::ITiledRenderable::registerCallback().
- void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData);
+ void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData, OutlinerSearchable* pSearchable);
SfxItemSet GetAttribs();
@@ -374,6 +375,14 @@ public:
Selection GetSurroundingTextSelection() const;
};
+/// Interface class to know if we do tiled searching.
+class EDITENG_DLLPUBLIC OutlinerSearchable
+{
+public:
+ virtual ~OutlinerSearchable();
+
+ virtual bool isTiledSearching() const = 0;
+};
// some thesaurus functionality to avoid code duplication in different projects...
bool EDITENG_DLLPUBLIC GetStatusValueForThesaurusFromContext( OUString &rStatusVal, LanguageType &rLang, const EditView &rEditView );
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 99bdf72c03ba..d007da426b2e 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <cppuhelper/weakref.hxx>
#include <editeng/forbiddencharacterstable.hxx>
+#include <editeng/outliner.hxx>
#include <rtl/ustring.hxx>
#include <tools/link.hxx>
#include <tools/weakbase.hxx>
@@ -149,7 +150,7 @@ public:
struct SdrModelImpl;
-class SVX_DLLPUBLIC SdrModel : public SfxBroadcaster, public tools::WeakBase< SdrModel >
+class SVX_DLLPUBLIC SdrModel : public SfxBroadcaster, public tools::WeakBase< SdrModel >, public OutlinerSearchable
{
protected:
DateTime aReadDate; // date of the incoming stream