[Libreoffice-commits] core.git: xmloff/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Aug 30 10:12:36 UTC 2021
xmloff/source/text/XMLTextFrameContext.cxx | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit 6669c1a06bcc3ce31c9c17c714fdf2c2e0e25360
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 30 09:22:47 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Aug 30 12:12:00 2021 +0200
ofz: MemorySanitizer: use-of-uninitialized-value
Change-Id: I99d8b2a831f54e9748954bdc946f0f29b250a6a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121265
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index fbe537dd424b..0ab223b3c109 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -891,8 +891,8 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl(
if( aIter.toView().find( '%' ) != std::string_view::npos )
{
sal_Int32 nTmp;
- ::sax::Converter::convertPercent( nTmp, aIter.toView() );
- nRelWidth = static_cast<sal_Int16>(nTmp);
+ if (::sax::Converter::convertPercent(nTmp, aIter.toView()))
+ nRelWidth = static_cast<sal_Int16>(nTmp);
}
else
{
@@ -917,8 +917,8 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl(
if( aIter.toView().find( '%' ) != std::string_view::npos )
{
sal_Int32 nTmp;
- ::sax::Converter::convertPercent( nTmp, aIter.toView() );
- nRelWidth = static_cast<sal_Int16>(nTmp);
+ if (::sax::Converter::convertPercent(nTmp, aIter.toView()))
+ nRelWidth = static_cast<sal_Int16>(nTmp);
}
else
{
@@ -933,8 +933,8 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl(
if( aIter.toView().find( '%' ) != std::string_view::npos )
{
sal_Int32 nTmp;
- ::sax::Converter::convertPercent( nTmp, aIter.toView() );
- nRelHeight = static_cast<sal_Int16>(nTmp);
+ if (::sax::Converter::convertPercent(nTmp, aIter.toView()))
+ nRelHeight = static_cast<sal_Int16>(nTmp);
}
else
{
@@ -964,8 +964,8 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl(
if( aIter.toView().find( '%' ) != std::string_view::npos )
{
sal_Int32 nTmp;
- ::sax::Converter::convertPercent( nTmp, aIter.toView() );
- nRelHeight = static_cast<sal_Int16>(nTmp);
+ if (::sax::Converter::convertPercent(nTmp, aIter.toView()))
+ nRelHeight = static_cast<sal_Int16>(nTmp);
}
else
{
More information about the Libreoffice-commits
mailing list