summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-05-12 17:00:45 -0400
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-25 15:26:17 +0200
commit4fccc5410185abaf836e40ed0520ac7b50d21474 (patch)
treea5e718ea1abc21ce87a793fb99e7dda942b46a62 /sc
parenta27c613b8305cbf1f541771d23f38dbe65bc51cf (diff)
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@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabview.cxx16
1 files changed, 10 insertions, 6 deletions
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