diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-08-20 09:59:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-09-28 08:48:36 +0100 |
commit | 970acf533d038a261882ca000e47c4f430ea6907 (patch) | |
tree | 76be43e1918e7ed92eed39c6437ebf5687033611 /vcl | |
parent | 4a9fe1a736dac09436ff31560565f1e5b7d5b46e (diff) |
Keep binary resource help id on retro-fit
We use our new help id for a full conversion, but for retro-fit
we retain the old help id
Change-Id: I341e72b4c01ff2350292a0947848aafeea524d45
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/vcl/builder.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/vcl/window.hxx | 10 | ||||
-rw-r--r-- | vcl/source/control/button.cxx | 45 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 7 | ||||
-rw-r--r-- | vcl/source/control/field.cxx | 14 | ||||
-rw-r--r-- | vcl/source/control/fixed.cxx | 14 | ||||
-rw-r--r-- | vcl/source/control/lstbox.cxx | 14 | ||||
-rw-r--r-- | vcl/source/control/spinfld.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 38 | ||||
-rw-r--r-- | vcl/source/window/dialog.cxx | 19 | ||||
-rw-r--r-- | vcl/source/window/tabpage.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 43 |
12 files changed, 117 insertions, 97 deletions
diff --git a/vcl/inc/vcl/builder.hxx b/vcl/inc/vcl/builder.hxx index 05c40d4dbc96..e43ac1bf3a6a 100644 --- a/vcl/inc/vcl/builder.hxx +++ b/vcl/inc/vcl/builder.hxx @@ -183,7 +183,7 @@ public: VclBuilderContainer(); virtual ~VclBuilderContainer(); static VclBuilder* overrideResourceWithUIXML(Window *pWindow, const ResId& rResId); - static bool replace_buildable(Window *pParent, sal_Int32 nID, Window &rReplacement); + static bool replace_buildable(Window *pParent, const ResId& rResId, Window &rReplacement); }; diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx index ea82e8aa3340..602054123ca5 100644 --- a/vcl/inc/vcl/window.hxx +++ b/vcl/inc/vcl/window.hxx @@ -347,6 +347,13 @@ class Dialog; class WindowImpl; class VclBuilder; +struct WindowResHeader +{ + sal_uLong nObjMask; + rtl::OString aHelpId; + sal_uLong nRSStyle; +}; + class VCL_DLLPUBLIC Window : public OutputDevice { friend class Cursor; @@ -393,8 +400,9 @@ private: public: SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData ); SAL_DLLPRIVATE WinBits ImplInitRes( const ResId& rResId ); + SAL_DLLPRIVATE WindowResHeader ImplLoadResHeader( const ResId& rResId ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); - SAL_DLLPRIVATE void ImplWindowRes( const ResId& rResId ); + SAL_DLLPRIVATE void loadAndSetJustHelpID( const ResId& rResId ); SAL_DLLPRIVATE void ImplSetFrameParent( const Window* pParent ); SAL_DLLPRIVATE void ImplInsertWindow( Window* pParent ); SAL_DLLPRIVATE void ImplRemoveWindow( sal_Bool bRemoveFrameData ); diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index e72c26020eab..0b8b0f419a88 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1207,12 +1207,13 @@ PushButton::PushButton( Window* pParent, WinBits nStyle ) : PushButton::PushButton( Window* pParent, const ResId& rResId ) : Button( WINDOW_PUSHBUTTON ) { - if (VclBuilderContainer::replace_buildable(pParent, rResId.GetId(), *this)) + rResId.SetRT( RSC_PUSHBUTTON ); + WinBits nStyle = ImplInitRes( rResId ); + + if (VclBuilderContainer::replace_buildable(pParent, rResId, *this)) return; ImplInitPushButtonData(); - rResId.SetRT( RSC_PUSHBUTTON ); - WinBits nStyle = ImplInitRes( rResId ); ImplInit( pParent, nStyle ); ImplLoadRes( rResId ); @@ -1762,11 +1763,12 @@ OKButton::OKButton( Window* pParent, WinBits nStyle ) : OKButton::OKButton( Window* pParent, const ResId& rResId ) : PushButton( WINDOW_OKBUTTON ) { - if (VclBuilderContainer::replace_buildable(pParent, rResId.GetId(), *this)) - return; - rResId.SetRT( RSC_OKBUTTON ); WinBits nStyle = ImplInitRes( rResId ); + + if (VclBuilderContainer::replace_buildable(pParent, rResId, *this)) + return; + ImplInit( pParent, nStyle ); ImplLoadRes( rResId ); @@ -1785,7 +1787,6 @@ void OKButton::take_properties(Window &rOther) void OKButton::Click() { - SAL_WARN_IF(!GetClickHdl(), "vcl", "No handler installed for OKButton"); // close parent if no link set if ( !GetClickHdl() ) { @@ -1839,11 +1840,12 @@ CancelButton::CancelButton( Window* pParent, WinBits nStyle ) : CancelButton::CancelButton( Window* pParent, const ResId& rResId ) : PushButton( WINDOW_CANCELBUTTON ) { - if (VclBuilderContainer::replace_buildable(pParent, rResId.GetId(), *this)) - return; - rResId.SetRT( RSC_CANCELBUTTON ); WinBits nStyle = ImplInitRes( rResId ); + + if (VclBuilderContainer::replace_buildable(pParent, rResId, *this)) + return; + ImplInit( pParent, nStyle ); ImplLoadRes( rResId ); @@ -1862,7 +1864,6 @@ void CancelButton::take_properties(Window &rOther) void CancelButton::Click() { - SAL_WARN_IF(!GetClickHdl(), "vcl", "No handler installed for CancelButton"); // close parent if link not set if ( !GetClickHdl() ) { @@ -1916,11 +1917,12 @@ HelpButton::HelpButton( Window* pParent, WinBits nStyle ) : HelpButton::HelpButton( Window* pParent, const ResId& rResId ) : PushButton( WINDOW_HELPBUTTON ) { - if (VclBuilderContainer::replace_buildable(pParent, rResId.GetId(), *this)) - return; - rResId.SetRT( RSC_HELPBUTTON ); WinBits nStyle = ImplInitRes( rResId ); + + if (VclBuilderContainer::replace_buildable(pParent, rResId, *this)) + return; + ImplInit( pParent, nStyle ); ImplLoadRes( rResId ); @@ -1939,7 +1941,6 @@ void HelpButton::take_properties(Window &rOther) void HelpButton::Click() { - SAL_WARN_IF(!GetClickHdl(), "vcl", "No handler installed for HelpButton"); // trigger help if no link set if ( !GetClickHdl() ) { @@ -2475,12 +2476,13 @@ RadioButton::RadioButton( Window* pParent, WinBits nStyle ) : RadioButton::RadioButton( Window* pParent, const ResId& rResId ) : Button( WINDOW_RADIOBUTTON ), mbLegacyNoTextAlign( false ) { - if (VclBuilderContainer::replace_buildable(pParent, rResId.GetId(), *this)) + rResId.SetRT( RSC_RADIOBUTTON ); + WinBits nStyle = ImplInitRes( rResId ); + + if (VclBuilderContainer::replace_buildable(pParent, rResId, *this)) return; ImplInitRadioButtonData(); - rResId.SetRT( RSC_RADIOBUTTON ); - WinBits nStyle = ImplInitRes( rResId ); ImplInit( pParent, nStyle ); ImplLoadRes( rResId ); @@ -3445,12 +3447,13 @@ CheckBox::CheckBox( Window* pParent, WinBits nStyle ) : CheckBox::CheckBox( Window* pParent, const ResId& rResId ) : Button( WINDOW_CHECKBOX ), mbLegacyNoTextAlign( false ) { - if (VclBuilderContainer::replace_buildable(pParent, rResId.GetId(), *this)) + rResId.SetRT( RSC_CHECKBOX ); + WinBits nStyle = ImplInitRes( rResId ); + + if (VclBuilderContainer::replace_buildable(pParent, rResId, *this)) return; ImplInitCheckBoxData(); - rResId.SetRT( RSC_CHECKBOX ); - WinBits nStyle = ImplInitRes( rResId ); ImplInit( pParent, nStyle ); ImplLoadRes( rResId ); diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 98e76ad73d67..479d6cb45e24 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -203,12 +203,13 @@ Edit::Edit( Window* pParent, WinBits nStyle ) : Edit::Edit( Window* pParent, const ResId& rResId ) : Control( WINDOW_EDIT ) { - if (VclBuilderContainer::replace_buildable(pParent, rResId.GetId(), *this)) + rResId.SetRT( RSC_EDIT ); + WinBits nStyle = ImplInitRes( rResId ); + + if (VclBuilderContainer::replace_buildable(pParent, rResId, *this)) return; ImplInitEditData(); - rResId.SetRT( RSC_EDIT ); - WinBits nStyle = ImplInitRes( rResId ); ImplInit( pParent, nStyle ); ImplLoadRes( rResId ); diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 666686d500ee..5fa5480de59e 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -803,14 +803,15 @@ NumericField::NumericField( Window* pParent, WinBits nWinStyle ) : NumericField::NumericField( Window* pParent, const ResId& rResId ) : SpinField( WINDOW_NUMERICFIELD ) { - if (VclBuilderContainer::replace_buildable(pParent, rResId.GetId(), *this)) + rResId.SetRT( RSC_NUMERICFIELD ); + WinBits nStyle = ImplInitRes( rResId ) ; + + if (VclBuilderContainer::replace_buildable(pParent, rResId, *this)) { SetField( this ); return; } - rResId.SetRT( RSC_NUMERICFIELD ); - WinBits nStyle = ImplInitRes( rResId ) ; SpinField::ImplInit( pParent, nStyle ); SetField( this ); ImplLoadRes( rResId ); @@ -1673,11 +1674,12 @@ MetricField::MetricField( Window* pParent, WinBits nWinStyle ) : MetricField::MetricField( Window* pParent, const ResId& rResId ) : SpinField( WINDOW_METRICFIELD ) { - if (VclBuilderContainer::replace_buildable(pParent, rResId.GetId(), *this)) - return; - rResId.SetRT( RSC_METRICFIELD ); WinBits nStyle = ImplInitRes( rResId ) ; + + if (VclBuilderContainer::replace_buildable(pParent, rResId, *this)) + return; + SpinField::ImplInit( pParent, nStyle ); SetField( this ); ImplLoadRes( rResId ); diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index 8f7f472970b4..7857f563a040 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -165,11 +165,12 @@ FixedText::FixedText( Window* pParent, WinBits nStyle ) : FixedText::FixedText( Window* pParent, const ResId& rResId ) : Control( WINDOW_FIXEDTEXT ) { - if (VclBuilderContainer::replace_buildable(pParent, rResId.GetId(), *this)) - return; - rResId.SetRT( RSC_TEXT ); WinBits nStyle = ImplInitRes( rResId ); + + if (VclBuilderContainer::replace_buildable(pParent, rResId, *this)) + return; + ImplInit( pParent, nStyle ); ImplLoadRes( rResId ); @@ -592,11 +593,12 @@ FixedLine::FixedLine( Window* pParent, WinBits nStyle ) : FixedLine::FixedLine( Window* pParent, const ResId& rResId ) : Control( WINDOW_FIXEDLINE ) { - if (VclBuilderContainer::replace_buildable(pParent, rResId.GetId(), *this)) - return; - rResId.SetRT( RSC_FIXEDLINE ); WinBits nStyle = ImplInitRes( rResId ); + + if (VclBuilderContainer::replace_buildable(pParent, rResId, *this)) + return; + ImplInit( pParent, nStyle ); ImplLoadRes( rResId ); diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 398b983d5c48..24771322a1e4 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -67,12 +67,13 @@ ListBox::ListBox( Window* pParent, WinBits nStyle ) : Control( WINDOW_LISTBOX ) ListBox::ListBox( Window* pParent, const ResId& rResId ) : Control( WINDOW_LISTBOX ) { - if (VclBuilderContainer::replace_buildable(pParent, rResId.GetId(), *this)) + rResId.SetRT( RSC_LISTBOX ); + WinBits nStyle = ImplInitRes( rResId ); + + if (VclBuilderContainer::replace_buildable(pParent, rResId, *this)) return; ImplInitListBoxData(); - rResId.SetRT( RSC_LISTBOX ); - WinBits nStyle = ImplInitRes( rResId ); ImplInit( pParent, nStyle ); ImplLoadRes( rResId ); @@ -1586,11 +1587,12 @@ MultiListBox::MultiListBox( Window* pParent, WinBits nStyle ) : MultiListBox::MultiListBox( Window* pParent, const ResId& rResId ) : ListBox( WINDOW_MULTILISTBOX ) { - if (VclBuilderContainer::replace_buildable(pParent, rResId.GetId(), *this)) - return; - rResId.SetRT( RSC_MULTILISTBOX ); WinBits nStyle = ImplInitRes( rResId ); + + if (VclBuilderContainer::replace_buildable(pParent, rResId, *this)) + return; + ImplInit( pParent, nStyle ); ImplLoadRes( rResId ); diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 9487d2ff76a2..ae6b00453326 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -377,7 +377,7 @@ void SpinField::take_properties(Window &rOther) Edit::take_properties(rOther); SpinField &rOtherField = static_cast<SpinField&>(rOther); - assert(mpEdit && rOther.mpEdit); + assert(mpEdit && rOtherField.mpEdit); mpEdit->take_properties(*rOtherField.mpEdit); maUpperRect = rOtherField.maUpperRect; diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 218b9fd3e22e..cd2b30b57ca8 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -481,6 +481,8 @@ Window *VclBuilder::insertObject(Window *pParent, const rtl::OString &rClass, co //toplevels default to resizable if (pCurrentChild->IsDialog()) pCurrentChild->SetStyle(pCurrentChild->GetStyle() | WB_SIZEMOVE | WB_3DLOOK); + if (pCurrentChild->GetHelpId().isEmpty()) + pCurrentChild->SetHelpId(m_sHelpRoot + m_sID); } else { @@ -515,12 +517,12 @@ sal_uInt16 VclBuilder::getPositionWithinParent(Window &rWindow) { assert(rWindow.mpWindowImpl->mpBorderWindow == rWindow.mpWindowImpl->mpParent); - assert(rWindow.mpWindowImpl->mpBorderWindow->mpParent == + assert(rWindow.mpWindowImpl->mpBorderWindow->mpWindowImpl->mpParent == rWindow.mpWindowImpl->mpRealParent); return getPositionWithinParent(*rWindow.mpWindowImpl->mpBorderWindow); } - assert(rWindow.GetParent() == rWindow.GetRealParent()); + assert(rWindow.GetParent() == rWindow.mpWindowImpl->mpRealParent); sal_uInt16 nPosition = 0; Window* pChild = rWindow.GetParent()->mpWindowImpl->mpFirstChild; @@ -540,7 +542,7 @@ void VclBuilder::reorderWithinParent(Window &rWindow, sal_uInt16 nNewPosition) { assert(rWindow.mpWindowImpl->mpBorderWindow == rWindow.mpWindowImpl->mpParent); - assert(rWindow.mpWindowImpl->mpBorderWindow->mpParent == + assert(rWindow.mpWindowImpl->mpBorderWindow->mpWindowImpl->mpParent == rWindow.mpWindowImpl->mpRealParent); reorderWithinParent(*rWindow.mpWindowImpl->mpBorderWindow, nNewPosition); return; @@ -1089,7 +1091,6 @@ VclBuilder::Adjustment *VclBuilder::get_adjustment_by_name(rtl::OString sID) void VclBuilder::swapGuts(Window &rOrig, Window &rReplacement) { -#if 1 sal_uInt16 nPosition = getPositionWithinParent(rOrig); rReplacement.take_properties(rOrig); @@ -1097,35 +1098,6 @@ void VclBuilder::swapGuts(Window &rOrig, Window &rReplacement) reorderWithinParent(rReplacement, nPosition); assert(nPosition == getPositionWithinParent(rReplacement)); -#else - //rReplacement is intended to be not inserted into - //anything yet - assert(!rReplacement.mpWindowImpl->mpParent); - - rReplacement.ImplInit(rOrig.GetParent(), rOrig.GetStyle(), NULL); - assert(rReplacement.GetParent() == rOrig.GetParent()); - - rReplacement.ImplRemoveWindow(false); - - Window *pParent = rOrig.mpWindowImpl->mpParent; - Window *pOrigsNext = rOrig.mpWindowImpl->mpNext; - Window *pOrigsPrev = rOrig.mpWindowImpl->mpPrev; - std::swap(rOrig.mpWindowImpl, rReplacement.mpWindowImpl); - assert(rReplacement.mpWindowImpl->mpPrev == pOrigsPrev); - assert(rReplacement.mpWindowImpl->mpNext == pOrigsNext); - if (pOrigsNext) - pOrigsNext->mpWindowImpl->mpPrev = &rReplacement; - else - pParent->mpWindowImpl->mpLastChild = &rReplacement; - if (pOrigsPrev) - pOrigsPrev->mpWindowImpl->mpNext = &rReplacement; - else - pParent->mpWindowImpl->mpFirstChild = &rReplacement; - assert(!rOrig.mpWindowImpl->mpNext && !rOrig.mpWindowImpl->mpPrev); - - //now put this at the end of the window list - rOrig.ImplInsertWindow(pParent); -#endif fprintf(stderr, "swapped %p for %p %p/%p/%p\n", &rReplacement, &rOrig, rReplacement.mpWindowImpl->mpParent, rReplacement.mpWindowImpl->mpRealParent, rReplacement.mpWindowImpl->mpBorderWindow); } diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 7b7be589f81f..5666b02fbd48 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -571,7 +571,9 @@ WinBits Dialog::init(Window *pParent, const ResId& rResId) m_pUIBuilder = overrideResourceWithUIXML(this, rResId); - if (!m_pUIBuilder) + if (m_pUIBuilder) + loadAndSetJustHelpID(rResId); + else { //fallback to using the binary resource file ImplLoadRes( rResId ); @@ -1244,7 +1246,7 @@ VclBuilderContainer::~VclBuilderContainer() delete m_pUIBuilder; } -bool VclBuilderContainer::replace_buildable(Window *pParent, sal_Int32 nID, Window &rReplacement) +bool VclBuilderContainer::replace_buildable(Window *pParent, const ResId& rResId, Window &rReplacement) { if (!pParent) return false; @@ -1256,8 +1258,15 @@ bool VclBuilderContainer::replace_buildable(Window *pParent, sal_Int32 nID, Wind VclBuilder *pUIBuilder = pBuilderContainer->m_pUIBuilder; if (!pUIBuilder) return false; + + sal_Int32 nID = rResId.GetId(); + bool bFound = pUIBuilder->replace(rtl::OString::valueOf(nID), rReplacement); - if (!bFound) + if (bFound) + { + rReplacement.loadAndSetJustHelpID(rResId); + } + else { fprintf(stderr, "%d %p not found, hiding\n", nID, &rReplacement); //move "missing" elements into the action area (just to have @@ -1273,9 +1282,7 @@ bool VclBuilderContainer::replace_buildable(Window *pParent, sal_Int32 nID, Wind rReplacement.ImplInit(pArbitraryParent, 0, NULL); rReplacement.Hide(); } - else - fprintf(stderr, "%d found\n", nID); - assert(rReplacement.mpWindowImpl); + return true; } diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index a778c7f7cf5c..c9f5ffff0270 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -101,10 +101,12 @@ TabPage::TabPage( Window* pParent, const ResId& rResId ) : m_pUIBuilder = overrideResourceWithUIXML(this, rResId); - if (!m_pUIBuilder) + if (m_pUIBuilder) + loadAndSetJustHelpID(rResId); + else { //fallback to using the binary resource file - ImplLoadRes( rResId ); + ImplLoadRes(rResId); } if ( !(nStyle & WB_HIDE) ) diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 997499125e48..ec491e597a26 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1249,25 +1249,43 @@ WinBits Window::ImplInitRes( const ResId& rResId ) // ----------------------------------------------------------------------- -void Window::ImplLoadRes( const ResId& rResId ) +WindowResHeader Window::ImplLoadResHeader( const ResId& rResId ) { - sal_uLong nObjMask = ReadLongRes(); + WindowResHeader aHeader; + + aHeader.nObjMask = ReadLongRes(); // we need to calculate auto helpids before the resource gets closed // if the resource only contains flags, it will be closed before we try to read a help id // so we always create an auto help id that might be overwritten later // HelpId - rtl::OString aHelpId = ImplAutoHelpID( rResId.GetResMgr() ); + aHeader.aHelpId = ImplAutoHelpID( rResId.GetResMgr() ); // ResourceStyle - sal_uLong nRSStyle = ReadLongRes(); + aHeader.nRSStyle = ReadLongRes(); // WinBits ReadLongRes(); - if( nObjMask & WINDOW_HELPID ) - aHelpId = ReadByteStringRes(); + if( aHeader.nObjMask & WINDOW_HELPID ) + aHeader.aHelpId = ReadByteStringRes(); + + return aHeader; +} + +void Window::loadAndSetJustHelpID(const ResId& rResId) +{ + WindowResHeader aHeader = ImplLoadResHeader(rResId); + SetHelpId(aHeader.aHelpId); + IncrementRes(GetRemainSizeRes()); +} + +void Window::ImplLoadRes( const ResId& rResId ) +{ + WindowResHeader aHeader = ImplLoadResHeader( rResId ); + + SetHelpId( aHeader.aHelpId ); - SetHelpId( aHelpId ); + sal_uLong nObjMask = aHeader.nObjMask; sal_Bool bPos = sal_False; sal_Bool bSize = sal_False; @@ -1304,6 +1322,8 @@ void Window::ImplLoadRes( const ResId& rResId ) aSize.Height() = ImplLogicUnitToPixelY( ReadLongRes(), eSizeMap ); } + sal_uLong nRSStyle = aHeader.nRSStyle; + // looks bad due to optimisation if ( nRSStyle & RSWND_CLIENTSIZE ) { @@ -4190,12 +4210,14 @@ Window::Window( Window* pParent, const ResId& rResId ) : mpWindowImpl(NULL) { DBG_CTOR( Window, ImplDbgCheckWindow ); - if (VclBuilderContainer::replace_buildable(pParent, rResId.GetId(), *this)) - return; - ImplInitWindowData( WINDOW_WINDOW ); rResId.SetRT( RSC_WINDOW ); WinBits nStyle = ImplInitRes( rResId ); + + if (VclBuilderContainer::replace_buildable(pParent, rResId, *this)) + return; + + ImplInitWindowData( WINDOW_WINDOW ); ImplInit( pParent, nStyle, NULL ); ImplLoadRes( rResId ); @@ -4946,7 +4968,6 @@ void Window::StateChanged( StateChangedType eType ) break; //stuff that does invalidate the layout default: - fprintf(stderr, "queue_resize due to %d\n", eType); queue_resize(); break; } |