diff options
Diffstat (limited to 'sw/source/uibase/uiview/viewtab.cxx')
-rw-r--r-- | sw/source/uibase/uiview/viewtab.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index 24d5585137fa..a454b7fd87a6 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -1136,7 +1136,10 @@ void SwView::ExecTabWin( SfxRequest const & rReq ) { auto & rEntry = aTabCols.GetEntry(nIndex); tools::Long nNewPosition = rEntry.nPos + nOffset; - nNewPosition = std::clamp(nNewPosition, rEntry.nMin, rEntry.nMax - constDistanceOffset); + tools::Long nMax = rEntry.nMax - constDistanceOffset; + if (nMax < rEntry.nMin) + nMax = rEntry.nMin; + nNewPosition = std::clamp(nNewPosition, rEntry.nMin, nMax); rEntry.nPos = nNewPosition; } |