diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-10-24 12:51:17 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-10-24 13:08:44 +0200 |
commit | 10b12c965d29a91a4fda7b684caaf1ec738daa91 (patch) | |
tree | 64816a421a0f967ce620c145c70d8e14f61dd246 /writerfilter/source | |
parent | writerfilter: implement TblStylePrHandler::getInteropGrabBag (diff) | |
download | core-10b12c965d29a91a4fda7b684caaf1ec738daa91.tar.gz core-10b12c965d29a91a4fda7b684caaf1ec738daa91.zip |
writerfilter: implement TablePropertiesHandler::SetInteropGrabBag
This allows to store keys in table style's tblPr (no contents yet).
Change-Id: I2aa80c8bee3f76a7c0090407f97156e3e3061a1d
Diffstat (limited to 'writerfilter/source')
4 files changed, 24 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.cxx b/writerfilter/source/dmapper/TablePropertiesHandler.cxx index 8153df269d68..9168fa6e1e3e 100644 --- a/writerfilter/source/dmapper/TablePropertiesHandler.cxx +++ b/writerfilter/source/dmapper/TablePropertiesHandler.cxx @@ -38,6 +38,7 @@ namespace writerfilter { namespace dmapper { TablePropertiesHandler::TablePropertiesHandler( bool bOOXML ) : + m_pCurrentInteropGrabBag(0), m_pTableManager( NULL ), m_bOOXML( bOOXML ) { @@ -262,6 +263,12 @@ namespace dmapper { { MeasureHandlerPtr pHandler(new MeasureHandler); pProperties->resolve( *pHandler ); + if (m_pCurrentInteropGrabBag) + { + beans::PropertyValue aValue; + aValue.Name = "tblInd"; + m_pCurrentInteropGrabBag->push_back(aValue); + } TablePropertyMapPtr pTblIndMap(new TablePropertyMap); sal_uInt32 nTblInd = pHandler->getMeasureValue(); pTblIndMap->setValue( TablePropertyMap::LEFT_MARGIN, nTblInd); @@ -278,6 +285,11 @@ namespace dmapper { return bRet; } + + void TablePropertiesHandler::SetInteropGrabBag(std::vector<beans::PropertyValue>& rValue) + { + m_pCurrentInteropGrabBag = &rValue; + } }} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.hxx b/writerfilter/source/dmapper/TablePropertiesHandler.hxx index 4c3056940834..6ce9b36c7422 100644 --- a/writerfilter/source/dmapper/TablePropertiesHandler.hxx +++ b/writerfilter/source/dmapper/TablePropertiesHandler.hxx @@ -42,6 +42,7 @@ class TablePropertiesHandler private: vector< PropertyMapPtr > m_rPropertiesStack; PropertyMapPtr m_pCurrentProperties; + std::vector<beans::PropertyValue>* m_pCurrentInteropGrabBag; DomainMapperTableManager_Base_t *m_pTableManager; bool m_bOOXML; @@ -61,6 +62,8 @@ public: m_pCurrentProperties = pProperties; }; + void SetInteropGrabBag(std::vector<beans::PropertyValue>& rValue); + private: inline void cellProps( TablePropertyMapPtr pProps ) diff --git a/writerfilter/source/dmapper/TblStylePrHandler.cxx b/writerfilter/source/dmapper/TblStylePrHandler.cxx index 4ef5fa05a6ff..7884cbca0af9 100644 --- a/writerfilter/source/dmapper/TblStylePrHandler.cxx +++ b/writerfilter/source/dmapper/TblStylePrHandler.cxx @@ -83,6 +83,7 @@ void TblStylePrHandler::lcl_sprm(Sprm & rSprm) default: // Tables specific properties have to handled here m_pTablePropsHandler->SetProperties( m_pProperties ); + m_pTablePropsHandler->SetInteropGrabBag(m_aInteropGrabBag); bool bRet = m_pTablePropsHandler->sprm( rSprm ); if ( !bRet ) @@ -110,6 +111,13 @@ beans::PropertyValue TblStylePrHandler::getInteropGrabBag(OUString aName) { beans::PropertyValue aRet; aRet.Name = aName; + + uno::Sequence<beans::PropertyValue> aSeq(m_aInteropGrabBag.size()); + beans::PropertyValue* pSeq = aSeq.getArray(); + for (std::vector<beans::PropertyValue>::iterator i = m_aInteropGrabBag.begin(); i != m_aInteropGrabBag.end(); ++i) + *pSeq++ = *i; + + aRet.Value = uno::makeAny(aSeq); return aRet; } diff --git a/writerfilter/source/dmapper/TblStylePrHandler.hxx b/writerfilter/source/dmapper/TblStylePrHandler.hxx index b60756598d8f..6b74a76626ba 100644 --- a/writerfilter/source/dmapper/TblStylePrHandler.hxx +++ b/writerfilter/source/dmapper/TblStylePrHandler.hxx @@ -58,6 +58,7 @@ private: TblStyleType m_nType; PropertyMapPtr m_pProperties; + std::vector<beans::PropertyValue> m_aInteropGrabBag; // Properties virtual void lcl_attribute(Id Name, Value & val); |