summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-04-30 14:55:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-04-30 14:58:45 +0100
commit3a3b64a964f92a63d15407fc7769311a9ecbfb48 (patch)
tree3726e29739e5eb2684c4fa04ae1cdd6bf6cd919e /include
parent1b14676b5f95dd51d6266a6ab7bd713a5ddcff2f (diff)
retain references to loaded modules for builders lifetime
Change-Id: Iab8b53dc50d69ba781978e1e7fd9b9c5a19c6d59
Diffstat (limited to 'include')
-rw-r--r--include/vcl/builder.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index 5de792aaab5e..ff7276656aea 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -11,6 +11,7 @@
#define _VCLBUILDER_HXX
#include <typeinfo>
+#include <osl/module.hxx>
#include <tools/resmgr.hxx> //for poxy ResHookProc typedef
#include <vcl/dllapi.h>
#include <vcl/window.hxx>
@@ -19,6 +20,7 @@
#include <set>
#include <stack>
#include <vector>
+#include <boost/ptr_container/ptr_map.hpp>
class ListBox;
class NumericFormatter;
@@ -34,6 +36,11 @@ public:
typedef std::map<OString, OString> stringmap;
typedef Window* (*customMakeWidget)(Window *pParent, stringmap &rVec);
private:
+ typedef boost::ptr_map<OUString, osl::Module> ModuleMap;
+ //We store these until the builder is deleted, that way we can use the
+ //ui-previewer on custom widgets and guarantee the modules they are from
+ //exist for the duration of the dialog
+ ModuleMap m_aModuleMap;
struct PackingData
{