summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lotuswordpro/source/filter/lwpparastyle.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwpparastyle.cxx b/lotuswordpro/source/filter/lwpparastyle.cxx
index 651de9b73d13..9ebf5e7b3303 100644
--- a/lotuswordpro/source/filter/lwpparastyle.cxx
+++ b/lotuswordpro/source/filter/lwpparastyle.cxx
@@ -453,9 +453,9 @@ void LwpParaStyle::ApplyIndent(LwpPara* pPara, XFParaStyle* pParaStyle, LwpInden
sal_Int32 Amount = pParentIndent->GetMAll();
if (relative == LwpIndentOverride::RELATIVE_FIRST)
- Amount += pParentIndent->GetMFirst();
+ Amount = o3tl::saturating_add(Amount, pParentIndent->GetMFirst());
else if (relative == LwpIndentOverride::RELATIVE_REST)
- Amount += pParentIndent->GetMRest();
+ Amount = o3tl::saturating_add(Amount, pParentIndent->GetMRest());
pTotalIndent->SetMAll(o3tl::saturating_add(Amount, pTotalIndent->GetMAll()));
pTotalIndent->SetMRight(o3tl::saturating_add(pParentIndent->GetMRight(), pTotalIndent->GetMRight()));