summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 2e5bb65435ec..24d5585137fa 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -1169,7 +1169,15 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
auto & rEntry = aTabRows.GetEntry(nIndex);
tools::Long nNewPosition = rEntry.nPos + nOffset;
nNewPosition = std::clamp(nNewPosition, rEntry.nMin, rEntry.nMax - constDistanceOffset);
+ tools::Long nActualOffset = nNewPosition - rEntry.nPos;
rEntry.nPos = nNewPosition;
+ // Maintain the size of the other rows
+ for (size_t i = nIndex + 1; i < aTabRows.Count(); ++i)
+ {
+ auto& rNextEntry = aTabRows.GetEntry(i);
+ rNextEntry.nPos += nActualOffset;
+ }
+ aTabRows.SetRight(aTabRows.GetRight() + nActualOffset);
}
rSh.SetTabRows(aTabRows, false);