summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-12-04 17:30:45 +0100
committerJan Holesovsky <kendy@collabora.com>2017-12-04 17:30:45 +0100
commitc9d1df376a949a2edf7d0cea7c695b9ff213d8f0 (patch)
tree05f4f6f22d8bf9854b1083a1492589a89fdba8fd
parent9f7a32627beb72416bbc8f9bbe25add277c1fc8b (diff)
lokdialog: Make the Autofilter popup work in Calc.
For the moment we treat it as a 'dialog', but maybe we'll need a separate window type for this later. Change-Id: I21bff0b50b5f3e9f51d323600f7ba6d37c16bc9b
-rw-r--r--vcl/source/window/floatwin.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index ce289a804e50..4c2eae984c54 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -621,8 +621,18 @@ void FloatingWindow::StateChanged( StateChangedType nType )
SetLOKNotifier(pNotifier);
std::vector<vcl::LOKPayloadItem> aItems;
- aItems.emplace_back(std::make_pair("type", "child"));
- aItems.emplace_back(std::make_pair("parentId", OString::number(pParent->GetLOKWindowId())));
+ if (pParent == this)
+ {
+ // we are a toplevel window, let's so far pretend to be a
+ // dialog - but maybe we'll need a separate type for this
+ // later
+ aItems.emplace_back(std::make_pair("type", "dialog"));
+ }
+ else
+ {
+ aItems.emplace_back(std::make_pair("type", "child"));
+ aItems.emplace_back(std::make_pair("parentId", OString::number(pParent->GetLOKWindowId())));
+ }
aItems.emplace_back(std::make_pair("size", GetSizePixel().toString()));
aItems.emplace_back(std::make_pair("position", mpImplData->maPos.toString()));
pNotifier->notifyWindow(GetLOKWindowId(), "created", aItems);