Commit a06f9205 authored by Boudewijn Rempt's avatar Boudewijn Rempt

CID 248911: Identical code for different branches (IDENTICAL_BRANCHES)

identical_branches: The same code is executed regardless of whether
clipMask->coordinates() == KoFlake::ObjectBoundingBox is true, because the
'then' and 'else' branches are identical. Should one of the branches be
modified, or the entire 'if' statement replaced?
parent 9954ff95
......@@ -242,18 +242,10 @@ void SvgStyleWriter::saveSvgMasking(KoShape *shape, SvgSavingContext &context)
const QRectF rect = clipMask->maskRect();
// think funny duplication? please note the 'pt' suffix! :)
if (clipMask->coordinates() == KoFlake::ObjectBoundingBox) {
context.styleWriter().addAttribute("x", rect.x());
context.styleWriter().addAttribute("y", rect.y());
context.styleWriter().addAttribute("width", rect.width());
context.styleWriter().addAttribute("height", rect.height());
} else {
context.styleWriter().addAttribute("x", rect.x());
context.styleWriter().addAttribute("y", rect.y());
context.styleWriter().addAttribute("width", rect.width());
context.styleWriter().addAttribute("height", rect.height());
}
context.styleWriter().addAttribute("x", rect.x());
context.styleWriter().addAttribute("y", rect.y());
context.styleWriter().addAttribute("width", rect.width());
context.styleWriter().addAttribute("height", rect.height());
embedShapes(clipMask->shapes(), context.styleWriter());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment