[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - 3 commits - editeng/source include/editeng include/svx sc/source sd/qa sd/source svx/source sw/inc sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Thu Jan 14 07:06:06 PST 2016
editeng/source/editeng/editview.cxx | 4 ++--
editeng/source/editeng/impedit.cxx | 17 ++++++++++++++++-
editeng/source/editeng/impedit.hxx | 4 +++-
editeng/source/outliner/outlvw.cxx | 8 +++++---
include/editeng/editview.hxx | 3 ++-
include/editeng/outliner.hxx | 11 ++++++++++-
include/svx/svdmodel.hxx | 9 ++++++++-
sc/source/ui/app/inputhdl.cxx | 2 +-
sc/source/ui/view/viewdata.cxx | 3 ++-
sd/qa/unit/tiledrendering/tiledrendering.cxx | 27 ++++++++++++++++++++++++++-
sd/source/ui/view/Outliner.cxx | 2 ++
svx/source/svdraw/svdedxv.cxx | 2 +-
svx/source/svdraw/svdmodel.cxx | 24 ++++++++++++++++++++++++
sw/inc/PostItMgr.hxx | 3 ++-
sw/source/core/view/viewsh.cxx | 2 +-
sw/source/uibase/docvw/PostItMgr.cxx | 4 ++--
sw/source/uibase/docvw/SidebarWin.cxx | 2 +-
17 files changed, 108 insertions(+), 19 deletions(-)
New commits:
commit 4505998dd9271ab0ca55ffe38642a5fa5a316320
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Jan 14 14:48:44 2016 +0100
svx: loplugin:override
Change-Id: I532525fa12af2a0afbc1277b9a918c4d563f3b4f
(cherry picked from commit d8551a79d2dcdad3bad5c437427b25b5131534ae)
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index d007da4..005eb77 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -358,7 +358,7 @@ public:
/// Set if we are doing tiled searching.
void setTiledSearching(bool bTiledSearching);
/// Are we doing tiled searching?
- bool isTiledSearching() const;
+ bool isTiledSearching() const override;
// If a new MapMode is set on the RefDevice (or similar)
void RefDeviceChanged(); // not yet implemented
// default font heigth in logical units
commit 8cdc1e85f60bdb8340ef7a001222b777b194fab3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Jan 14 14:20:40 2016 +0100
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
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 66a49ed..2a418b5 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -592,9 +592,9 @@ bool EditView::isTiledRendering()
return pImpEditView->isTiledRendering();
}
-void EditView::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData)
+void EditView::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData, OutlinerSearchable *pSearchable)
{
- pImpEditView->registerLibreOfficeKitCallback(pCallback, pLibreOfficeKitData);
+ pImpEditView->registerLibreOfficeKitCallback(pCallback, pLibreOfficeKitData, pSearchable);
}
void EditView::SetControlWord( EVControlBits nWord )
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 7ee1a2b..5ac794a 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -26,6 +26,7 @@
#include <impedit.hxx>
#include <editeng/editeng.hxx>
#include <editeng/editview.hxx>
+#include <editeng/outliner.hxx>
#include <tools/poly.hxx>
#include <editeng/unolingu.hxx>
#include <com/sun/star/linguistic2/XDictionaryEntry.hpp>
@@ -81,6 +82,7 @@ ImpEditView::ImpEditView( EditView* pView, EditEngine* pEng, vcl::Window* pWindo
mbTiledRendering = false;
mpLibreOfficeKitCallback = 0;
mpLibreOfficeKitData = 0;
+ mpLibreOfficeKitSearchable = 0;
nScrollDiffX = 0;
nExtraCursorFlags = 0;
nCursorBidiLevel = CURSOR_BIDILEVEL_DONTKNOW;
@@ -128,14 +130,27 @@ bool ImpEditView::isTiledRendering() const
return mbTiledRendering;
}
-void ImpEditView::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pData)
+void ImpEditView::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pData, OutlinerSearchable* pSearchable)
{
mpLibreOfficeKitCallback = pCallback;
mpLibreOfficeKitData = pData;
+ mpLibreOfficeKitSearchable = pSearchable;
}
void ImpEditView::libreOfficeKitCallback(int nType, const char* pPayload) const
{
+ if (mpLibreOfficeKitSearchable && mpLibreOfficeKitSearchable->isTiledSearching())
+ {
+ 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);
}
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 7b24e6e..a44e335 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -78,6 +78,7 @@
class EditView;
class EditEngine;
+class OutlinerSearchable;
class SvxSearchItem;
class SvxLRSpaceItem;
@@ -223,6 +224,7 @@ private:
bool mbTiledRendering;
LibreOfficeKitCallback mpLibreOfficeKitCallback;
void* mpLibreOfficeKitData;
+ OutlinerSearchable* mpLibreOfficeKitSearchable;
EditEngine* pEditEngine;
VclPtr<vcl::Window> pOutWin;
Pointer* pPointer;
@@ -375,7 +377,7 @@ public:
void setTiledRendering(bool bTiledRendering);
bool isTiledRendering() const;
/// @see vcl::ITiledRenderable::registerCallback().
- void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData);
+ void registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData, 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 329b5f3..6b918f4 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1430,9 +1430,9 @@ void OutlinerView::setTiledRendering(bool bTiledRendering)
pEditView->setTiledRendering(bTiledRendering);
}
-void OutlinerView::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData)
+void OutlinerView::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData, OutlinerSearchable* pSearchable)
{
- pEditView->registerLibreOfficeKitCallback(pCallback, pLibreOfficeKitData);
+ pEditView->registerLibreOfficeKitCallback(pCallback, pLibreOfficeKitData, pSearchable);
}
Color OutlinerView::GetBackgroundColor()
@@ -1460,7 +1460,9 @@ 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 41146fa..d3a1c04 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 dddb221..c6c078f 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 99bdf72..d007da4 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
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index fa2225e..6c00497 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1727,7 +1727,7 @@ void ScInputHandler::UpdateActiveView()
if (rDoc.GetDrawLayer()->isTiledRendering())
{
ScDrawLayer *pDrawLayer = pDocShell->GetDocument().GetDrawLayer();
- pTableView->registerLibreOfficeKitCallback(pDrawLayer->getLibreOfficeKitCallback(), pDrawLayer->getLibreOfficeKitData());
+ pTableView->registerLibreOfficeKitCallback(pDrawLayer->getLibreOfficeKitCallback(), pDrawLayer->getLibreOfficeKitData(), pDrawLayer);
pTableView->setTiledRendering(true);
}
}
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 04d11f3..85fc81a 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -938,7 +938,8 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
if (pDoc->GetDrawLayer() && pDoc->GetDrawLayer()->isTiledRendering())
{
pEditView[eWhich]->registerLibreOfficeKitCallback(pDoc->GetDrawLayer()->getLibreOfficeKitCallback(),
- pDoc->GetDrawLayer()->getLibreOfficeKitData());
+ pDoc->GetDrawLayer()->getLibreOfficeKitData(),
+ pDoc->GetDrawLayer());
pEditView[eWhich]->setTiledRendering(true);
}
}
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index b7150d5..264f492 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -35,6 +35,7 @@
#include <ViewShell.hxx>
#include <sdpage.hxx>
#include <unomodel.hxx>
+#include <comphelper/lok.hxx>
using namespace css;
@@ -60,6 +61,7 @@ public:
void testSearch();
void testSearchAll();
void testSearchAllSelections();
+ void testSearchAllNotifications();
#endif
CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
@@ -74,6 +76,7 @@ public:
CPPUNIT_TEST(testSearch);
CPPUNIT_TEST(testSearchAll);
//CPPUNIT_TEST(testSearchAllSelections);
+ CPPUNIT_TEST(testSearchAllNotifications);
#endif
CPPUNIT_TEST_SUITE_END();
@@ -92,13 +95,17 @@ private:
sal_Int32 m_nPart;
std::vector<OString> m_aSearchResultSelection;
std::vector<int> m_aSearchResultPart;
+ int m_nSelectionBeforeSearchResult;
+ int m_nSelectionAfterSearchResult;
#endif
};
SdTiledRenderingTest::SdTiledRenderingTest()
#if !defined(WNT) && !defined(MACOSX)
: m_bFound(true),
- m_nPart(0)
+ m_nPart(0),
+ m_nSelectionBeforeSearchResult(0),
+ m_nSelectionAfterSearchResult(0)
#endif
{
}
@@ -183,6 +190,10 @@ void SdTiledRenderingTest::callbackImpl(int nType, const char* pPayload)
lcl_convertRectangle(rString, aRectangle);
m_aSelection.push_back(aRectangle);
}
+ if (m_aSearchResultSelection.empty())
+ ++m_nSelectionBeforeSearchResult;
+ else
+ ++m_nSelectionAfterSearchResult;
}
break;
case LOK_CALLBACK_SEARCH_NOT_FOUND:
@@ -456,6 +467,20 @@ void SdTiledRenderingTest::testSearchAllSelections()
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), m_aSelection.size());
}
+void SdTiledRenderingTest::testSearchAllNotifications()
+{
+ comphelper::LibreOfficeKit::setActive();
+ SdXImpressDocument* pXImpressDocument = createDoc("search-all.odp");
+ pXImpressDocument->registerCallback(&SdTiledRenderingTest::callback, this);
+
+ lcl_search("third", /*bFindAll=*/true);
+ // Make sure that we get no notifications about selection changes during search.
+ CPPUNIT_ASSERT_EQUAL(0, m_nSelectionBeforeSearchResult);
+ // But we do get the selection of the first hit.
+ CPPUNIT_ASSERT(m_nSelectionAfterSearchResult > 0);
+ comphelper::LibreOfficeKit::setActive(false);
+}
+
#endif
CPPUNIT_TEST_SUITE_REGISTRATION(SdTiledRenderingTest);
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 7d517e2..7524721 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->setTiledRendering(GetModel()->isTiledRendering());
- pOutlView->registerLibreOfficeKitCallback(GetModel()->getLibreOfficeKitCallback(), GetModel()->getLibreOfficeKitData());
+ pOutlView->registerLibreOfficeKitCallback(GetModel()->getLibreOfficeKitCallback(), GetModel()->getLibreOfficeKitData(), GetModel());
if (pText!=NULL)
{
pOutlView->SetAnchorMode((EVAnchorMode)(pText->GetOutlinerViewAnchorMode()));
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index fb69d29..b0c7705 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 a660c96..c6ee06a 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 e0ea88f..b507247 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 78733b6..a66f948 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
commit 70c946d1682d019e12cd447fdf4d6a523b899ba4
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Jan 14 11:22:13 2016 +0100
sd tiled rendering: it's pointless to send selection changes during search all
But they do cause annoying flashing.
(cherry picked from commit b9565ef0a73c235cd1e14fce9031db6e9237c524)
Conflicts:
include/svx/svdmodel.hxx
svx/source/svdraw/svdmodel.cxx
Change-Id: Ic313a15429c5db98c5660a5274aa49e95dd217e5
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 4d56a44..99bdf72 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -179,6 +179,8 @@ protected:
bool mbTiledRendering;
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
@@ -352,6 +354,10 @@ public:
void* getLibreOfficeKitData() const;
/// Invokes the registered callback, if there are any.
void libreOfficeKitCallback(int nType, const char* pPayload) const;
+ /// 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 heigth in logical units
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index c16ba31..76b1272 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -631,6 +631,7 @@ bool Outliner::SearchAndReplaceAll()
}
else if (pViewShell->ISA(DrawViewShell))
{
+ pViewShell->GetDoc()->setTiledSearching(true);
// Go to beginning/end of document.
maObjectIterator = ::sd::outliner::OutlinerContainer(this).begin();
// Switch to the first object which contains the search string.
@@ -680,6 +681,7 @@ bool Outliner::SearchAndReplaceAll()
OString aPayload = aStream.str().c_str();
pViewShell->GetDoc()->libreOfficeKitCallback(LOK_CALLBACK_SEARCH_RESULT_SELECTION, aPayload.getStr());
}
+ pViewShell->GetDoc()->setTiledSearching(false);
}
RestoreStartPosition ();
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 47c3c21..b26f156 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -88,6 +88,7 @@
#include <vcl/svapp.hxx>
#include <boost/scoped_array.hpp>
#include <libxml/xmlwriter.h>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -127,6 +128,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
mbTiledRendering = false;
mpLibreOfficeKitCallback = 0;
mpLibreOfficeKitData = 0;
+ mbTiledSearching = false;
nProgressAkt=0;
nProgressMax=0;
nProgressOfs=0;
@@ -816,10 +818,32 @@ void SdrModel::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback,
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;
+}
+
LibreOfficeKitCallback SdrModel::getLibreOfficeKitCallback() const
{
return mpLibreOfficeKitCallback;
More information about the Libreoffice-commits
mailing list