summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-05-23 10:43:41 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-05-23 11:20:04 +0100
commitfb2e4da0e20fea3c085ddec899376e7f3671e1b1 (patch)
tree9010ee9e7e6bc29f5a07f928c661d6609775777e
parent5d9c2f2115dd8d3741501cbbc0313e4609bee896 (diff)
SwView::UpdatePageNums: add LOK callback about page count change
Change-Id: If9ab69c9f3ec3f9f518738792ff020ef4cfd6390
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitEnums.h10
-rw-r--r--sw/source/uibase/uiview/view2.cxx2
2 files changed, 11 insertions, 1 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 9b65e88453b9..ba4db824e00c 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -140,7 +140,15 @@ typedef enum
/**
* No match was found for the search input
*/
- LOK_CALLBACK_SEARCH_NOT_FOUND
+ LOK_CALLBACK_SEARCH_NOT_FOUND,
+
+ /**
+ * Number of pages changed in the document.
+ *
+ * Clients should assume that data returned by an earlier
+ * lok::Document::getDocumentSize() call is no longer valid.
+ */
+ LOK_CALLBACK_PAGE_COUNT_CHANGED
}
LibreOfficeKitCallbackType;
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index b6f947ddfb5f..a8ce619391b6 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -147,6 +147,7 @@
#include <vcl/settings.hxx>
#include <boost/scoped_ptr.hpp>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
const char sStatusDelim[] = " : ";
const char sStatusComma[] = " , ";
@@ -1280,6 +1281,7 @@ void SwView::Execute(SfxRequest &rReq)
/// invalidate page numbering field
void SwView::UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const OUString& rPgStr)
{
+ GetWrtShell().libreOfficeKitCallback(LOK_CALLBACK_PAGE_COUNT_CHANGED, 0);
OUString sTemp(GetPageStr( nPhyNum, nVirtNum, rPgStr ));
const SfxStringItem aTmp( FN_STAT_PAGE, sTemp );
// Used to distinguish which tooltip to show