avmedia/source/framework/mediaplayer.cxx | 5 - include/sfx2/childwin.hxx | 44 ++++++++-------- sc/source/ui/app/inputwin.cxx | 6 +- sc/source/ui/dialogs/searchresults.cxx | 2 sc/source/ui/formdlg/dwfunctr.cxx | 4 - sc/source/ui/inc/ChildWindowWrapper.hxx | 6 +- sc/source/ui/view/reffact.cxx | 65 +++++++++++++------------ sd/source/ui/dlg/AnimationChildWindow.cxx | 4 - sd/source/ui/dlg/PaneChildWindows.cxx | 11 +--- sfx2/source/dialog/dockwin.cxx | 7 +- sfx2/source/dialog/infobar.cxx | 8 +-- sfx2/source/dialog/navigat.cxx | 11 +--- sfx2/source/dialog/partwnd.cxx | 14 ++--- sfx2/source/dialog/recfloat.cxx | 5 - sfx2/source/dialog/taskpane.cxx | 14 ++--- sfx2/source/sidebar/SidebarChildWindow.cxx | 14 ++--- starmath/inc/view.hxx | 2 starmath/source/ElementsDockingWindow.cxx | 4 - starmath/source/view.cxx | 6 +- svx/source/dialog/SpellDialogChildWindow.cxx | 3 - svx/source/dialog/_bmpmask.cxx | 4 - svx/source/dialog/_contdlg.cxx | 4 - svx/source/dialog/fontwork.cxx | 4 - svx/source/dialog/hyperdlg.cxx | 6 -- svx/source/dialog/imapdlg.cxx | 6 -- svx/source/dialog/rubydialog.cxx | 4 - svx/source/dialog/srchdlg.cxx | 3 - svx/source/engine3d/float3d.cxx | 4 - svx/source/form/datanavi.cxx | 8 +-- svx/source/form/filtnav.cxx | 5 - svx/source/form/fmPropBrw.cxx | 5 - svx/source/form/fmexpl.cxx | 5 - svx/source/form/tabwin.cxx | 5 - svx/source/tbxctrls/SvxColorChildWindow.cxx | 4 - sw/source/uibase/dbui/mailmergechildwindow.cxx | 14 ++--- sw/source/uibase/dialog/wordcountwrapper.cxx | 4 - sw/source/uibase/envelp/syncbtn.cxx | 14 ++--- sw/source/uibase/fldui/fldwrap.cxx | 6 -- sw/source/uibase/inc/inputwin.hxx | 6 +- sw/source/uibase/index/idxmrk.cxx | 9 +-- sw/source/uibase/misc/redlndlg.cxx | 4 - sw/source/uibase/ribbar/inputwin.cxx | 6 +- 42 files changed, 166 insertions(+), 199 deletions(-)
New commits: commit 219b50a284a9fab6e5eb72efee54a72e15ac1bec Author: Noel Grandin <n...@peralex.com> Date: Mon Aug 24 13:39:29 2015 +0200 make pWindow private in SfxChildWindow Change-Id: I585d4e8f0a53f46b6fbcef9e4d26f88b57569684 diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx index 1298e8c..b9c4ad4 100644 --- a/avmedia/source/framework/mediaplayer.cxx +++ b/avmedia/source/framework/mediaplayer.cxx @@ -40,8 +40,8 @@ namespace avmedia MediaPlayer::MediaPlayer( vcl::Window* _pParent, sal_uInt16 nId, SfxBindings* _pBindings, SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ) { - pWindow.reset( VclPtr<MediaFloater>::Create( _pBindings, this, _pParent ) ); - static_cast< MediaFloater* >( pWindow.get() )->Initialize( pInfo ); + SetWindow( VclPtr<MediaFloater>::Create( _pBindings, this, _pParent ) ); + static_cast< MediaFloater* >( GetWindow() )->Initialize( pInfo ); }; diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index 3cc607e..00d8705 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -150,18 +150,16 @@ class SFX2_DLLPUBLIC SfxChildWindow { VclPtr<vcl::Window> pParent; // parent window ( Topwindow ) sal_uInt16 nType; // ChildWindow-Id - -protected: - VclPtr<vcl::Window> pWindow; // actual contents - -private: - SfxChildAlignment eChildAlignment; // Current ::com::sun::star::drawing::Alignment - SfxChildWindow_Impl* pImp; // Implementation data - SfxChildWindowContext* pContext; // With context-sensitive ChildWindows: + VclPtr<vcl::Window> pWindow; // actual contents + SfxChildAlignment eChildAlignment; // Current ::com::sun::star::drawing::Alignment + SfxChildWindow_Impl* pImp; // Implementation data + SfxChildWindowContext* pContext; // With context-sensitive ChildWindows: // Annother window in pWindow SAL_DLLPRIVATE void ClearWorkwin(); protected: + void SetWindow(const VclPtr<vcl::Window>& p) { pWindow = p; } + SfxChildWindow(vcl::Window *pParentWindow, sal_uInt16 nId); public: diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 1068899..2d50b0b 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -123,8 +123,8 @@ ScInputWindowWrapper::ScInputWindowWrapper( vcl::Window* pParentP, SfxChildWinInfo* /* pInfo */ ) : SfxChildWindow( pParentP, nId ) { - VclPtr<ScInputWindow> pWin=VclPtr<ScInputWindow>::Create( pParentP, pBindings ); - pWindow = pWin; + VclPtr<ScInputWindow> pWin = VclPtr<ScInputWindow>::Create( pParentP, pBindings ); + SetWindow( pWin ); pWin->Show(); diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx index 2d91c92..e1600f5 100644 --- a/sc/source/ui/dialogs/searchresults.cxx +++ b/sc/source/ui/dialogs/searchresults.cxx @@ -124,7 +124,7 @@ SearchResultsDlgWrapper::SearchResultsDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* /*pInfo*/ ) : SfxChildWindow(_pParent, nId) { - pWindow = VclPtr<SearchResultsDlg>::Create(pBindings, _pParent, nId); + SetWindow( VclPtr<SearchResultsDlg>::Create(pBindings, _pParent, nId) ); } SearchResultsDlgWrapper::~SearchResultsDlgWrapper() {} diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index 0afbcd4..0b4d497 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -65,7 +65,7 @@ ScFunctionChildWindow::ScFunctionChildWindow( vcl::Window* pParentP, { VclPtr<ScFunctionDockWin> pWin = VclPtr<ScFunctionDockWin>::Create( pBindings, this, pParentP, ScResId( FID_FUNCTION_BOX ) ); - pWindow = pWin; + SetWindow(pWin); SetAlignment(SfxChildAlignment::RIGHT); diff --git a/sc/source/ui/inc/ChildWindowWrapper.hxx b/sc/source/ui/inc/ChildWindowWrapper.hxx index 48938e9..aec24f9 100644 --- a/sc/source/ui/inc/ChildWindowWrapper.hxx +++ b/sc/source/ui/inc/ChildWindowWrapper.hxx @@ -32,11 +32,11 @@ public: OSL_ENSURE(pViewShell, "Missing view shell!"); if (pViewShell) - pWindow = pViewShell->CreateRefDialog( pBindings, this, pInfo, pParentP, WindowID ); + SetWindow( pViewShell->CreateRefDialog( pBindings, this, pInfo, pParentP, WindowID ) ); else - pWindow = NULL; + SetWindow( NULL ); - if (pViewShell && !pWindow) + if (pViewShell && !GetWindow()) pViewShell->GetViewFrame()->SetChildWindow( nId, false ); } diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx index 75c69b1..44712f0 100644 --- a/sc/source/ui/view/reffact.cxx +++ b/sc/source/ui/view/reffact.cxx @@ -90,9 +90,9 @@ namespace if (!pViewShell) \ pViewShell = PTR_CAST( ScTabViewShell, SfxViewShell::Current() ); \ OSL_ENSURE( pViewShell, "missing view shell :-(" ); \ - pWindow = pViewShell ? \ - pViewShell->CreateRefDialog( p, this, pInfo, pParentP, sid ) : nullptr; \ - if (pViewShell && !pWindow) \ + SetWindow( pViewShell ? \ + pViewShell->CreateRefDialog( p, this, pInfo, pParentP, sid ) : nullptr ); \ + if (pViewShell && !GetWindow()) \ pViewShell->GetViewFrame()->SetChildWindow( nId, false ); \ } @@ -158,12 +158,12 @@ ScSimpleRefDlgWrapper::ScSimpleRefDlgWrapper( vcl::Window* pParentP, pInfo->aSize.Height()=nScSimpleRefHeight; pInfo->aSize.Width()=nScSimpleRefWidth; } - pWindow = NULL; + SetWindow(NULL); if(bAutoReOpen && pViewShell) - pWindow = pViewShell->CreateRefDialog( p, this, pInfo, pParentP, WID_SIMPLE_REF); + SetWindow( pViewShell->CreateRefDialog( p, this, pInfo, pParentP, WID_SIMPLE_REF) ); - if (!pWindow) + if (!GetWindow()) { SC_MOD()->SetRefDialog( nId, false ); } @@ -188,42 +188,42 @@ void ScSimpleRefDlgWrapper::SetAutoReOpen(bool bFlag) void ScSimpleRefDlgWrapper::SetRefString(const OUString& rStr) { - if(pWindow!=nullptr) + if(GetWindow()) { - static_cast<ScSimpleRefDlg*>(pWindow.get())->SetRefString(rStr); + static_cast<ScSimpleRefDlg*>(GetWindow())->SetRefString(rStr); } } void ScSimpleRefDlgWrapper::SetCloseHdl( const Link<>& rLink ) { - if(pWindow!=nullptr) + if(GetWindow()) { - static_cast<ScSimpleRefDlg*>(pWindow.get())->SetCloseHdl( rLink ); + static_cast<ScSimpleRefDlg*>(GetWindow())->SetCloseHdl( rLink ); } } void ScSimpleRefDlgWrapper::SetUnoLinks( const Link<>& rDone, const Link<>& rAbort, const Link<>& rChange ) { - if(pWindow!=nullptr) + if(GetWindow()) { - static_cast<ScSimpleRefDlg*>(pWindow.get())->SetUnoLinks( rDone, rAbort, rChange ); + static_cast<ScSimpleRefDlg*>(GetWindow())->SetUnoLinks( rDone, rAbort, rChange ); } } void ScSimpleRefDlgWrapper::SetFlags( bool bCloseOnButtonUp, bool bSingleCell, bool bMultiSelection ) { - if(pWindow!=nullptr) + if(GetWindow()) { - static_cast<ScSimpleRefDlg*>(pWindow.get())->SetFlags( bCloseOnButtonUp, bSingleCell, bMultiSelection ); + static_cast<ScSimpleRefDlg*>(GetWindow())->SetFlags( bCloseOnButtonUp, bSingleCell, bMultiSelection ); } } void ScSimpleRefDlgWrapper::StartRefInput() { - if(pWindow!=nullptr) + if(GetWindow()) { - static_cast<ScSimpleRefDlg*>(pWindow.get())->StartRefInput(); + static_cast<ScSimpleRefDlg*>(GetWindow())->StartRefInput(); } } @@ -239,14 +239,13 @@ ScAcceptChgDlgWrapper::ScAcceptChgDlgWrapper( vcl::Window* pParentP, PTR_CAST( ScTabViewShell, SfxViewShell::Current() ); OSL_ENSURE( pViewShell, "missing view shell :-(" ); if (pViewShell) - pWindow = VclPtr<ScAcceptChgDlg>::Create( pBindings, this, pParentP, &pViewShell->GetViewData() ); - else - pWindow = NULL; - if(pWindow!=nullptr) { - static_cast<ScAcceptChgDlg*>(pWindow.get())->Initialize( pInfo ); + SetWindow( VclPtr<ScAcceptChgDlg>::Create( pBindings, this, pParentP, &pViewShell->GetViewData() ) ); + static_cast<ScAcceptChgDlg*>(GetWindow())->Initialize( pInfo ); } - if (pViewShell && !pWindow) + else + SetWindow( NULL ); + if (pViewShell && !GetWindow()) pViewShell->GetViewFrame()->SetChildWindow( nId, false ); } @@ -256,9 +255,9 @@ void ScAcceptChgDlgWrapper::ReInitDlg() PTR_CAST( ScTabViewShell, SfxViewShell::Current() ); OSL_ENSURE( pViewShell, "missing view shell :-(" ); - if(pWindow!=nullptr && pViewShell) + if(GetWindow() && pViewShell) { - static_cast<ScAcceptChgDlg*>(pWindow.get())->ReInit(&pViewShell->GetViewData()); + static_cast<ScAcceptChgDlg*>(GetWindow())->ReInit(&pViewShell->GetViewData()); } } @@ -290,24 +289,28 @@ ScValidityRefChildWin::ScValidityRefChildWin( vcl::Window* pParent m_pSavedWndParent( NULL ) { SetWantsFocus( false ); - ScTabViewShell* pViewShell = - nullptr != ( pWindow = ScValidationDlg::Find1AliveObject( pParentP ) ) ? static_cast<ScValidationDlg*>(pWindow.get())->GetTabViewShell() : - lcl_GetTabViewShell( p ); + VclPtr<ScValidationDlg> pDlg = ScValidationDlg::Find1AliveObject( pParentP ); + SetWindow(pDlg); + ScTabViewShell* pViewShell; + if (pDlg) + pViewShell = static_cast<ScValidationDlg*>(GetWindow())->GetTabViewShell(); + else + pViewShell = lcl_GetTabViewShell( p ); if (!pViewShell) pViewShell = PTR_CAST( ScTabViewShell, SfxViewShell::Current() ); OSL_ENSURE( pViewShell, "missing view shell :-(" ); - if (pViewShell && !pWindow) + if (pViewShell && !GetWindow()) pViewShell->GetViewFrame()->SetChildWindow( nId, false ); - if( pWindow ) m_pSavedWndParent = pWindow->GetParent(); + if( GetWindow() ) m_pSavedWndParent = GetWindow()->GetParent(); } ScValidityRefChildWin::~ScValidityRefChildWin() { - if( pWindow ) pWindow->SetParent( m_pSavedWndParent ); + if( GetWindow() ) GetWindow()->SetParent( m_pSavedWndParent ); if( m_bFreeWindowLock ) - pWindow = NULL; + SetWindow(nullptr); } IMPL_CHILD_CTOR( ScCondFormatDlgWrapper, WID_CONDFRMT_REF ) diff --git a/sd/source/ui/dlg/AnimationChildWindow.cxx b/sd/source/ui/dlg/AnimationChildWindow.cxx index 1fd3416..8a7b794 100644 --- a/sd/source/ui/dlg/AnimationChildWindow.cxx +++ b/sd/source/ui/dlg/AnimationChildWindow.cxx @@ -40,7 +40,7 @@ AnimationChildWindow::AnimationChildWindow( : SfxChildWindow( _pParent, nId ) { VclPtr<AnimationWindow> pAnimWin = VclPtr<AnimationWindow>::Create(pBindings, this, _pParent); - pWindow = pAnimWin; + SetWindow(pAnimWin); pAnimWin->Initialize( pInfo ); diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx index a52d00d..a8f6306 100644 --- a/sd/source/ui/dlg/PaneChildWindows.cxx +++ b/sd/source/ui/dlg/PaneChildWindows.cxx @@ -56,14 +56,13 @@ PaneChildWindow::PaneChildWindow ( SfxChildAlignment eAlignment) : SfxChildWindow (pParentWindow, nId) { - pWindow = VclPtr<PaneDockingWindow>::Create( - + SetWindow( VclPtr<PaneDockingWindow>::Create( pBindings, this, pParentWindow, - SD_RESSTR(nTitleBarResId)); + SD_RESSTR(nTitleBarResId))); SetAlignment(eAlignment); - static_cast<SfxDockingWindow*>(pWindow.get())->Initialize(pInfo); + static_cast<SfxDockingWindow*>(GetWindow())->Initialize(pInfo); SetHideNotDelete(true); ViewShellBase* pBase = ViewShellBase::GetViewShellBase(pBindings->GetDispatcher()->GetFrame()); @@ -76,7 +75,7 @@ PaneChildWindow::PaneChildWindow ( PaneChildWindow::~PaneChildWindow() { ViewShellBase* pBase = NULL; - PaneDockingWindow* pDockingWindow = dynamic_cast<PaneDockingWindow*>(pWindow.get()); + PaneDockingWindow* pDockingWindow = dynamic_cast<PaneDockingWindow*>(GetWindow()); if (pDockingWindow != NULL) pBase = ViewShellBase::GetViewShellBase( pDockingWindow->GetBindings().GetDispatcher()->GetFrame()); diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 9afb766..cd4e20e 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -131,7 +131,7 @@ SfxDockingWrapper::SfxDockingWrapper( vcl::Window* pParentWnd , VclPtr<SfxTitleDockingWindow> pTitleDockWindow = VclPtr<SfxTitleDockingWindow>::Create( pBindings, this, pParentWnd, WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE); - pWindow = pTitleDockWindow; + SetWindow( pTitleDockWindow ); // Use factory manager to retrieve XWindow factory. That can be used to instantiate // the real window factory. @@ -204,9 +204,9 @@ SfxDockingWrapper::SfxDockingWrapper( vcl::Window* pParentWnd , pContentWindow->SetStyle( pContentWindow->GetStyle() | WB_DIALOGCONTROL | WB_CHILDDLGCTRL ); pTitleDockWindow->SetWrappedWindow(pContentWindow); - pWindow->SetOutputSizePixel( Size( 270, 240 ) ); + GetWindow()->SetOutputSizePixel( Size( 270, 240 ) ); - static_cast<SfxDockingWindow*>( pWindow.get() )->Initialize( pInfo ); + static_cast<SfxDockingWindow*>( GetWindow() )->Initialize( pInfo ); SetHideNotDelete( true ); } diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx index 0dd8089..67208ba 100644 --- a/sfx2/source/dialog/infobar.cxx +++ b/sfx2/source/dialog/infobar.cxx @@ -332,9 +332,9 @@ SfxInfoBarContainerChild::SfxInfoBarContainerChild( vcl::Window* _pParent, sal_u SfxChildWindow(_pParent, nId), m_pBindings(pBindings) { - pWindow = VclPtr<SfxInfoBarContainerWindow>::Create(this); - pWindow->SetPosSizePixel(Point(0, 0), Size(_pParent->GetSizePixel().getWidth(), 0)); - pWindow->Show(); + SetWindow( VclPtr<SfxInfoBarContainerWindow>::Create(this) ); + GetWindow()->SetPosSizePixel(Point(0, 0), Size(_pParent->GetSizePixel().getWidth(), 0)); + GetWindow()->Show(); SetAlignment(SfxChildAlignment::LOWESTTOP); } diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx index 7f0c223..bb1ccd6 100644 --- a/sfx2/source/dialog/navigat.cxx +++ b/sfx2/source/dialog/navigat.cxx @@ -34,13 +34,13 @@ SfxNavigatorWrapper::SfxNavigatorWrapper( vcl::Window* pParentWnd , SfxChildWinInfo* pInfo ) : SfxChildWindow( pParentWnd , nId ) { - pWindow = VclPtr<SfxNavigator>::Create( pBindings, this, pParentWnd, - WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE); + SetWindow( VclPtr<SfxNavigator>::Create( pBindings, this, pParentWnd, + WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE) ); - pWindow->SetHelpId ( HID_NAVIGATOR_WINDOW ); - pWindow->SetOutputSizePixel( Size( 270, 240 ) ); + GetWindow()->SetHelpId ( HID_NAVIGATOR_WINDOW ); + GetWindow()->SetOutputSizePixel( Size( 270, 240 ) ); - static_cast<SfxDockingWindow*>( pWindow.get() )->Initialize( pInfo ); + static_cast<SfxDockingWindow*>( GetWindow() )->Initialize( pInfo ); SetHideNotDelete( true ); } diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx index 3e4a528..35b895e 100644 --- a/sfx2/source/dialog/partwnd.cxx +++ b/sfx2/source/dialog/partwnd.cxx @@ -59,16 +59,16 @@ SfxPartChildWnd_Impl::SfxPartChildWnd_Impl : SfxChildWindow( pParentWnd, nId ) { // Create Window - pWindow = VclPtr<SfxPartDockWnd_Impl>::Create( pBindings, this, pParentWnd, WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK ); + SetWindow(VclPtr<SfxPartDockWnd_Impl>::Create( pBindings, this, pParentWnd, WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK )); SetAlignment(SfxChildAlignment::TOP); assert(pInfo); pInfo->nFlags |= SfxChildWindowFlags::FORCEDOCK; - static_cast<SfxDockingWindow*>(pWindow.get())->SetFloatingSize( Size( 175, 175 ) ); - pWindow->SetSizePixel( Size( 175, 175 ) ); + static_cast<SfxDockingWindow*>(GetWindow())->SetFloatingSize( Size( 175, 175 ) ); + GetWindow()->SetSizePixel( Size( 175, 175 ) ); - static_cast<SfxDockingWindow*>(pWindow.get())->Initialize( pInfo ); + static_cast<SfxDockingWindow*>(GetWindow())->Initialize( pInfo ); SetHideNotDelete( true ); } @@ -82,7 +82,7 @@ SfxPartChildWnd_Impl::~SfxPartChildWnd_Impl() // But don't do it, if xFrame already exist. Then dispose() must come from inside ... // and we need a valid pMgr for further operations ... - SfxPartDockWnd_Impl* pWin = static_cast<SfxPartDockWnd_Impl*>(pWindow.get()); + SfxPartDockWnd_Impl* pWin = static_cast<SfxPartDockWnd_Impl*>(GetWindow()); if ( pWin && xFrame == pWin->GetBindings().GetActiveFrame() ) pWin->GetBindings().SetActiveFrame( NULL ); @@ -90,7 +90,7 @@ SfxPartChildWnd_Impl::~SfxPartChildWnd_Impl() bool SfxPartChildWnd_Impl::QueryClose() { - return static_cast<SfxPartDockWnd_Impl*>(pWindow.get())->QueryClose(); + return static_cast<SfxPartDockWnd_Impl*>(GetWindow())->QueryClose(); } diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx index c771d63..4d71905 100644 --- a/sfx2/source/dialog/recfloat.cxx +++ b/sfx2/source/dialog/recfloat.cxx @@ -131,9 +131,9 @@ SfxRecordingFloatWrapper_Impl::SfxRecordingFloatWrapper_Impl( vcl::Window* pPare : SfxChildWindow( pParentWnd, nId ) , pBindings( pBind ) { - pWindow = VclPtr<SfxRecordingFloat_Impl>::Create( pBindings, this, pParentWnd ); + SetWindow( VclPtr<SfxRecordingFloat_Impl>::Create( pBindings, this, pParentWnd ) ); SetWantsFocus( false ); - static_cast<SfxFloatingWindow*>(pWindow.get())->Initialize( pInfo ); + static_cast<SfxFloatingWindow*>(GetWindow())->Initialize( pInfo ); } SfxRecordingFloatWrapper_Impl::~SfxRecordingFloatWrapper_Impl() diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index 548a0e5..43c8cf7 100644 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -249,17 +249,17 @@ namespace sfx2 TaskPaneWrapper::TaskPaneWrapper( vcl::Window* i_pParent, sal_uInt16 i_nId, SfxBindings* i_pBindings, SfxChildWinInfo* i_pInfo ) :SfxChildWindow( i_pParent, i_nId ) { - pWindow = VclPtr<TaskPaneDockingWindow>::Create( i_pBindings, *this, i_pParent, - WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE); + SetWindow(VclPtr<TaskPaneDockingWindow>::Create( i_pBindings, *this, i_pParent, + WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE)); SetAlignment(SfxChildAlignment::RIGHT); - pWindow->SetHelpId( HID_TASKPANE_WINDOW ); - pWindow->SetOutputSizePixel( Size( 300, 450 ) ); + GetWindow()->SetHelpId( HID_TASKPANE_WINDOW ); + GetWindow()->SetOutputSizePixel( Size( 300, 450 ) ); - dynamic_cast<SfxDockingWindow&>(*pWindow).Initialize(i_pInfo); + dynamic_cast<SfxDockingWindow*>(GetWindow())->Initialize(i_pInfo); SetHideNotDelete( true ); - pWindow->Show(); + GetWindow()->Show(); } diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx b/sfx2/source/sidebar/SidebarChildWindow.cxx index 59384c5..18a62b5 100644 --- a/sfx2/source/sidebar/SidebarChildWindow.cxx +++ b/sfx2/source/sidebar/SidebarChildWindow.cxx @@ -34,16 +34,16 @@ SidebarChildWindow::SidebarChildWindow (vcl::Window* pParentWindow, sal_uInt16 n SfxBindings* pBindings, SfxChildWinInfo* pInfo) : SfxChildWindow(pParentWindow, nId) { - pWindow.reset(VclPtr<SidebarDockingWindow>::Create(pBindings, *this, pParentWindow, + SetWindow(VclPtr<SidebarDockingWindow>::Create(pBindings, *this, pParentWindow, WB_STDDOCKWIN | WB_OWNERDRAWDECORATION | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE)); SetAlignment(SfxChildAlignment::RIGHT); - pWindow->SetHelpId(HID_SIDEBAR_WINDOW); - pWindow->SetOutputSizePixel(Size(GetDefaultWidth(pWindow), 450)); + GetWindow()->SetHelpId(HID_SIDEBAR_WINDOW); + GetWindow()->SetOutputSizePixel(Size(GetDefaultWidth(GetWindow()), 450)); - SfxDockingWindow* pDockingParent = dynamic_cast<SfxDockingWindow*>(pWindow.get()); + SfxDockingWindow* pDockingParent = dynamic_cast<SfxDockingWindow*>(GetWindow()); if (pDockingParent != NULL) { if (pInfo && pInfo->aExtraString.isEmpty() && pInfo->aModule != "sdraw" && pInfo->aModule != "simpress") @@ -54,14 +54,14 @@ SidebarChildWindow::SidebarChildWindow (vcl::Window* pParentWindow, sal_uInt16 n // HACK: unfortunately I haven't found a clean solution to do // this, so do it this way: // - pDockingParent->SetSizePixel(Size(TabBar::GetDefaultWidth() * pWindow->GetDPIScaleFactor(), + pDockingParent->SetSizePixel(Size(TabBar::GetDefaultWidth() * GetWindow()->GetDPIScaleFactor(), pDockingParent->GetSizePixel().Height())); } pDockingParent->Initialize(pInfo); } SetHideNotDelete(true); - pWindow->Show(); + GetWindow()->Show(); } sal_Int32 SidebarChildWindow::GetDefaultWidth (vcl::Window* pWindow) diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx index 72f9857..2cb968e 100644 --- a/starmath/inc/view.hxx +++ b/starmath/inc/view.hxx @@ -226,7 +226,7 @@ public: SmEditWindow& GetEditWindow() { - return static_cast<SmCmdBoxWindow *>(pWindow.get())->GetEditWindow(); + return static_cast<SmCmdBoxWindow *>(GetWindow())->GetEditWindow(); } }; diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index 3ca87b2..3c29f5e 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -764,7 +764,7 @@ SmElementsDockingWindowWrapper::SmElementsDockingWindowWrapper( SfxChildWindow(pParentWindow, nId) { VclPtrInstance<SmElementsDockingWindow> pDialog(pBindings, this, pParentWindow); - pWindow.reset(pDialog); + SetWindow(pDialog); pDialog->setDeferredProperties(); pDialog->SetPosSizePixel(Point(0, 0), Size(300, 0)); pDialog->Show(); diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 3c21930..93c49dc 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -889,11 +889,11 @@ SmCmdBoxWrapper::SmCmdBoxWrapper(vcl::Window *pParentWindow, sal_uInt16 nId, SfxChildWinInfo *pInfo) : SfxChildWindow(pParentWindow, nId) { - pWindow.reset(VclPtr<SmCmdBoxWindow>::Create(pBindings, this, pParentWindow)); + SetWindow(VclPtr<SmCmdBoxWindow>::Create(pBindings, this, pParentWindow)); // make window docked to the bottom initially (after first start) SetAlignment(SfxChildAlignment::BOTTOM); - static_cast<SfxDockingWindow *>(pWindow.get())->Initialize(pInfo); + static_cast<SfxDockingWindow *>(GetWindow())->Initialize(pInfo); } #if OSL_DEBUG_LEVEL > 1 diff --git a/svx/source/dialog/SpellDialogChildWindow.cxx b/svx/source/dialog/SpellDialogChildWindow.cxx index e8ed7dd..dc58680 100644 --- a/svx/source/dialog/SpellDialogChildWindow.cxx +++ b/svx/source/dialog/SpellDialogChildWindow.cxx @@ -38,7 +38,7 @@ SpellDialogChildWindow::SpellDialogChildWindow ( m_xAbstractSpellDialog.reset(pFact->CreateSvxSpellDialog(_pParent, pBindings, this )); - pWindow = m_xAbstractSpellDialog->GetWindow(); + SetWindow( m_xAbstractSpellDialog->GetWindow() ); SetHideNotDelete(true); } diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index 9bf4644..fdae3db 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -354,7 +354,7 @@ SvxBmpMaskChildWindow::SvxBmpMaskChildWindow(vcl::Window* pParent_, sal_uInt16 n { VclPtr<SvxBmpMask> pDlg = VclPtr<SvxBmpMask>::Create(pBindings, this, pParent_); - pWindow = pDlg; + SetWindow( pDlg ); pDlg->Initialize( pInfo ); } diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 205980bc..4078e6e 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -68,7 +68,7 @@ SvxContourDlgChildWindow::SvxContourDlgChildWindow( vcl::Window* _pParent, sal_u SfxChildWindow( _pParent, nId ) { VclPtr<SvxSuperContourDlg> pDlg = VclPtr<SvxSuperContourDlg>::Create(pBindings, this, _pParent); - pWindow = pDlg; + SetWindow(pDlg); if ( pInfo->nFlags & SfxChildWindowFlags::ZOOMIN ) pDlg->RollUp(); diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index 8b072d2e..4c5ab06 100644 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -164,7 +164,7 @@ SvxFontWorkChildWindow::SvxFontWorkChildWindow SfxChildWindow( _pParent, nId ) { VclPtrInstance<SvxFontWorkDialog> pDlg(pBindings, this, _pParent); - pWindow = pDlg.get(); + SetWindow(pDlg); pDlg->Initialize( pInfo ); } diff --git a/svx/source/dialog/hyperdlg.cxx b/svx/source/dialog/hyperdlg.cxx index fa0da20..3667bd6 100644 --- a/svx/source/dialog/hyperdlg.cxx +++ b/svx/source/dialog/hyperdlg.cxx @@ -44,7 +44,7 @@ SvxHlinkDlgWrapper::SvxHlinkDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, DBG_ASSERT(pFact, "Dialog creation failed!"); mpDlg = pFact->CreateSvxHpLinkDlg( _pParent, pBindings, SID_HYPERLINK_DIALOG ); DBG_ASSERT(mpDlg, "Dialog creation failed!"); - pWindow = mpDlg->GetWindow(); + SetWindow( mpDlg->GetWindow() ); SetVisible_Impl(false); vcl::Window* pTopWindow = 0; @@ -61,7 +61,7 @@ SvxHlinkDlgWrapper::SvxHlinkDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, pInfo->aPos.setY( aParentSize.Height()-aDlgSize.Height() < long(0.1*aParentSize.Height()) ? long(0.1*aParentSize.Height()) : aParentSize.Height()-aDlgSize.Height() ); - pWindow->SetPosPixel( pInfo->aPos ); + GetWindow()->SetPosPixel( pInfo->aPos ); } SetHideNotDelete( true ); diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 69d395f..618acfd 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -96,8 +96,8 @@ SvxIMapDlgChildWindow::SvxIMapDlgChildWindow( vcl::Window* _pParent, sal_uInt16 SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ) { - pWindow = VclPtr<SvxIMapDlg>::Create( pBindings, this, _pParent ); - SvxIMapDlg* pDlg = static_cast<SvxIMapDlg*>(pWindow.get()); + SetWindow(VclPtr<SvxIMapDlg>::Create( pBindings, this, _pParent )); + SvxIMapDlg* pDlg = static_cast<SvxIMapDlg*>(GetWindow()); if ( pInfo->nFlags & SfxChildWindowFlags::ZOOMIN ) pDlg->RollUp(); diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 19b5d2a..891dc33 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -70,7 +70,7 @@ SvxRubyChildWindow::SvxRubyChildWindow(vcl::Window* _pParent, sal_uInt16 nId,Sfx : SfxChildWindow(_pParent, nId) { VclPtr<SvxRubyDialog> pDlg = VclPtr<SvxRubyDialog>::Create(pBindings, this, _pParent); - pWindow = pDlg; + SetWindow(pDlg); if (pInfo->nFlags & SfxChildWindowFlags::ZOOMIN) pDlg->RollUp(); diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 1b43564..ba27a6a 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -2267,7 +2267,7 @@ SvxSearchDialogWrapper::SvxSearchDialogWrapper( vcl::Window* _pParent, sal_uInt1 : SfxChildWindow( _pParent, nId ) , dialog (VclPtr<SvxSearchDialog>::Create(_pParent, this, *pBindings)) { - pWindow = dialog.get(); + SetWindow(dialog); dialog->Initialize( pInfo ); pBindings->Update( SID_SEARCH_ITEM ); diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index 9a0982d..069e7a3 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -2908,7 +2908,7 @@ Svx3DChildWindow::Svx3DChildWindow( vcl::Window* _pParent, SfxChildWindow( _pParent, nId ) { VclPtr<Svx3DWin> pWin = VclPtr<Svx3DWin>::Create( pBindings, this, _pParent ); - pWindow = pWin; + SetWindow(pWin); pWin->Initialize( pInfo ); } diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index f886682..f1cdfbb 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -2252,10 +2252,10 @@ namespace svxform SfxChildWindow( _pParent, _nId ) { - pWindow = VclPtr<DataNavigator>::Create( _pBindings, this, _pParent ); + SetWindow( VclPtr<DataNavigator>::Create( _pBindings, this, _pParent ) ); SetAlignment(SfxChildAlignment::RIGHT); - pWindow->SetSizePixel( Size( 250, 400 ) ); - static_cast<SfxDockingWindow*>(pWindow.get())->Initialize( _pInfo ); + GetWindow()->SetSizePixel( Size( 250, 400 ) ); + static_cast<SfxDockingWindow*>(GetWindow())->Initialize( _pInfo ); } AddDataItemDialog::AddDataItemDialog(vcl::Window* pParent, ItemNode* _pNode, diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 17451ae..7a00bad 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1996,8 +1996,8 @@ FmFilterNavigatorWinMgr::FmFilterNavigatorWinMgr( vcl::Window *_pParent, sal_uIn SfxBindings *_pBindings, SfxChildWinInfo* _pInfo ) :SfxChildWindow( _pParent, _nId ) { - pWindow = VclPtr<FmFilterNavigatorWin>::Create( _pBindings, this, _pParent ); - static_cast<SfxDockingWindow*>(pWindow.get())->Initialize( _pInfo ); + SetWindow( VclPtr<FmFilterNavigatorWin>::Create( _pBindings, this, _pParent ) ); + static_cast<SfxDockingWindow*>(GetWindow())->Initialize( _pInfo ); } diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index 86d05a2..4b0b6691 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -83,8 +83,8 @@ FmPropBrwMgr::FmPropBrwMgr( vcl::Window* _pParent, sal_uInt16 _nId, SfxBindings* _pBindings, SfxChildWinInfo* _pInfo) :SfxChildWindow(_pParent, _nId) { - pWindow = VclPtr<FmPropBrw>::Create( ::comphelper::getProcessComponentContext(), _pBindings, this, _pParent, _pInfo ); - static_cast<SfxFloatingWindow*>(pWindow.get())->Initialize( _pInfo ); + SetWindow( VclPtr<FmPropBrw>::Create( ::comphelper::getProcessComponentContext(), _pBindings, this, _pParent, _pInfo ) ); + static_cast<SfxFloatingWindow*>(GetWindow())->Initialize( _pInfo ); } diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx index faabd49..e237963 100644 --- a/svx/source/form/fmexpl.cxx +++ b/svx/source/form/fmexpl.cxx @@ -614,8 +614,8 @@ namespace svxform SfxBindings* _pBindings, SfxChildWinInfo* _pInfo ) :SfxChildWindow( _pParent, _nId ) { - pWindow = VclPtr<NavigatorFrame>::Create( _pBindings, this, _pParent ); - static_cast<SfxDockingWindow*>(pWindow.get())->Initialize( _pInfo ); + SetWindow( VclPtr<NavigatorFrame>::Create( _pBindings, this, _pParent ) ); + static_cast<SfxDockingWindow*>(GetWindow())->Initialize( _pInfo ); } diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index 83d28cd..778cfe4 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -424,9 +424,9 @@ FmFieldWinMgr::FmFieldWinMgr(vcl::Window* _pParent, sal_uInt16 _nId, SfxBindings* _pBindings, SfxChildWinInfo* _pInfo) :SfxChildWindow(_pParent, _nId) { - pWindow = VclPtr<FmFieldWin>::Create(_pBindings, this, _pParent); + SetWindow( VclPtr<FmFieldWin>::Create(_pBindings, this, _pParent) ); SetHideNotDelete(true); - static_cast<SfxFloatingWindow*>(pWindow.get())->Initialize( _pInfo ); + static_cast<SfxFloatingWindow*>(GetWindow())->Initialize( _pInfo ); } diff --git a/svx/source/tbxctrls/SvxColorChildWindow.cxx b/svx/source/tbxctrls/SvxColorChildWindow.cxx index eb34587..5b5c399 100644 --- a/svx/source/tbxctrls/SvxColorChildWindow.cxx +++ b/svx/source/tbxctrls/SvxColorChildWindow.cxx @@ -36,7 +36,7 @@ SvxColorChildWindow::SvxColorChildWindow( vcl::Window* _pParent, VclPtr<SvxColorDockingWindow> pWin = VclPtr<SvxColorDockingWindow>::Create( pBindings, this, _pParent ); - pWindow = pWin; + SetWindow(pWin); SetAlignment(SfxChildAlignment::BOTTOM); diff --git a/sw/source/uibase/dbui/mailmergechildwindow.cxx b/sw/source/uibase/dbui/mailmergechildwindow.cxx index 1a76bbb..ebd2343 100644 --- a/sw/source/uibase/dbui/mailmergechildwindow.cxx +++ b/sw/source/uibase/dbui/mailmergechildwindow.cxx @@ -43,7 +43,7 @@ SwMailMergeChildWindow::SwMailMergeChildWindow( vcl::Window* _pParent, SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ) { - pWindow = VclPtr<SwMailMergeChildWin>::Create( pBindings, this, _pParent); + SetWindow( VclPtr<SwMailMergeChildWin>::Create( pBindings, this, _pParent) ); if (!pInfo->aSize.Width() || !pInfo->aSize.Height()) { @@ -51,16 +51,16 @@ SwMailMergeChildWindow::SwMailMergeChildWindow( vcl::Window* _pParent, if(pActiveView) { const SwEditWin &rEditWin = pActiveView->GetEditWin(); - pWindow->SetPosPixel(rEditWin.OutputToScreenPixel(Point(0, 0))); + GetWindow()->SetPosPixel(rEditWin.OutputToScreenPixel(Point(0, 0))); } else - pWindow->SetPosPixel(_pParent->OutputToScreenPixel(Point(0, 0))); - pInfo->aPos = pWindow->GetPosPixel(); - pInfo->aSize = pWindow->GetSizePixel(); + GetWindow()->SetPosPixel(_pParent->OutputToScreenPixel(Point(0, 0))); + pInfo->aPos = GetWindow()->GetPosPixel(); + pInfo->aSize = GetWindow()->GetSizePixel(); } - static_cast<SwMailMergeChildWin *>(pWindow.get())->Initialize(pInfo); - pWindow->Show(); + static_cast<SwMailMergeChildWin *>(GetWindow())->Initialize(pInfo); + GetWindow()->Show(); } SwMailMergeChildWin::SwMailMergeChildWin(SfxBindings* _pBindings, diff --git a/sw/source/uibase/dialog/wordcountwrapper.cxx b/sw/source/uibase/dialog/wordcountwrapper.cxx index 3dfa2a7..2b5e963 100644 --- a/sw/source/uibase/dialog/wordcountwrapper.cxx +++ b/sw/source/uibase/dialog/wordcountwrapper.cxx @@ -25,7 +25,7 @@ SwWordCountWrapper::SwWordCountWrapper( vcl::Window *pParentWindow, assert(pFact && "SwAbstractDialogFactory fail!"); xAbstDlg.reset(pFact->CreateSwWordCountDialog(pBindings, this, pParentWindow, pInfo)); assert(xAbstDlg && "Dialog construction failed!"); - pWindow = xAbstDlg->GetWindow(); + SetWindow(xAbstDlg->GetWindow()); } SfxChildWinInfo SwWordCountWrapper::GetInfo() const diff --git a/sw/source/uibase/envelp/syncbtn.cxx b/sw/source/uibase/envelp/syncbtn.cxx index fd1b66e..fe5984f 100644 --- a/sw/source/uibase/envelp/syncbtn.cxx +++ b/sw/source/uibase/envelp/syncbtn.cxx @@ -37,7 +37,7 @@ SwSyncChildWin::SwSyncChildWin( vcl::Window* _pParent, SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ) { - pWindow = VclPtr<SwSyncBtnDlg>::Create( pBindings, this, _pParent); + SetWindow(VclPtr<SwSyncBtnDlg>::Create( pBindings, this, _pParent)); if (!pInfo->aSize.Width() || !pInfo->aSize.Height()) { @@ -45,17 +45,17 @@ SwSyncChildWin::SwSyncChildWin( vcl::Window* _pParent, if(pActiveView) { const SwEditWin &rEditWin = pActiveView->GetEditWin(); - pWindow->SetPosPixel(rEditWin.OutputToScreenPixel(Point(0, 0))); + GetWindow()->SetPosPixel(rEditWin.OutputToScreenPixel(Point(0, 0))); } else - pWindow->SetPosPixel(_pParent->OutputToScreenPixel(Point(0, 0))); - pInfo->aPos = pWindow->GetPosPixel(); - pInfo->aSize = pWindow->GetSizePixel(); + GetWindow()->SetPosPixel(_pParent->OutputToScreenPixel(Point(0, 0))); + pInfo->aPos = GetWindow()->GetPosPixel(); + pInfo->aSize = GetWindow()->GetSizePixel(); } - static_cast<SwSyncBtnDlg *>(pWindow.get())->Initialize(pInfo); + static_cast<SwSyncBtnDlg *>(GetWindow())->Initialize(pInfo); - pWindow->Show(); + GetWindow()->Show(); } SwSyncBtnDlg::SwSyncBtnDlg( SfxBindings* _pBindings, diff --git a/sw/source/uibase/fldui/fldwrap.cxx b/sw/source/uibase/fldui/fldwrap.cxx index a241e66..bf189929 100644 --- a/sw/source/uibase/fldui/fldwrap.cxx +++ b/sw/source/uibase/fldui/fldwrap.cxx @@ -84,7 +84,7 @@ SwFieldDlgWrapper::SwFieldDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, AbstractSwFieldDlg* pDlg = pFact->CreateSwFieldDlg(pB, this, _pParent); assert(pDlg && "Dialog creation failed!"); pDlgInterface = pDlg; - pWindow = pDlg->GetWindow(); + SetWindow( pDlg->GetWindow() ); pDlg->Start(); } @@ -129,7 +129,7 @@ SwFieldDataOnlyDlgWrapper::SwFieldDataOnlyDlgWrapper( vcl::Window* _pParent, sal OSL_ENSURE(pDlg, "Dialog creation failed!"); pDlgInterface = pDlg; - pWindow = pDlg->GetWindow(); + SetWindow( pDlg->GetWindow() ); pDlg->ActivateDatabasePage(); pDlg->Start(); pDlg->Initialize( pInfo ); diff --git a/sw/source/uibase/inc/inputwin.hxx b/sw/source/uibase/inc/inputwin.hxx index 13154ef..25730b5 100644 --- a/sw/source/uibase/inc/inputwin.hxx +++ b/sw/source/uibase/inc/inputwin.hxx @@ -104,9 +104,9 @@ public: virtual ~SwInputChild(); SFX_DECL_CHILDWINDOW_WITHID( SwInputChild ); void SetFormula( const OUString& rFormula, bool bDelSel = true ) - { static_cast<SwInputWindow*>(pWindow.get())->SetFormula( - rFormula, bDelSel ); } - const SwView* GetView() const{return static_cast<SwInputWindow*>(pWindow.get())->GetView();} + { static_cast<SwInputWindow*>(GetWindow())->SetFormula( rFormula, bDelSel ); } + const SwView* GetView() const + { return static_cast<SwInputWindow*>(GetWindow())->GetView();} }; diff --git a/sw/source/uibase/index/idxmrk.cxx b/sw/source/uibase/index/idxmrk.cxx index 6fe389b..7994686 100644 --- a/sw/source/uibase/index/idxmrk.cxx +++ b/sw/source/uibase/index/idxmrk.cxx @@ -64,8 +64,8 @@ SwInsertIdxMarkWrapper::SwInsertIdxMarkWrapper( vcl::Window *pParentWindow, assert(pFact && "SwAbstractDialogFactory fail!"); pAbstDlg = pFact->CreateIndexMarkFloatDlg(pBindings, this, pParentWindow, pInfo); assert(pAbstDlg && "Dialog creation failed!"); - pWindow = pAbstDlg->GetWindow(); - pWindow->Show(); // at this point,because before pSh has to be initialized in ReInitDlg() + SetWindow( pAbstDlg->GetWindow() ); + GetWindow()->Show(); // at this point,because before pSh has to be initialized in ReInitDlg() // -> Show() will invoke StateChanged() and save pos } @@ -93,7 +93,7 @@ SwInsertAuthMarkWrapper::SwInsertAuthMarkWrapper( vcl::Window *pParentWindow, OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); pAbstDlg = pFact->CreateAuthMarkFloatDlg(pBindings, this, pParentWindow, pInfo); OSL_ENSURE(pAbstDlg, "Dialog creation failed!"); - pWindow = pAbstDlg->GetWindow(); + SetWindow( pAbstDlg->GetWindow() ); } SfxChildWinInfo SwInsertAuthMarkWrapper::GetInfo() const diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index 3c57420..9e97288 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -67,9 +67,9 @@ SwRedlineAcceptChild::SwRedlineAcceptChild( vcl::Window* _pParent, SfxChildWinInfo* pInfo ) : SwChildWinWrapper( _pParent, nId ) { - pWindow = VclPtr<SwModelessRedlineAcceptDlg>::Create( pBindings, this, _pParent); + SetWindow( VclPtr<SwModelessRedlineAcceptDlg>::Create( pBindings, this, _pParent) ); - static_cast<SwModelessRedlineAcceptDlg *>(pWindow.get())->Initialize(pInfo); + static_cast<SwModelessRedlineAcceptDlg *>(GetWindow())->Initialize(pInfo); } // newly initialise dialog after document switch diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index 8bd5a5c..7569757 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -622,8 +622,8 @@ SwInputChild::SwInputChild(vcl::Window* _pParent, SfxChildWindow( _pParent, nId ) { pDispatch = pBindings->GetDispatcher(); - pWindow = VclPtr<SwInputWindow>::Create( _pParent ); - static_cast<SwInputWindow*>(pWindow.get())->ShowWin(); + SetWindow( VclPtr<SwInputWindow>::Create( _pParent ) ); + static_cast<SwInputWindow*>(GetWindow())->ShowWin(); SetAlignment(SfxChildAlignment::LOWESTTOP); } commit a9ea1295a668feca4bfb9b2a53a92890177b5371 Author: Noel Grandin <n...@peralex.com> Date: Fri Aug 21 16:17:45 2015 +0200 make eChildAlignment private in SfxChildWindow Change-Id: I68a4c3324736e111a2c88e3edb9df506c33042b7 diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx index b9c2b67..1298e8c 100644 --- a/avmedia/source/framework/mediaplayer.cxx +++ b/avmedia/source/framework/mediaplayer.cxx @@ -41,7 +41,6 @@ MediaPlayer::MediaPlayer( vcl::Window* _pParent, sal_uInt16 nId, SfxBindings* _p SfxChildWindow( _pParent, nId ) { pWindow.reset( VclPtr<MediaFloater>::Create( _pBindings, this, _pParent ) ); - eChildAlignment = SfxChildAlignment::NOALIGNMENT; static_cast< MediaFloater* >( pWindow.get() )->Initialize( pInfo ); }; diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index f55f2ea..3cc607e 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -152,10 +152,10 @@ class SFX2_DLLPUBLIC SfxChildWindow sal_uInt16 nType; // ChildWindow-Id protected: - SfxChildAlignment eChildAlignment; // Current ::com::sun::star::drawing::Alignment VclPtr<vcl::Window> pWindow; // actual contents private: + SfxChildAlignment eChildAlignment; // Current ::com::sun::star::drawing::Alignment SfxChildWindow_Impl* pImp; // Implementation data SfxChildWindowContext* pContext; // With context-sensitive ChildWindows: // Annother window in pWindow diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 7054af6..1068899 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -130,7 +130,7 @@ ScInputWindowWrapper::ScInputWindowWrapper( vcl::Window* pParentP, pWin->SetSizePixel( pWin->CalcWindowSizePixel() ); - eChildAlignment = SfxChildAlignment::LOWESTTOP; + SetAlignment(SfxChildAlignment::LOWESTTOP); pBindings->Invalidate( FID_TOGGLEINPUTLINE ); } diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index f189793..0afbcd4 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -67,7 +67,7 @@ ScFunctionChildWindow::ScFunctionChildWindow( vcl::Window* pParentP, pParentP, ScResId( FID_FUNCTION_BOX ) ); pWindow = pWin; - eChildAlignment = SfxChildAlignment::RIGHT; + SetAlignment(SfxChildAlignment::RIGHT); pWin->Initialize( pInfo ); } diff --git a/sd/source/ui/dlg/AnimationChildWindow.cxx b/sd/source/ui/dlg/AnimationChildWindow.cxx index d59f0ac..1fd3416 100644 --- a/sd/source/ui/dlg/AnimationChildWindow.cxx +++ b/sd/source/ui/dlg/AnimationChildWindow.cxx @@ -42,8 +42,6 @@ AnimationChildWindow::AnimationChildWindow( VclPtr<AnimationWindow> pAnimWin = VclPtr<AnimationWindow>::Create(pBindings, this, _pParent); pWindow = pAnimWin; - eChildAlignment = SfxChildAlignment::NOALIGNMENT; - pAnimWin->Initialize( pInfo ); SetHideNotDelete( true ); diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx index b004e76..a52d00d 100644 --- a/sd/source/ui/dlg/PaneChildWindows.cxx +++ b/sd/source/ui/dlg/PaneChildWindows.cxx @@ -62,7 +62,7 @@ PaneChildWindow::PaneChildWindow ( this, pParentWindow, SD_RESSTR(nTitleBarResId)); - eChildAlignment = eAlignment; + SetAlignment(eAlignment); static_cast<SfxDockingWindow*>(pWindow.get())->Initialize(pInfo); SetHideNotDelete(true); diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 57dba9b..9afb766 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -132,7 +132,6 @@ SfxDockingWrapper::SfxDockingWrapper( vcl::Window* pParentWnd , VclPtr<SfxTitleDockingWindow> pTitleDockWindow = VclPtr<SfxTitleDockingWindow>::Create( pBindings, this, pParentWnd, WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE); pWindow = pTitleDockWindow; - eChildAlignment = SfxChildAlignment::NOALIGNMENT; // Use factory manager to retrieve XWindow factory. That can be used to instantiate // the real window factory. diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx index f65946b..0dd8089 100644 --- a/sfx2/source/dialog/infobar.cxx +++ b/sfx2/source/dialog/infobar.cxx @@ -336,7 +336,7 @@ SfxInfoBarContainerChild::SfxInfoBarContainerChild( vcl::Window* _pParent, sal_u pWindow->SetPosSizePixel(Point(0, 0), Size(_pParent->GetSizePixel().getWidth(), 0)); pWindow->Show(); - eChildAlignment = SfxChildAlignment::LOWESTTOP; + SetAlignment(SfxChildAlignment::LOWESTTOP); } SfxInfoBarContainerChild::~SfxInfoBarContainerChild() diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx index 98870a6..7f0c223 100644 --- a/sfx2/source/dialog/navigat.cxx +++ b/sfx2/source/dialog/navigat.cxx @@ -36,7 +36,6 @@ SfxNavigatorWrapper::SfxNavigatorWrapper( vcl::Window* pParentWnd , { pWindow = VclPtr<SfxNavigator>::Create( pBindings, this, pParentWnd, WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE); - eChildAlignment = SfxChildAlignment::NOALIGNMENT; pWindow->SetHelpId ( HID_NAVIGATOR_WINDOW ); pWindow->SetOutputSizePixel( Size( 270, 240 ) ); diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx index f16288d..3e4a528 100644 --- a/sfx2/source/dialog/partwnd.cxx +++ b/sfx2/source/dialog/partwnd.cxx @@ -60,7 +60,7 @@ SfxPartChildWnd_Impl::SfxPartChildWnd_Impl { // Create Window pWindow = VclPtr<SfxPartDockWnd_Impl>::Create( pBindings, this, pParentWnd, WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK ); - eChildAlignment = SfxChildAlignment::TOP; + SetAlignment(SfxChildAlignment::TOP); assert(pInfo); pInfo->nFlags |= SfxChildWindowFlags::FORCEDOCK; diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx index ce3dabb..c771d63 100644 --- a/sfx2/source/dialog/recfloat.cxx +++ b/sfx2/source/dialog/recfloat.cxx @@ -133,7 +133,6 @@ SfxRecordingFloatWrapper_Impl::SfxRecordingFloatWrapper_Impl( vcl::Window* pPare { pWindow = VclPtr<SfxRecordingFloat_Impl>::Create( pBindings, this, pParentWnd ); SetWantsFocus( false ); - eChildAlignment = SfxChildAlignment::NOALIGNMENT; static_cast<SfxFloatingWindow*>(pWindow.get())->Initialize( pInfo ); } diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index 4bf3d16..548a0e5 100644 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -251,7 +251,7 @@ namespace sfx2 { pWindow = VclPtr<TaskPaneDockingWindow>::Create( i_pBindings, *this, i_pParent, WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE); - eChildAlignment = SfxChildAlignment::RIGHT; + SetAlignment(SfxChildAlignment::RIGHT); pWindow->SetHelpId( HID_TASKPANE_WINDOW ); pWindow->SetOutputSizePixel( Size( 300, 450 ) ); diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx b/sfx2/source/sidebar/SidebarChildWindow.cxx index a37d500..59384c5 100644 --- a/sfx2/source/sidebar/SidebarChildWindow.cxx +++ b/sfx2/source/sidebar/SidebarChildWindow.cxx @@ -38,7 +38,7 @@ SidebarChildWindow::SidebarChildWindow (vcl::Window* pParentWindow, sal_uInt16 n WB_STDDOCKWIN | WB_OWNERDRAWDECORATION | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE)); - eChildAlignment = SfxChildAlignment::RIGHT; + SetAlignment(SfxChildAlignment::RIGHT); pWindow->SetHelpId(HID_SIDEBAR_WINDOW); pWindow->SetOutputSizePixel(Size(GetDefaultWidth(pWindow), 450)); diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index 62a9093..3ca87b2 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -769,7 +769,7 @@ SmElementsDockingWindowWrapper::SmElementsDockingWindowWrapper( pDialog->SetPosSizePixel(Point(0, 0), Size(300, 0)); pDialog->Show(); - eChildAlignment = SfxChildAlignment::LEFT; + SetAlignment(SfxChildAlignment::LEFT); pDialog->Initialize( pInfo ); } diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 9aaf0ae..3c21930 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -892,7 +892,7 @@ SmCmdBoxWrapper::SmCmdBoxWrapper(vcl::Window *pParentWindow, sal_uInt16 nId, pWindow.reset(VclPtr<SmCmdBoxWindow>::Create(pBindings, this, pParentWindow)); // make window docked to the bottom initially (after first start) - eChildAlignment = SfxChildAlignment::BOTTOM; + SetAlignment(SfxChildAlignment::BOTTOM); static_cast<SfxDockingWindow *>(pWindow.get())->Initialize(pInfo); } diff --git a/svx/source/dialog/SpellDialogChildWindow.cxx b/svx/source/dialog/SpellDialogChildWindow.cxx index 181cede..e8ed7dd 100644 --- a/svx/source/dialog/SpellDialogChildWindow.cxx +++ b/svx/source/dialog/SpellDialogChildWindow.cxx @@ -39,7 +39,6 @@ SpellDialogChildWindow::SpellDialogChildWindow ( pBindings, this )); pWindow = m_xAbstractSpellDialog->GetWindow(); - eChildAlignment = SfxChildAlignment::NOALIGNMENT; SetHideNotDelete(true); } diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index 0b59159..9bf4644 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -356,8 +356,6 @@ SvxBmpMaskChildWindow::SvxBmpMaskChildWindow(vcl::Window* pParent_, sal_uInt16 n pWindow = pDlg; - eChildAlignment = SfxChildAlignment::NOALIGNMENT; - pDlg->Initialize( pInfo ); } diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 03537b1..205980bc 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -73,8 +73,6 @@ SvxContourDlgChildWindow::SvxContourDlgChildWindow( vcl::Window* _pParent, sal_u if ( pInfo->nFlags & SfxChildWindowFlags::ZOOMIN ) pDlg->RollUp(); - eChildAlignment = SfxChildAlignment::NOALIGNMENT; - pDlg->Initialize( pInfo ); } diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index 80e04dd..8b072d2e 100644 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -166,8 +166,6 @@ SvxFontWorkChildWindow::SvxFontWorkChildWindow VclPtrInstance<SvxFontWorkDialog> pDlg(pBindings, this, _pParent); pWindow = pDlg.get(); - eChildAlignment = SfxChildAlignment::NOALIGNMENT; - pDlg->Initialize( pInfo ); } diff --git a/svx/source/dialog/hyperdlg.cxx b/svx/source/dialog/hyperdlg.cxx index c175121c..fa0da20 100644 --- a/svx/source/dialog/hyperdlg.cxx +++ b/svx/source/dialog/hyperdlg.cxx @@ -64,8 +64,6 @@ SvxHlinkDlgWrapper::SvxHlinkDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, pWindow->SetPosPixel( pInfo->aPos ); } - eChildAlignment = SfxChildAlignment::NOALIGNMENT; - SetHideNotDelete( true ); } diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 4b0af96..69d395f 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -102,8 +102,6 @@ SvxIMapDlgChildWindow::SvxIMapDlgChildWindow( vcl::Window* _pParent, sal_uInt16 if ( pInfo->nFlags & SfxChildWindowFlags::ZOOMIN ) pDlg->RollUp(); - eChildAlignment = SfxChildAlignment::NOALIGNMENT; - pDlg->Initialize( pInfo ); } diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index af49dcd..19b5d2a 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -75,8 +75,6 @@ SvxRubyChildWindow::SvxRubyChildWindow(vcl::Window* _pParent, sal_uInt16 nId,Sfx if (pInfo->nFlags & SfxChildWindowFlags::ZOOMIN) pDlg->RollUp(); - eChildAlignment = SfxChildAlignment::NOALIGNMENT; - pDlg->Initialize(pInfo); } diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index de7672f..1b43564 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -2274,7 +2274,6 @@ SvxSearchDialogWrapper::SvxSearchDialogWrapper( vcl::Window* _pParent, sal_uInt1 pBindings->Update( SID_SEARCH_OPTIONS ); pBindings->Update( SID_SEARCH_SEARCHSET ); pBindings->Update( SID_SEARCH_REPLACESET ); - eChildAlignment = SfxChildAlignment::NOALIGNMENT; dialog->bConstruct = false; } diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index 84d6b06..9a0982d 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -2910,8 +2910,6 @@ Svx3DChildWindow::Svx3DChildWindow( vcl::Window* _pParent, VclPtr<Svx3DWin> pWin = VclPtr<Svx3DWin>::Create( pBindings, this, _pParent ); pWindow = pWin; - eChildAlignment = SfxChildAlignment::NOALIGNMENT; - pWin->Initialize( pInfo ); } diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index d0b2bf7..f886682 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -2253,7 +2253,7 @@ namespace svxform { pWindow = VclPtr<DataNavigator>::Create( _pBindings, this, _pParent ); - eChildAlignment = SfxChildAlignment::RIGHT; + SetAlignment(SfxChildAlignment::RIGHT); pWindow->SetSizePixel( Size( 250, 400 ) ); static_cast<SfxDockingWindow*>(pWindow.get())->Initialize( _pInfo ); } diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index debf553..17451ae 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1997,7 +1997,6 @@ FmFilterNavigatorWinMgr::FmFilterNavigatorWinMgr( vcl::Window *_pParent, sal_uIn :SfxChildWindow( _pParent, _nId ) { pWindow = VclPtr<FmFilterNavigatorWin>::Create( _pBindings, this, _pParent ); - eChildAlignment = SfxChildAlignment::NOALIGNMENT; static_cast<SfxDockingWindow*>(pWindow.get())->Initialize( _pInfo ); } diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index b7256df..86d05a2 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -84,7 +84,6 @@ FmPropBrwMgr::FmPropBrwMgr( vcl::Window* _pParent, sal_uInt16 _nId, :SfxChildWindow(_pParent, _nId) { pWindow = VclPtr<FmPropBrw>::Create( ::comphelper::getProcessComponentContext(), _pBindings, this, _pParent, _pInfo ); - eChildAlignment = SfxChildAlignment::NOALIGNMENT; static_cast<SfxFloatingWindow*>(pWindow.get())->Initialize( _pInfo ); } diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx index 25a9da7..faabd49 100644 --- a/svx/source/form/fmexpl.cxx +++ b/svx/source/form/fmexpl.cxx @@ -615,7 +615,6 @@ namespace svxform :SfxChildWindow( _pParent, _nId ) { pWindow = VclPtr<NavigatorFrame>::Create( _pBindings, this, _pParent ); - eChildAlignment = SfxChildAlignment::NOALIGNMENT; static_cast<SfxDockingWindow*>(pWindow.get())->Initialize( _pInfo ); } diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index a58f813..83d28cd 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -426,7 +426,6 @@ FmFieldWinMgr::FmFieldWinMgr(vcl::Window* _pParent, sal_uInt16 _nId, { pWindow = VclPtr<FmFieldWin>::Create(_pBindings, this, _pParent); SetHideNotDelete(true); - eChildAlignment = SfxChildAlignment::NOALIGNMENT; static_cast<SfxFloatingWindow*>(pWindow.get())->Initialize( _pInfo ); } diff --git a/svx/source/tbxctrls/SvxColorChildWindow.cxx b/svx/source/tbxctrls/SvxColorChildWindow.cxx index a4ad23f..eb34587 100644 --- a/svx/source/tbxctrls/SvxColorChildWindow.cxx +++ b/svx/source/tbxctrls/SvxColorChildWindow.cxx @@ -38,7 +38,7 @@ SvxColorChildWindow::SvxColorChildWindow( vcl::Window* _pParent, pWindow = pWin; - eChildAlignment = SfxChildAlignment::BOTTOM; + SetAlignment(SfxChildAlignment::BOTTOM); pWin->Initialize( pInfo ); } diff --git a/sw/source/uibase/dialog/wordcountwrapper.cxx b/sw/source/uibase/dialog/wordcountwrapper.cxx index 1654667..3dfa2a7 100644 --- a/sw/source/uibase/dialog/wordcountwrapper.cxx +++ b/sw/source/uibase/dialog/wordcountwrapper.cxx @@ -26,8 +26,6 @@ SwWordCountWrapper::SwWordCountWrapper( vcl::Window *pParentWindow, xAbstDlg.reset(pFact->CreateSwWordCountDialog(pBindings, this, pParentWindow, pInfo)); assert(xAbstDlg && "Dialog construction failed!"); pWindow = xAbstDlg->GetWindow(); - - eChildAlignment = SfxChildAlignment::NOALIGNMENT; } SfxChildWinInfo SwWordCountWrapper::GetInfo() const diff --git a/sw/source/uibase/fldui/fldwrap.cxx b/sw/source/uibase/fldui/fldwrap.cxx index 3573174..a241e66 100644 --- a/sw/source/uibase/fldui/fldwrap.cxx +++ b/sw/source/uibase/fldui/fldwrap.cxx @@ -86,7 +86,6 @@ SwFieldDlgWrapper::SwFieldDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId, pDlgInterface = pDlg; pWindow = pDlg->GetWindow(); pDlg->Start(); - eChildAlignment = SfxChildAlignment::NOALIGNMENT; } // newly initialise dialog after Doc switch @@ -134,7 +133,6 @@ SwFieldDataOnlyDlgWrapper::SwFieldDataOnlyDlgWrapper( vcl::Window* _pParent, sal pDlg->ActivateDatabasePage(); pDlg->Start(); pDlg->Initialize( pInfo ); - eChildAlignment = SfxChildAlignment::NOALIGNMENT; } // re-init after doc activation diff --git a/sw/source/uibase/index/idxmrk.cxx b/sw/source/uibase/index/idxmrk.cxx index 8ffb760..6fe389b 100644 --- a/sw/source/uibase/index/idxmrk.cxx +++ b/sw/source/uibase/index/idxmrk.cxx @@ -67,7 +67,6 @@ SwInsertIdxMarkWrapper::SwInsertIdxMarkWrapper( vcl::Window *pParentWindow, pWindow = pAbstDlg->GetWindow(); pWindow->Show(); // at this point,because before pSh has to be initialized in ReInitDlg() // -> Show() will invoke StateChanged() and save pos - eChildAlignment = SfxChildAlignment::NOALIGNMENT; } SfxChildWinInfo SwInsertIdxMarkWrapper::GetInfo() const @@ -95,8 +94,6 @@ SwInsertAuthMarkWrapper::SwInsertAuthMarkWrapper( vcl::Window *pParentWindow, pAbstDlg = pFact->CreateAuthMarkFloatDlg(pBindings, this, pParentWindow, pInfo); OSL_ENSURE(pAbstDlg, "Dialog creation failed!"); pWindow = pAbstDlg->GetWindow(); - - eChildAlignment = SfxChildAlignment::NOALIGNMENT; } SfxChildWinInfo SwInsertAuthMarkWrapper::GetInfo() const diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index 702a7b82..8bd5a5c 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -624,7 +624,7 @@ SwInputChild::SwInputChild(vcl::Window* _pParent, pDispatch = pBindings->GetDispatcher(); pWindow = VclPtr<SwInputWindow>::Create( _pParent ); static_cast<SwInputWindow*>(pWindow.get())->ShowWin(); - eChildAlignment = SfxChildAlignment::LOWESTTOP; + SetAlignment(SfxChildAlignment::LOWESTTOP); } SwInputChild::~SwInputChild() commit 51ea8aeca8c3dc081c3ffcca0dd75c4bad48d992 Author: Noel Grandin <n...@peralex.com> Date: Fri Aug 21 15:52:44 2015 +0200 clean up whitespace in childwin.hxx a little Change-Id: Iefebe6b254f2c01b46b48ebaf7a6242e1bf80b62 diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index a9b45db..f55f2ea 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -109,11 +109,11 @@ class SfxChildWinContextArr_Impl; struct SFX2_DLLPUBLIC SfxChildWinFactory { - SfxChildWinCtor pCtor; // Factory method - sal_uInt16 nId; // ChildWindow-Id ( SlotId ) - SfxChildWinInfo aInfo; // Configuration - sal_uInt16 nPos; // Position in UI - SfxChildWinContextArr_Impl *pArr; // Array for Contexts + SfxChildWinCtor pCtor; // Factory method + sal_uInt16 nId; // ChildWindow-Id ( SlotId ) + SfxChildWinInfo aInfo; // Configuration + sal_uInt16 nPos; // Position in UI + SfxChildWinContextArr_Impl *pArr; // Array for Contexts SfxChildWinFactory( SfxChildWinCtor pTheCtor, sal_uInt16 nID, sal_uInt16 n ); ~SfxChildWinFactory(); @@ -135,9 +135,9 @@ public: void SetWindow( vcl::Window* pWin ) { pWindow=pWin; } - vcl::Window* GetWindow() const + vcl::Window* GetWindow() const { return pWindow; } - sal_uInt16 GetContextId() const + sal_uInt16 GetContextId() const { return nContextId; } FloatingWindow* GetFloatingWindow() const; @@ -167,9 +167,9 @@ protected: public: virtual ~SfxChildWindow(); void Destroy(); - vcl::Window* GetWindow() const + vcl::Window* GetWindow() const { return pWindow; } - vcl::Window* GetParent() const + vcl::Window* GetParent() const { return pParent; } SfxChildAlignment GetAlignment() const { return eChildAlignment; } @@ -184,13 +184,13 @@ public: { return nType; } void CreateContext( sal_uInt16 nContextId, SfxBindings& ); - sal_uInt16 GetContextId() const + sal_uInt16 GetContextId() const { return pContext ? pContext->GetContextId(): 0; } - vcl::Window* GetContextWindow() const + vcl::Window* GetContextWindow() const { return pContext ? pContext->GetWindow(): 0; } - vcl::Window* GetContextWindow( SfxModule *pModule ) const; + vcl::Window* GetContextWindow( SfxModule *pModule ) const; virtual SfxChildWinInfo GetInfo() const; void SaveStatus(const SfxChildWinInfo& rInfo); @@ -206,11 +206,11 @@ public: bool WantsFocus() const; virtual bool QueryClose(); - com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > GetFrame(); - void SetFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & ); + css::uno::Reference< css::frame::XFrame > GetFrame(); + void SetFrame( const css::uno::Reference< css::frame::XFrame > & ); SAL_DLLPRIVATE static void InitializeChildWinFactory_Impl(sal_uInt16, SfxChildWinInfo&); - void SetVisible_Impl( bool bVis ); + void SetVisible_Impl( bool bVis ); SAL_DLLPRIVATE void SetWorkWindow_Impl( SfxWorkWindow* ); SAL_DLLPRIVATE void Activate_Impl(); SAL_DLLPRIVATE void Deactivate_Impl(); commit 649287448e4f73a552c00b57db5cce31ba9b1663 Author: Noel Grandin <n...@peralex.com> Date: Fri Aug 21 15:30:24 2015 +0200 the implementation pointer of SfxChildWindow can be private Change-Id: I79366fe5abc98924e174dcbac83bbb8c053d59ce diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index 9dee7f6..a9b45db 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -154,9 +154,9 @@ class SFX2_DLLPUBLIC SfxChildWindow protected: SfxChildAlignment eChildAlignment; // Current ::com::sun::star::drawing::Alignment VclPtr<vcl::Window> pWindow; // actual contents - SfxChildWindow_Impl* pImp; // Implementation data private: + SfxChildWindow_Impl* pImp; // Implementation data SfxChildWindowContext* pContext; // With context-sensitive ChildWindows: // Annother window in pWindow SAL_DLLPRIVATE void ClearWorkwin(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits