[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bcalligra=5D_flow/plugins/dockers/stencilboxdocker?=
From: Yue Liu <opuspace () gmail ! com>
Date: 2011-05-22 10:16:23
Message-ID: 20110522101623.AEA6CA60A4 () git ! kde ! org
[Download RAW message or body]
Git commit 5504f7f82b0565ca411d599d4bef0e2f77a099a8 by Yue Liu.
Committed on 22/05/2011 at 19:48.
Pushed by liu into branch 'master'.
Fixed bug loading stencils converted from svg files
M +11 -4 flow/plugins/dockers/stencilboxdocker/StencilShapeFactory.cpp
http://commits.kde.org/calligra/5504f7f82b0565ca411d599d4bef0e2f77a099a8
diff --git a/flow/plugins/dockers/stencilboxdocker/StencilShapeFactory.cpp \
b/flow/plugins/dockers/stencilboxdocker/StencilShapeFactory.cpp index \
3b955d2..54512bf 100644
--- a/flow/plugins/dockers/stencilboxdocker/StencilShapeFactory.cpp
+++ b/flow/plugins/dockers/stencilboxdocker/StencilShapeFactory.cpp
@@ -100,14 +100,21 @@ KoShape \
*StencilShapeFactory::createDefaultShape(KoResourceManager *documentReso return \
shape; }
- KoXmlNode child = page.firstChild();
+ KoXmlNode group = KoXml::namedItemNS(page, KoXmlNS::draw, "g");
+ if (group.isNull()) {
+ kError() << "No group found!" << endl;
+ //emit loadingFailed(i18n("No group found in file: %1", m_path));
+ delete store;
+ return shape;
+ }
+
KoXmlElement n_shape;
- while (!child.isNull()) {
- n_shape = child.toElement();
+ while (!group.isNull()) {
+ n_shape = group.toElement();
if (!n_shape.isNull()) {
break;
}
- child = child.nextSibling();
+ group = group.nextSibling();
}
if (n_shape.isNull()) {
kError() << "No shapes found!" << endl;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic