diff options
-rw-r--r-- | sd/source/ui/slidesorter/view/SlsLayouter.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sd/source/ui/slidesorter/view/SlsLayouter.cxx b/sd/source/ui/slidesorter/view/SlsLayouter.cxx index 2e298bd4c138..d628965d8b87 100644 --- a/sd/source/ui/slidesorter/view/SlsLayouter.cxx +++ b/sd/source/ui/slidesorter/view/SlsLayouter.cxx @@ -560,11 +560,15 @@ sal_Int32 Layouter::Implementation::GetRowAtPosition ( // When inside the gap below then nYPosition is not over a page // object. if (nDistanceIntoGap > 0) - nRow = ResolvePositionInGap ( + { + sal_Int32 nResolvedRow = ResolvePositionInGap( nDistanceIntoGap, eGapMembership, nRow, mnVerticalGap); + if (!bIncludeBordersAndGaps || nResolvedRow != -1) + nRow = nResolvedRow; + } } else if (bIncludeBordersAndGaps) { @@ -600,11 +604,15 @@ sal_Int32 Layouter::Implementation::GetColumnAtPosition ( // When inside the gap at the right then nXPosition is not over a // page object. if (nDistanceIntoGap > 0) - nColumn = ResolvePositionInGap ( + { + sal_Int32 nResolvedColumn = ResolvePositionInGap( nDistanceIntoGap, eGapMembership, nColumn, mnHorizontalGap); + if (!bIncludeBordersAndGaps || nResolvedColumn != -1) + nColumn = nResolvedColumn; + } } else if (bIncludeBordersAndGaps) { |