include/LibreOfficeKit/LibreOfficeKitEnums.h | 9 ++++++++- libreofficekit/source/gtk/lokdocview.cxx | 8 +++++++- sd/source/ui/view/drviews1.cxx | 6 ++++++ 3 files changed, 21 insertions(+), 2 deletions(-)
New commits: commit 96041179d4aa5e0eb543c3c5da8e493beb0ed133 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Tue May 26 17:00:20 2015 +0200 lokdocview: handle LOK_CALLBACK_SET_PART Change-Id: I47fc389590d581155074fec63cca79bea3596860 diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx index 664baa2..c04fa3e 100644 --- a/libreofficekit/source/gtk/lokdocview.cxx +++ b/libreofficekit/source/gtk/lokdocview.cxx @@ -913,6 +913,8 @@ const char* LOKDocView_Impl::callbackTypeToString(int nType) return "LOK_CALLBACK_SEARCH_NOT_FOUND"; case LOK_CALLBACK_PAGE_COUNT_CHANGED: return "LOK_CALLBACK_PAGE_COUNT_CHANGED"; + case LOK_CALLBACK_SET_PART: + return "LOK_CALLBACK_SET_PART"; } return 0; } @@ -1015,6 +1017,11 @@ gboolean LOKDocView_Impl::callbackImpl(CallbackData* pCallback) m_pDocument->pClass->getDocumentSize(m_pDocument, &m_nDocumentWidthTwips, &m_nDocumentHeightTwips); } break; + case LOK_CALLBACK_SET_PART: + { + renderDocument(0); + } + break; default: g_assert(false); break; @@ -1226,7 +1233,6 @@ SAL_DLLPUBLIC_EXPORT int lok_docview_get_part( LOKDocView* pDocView ) SAL_DLLPUBLIC_EXPORT void lok_docview_set_part( LOKDocView* pDocView, int nPart) { pDocView->m_pImpl->m_pDocument->pClass->setPart( pDocView->m_pImpl->m_pDocument, nPart ); - pDocView->m_pImpl->renderDocument(0); } SAL_DLLPUBLIC_EXPORT char* lok_docview_get_part_name( LOKDocView* pDocView, int nPart ) commit 67a37be9969d8b5a0bc8ae081bc1aba697ea6ba5 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Tue May 26 16:58:36 2015 +0200 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 diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h index ba4db82..bbcd5b9 100644 --- a/include/LibreOfficeKit/LibreOfficeKitEnums.h +++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h @@ -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; diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 9aa19da..74a77c4 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits