diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-24 14:42:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-24 15:12:32 +0000 |
commit | b37ac48935621fcc7b71f81a8b892f24e85e5b6f (patch) | |
tree | c3dbf80c169bbe9bdbc133e63a2a35b055f12e7c /sc | |
parent | 25a10ae68effd9b80b0023a86e8f8c6e74697be6 (diff) |
Resolves: tdf#105450 calc navigator gets 0 height on toggle off/on when docked
Change-Id: Icd346cdf0a208ccaeddd77e6803f4f906361324c
Diffstat (limited to 'sc')
-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 68fdba9be8fb..128b146b4a3e 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 efcd4070f109..45a24ec6438a 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -422,7 +422,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); @@ -433,13 +433,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) @@ -530,11 +529,11 @@ ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, bool bSidebar, vcl::Window* pPar aContentIdle.SetInvokeHandler( LINK( this, ScNavigatorDlg, TimeHdl ) ); aContentIdle.SetPriority( TaskPriority::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); @@ -839,7 +838,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")) |