diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-09-02 22:42:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-09-03 15:58:26 +0100 |
commit | 77ce41f2571c3158f00e2b632ce006059282c462 (patch) | |
tree | 8fec039e7eaca527e45c2cd050208e81b70157c1 /vcl/source | |
parent | 2f60a1bdabac11e985dbcc6265dd8b97ef1ca6fd (diff) |
convert RID_SVXTBX_UNDO_REDO_CTRL floating window to .ui
Change-Id: I88a5e0aec20170dfb71bf28cb35e860773657937
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/builder.cxx | 36 | ||||
-rw-r--r-- | vcl/source/window/dialog.cxx | 7 | ||||
-rw-r--r-- | vcl/source/window/floatwin.cxx | 7 | ||||
-rw-r--r-- | vcl/source/window/syswin.cxx | 2 |
4 files changed, 26 insertions, 26 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index ed310f0b8337..8db06521a5c2 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -930,6 +930,26 @@ namespace return eUnit; } + + WinBits extractDeferredBits(VclBuilder::stringmap &rMap) + { + WinBits nBits = WB_3DLOOK|WB_HIDE; + if (extractResizable(rMap)) + nBits |= WB_SIZEABLE; + if (extractCloseable(rMap)) + nBits |= WB_CLOSEABLE; + OString sBorder = VclBuilder::extractCustomProperty(rMap); + if (!sBorder.isEmpty()) + nBits |= WB_BORDER; + OString sType(extractTypeHint(rMap)); + if (sType == "utility") + nBits |= WB_SYSTEMWINDOW | WB_DIALOGCONTROL | WB_MOVEABLE; + else if (sType == "popup-menu") + nBits |= WB_SYSTEMWINDOW | WB_DIALOGCONTROL | WB_POPUP; + else + nBits |= WB_MOVEABLE; + return nBits; + } } FieldUnit VclBuilder::detectUnit(OString const& rString) @@ -1597,18 +1617,8 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri } else if (name == "GtkWindow") { - WinBits nBits = WB_SYSTEMWINDOW|WB_MOVEABLE|WB_3DLOOK|WB_CLOSEABLE|WB_HIDE; - if (extractResizable(rMap)) - nBits |= WB_SIZEABLE; - OString sType(extractTypeHint(rMap)); - if (sType == "utility") - { - pWindow = new FloatingWindow(pParent, nBits); - } - else - { - SAL_WARN("vcl.layout", "no mapping yet for GtkWindow of type " << sType.getStr() << " yet"); - } + WinBits nBits = extractDeferredBits(rMap); + pWindow = new FloatingWindow(pParent, nBits|WB_MOVEABLE); } else { @@ -1706,7 +1716,7 @@ Window *VclBuilder::insertObject(Window *pParent, const OString &rClass, if (pParent->IsSystemWindow()) { SystemWindow *pSysWin = static_cast<SystemWindow*>(pCurrentChild); - pSysWin->doDeferredInit(extractResizable(rProps), extractCloseable(rProps)); + pSysWin->doDeferredInit(extractDeferredBits(rProps)); m_bToplevelHasDeferredInit = false; } diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 5f04074d1293..ff6ab0c1b8c3 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -477,13 +477,8 @@ 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, bool bCloseable) +void Dialog::doDeferredInit(WinBits nBits) { - 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 caedcbcaaef3..05b806f7d120 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -171,13 +171,8 @@ FloatingWindow::FloatingWindow(Window* pParent, const OString& rID, const OUStri } //Find the real parent stashed in mpDialogParent. -void FloatingWindow::doDeferredInit(bool bResizable, bool bCloseable) +void FloatingWindow::doDeferredInit(WinBits nBits) { - 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 c2746348f68b..6a21d22bc4bf 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -1101,7 +1101,7 @@ void SystemWindow::DoInitialLayout() } } -void SystemWindow::doDeferredInit(bool /*bResizable*/, bool /*bCloseable*/) +void SystemWindow::doDeferredInit(WinBits /*nBits*/) { SAL_WARN("vcl.layout", "SystemWindow in layout without doDeferredInit impl"); } |