[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra/stage-singlecanvas-aakriti] plugins: rect element parsed
From: Aakriti Gupta <aakriti.a.gupta () gmail ! com>
Date: 2011-10-31 19:06:28
Message-ID: 20111031190628.33801A60A6 () git ! kde ! org
[Download RAW message or body]
Git commit 3a5dc1747b1eaecaec11c1836ab24320a6dad291 by Aakriti Gupta.
Committed on 31/10/2011 at 20:02.
Pushed by aakritigupta into branch 'stage-singlecanvas-aakriti'.
rect element parsed as a PVPShape if it contains 'calligra:viewport=yes'.
Else parsed as a normal rectanlge shape.
M +1 -1 plugins/pathshapes/rectangle/RectangleShape.cpp
M +3 -1 plugins/presentationviewportshape/PresentationViewPortShapeFactory.cpp
http://commits.kde.org/calligra/3a5dc1747b1eaecaec11c1836ab24320a6dad291
diff --git a/plugins/pathshapes/rectangle/RectangleShape.cpp \
b/plugins/pathshapes/rectangle/RectangleShape.cpp index 4f1cfb9..a1d3434 100644
--- a/plugins/pathshapes/rectangle/RectangleShape.cpp
+++ b/plugins/pathshapes/rectangle/RectangleShape.cpp
@@ -325,7 +325,7 @@ bool RectangleShape::saveSvg(SvgSavingContext &context)
bool RectangleShape::loadSvg(const KoXmlElement &element, SvgLoadingContext \
&context) {
- if(element.hasAttribute("calligra:viewport") && \
(element.attribute("calligra:viewport") == "Yes")){ + \
if(element.hasAttribute("calligra:viewport") && \
(element.attribute("calligra:viewport") == "Yes") || \
(element.attribute("calligra:viewport") == "yes")){ return false;
}
diff --git a/plugins/presentationviewportshape/PresentationViewPortShapeFactory.cpp \
b/plugins/presentationviewportshape/PresentationViewPortShapeFactory.cpp index \
0492dc9..bbed7e0 100644
--- a/plugins/presentationviewportshape/PresentationViewPortShapeFactory.cpp
+++ b/plugins/presentationviewportshape/PresentationViewPortShapeFactory.cpp
@@ -38,6 +38,7 @@ PresentationViewPortShapeFactory::PresentationViewPortShapeFactory(QObject \
* par
QList<QPair<QString, QStringList> > elementNamesList;
elementNamesList.append(qMakePair(QString(KoXmlNS::svg), QStringList("rect")));
+ elementNamesList.append(qMakePair(QString(KoXmlNS::svg), \
QStringList("calligra:frame"))); setXmlElements(elementNamesList);
}
@@ -46,8 +47,9 @@ KoShape \
*PresentationViewPortShapeFactory::createDefaultShape(KoResourceManager {
//qDebug () << "PVPFactory::createDefaultShape()";
PresentationViewPortShape *viewport = new PresentationViewPortShape();
+ qDebug() << "new PVP shape created";
viewport->setShapeId(PresentationViewPortShapeId);
-
+
return viewport;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic