diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-09 15:51:53 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-11 10:07:57 +0100 |
commit | 001cf630f14109b4200b218161418350562713fa (patch) | |
tree | 02d0fe2d6a56ac7a0b6d991f455aba90d5b5f780 /sfx2/source/dialog | |
parent | 5229cacba320f829ca0acd6ef79ddbb09d52b2d9 (diff) |
register navigator individually in each module that it exists in
instead of globally. This makes the navigators the same
as everything else and easier to deal with.
Change-Id: I882612e73d36485b84161a2d3fbc1188f734c0fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112244
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r-- | sfx2/source/dialog/navigat.cxx | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx index 0d52109d5c86..1487bcbcc8f3 100644 --- a/sfx2/source/dialog/navigat.cxx +++ b/sfx2/source/dialog/navigat.cxx @@ -24,20 +24,20 @@ #include <sfx2/sfxsids.hrc> #include <sfx2/strings.hrc> #include <sfx2/sfxresid.hxx> +#include <vcl/layout.hxx> #include <helpids.h> #include <tools/debug.hxx> -SFX_IMPL_DOCKINGWINDOW( SfxNavigatorWrapper , SID_NAVIGATOR ); - SfxNavigatorWrapper::SfxNavigatorWrapper( vcl::Window* pParentWnd , sal_uInt16 nId , - SfxBindings* pBindings , - SfxChildWinInfo* pInfo ) + SfxBindings* /*pBindings*/ , + SfxChildWinInfo* /*pInfo*/ ) : SfxChildWindow( pParentWnd , nId ) { - SetWindow( VclPtr<SfxNavigator>::Create( pBindings, this, pParentWnd, - WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK ) ); +} +void SfxNavigatorWrapper::Initialize(SfxChildWinInfo* pInfo) +{ GetWindow()->SetHelpId ( HID_NAVIGATOR_WINDOW ); GetWindow()->SetOutputSizePixel( Size( 270, 240 ) ); @@ -47,13 +47,11 @@ SfxNavigatorWrapper::SfxNavigatorWrapper( vcl::Window* pParentWnd , SfxNavigator::SfxNavigator( SfxBindings* pBind , SfxChildWindow* pChildWin , - vcl::Window* pParent , - WinBits nBits ) + vcl::Window* pParent ) : SfxDockingWindow( pBind , pChildWin , pParent , - nBits ) - , pWrapper( pChildWin ) + WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK ) { SetText(SfxResId(STR_SID_NAVIGATOR)); } @@ -61,14 +59,8 @@ SfxNavigator::SfxNavigator( SfxBindings* pBind , void SfxNavigator::Resize() { SfxDockingWindow::Resize(); - if ( pWrapper->GetContextWindow() ) - pWrapper->GetContextWindow()->SetSizePixel( GetOutputSizePixel() ); -} - -bool SfxNavigator::Close() -{ - DBG_ASSERT( GetChildWindow_Impl()->GetContext_Impl(), "No Context!" ); - return SfxDockingWindow::Close(); + if (vcl::Window *pChild = GetWindow(GetWindowType::FirstChild)) + VclContainer::setLayoutAllocation(*pChild, Point(0, 0), GetSizePixel()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |