summaryrefslogtreecommitdiff
path: root/sw/source/uibase/utlui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-24 15:06:34 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-24 15:12:32 +0000
commite3bd10f8d5c7750dd0a700f738f4713519cde118 (patch)
treed0b8d06d5bd79b5b8d5bf3609ba3a916c45ce59b /sw/source/uibase/utlui
parentb37ac48935621fcc7b71f81a8b892f24e85e5b6f (diff)
adjust the hide of the zoom so its dynamic on docking/undocking navigators
Change-Id: I525d0abf5618ffc2f614857a29e530f7140c0de7
Diffstat (limited to 'sw/source/uibase/utlui')
-rw-r--r--sw/source/uibase/utlui/navipi.cxx22
1 files changed, 13 insertions, 9 deletions
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 9fc3a696abc1..3168e01f2a9c 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -728,15 +728,6 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings,
m_aGlobalTree->SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_GLOBAL));
m_aDocListBox->SetAccessibleName(m_aStatusArr[3]);
- if (!SfxChildWindowContext::GetFloatingWindow(GetParent()))
- {
- // if the parent isn't a float, then then the navigator is displayed in
- // the sidebar or is otherwise docked. While the navigator could change
- // its size, the sidebar can not, and the navigator would just waste
- // space. Therefore hide this button.
- m_aContentToolBox->RemoveItem(m_aContentToolBox->GetItemPos(m_aContentToolBox->GetItemId("listbox")));
- }
-
m_aExpandedSize = GetOptimalSize();
}
@@ -849,6 +840,19 @@ void SwNavigationPI::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
}
}
+void SwNavigationPI::StateChanged(StateChangedType nStateChange)
+{
+ PanelLayout::StateChanged(nStateChange);
+ if (nStateChange == StateChangedType::InitShow)
+ {
+ // if the parent isn't a float, then then the navigator is displayed in
+ // the sidebar or is otherwise docked. While the navigator could change
+ // its size, the sidebar can not, and the navigator would just waste
+ // space. Therefore hide this button.
+ m_aContentToolBox->ShowItem(m_aContentToolBox->GetItemId("listbox"), SfxChildWindowContext::GetFloatingWindow(GetParent()));
+ }
+}
+
// Get the numeric field from the toolbox.
NumEditAction& SwNavigationPI::GetPageEdit()