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