From kde-edu-devel Wed Apr 28 14:35:09 2010 From: "Miha Cancula" Date: Wed, 28 Apr 2010 14:35:09 +0000 To: kde-edu-devel Subject: [kde-edu]: Review Request: ObjectImpVisitor and polygons now work Message-Id: <20100428143509.21299.26167 () localhost> X-MARC-Message: https://marc.info/?l=kde-edu-devel&m=127246528814397 ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard.kde.org/r/3825/ ----------------------------------------------------------- Review request for KDE-Edu and Pino Toscano. Summary ------- As of r1044469, there are three separate polygon classes (FilledPolygonImp, ClosedPolygonalImp and OpenPolygonalImp) instead of one PolygonImp. The ObjectImpVisitor, however, was not updated to see the three new classes, causing Latex and XFig exporters (the ones who use visitors) to hang when a polygon of any kind was exported. The bug isn't listed on bugs.kde.org, so I suppose it's not a widely used feature, but I needed it. This patch replaces the ObjectImpVisitor::visit(PolygonalImp*) method with three methods for the new types, as well as adds them to the exporters. There are, however, two issues I have with this fix: 1. I think it's better to have separate visitor functions for each Polygon type, rather than one for AbstractPolygonImp. If that's not the case, I will update the diff. 2. I don't know enough about xfig and pstricks to properly modify the function for different types (there's only one for filled polygons). I can look into the documentation, but I'd be happy if someone with knowledge would copy and modify them. I'm also writing a new exporter for TikZ, which I need for school, but it doesn't work because of this bug. I will post it as soon as this one is accepted. Diffs ----- /trunk/KDE/kdeedu/kig/filters/latexexporter.cc 1120059 /trunk/KDE/kdeedu/kig/filters/xfigexporter.cc 1120059 /trunk/KDE/kdeedu/kig/objects/object_imp.h 1120059 /trunk/KDE/kdeedu/kig/objects/object_imp.cc 1120059 Diff: http://reviewboard.kde.org/r/3825/diff Testing ------- Tested on my Ubuntu with KDE compiled from trunk, exporting Polygons to Latex and XFig works without hanging. Exporting open or closed polygonal lines currently produces no output. Thanks, Miha _______________________________________________ kde-edu mailing list kde-edu@mail.kde.org https://mail.kde.org/mailman/listinfo/kde-edu