diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2015-11-20 10:36:03 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2015-11-20 11:14:24 +0000 |
commit | 009face61bb5c7a8e19345ce5531075b7599dd79 (patch) | |
tree | 609d543450bbde83b59cf2a2f56bb257a907afad /vcl/source/window/brdwin.cxx | |
parent | 216879f1edced1b696bf27d40989280a363b69c4 (diff) |
Revert "vcl: Initial NotebookBar implementation."
Will use a different approach for NotebookBar.
Also this should not be in 5.1.
This reverts commit 8c1014021dbe9da2e18233d215b970f5359db67b.
Change-Id: Ic699723818a890bf4c3be3a2c045527148bd118b
Reviewed-on: https://gerrit.libreoffice.org/20075
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'vcl/source/window/brdwin.cxx')
-rw-r--r-- | vcl/source/window/brdwin.cxx | 51 |
1 files changed, 14 insertions, 37 deletions
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index eb839d2298c8..52b0b139dc12 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -36,8 +36,6 @@ #include <vcl/metric.hxx> #include <vcl/settings.hxx> -#include "notebookbarwindow.hxx" - using namespace ::com::sun::star::uno; // useful caption height for title bar buttons @@ -1834,7 +1832,6 @@ void ImplBorderWindow::dispose() delete mpBorderView; mpBorderView = nullptr; mpMenuBarWindow.clear(); - mpNotebookBarWindow.disposeAndClear(); vcl::Window::dispose(); } @@ -1915,14 +1912,12 @@ void ImplBorderWindow::Resize() { vcl::Window* pClientWindow = ImplGetClientWindow(); - sal_Int32 nLeftBorder; - sal_Int32 nTopBorder; - sal_Int32 nRightBorder; - sal_Int32 nBottomBorder; - mpBorderView->GetBorder( nLeftBorder, nTopBorder, nRightBorder, nBottomBorder ); - - if (mpMenuBarWindow) + if ( mpMenuBarWindow ) { + sal_Int32 nLeftBorder; + sal_Int32 nTopBorder; + sal_Int32 nRightBorder; + sal_Int32 nBottomBorder; long nMenuHeight = mpMenuBarWindow->GetSizePixel().Height(); if ( mbMenuHide ) { @@ -1935,20 +1930,13 @@ void ImplBorderWindow::Resize() if ( !nMenuHeight ) nMenuHeight = mnOrgMenuHeight; } - mpMenuBarWindow->setPosSizePixel( - nLeftBorder, nTopBorder, - aSize.Width()-nLeftBorder-nRightBorder, nMenuHeight); - - // shift the notebookbar down accordingly - nTopBorder += nMenuHeight; - } - - if (mpNotebookBarWindow) - { - long nNotebookBarHeight = mpNotebookBarWindow->GetSizePixel().Height(); - mpNotebookBarWindow->setPosSizePixel( - nLeftBorder, nTopBorder, - aSize.Width() - nLeftBorder - nRightBorder, nNotebookBarHeight); + mpBorderView->GetBorder( nLeftBorder, nTopBorder, nRightBorder, nBottomBorder ); + mpMenuBarWindow->setPosSizePixel( nLeftBorder, + nTopBorder, + aSize.Width()-nLeftBorder-nRightBorder, + nMenuHeight, + PosSizeFlags::Pos | + PosSizeFlags::Width | PosSizeFlags::Height ); } GetBorder( pClientWindow->mpWindowImpl->mnLeftBorder, pClientWindow->mpWindowImpl->mnTopBorder, @@ -2175,23 +2163,12 @@ void ImplBorderWindow::SetMenuBarMode( bool bHide ) UpdateMenuHeight(); } -void ImplBorderWindow::SetNotebookBarWindow(const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame>& rFrame) -{ - mpNotebookBarWindow = VclPtr<NotebookBarWindow>::Create(this, "NotebookBar", rUIXMLDescription, rFrame); - Resize(); - mpNotebookBarWindow->Show(); -} - void ImplBorderWindow::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const { - mpBorderView->GetBorder(rLeftBorder, rTopBorder, rRightBorder, rBottomBorder); - - if (mpMenuBarWindow && !mbMenuHide) + mpBorderView->GetBorder( rLeftBorder, rTopBorder, rRightBorder, rBottomBorder ); + if ( mpMenuBarWindow && !mbMenuHide ) rTopBorder += mpMenuBarWindow->GetSizePixel().Height(); - - if (mpNotebookBarWindow) - rTopBorder += mpNotebookBarWindow->GetSizePixel().Height(); } long ImplBorderWindow::CalcTitleWidth() const |