diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2018-11-06 12:01:34 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-08-22 11:52:21 +0200 |
commit | 71e6fff84a0cf66de6c5192ceb104f7bc2285909 (patch) | |
tree | cc2240a08bba6ea5b56aa5dbeca03e79f444d3a2 | |
parent | 5de96e3a7903f7c5136a76be03969f737145d1f8 (diff) |
tdf#121198: fix crash in SdrPage::GetPageNum()
Regression from 9348b322a5c230dfcc2231661b73e480b130fcd9
Reviewed-on: https://gerrit.libreoffice.org/62952
Tested-by: Jenkins
(cherry picked from commit ebd24b39eee5ac72d33ad731e31469cf8f330631)
Reviewed-on: https://gerrit.libreoffice.org/62965
Reviewed-by: Xisco FaulĂ <xiscofauli@libreoffice.org>
(cherry picked from commit 86d6ef3371b425d8ec1347902c54597c2749cae7)
Change-Id: Ibf9d6b65f0dbcc3a751e3ac5f3dbc28d908d6c25
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx b/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx index 6e940bf7e899..980a16362e85 100644 --- a/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx +++ b/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx @@ -220,10 +220,7 @@ bool InsertionIndicatorHandler::IsInsertionTrivial ( // to check that the insertion position is not directly in front or // directly behind the selection and thus moving the selection there // would not change the model. - if (nInsertionIndex<nFirstIndex || nInsertionIndex>(nLastIndex+1)) - return false; - - return true; + return nInsertionIndex >= nFirstIndex && nInsertionIndex <= (nLastIndex+1); } bool InsertionIndicatorHandler::IsInsertionTrivial (const sal_Int8 nDndAction) |