diff options
-rw-r--r-- | writerfilter/source/dmapper/StyleSheetTable.cxx | 3 | ||||
-rw-r--r-- | writerfilter/source/dmapper/TblStylePrHandler.cxx | 30 | ||||
-rw-r--r-- | writerfilter/source/dmapper/TblStylePrHandler.hxx | 2 |
3 files changed, 35 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 4506b6943759..b4c5d3e55c2e 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -664,7 +664,10 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm) pTableEntry->AppendInteropGrabBag(pTblStylePrHandler->getInteropGrabBag("tblPr")); } else if (nSprmId == NS_ooxml::LN_CT_Style_tblStylePr) + { + pTblStylePrHandler->appendInteropGrabBag("type", pTblStylePrHandler->getTypeString()); pTableEntry->AppendInteropGrabBag(pTblStylePrHandler->getInteropGrabBag("tblStylePr")); + } } break; } diff --git a/writerfilter/source/dmapper/TblStylePrHandler.cxx b/writerfilter/source/dmapper/TblStylePrHandler.cxx index 194acebff2be..10eecfb7847c 100644 --- a/writerfilter/source/dmapper/TblStylePrHandler.cxx +++ b/writerfilter/source/dmapper/TblStylePrHandler.cxx @@ -42,6 +42,28 @@ TblStylePrHandler::~TblStylePrHandler( ) delete m_pTablePropsHandler, m_pTablePropsHandler = NULL; } +OUString TblStylePrHandler::getTypeString() +{ + switch (m_nType) + { + case TBL_STYLE_WHOLETABLE: return OUString("wholeTable"); + case TBL_STYLE_FIRSTROW: return OUString("firstRow"); + case TBL_STYLE_LASTROW: return OUString("lastRow"); + case TBL_STYLE_FIRSTCOL: return OUString("firstCol"); + case TBL_STYLE_LASTCOL: return OUString("lastCol"); + case TBL_STYLE_BAND1VERT: return OUString("band1Vert"); + case TBL_STYLE_BAND2VERT: return OUString("band2Vert"); + case TBL_STYLE_BAND1HORZ: return OUString("band1Horz"); + case TBL_STYLE_BAND2HORZ: return OUString("band2Horz"); + case TBL_STYLE_NECELL: return OUString("neCell"); + case TBL_STYLE_NWCELL: return OUString("nwCell"); + case TBL_STYLE_SECELL: return OUString("seCell"); + case TBL_STYLE_SWCELL: return OUString("swCell"); + default: break; + } + return OUString(); +} + void TblStylePrHandler::lcl_attribute(Id rName, Value & rVal) { #ifdef DEBUG_DOMAINMAPPER @@ -136,6 +158,14 @@ void TblStylePrHandler::resolveSprmProps(Sprm & rSprm) pProperties->resolve(*this); } +void TblStylePrHandler::appendInteropGrabBag(OUString aKey, OUString aValue) +{ + beans::PropertyValue aProperty; + aProperty.Name = aKey; + aProperty.Value = uno::makeAny(aValue); + m_aInteropGrabBag.push_back(aProperty); +} + beans::PropertyValue TblStylePrHandler::getInteropGrabBag(OUString aName) { beans::PropertyValue aRet; diff --git a/writerfilter/source/dmapper/TblStylePrHandler.hxx b/writerfilter/source/dmapper/TblStylePrHandler.hxx index 6b74a76626ba..a7abf776e3ea 100644 --- a/writerfilter/source/dmapper/TblStylePrHandler.hxx +++ b/writerfilter/source/dmapper/TblStylePrHandler.hxx @@ -70,6 +70,8 @@ public: inline PropertyMapPtr getProperties() { return m_pProperties; }; inline TblStyleType getType() { return m_nType; }; + OUString getTypeString(); + void appendInteropGrabBag(OUString aKey, OUString aValue); beans::PropertyValue getInteropGrabBag(OUString aName); private: |