Kaydet (Commit) 67a37be9 authored tarafından Miklos Vajna's avatar Miklos Vajna

sd: fix LOK search result highlight when result is not on the current slide

By adding a new callback event, so clients can switch to the correct
slide.

Change-Id: I6c2388eb11ef97811cc644fe3a9d3866aa82fd75
üst a10adead
......@@ -148,7 +148,14 @@ typedef enum
* Clients should assume that data returned by an earlier
* lok::Document::getDocumentSize() call is no longer valid.
*/
LOK_CALLBACK_PAGE_COUNT_CHANGED
LOK_CALLBACK_PAGE_COUNT_CHANGED,
/**
* The current part number is changed.
*
* Payload is a single 0-based integer.
*/
LOK_CALLBACK_SET_PART
}
LibreOfficeKitCallbackType;
......
......@@ -81,6 +81,7 @@
#include <sfx2/request.hxx>
#include <boost/bind.hpp>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
using namespace com::sun::star;
......@@ -1098,6 +1099,11 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
mpDrawView->AdjustMarkHdl();
}
if (bOK)
{
OString aPayload = OString::number(nSelectedPage);
GetDoc()->libreOfficeKitCallback(LOK_CALLBACK_SET_PART, aPayload.getStr());
}
return bOK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment