Kaydet (Commit) 9af8fe36 authored tarafından Caolán McNamara's avatar Caolán McNamara

these checks for DockingWindows are all wrong

the type is WINDOW_DOCKINGWINDOW not RSC_DOCKINGWINDOW

maybe better drop the wrong paths ? But try and do what
the original intent might have been.

Change-Id: Ibbcf885d82e498d38c1c82b9b647ef3cdd8f146a
üst 65975508
...@@ -327,14 +327,11 @@ void SfxChildWindow::SaveStatus(const SfxChildWinInfo& rInfo) ...@@ -327,14 +327,11 @@ void SfxChildWindow::SaveStatus(const SfxChildWinInfo& rInfo)
pImp->pFact->aInfo = rInfo; pImp->pFact->aInfo = rInfo;
} }
void SfxChildWindow::SetAlignment(SfxChildAlignment eAlign) void SfxChildWindow::SetAlignment(SfxChildAlignment eAlign)
{ {
eChildAlignment = eAlign; eChildAlignment = eAlign;
} }
SfxChildWinInfo SfxChildWindow::GetInfo() const SfxChildWinInfo SfxChildWindow::GetInfo() const
{ {
...@@ -348,14 +345,14 @@ SfxChildWinInfo SfxChildWindow::GetInfo() const ...@@ -348,14 +345,14 @@ SfxChildWinInfo SfxChildWindow::GetInfo() const
nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT ); nMask |= ( WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT );
aInfo.aWinState = static_cast<SystemWindow*>(pWindow.get())->GetWindowState( nMask ); aInfo.aWinState = static_cast<SystemWindow*>(pWindow.get())->GetWindowState( nMask );
} }
else if ( pWindow->GetType() == RSC_DOCKINGWINDOW ) else if (DockingWindow* pDockingWindow = dynamic_cast<DockingWindow*>(pWindow.get()))
{ {
if (static_cast<DockingWindow*>(pWindow.get())->GetFloatingWindow() ) if (pDockingWindow->GetFloatingWindow())
aInfo.aWinState = static_cast<DockingWindow*>(pWindow.get())->GetFloatingWindow()->GetWindowState(); aInfo.aWinState = pDockingWindow->GetFloatingWindow()->GetWindowState();
else else if (SfxDockingWindow* pSfxDockingWindow = dynamic_cast<SfxDockingWindow*>(pDockingWindow))
{ {
SfxChildWinInfo aTmpInfo; SfxChildWinInfo aTmpInfo;
static_cast<SfxDockingWindow*>(pWindow.get())->FillInfo( aTmpInfo ); pSfxDockingWindow->FillInfo( aTmpInfo );
aInfo.aExtraString = aTmpInfo.aExtraString; aInfo.aExtraString = aTmpInfo.aExtraString;
} }
} }
...@@ -365,13 +362,11 @@ SfxChildWinInfo SfxChildWindow::GetInfo() const ...@@ -365,13 +362,11 @@ SfxChildWinInfo SfxChildWindow::GetInfo() const
return aInfo; return aInfo;
} }
sal_uInt16 SfxChildWindow::GetPosition() sal_uInt16 SfxChildWindow::GetPosition()
{ {
return pImp->pFact->nPos; return pImp->pFact->nPos;
} }
void SfxChildWindow::InitializeChildWinFactory_Impl(sal_uInt16 nId, SfxChildWinInfo& rInfo) void SfxChildWindow::InitializeChildWinFactory_Impl(sal_uInt16 nId, SfxChildWinInfo& rInfo)
{ {
// load configuration // load configuration
......
...@@ -1593,12 +1593,16 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, ...@@ -1593,12 +1593,16 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
{ {
if ( pChild->GetType() == nId ) if ( pChild->GetType() == nId )
{ {
if ( pChild->GetWindow()->GetType() == RSC_DOCKINGWINDOW ) if (SfxDockingWindow* pSfxDockingWindow = dynamic_cast<SfxDockingWindow*>(pChild->GetWindow()))
{
// it's a DockingWindow // it's a DockingWindow
pDockWin = static_cast<SfxDockingWindow*>( pChild->GetWindow() ); pDockWin = pSfxDockingWindow;
}
else else
{
// FloatingWindow or ModelessDialog // FloatingWindow or ModelessDialog
pWin = pChild->GetWindow(); pWin = pChild->GetWindow();
}
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment