From fc71991510df6ac6d9de278689f2def1a5af775e Mon Sep 17 00:00:00 2001 From: Jim Raykowski Date: Tue, 26 Oct 2021 23:55:47 -0800 Subject: tdf#131755 SwNavigator: Fix drag mode configuration restore Seems extraction from the Any here needs to be to a long even though an unsigned short is inserted. Change-Id: I3439d4282c99d2b83d4e9e146e241db0dd41a452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124258 Tested-by: Jenkins Reviewed-by: Jim Raykowski --- sw/source/uibase/utlui/navicfg.cxx | 2 +- sw/source/uibase/utlui/navipi.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source') diff --git a/sw/source/uibase/utlui/navicfg.cxx b/sw/source/uibase/utlui/navicfg.cxx index 73597f01df74..d941f5fe3e4d 100644 --- a/sw/source/uibase/utlui/navicfg.cxx +++ b/sw/source/uibase/utlui/navicfg.cxx @@ -112,7 +112,7 @@ SwNavigationConfig::SwNavigationConfig() : case 2: pValues[nProp] >>= m_nOutlineLevel; break; case 3: { - sal_uInt16 nTmp; + sal_Int32 nTmp; if (pValues[nProp] >>= nTmp) m_nRegionMode = static_cast(nTmp); break; diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index b414aaffa95f..1652aa2e81a7 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -569,6 +569,8 @@ SwNavigationPI::SwNavigationPI(weld::Widget* pParent, bool bFloatingNavigator = ParentIsFloatingWindow(m_xNavigatorDlg); + SetRegionDropMode(m_pConfig->GetRegionMode()); + m_xContentTree->SetOutlineLevel(static_cast(m_pConfig->GetOutlineLevel())); m_xContentTree->SetOutlineTracking(static_cast(m_pConfig->GetOutlineTracking())); @@ -1145,8 +1147,6 @@ SwNavigatorWin::SwNavigatorWin(SfxBindings* _pBindings, SfxChildWindow* _pMgr, } } - m_xNavi->SetRegionDropMode( pNaviConfig->GetRegionMode() ); - SetMinOutputSizePixel(GetOptimalSize()); if (pNaviConfig->IsSmall()) m_xNavi->ZoomIn(); -- cgit