diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-08 11:20:05 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-08 14:23:12 +0100 |
commit | 605f7c34b8598c6b3a5748d5a5382c07d743706c (patch) | |
tree | 110e9e3e72e43bd39cf0b8be0d49e785b5f3b437 /sw | |
parent | 272e48c681cf80b978d3cfc9c8d843bc7d1e71d2 (diff) |
SwNumRule: add getter / setter for InteropGrabBag
Change-Id: I6f76dbfd806139f141c054dccb0884be32511e06
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/numrule.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/number.cxx | 20 |
2 files changed, 24 insertions, 0 deletions
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx index 95dfb330f332..5b71ddd38eb4 100644 --- a/sw/inc/numrule.hxx +++ b/sw/inc/numrule.hxx @@ -37,6 +37,7 @@ class IDocumentListsAccess; class SwNodeNum; class Font; class SvxBrushItem; +class SfxGrabBagItem; class SvxNumRule; class SwCharFmt; class SwDoc; @@ -141,6 +142,7 @@ private: const SvxNumberFormat::SvxNumPositionAndSpaceMode meDefaultNumberFormatPositionAndSpaceMode; OUString msDefaultListId; + boost::shared_ptr<SfxGrabBagItem> mpGrabBagItem; ///< Style InteropGrabBag. public: /// add parameter <eDefaultNumberFormatPositionAndSpaceMode> @@ -271,6 +273,8 @@ public: void Validate(); void dumpAsXml(xmlTextWriterPtr w); + void GetGrabBagItem(com::sun::star::uno::Any& rVal) const; + void SetGrabBagItem(const com::sun::star::uno::Any& rVal); }; /// namespace for static functions and methods for numbering and bullets diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index e4f65e35f2b0..c3fe90239358 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -24,6 +24,7 @@ #include <editeng/brushitem.hxx> #include <editeng/lrspitem.hxx> #include <editeng/numitem.hxx> +#include <svl/grabbagitem.hxx> #include <fmtornt.hxx> #include <doc.hxx> #include <pam.hxx> @@ -1041,6 +1042,25 @@ void SwNumRule::RemoveParagraphStyle( SwTxtFmtColl& rTxtFmtColl ) } } +void SwNumRule::GetGrabBagItem(uno::Any& rVal) const +{ + if (mpGrabBagItem.get()) + mpGrabBagItem->QueryValue(rVal); + else + { + uno::Sequence<beans::PropertyValue> aValue(0); + rVal = uno::makeAny(aValue); + } +} + +void SwNumRule::SetGrabBagItem(const uno::Any& rVal) +{ + if (!mpGrabBagItem.get()) + mpGrabBagItem.reset(new SfxGrabBagItem); + + mpGrabBagItem->PutValue(rVal); +} + namespace numfunc { /** class containing default bullet list configuration data */ |