diff options
Diffstat (limited to 'sw/source/uibase/utlui')
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 22 | ||||
-rw-r--r-- | sw/source/uibase/utlui/navicfg.cxx | 16 | ||||
-rw-r--r-- | sw/source/uibase/utlui/navipi.cxx | 3 |
3 files changed, 38 insertions, 3 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index da92775a4ba0..e26179b42348 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -4174,11 +4174,13 @@ void SwContentTree::ExecuteContextMenuAction(const OString& rSelectedPopupEntry) if (rSelectedPopupEntry == "tabletracking") { m_bTableTracking = !m_bTableTracking; + SetTableTracking(m_bTableTracking); return; } if (rSelectedPopupEntry == "sectiontracking") { m_bSectionTracking = !m_bSectionTracking; + SetSectionTracking(m_bSectionTracking); return; } @@ -4239,7 +4241,7 @@ void SwContentTree::ExecuteContextMenuAction(const OString& rSelectedPopupEntry) case 13: nSelectedPopupEntry -= 10; if(m_nOutlineTracking != nSelectedPopupEntry) - m_nOutlineTracking = nSelectedPopupEntry; + SetOutlineTracking(static_cast<sal_uInt8>(nSelectedPopupEntry)); break; //Outlinelevel case 101: @@ -4438,6 +4440,24 @@ void SwContentTree::SetOutlineLevel(sal_uInt8 nSet) Display(State::ACTIVE == m_eState); } +void SwContentTree::SetOutlineTracking(sal_uInt8 nSet) +{ + m_nOutlineTracking = nSet; + m_pConfig->SetOutlineTracking(m_nOutlineTracking); +} + +void SwContentTree::SetTableTracking(bool bSet) +{ + m_bTableTracking = bSet; + m_pConfig->SetTableTracking(m_bTableTracking); +} + +void SwContentTree::SetSectionTracking(bool bSet) +{ + m_bSectionTracking = bSet; + m_pConfig->SetSectionTracking(m_bSectionTracking); +} + // Mode Change: Show dropped Doc void SwContentTree::ShowHiddenShell() { diff --git a/sw/source/uibase/utlui/navicfg.cxx b/sw/source/uibase/utlui/navicfg.cxx index 386c3451bf3e..7d72438fd937 100644 --- a/sw/source/uibase/utlui/navicfg.cxx +++ b/sw/source/uibase/utlui/navicfg.cxx @@ -37,7 +37,10 @@ Sequence<OUString> SwNavigationConfig::GetPropertyNames() OUString("InsertMode"), OUString("ActiveBlock"), OUString("ShowListBox"), - OUString("GlobalDocMode")}; + OUString("GlobalDocMode"), + OUString("OutlineTracking"), + OUString("TableTracking"), + OUString("SectionTracking")}; } SwNavigationConfig::SwNavigationConfig() : @@ -48,7 +51,10 @@ SwNavigationConfig::SwNavigationConfig() : m_nRegionMode(RegionMode::NONE), m_nActiveBlock(0), m_bIsSmall(false), - m_bIsGlobalActive(true) + m_bIsGlobalActive(true), + m_nOutlineTracking(1), + m_bIsTableTracking(true), + m_bIsSectionTracking(true) { Sequence<OUString> aNames = GetPropertyNames(); Sequence<Any> aValues = GetProperties(aNames); @@ -92,6 +98,9 @@ SwNavigationConfig::SwNavigationConfig() : case 4: pValues[nProp] >>= m_nActiveBlock; break; case 5: m_bIsSmall = *o3tl::doAccess<bool>(pValues[nProp]); break; case 6: m_bIsGlobalActive = *o3tl::doAccess<bool>(pValues[nProp]); break; + case 7: pValues[nProp] >>= m_nOutlineTracking; break; + case 8: m_bIsTableTracking = *o3tl::doAccess<bool>(pValues[nProp]); break; + case 9: m_bIsSectionTracking = *o3tl::doAccess<bool>(pValues[nProp]); break; } } } @@ -118,6 +127,9 @@ void SwNavigationConfig::ImplCommit() case 4: pValues[nProp] <<= m_nActiveBlock; break; case 5: pValues[nProp] <<= m_bIsSmall; break; case 6: pValues[nProp] <<= m_bIsGlobalActive; break; + case 7: pValues[nProp] <<= m_nOutlineTracking; break; + case 8: pValues[nProp] <<= m_bIsTableTracking; break; + case 9: pValues[nProp] <<= m_bIsSectionTracking; break; } } PutProperties(aNames, aValues); diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 7510e7bb65d8..8b68ca4d4980 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -569,6 +569,9 @@ SwNavigationPI::SwNavigationPI(weld::Widget* pParent, bool bFloatingNavigator = ParentIsFloatingWindow(m_xNavigatorDlg); + m_xContentTree->SetOutlineTracking(static_cast<sal_uInt8>(m_pConfig->GetOutlineTracking())); + m_xContentTree->SetTableTracking(m_pConfig->IsTableTracking()); + m_xContentTree->SetSectionTracking(m_pConfig->IsSectionTracking()); m_xContentTree->set_selection_mode(SelectionMode::Single); m_xContentTree->ShowTree(); m_xContent6ToolBox->set_item_active("listbox", true); |