[Libreoffice-commits] core.git: sc/source
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 25 13:27:07 UTC 2019
sc/source/ui/view/tabview.cxx | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
New commits:
commit 4fccc5410185abaf836e40ed0520ac7b50d21474
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun May 12 17:00:45 2019 -0400
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Jul 25 15:26:17 2019 +0200
LOK: sc: Issue DOCUMENT_SIZE_CHANGED only when size changes
Issuing DOCUMENT_SIZE_CHANGED triggers document-loaded event.
This is accidental and historic, but the end result is that
the client assumes everything is invalidated and fires
initialization handlers, which are normally invoked the
first time a document is loaded. Undesirable when really
nothing has changed.
Change-Id: Ia4fa4479ca627b0f605e4ff5009f7e631a26f6d7
Reviewed-on: https://gerrit.libreoffice.org/76313
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 0a3c0c3d8893..510742b5a30a 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2701,12 +2701,16 @@ OUString ScTabView::getRowColumnHeaders(const tools::Rectangle& rRectangle)
if (pDocSh)
{
- // Provide size in the payload, so clients don't have to
- // call lok::Document::getDocumentSize().
- std::stringstream ss;
- ss << aNewSize.Width() << ", " << aNewSize.Height();
- OString sSize = ss.str().c_str();
- aViewData.GetViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, sSize.getStr());
+ if (aOldSize != aNewSize)
+ {
+ // Provide size in the payload, so clients don't have to
+ // call lok::Document::getDocumentSize().
+ std::stringstream ss;
+ ss << aNewSize.Width() << ", " << aNewSize.Height();
+ OString sSize = ss.str().c_str();
+ aViewData.GetViewShell()->libreOfficeKitViewCallback(
+ LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, sSize.getStr());
+ }
// New area extended to the right of the sheet after last column
// including overlapping area with aNewRowArea
More information about the Libreoffice-commits
mailing list