diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-05-23 10:44:07 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-05-23 11:20:04 +0100 |
commit | 490365b2452cb6fa96749475d996c6033b0d6407 (patch) | |
tree | cceedf87a76d81bae1b4df0a2c8589d9bb0906e6 /libreofficekit | |
parent | fb2e4da0e20fea3c085ddec899376e7f3671e1b1 (diff) |
lokdocview: update doc size on LOK_CALLBACK_PAGE_COUNT_CHANGED
No need to do any actual rendering, the invalidation callback takes care
of that.
Change-Id: I9a3e45cab5250fc45eccb4577fe76377f76354eb
Diffstat (limited to 'libreofficekit')
-rw-r--r-- | libreofficekit/source/gtk/lokdocview.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx index b2b7f2c93017..664baa27cefe 100644 --- a/libreofficekit/source/gtk/lokdocview.cxx +++ b/libreofficekit/source/gtk/lokdocview.cxx @@ -911,6 +911,8 @@ const char* LOKDocView_Impl::callbackTypeToString(int nType) return "LOK_CALLBACK_STATUS_INDICATOR_FINISH"; case LOK_CALLBACK_SEARCH_NOT_FOUND: return "LOK_CALLBACK_SEARCH_NOT_FOUND"; + case LOK_CALLBACK_PAGE_COUNT_CHANGED: + return "LOK_CALLBACK_PAGE_COUNT_CHANGED"; } return 0; } @@ -1008,6 +1010,11 @@ gboolean LOKDocView_Impl::callbackImpl(CallbackData* pCallback) searchNotFound(pCallback->m_aPayload); } break; + case LOK_CALLBACK_PAGE_COUNT_CHANGED: + { + m_pDocument->pClass->getDocumentSize(m_pDocument, &m_nDocumentWidthTwips, &m_nDocumentHeightTwips); + } + break; default: g_assert(false); break; @@ -1031,7 +1038,7 @@ void LOKDocView_Impl::globalCallbackWorker(int nType, const char* pPayload, void void LOKDocView_Impl::callbackWorkerImpl(int nType, const char* pPayload) { - LOKDocView_Impl::CallbackData* pCallback = new LOKDocView_Impl::CallbackData(nType, pPayload, m_pDocView); + LOKDocView_Impl::CallbackData* pCallback = new LOKDocView_Impl::CallbackData(nType, pPayload ? pPayload : "(nil)", m_pDocView); g_info("lok_docview_callback_worker: %s, '%s'", LOKDocView_Impl::callbackTypeToString(nType), pPayload); #if GTK_CHECK_VERSION(2,12,0) gdk_threads_add_idle(LOKDocView_Impl::callback, pCallback); |