Commit 9954ff95 authored by Boudewijn Rempt's avatar Boudewijn Rempt

CID 248593: Identical code for different branches (IDENTICAL_BRANCHES)

identical_branches: The same code is executed regardless of whether
pattern->referenceCoordinates() == 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 56bf0036
......@@ -508,17 +508,10 @@ QString SvgStyleWriter::saveSvgVectorPattern(QSharedPointer<KoVectorPatternBackg
const QRectF rect = pattern->referenceRect();
if (pattern->referenceCoordinates() == 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());
SvgUtil::writeTransformAttributeLazy("patternTransform", pattern->patternTransform(), 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