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>
This commit is contained in:
parent
a27c613b83
commit
4fccc54101
1 changed files with 10 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue