summaryrefslogtreecommitdiff
path: root/sfx2/source/sidebar
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-19 14:35:03 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-03-19 21:05:10 +0100
commitbd7e258bac69f3b9f9e87128aacb989d23e24d4f (patch)
tree021f385f0a971af769321d46f3356214013422d3 /sfx2/source/sidebar
parent2f30b6af9ed727a967947b870b56689046f4a745 (diff)
cid#1473847 Logically dead code
Change-Id: Id8973910097844602f00bdc491656ea6c983413e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112751 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/sidebar')
-rw-r--r--sfx2/source/sidebar/DeckLayouter.cxx26
1 files changed, 11 insertions, 15 deletions
diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx
index 36d6357ef305..3752e7df8fe4 100644
--- a/sfx2/source/sidebar/DeckLayouter.cxx
+++ b/sfx2/source/sidebar/DeckLayouter.cxx
@@ -192,16 +192,21 @@ void LayoutPanels (
// size:
// Use the unmodified preferred height for all panels.
- LayoutMode eMode (MinimumOrLarger);
+ LayoutMode eMode(MinimumOrLarger);
if (bShowVerticalScrollBar)
+ {
eMode = Preferred;
- else if (nTotalPreferredHeight <= nAvailableHeight)
- eMode = PreferredOrLarger;
- else
- eMode = MinimumOrLarger;
- if (eMode != Preferred)
+ const sal_Int32 nContentHeight(nTotalPreferredHeight + nTotalDecorationHeight);
+ SetupVerticalScrollBar(rVerticalScrollBar, nContentHeight, aBox.GetHeight());
+ }
+ else
{
+ if (nTotalPreferredHeight <= nAvailableHeight)
+ eMode = PreferredOrLarger;
+ else
+ eMode = MinimumOrLarger;
+
const sal_Int32 nTotalHeight (eMode==MinimumOrLarger ? nTotalMinimumHeight : nTotalPreferredHeight);
DistributeHeights(
@@ -211,15 +216,6 @@ void LayoutPanels (
eMode==MinimumOrLarger);
}
- if (bShowVerticalScrollBar)
- {
- const sal_Int32 nContentHeight(
- eMode==Preferred
- ? nTotalPreferredHeight + nTotalDecorationHeight
- : aBox.GetHeight());
- SetupVerticalScrollBar(rVerticalScrollBar, nContentHeight, aBox.GetHeight());
- }
-
const sal_Int32 nUsedHeight(PlacePanels(rLayoutItems, eMode));
rMinimalHeight = nUsedHeight;
}