summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2018-01-25 14:34:19 +0530
committerJan Holesovsky <kendy@collabora.com>2018-01-25 11:10:48 +0100
commit3b22b8077d744f39ca5c202570d21f2f32f02b45 (patch)
treee9cb9862928c4a8c83d836eaf381114cd8cdcd57 /sfx2
parente183338d2aef0f976aaadd52e76ff9c478f92cdc (diff)
lokdialog: Fix incorrect dialog sizes sent to client
GetSizePixel triggers pending resize handler and gives more correct sizes than GetOptimalSize(). Some of the dialog with inconsistencies in sizes like EditStyle, Manage Changes, etc. are fixed with this patch. Change-Id: I0661b7d2e98233edf0cd2c9c525b271d0724da08 (cherry picked from commit 668deca97d8dd049bb17b6d8b73c4ea73f7b8b9c) Reviewed-on: https://gerrit.libreoffice.org/48560 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/basedlgs.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 729e1fbbdb97..94b4225ddf7f 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -199,10 +199,9 @@ void SfxModalDialog::StateChanged( StateChangedType nType )
// SfxModalDialog even though they are modeless, i.e., their Execute method
// isn't called.
SetLOKNotifier(SfxViewShell::Current());
- const Size aSize = GetOptimalSize();
std::vector<vcl::LOKPayloadItem> aItems;
aItems.emplace_back("type", "dialog");
- aItems.emplace_back("size", aSize.toString());
+ aItems.emplace_back("size", GetSizePixel().toString());
if (!GetText().isEmpty())
aItems.emplace_back("title", GetText().toUtf8());
SfxViewShell::Current()->notifyWindow(GetLOKWindowId(), "created", aItems);
@@ -265,7 +264,7 @@ void SfxModelessDialog::StateChanged( StateChangedType nStateChange )
SetLOKNotifier(pViewShell);
std::vector<vcl::LOKPayloadItem> aItems;
aItems.emplace_back("type", "dialog");
- aItems.emplace_back("size", GetOptimalSize().toString());
+ aItems.emplace_back("size", GetSizePixel().toString());
if (!GetText().isEmpty())
aItems.emplace_back("title", GetText().toUtf8());
pViewShell->notifyWindow(GetLOKWindowId(), "created", aItems);