summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-12-14 20:28:39 +0530
committerPranav Kant <pranavk@collabora.co.uk>2017-12-15 17:35:03 +0530
commit49a58e6e735a90532720f74c8d255056cd018a1a (patch)
treeb97d691ba3d17f4c44aa9efcaa22f772fe511204 /vcl
parent40990006eafa161ad509c4646a80fd28770e2914 (diff)
lokdialog: If we already have the title, emit it during creation
Some dialogs load the UI before we "Execute()" the dialog, or before the dialog fires the InitShow event. In those cases, the title event has already been fired and won't be fired after dialog is created. Make sure that we send the title for such dialogs. Change-Id: Ib66238298ad9b0dc85bd269aff37aeadf1fc82e4 (cherry picked from commit 10a88598a4233f2b24548571644a83dc9d20e15d)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/dialog.cxx4
-rw-r--r--vcl/source/window/floatwin.cxx10
2 files changed, 7 insertions, 7 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index e7d9b3188520..c247a9e50301 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -697,7 +697,7 @@ void Dialog::StateChanged( StateChangedType nType )
if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
{
std::vector<vcl::LOKPayloadItem> aPayload;
- aPayload.push_back(std::make_pair(OString("title"), GetText().toUtf8()));
+ aPayload.emplace_back("title", GetText().toUtf8());
pNotifier->notifyWindow(GetLOKWindowId(), "title_changed", aPayload);
}
}
@@ -1202,7 +1202,7 @@ void Dialog::Resize()
if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
{
std::vector<vcl::LOKPayloadItem> aItems;
- aItems.emplace_back(std::make_pair("size", GetOptimalSize().toString()));
+ aItems.emplace_back("size", GetOptimalSize().toString());
pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems);
}
}
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index d533f558ec6b..63ae2172fc60 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -614,16 +614,16 @@ void FloatingWindow::StateChanged( StateChangedType nType )
// 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"));
+ aItems.emplace_back("type", "dialog");
}
else
{
SetLOKNotifier(pParent->GetLOKNotifier());
- aItems.emplace_back(std::make_pair("type", "child"));
- aItems.emplace_back(std::make_pair("parentId", OString::number(pParent->GetLOKWindowId())));
+ aItems.emplace_back("type", "child");
+ aItems.emplace_back("parentId", OString::number(pParent->GetLOKWindowId()));
}
- aItems.emplace_back(std::make_pair("size", GetSizePixel().toString()));
- aItems.emplace_back(std::make_pair("position", mpImplData->maPos.toString()));
+ aItems.emplace_back("size", GetSizePixel().toString());
+ aItems.emplace_back("position", mpImplData->maPos.toString());
GetLOKNotifier()->notifyWindow(GetLOKWindowId(), "created", aItems);
}
else if (!IsVisible() && nType == StateChangedType::Visible)