summaryrefslogtreecommitdiffstats
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-09-02 22:42:30 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-09-03 15:58:26 +0100
commit77ce41f2571c3158f00e2b632ce006059282c462 (patch)
tree8fec039e7eaca527e45c2cd050208e81b70157c1 /vcl
parentforget about the Left/Top/Right/Bottom frame distance (diff)
downloadcore-77ce41f2571c3158f00e2b632ce006059282c462.tar.gz
core-77ce41f2571c3158f00e2b632ce006059282c462.zip
convert RID_SVXTBX_UNDO_REDO_CTRL floating window to .ui
Change-Id: I88a5e0aec20170dfb71bf28cb35e860773657937
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/builder.cxx36
-rw-r--r--vcl/source/window/dialog.cxx7
-rw-r--r--vcl/source/window/floatwin.cxx7
-rw-r--r--vcl/source/window/syswin.cxx2
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");
}