diff options
Diffstat (limited to 'svtools/source/svhtml')
-rw-r--r-- | svtools/source/svhtml/parhtml.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index d1c588cd5e81..36b81ecf73c4 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -153,8 +153,7 @@ sal_uInt32 HTMLOption::GetNumber() const nToken<HTML_OPTION_CONTEXT_END) || nToken==HTML_O_VALUE, "GetNumber: Option not numerical" ); - String aTmp( aValue ); - aTmp.EraseLeadingChars(); + String aTmp(comphelper::string::stripStart(aValue, ' ')); sal_Int32 nTmp = aTmp.ToInt32(); return nTmp >= 0 ? (sal_uInt32)nTmp : 0; } @@ -164,8 +163,7 @@ sal_Int32 HTMLOption::GetSNumber() const DBG_ASSERT( (nToken>=HTML_OPTION_NUMBER_START && nToken<HTML_OPTION_NUMBER_END) || (nToken>=HTML_OPTION_CONTEXT_START && nToken<HTML_OPTION_CONTEXT_END), "GetSNumber: Option not numerical" ); - String aTmp( aValue ); - aTmp.EraseLeadingChars(); + String aTmp(comphelper::string::stripStart(aValue, ' ')); return aTmp.ToInt32(); } |