Kaydet (Commit) 5fe7a424 authored tarafından Caolán McNamara's avatar Caolán McNamara

always assert on a missing widget for the typical case

Change-Id: Ia68bfa8a3d2a6091491d69a9141a7c47556097fe
üst d1906768
......@@ -140,9 +140,11 @@ public:
VclBuilder(Window *pParent, OUString sUIRootDir, OUString sUIFile, OString sID = OString());
~VclBuilder();
Window *get_widget_root();
//sID must exist and be of type T
template <typename T> T* get(T*& ret, OString sID)
{
Window *w = get_by_name(sID);
assert(w);
ret = static_cast<T*>(w);
#if OSL_DEBUG_LEVEL > 0
......@@ -155,6 +157,7 @@ public:
return ret;
}
//sID may not exist, but must be of type T if it does
template <typename T /*=Window if we had c++11*/> T* get(OString sID)
{
Window *w = get_by_name(sID);
......
......@@ -476,6 +476,7 @@ bool FixedText::set_property(const rtl::OString &rKey, const rtl::OString &rValu
}
else
return Control::set_property(rKey, rValue);
return true;
}
// =======================================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment