diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-04-08 15:39:00 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-04-08 17:51:38 +0200 |
commit | 4077b267eba6710925f0cff6186e4dad9d932b7c (patch) | |
tree | b9d66ba1ef34ff8cfeaf87219de149c49d5d4d9f /svl/source/items/itemset.cxx | |
parent | b269f2af94cceafdc5d2df0279eb176f7b08b390 (diff) |
svl: move SfxItemSet methods together
Change-Id: I3f47273f7b648e8c8d261217ba3f9ea8d366b61b
Diffstat (limited to 'svl/source/items/itemset.cxx')
-rw-r--r-- | svl/source/items/itemset.cxx | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index e6917eaac17f..22e4318672c4 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -1605,7 +1605,33 @@ int SfxItemSet::PutDirect(const SfxPoolItem &rItem) return sal_False; } +sal_Int32 SfxItemSet::getHash() const +{ + return stringify().hashCode(); +} + +OString SfxItemSet::stringify() const +{ + SvMemoryStream aStream; + SfxItemSet aSet(*this); + aSet.InvalidateDefaultItems(); + aSet.Store(aStream, true); + aStream.Flush(); + return OString( + static_cast<char const *>(aStream.GetData()), aStream.GetEndOfData()); +} +void SfxItemSet::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + xmlTextWriterStartElement(pWriter, BAD_CAST("sfxItemSet")); + SfxItemIter aIter(*this); + for (const SfxPoolItem* pItem = aIter.FirstItem(); pItem; pItem = aIter.NextItem()) + pItem->dumpAsXml(pWriter); + xmlTextWriterEndElement(pWriter); +} + + +// ----------------------------------------------- class SfxAllItemSet SfxAllItemSet::SfxAllItemSet( SfxItemPool &rPool ) : SfxItemSet(rPool, (const sal_uInt16*) 0), @@ -1843,31 +1869,4 @@ SfxItemSet *SfxAllItemSet::Clone(bool bItems, SfxItemPool *pToPool ) const return bItems ? new SfxAllItemSet(*this) : new SfxAllItemSet(*m_pPool); } - - -sal_Int32 SfxItemSet::getHash() const -{ - return stringify().hashCode(); -} - -OString SfxItemSet::stringify() const -{ - SvMemoryStream aStream; - SfxItemSet aSet(*this); - aSet.InvalidateDefaultItems(); - aSet.Store(aStream, true); - aStream.Flush(); - return OString( - static_cast<char const *>(aStream.GetData()), aStream.GetEndOfData()); -} - -void SfxItemSet::dumpAsXml(xmlTextWriterPtr pWriter) const -{ - xmlTextWriterStartElement(pWriter, BAD_CAST("sfxItemSet")); - SfxItemIter aIter(*this); - for (const SfxPoolItem* pItem = aIter.FirstItem(); pItem; pItem = aIter.NextItem()) - pItem->dumpAsXml(pWriter); - xmlTextWriterEndElement(pWriter); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |