diff options
-rw-r--r-- | include/vcl/dialog.hxx | 2 | ||||
-rw-r--r-- | include/vcl/floatwin.hxx | 2 | ||||
-rw-r--r-- | include/vcl/syswin.hxx | 2 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 14 | ||||
-rw-r--r-- | vcl/source/window/dialog.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/floatwin.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/syswin.cxx | 2 |
7 files changed, 23 insertions, 7 deletions
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx index 804de4afd368..14d303cef14c 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -65,7 +65,7 @@ protected: public: SAL_DLLPRIVATE bool IsInClose() const { return mbInClose; } - virtual void doDeferredInit(bool bResizable) SAL_OVERRIDE; + virtual void doDeferredInit(bool bResizable, bool bCloseable) SAL_OVERRIDE; protected: explicit Dialog( WindowType nType ); diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx index 67626273c016..02ae4cacb3aa 100644 --- a/include/vcl/floatwin.hxx +++ b/include/vcl/floatwin.hxx @@ -117,7 +117,7 @@ public: SAL_DLLPRIVATE void ImplEndPopupMode( sal_uInt16 nFlags = 0, sal_uLong nFocusId = 0 ); SAL_DLLPRIVATE Rectangle& ImplGetItemEdgeClipRect(); SAL_DLLPRIVATE bool ImplIsInPrivatePopupMode() const { return mbInPopupMode; } - virtual void doDeferredInit(bool bResizable) SAL_OVERRIDE; + virtual void doDeferredInit(bool bResizable, bool bCloseable) SAL_OVERRIDE; public: explicit FloatingWindow(Window* pParent, WinBits nStyle = WB_STDFLOATWIN); diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index 168a0eb4a116..d901ccda9c17 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -276,7 +276,7 @@ public: SAL_DLLPRIVATE bool hasPendingLayout() const { return maLayoutTimer.IsActive(); } - virtual void doDeferredInit(bool bResizable); + virtual void doDeferredInit(bool bResizable, bool bCloseable); }; #endif // INCLUDED_VCL_SYSWIN_HXX diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 3016ea67de54..ed310f0b8337 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -595,6 +595,18 @@ namespace return bResizable; } + bool extractCloseable(VclBuilder::stringmap &rMap) + { + bool bCloseable = true; + VclBuilder::stringmap::iterator aFind = rMap.find(OString("deletable")); + if (aFind != rMap.end()) + { + bCloseable = toBool(aFind->second); + rMap.erase(aFind); + } + return bCloseable; + } + bool extractEntry(VclBuilder::stringmap &rMap) { bool bHasEntry = false; @@ -1694,7 +1706,7 @@ Window *VclBuilder::insertObject(Window *pParent, const OString &rClass, if (pParent->IsSystemWindow()) { SystemWindow *pSysWin = static_cast<SystemWindow*>(pCurrentChild); - pSysWin->doDeferredInit(extractResizable(rProps)); + pSysWin->doDeferredInit(extractResizable(rProps), extractCloseable(rProps)); m_bToplevelHasDeferredInit = false; } diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index d23d2af64f3e..5f04074d1293 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -477,11 +477,13 @@ OUString VclBuilderContainer::getUIRootDir() //we can't change sizeable after the fact, so need to defer until we know and then //do the init. Find the real parent stashed in mpDialogParent. -void Dialog::doDeferredInit(bool bResizable) +void Dialog::doDeferredInit(bool bResizable, bool bCloseable) { WinBits nBits = WB_3DLOOK|WB_CLOSEABLE|WB_MOVEABLE; if (bResizable) nBits |= WB_SIZEABLE; + if (bCloseable) + nBits |= WB_CLOSEABLE; Window *pParent = mpDialogParent; mpDialogParent = NULL; ImplInit(pParent, nBits); diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 5b35585847a4..37e7a222ee1d 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -171,11 +171,13 @@ FloatingWindow::FloatingWindow(Window* pParent, const OString& rID, const OUStri } //Find the real parent stashed in mpDialogParent. -void FloatingWindow::doDeferredInit(bool bResizable) +void FloatingWindow::doDeferredInit(bool bResizable, bool bCloseable) { WinBits nBits = WB_MOVEABLE|WB_3DLOOK; if (bResizable) nBits |= WB_SIZEABLE; + if (bCloseable) + nBits |= WB_CLOSEABLE; Window *pParent = mpDialogParent; mpDialogParent = NULL; ImplInit(pParent, nBits); diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index db072cce083f..1cf207c46ab7 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -1104,7 +1104,7 @@ void SystemWindow::DoInitialLayout() } } -void SystemWindow::doDeferredInit(bool /*bResizable*/) +void SystemWindow::doDeferredInit(bool /*bResizable*/, bool /*bCloseable*/) { SAL_WARN("vcl.layout", "SystemWindow in layout without doDeferredInit impl"); } |