diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-02-10 17:00:56 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-02-17 17:53:25 +0100 |
commit | 29cc83fc4d7b7c25c1ae0410a5149eab9886f842 (patch) | |
tree | 46872342b9bf14f995b627a7f468d38448805104 /sd/source/ui/framework | |
parent | 4d341228fc9988fbf22695494197ace5a342426c (diff) |
Simplify by using startsWith()
Change-Id: I88bede6de1c2070691d3ba992858d36efe6626b7
Reviewed-on: https://gerrit.libreoffice.org/67649
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'sd/source/ui/framework')
-rw-r--r-- | sd/source/ui/framework/factories/FullScreenPane.cxx | 13 |
1 files changed, 3 insertions, 10 deletions
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(); } } } |