Kaydet (Commit) 7f8b1b58 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#440865 Logically dead code

seeing as we return early if eChild == SFX_CHILDWIN_OBJECTBAR
then the reset of the code that depends on that cannot happen

Change-Id: I1566ad9d5ef428e3c9e248df08b65d56bb83553e
üst 83490325
...@@ -1792,7 +1792,6 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, ...@@ -1792,7 +1792,6 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
Rectangle aOuterRect( GetTopRect_Impl() ); Rectangle aOuterRect( GetTopRect_Impl() );
aOuterRect.SetPos( pWorkWin->OutputToScreenPixel( aOuterRect.TopLeft() )); aOuterRect.SetPos( pWorkWin->OutputToScreenPixel( aOuterRect.TopLeft() ));
Rectangle aInnerRect( aOuterRect ); Rectangle aInnerRect( aOuterRect );
sal_Bool bTbx = (eChild == SFX_CHILDWIN_OBJECTBAR);
// The current affected window is included in the calculation of // The current affected window is included in the calculation of
// the inner rectangle! // the inner rectangle!
...@@ -1810,12 +1809,6 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, ...@@ -1810,12 +1809,6 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
aInnerRect.Top() += pCli->aSize.Height(); aInnerRect.Top() += pCli->aSize.Height();
break; break;
case SFX_ALIGN_TOOLBOXTOP:
// Toolbox has priority, if no higher Position
if ( bTbx && i <= nPos)
aInnerRect.Top() += pCli->aSize.Height();
break;
case SFX_ALIGN_HIGHESTTOP: case SFX_ALIGN_HIGHESTTOP:
// Always performed first // Always performed first
aInnerRect.Top() += pCli->aSize.Height(); aInnerRect.Top() += pCli->aSize.Height();
...@@ -1832,12 +1825,6 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, ...@@ -1832,12 +1825,6 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
aInnerRect.Bottom() -= pCli->aSize.Height(); aInnerRect.Bottom() -= pCli->aSize.Height();
break; break;
case SFX_ALIGN_TOOLBOXBOTTOM:
// Toolbox has priority, if no higher Position
if ( bTbx && i <= nPos)
aInnerRect.Bottom() -= pCli->aSize.Height();
break;
case SFX_ALIGN_LOWESTBOTTOM: case SFX_ALIGN_LOWESTBOTTOM:
// Always performed first // Always performed first
aInnerRect.Bottom() -= pCli->aSize.Height(); aInnerRect.Bottom() -= pCli->aSize.Height();
...@@ -1854,12 +1841,6 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, ...@@ -1854,12 +1841,6 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
aInnerRect.Left() += pCli->aSize.Width(); aInnerRect.Left() += pCli->aSize.Width();
break; break;
case SFX_ALIGN_TOOLBOXLEFT:
// Toolboxes come always last
if (bTbx && i <= nPos)
aInnerRect.Left() += pCli->aSize.Width();
break;
case SFX_ALIGN_FIRSTLEFT: case SFX_ALIGN_FIRSTLEFT:
// Always performed first // Always performed first
aInnerRect.Left() += pCli->aSize.Width(); aInnerRect.Left() += pCli->aSize.Width();
...@@ -1875,12 +1856,6 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, ...@@ -1875,12 +1856,6 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
aInnerRect.Right() -= pCli->aSize.Width(); aInnerRect.Right() -= pCli->aSize.Width();
break; break;
case SFX_ALIGN_TOOLBOXRIGHT:
// Toolboxes come always last
if (bTbx && i <= nPos)
aInnerRect.Right() -= pCli->aSize.Width();
break;
case SFX_ALIGN_FIRSTRIGHT: case SFX_ALIGN_FIRSTRIGHT:
// Is only counted if it is the current window // Is only counted if it is the current window
if (i == nPos) if (i == nPos)
......
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