diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-24 14:42:46 +0000 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-01-27 17:40:59 +0000 |
commit | 0cfda5204184fa937a948b3d273ac1083896bcc7 (patch) | |
tree | 46d7f82b68e7ca32f8bf2d3bc1aab60107853c29 /sc/source/ui | |
parent | 739353bcb420c18df6116cd645cc2226782e13cc (diff) |
Resolves: tdf#105450 calc navigator gets 0 height on toggle off/on when docked
Change-Id: Icd346cdf0a208ccaeddd77e6803f4f906361324c
(cherry picked from commit b37ac48935621fcc7b71f81a8b892f24e85e5b6f)
Reviewed-on: https://gerrit.libreoffice.org/33498
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/inc/navipi.hxx | 3 | ||||
-rw-r--r-- | sc/source/ui/navipi/navipi.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/sidebar/ScPanelFactory.cxx | 2 |
3 files changed, 10 insertions, 11 deletions
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx index ac588dd5f7cd..c0dd4c7fa04e 100644 --- a/sc/source/ui/inc/navipi.hxx +++ b/sc/source/ui/inc/navipi.hxx @@ -194,7 +194,6 @@ private: OUString aStrHidden; OUString aStrActiveWin; - bool bInSidebar; sal_uInt16 nZoomId; sal_uInt16 nChangeRootId; sal_uInt16 nDragModeId; @@ -257,7 +256,7 @@ private: static void ReleaseFocus(); public: - ScNavigatorDlg(SfxBindings* pB, bool bSidebar, vcl::Window* pParent); + ScNavigatorDlg(SfxBindings* pB, vcl::Window* pParent); virtual ~ScNavigatorDlg() override; virtual void dispose() override; diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 4c5df44d952e..fc963515a1e6 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -423,7 +423,7 @@ ScNavigatorDialogWrapper::ScNavigatorDialogWrapper(vcl::Window* pParent, SfxChildWinInfo* /* pInfo */) : SfxChildWindowContext(nId) { - pNavigator = VclPtr<ScNavigatorDlg>::Create(pBind, false, pParent); + pNavigator = VclPtr<ScNavigatorDlg>::Create(pBind, pParent); if (SfxNavigator* pNav = dynamic_cast<SfxNavigator*>(pParent)) pNav->SetMinOutputSizePixel(pNavigator->GetOptimalSize()); SetWindow(pNavigator); @@ -434,13 +434,12 @@ ScNavigatorDialogWrapper::ScNavigatorDialogWrapper(vcl::Window* pParent, #define REGISTER_SLOT(i,id) \ ppBoundItems[i]=new ScNavigatorControllerItem(id,*this,rBindings); -ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, bool bSidebar, vcl::Window* pParent) +ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, vcl::Window* pParent) : PanelLayout(pParent, "NavigatorPanel", "modules/scalc/ui/navigatorpanel.ui", nullptr) , rBindings(*pB) , aStrDragMode(ScResId(SCSTR_DRAGMODE)) , aStrDisplay(ScResId(SCSTR_DISPLAY)) , aStrActiveWin(ScResId(SCSTR_ACTIVEWIN)) - , bInSidebar(bSidebar) , pMarkArea(nullptr) , pViewData(nullptr ) , eListMode(NAV_LMODE_NONE) @@ -531,11 +530,11 @@ ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, bool bSidebar, vcl::Window* pPar aContentIdle.SetIdleHdl( LINK( this, ScNavigatorDlg, TimeHdl ) ); aContentIdle.SetPriority( SchedulerPriority::LOWEST ); - if (bInSidebar) + if (!SfxChildWindowContext::GetFloatingWindow(GetParent())) { - // When the navigator is displayed in the sidebar it has the whole deck - // to fill. Therefore hide the button that hides all controls below - // the top two rows of buttons. + // When the navigator is displayed in the sidebar, or is otherwise + // docked, it has the whole deck to fill. Therefore hide the button that + // hides all controls below the top two rows of buttons. aTbxCmd->RemoveItem(aTbxCmd->GetItemPos(nZoomId)); } aLbEntries->SetNavigatorDlgFlag(true); @@ -841,7 +840,8 @@ void ScNavigatorDlg::SetListMode(NavListMode eMode) { if (eMode != eListMode) { - bool bForceParentResize = (eMode == NAV_LMODE_NONE || eListMode == NAV_LMODE_NONE); + bool bForceParentResize = SfxChildWindowContext::GetFloatingWindow(GetParent()) && + (eMode == NAV_LMODE_NONE || eListMode == NAV_LMODE_NONE); SfxNavigator* pNav = bForceParentResize ? dynamic_cast<SfxNavigator*>(GetParent()) : nullptr; if (pNav && eMode == NAV_LMODE_NONE) //save last normal size on minimizing aExpandedSize = GetSizePixel(); diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx b/sc/source/ui/sidebar/ScPanelFactory.cxx index e7054009704f..95740e46731f 100644 --- a/sc/source/ui/sidebar/ScPanelFactory.cxx +++ b/sc/source/ui/sidebar/ScPanelFactory.cxx @@ -93,7 +93,7 @@ Reference<ui::XUIElement> SAL_CALL ScPanelFactory::createUIElement ( pPanel = NumberFormatPropertyPanel::Create( pParentWindow, xFrame, pBindings ); else if (rsResourceURL.endsWith("/NavigatorPanel")) { - pPanel = VclPtr<ScNavigatorDlg>::Create(pBindings, true, pParentWindow); + pPanel = VclPtr<ScNavigatorDlg>::Create(pBindings, pParentWindow); nMinimumSize = 0; } else if (rsResourceURL.endsWith("/FunctionsPanel")) |