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-05 12:22:17 +0100
commitf500727a658275e62c16f65672c71e2888c017c3 (patch)
tree3a348938eaed575b8ada7c6739bee7700f65d66b
parent24f8a2ae3b1f8962f69375a507af6fade2be2230 (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 57021be2f8cd..2aa0a08b6b0e 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -611,8 +611,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);