[Libreoffice-commits] core.git: writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Oct 30 12:05:27 CET 2013
writerfilter/source/dmapper/StyleSheetTable.cxx | 3 ++
writerfilter/source/dmapper/TblStylePrHandler.cxx | 30 ++++++++++++++++++++++
writerfilter/source/dmapper/TblStylePrHandler.hxx | 2 +
3 files changed, 35 insertions(+)
New commits:
commit 1dac69edef6f2b7632dc3be002ba7d3075c70b96
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Oct 30 12:01:59 2013 +0100
writerfilter: also store table style type
Change-Id: Iff8ce5c7c7904a91ed1dc1aea8f7053abeeb1a45
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 4506b69..b4c5d3e 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 194aceb..10eecfb 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 6b74a76..a7abf77 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:
More information about the Libreoffice-commits
mailing list