diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-09-14 13:22:45 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-09-25 12:31:49 +0200 |
commit | cd7ff1797d754018db1d47888781c9d7ecb24dcf (patch) | |
tree | fd58ae3cd52d376cfb1cd930ea2297e8882c752a /sw/source/core/view/viewsh.cxx | |
parent | 630d5915819c664aaee5f17066c61939f7ceaefe (diff) |
lok: send an invalidation by document size change
It was sent by the kit code earlier. Now we move it
to the LO core code, so we can optimize it later.
Change-Id: Id0a8991016dbe8d13891071e2d5b4c9250720da9
co-author: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/79491
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sw/source/core/view/viewsh.cxx')
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index e20d7de4a4a1..6ec563446366 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -74,6 +74,7 @@ #include <wrtsh.hxx> #include <DocumentSettingManager.hxx> +#include <unotxdoc.hxx> #include <view.hxx> #include <PostItMgr.hxx> #include <unotools/configmgr.hxx> @@ -85,6 +86,7 @@ #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <comphelper/lok.hxx> #include <prevwpage.hxx> +#include <sfx2/lokhelper.hxx> #if !HAVE_FEATURE_DESKTOP #include <vcl/sysdata.hxx> @@ -1065,7 +1067,9 @@ void SwViewShell::SizeChgNotify() std::stringstream ss; ss << aDocSize.Width() + 2 * DOCUMENTBORDER << ", " << aDocSize.Height() + 2 * DOCUMENTBORDER; OString sSize = ss.str().c_str(); - GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, sSize.getStr()); + + SwXTextDocument* pModel = comphelper::getUnoTunnelImplementation<SwXTextDocument>(GetSfxViewShell()->GetCurrentDocument()); + SfxLokHelper::notifyDocumentSizeChanged(GetSfxViewShell(), sSize, pModel); } } } |