summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-12-09 09:17:14 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-12-09 13:52:32 +0100
commit0c5c971d36e444b0d50eb385c6c5105edcfe045c (patch)
tree422bbe6fc8d05dc57cb3b3f3611e84adf94f3667 /sw
parentc8b4fe55b8b50fc33a9157e93b42aed0f7d30534 (diff)
sw: initial SwFltRDFMark
So that SwWW8ImplReader::Read_FactoidBook() can put this as an attribute on the import stack instead of CntUInt16Item. Change-Id: I1753bc4a94f49332a945a4c6de7f58768d35ff16
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/basflt/fltshell.cxx48
-rw-r--r--sw/source/filter/inc/fltshell.hxx19
2 files changed, 67 insertions, 0 deletions
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx
index 97ebd672793e..37aad9fd5bde 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -969,6 +969,54 @@ SfxPoolItem* SwFltBookmark::Clone(SfxItemPool*) const
return new SwFltBookmark(*this);
}
+SwFltRDFMark::SwFltRDFMark()
+ : SfxPoolItem(RES_FLTR_RDFMARK),
+ m_nHandle(0)
+{
+}
+
+SwFltRDFMark::SwFltRDFMark(const SwFltRDFMark& rMark)
+ : SfxPoolItem(RES_FLTR_RDFMARK),
+ m_nHandle(rMark.m_nHandle),
+ m_aAttributes(rMark.m_aAttributes)
+{
+}
+
+bool SwFltRDFMark::operator==(const SfxPoolItem& rItem) const
+{
+ if (!SfxPoolItem::operator==(rItem))
+ return false;
+
+ const SwFltRDFMark& rMark = static_cast<const SwFltRDFMark&>(rItem);
+
+ return m_nHandle == rMark.m_nHandle && m_aAttributes == rMark.m_aAttributes;
+}
+
+SfxPoolItem* SwFltRDFMark::Clone(SfxItemPool*) const
+{
+ return new SwFltRDFMark(*this);
+}
+
+void SwFltRDFMark::SetHandle(long nHandle)
+{
+ m_nHandle = nHandle;
+}
+
+long SwFltRDFMark::GetHandle() const
+{
+ return m_nHandle;
+}
+
+void SwFltRDFMark::SetAttributes(const std::vector< std::pair<OUString, OUString> >& rAttributes)
+{
+ m_aAttributes = rAttributes;
+}
+
+const std::vector< std::pair<OUString, OUString> >& SwFltRDFMark::GetAttributes() const
+{
+ return m_aAttributes;
+}
+
// methods of SwFltTOX follow
SwFltTOX::SwFltTOX(SwTOXBase* pBase, sal_uInt16 _nCols)
: SfxPoolItem(RES_FLTR_TOX), pTOXBase(pBase), nCols( _nCols ),
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index e0e2df0d9b1f..7dce67125a4a 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -286,6 +286,25 @@ public:
}
};
+/// Stores RDF statements on a paragraph (key-value pairs where the subject is the paragraph).
+class SW_DLLPUBLIC SwFltRDFMark : public SfxPoolItem
+{
+ long m_nHandle;
+ std::vector< std::pair<OUString, OUString> > m_aAttributes;
+
+public:
+ SwFltRDFMark();
+ SwFltRDFMark(const SwFltRDFMark&);
+
+ virtual bool operator==(const SfxPoolItem&) const override;
+ virtual SfxPoolItem* Clone(SfxItemPool* = nullptr) const override;
+
+ void SetHandle(long nHandle);
+ long GetHandle() const;
+ void SetAttributes(const std::vector< std::pair<OUString, OUString> >& rAttributes);
+ const std::vector< std::pair<OUString, OUString> >& GetAttributes() const;
+};
+
class SW_DLLPUBLIC SwFltTOX : public SfxPoolItem
{
SwTOXBase* pTOXBase;