summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-24 14:42:46 +0000
committerEike Rathke <erack@redhat.com>2017-01-27 17:40:59 +0000
commit0cfda5204184fa937a948b3d273ac1083896bcc7 (patch)
tree46d7f82b68e7ca32f8bf2d3bc1aab60107853c29 /sw
parent739353bcb420c18df6116cd645cc2226782e13cc (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 'sw')
-rw-r--r--sw/source/uibase/inc/navipi.hxx4
-rw-r--r--sw/source/uibase/sidebar/SwPanelFactory.cxx2
-rw-r--r--sw/source/uibase/utlui/navipi.cxx16
3 files changed, 9 insertions, 13 deletions
diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx
index 503c1d7da878..c7417dd582e5 100644
--- a/sw/source/uibase/inc/navipi.hxx
+++ b/sw/source/uibase/inc/navipi.hxx
@@ -85,8 +85,6 @@ class SwNavigationPI : public PanelLayout,
VclPtr<SfxPopupWindow> m_pPopupWindow;
VclPtr<SfxPopupWindow> m_pFloatingWindow;
- SfxChildWindowContext* m_pContextWin;
-
SwNavigationConfig *m_pConfig;
SfxBindings &m_rBindings;
@@ -135,7 +133,7 @@ protected:
public:
- SwNavigationPI(SfxBindings*, SfxChildWindowContext*, vcl::Window*);
+ SwNavigationPI(SfxBindings*, vcl::Window*);
virtual ~SwNavigationPI() override;
virtual void dispose() override;
diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx b/sw/source/uibase/sidebar/SwPanelFactory.cxx
index d1d85d1d5f22..426b91ee8260 100644
--- a/sw/source/uibase/sidebar/SwPanelFactory.cxx
+++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx
@@ -170,7 +170,7 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement (
}
else if (rsResourceURL.endsWith("/NavigatorPanel"))
{
- VclPtrInstance<SwNavigationPI> pPanel(pBindings, nullptr, pParentWindow);
+ VclPtrInstance<SwNavigationPI> pPanel(pBindings, pParentWindow);
xElement = sfx2::sidebar::SidebarPanelBase::Create(
rsResourceURL,
xFrame,
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 18aaeb73ac72..6204b0e098a9 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -245,7 +245,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox, void )
}
else if (sCommand == "listbox")
{
- if (m_pContextWin && m_pContextWin->GetFloatingWindow())
+ if (SfxChildWindowContext::GetFloatingWindow(GetParent()))
{
if (IsZoomedIn())
{
@@ -584,7 +584,6 @@ void SwNavigationPI::ZoomIn()
}
SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings,
- SfxChildWindowContext* pCw,
vcl::Window* pParent)
: PanelLayout(pParent, "NavigatorPanel", "modules/swriter/ui/navigatorpanel.ui", nullptr)
, SfxControllerItem(SID_DOCFULLNAME, *_pBindings)
@@ -595,7 +594,6 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings,
, m_pCreateView(nullptr)
, m_pPopupWindow(nullptr)
, m_pFloatingWindow(nullptr)
- , m_pContextWin(pCw)
, m_pConfig(SW_MOD()->GetNavigationConfig())
, m_rBindings(*_pBindings)
, m_nAutoMarkIdx(1)
@@ -734,12 +732,12 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings,
m_aGlobalTree->SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_GLOBAL));
m_aDocListBox->SetAccessibleName(m_aStatusArr[3]);
- if (m_pContextWin == nullptr)
+ if (!SfxChildWindowContext::GetFloatingWindow(GetParent()))
{
- // When the context window is missing then the navigator is
- // displayed in the sidebar. While the navigator could change
- // its size, the sidebar can not, and the navigator would just
- // waste space. Therefore hide this button.
+ // 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")));
}
@@ -1206,7 +1204,7 @@ SwNavigationChild::SwNavigationChild( vcl::Window* pParent,
SfxChildWinInfo* )
: SfxChildWindowContext( nId )
{
- VclPtr<SwNavigationPI> pNavi = VclPtr<SwNavigationPI>::Create( _pBindings, this, pParent );
+ VclPtr<SwNavigationPI> pNavi = VclPtr<SwNavigationPI>::Create(_pBindings, pParent);
_pBindings->Invalidate(SID_NAVIGATOR);
SwNavigationConfig* pNaviConfig = SW_MOD()->GetNavigationConfig();