sd/source/ui/framework/factories/FullScreenPane.cxx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)
New commits: commit 29cc83fc4d7b7c25c1ae0410a5149eab9886f842 Author: Matteo Casalin <matteo.casa...@yahoo.com> AuthorDate: Sun Feb 10 17:00:56 2019 +0100 Commit: Matteo Casalin <matteo.casa...@yahoo.com> CommitDate: Sun Feb 17 17:53:25 2019 +0100 Simplify by using startsWith() Change-Id: I88bede6de1c2070691d3ba992858d36efe6626b7 Reviewed-on: https://gerrit.libreoffice.org/67649 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casa...@yahoo.com> diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx b/sd/source/ui/framework/factories/FullScreenPane.cxx index 961e8f328202..e092d6fc9319 100644 --- a/sd/source/ui/framework/factories/FullScreenPane.cxx +++ b/sd/source/ui/framework/factories/FullScreenPane.cxx @@ -217,20 +217,13 @@ void FullScreenPane::ExtractArguments ( // Extract arguments from the resource URL. const util::URL aURL = rxPaneId->getFullResourceURL(); sal_Int32 nIndex = 0; + OUString sValue; while (nIndex >= 0) { const OUString aToken = aURL.Arguments.getToken(0, '&', nIndex); - if (!aToken.isEmpty()) + if (aToken.startsWith("ScreenNumber=", &sValue)) { - // Split at the first '='. - const sal_Int32 nAssign = aToken.indexOf('='); - const OUString sKey = aToken.copy(0, nAssign); - const OUString sValue = aToken.copy(nAssign+1); - - if (sKey == "ScreenNumber") - { - rnScreenNumberReturnValue = sValue.toInt32(); - } + rnScreenNumberReturnValue = sValue.toInt32(); } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits