diff options
-rw-r--r-- | include/xmloff/unointerfacetouniqueidentifiermapper.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/xmloff/unointerfacetouniqueidentifiermapper.hxx b/include/xmloff/unointerfacetouniqueidentifiermapper.hxx index 50b70eee5346..8a715a398dd8 100644 --- a/include/xmloff/unointerfacetouniqueidentifiermapper.hxx +++ b/include/xmloff/unointerfacetouniqueidentifiermapper.hxx @@ -75,7 +75,7 @@ private: void insertReference( const OUString& rIdentifier, const css::uno::Reference< css::uno::XInterface >& rInterface ); IdMap_t maEntries; - sal_Int32 mnNextId; + sal_uInt32 mnNextId; }; } diff --git a/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx b/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx index 795aa5838218..5e144d7f7053 100644 --- a/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx +++ b/xmloff/source/core/unointerfacetouniqueidentifiermapper.cxx @@ -166,7 +166,7 @@ void UnoInterfaceToUniqueIdentifierMapper::insertReference( const OUString& rIde // so we make sure we will never generate // an integer value like this one sal_Int32 nId = rIdentifier.copy(2).toInt32(); - if( mnNextId <= nId ) + if (nId > 0 && mnNextId <= static_cast<sal_uInt32>(nId)) mnNextId = nId + 1; } |