diff options
Diffstat (limited to 'cpputools/source/unoexe/unoexe.cxx')
-rw-r--r-- | cpputools/source/unoexe/unoexe.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx index e5f6cc927c23..31365aa43c7b 100644 --- a/cpputools/source/unoexe/unoexe.cxx +++ b/cpputools/source/unoexe/unoexe.cxx @@ -98,13 +98,13 @@ static bool readOption( OUString * pValue, const char * pOpt, if (aArg.getLength() < aOpt.getLength()) return false; - if (aOpt.equalsIgnoreAsciiCase( aArg.copy(1) )) + if (aOpt.equalsIgnoreAsciiCase( aArg.subView(1, aArg.getLength()-1) )) { // take next argument ++(*pnIndex); rtl_getAppCommandArg(*pnIndex, &pValue->pData); - if (*pnIndex >= rtl_getAppCommandArgCount() || pValue->copy(1) == dash) + if (*pnIndex >= rtl_getAppCommandArgCount() || pValue->subView(1) == dash) { throw RuntimeException( "incomplete option \"-" + aOpt + "\" given!" ); } @@ -128,7 +128,7 @@ static bool readOption( bool * pbOpt, const char * pOpt, { OUString aOpt = OUString::createFromAscii(pOpt); - if(aArg.startsWith("--") && aOpt == aArg.copy(2)) + if(aArg.startsWith("--") && aOpt == aArg.subView(2)) { ++(*pnIndex); *pbOpt = true; |