summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-11-27 08:17:33 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-11-27 12:12:02 +0100
commitd43aa095b47bfb7e82a3c5a7b3b5149550716640 (patch)
treecac5f4ea432022b64b321356d9c5e9c846218379 /writerperfect
parent2e5508a17660401e1b4b489dbc9f70b978745b75 (diff)
EPUB export: handle image borders
This requires handling of graphic styles. Change-Id: I74d4ee882b91192da44d8d7bbd88c1a66e97695f Reviewed-on: https://gerrit.libreoffice.org/45305 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/qa/unit/EPUBExportTest.cxx12
-rw-r--r--writerperfect/qa/unit/data/writer/epubexport/image-border.fodt36
-rw-r--r--writerperfect/source/writer/exp/XMLTextFrameContext.cxx20
-rw-r--r--writerperfect/source/writer/exp/txtstyli.cxx45
-rw-r--r--writerperfect/source/writer/exp/txtstyli.hxx2
-rw-r--r--writerperfect/source/writer/exp/xmlfmt.cxx25
-rw-r--r--writerperfect/source/writer/exp/xmlfmt.hxx9
-rw-r--r--writerperfect/source/writer/exp/xmlimp.cxx24
-rw-r--r--writerperfect/source/writer/exp/xmlimp.hxx4
9 files changed, 141 insertions, 36 deletions
diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx
index 5f74ef71ea59..18865e4d8c4b 100644
--- a/writerperfect/qa/unit/EPUBExportTest.cxx
+++ b/writerperfect/qa/unit/EPUBExportTest.cxx
@@ -73,6 +73,7 @@ public:
void testSection();
void testList();
void testImage();
+ void testImageBorder();
void testTable();
void testTableRowSpan();
void testTableCellBorder();
@@ -101,6 +102,7 @@ public:
CPPUNIT_TEST(testSection);
CPPUNIT_TEST(testList);
CPPUNIT_TEST(testImage);
+ CPPUNIT_TEST(testImageBorder);
CPPUNIT_TEST(testTable);
CPPUNIT_TEST(testTableRowSpan);
CPPUNIT_TEST(testTableCellBorder);
@@ -481,6 +483,16 @@ void EPUBExportTest::testImage()
assertXPath(mpXmlDoc, "//xhtml:p/xhtml:img", 1);
}
+void EPUBExportTest::testImageBorder()
+{
+ createDoc("image-border.fodt", {});
+
+ mpXmlDoc = parseExport("OEBPS/sections/section0001.xhtml");
+ OUString aStyle = getXPath(mpXmlDoc, "//xhtml:img", "style");
+ // This failed, image had no border.
+ CPPUNIT_ASSERT_EQUAL(OUString("0.99pt dashed #ed1c24"), EPUBExportTest::parseCssStyle(aStyle)["border"]);
+}
+
void EPUBExportTest::testTable()
{
createDoc("table.fodt", {});
diff --git a/writerperfect/qa/unit/data/writer/epubexport/image-border.fodt b/writerperfect/qa/unit/data/writer/epubexport/image-border.fodt
new file mode 100644
index 000000000000..cffe4d606839
--- /dev/null
+++ b/writerperfect/qa/unit/data/writer/epubexport/image-border.fodt
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:style style:name="Graphics" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="dynamic" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
+ </style:style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties fo:color="#000000" style:font-size-complex="12pt"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:vertical-pos="top" style:vertical-rel="baseline" fo:padding="0.049cm" fo:border="0.99pt dashed #ed1c24" style:shadow="none" draw:shadow-opacity="100%" style:mirror="none" fo:clip="rect(0cm, 0cm, 0cm, 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="Standard">before<text:span text:style-name="T1"><draw:frame draw:style-name="fr1" draw:name="Object0" text:anchor-type="as-char" svg:width="1.663cm" svg:height="1.663cm" draw:z-index="0"><draw:image loext:mime-type="image/png"><office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAAAFz
+ UkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAA
+ AAJiS0dEAACqjSMyAAAACW9GRnMAAAAGAAAAAAAMc1XTAAAACXBIWXMAAA3XAAAN1wFCKJt4
+ AAAACXZwQWcAAABMAAAAQACdMTgbAAABzUlEQVRo3u3ZPU/CQBjA8X+Jxs3ESUDj4iK+LA5+
+ BBfjqBE1cXB2MlFAEqMgxvhNNL4sLsK3UPQL6ObkoAETz+FKW2mxCPRYnucWUu76/OC59C49
+ cGOCKqrD9kHRc6ddPv7oW2WCwMh0nF63Myz7Tm8hPTNu0pgHMER3scepTbgK6enJNND83RLn
+ /878yRaPmgBZFDuMsNLeWB9gmFQHP77MIg9gsYciR50NFKvtjIy10yk84pSZA7DYpwR8scmF
+ QQCMuoQMpzbh0iAARrlnVn90CWHTsZcAiHPPdINQAuqsc2MQAAnKDUKWEhZ10twaBEDSJWQo
+ YlFj7S9CzwEegkXWIbQsRAQASFJhpplwbRAACS+hANRJBxMiAkDcJeQ4sQkBhYgMoJ+Ozlwo
+ 2YQ7AJ6CRxyiUGnVy3hVKb0Af9v7hUG2Wy9TEQCUelFTDULB2S+YKYGOMcpM6UIccOQnRA6A
+ cSp6ibfI+wkGADBGpTEd8xz1AaAfTQ7huA8AvUw5hVjuA0D/C5OaMN8XACRZ8F0zCggKAQhA
+ AAIQgAAEIAABCEAAAhCAAAQgAAH4zg3feY4w3Xs44M5+oW0qvCWoGcvaIlM3x/f/ab+O738A
+ hOCNQr34oD4AAAAldEVYdGNyZWF0ZS1kYXRlADIwMTAtMTItMjBUMTc6MDg6MzYrMDE6MDB6
+ 5RscAAAAJXRFWHRtb2RpZnktZGF0ZQAyMDEwLTEyLTIwVDE3OjA4OjM3KzAxOjAwgyNmnAAA
+ AABJRU5ErkJggg==
+ </office:binary-data></draw:image></draw:frame></text:span>after</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/writerperfect/source/writer/exp/XMLTextFrameContext.cxx b/writerperfect/source/writer/exp/XMLTextFrameContext.cxx
index 94c76b71be9a..556b6597cb42 100644
--- a/writerperfect/source/writer/exp/XMLTextFrameContext.cxx
+++ b/writerperfect/source/writer/exp/XMLTextFrameContext.cxx
@@ -10,6 +10,7 @@
#include "XMLTextFrameContext.hxx"
#include "XMLBase64ImportContext.hxx"
+#include "txtparai.hxx"
#include "xmlimp.hxx"
using namespace com::sun::star;
@@ -83,9 +84,24 @@ rtl::Reference<XMLImportContext> XMLTextFrameContext::CreateChildContext(const O
return nullptr;
}
-void XMLTextFrameContext::startElement(const OUString &/*rName*/, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/)
+void XMLTextFrameContext::startElement(const OUString &/*rName*/, const css::uno::Reference<css::xml::sax::XAttributeList> &xAttribs)
{
- mrImport.GetGenerator().openFrame(librevenge::RVNGPropertyList());
+ librevenge::RVNGPropertyList aPropertyList;
+ for (sal_Int16 i = 0; i < xAttribs->getLength(); ++i)
+ {
+ const OUString &rAttributeName = xAttribs->getNameByIndex(i);
+ const OUString &rAttributeValue = xAttribs->getValueByIndex(i);
+
+ if (rAttributeName == "draw:style-name")
+ FillStyles(rAttributeValue, mrImport.GetAutomaticGraphicStyles(), mrImport.GetGraphicStyles(), aPropertyList);
+ else
+ {
+ OString sName = OUStringToOString(rAttributeName, RTL_TEXTENCODING_UTF8);
+ OString sValue = OUStringToOString(rAttributeValue, RTL_TEXTENCODING_UTF8);
+ aPropertyList.insert(sName.getStr(), sValue.getStr());
+ }
+ }
+ mrImport.GetGenerator().openFrame(aPropertyList);
}
void XMLTextFrameContext::endElement(const OUString &/*rName*/)
diff --git a/writerperfect/source/writer/exp/txtstyli.cxx b/writerperfect/source/writer/exp/txtstyli.cxx
index c05d53cc87b9..88c63aa9063f 100644
--- a/writerperfect/source/writer/exp/txtstyli.cxx
+++ b/writerperfect/source/writer/exp/txtstyli.cxx
@@ -75,6 +75,34 @@ void XMLTextPropertiesContext::startElement(const OUString &/*rName*/, const css
}
}
+/// Handler for <style:graphic-properties>.
+class XMLGraphicPropertiesContext : public XMLImportContext
+{
+public:
+ XMLGraphicPropertiesContext(XMLImport &rImport, XMLStyleContext &rStyle);
+
+ void SAL_CALL startElement(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &xAttribs) override;
+
+private:
+ XMLStyleContext &mrStyle;
+};
+
+XMLGraphicPropertiesContext::XMLGraphicPropertiesContext(XMLImport &rImport, XMLStyleContext &rStyle)
+ : XMLImportContext(rImport)
+ , mrStyle(rStyle)
+{
+}
+
+void XMLGraphicPropertiesContext::startElement(const OUString &/*rName*/, const css::uno::Reference<css::xml::sax::XAttributeList> &xAttribs)
+{
+ for (sal_Int16 i = 0; i < xAttribs->getLength(); ++i)
+ {
+ OString sName = OUStringToOString(xAttribs->getNameByIndex(i), RTL_TEXTENCODING_UTF8);
+ OString sValue = OUStringToOString(xAttribs->getValueByIndex(i), RTL_TEXTENCODING_UTF8);
+ mrStyle.GetGraphicPropertyList().insert(sName.getStr(), sValue.getStr());
+ }
+}
+
/// Handler for <style:table-properties>.
class XMLTablePropertiesContext : public XMLImportContext
{
@@ -211,6 +239,8 @@ rtl::Reference<XMLImportContext> XMLStyleContext::CreateChildContext(const OUStr
return new XMLTableRowPropertiesContext(mrImport, *this);
if (rName == "style:table-properties")
return new XMLTablePropertiesContext(mrImport, *this);
+ if (rName == "style:graphic-properties")
+ return new XMLGraphicPropertiesContext(mrImport, *this);
return nullptr;
}
@@ -242,14 +272,16 @@ void XMLStyleContext::endElement(const OUString &/*rName*/)
m_rStyles.GetCurrentTextStyles()[m_aName] = m_aTextPropertyList;
if (m_aFamily == "paragraph")
m_rStyles.GetCurrentParagraphStyles()[m_aName] = m_aParagraphPropertyList;
- if (m_aFamily == "table-cell")
+ else if (m_aFamily == "table-cell")
m_rStyles.GetCurrentCellStyles()[m_aName] = m_aCellPropertyList;
- if (m_aFamily == "table-column")
+ else if (m_aFamily == "table-column")
m_rStyles.GetCurrentColumnStyles()[m_aName] = m_aColumnPropertyList;
- if (m_aFamily == "table-row")
+ else if (m_aFamily == "table-row")
m_rStyles.GetCurrentRowStyles()[m_aName] = m_aRowPropertyList;
- if (m_aFamily == "table")
+ else if (m_aFamily == "table")
m_rStyles.GetCurrentTableStyles()[m_aName] = m_aTablePropertyList;
+ else if (m_aFamily == "graphic")
+ m_rStyles.GetCurrentGraphicStyles()[m_aName] = m_aGraphicPropertyList;
}
librevenge::RVNGPropertyList &XMLStyleContext::GetTextPropertyList()
@@ -282,6 +314,11 @@ librevenge::RVNGPropertyList &XMLStyleContext::GetTablePropertyList()
return m_aTablePropertyList;
}
+librevenge::RVNGPropertyList &XMLStyleContext::GetGraphicPropertyList()
+{
+ return m_aGraphicPropertyList;
+}
+
} // namespace exp
} // namespace writerperfect
diff --git a/writerperfect/source/writer/exp/txtstyli.hxx b/writerperfect/source/writer/exp/txtstyli.hxx
index 9855d459e360..f3b3b6da38c9 100644
--- a/writerperfect/source/writer/exp/txtstyli.hxx
+++ b/writerperfect/source/writer/exp/txtstyli.hxx
@@ -37,6 +37,7 @@ public:
librevenge::RVNGPropertyList &GetColumnPropertyList();
librevenge::RVNGPropertyList &GetRowPropertyList();
librevenge::RVNGPropertyList &GetTablePropertyList();
+ librevenge::RVNGPropertyList &GetGraphicPropertyList();
private:
OUString m_aName;
@@ -47,6 +48,7 @@ private:
librevenge::RVNGPropertyList m_aColumnPropertyList;
librevenge::RVNGPropertyList m_aRowPropertyList;
librevenge::RVNGPropertyList m_aTablePropertyList;
+ librevenge::RVNGPropertyList m_aGraphicPropertyList;
XMLStylesContext &m_rStyles;
};
diff --git a/writerperfect/source/writer/exp/xmlfmt.cxx b/writerperfect/source/writer/exp/xmlfmt.cxx
index 23550616953b..02f96f691e9b 100644
--- a/writerperfect/source/writer/exp/xmlfmt.cxx
+++ b/writerperfect/source/writer/exp/xmlfmt.cxx
@@ -19,19 +19,15 @@ namespace writerperfect
namespace exp
{
-XMLStylesContext::XMLStylesContext(XMLImport &rImport, std::map<OUString, librevenge::RVNGPropertyList> &rParagraphStyles,
- std::map<OUString, librevenge::RVNGPropertyList> &rTextStyles,
- std::map<OUString, librevenge::RVNGPropertyList> &rCellStyles,
- std::map<OUString, librevenge::RVNGPropertyList> &rColumnStyles,
- std::map<OUString, librevenge::RVNGPropertyList> &rRowStyles,
- std::map<OUString, librevenge::RVNGPropertyList> &rTableStyles)
+XMLStylesContext::XMLStylesContext(XMLImport &rImport, bool bAutomatic)
: XMLImportContext(rImport),
- m_rParagraphStyles(rParagraphStyles),
- m_rTextStyles(rTextStyles),
- m_rCellStyles(rCellStyles),
- m_rColumnStyles(rColumnStyles),
- m_rRowStyles(rRowStyles),
- m_rTableStyles(rTableStyles)
+ m_rParagraphStyles(bAutomatic ? mrImport.GetAutomaticParagraphStyles() : mrImport.GetParagraphStyles()),
+ m_rTextStyles(bAutomatic ? mrImport.GetAutomaticTextStyles() : mrImport.GetTextStyles()),
+ m_rCellStyles(bAutomatic ? mrImport.GetAutomaticCellStyles() : mrImport.GetCellStyles()),
+ m_rColumnStyles(bAutomatic ? mrImport.GetAutomaticColumnStyles() : mrImport.GetColumnStyles()),
+ m_rRowStyles(bAutomatic ? mrImport.GetAutomaticRowStyles() : mrImport.GetRowStyles()),
+ m_rTableStyles(bAutomatic ? mrImport.GetAutomaticTableStyles() : mrImport.GetTableStyles()),
+ m_rGraphicStyles(bAutomatic ? mrImport.GetAutomaticGraphicStyles() : mrImport.GetGraphicStyles())
{
}
@@ -72,6 +68,11 @@ std::map<OUString, librevenge::RVNGPropertyList> &XMLStylesContext::GetCurrentTa
return m_rTableStyles;
}
+std::map<OUString, librevenge::RVNGPropertyList> &XMLStylesContext::GetCurrentGraphicStyles()
+{
+ return m_rGraphicStyles;
+}
+
} // namespace exp
} // namespace writerperfect
diff --git a/writerperfect/source/writer/exp/xmlfmt.hxx b/writerperfect/source/writer/exp/xmlfmt.hxx
index 74d4b20d84f0..f4d82273b4f1 100644
--- a/writerperfect/source/writer/exp/xmlfmt.hxx
+++ b/writerperfect/source/writer/exp/xmlfmt.hxx
@@ -25,12 +25,7 @@ namespace exp
class XMLStylesContext : public XMLImportContext
{
public:
- XMLStylesContext(XMLImport &rImport, std::map<OUString, librevenge::RVNGPropertyList> &rParagraphStyles,
- std::map<OUString, librevenge::RVNGPropertyList> &rTextStyles,
- std::map<OUString, librevenge::RVNGPropertyList> &rCellStyles,
- std::map<OUString, librevenge::RVNGPropertyList> &rColumnStyles,
- std::map<OUString, librevenge::RVNGPropertyList> &rRowStyles,
- std::map<OUString, librevenge::RVNGPropertyList> &rTableStyles);
+ XMLStylesContext(XMLImport &rImport, bool bAutomatic);
rtl::Reference<XMLImportContext> CreateChildContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &xAttribs) override;
@@ -40,6 +35,7 @@ public:
std::map<OUString, librevenge::RVNGPropertyList> &GetCurrentColumnStyles();
std::map<OUString, librevenge::RVNGPropertyList> &GetCurrentRowStyles();
std::map<OUString, librevenge::RVNGPropertyList> &GetCurrentTableStyles();
+ std::map<OUString, librevenge::RVNGPropertyList> &GetCurrentGraphicStyles();
private:
std::map<OUString, librevenge::RVNGPropertyList> &m_rParagraphStyles;
std::map<OUString, librevenge::RVNGPropertyList> &m_rTextStyles;
@@ -47,6 +43,7 @@ private:
std::map<OUString, librevenge::RVNGPropertyList> &m_rColumnStyles;
std::map<OUString, librevenge::RVNGPropertyList> &m_rRowStyles;
std::map<OUString, librevenge::RVNGPropertyList> &m_rTableStyles;
+ std::map<OUString, librevenge::RVNGPropertyList> &m_rGraphicStyles;
};
} // namespace exp
diff --git a/writerperfect/source/writer/exp/xmlimp.cxx b/writerperfect/source/writer/exp/xmlimp.cxx
index 0f6582ff7403..b301cb3deb0f 100644
--- a/writerperfect/source/writer/exp/xmlimp.cxx
+++ b/writerperfect/source/writer/exp/xmlimp.cxx
@@ -63,19 +63,9 @@ rtl::Reference<XMLImportContext> XMLOfficeDocContext::CreateChildContext(const O
else if (rName == "office:meta")
return new XMLMetaDocumentContext(mrImport);
else if (rName == "office:automatic-styles")
- return new XMLStylesContext(mrImport, mrImport.GetAutomaticParagraphStyles(),
- mrImport.GetAutomaticTextStyles(),
- mrImport.GetAutomaticCellStyles(),
- mrImport.GetAutomaticColumnStyles(),
- mrImport.GetAutomaticRowStyles(),
- mrImport.GetAutomaticTableStyles());
+ return new XMLStylesContext(mrImport, /*bAutomatic=*/true);
else if (rName == "office:styles")
- return new XMLStylesContext(mrImport, mrImport.GetParagraphStyles(),
- mrImport.GetTextStyles(),
- mrImport.GetCellStyles(),
- mrImport.GetColumnStyles(),
- mrImport.GetRowStyles(),
- mrImport.GetTableStyles());
+ return new XMLStylesContext(mrImport, /*bAutomatic=*/false);
return nullptr;
}
@@ -126,6 +116,11 @@ std::map<OUString, librevenge::RVNGPropertyList> &XMLImport::GetAutomaticTableSt
return maAutomaticTableStyles;
}
+std::map<OUString, librevenge::RVNGPropertyList> &XMLImport::GetAutomaticGraphicStyles()
+{
+ return maAutomaticGraphicStyles;
+}
+
std::map<OUString, librevenge::RVNGPropertyList> &XMLImport::GetTextStyles()
{
return maTextStyles;
@@ -156,6 +151,11 @@ std::map<OUString, librevenge::RVNGPropertyList> &XMLImport::GetTableStyles()
return maTableStyles;
}
+std::map<OUString, librevenge::RVNGPropertyList> &XMLImport::GetGraphicStyles()
+{
+ return maGraphicStyles;
+}
+
void XMLImport::startDocument()
{
mrGenerator.startDocument(librevenge::RVNGPropertyList());
diff --git a/writerperfect/source/writer/exp/xmlimp.hxx b/writerperfect/source/writer/exp/xmlimp.hxx
index 7f690d86a165..e1b80571d278 100644
--- a/writerperfect/source/writer/exp/xmlimp.hxx
+++ b/writerperfect/source/writer/exp/xmlimp.hxx
@@ -47,6 +47,8 @@ class XMLImport : public cppu::WeakImplHelper
std::map<OUString, librevenge::RVNGPropertyList> maRowStyles;
std::map<OUString, librevenge::RVNGPropertyList> maAutomaticTableStyles;
std::map<OUString, librevenge::RVNGPropertyList> maTableStyles;
+ std::map<OUString, librevenge::RVNGPropertyList> maAutomaticGraphicStyles;
+ std::map<OUString, librevenge::RVNGPropertyList> maGraphicStyles;
public:
XMLImport(librevenge::RVNGTextInterface &rGenerator);
@@ -60,12 +62,14 @@ public:
std::map<OUString, librevenge::RVNGPropertyList> &GetAutomaticColumnStyles();
std::map<OUString, librevenge::RVNGPropertyList> &GetAutomaticRowStyles();
std::map<OUString, librevenge::RVNGPropertyList> &GetAutomaticTableStyles();
+ std::map<OUString, librevenge::RVNGPropertyList> &GetAutomaticGraphicStyles();
std::map<OUString, librevenge::RVNGPropertyList> &GetTextStyles();
std::map<OUString, librevenge::RVNGPropertyList> &GetParagraphStyles();
std::map<OUString, librevenge::RVNGPropertyList> &GetCellStyles();
std::map<OUString, librevenge::RVNGPropertyList> &GetColumnStyles();
std::map<OUString, librevenge::RVNGPropertyList> &GetRowStyles();
std::map<OUString, librevenge::RVNGPropertyList> &GetTableStyles();
+ std::map<OUString, librevenge::RVNGPropertyList> &GetGraphicStyles();
// XDocumentHandler
void SAL_CALL startDocument() override;