summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-10-30 12:01:59 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-10-30 12:05:08 +0100
commit1dac69edef6f2b7632dc3be002ba7d3075c70b96 (patch)
treea91fe5f12424ff4b88ecd890e6cc462c135fa4c7 /writerfilter
parentc51a6ffd3ca90ec5fcad55826fdbc1b2f7ad6109 (diff)
writerfilter: also store table style type
Change-Id: Iff8ce5c7c7904a91ed1dc1aea8f7053abeeb1a45
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx3
-rw-r--r--writerfilter/source/dmapper/TblStylePrHandler.cxx30
-rw-r--r--writerfilter/source/dmapper/TblStylePrHandler.hxx2
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: