cid#1607175 Overflowed constant
and cid#1606656 Overflowed constant Change-Id: I278d3745ca5d22defde8ab268e644e9ee312a3cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173751 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
@@ -71,9 +71,12 @@ namespace
|
||||
const auto nAfterSlash = (nFirstSlash != std::string_view::npos) ? (nFirstSlash + 1) : 0;
|
||||
// Update id attribute of topic
|
||||
{
|
||||
std::u16string_view::size_type nXhpSlash = rXhpRoot.rfind('/');
|
||||
const auto nAfterXhpSlash = (nXhpSlash != std::u16string_view::npos) ? (nXhpSlash + 1) : 0;
|
||||
|
||||
OString sNewID =
|
||||
OString::Concat(sID.subView( 0, nAfterSlash )) +
|
||||
rXhpRoot.substr( rXhpRoot.rfind('/') + 1 ) +
|
||||
rXhpRoot.substr( nAfterXhpSlash ) +
|
||||
sID.subView( sID.indexOf( '/', nAfterSlash ) );
|
||||
xmlSetProp(
|
||||
pReturn, reinterpret_cast<const xmlChar*>("id"),
|
||||
|
@@ -265,7 +265,8 @@ static void printConstructor(
|
||||
rtl::Reference< unoidl::Entity > const & entity, std::u16string_view name,
|
||||
std::vector< OUString > const & arguments)
|
||||
{
|
||||
o << "public " << OUString(name.substr(name.rfind('.') + 1)) << '(';
|
||||
std::u16string_view::size_type pos = name.rfind('.');
|
||||
o << "public " << OUString(name.substr((pos != std::u16string_view::npos) ? pos + 1 : 0)) << '(';
|
||||
printConstructorParameters(
|
||||
o, options, manager, sort, entity, name, arguments);
|
||||
o << ");\n";
|
||||
|
Reference in New Issue
Block a user