[Libreoffice-commits] libvisio.git: src/lib
Fridrich Å trba
fridrich.strba at bluewin.ch
Wed Nov 20 07:46:29 PST 2013
src/lib/VSDContentCollector.cpp | 10 +++++++---
src/lib/VSDOutputElementList.cpp | 31 +++++++++++++++----------------
src/lib/VSDOutputElementList.h | 4 ++--
3 files changed, 24 insertions(+), 21 deletions(-)
New commits:
commit ebef8c8a917fa6e80c1914cbce35ac1f7bed1cc9
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Wed Nov 20 16:46:06 2013 +0100
Folding paths into propLists
Change-Id: I7835be8ec70392e1bc5c596566a113c3da8f2012
diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp
index a9537d3..4207719 100644
--- a/src/lib/VSDContentCollector.cpp
+++ b/src/lib/VSDContentCollector.cpp
@@ -312,7 +312,9 @@ void libvisio::VSDContentCollector::_flushCurrentPath()
for (unsigned i = 0; i < tmpPath.size(); ++i)
path.append(tmpPath[i]);
m_shapeOutputDrawing->addStyle(fillPathProps, librevenge::RVNGPropertyListVector());
- m_shapeOutputDrawing->addPath(path);
+ librevenge::RVNGPropertyList propList;
+ propList.insert("svg:d", path);
+ m_shapeOutputDrawing->addPath(propList);
}
}
m_currentFillGeometry.clear();
@@ -393,7 +395,9 @@ void libvisio::VSDContentCollector::_flushCurrentPath()
for (unsigned i = 0; i < tmpPath.size(); ++i)
path.append(tmpPath[i]);
m_shapeOutputDrawing->addStyle(linePathProps, librevenge::RVNGPropertyListVector());
- m_shapeOutputDrawing->addPath(path);
+ librevenge::RVNGPropertyList propList;
+ propList.insert("svg:d", path);
+ m_shapeOutputDrawing->addPath(propList);
}
}
m_currentLineGeometry.clear();
@@ -477,7 +481,7 @@ void libvisio::VSDContentCollector::_flushText()
m_paraFormats[iPara].charCount = numCharsInText;
}
- m_shapeOutputText->addStartTextObject(textBlockProps, librevenge::RVNGPropertyListVector());
+ m_shapeOutputText->addStartTextObject(textBlockProps);
unsigned int charIndex = 0;
unsigned int paraCharCount = 0;
diff --git a/src/lib/VSDOutputElementList.cpp b/src/lib/VSDOutputElementList.cpp
index 9fe4a66..0af3aa2 100644
--- a/src/lib/VSDOutputElementList.cpp
+++ b/src/lib/VSDOutputElementList.cpp
@@ -62,15 +62,15 @@ private:
class VSDPathOutputElement : public VSDOutputElement
{
public:
- VSDPathOutputElement(const librevenge::RVNGPropertyListVector &propListVec);
+ VSDPathOutputElement(const librevenge::RVNGPropertyList &propList);
virtual ~VSDPathOutputElement() {}
virtual void draw(librevenge::RVNGDrawingInterface *painter);
virtual VSDOutputElement *clone()
{
- return new VSDPathOutputElement(m_propListVec);
+ return new VSDPathOutputElement(m_propList);
}
private:
- librevenge::RVNGPropertyListVector m_propListVec;
+ librevenge::RVNGPropertyList m_propList;
};
@@ -92,16 +92,15 @@ private:
class VSDStartTextObjectOutputElement : public VSDOutputElement
{
public:
- VSDStartTextObjectOutputElement(const librevenge::RVNGPropertyList &propList, const librevenge::RVNGPropertyListVector &propListVec);
+ VSDStartTextObjectOutputElement(const librevenge::RVNGPropertyList &propList);
virtual ~VSDStartTextObjectOutputElement() {}
virtual void draw(librevenge::RVNGDrawingInterface *painter);
virtual VSDOutputElement *clone()
{
- return new VSDStartTextObjectOutputElement(m_propList, m_propListVec);
+ return new VSDStartTextObjectOutputElement(m_propList);
}
private:
librevenge::RVNGPropertyList m_propList;
- librevenge::RVNGPropertyListVector m_propListVec;
};
@@ -229,13 +228,13 @@ void libvisio::VSDStyleOutputElement::draw(librevenge::RVNGDrawingInterface *pai
}
-libvisio::VSDPathOutputElement::VSDPathOutputElement(const librevenge::RVNGPropertyListVector &propListVec) :
- m_propListVec(propListVec) {}
+libvisio::VSDPathOutputElement::VSDPathOutputElement(const librevenge::RVNGPropertyList &propList) :
+ m_propList(propList) {}
void libvisio::VSDPathOutputElement::draw(librevenge::RVNGDrawingInterface *painter)
{
if (painter)
- painter->drawPath(m_propListVec);
+ painter->drawPath(m_propList);
}
@@ -249,13 +248,13 @@ void libvisio::VSDGraphicObjectOutputElement::draw(librevenge::RVNGDrawingInterf
}
-libvisio::VSDStartTextObjectOutputElement::VSDStartTextObjectOutputElement(const librevenge::RVNGPropertyList &propList, const librevenge::RVNGPropertyListVector &propListVec) :
- m_propList(propList), m_propListVec(propListVec) {}
+libvisio::VSDStartTextObjectOutputElement::VSDStartTextObjectOutputElement(const librevenge::RVNGPropertyList &propList) :
+ m_propList(propList) {}
void libvisio::VSDStartTextObjectOutputElement::draw(librevenge::RVNGDrawingInterface *painter)
{
if (painter)
- painter->startTextObject(m_propList, m_propListVec);
+ painter->startTextObject(m_propList);
}
libvisio::VSDOpenSpanOutputElement::VSDOpenSpanOutputElement(const librevenge::RVNGPropertyList &propList) :
@@ -383,9 +382,9 @@ void libvisio::VSDOutputElementList::addStyle(const librevenge::RVNGPropertyList
m_elements.push_back(new VSDStyleOutputElement(propList, propListVec));
}
-void libvisio::VSDOutputElementList::addPath(const librevenge::RVNGPropertyListVector &propListVec)
+void libvisio::VSDOutputElementList::addPath(const librevenge::RVNGPropertyList &propList)
{
- m_elements.push_back(new VSDPathOutputElement(propListVec));
+ m_elements.push_back(new VSDPathOutputElement(propList));
}
void libvisio::VSDOutputElementList::addGraphicObject(const librevenge::RVNGPropertyList &propList)
@@ -393,9 +392,9 @@ void libvisio::VSDOutputElementList::addGraphicObject(const librevenge::RVNGProp
m_elements.push_back(new VSDGraphicObjectOutputElement(propList));
}
-void libvisio::VSDOutputElementList::addStartTextObject(const librevenge::RVNGPropertyList &propList, const librevenge::RVNGPropertyListVector &propListVec)
+void libvisio::VSDOutputElementList::addStartTextObject(const librevenge::RVNGPropertyList &propList)
{
- m_elements.push_back(new VSDStartTextObjectOutputElement(propList, propListVec));
+ m_elements.push_back(new VSDStartTextObjectOutputElement(propList));
}
void libvisio::VSDOutputElementList::addOpenParagraph(const librevenge::RVNGPropertyList &propList, const librevenge::RVNGPropertyListVector &propListVec)
diff --git a/src/lib/VSDOutputElementList.h b/src/lib/VSDOutputElementList.h
index d65e946..67051fb 100644
--- a/src/lib/VSDOutputElementList.h
+++ b/src/lib/VSDOutputElementList.h
@@ -51,9 +51,9 @@ public:
void append(const VSDOutputElementList &elementList);
void draw(librevenge::RVNGDrawingInterface *painter) const;
void addStyle(const librevenge::RVNGPropertyList &propList, const librevenge::RVNGPropertyListVector &propListVec);
- void addPath(const librevenge::RVNGPropertyListVector &propListVec);
+ void addPath(const librevenge::RVNGPropertyList &propList);
void addGraphicObject(const librevenge::RVNGPropertyList &propList);
- void addStartTextObject(const librevenge::RVNGPropertyList &propList, const librevenge::RVNGPropertyListVector &propListVec);
+ void addStartTextObject(const librevenge::RVNGPropertyList &propList);
void addOpenParagraph(const librevenge::RVNGPropertyList &propList, const librevenge::RVNGPropertyListVector &propListVec);
void addOpenSpan(const librevenge::RVNGPropertyList &propList);
void addInsertText(const librevenge::RVNGString &text);
More information about the Libreoffice-commits
mailing list