summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2019-02-09 18:23:43 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2019-02-13 07:47:04 +0100
commit6975073dc1e44025cd7863feadac5d52443a268e (patch)
tree712aebe7605b61aa51c1d3e9c96779ef3db94389 /sfx2
parent972b9968cd8bd70bfb39e3307cb5097302682c31 (diff)
Use indexed getToken() and fix integer type
nType was defined as sal_uInt32, but initialized by a toInt32 and provided to setAutoloadSecs() which accepts sal_Int32. Change-Id: I78eb5426ddab7726ee538005cc3aa732b66ce1bf Reviewed-on: https://gerrit.libreoffice.org/67628 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/objmisc.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 84e0b6660f49..bb5553d4991c 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1432,8 +1432,9 @@ void SfxHeaderAttributes_Impl::SetAttribute( const SvKeyValue& rKV )
const OUString& aValue = rKV.GetValue();
if( rKV.GetKey().equalsIgnoreAsciiCase("refresh") && !rKV.GetValue().isEmpty() )
{
- sal_uInt32 nTime = aValue.getToken( 0, ';' ).toInt32() ;
- const OUString aURL = comphelper::string::strip(aValue.getToken( 1, ';' ), ' ');
+ sal_Int32 nIdx{ 0 };
+ const sal_Int32 nTime{ aValue.getToken( 0, ';', nIdx ).toInt32() };
+ const OUString aURL{ comphelper::string::strip(aValue.getToken( 0, ';', nIdx ), ' ') };
uno::Reference<document::XDocumentProperties> xDocProps(
pDoc->getDocProperties());
if( aURL.startsWithIgnoreAsciiCase( "url=" ) )