summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2020-03-06 11:11:57 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2020-05-16 08:36:40 +0200
commit374df6dbce390d994e9c333ff35e6268e9fdbb17 (patch)
tree732f5919d3231289aa70fc601c58f642f986e9d5 /include
parentd52ce40f13e27385cc128cf2579548959e34125e (diff)
jsdialog: remember weld instances
Change-Id: Ie55e0fcd2307679aee52751b2d2e434393850418 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94302 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/jsdialog/jsdialogbuilder.hxx8
-rw-r--r--include/vcl/weld.hxx2
2 files changed, 7 insertions, 3 deletions
diff --git a/include/vcl/jsdialog/jsdialogbuilder.hxx b/include/vcl/jsdialog/jsdialogbuilder.hxx
index b26b2ac2ff16..e0d4bc2dcdc1 100644
--- a/include/vcl/jsdialog/jsdialogbuilder.hxx
+++ b/include/vcl/jsdialog/jsdialogbuilder.hxx
@@ -10,6 +10,8 @@
#include <vcl/combobox.hxx>
#include <vcl/button.hxx>
+typedef std::map<OString, weld::Widget*> WidgetMap;
+
class JSDialogSender
{
VclPtr<vcl::Window> m_aOwnedToplevel;
@@ -27,6 +29,9 @@ class VCL_DLLPUBLIC JSInstanceBuilder : public SalInstanceBuilder
{
vcl::LOKWindowId m_nWindowId;
+ static std::map<vcl::LOKWindowId, WidgetMap>& GetLOKWeldWidgetsMap();
+ void RememberWidget(const OString& id, weld::Widget* pWidget);
+
public:
JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIRoot, const OUString& rUIFile);
virtual ~JSInstanceBuilder() override;
@@ -43,8 +48,7 @@ public:
virtual std::unique_ptr<weld::Notebook> weld_notebook(const OString& id,
bool bTakeOwnership = false) override;
- static std::map<vcl::LOKWindowId, JSInstanceBuilder*>& GetLOKWeldBuilderMap();
- static JSInstanceBuilder* FindLOKWeldBuilder(vcl::LOKWindowId nWindowId);
+ static weld::Widget* FindWeldWidgetsMap(vcl::LOKWindowId nWindowId, const OString& rWidget);
};
template <class BaseInstanceClass, class VclClass>
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 0017c56e2b1b..e9b816a0f5fa 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -322,9 +322,9 @@ protected:
Link<ComboBox&, bool> m_aEntryActivateHdl;
Link<OUString&, bool> m_aEntryInsertTextHdl;
+public:
void signal_changed() { m_aChangeHdl.Call(*this); }
-public:
virtual void insert(int pos, const OUString& rStr, const OUString* pId,
const OUString* pIconName, VirtualDevice* pImageSurface)
= 0;