Kaydet (Commit) 5b248f13 authored tarafından Noel Grandin's avatar Noel Grandin

convert MENUBAR_MODE constants to scoped enum

Change-Id: Ie4cda46d02e82cca1710603cfb3af379c702d9d7
üst d9ba1914
......@@ -115,8 +115,10 @@ public:
// - SystemWindow-Types -
#define MENUBAR_MODE_NORMAL ((sal_uInt16)0)
#define MENUBAR_MODE_HIDE ((sal_uInt16)1)
enum class MenuBarMode
{
Normal, Hide
};
#define TITLE_BUTTON_DOCKING ((sal_uInt16)1)
#define TITLE_BUTTON_HIDE ((sal_uInt16)2)
......@@ -143,7 +145,7 @@ private:
bool mbSysChild;
bool mbIsCalculatingInitialLayoutSize;
bool mbInitialLayoutDone;
sal_uInt16 mnMenuBarMode;
MenuBarMode mnMenuBarMode;
sal_uInt16 mnIcon;
ImplData* mpImplData;
Idle maLayoutIdle;
......@@ -222,8 +224,8 @@ public:
void SetMenuBar(MenuBar* pMenuBar, const css::uno::Reference<css::frame::XFrame>& rFrame = css::uno::Reference<css::frame::XFrame>());
MenuBar* GetMenuBar() const { return mpMenuBar; }
void SetMenuBarMode( sal_uInt16 nMode );
sal_uInt16 GetMenuBarMode() const { return mnMenuBarMode; }
void SetMenuBarMode( MenuBarMode nMode );
MenuBarMode GetMenuBarMode() const { return mnMenuBarMode; }
TaskPaneList* GetTaskPaneList();
void GetWindowStateData( WindowStateData& rData ) const;
......
......@@ -63,7 +63,7 @@ FullScreenPane::FullScreenPane (
// Create a new top-leve window that is displayed full screen.
mpWorkWindow->ShowFullScreenMode(true, nScreenNumber);
// For debugging (non-fullscreen) use mpWorkWindow->SetScreenNumber(nScreenNumber);
mpWorkWindow->SetMenuBarMode(MENUBAR_MODE_HIDE);
mpWorkWindow->SetMenuBarMode(MenuBarMode::Hide);
mpWorkWindow->SetBorderStyle(WindowBorderStyle::REMOVEBORDER);
mpWorkWindow->SetBackground(Wallpaper());
// Don't show the window right now in order to allow the setting of an
......
......@@ -410,7 +410,7 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f
if (pParent && pParent->IsFullScreenMode())
{
pParent->ShowFullScreenMode(false);
pParent->SetMenuBarMode(MENUBAR_MODE_NORMAL);
pParent->SetMenuBarMode(MenuBarMode::Normal);
}
// create the menu bar for the backing component
......
......@@ -2913,7 +2913,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
}
}
pWork->ShowFullScreenMode( bNewFullScreenMode );
pWork->SetMenuBarMode( bNewFullScreenMode ? MENUBAR_MODE_HIDE : MENUBAR_MODE_NORMAL );
pWork->SetMenuBarMode( bNewFullScreenMode ? MenuBarMode::Hide : MenuBarMode::Normal );
GetFrame().GetWorkWindow_Impl()->SetFullScreen_Impl( bNewFullScreenMode );
if ( !pItem )
rReq.AppendItem( SfxBoolItem( SID_WIN_FULLSCREEN, bNewFullScreenMode ) );
......
......@@ -80,7 +80,7 @@ void SystemWindow::Init()
mbSysChild = false;
mbIsCalculatingInitialLayoutSize = false;
mbInitialLayoutDone = false;
mnMenuBarMode = MENUBAR_MODE_NORMAL;
mnMenuBarMode = MenuBarMode::Normal;
mnIcon = 0;
mpDialogParent = NULL;
......@@ -955,14 +955,14 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar, const css::uno::Reference<css::
}
}
void SystemWindow::SetMenuBarMode( sal_uInt16 nMode )
void SystemWindow::SetMenuBarMode( MenuBarMode nMode )
{
if ( mnMenuBarMode != nMode )
{
mnMenuBarMode = nMode;
if ( mpWindowImpl->mpBorderWindow && (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) )
{
if ( nMode == MENUBAR_MODE_HIDE )
if ( nMode == MenuBarMode::Hide )
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetMenuBarMode( true );
else
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetMenuBarMode( false );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment