summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-13 19:08:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-14 10:44:08 +0000
commit8c00536d87010b14a95e9c81f2f5f1d683e5fa70 (patch)
tree92ac779cef9c4f5adb1421f8eee51a301dc8ef61 /sfx2
parent5815ca4ef1126140e08f3a1d106bcadc41044505 (diff)
Convert WindowType to scoped enum
Change-Id: I85cfe02f28729e13f2c0dd3d91cd89e6f3e3b6a9 Reviewed-on: https://gerrit.libreoffice.org/34219 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/childwin.cxx4
-rw-r--r--sfx2/source/appl/workwin.cxx8
-rw-r--r--sfx2/source/notebookbar/ContextVBox.cxx2
-rw-r--r--sfx2/source/notebookbar/PriorityHBox.cxx2
-rw-r--r--sfx2/source/sidebar/ControllerFactory.cxx2
5 files changed, 9 insertions, 9 deletions
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 84cfd12d1703..9116876d02fc 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -520,11 +520,11 @@ SfxChildWindowContext::~SfxChildWindowContext()
FloatingWindow* SfxChildWindowContext::GetFloatingWindow(vcl::Window *pParent)
{
- if (pParent->GetType() == WINDOW_DOCKINGWINDOW || pParent->GetType() == WINDOW_TOOLBOX)
+ if (pParent->GetType() == WindowType::DOCKINGWINDOW || pParent->GetType() == WindowType::TOOLBOX)
{
return static_cast<DockingWindow*>(pParent)->GetFloatingWindow();
}
- if (pParent->GetType() == WINDOW_FLOATINGWINDOW)
+ if (pParent->GetType() == WindowType::FLOATINGWINDOW)
{
return static_cast<FloatingWindow*>(pParent);
}
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 10e3366b3dc3..f0cdfc4915e0 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -747,7 +747,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
case SfxChildAlignment::TOOLBOXTOP:
case SfxChildAlignment::LOWESTTOP:
aSize.Width() = aTmp.GetWidth();
- if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
+ if ( pCli->pWin->GetType() == WindowType::SPLITWINDOW )
aSize = static_cast<SplitWindow *>(pCli->pWin.get())->CalcLayoutSizePixel( aSize );
bAllowHiding = false;
aBorder.Top() += aSize.Height();
@@ -762,7 +762,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
case SfxChildAlignment::TOOLBOXBOTTOM:
case SfxChildAlignment::HIGHESTBOTTOM:
aSize.Width() = aTmp.GetWidth();
- if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
+ if ( pCli->pWin->GetType() == WindowType::SPLITWINDOW )
aSize = static_cast<SplitWindow *>(pCli->pWin.get())->CalcLayoutSizePixel( aSize );
aBorder.Bottom() += aSize.Height();
aPos = aTmp.BottomLeft();
@@ -777,7 +777,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
case SfxChildAlignment::LASTLEFT:
case SfxChildAlignment::TOOLBOXLEFT:
aSize.Height() = aTmp.GetHeight();
- if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
+ if ( pCli->pWin->GetType() == WindowType::SPLITWINDOW )
aSize = static_cast<SplitWindow *>(pCli->pWin.get())->CalcLayoutSizePixel( aSize );
bAllowHiding = false;
aBorder.Left() += aSize.Width();
@@ -792,7 +792,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
case SfxChildAlignment::LASTRIGHT:
case SfxChildAlignment::TOOLBOXRIGHT:
aSize.Height() = aTmp.GetHeight();
- if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
+ if ( pCli->pWin->GetType() == WindowType::SPLITWINDOW )
aSize = static_cast<SplitWindow *>(pCli->pWin.get())->CalcLayoutSizePixel( aSize );
aBorder.Right() += aSize.Width();
aPos = aTmp.TopRight();
diff --git a/sfx2/source/notebookbar/ContextVBox.cxx b/sfx2/source/notebookbar/ContextVBox.cxx
index 8723cc458c2e..8b59cfaf5dce 100644
--- a/sfx2/source/notebookbar/ContextVBox.cxx
+++ b/sfx2/source/notebookbar/ContextVBox.cxx
@@ -46,7 +46,7 @@ public:
{
for (int nChild = 0; nChild < GetChildCount(); ++nChild)
{
- if ( GetChild( nChild )->GetType() == WINDOW_CONTAINER )
+ if ( GetChild( nChild )->GetType() == WindowType::CONTAINER )
{
VclContainer* pChild = static_cast<VclContainer*>( GetChild( nChild ) );
diff --git a/sfx2/source/notebookbar/PriorityHBox.cxx b/sfx2/source/notebookbar/PriorityHBox.cxx
index 13ff34fd983a..c1f60ac26374 100644
--- a/sfx2/source/notebookbar/PriorityHBox.cxx
+++ b/sfx2/source/notebookbar/PriorityHBox.cxx
@@ -126,7 +126,7 @@ public:
m_nNeededWidth += pChild->GetSizePixel().Width() + spacing;
// Add only containers which have explicitly assigned priority.
- IPrioritable* pPrioritable = pChild->GetType() == WINDOW_CONTAINER ?
+ IPrioritable* pPrioritable = pChild->GetType() == WindowType::CONTAINER ?
dynamic_cast<IPrioritable*>(pChild) : nullptr;
if (pPrioritable && pPrioritable->GetPriority() != VCL_PRIORITY_DEFAULT)
m_aSortedChilds.push_back(pPrioritable);
diff --git a/sfx2/source/sidebar/ControllerFactory.cxx b/sfx2/source/sidebar/ControllerFactory.cxx
index 45d26eb854a4..00484980174b 100644
--- a/sfx2/source/sidebar/ControllerFactory.cxx
+++ b/sfx2/source/sidebar/ControllerFactory.cxx
@@ -110,7 +110,7 @@ Reference<frame::XToolbarController> ControllerFactory::CreateToolBoxController(
if (pItemWindow != nullptr)
{
WindowType nType = pItemWindow->GetType();
- if (nType == WINDOW_LISTBOX || nType == WINDOW_MULTILISTBOX || nType == WINDOW_COMBOBOX)
+ if (nType == WindowType::LISTBOX || nType == WindowType::MULTILISTBOX || nType == WindowType::COMBOBOX)
pItemWindow->SetAccessibleName(pToolBox->GetItemText(nItemId));
if (nWidth > 0)
pItemWindow->SetSizePixel(Size(nWidth, pItemWindow->GetSizePixel().Height()));